1(self["webpackChunkhps"] = self["webpackChunkhps"] || []).push([["vendor"],{ 2
vendor: 39,499 bytes, lines 3-1307
3/***/ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js": 4/*!*********************************************************************!*\ 5 !*** ./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js ***! 6 \*********************************************************************/ 7/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8 9"use strict"; 10__webpack_require__.r(__webpack_exports__); 11/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12/* harmony export */ EffectScope: () => (/* binding */ EffectScope), 13/* harmony export */ ITERATE_KEY: () => (/* binding */ ITERATE_KEY), 14/* harmony export */ ReactiveEffect: () => (/* binding */ ReactiveEffect), 15/* harmony export */ ReactiveFlags: () => (/* binding */ ReactiveFlags), 16/* harmony export */ TrackOpTypes: () => (/* binding */ TrackOpTypes), 17/* harmony export */ TriggerOpTypes: () => (/* binding */ TriggerOpTypes), 18/* harmony export */ computed: () => (/* binding */ computed), 19/* harmony export */ customRef: () => (/* binding */ customRef), 20/* harmony export */ deferredComputed: () => (/* binding */ deferredComputed), 21/* harmony export */ effect: () => (/* binding */ effect), 22/* harmony export */ effectScope: () => (/* binding */ effectScope), 23/* harmony export */ enableTracking: () => (/* binding */ enableTracking), 24/* harmony export */ getCurrentScope: () => (/* binding */ getCurrentScope), 25/* harmony export */ isProxy: () => (/* binding */ isProxy), 26/* harmony export */ isReactive: () => (/* binding */ isReactive), 27/* harmony export */ isReadonly: () => (/* binding */ isReadonly), 28/* harmony export */ isRef: () => (/* binding */ isRef), 29/* harmony export */ isShallow: () => (/* binding */ isShallow), 30/* harmony export */ markRaw: () => (/* binding */ markRaw), 31/* harmony export */ onScopeDispose: () => (/* binding */ onScopeDispose), 32/* harmony export */ pauseScheduling: () => (/* binding */ pauseScheduling), 33/* harmony export */ pauseTracking: () => (/* binding */ pauseTracking), 34/* harmony export */ proxyRefs: () => (/* binding */ proxyRefs), 35/* harmony export */ reactive: () => (/* binding */ reactive), 36/* harmony export */ readonly: () => (/* binding */ readonly), 37/* harmony export */ ref: () => (/* binding */ ref), 38/* harmony export */ resetScheduling: () => (/* binding */ resetScheduling), 39/* harmony export */ resetTracking: () => (/* binding */ resetTracking), 40/* harmony export */ shallowReactive: () => (/* binding */ shallowReactive), 41/* harmony export */ shallowReadonly: () => (/* binding */ shallowReadonly), 42/* harmony export */ shallowRef: () => (/* binding */ shallowRef), 43/* harmony export */ stop: () => (/* binding */ stop), 44/* harmony export */ toRaw: () => (/* binding */ toRaw), 45/* harmony export */ toRef: () => (/* binding */ toRef), 46/* harmony export */ toRefs: () => (/* binding */ toRefs), 47/* harmony export */ toValue: () => (/* binding */ toValue), 48/* harmony export */ track: () => (/* binding */ track), 49/* harmony export */ trigger: () => (/* binding */ trigger), 50/* harmony export */ triggerRef: () => (/* binding */ triggerRef), 51/* harmony export */ unref: () => (/* binding */ unref) 52/* harmony export */ }); 53/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js"); 54/** 55* @vue/reactivity v3.4.37 56* (c) 2018-present Yuxi (Evan) You and Vue contributors 57* @license MIT 58**/ 59 60 61function warn(msg, ...args) { 62 console.warn(`[Vue warn] ${msg}`, ...args); 63} 64 65let activeEffectScope; 66class EffectScope { 67 constructor(detached = false) { 68 this.detached = detached; 69 /** 70 * @internal 71 */ 72 this._active = true; 73 /** 74 * @internal 75 */ 76 this.effects = []; 77 /** 78 * @internal 79 */ 80 this.cleanups = []; 81 this.parent = activeEffectScope; 82 if (!detached && activeEffectScope) { 83 this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( 84 this 85 ) - 1; 86 } 87 } 88 get active() { 89 return this._active; 90 } 91 run(fn) { 92 if (this._active) { 93 const currentEffectScope = activeEffectScope; 94 try { 95 activeEffectScope = this; 96 return fn(); 97 } finally { 98 activeEffectScope = currentEffectScope; 99 } 100 } else if (true) { 101 warn(`cannot run an inactive effect scope.`); 102 } 103 } 104 /** 105 * This should only be called on non-detached scopes 106 * @internal 107 */ 108 on() { 109 activeEffectScope = this; 110 } 111 /** 112 * This should only be called on non-detached scopes 113 * @internal 114 */ 115 off() { 116 activeEffectScope = this.parent; 117 } 118 stop(fromParent) { 119 if (this._active) { 120 let i, l; 121 for (i = 0, l = this.effects.length; i < l; i++) { 122 this.effects[i].stop(); 123 } 124 for (i = 0, l = this.cleanups.length; i < l; i++) { 125 this.cleanups[i](); 126 } 127 if (this.scopes) { 128 for (i = 0, l = this.scopes.length; i < l; i++) { 129 this.scopes[i].stop(true); 130 } 131 } 132 if (!this.detached && this.parent && !fromParent) { 133 const last = this.parent.scopes.pop(); 134 if (last && last !== this) { 135 this.parent.scopes[this.index] = last; 136 last.index = this.index; 137 } 138 } 139 this.parent = void 0; 140 this._active = false; 141 } 142 } 143} 144function effectScope(detached) { 145 return new EffectScope(detached); 146} 147function recordEffectScope(effect, scope = activeEffectScope) { 148 if (scope && scope.active) { 149 scope.effects.push(effect); 150 } 151} 152function getCurrentScope() { 153 return activeEffectScope; 154} 155function onScopeDispose(fn) { 156 if (activeEffectScope) { 157 activeEffectScope.cleanups.push(fn); 158 } else if (true) { 159 warn( 160 `onScopeDispose() is called when there is no active effect scope to be associated with.` 161 ); 162 } 163} 164 165let activeEffect; 166class ReactiveEffect { 167 constructor(fn, trigger, scheduler, scope) { 168 this.fn = fn; 169 this.trigger = trigger; 170 this.scheduler = scheduler; 171 this.active = true; 172 this.deps = []; 173 /** 174 * @internal 175 */ 176 this._dirtyLevel = 4; 177 /** 178 * @internal 179 */ 180 this._trackId = 0; 181 /** 182 * @internal 183 */ 184 this._runnings = 0; 185 /** 186 * @internal 187 */ 188 this._shouldSchedule = false; 189 /** 190 * @internal 191 */ 192 this._depsLength = 0; 193 recordEffectScope(this, scope); 194 } 195 get dirty() { 196 if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { 197 this._dirtyLevel = 1; 198 pauseTracking(); 199 for (let i = 0; i < this._depsLength; i++) { 200 const dep = this.deps[i]; 201 if (dep.computed) { 202 triggerComputed(dep.computed); 203 if (this._dirtyLevel >= 4) { 204 break; 205 } 206 } 207 } 208 if (this._dirtyLevel === 1) { 209 this._dirtyLevel = 0; 210 } 211 resetTracking(); 212 } 213 return this._dirtyLevel >= 4; 214 } 215 set dirty(v) { 216 this._dirtyLevel = v ? 4 : 0; 217 } 218 run() { 219 this._dirtyLevel = 0; 220 if (!this.active) { 221 return this.fn(); 222 } 223 let lastShouldTrack = shouldTrack; 224 let lastEffect = activeEffect; 225 try { 226 shouldTrack = true; 227 activeEffect = this; 228 this._runnings++; 229 preCleanupEffect(this); 230 return this.fn(); 231 } finally { 232 postCleanupEffect(this); 233 this._runnings--; 234 activeEffect = lastEffect; 235 shouldTrack = lastShouldTrack; 236 } 237 } 238 stop() { 239 if (this.active) { 240 preCleanupEffect(this); 241 postCleanupEffect(this); 242 this.onStop && this.onStop(); 243 this.active = false; 244 } 245 } 246} 247function triggerComputed(computed) { 248 return computed.value; 249} 250function preCleanupEffect(effect2) { 251 effect2._trackId++; 252 effect2._depsLength = 0; 253} 254function postCleanupEffect(effect2) { 255 if (effect2.deps.length > effect2._depsLength) { 256 for (let i = effect2._depsLength; i < effect2.deps.length; i++) { 257 cleanupDepEffect(effect2.deps[i], effect2); 258 } 259 effect2.deps.length = effect2._depsLength; 260 } 261} 262function cleanupDepEffect(dep, effect2) { 263 const trackId = dep.get(effect2); 264 if (trackId !== void 0 && effect2._trackId !== trackId) { 265 dep.delete(effect2); 266 if (dep.size === 0) { 267 dep.cleanup(); 268 } 269 } 270} 271function effect(fn, options) { 272 if (fn.effect instanceof ReactiveEffect) { 273 fn = fn.effect.fn; 274 } 275 const _effect = new ReactiveEffect(fn, _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP, () => { 276 if (_effect.dirty) { 277 _effect.run(); 278 } 279 }); 280 if (options) { 281 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(_effect, options); 282 if (options.scope) recordEffectScope(_effect, options.scope); 283 } 284 if (!options || !options.lazy) { 285 _effect.run(); 286 } 287 const runner = _effect.run.bind(_effect); 288 runner.effect = _effect; 289 return runner; 290} 291function stop(runner) { 292 runner.effect.stop(); 293} 294let shouldTrack = true; 295let pauseScheduleStack = 0; 296const trackStack = []; 297function pauseTracking() { 298 trackStack.push(shouldTrack); 299 shouldTrack = false; 300} 301function enableTracking() { 302 trackStack.push(shouldTrack); 303 shouldTrack = true; 304} 305function resetTracking() { 306 const last = trackStack.pop(); 307 shouldTrack = last === void 0 ? true : last; 308} 309function pauseScheduling() { 310 pauseScheduleStack++; 311} 312function resetScheduling() { 313 pauseScheduleStack--; 314 while (!pauseScheduleStack && queueEffectSchedulers.length) { 315 queueEffectSchedulers.shift()(); 316 } 317} 318function trackEffect(effect2, dep, debuggerEventExtraInfo) { 319 var _a; 320 if (dep.get(effect2) !== effect2._trackId) { 321 dep.set(effect2, effect2._trackId); 322 const oldDep = effect2.deps[effect2._depsLength]; 323 if (oldDep !== dep) { 324 if (oldDep) { 325 cleanupDepEffect(oldDep, effect2); 326 } 327 effect2.deps[effect2._depsLength++] = dep; 328 } else { 329 effect2._depsLength++; 330 } 331 if (true) { 332 (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({ effect: effect2 }, debuggerEventExtraInfo)); 333 } 334 } 335} 336const queueEffectSchedulers = []; 337function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { 338 var _a; 339 pauseScheduling(); 340 for (const effect2 of dep.keys()) { 341 let tracking; 342 if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { 343 effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); 344 effect2._dirtyLevel = dirtyLevel; 345 } 346 if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { 347 if (true) { 348 (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({ effect: effect2 }, debuggerEventExtraInfo)); 349 } 350 effect2.trigger(); 351 if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { 352 effect2._shouldSchedule = false; 353 if (effect2.scheduler) { 354 queueEffectSchedulers.push(effect2.scheduler); 355 } 356 } 357 } 358 } 359 resetScheduling(); 360} 361 362const createDep = (cleanup, computed) => { 363 const dep = /* @__PURE__ */ new Map(); 364 dep.cleanup = cleanup; 365 dep.computed = computed; 366 return dep; 367}; 368 369const targetMap = /* @__PURE__ */ new WeakMap(); 370const ITERATE_KEY = Symbol( true ? "iterate" : 0); 371const MAP_KEY_ITERATE_KEY = Symbol( true ? "Map key iterate" : 0); 372function track(target, type, key) { 373 if (shouldTrack && activeEffect) { 374 let depsMap = targetMap.get(target); 375 if (!depsMap) { 376 targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); 377 } 378 let dep = depsMap.get(key); 379 if (!dep) { 380 depsMap.set(key, dep = createDep(() => depsMap.delete(key))); 381 } 382 trackEffect( 383 activeEffect, 384 dep, 385 true ? { 386 target, 387 type, 388 key 389 } : 0 390 ); 391 } 392} 393function trigger(target, type, key, newValue, oldValue, oldTarget) { 394 const depsMap = targetMap.get(target); 395 if (!depsMap) { 396 return; 397 } 398 let deps = []; 399 if (type === "clear") { 400 deps = [...depsMap.values()]; 401 } else if (key === "length" && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) { 402 const newLength = Number(newValue); 403 depsMap.forEach((dep, key2) => { 404 if (key2 === "length" || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key2) && key2 >= newLength) { 405 deps.push(dep); 406 } 407 }); 408 } else { 409 if (key !== void 0) { 410 deps.push(depsMap.get(key)); 411 } 412 switch (type) { 413 case "add": 414 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) { 415 deps.push(depsMap.get(ITERATE_KEY)); 416 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) { 417 deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); 418 } 419 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key)) { 420 deps.push(depsMap.get("length")); 421 } 422 break; 423 case "delete": 424 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) { 425 deps.push(depsMap.get(ITERATE_KEY)); 426 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) { 427 deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); 428 } 429 } 430 break; 431 case "set": 432 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) { 433 deps.push(depsMap.get(ITERATE_KEY)); 434 } 435 break; 436 } 437 } 438 pauseScheduling(); 439 for (const dep of deps) { 440 if (dep) { 441 triggerEffects( 442 dep, 443 4, 444 true ? { 445 target, 446 type, 447 key, 448 newValue, 449 oldValue, 450 oldTarget 451 } : 0 452 ); 453 } 454 } 455 resetScheduling(); 456} 457function getDepFromReactive(object, key) { 458 const depsMap = targetMap.get(object); 459 return depsMap && depsMap.get(key); 460} 461 462const isNonTrackableKeys = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.makeMap)(`__proto__,__v_isRef,__isVue`); 463const builtInSymbols = new Set( 464 /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol) 465); 466const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); 467function createArrayInstrumentations() { 468 const instrumentations = {}; 469 ["includes", "indexOf", "lastIndexOf"].forEach((key) => { 470 instrumentations[key] = function(...args) { 471 const arr = toRaw(this); 472 for (let i = 0, l = this.length; i < l; i++) { 473 track(arr, "get", i + ""); 474 } 475 const res = arr[key](...args); 476 if (res === -1 || res === false) { 477 return arr[key](...args.map(toRaw)); 478 } else { 479 return res; 480 } 481 }; 482 }); 483 ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { 484 instrumentations[key] = function(...args) { 485 pauseTracking(); 486 pauseScheduling(); 487 const res = toRaw(this)[key].apply(this, args); 488 resetScheduling(); 489 resetTracking(); 490 return res; 491 }; 492 }); 493 return instrumentations; 494} 495function hasOwnProperty(key) { 496 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key)) key = String(key); 497 const obj = toRaw(this); 498 track(obj, "has", key); 499 return obj.hasOwnProperty(key); 500} 501class BaseReactiveHandler { 502 constructor(_isReadonly = false, _isShallow = false) { 503 this._isReadonly = _isReadonly; 504 this._isShallow = _isShallow; 505 } 506 get(target, key, receiver) { 507 const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; 508 if (key === "__v_isReactive") { 509 return !isReadonly2; 510 } else if (key === "__v_isReadonly") { 511 return isReadonly2; 512 } else if (key === "__v_isShallow") { 513 return isShallow2; 514 } else if (key === "__v_raw") { 515 if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype 516 // this means the receiver is a user proxy of the reactive proxy 517 Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { 518 return target; 519 } 520 return; 521 } 522 const targetIsArray = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target); 523 if (!isReadonly2) { 524 if (targetIsArray && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(arrayInstrumentations, key)) { 525 return Reflect.get(arrayInstrumentations, key, receiver); 526 } 527 if (key === "hasOwnProperty") { 528 return hasOwnProperty; 529 } 530 } 531 const res = Reflect.get(target, key, receiver); 532 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { 533 return res; 534 } 535 if (!isReadonly2) { 536 track(target, "get", key); 537 } 538 if (isShallow2) { 539 return res; 540 } 541 if (isRef(res)) { 542 return targetIsArray && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key) ? res : res.value; 543 } 544 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(res)) { 545 return isReadonly2 ? readonly(res) : reactive(res); 546 } 547 return res; 548 } 549} 550class MutableReactiveHandler extends BaseReactiveHandler { 551 constructor(isShallow2 = false) { 552 super(false, isShallow2); 553 } 554 set(target, key, value, receiver) { 555 let oldValue = target[key]; 556 if (!this._isShallow) { 557 const isOldValueReadonly = isReadonly(oldValue); 558 if (!isShallow(value) && !isReadonly(value)) { 559 oldValue = toRaw(oldValue); 560 value = toRaw(value); 561 } 562 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && isRef(oldValue) && !isRef(value)) { 563 if (isOldValueReadonly) { 564 return false; 565 } else { 566 oldValue.value = value; 567 return true; 568 } 569 } 570 } 571 const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key) ? Number(key) < target.length : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key); 572 const result = Reflect.set(target, key, value, receiver); 573 if (target === toRaw(receiver)) { 574 if (!hadKey) { 575 trigger(target, "add", key, value); 576 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) { 577 trigger(target, "set", key, value, oldValue); 578 } 579 } 580 return result; 581 } 582 deleteProperty(target, key) { 583 const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key); 584 const oldValue = target[key]; 585 const result = Reflect.deleteProperty(target, key); 586 if (result && hadKey) { 587 trigger(target, "delete", key, void 0, oldValue); 588 } 589 return result; 590 } 591 has(target, key) { 592 const result = Reflect.has(target, key); 593 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) || !builtInSymbols.has(key)) { 594 track(target, "has", key); 595 } 596 return result; 597 } 598 ownKeys(target) { 599 track( 600 target, 601 "iterate", 602 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) ? "length" : ITERATE_KEY 603 ); 604 return Reflect.ownKeys(target); 605 } 606} 607class ReadonlyReactiveHandler extends BaseReactiveHandler { 608 constructor(isShallow2 = false) { 609 super(true, isShallow2); 610 } 611 set(target, key) { 612 if (true) { 613 warn( 614 `Set operation on key "${String(key)}" failed: target is readonly.`, 615 target 616 ); 617 } 618 return true; 619 } 620 deleteProperty(target, key) { 621 if (true) { 622 warn( 623 `Delete operation on key "${String(key)}" failed: target is readonly.`, 624 target 625 ); 626 } 627 return true; 628 } 629} 630const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); 631const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); 632const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( 633 true 634); 635const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); 636 637const toShallow = (value) => value; 638const getProto = (v) => Reflect.getPrototypeOf(v); 639function get(target, key, isReadonly2 = false, isShallow2 = false) { 640 target = target["__v_raw"]; 641 const rawTarget = toRaw(target); 642 const rawKey = toRaw(key); 643 if (!isReadonly2) { 644 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(key, rawKey)) { 645 track(rawTarget, "get", key); 646 } 647 track(rawTarget, "get", rawKey); 648 } 649 const { has: has2 } = getProto(rawTarget); 650 const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; 651 if (has2.call(rawTarget, key)) { 652 return wrap(target.get(key)); 653 } else if (has2.call(rawTarget, rawKey)) { 654 return wrap(target.get(rawKey)); 655 } else if (target !== rawTarget) { 656 target.get(key); 657 } 658} 659function has(key, isReadonly2 = false) { 660 const target = this["__v_raw"]; 661 const rawTarget = toRaw(target); 662 const rawKey = toRaw(key); 663 if (!isReadonly2) { 664 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(key, rawKey)) { 665 track(rawTarget, "has", key); 666 } 667 track(rawTarget, "has", rawKey); 668 } 669 return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); 670} 671function size(target, isReadonly2 = false) { 672 target = target["__v_raw"]; 673 !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); 674 return Reflect.get(target, "size", target); 675} 676function add(value, _isShallow = false) { 677 if (!_isShallow && !isShallow(value) && !isReadonly(value)) { 678 value = toRaw(value); 679 } 680 const target = toRaw(this); 681 const proto = getProto(target); 682 const hadKey = proto.has.call(target, value); 683 if (!hadKey) { 684 target.add(value); 685 trigger(target, "add", value, value); 686 } 687 return this; 688} 689function set(key, value, _isShallow = false) { 690 if (!_isShallow && !isShallow(value) && !isReadonly(value)) { 691 value = toRaw(value); 692 } 693 const target = toRaw(this); 694 const { has: has2, get: get2 } = getProto(target); 695 let hadKey = has2.call(target, key); 696 if (!hadKey) { 697 key = toRaw(key); 698 hadKey = has2.call(target, key); 699 } else if (true) { 700 checkIdentityKeys(target, has2, key); 701 } 702 const oldValue = get2.call(target, key); 703 target.set(key, value); 704 if (!hadKey) { 705 trigger(target, "add", key, value); 706 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) { 707 trigger(target, "set", key, value, oldValue); 708 } 709 return this; 710} 711function deleteEntry(key) { 712 const target = toRaw(this); 713 const { has: has2, get: get2 } = getProto(target); 714 let hadKey = has2.call(target, key); 715 if (!hadKey) { 716 key = toRaw(key); 717 hadKey = has2.call(target, key); 718 } else if (true) { 719 checkIdentityKeys(target, has2, key); 720 } 721 const oldValue = get2 ? get2.call(target, key) : void 0; 722 const result = target.delete(key); 723 if (hadKey) { 724 trigger(target, "delete", key, void 0, oldValue); 725 } 726 return result; 727} 728function clear() { 729 const target = toRaw(this); 730 const hadItems = target.size !== 0; 731 const oldTarget = true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target) ? new Map(target) : new Set(target) : 0; 732 const result = target.clear(); 733 if (hadItems) { 734 trigger(target, "clear", void 0, void 0, oldTarget); 735 } 736 return result; 737} 738function createForEach(isReadonly2, isShallow2) { 739 return function forEach(callback, thisArg) { 740 const observed = this; 741 const target = observed["__v_raw"]; 742 const rawTarget = toRaw(target); 743 const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; 744 !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); 745 return target.forEach((value, key) => { 746 return callback.call(thisArg, wrap(value), wrap(key), observed); 747 }); 748 }; 749} 750function createIterableMethod(method, isReadonly2, isShallow2) { 751 return function(...args) { 752 const target = this["__v_raw"]; 753 const rawTarget = toRaw(target); 754 const targetIsMap = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(rawTarget); 755 const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; 756 const isKeyOnly = method === "keys" && targetIsMap; 757 const innerIterator = target[method](...args); 758 const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; 759 !isReadonly2 && track( 760 rawTarget, 761 "iterate", 762 isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY 763 ); 764 return { 765 // iterator protocol 766 next() { 767 const { value, done } = innerIterator.next(); 768 return done ? { value, done } : { 769 value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), 770 done 771 }; 772 }, 773 // iterable protocol 774 [Symbol.iterator]() { 775 return this; 776 } 777 }; 778 }; 779} 780function createReadonlyMethod(type) { 781 return function(...args) { 782 if (true) { 783 const key = args[0] ? `on key "${args[0]}" ` : ``; 784 warn( 785 `${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.capitalize)(type)} operation ${key}failed: target is readonly.`, 786 toRaw(this) 787 ); 788 } 789 return type === "delete" ? false : type === "clear" ? void 0 : this; 790 }; 791} 792function createInstrumentations() { 793 const mutableInstrumentations2 = { 794 get(key) { 795 return get(this, key); 796 }, 797 get size() { 798 return size(this); 799 }, 800 has, 801 add, 802 set, 803 delete: deleteEntry, 804 clear, 805 forEach: createForEach(false, false) 806 }; 807 const shallowInstrumentations2 = { 808 get(key) { 809 return get(this, key, false, true); 810 }, 811 get size() { 812 return size(this); 813 }, 814 has, 815 add(value) { 816 return add.call(this, value, true); 817 }, 818 set(key, value) { 819 return set.call(this, key, value, true); 820 }, 821 delete: deleteEntry, 822 clear, 823 forEach: createForEach(false, true) 824 }; 825 const readonlyInstrumentations2 = { 826 get(key) { 827 return get(this, key, true); 828 }, 829 get size() { 830 return size(this, true); 831 }, 832 has(key) { 833 return has.call(this, key, true); 834 }, 835 add: createReadonlyMethod("add"), 836 set: createReadonlyMethod("set"), 837 delete: createReadonlyMethod("delete"), 838 clear: createReadonlyMethod("clear"), 839 forEach: createForEach(true, false) 840 }; 841 const shallowReadonlyInstrumentations2 = { 842 get(key) { 843 return get(this, key, true, true); 844 }, 845 get size() { 846 return size(this, true); 847 }, 848 has(key) { 849 return has.call(this, key, true); 850 }, 851 add: createReadonlyMethod("add"), 852 set: createReadonlyMethod("set"), 853 delete: createReadonlyMethod("delete"), 854 clear: createReadonlyMethod("clear"), 855 forEach: createForEach(true, true) 856 }; 857 const iteratorMethods = [ 858 "keys", 859 "values", 860 "entries", 861 Symbol.iterator 862 ]; 863 iteratorMethods.forEach((method) => { 864 mutableInstrumentations2[method] = createIterableMethod(method, false, false); 865 readonlyInstrumentations2[method] = createIterableMethod(method, true, false); 866 shallowInstrumentations2[method] = createIterableMethod(method, false, true); 867 shallowReadonlyInstrumentations2[method] = createIterableMethod( 868 method, 869 true, 870 true 871 ); 872 }); 873 return [ 874 mutableInstrumentations2, 875 readonlyInstrumentations2, 876 shallowInstrumentations2, 877 shallowReadonlyInstrumentations2 878 ]; 879} 880const [ 881 mutableInstrumentations, 882 readonlyInstrumentations, 883 shallowInstrumentations, 884 shallowReadonlyInstrumentations 885] = /* @__PURE__ */ createInstrumentations(); 886function createInstrumentationGetter(isReadonly2, shallow) { 887 const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; 888 return (target, key, receiver) => { 889 if (key === "__v_isReactive") { 890 return !isReadonly2; 891 } else if (key === "__v_isReadonly") { 892 return isReadonly2; 893 } else if (key === "__v_raw") { 894 return target; 895 } 896 return Reflect.get( 897 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(instrumentations, key) && key in target ? instrumentations : target, 898 key, 899 receiver 900 ); 901 }; 902} 903const mutableCollectionHandlers = { 904 get: /* @__PURE__ */ createInstrumentationGetter(false, false) 905}; 906const shallowCollectionHandlers = { 907 get: /* @__PURE__ */ createInstrumentationGetter(false, true) 908}; 909const readonlyCollectionHandlers = { 910 get: /* @__PURE__ */ createInstrumentationGetter(true, false) 911}; 912const shallowReadonlyCollectionHandlers = { 913 get: /* @__PURE__ */ createInstrumentationGetter(true, true) 914}; 915function checkIdentityKeys(target, has2, key) { 916 const rawKey = toRaw(key); 917 if (rawKey !== key && has2.call(target, rawKey)) { 918 const type = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(target); 919 warn( 920 `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` 921 ); 922 } 923} 924 925const reactiveMap = /* @__PURE__ */ new WeakMap(); 926const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); 927const readonlyMap = /* @__PURE__ */ new WeakMap(); 928const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); 929function targetTypeMap(rawType) { 930 switch (rawType) { 931 case "Object": 932 case "Array": 933 return 1 /* COMMON */; 934 case "Map": 935 case "Set": 936 case "WeakMap": 937 case "WeakSet": 938 return 2 /* COLLECTION */; 939 default: 940 return 0 /* INVALID */; 941 } 942} 943function getTargetType(value) { 944 return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(value)); 945} 946function reactive(target) { 947 if (isReadonly(target)) { 948 return target; 949 } 950 return createReactiveObject( 951 target, 952 false, 953 mutableHandlers, 954 mutableCollectionHandlers, 955 reactiveMap 956 ); 957} 958function shallowReactive(target) { 959 return createReactiveObject( 960 target, 961 false, 962 shallowReactiveHandlers, 963 shallowCollectionHandlers, 964 shallowReactiveMap 965 ); 966} 967function readonly(target) { 968 return createReactiveObject( 969 target, 970 true, 971 readonlyHandlers, 972 readonlyCollectionHandlers, 973 readonlyMap 974 ); 975} 976function shallowReadonly(target) { 977 return createReactiveObject( 978 target, 979 true, 980 shallowReadonlyHandlers, 981 shallowReadonlyCollectionHandlers, 982 shallowReadonlyMap 983 ); 984} 985function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { 986 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(target)) { 987 if (true) { 988 warn( 989 `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( 990 target 991 )}` 992 ); 993 } 994 return target; 995 } 996 if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { 997 return target; 998 } 999 const existingProxy = proxyMap.get(target); 1000 if (existingProxy) { 1001 return existingProxy; 1002 } 1003 const targetType = getTargetType(target); 1004 if (targetType === 0 /* INVALID */) { 1005 return target; 1006 } 1007 const proxy = new Proxy( 1008 target, 1009 targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers 1010 ); 1011 proxyMap.set(target, proxy); 1012 return proxy; 1013} 1014function isReactive(value) { 1015 if (isReadonly(value)) { 1016 return isReactive(value["__v_raw"]); 1017 } 1018 return !!(value && value["__v_isReactive"]); 1019} 1020function isReadonly(value) { 1021 return !!(value && value["__v_isReadonly"]); 1022} 1023function isShallow(value) { 1024 return !!(value && value["__v_isShallow"]); 1025} 1026function isProxy(value) { 1027 return value ? !!value["__v_raw"] : false; 1028} 1029function toRaw(observed) { 1030 const raw = observed && observed["__v_raw"]; 1031 return raw ? toRaw(raw) : observed; 1032} 1033function markRaw(value) { 1034 if (Object.isExtensible(value)) { 1035 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.def)(value, "__v_skip", true); 1036 } 1037 return value; 1038} 1039const toReactive = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? reactive(value) : value; 1040const toReadonly = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? readonly(value) : value; 1041 1042const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; 1043class ComputedRefImpl { 1044 constructor(getter, _setter, isReadonly, isSSR) { 1045 this.getter = getter; 1046 this._setter = _setter; 1047 this.dep = void 0; 1048 this.__v_isRef = true; 1049 this["__v_isReadonly"] = false; 1050 this.effect = new ReactiveEffect( 1051 () => getter(this._value), 1052 () => triggerRefValue( 1053 this, 1054 this.effect._dirtyLevel === 2 ? 2 : 3 1055 ) 1056 ); 1057 this.effect.computed = this; 1058 this.effect.active = this._cacheable = !isSSR; 1059 this["__v_isReadonly"] = isReadonly; 1060 } 1061 get value() { 1062 const self = toRaw(this); 1063 if ((!self._cacheable || self.effect.dirty) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(self._value, self._value = self.effect.run())) { 1064 triggerRefValue(self, 4); 1065 } 1066 trackRefValue(self); 1067 if (self.effect._dirtyLevel >= 2) { 1068 if ( true && this._warnRecursive) { 1069 warn(COMPUTED_SIDE_EFFECT_WARN, ` 1070 1071getter: `, this.getter); 1072 } 1073 triggerRefValue(self, 2); 1074 } 1075 return self._value; 1076 } 1077 set value(newValue) { 1078 this._setter(newValue); 1079 } 1080 // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x 1081 get _dirty() { 1082 return this.effect.dirty; 1083 } 1084 set _dirty(v) { 1085 this.effect.dirty = v; 1086 } 1087 // #endregion 1088} 1089function computed(getterOrOptions, debugOptions, isSSR = false) { 1090 let getter; 1091 let setter; 1092 const onlyGetter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(getterOrOptions); 1093 if (onlyGetter) { 1094 getter = getterOrOptions; 1095 setter = true ? () => { 1096 warn("Write operation failed: computed value is readonly"); 1097 } : 0; 1098 } else { 1099 getter = getterOrOptions.get; 1100 setter = getterOrOptions.set; 1101 } 1102 const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); 1103 if ( true && debugOptions && !isSSR) { 1104 cRef.effect.onTrack = debugOptions.onTrack; 1105 cRef.effect.onTrigger = debugOptions.onTrigger; 1106 } 1107 return cRef; 1108} 1109 1110function trackRefValue(ref2) { 1111 var _a; 1112 if (shouldTrack && activeEffect) { 1113 ref2 = toRaw(ref2); 1114 trackEffect( 1115 activeEffect, 1116 (_a = ref2.dep) != null ? _a : ref2.dep = createDep( 1117 () => ref2.dep = void 0, 1118 ref2 instanceof ComputedRefImpl ? ref2 : void 0 1119 ), 1120 true ? { 1121 target: ref2, 1122 type: "get", 1123 key: "value" 1124 } : 0 1125 ); 1126 } 1127} 1128function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) { 1129 ref2 = toRaw(ref2); 1130 const dep = ref2.dep; 1131 if (dep) { 1132 triggerEffects( 1133 dep, 1134 dirtyLevel, 1135 true ? { 1136 target: ref2, 1137 type: "set", 1138 key: "value", 1139 newValue: newVal, 1140 oldValue: oldVal 1141 } : 0 1142 ); 1143 } 1144} 1145function isRef(r) { 1146 return !!(r && r.__v_isRef === true); 1147} 1148function ref(value) { 1149 return createRef(value, false); 1150} 1151function shallowRef(value) { 1152 return createRef(value, true); 1153} 1154function createRef(rawValue, shallow) { 1155 if (isRef(rawValue)) { 1156 return rawValue; 1157 } 1158 return new RefImpl(rawValue, shallow); 1159} 1160class RefImpl { 1161 constructor(value, __v_isShallow) { 1162 this.__v_isShallow = __v_isShallow; 1163 this.dep = void 0; 1164 this.__v_isRef = true; 1165 this._rawValue = __v_isShallow ? value : toRaw(value); 1166 this._value = __v_isShallow ? value : toReactive(value); 1167 } 1168 get value() { 1169 trackRefValue(this); 1170 return this._value; 1171 } 1172 set value(newVal) { 1173 const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); 1174 newVal = useDirectValue ? newVal : toRaw(newVal); 1175 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(newVal, this._rawValue)) { 1176 const oldVal = this._rawValue; 1177 this._rawValue = newVal; 1178 this._value = useDirectValue ? newVal : toReactive(newVal); 1179 triggerRefValue(this, 4, newVal, oldVal); 1180 } 1181 } 1182} 1183function triggerRef(ref2) { 1184 triggerRefValue(ref2, 4, true ? ref2.value : 0); 1185} 1186function unref(ref2) { 1187 return isRef(ref2) ? ref2.value : ref2; 1188} 1189function toValue(source) { 1190 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(source) ? source() : unref(source); 1191} 1192const shallowUnwrapHandlers = { 1193 get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), 1194 set: (target, key, value, receiver) => { 1195 const oldValue = target[key]; 1196 if (isRef(oldValue) && !isRef(value)) { 1197 oldValue.value = value; 1198 return true; 1199 } else { 1200 return Reflect.set(target, key, value, receiver); 1201 } 1202 } 1203}; 1204function proxyRefs(objectWithRefs) { 1205 return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); 1206} 1207class CustomRefImpl { 1208 constructor(factory) { 1209 this.dep = void 0; 1210 this.__v_isRef = true; 1211 const { get, set } = factory( 1212 () => trackRefValue(this), 1213 () => triggerRefValue(this) 1214 ); 1215 this._get = get; 1216 this._set = set; 1217 } 1218 get value() { 1219 return this._get(); 1220 } 1221 set value(newVal) { 1222 this._set(newVal); 1223 } 1224} 1225function customRef(factory) { 1226 return new CustomRefImpl(factory); 1227} 1228function toRefs(object) { 1229 if ( true && !isProxy(object)) { 1230 warn(`toRefs() expects a reactive object but received a plain one.`); 1231 } 1232 const ret = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(object) ? new Array(object.length) : {}; 1233 for (const key in object) { 1234 ret[key] = propertyToRef(object, key); 1235 } 1236 return ret; 1237} 1238class ObjectRefImpl { 1239 constructor(_object, _key, _defaultValue) { 1240 this._object = _object; 1241 this._key = _key; 1242 this._defaultValue = _defaultValue; 1243 this.__v_isRef = true; 1244 } 1245 get value() { 1246 const val = this._object[this._key]; 1247 return val === void 0 ? this._defaultValue : val; 1248 } 1249 set value(newVal) { 1250 this._object[this._key] = newVal; 1251 } 1252 get dep() { 1253 return getDepFromReactive(toRaw(this._object), this._key); 1254 } 1255} 1256class GetterRefImpl { 1257 constructor(_getter) { 1258 this._getter = _getter; 1259 this.__v_isRef = true; 1260 this.__v_isReadonly = true; 1261 } 1262 get value() { 1263 return this._getter(); 1264 } 1265} 1266function toRef(source, key, defaultValue) { 1267 if (isRef(source)) { 1268 return source; 1269 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(source)) { 1270 return new GetterRefImpl(source); 1271 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(source) && arguments.length > 1) { 1272 return propertyToRef(source, key, defaultValue); 1273 } else { 1274 return ref(source); 1275 } 1276} 1277function propertyToRef(source, key, defaultValue) { 1278 const val = source[key]; 1279 return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); 1280} 1281 1282const deferredComputed = computed; 1283 1284const TrackOpTypes = { 1285 "GET": "get", 1286 "HAS": "has", 1287 "ITERATE": "iterate" 1288}; 1289const TriggerOpTypes = { 1290 "SET": "set", 1291 "ADD": "add", 1292 "DELETE": "delete", 1293 "CLEAR": "clear" 1294}; 1295const ReactiveFlags = { 1296 "SKIP": "__v_skip", 1297 "IS_REACTIVE": "__v_isReactive", 1298 "IS_READONLY": "__v_isReadonly", 1299 "IS_SHALLOW": "__v_isShallow", 1300 "RAW": "__v_raw" 1301}; 1302 1303 1304 1305 1306/***/ }), 1307
vendor: 271,640 bytes, lines 1308-9590
1308/***/ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js": 1309/*!*************************************************************************!*\ 1310 !*** ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js ***! 1311 \*************************************************************************/ 1312/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 1313 1314"use strict"; 1315__webpack_require__.r(__webpack_exports__); 1316/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1317/* harmony export */ BaseTransition: () => (/* binding */ BaseTransition), 1318/* harmony export */ BaseTransitionPropsValidators: () => (/* binding */ BaseTransitionPropsValidators), 1319/* harmony export */ Comment: () => (/* binding */ Comment), 1320/* harmony export */ DeprecationTypes: () => (/* binding */ DeprecationTypes), 1321/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope), 1322/* harmony export */ ErrorCodes: () => (/* binding */ ErrorCodes), 1323/* harmony export */ ErrorTypeStrings: () => (/* binding */ ErrorTypeStrings), 1324/* harmony export */ Fragment: () => (/* binding */ Fragment), 1325/* harmony export */ KeepAlive: () => (/* binding */ KeepAlive), 1326/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect), 1327/* harmony export */ Static: () => (/* binding */ Static), 1328/* harmony export */ Suspense: () => (/* binding */ Suspense), 1329/* harmony export */ Teleport: () => (/* binding */ Teleport), 1330/* harmony export */ Text: () => (/* binding */ Text), 1331/* harmony export */ TrackOpTypes: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.TrackOpTypes), 1332/* harmony export */ TriggerOpTypes: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.TriggerOpTypes), 1333/* harmony export */ assertNumber: () => (/* binding */ assertNumber), 1334/* harmony export */ callWithAsyncErrorHandling: () => (/* binding */ callWithAsyncErrorHandling), 1335/* harmony export */ callWithErrorHandling: () => (/* binding */ callWithErrorHandling), 1336/* harmony export */ camelize: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize), 1337/* harmony export */ capitalize: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize), 1338/* harmony export */ cloneVNode: () => (/* binding */ cloneVNode), 1339/* harmony export */ compatUtils: () => (/* binding */ compatUtils), 1340/* harmony export */ computed: () => (/* binding */ computed), 1341/* harmony export */ createBlock: () => (/* binding */ createBlock), 1342/* harmony export */ createCommentVNode: () => (/* binding */ createCommentVNode), 1343/* harmony export */ createElementBlock: () => (/* binding */ createElementBlock), 1344/* harmony export */ createElementVNode: () => (/* binding */ createBaseVNode), 1345/* harmony export */ createHydrationRenderer: () => (/* binding */ createHydrationRenderer), 1346/* harmony export */ createPropsRestProxy: () => (/* binding */ createPropsRestProxy), 1347/* harmony export */ createRenderer: () => (/* binding */ createRenderer), 1348/* harmony export */ createSlots: () => (/* binding */ createSlots), 1349/* harmony export */ createStaticVNode: () => (/* binding */ createStaticVNode), 1350/* harmony export */ createTextVNode: () => (/* binding */ createTextVNode), 1351/* harmony export */ createVNode: () => (/* binding */ createVNode), 1352/* harmony export */ customRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.customRef), 1353/* harmony export */ defineAsyncComponent: () => (/* binding */ defineAsyncComponent), 1354/* harmony export */ defineComponent: () => (/* binding */ defineComponent), 1355/* harmony export */ defineEmits: () => (/* binding */ defineEmits), 1356/* harmony export */ defineExpose: () => (/* binding */ defineExpose), 1357/* harmony export */ defineModel: () => (/* binding */ defineModel), 1358/* harmony export */ defineOptions: () => (/* binding */ defineOptions), 1359/* harmony export */ defineProps: () => (/* binding */ defineProps), 1360/* harmony export */ defineSlots: () => (/* binding */ defineSlots), 1361/* harmony export */ devtools: () => (/* binding */ devtools), 1362/* harmony export */ effect: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effect), 1363/* harmony export */ effectScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effectScope), 1364/* harmony export */ getCurrentInstance: () => (/* binding */ getCurrentInstance), 1365/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope), 1366/* harmony export */ getTransitionRawChildren: () => (/* binding */ getTransitionRawChildren), 1367/* harmony export */ guardReactiveProps: () => (/* binding */ guardReactiveProps), 1368/* harmony export */ h: () => (/* binding */ h), 1369/* harmony export */ handleError: () => (/* binding */ handleError), 1370/* harmony export */ hasInjectionContext: () => (/* binding */ hasInjectionContext), 1371/* harmony export */ initCustomFormatter: () => (/* binding */ initCustomFormatter), 1372/* harmony export */ inject: () => (/* binding */ inject), 1373/* harmony export */ isMemoSame: () => (/* binding */ isMemoSame), 1374/* harmony export */ isProxy: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy), 1375/* harmony export */ isReactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive), 1376/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly), 1377/* harmony export */ isRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef), 1378/* harmony export */ isRuntimeOnly: () => (/* binding */ isRuntimeOnly), 1379/* harmony export */ isShallow: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow), 1380/* harmony export */ isVNode: () => (/* binding */ isVNode), 1381/* harmony export */ markRaw: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw), 1382/* harmony export */ mergeDefaults: () => (/* binding */ mergeDefaults), 1383/* harmony export */ mergeModels: () => (/* binding */ mergeModels), 1384/* harmony export */ mergeProps: () => (/* binding */ mergeProps), 1385/* harmony export */ nextTick: () => (/* binding */ nextTick), 1386/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass), 1387/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeProps), 1388/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle), 1389/* harmony export */ onActivated: () => (/* binding */ onActivated), 1390/* harmony export */ onBeforeMount: () => (/* binding */ onBeforeMount), 1391/* harmony export */ onBeforeUnmount: () => (/* binding */ onBeforeUnmount), 1392/* harmony export */ onBeforeUpdate: () => (/* binding */ onBeforeUpdate), 1393/* harmony export */ onDeactivated: () => (/* binding */ onDeactivated), 1394/* harmony export */ onErrorCaptured: () => (/* binding */ onErrorCaptured), 1395/* harmony export */ onMounted: () => (/* binding */ onMounted), 1396/* harmony export */ onRenderTracked: () => (/* binding */ onRenderTracked), 1397/* harmony export */ onRenderTriggered: () => (/* binding */ onRenderTriggered), 1398/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose), 1399/* harmony export */ onServerPrefetch: () => (/* binding */ onServerPrefetch), 1400/* harmony export */ onUnmounted: () => (/* binding */ onUnmounted), 1401/* harmony export */ onUpdated: () => (/* binding */ onUpdated), 1402/* harmony export */ openBlock: () => (/* binding */ openBlock), 1403/* harmony export */ popScopeId: () => (/* binding */ popScopeId), 1404/* harmony export */ provide: () => (/* binding */ provide), 1405/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs), 1406/* harmony export */ pushScopeId: () => (/* binding */ pushScopeId), 1407/* harmony export */ queuePostFlushCb: () => (/* binding */ queuePostFlushCb), 1408/* harmony export */ reactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive), 1409/* harmony export */ readonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.readonly), 1410/* harmony export */ ref: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref), 1411/* harmony export */ registerRuntimeCompiler: () => (/* binding */ registerRuntimeCompiler), 1412/* harmony export */ renderList: () => (/* binding */ renderList), 1413/* harmony export */ renderSlot: () => (/* binding */ renderSlot), 1414/* harmony export */ resolveComponent: () => (/* binding */ resolveComponent), 1415/* harmony export */ resolveDirective: () => (/* binding */ resolveDirective), 1416/* harmony export */ resolveDynamicComponent: () => (/* binding */ resolveDynamicComponent), 1417/* harmony export */ resolveFilter: () => (/* binding */ resolveFilter), 1418/* harmony export */ resolveTransitionHooks: () => (/* binding */ resolveTransitionHooks), 1419/* harmony export */ setBlockTracking: () => (/* binding */ setBlockTracking), 1420/* harmony export */ setDevtoolsHook: () => (/* binding */ setDevtoolsHook), 1421/* harmony export */ setTransitionHooks: () => (/* binding */ setTransitionHooks), 1422/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive), 1423/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly), 1424/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowRef), 1425/* harmony export */ ssrContextKey: () => (/* binding */ ssrContextKey), 1426/* harmony export */ ssrUtils: () => (/* binding */ ssrUtils), 1427/* harmony export */ stop: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.stop), 1428/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toDisplayString), 1429/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey), 1430/* harmony export */ toHandlers: () => (/* binding */ toHandlers), 1431/* harmony export */ toRaw: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw), 1432/* harmony export */ toRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRef), 1433/* harmony export */ toRefs: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRefs), 1434/* harmony export */ toValue: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toValue), 1435/* harmony export */ transformVNodeArgs: () => (/* binding */ transformVNodeArgs), 1436/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.triggerRef), 1437/* harmony export */ unref: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.unref), 1438/* harmony export */ useAttrs: () => (/* binding */ useAttrs), 1439/* harmony export */ useModel: () => (/* binding */ useModel), 1440/* harmony export */ useSSRContext: () => (/* binding */ useSSRContext), 1441/* harmony export */ useSlots: () => (/* binding */ useSlots), 1442/* harmony export */ useTransitionState: () => (/* binding */ useTransitionState), 1443/* harmony export */ version: () => (/* binding */ version), 1444/* harmony export */ warn: () => (/* binding */ warn), 1445/* harmony export */ watch: () => (/* binding */ watch), 1446/* harmony export */ watchEffect: () => (/* binding */ watchEffect), 1447/* harmony export */ watchPostEffect: () => (/* binding */ watchPostEffect), 1448/* harmony export */ watchSyncEffect: () => (/* binding */ watchSyncEffect), 1449/* harmony export */ withAsyncContext: () => (/* binding */ withAsyncContext), 1450/* harmony export */ withCtx: () => (/* binding */ withCtx), 1451/* harmony export */ withDefaults: () => (/* binding */ withDefaults), 1452/* harmony export */ withDirectives: () => (/* binding */ withDirectives), 1453/* harmony export */ withMemo: () => (/* binding */ withMemo), 1454/* harmony export */ withScopeId: () => (/* binding */ withScopeId) 1455/* harmony export */ }); 1456/* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js"); 1457/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js"); 1458/** 1459* @vue/runtime-core v3.4.37 1460* (c) 2018-present Yuxi (Evan) You and Vue contributors 1461* @license MIT 1462**/ 1463 1464 1465 1466 1467 1468const stack = []; 1469function pushWarningContext(vnode) { 1470 stack.push(vnode); 1471} 1472function popWarningContext() { 1473 stack.pop(); 1474} 1475let isWarning = false; 1476function warn$1(msg, ...args) { 1477 if (isWarning) return; 1478 isWarning = true; 1479 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 1480 const instance = stack.length ? stack[stack.length - 1].component : null; 1481 const appWarnHandler = instance && instance.appContext.config.warnHandler; 1482 const trace = getComponentTrace(); 1483 if (appWarnHandler) { 1484 callWithErrorHandling( 1485 appWarnHandler, 1486 instance, 1487 11, 1488 [ 1489 // eslint-disable-next-line no-restricted-syntax 1490 msg + args.map((a) => { 1491 var _a, _b; 1492 return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); 1493 }).join(""), 1494 instance && instance.proxy, 1495 trace.map( 1496 ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` 1497 ).join("\n"), 1498 trace 1499 ] 1500 ); 1501 } else { 1502 const warnArgs = [`[Vue warn]: ${msg}`, ...args]; 1503 if (trace.length && // avoid spamming console during tests 1504 true) { 1505 warnArgs.push(` 1506`, ...formatTrace(trace)); 1507 } 1508 console.warn(...warnArgs); 1509 } 1510 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 1511 isWarning = false; 1512} 1513function getComponentTrace() { 1514 let currentVNode = stack[stack.length - 1]; 1515 if (!currentVNode) { 1516 return []; 1517 } 1518 const normalizedStack = []; 1519 while (currentVNode) { 1520 const last = normalizedStack[0]; 1521 if (last && last.vnode === currentVNode) { 1522 last.recurseCount++; 1523 } else { 1524 normalizedStack.push({ 1525 vnode: currentVNode, 1526 recurseCount: 0 1527 }); 1528 } 1529 const parentInstance = currentVNode.component && currentVNode.component.parent; 1530 currentVNode = parentInstance && parentInstance.vnode; 1531 } 1532 return normalizedStack; 1533} 1534function formatTrace(trace) { 1535 const logs = []; 1536 trace.forEach((entry, i) => { 1537 logs.push(...i === 0 ? [] : [` 1538`], ...formatTraceEntry(entry)); 1539 }); 1540 return logs; 1541} 1542function formatTraceEntry({ vnode, recurseCount }) { 1543 const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; 1544 const isRoot = vnode.component ? vnode.component.parent == null : false; 1545 const open = ` at <${formatComponentName( 1546 vnode.component, 1547 vnode.type, 1548 isRoot 1549 )}`; 1550 const close = `>` + postfix; 1551 return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; 1552} 1553function formatProps(props) { 1554 const res = []; 1555 const keys = Object.keys(props); 1556 keys.slice(0, 3).forEach((key) => { 1557 res.push(...formatProp(key, props[key])); 1558 }); 1559 if (keys.length > 3) { 1560 res.push(` ...`); 1561 } 1562 return res; 1563} 1564function formatProp(key, value, raw) { 1565 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) { 1566 value = JSON.stringify(value); 1567 return raw ? value : [`${key}=${value}`]; 1568 } else if (typeof value === "number" || typeof value === "boolean" || value == null) { 1569 return raw ? value : [`${key}=${value}`]; 1570 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) { 1571 value = formatProp(key, (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value.value), true); 1572 return raw ? value : [`${key}=Ref<`, value, `>`]; 1573 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) { 1574 return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; 1575 } else { 1576 value = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value); 1577 return raw ? value : [`${key}=`, value]; 1578 } 1579} 1580function assertNumber(val, type) { 1581 if (false) {} 1582 if (val === void 0) { 1583 return; 1584 } else if (typeof val !== "number") { 1585 warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); 1586 } else if (isNaN(val)) { 1587 warn$1(`${type} is NaN - the duration expression might be incorrect.`); 1588 } 1589} 1590 1591const ErrorCodes = { 1592 "SETUP_FUNCTION": 0, 1593 "0": "SETUP_FUNCTION", 1594 "RENDER_FUNCTION": 1, 1595 "1": "RENDER_FUNCTION", 1596 "WATCH_GETTER": 2, 1597 "2": "WATCH_GETTER", 1598 "WATCH_CALLBACK": 3, 1599 "3": "WATCH_CALLBACK", 1600 "WATCH_CLEANUP": 4, 1601 "4": "WATCH_CLEANUP", 1602 "NATIVE_EVENT_HANDLER": 5, 1603 "5": "NATIVE_EVENT_HANDLER", 1604 "COMPONENT_EVENT_HANDLER": 6, 1605 "6": "COMPONENT_EVENT_HANDLER", 1606 "VNODE_HOOK": 7, 1607 "7": "VNODE_HOOK", 1608 "DIRECTIVE_HOOK": 8, 1609 "8": "DIRECTIVE_HOOK", 1610 "TRANSITION_HOOK": 9, 1611 "9": "TRANSITION_HOOK", 1612 "APP_ERROR_HANDLER": 10, 1613 "10": "APP_ERROR_HANDLER", 1614 "APP_WARN_HANDLER": 11, 1615 "11": "APP_WARN_HANDLER", 1616 "FUNCTION_REF": 12, 1617 "12": "FUNCTION_REF", 1618 "ASYNC_COMPONENT_LOADER": 13, 1619 "13": "ASYNC_COMPONENT_LOADER", 1620 "SCHEDULER": 14, 1621 "14": "SCHEDULER", 1622 "COMPONENT_UPDATE": 15, 1623 "15": "COMPONENT_UPDATE" 1624}; 1625const ErrorTypeStrings$1 = { 1626 ["sp"]: "serverPrefetch hook", 1627 ["bc"]: "beforeCreate hook", 1628 ["c"]: "created hook", 1629 ["bm"]: "beforeMount hook", 1630 ["m"]: "mounted hook", 1631 ["bu"]: "beforeUpdate hook", 1632 ["u"]: "updated", 1633 ["bum"]: "beforeUnmount hook", 1634 ["um"]: "unmounted hook", 1635 ["a"]: "activated hook", 1636 ["da"]: "deactivated hook", 1637 ["ec"]: "errorCaptured hook", 1638 ["rtc"]: "renderTracked hook", 1639 ["rtg"]: "renderTriggered hook", 1640 [0]: "setup function", 1641 [1]: "render function", 1642 [2]: "watcher getter", 1643 [3]: "watcher callback", 1644 [4]: "watcher cleanup function", 1645 [5]: "native event handler", 1646 [6]: "component event handler", 1647 [7]: "vnode hook", 1648 [8]: "directive hook", 1649 [9]: "transition hook", 1650 [10]: "app errorHandler", 1651 [11]: "app warnHandler", 1652 [12]: "ref function", 1653 [13]: "async component loader", 1654 [14]: "scheduler flush", 1655 [15]: "component update" 1656}; 1657function callWithErrorHandling(fn, instance, type, args) { 1658 try { 1659 return args ? fn(...args) : fn(); 1660 } catch (err) { 1661 handleError(err, instance, type); 1662 } 1663} 1664function callWithAsyncErrorHandling(fn, instance, type, args) { 1665 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(fn)) { 1666 const res = callWithErrorHandling(fn, instance, type, args); 1667 if (res && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(res)) { 1668 res.catch((err) => { 1669 handleError(err, instance, type); 1670 }); 1671 } 1672 return res; 1673 } 1674 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn)) { 1675 const values = []; 1676 for (let i = 0; i < fn.length; i++) { 1677 values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); 1678 } 1679 return values; 1680 } else if (true) { 1681 warn$1( 1682 `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` 1683 ); 1684 } 1685} 1686function handleError(err, instance, type, throwInDev = true) { 1687 const contextVNode = instance ? instance.vnode : null; 1688 if (instance) { 1689 let cur = instance.parent; 1690 const exposedInstance = instance.proxy; 1691 const errorInfo = true ? ErrorTypeStrings$1[type] : 0; 1692 while (cur) { 1693 const errorCapturedHooks = cur.ec; 1694 if (errorCapturedHooks) { 1695 for (let i = 0; i < errorCapturedHooks.length; i++) { 1696 if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { 1697 return; 1698 } 1699 } 1700 } 1701 cur = cur.parent; 1702 } 1703 const appErrorHandler = instance.appContext.config.errorHandler; 1704 if (appErrorHandler) { 1705 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 1706 callWithErrorHandling( 1707 appErrorHandler, 1708 null, 1709 10, 1710 [err, exposedInstance, errorInfo] 1711 ); 1712 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 1713 return; 1714 } 1715 } 1716 logError(err, type, contextVNode, throwInDev); 1717} 1718function logError(err, type, contextVNode, throwInDev = true) { 1719 if (true) { 1720 const info = ErrorTypeStrings$1[type]; 1721 if (contextVNode) { 1722 pushWarningContext(contextVNode); 1723 } 1724 warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); 1725 if (contextVNode) { 1726 popWarningContext(); 1727 } 1728 if (throwInDev) { 1729 throw err; 1730 } else { 1731 console.error(err); 1732 } 1733 } else {} 1734} 1735 1736let isFlushing = false; 1737let isFlushPending = false; 1738const queue = []; 1739let flushIndex = 0; 1740const pendingPostFlushCbs = []; 1741let activePostFlushCbs = null; 1742let postFlushIndex = 0; 1743const resolvedPromise = /* @__PURE__ */ Promise.resolve(); 1744let currentFlushPromise = null; 1745const RECURSION_LIMIT = 100; 1746function nextTick(fn) { 1747 const p = currentFlushPromise || resolvedPromise; 1748 return fn ? p.then(this ? fn.bind(this) : fn) : p; 1749} 1750function findInsertionIndex(id) { 1751 let start = flushIndex + 1; 1752 let end = queue.length; 1753 while (start < end) { 1754 const middle = start + end >>> 1; 1755 const middleJob = queue[middle]; 1756 const middleJobId = getId(middleJob); 1757 if (middleJobId < id || middleJobId === id && middleJob.pre) { 1758 start = middle + 1; 1759 } else { 1760 end = middle; 1761 } 1762 } 1763 return start; 1764} 1765function queueJob(job) { 1766 if (!queue.length || !queue.includes( 1767 job, 1768 isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex 1769 )) { 1770 if (job.id == null) { 1771 queue.push(job); 1772 } else { 1773 queue.splice(findInsertionIndex(job.id), 0, job); 1774 } 1775 queueFlush(); 1776 } 1777} 1778function queueFlush() { 1779 if (!isFlushing && !isFlushPending) { 1780 isFlushPending = true; 1781 currentFlushPromise = resolvedPromise.then(flushJobs); 1782 } 1783} 1784function invalidateJob(job) { 1785 const i = queue.indexOf(job); 1786 if (i > flushIndex) { 1787 queue.splice(i, 1); 1788 } 1789} 1790function queuePostFlushCb(cb) { 1791 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(cb)) { 1792 if (!activePostFlushCbs || !activePostFlushCbs.includes( 1793 cb, 1794 cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex 1795 )) { 1796 pendingPostFlushCbs.push(cb); 1797 } 1798 } else { 1799 pendingPostFlushCbs.push(...cb); 1800 } 1801 queueFlush(); 1802} 1803function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { 1804 if (true) { 1805 seen = seen || /* @__PURE__ */ new Map(); 1806 } 1807 for (; i < queue.length; i++) { 1808 const cb = queue[i]; 1809 if (cb && cb.pre) { 1810 if (instance && cb.id !== instance.uid) { 1811 continue; 1812 } 1813 if ( true && checkRecursiveUpdates(seen, cb)) { 1814 continue; 1815 } 1816 queue.splice(i, 1); 1817 i--; 1818 cb(); 1819 } 1820 } 1821} 1822function flushPostFlushCbs(seen) { 1823 if (pendingPostFlushCbs.length) { 1824 const deduped = [...new Set(pendingPostFlushCbs)].sort( 1825 (a, b) => getId(a) - getId(b) 1826 ); 1827 pendingPostFlushCbs.length = 0; 1828 if (activePostFlushCbs) { 1829 activePostFlushCbs.push(...deduped); 1830 return; 1831 } 1832 activePostFlushCbs = deduped; 1833 if (true) { 1834 seen = seen || /* @__PURE__ */ new Map(); 1835 } 1836 for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { 1837 const cb = activePostFlushCbs[postFlushIndex]; 1838 if ( true && checkRecursiveUpdates(seen, cb)) { 1839 continue; 1840 } 1841 if (cb.active !== false) cb(); 1842 } 1843 activePostFlushCbs = null; 1844 postFlushIndex = 0; 1845 } 1846} 1847const getId = (job) => job.id == null ? Infinity : job.id; 1848const comparator = (a, b) => { 1849 const diff = getId(a) - getId(b); 1850 if (diff === 0) { 1851 if (a.pre && !b.pre) return -1; 1852 if (b.pre && !a.pre) return 1; 1853 } 1854 return diff; 1855}; 1856function flushJobs(seen) { 1857 isFlushPending = false; 1858 isFlushing = true; 1859 if (true) { 1860 seen = seen || /* @__PURE__ */ new Map(); 1861 } 1862 queue.sort(comparator); 1863 const check = true ? (job) => checkRecursiveUpdates(seen, job) : 0; 1864 try { 1865 for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { 1866 const job = queue[flushIndex]; 1867 if (job && job.active !== false) { 1868 if ( true && check(job)) { 1869 continue; 1870 } 1871 callWithErrorHandling( 1872 job, 1873 job.i, 1874 job.i ? 15 : 14 1875 ); 1876 } 1877 } 1878 } finally { 1879 flushIndex = 0; 1880 queue.length = 0; 1881 flushPostFlushCbs(seen); 1882 isFlushing = false; 1883 currentFlushPromise = null; 1884 if (queue.length || pendingPostFlushCbs.length) { 1885 flushJobs(seen); 1886 } 1887 } 1888} 1889function checkRecursiveUpdates(seen, fn) { 1890 if (!seen.has(fn)) { 1891 seen.set(fn, 1); 1892 } else { 1893 const count = seen.get(fn); 1894 if (count > RECURSION_LIMIT) { 1895 const instance = fn.i; 1896 const componentName = instance && getComponentName(instance.type); 1897 handleError( 1898 `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, 1899 null, 1900 10 1901 ); 1902 return true; 1903 } else { 1904 seen.set(fn, count + 1); 1905 } 1906 } 1907} 1908 1909let isHmrUpdating = false; 1910const hmrDirtyComponents = /* @__PURE__ */ new Map(); 1911if (true) { 1912 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)().__VUE_HMR_RUNTIME__ = { 1913 createRecord: tryWrap(createRecord), 1914 rerender: tryWrap(rerender), 1915 reload: tryWrap(reload) 1916 }; 1917} 1918const map = /* @__PURE__ */ new Map(); 1919function registerHMR(instance) { 1920 const id = instance.type.__hmrId; 1921 let record = map.get(id); 1922 if (!record) { 1923 createRecord(id, instance.type); 1924 record = map.get(id); 1925 } 1926 record.instances.add(instance); 1927} 1928function unregisterHMR(instance) { 1929 map.get(instance.type.__hmrId).instances.delete(instance); 1930} 1931function createRecord(id, initialDef) { 1932 if (map.has(id)) { 1933 return false; 1934 } 1935 map.set(id, { 1936 initialDef: normalizeClassComponent(initialDef), 1937 instances: /* @__PURE__ */ new Set() 1938 }); 1939 return true; 1940} 1941function normalizeClassComponent(component) { 1942 return isClassComponent(component) ? component.__vccOpts : component; 1943} 1944function rerender(id, newRender) { 1945 const record = map.get(id); 1946 if (!record) { 1947 return; 1948 } 1949 record.initialDef.render = newRender; 1950 [...record.instances].forEach((instance) => { 1951 if (newRender) { 1952 instance.render = newRender; 1953 normalizeClassComponent(instance.type).render = newRender; 1954 } 1955 instance.renderCache = []; 1956 isHmrUpdating = true; 1957 instance.effect.dirty = true; 1958 instance.update(); 1959 isHmrUpdating = false; 1960 }); 1961} 1962function reload(id, newComp) { 1963 const record = map.get(id); 1964 if (!record) return; 1965 newComp = normalizeClassComponent(newComp); 1966 updateComponentDef(record.initialDef, newComp); 1967 const instances = [...record.instances]; 1968 for (let i = 0; i < instances.length; i++) { 1969 const instance = instances[i]; 1970 const oldComp = normalizeClassComponent(instance.type); 1971 let dirtyInstances = hmrDirtyComponents.get(oldComp); 1972 if (!dirtyInstances) { 1973 if (oldComp !== record.initialDef) { 1974 updateComponentDef(oldComp, newComp); 1975 } 1976 hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); 1977 } 1978 dirtyInstances.add(instance); 1979 instance.appContext.propsCache.delete(instance.type); 1980 instance.appContext.emitsCache.delete(instance.type); 1981 instance.appContext.optionsCache.delete(instance.type); 1982 if (instance.ceReload) { 1983 dirtyInstances.add(instance); 1984 instance.ceReload(newComp.styles); 1985 dirtyInstances.delete(instance); 1986 } else if (instance.parent) { 1987 instance.parent.effect.dirty = true; 1988 queueJob(() => { 1989 instance.parent.update(); 1990 dirtyInstances.delete(instance); 1991 }); 1992 } else if (instance.appContext.reload) { 1993 instance.appContext.reload(); 1994 } else if (typeof window !== "undefined") { 1995 window.location.reload(); 1996 } else { 1997 console.warn( 1998 "[HMR] Root or manually mounted instance modified. Full reload required." 1999 ); 2000 } 2001 } 2002 queuePostFlushCb(() => { 2003 hmrDirtyComponents.clear(); 2004 }); 2005} 2006function updateComponentDef(oldComp, newComp) { 2007 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(oldComp, newComp); 2008 for (const key in oldComp) { 2009 if (key !== "__file" && !(key in newComp)) { 2010 delete oldComp[key]; 2011 } 2012 } 2013} 2014function tryWrap(fn) { 2015 return (id, arg) => { 2016 try { 2017 return fn(id, arg); 2018 } catch (e) { 2019 console.error(e); 2020 console.warn( 2021 `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` 2022 ); 2023 } 2024 }; 2025} 2026 2027let devtools$1; 2028let buffer = []; 2029let devtoolsNotInstalled = false; 2030function emit$1(event, ...args) { 2031 if (devtools$1) { 2032 devtools$1.emit(event, ...args); 2033 } else if (!devtoolsNotInstalled) { 2034 buffer.push({ event, args }); 2035 } 2036} 2037function setDevtoolsHook$1(hook, target) { 2038 var _a, _b; 2039 devtools$1 = hook; 2040 if (devtools$1) { 2041 devtools$1.enabled = true; 2042 buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); 2043 buffer = []; 2044 } else if ( 2045 // handle late devtools injection - only do this if we are in an actual 2046 // browser environment to avoid the timer handle stalling test runner exit 2047 // (#4815) 2048 typeof window !== "undefined" && // some envs mock window but not fully 2049 window.HTMLElement && // also exclude jsdom 2050 // eslint-disable-next-line no-restricted-syntax 2051 !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) 2052 ) { 2053 const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; 2054 replay.push((newHook) => { 2055 setDevtoolsHook$1(newHook, target); 2056 }); 2057 setTimeout(() => { 2058 if (!devtools$1) { 2059 target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; 2060 devtoolsNotInstalled = true; 2061 buffer = []; 2062 } 2063 }, 3e3); 2064 } else { 2065 devtoolsNotInstalled = true; 2066 buffer = []; 2067 } 2068} 2069function devtoolsInitApp(app, version) { 2070 emit$1("app:init" /* APP_INIT */, app, version, { 2071 Fragment, 2072 Text, 2073 Comment, 2074 Static 2075 }); 2076} 2077function devtoolsUnmountApp(app) { 2078 emit$1("app:unmount" /* APP_UNMOUNT */, app); 2079} 2080const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( 2081 "component:added" /* COMPONENT_ADDED */ 2082); 2083const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); 2084const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( 2085 "component:removed" /* COMPONENT_REMOVED */ 2086); 2087const devtoolsComponentRemoved = (component) => { 2088 if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered 2089 !devtools$1.cleanupBuffer(component)) { 2090 _devtoolsComponentRemoved(component); 2091 } 2092}; 2093/*! #__NO_SIDE_EFFECTS__ */ 2094// @__NO_SIDE_EFFECTS__ 2095function createDevtoolsComponentHook(hook) { 2096 return (component) => { 2097 emit$1( 2098 hook, 2099 component.appContext.app, 2100 component.uid, 2101 component.parent ? component.parent.uid : void 0, 2102 component 2103 ); 2104 }; 2105} 2106const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( 2107 "perf:start" /* PERFORMANCE_START */ 2108); 2109const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( 2110 "perf:end" /* PERFORMANCE_END */ 2111); 2112function createDevtoolsPerformanceHook(hook) { 2113 return (component, type, time) => { 2114 emit$1(hook, component.appContext.app, component.uid, component, type, time); 2115 }; 2116} 2117function devtoolsComponentEmit(component, event, params) { 2118 emit$1( 2119 "component:emit" /* COMPONENT_EMIT */, 2120 component.appContext.app, 2121 component, 2122 event, 2123 params 2124 ); 2125} 2126 2127let currentRenderingInstance = null; 2128let currentScopeId = null; 2129function setCurrentRenderingInstance(instance) { 2130 const prev = currentRenderingInstance; 2131 currentRenderingInstance = instance; 2132 currentScopeId = instance && instance.type.__scopeId || null; 2133 return prev; 2134} 2135function pushScopeId(id) { 2136 currentScopeId = id; 2137} 2138function popScopeId() { 2139 currentScopeId = null; 2140} 2141const withScopeId = (_id) => withCtx; 2142function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { 2143 if (!ctx) return fn; 2144 if (fn._n) { 2145 return fn; 2146 } 2147 const renderFnWithContext = (...args) => { 2148 if (renderFnWithContext._d) { 2149 setBlockTracking(-1); 2150 } 2151 const prevInstance = setCurrentRenderingInstance(ctx); 2152 let res; 2153 try { 2154 res = fn(...args); 2155 } finally { 2156 setCurrentRenderingInstance(prevInstance); 2157 if (renderFnWithContext._d) { 2158 setBlockTracking(1); 2159 } 2160 } 2161 if (true) { 2162 devtoolsComponentUpdated(ctx); 2163 } 2164 return res; 2165 }; 2166 renderFnWithContext._n = true; 2167 renderFnWithContext._c = true; 2168 renderFnWithContext._d = true; 2169 return renderFnWithContext; 2170} 2171 2172function validateDirectiveName(name) { 2173 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isBuiltInDirective)(name)) { 2174 warn$1("Do not use built-in directive ids as custom directive id: " + name); 2175 } 2176} 2177function withDirectives(vnode, directives) { 2178 if (currentRenderingInstance === null) { 2179 true && warn$1(`withDirectives can only be used inside render functions.`); 2180 return vnode; 2181 } 2182 const instance = getComponentPublicInstance(currentRenderingInstance); 2183 const bindings = vnode.dirs || (vnode.dirs = []); 2184 for (let i = 0; i < directives.length; i++) { 2185 let [dir, value, arg, modifiers = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ] = directives[i]; 2186 if (dir) { 2187 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dir)) { 2188 dir = { 2189 mounted: dir, 2190 updated: dir 2191 }; 2192 } 2193 if (dir.deep) { 2194 traverse(value); 2195 } 2196 bindings.push({ 2197 dir, 2198 instance, 2199 value, 2200 oldValue: void 0, 2201 arg, 2202 modifiers 2203 }); 2204 } 2205 } 2206 return vnode; 2207} 2208function invokeDirectiveHook(vnode, prevVNode, instance, name) { 2209 const bindings = vnode.dirs; 2210 const oldBindings = prevVNode && prevVNode.dirs; 2211 for (let i = 0; i < bindings.length; i++) { 2212 const binding = bindings[i]; 2213 if (oldBindings) { 2214 binding.oldValue = oldBindings[i].value; 2215 } 2216 let hook = binding.dir[name]; 2217 if (hook) { 2218 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 2219 callWithAsyncErrorHandling(hook, instance, 8, [ 2220 vnode.el, 2221 binding, 2222 vnode, 2223 prevVNode 2224 ]); 2225 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 2226 } 2227 } 2228} 2229 2230const leaveCbKey = Symbol("_leaveCb"); 2231const enterCbKey = Symbol("_enterCb"); 2232function useTransitionState() { 2233 const state = { 2234 isMounted: false, 2235 isLeaving: false, 2236 isUnmounting: false, 2237 leavingVNodes: /* @__PURE__ */ new Map() 2238 }; 2239 onMounted(() => { 2240 state.isMounted = true; 2241 }); 2242 onBeforeUnmount(() => { 2243 state.isUnmounting = true; 2244 }); 2245 return state; 2246} 2247const TransitionHookValidator = [Function, Array]; 2248const BaseTransitionPropsValidators = { 2249 mode: String, 2250 appear: Boolean, 2251 persisted: Boolean, 2252 // enter 2253 onBeforeEnter: TransitionHookValidator, 2254 onEnter: TransitionHookValidator, 2255 onAfterEnter: TransitionHookValidator, 2256 onEnterCancelled: TransitionHookValidator, 2257 // leave 2258 onBeforeLeave: TransitionHookValidator, 2259 onLeave: TransitionHookValidator, 2260 onAfterLeave: TransitionHookValidator, 2261 onLeaveCancelled: TransitionHookValidator, 2262 // appear 2263 onBeforeAppear: TransitionHookValidator, 2264 onAppear: TransitionHookValidator, 2265 onAfterAppear: TransitionHookValidator, 2266 onAppearCancelled: TransitionHookValidator 2267}; 2268const recursiveGetSubtree = (instance) => { 2269 const subTree = instance.subTree; 2270 return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; 2271}; 2272const BaseTransitionImpl = { 2273 name: `BaseTransition`, 2274 props: BaseTransitionPropsValidators, 2275 setup(props, { slots }) { 2276 const instance = getCurrentInstance(); 2277 const state = useTransitionState(); 2278 return () => { 2279 const children = slots.default && getTransitionRawChildren(slots.default(), true); 2280 if (!children || !children.length) { 2281 return; 2282 } 2283 let child = children[0]; 2284 if (children.length > 1) { 2285 let hasFound = false; 2286 for (const c of children) { 2287 if (c.type !== Comment) { 2288 if ( true && hasFound) { 2289 warn$1( 2290 "<transition> can only be used on a single element or component. Use <transition-group> for lists." 2291 ); 2292 break; 2293 } 2294 child = c; 2295 hasFound = true; 2296 if (false) {} 2297 } 2298 } 2299 } 2300 const rawProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props); 2301 const { mode } = rawProps; 2302 if ( true && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { 2303 warn$1(`invalid <transition> mode: ${mode}`); 2304 } 2305 if (state.isLeaving) { 2306 return emptyPlaceholder(child); 2307 } 2308 const innerChild = getKeepAliveChild(child); 2309 if (!innerChild) { 2310 return emptyPlaceholder(child); 2311 } 2312 let enterHooks = resolveTransitionHooks( 2313 innerChild, 2314 rawProps, 2315 state, 2316 instance, 2317 // #11061, ensure enterHooks is fresh after clone 2318 (hooks) => enterHooks = hooks 2319 ); 2320 setTransitionHooks(innerChild, enterHooks); 2321 const oldChild = instance.subTree; 2322 const oldInnerChild = oldChild && getKeepAliveChild(oldChild); 2323 if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { 2324 const leavingHooks = resolveTransitionHooks( 2325 oldInnerChild, 2326 rawProps, 2327 state, 2328 instance 2329 ); 2330 setTransitionHooks(oldInnerChild, leavingHooks); 2331 if (mode === "out-in" && innerChild.type !== Comment) { 2332 state.isLeaving = true; 2333 leavingHooks.afterLeave = () => { 2334 state.isLeaving = false; 2335 if (instance.update.active !== false) { 2336 instance.effect.dirty = true; 2337 instance.update(); 2338 } 2339 }; 2340 return emptyPlaceholder(child); 2341 } else if (mode === "in-out" && innerChild.type !== Comment) { 2342 leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { 2343 const leavingVNodesCache = getLeavingNodesForType( 2344 state, 2345 oldInnerChild 2346 ); 2347 leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; 2348 el[leaveCbKey] = () => { 2349 earlyRemove(); 2350 el[leaveCbKey] = void 0; 2351 delete enterHooks.delayedLeave; 2352 }; 2353 enterHooks.delayedLeave = delayedLeave; 2354 }; 2355 } 2356 } 2357 return child; 2358 }; 2359 } 2360}; 2361const BaseTransition = BaseTransitionImpl; 2362function getLeavingNodesForType(state, vnode) { 2363 const { leavingVNodes } = state; 2364 let leavingVNodesCache = leavingVNodes.get(vnode.type); 2365 if (!leavingVNodesCache) { 2366 leavingVNodesCache = /* @__PURE__ */ Object.create(null); 2367 leavingVNodes.set(vnode.type, leavingVNodesCache); 2368 } 2369 return leavingVNodesCache; 2370} 2371function resolveTransitionHooks(vnode, props, state, instance, postClone) { 2372 const { 2373 appear, 2374 mode, 2375 persisted = false, 2376 onBeforeEnter, 2377 onEnter, 2378 onAfterEnter, 2379 onEnterCancelled, 2380 onBeforeLeave, 2381 onLeave, 2382 onAfterLeave, 2383 onLeaveCancelled, 2384 onBeforeAppear, 2385 onAppear, 2386 onAfterAppear, 2387 onAppearCancelled 2388 } = props; 2389 const key = String(vnode.key); 2390 const leavingVNodesCache = getLeavingNodesForType(state, vnode); 2391 const callHook = (hook, args) => { 2392 hook && callWithAsyncErrorHandling( 2393 hook, 2394 instance, 2395 9, 2396 args 2397 ); 2398 }; 2399 const callAsyncHook = (hook, args) => { 2400 const done = args[1]; 2401 callHook(hook, args); 2402 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) { 2403 if (hook.every((hook2) => hook2.length <= 1)) done(); 2404 } else if (hook.length <= 1) { 2405 done(); 2406 } 2407 }; 2408 const hooks = { 2409 mode, 2410 persisted, 2411 beforeEnter(el) { 2412 let hook = onBeforeEnter; 2413 if (!state.isMounted) { 2414 if (appear) { 2415 hook = onBeforeAppear || onBeforeEnter; 2416 } else { 2417 return; 2418 } 2419 } 2420 if (el[leaveCbKey]) { 2421 el[leaveCbKey]( 2422 true 2423 /* cancelled */ 2424 ); 2425 } 2426 const leavingVNode = leavingVNodesCache[key]; 2427 if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { 2428 leavingVNode.el[leaveCbKey](); 2429 } 2430 callHook(hook, [el]); 2431 }, 2432 enter(el) { 2433 let hook = onEnter; 2434 let afterHook = onAfterEnter; 2435 let cancelHook = onEnterCancelled; 2436 if (!state.isMounted) { 2437 if (appear) { 2438 hook = onAppear || onEnter; 2439 afterHook = onAfterAppear || onAfterEnter; 2440 cancelHook = onAppearCancelled || onEnterCancelled; 2441 } else { 2442 return; 2443 } 2444 } 2445 let called = false; 2446 const done = el[enterCbKey] = (cancelled) => { 2447 if (called) return; 2448 called = true; 2449 if (cancelled) { 2450 callHook(cancelHook, [el]); 2451 } else { 2452 callHook(afterHook, [el]); 2453 } 2454 if (hooks.delayedLeave) { 2455 hooks.delayedLeave(); 2456 } 2457 el[enterCbKey] = void 0; 2458 }; 2459 if (hook) { 2460 callAsyncHook(hook, [el, done]); 2461 } else { 2462 done(); 2463 } 2464 }, 2465 leave(el, remove) { 2466 const key2 = String(vnode.key); 2467 if (el[enterCbKey]) { 2468 el[enterCbKey]( 2469 true 2470 /* cancelled */ 2471 ); 2472 } 2473 if (state.isUnmounting) { 2474 return remove(); 2475 } 2476 callHook(onBeforeLeave, [el]); 2477 let called = false; 2478 const done = el[leaveCbKey] = (cancelled) => { 2479 if (called) return; 2480 called = true; 2481 remove(); 2482 if (cancelled) { 2483 callHook(onLeaveCancelled, [el]); 2484 } else { 2485 callHook(onAfterLeave, [el]); 2486 } 2487 el[leaveCbKey] = void 0; 2488 if (leavingVNodesCache[key2] === vnode) { 2489 delete leavingVNodesCache[key2]; 2490 } 2491 }; 2492 leavingVNodesCache[key2] = vnode; 2493 if (onLeave) { 2494 callAsyncHook(onLeave, [el, done]); 2495 } else { 2496 done(); 2497 } 2498 }, 2499 clone(vnode2) { 2500 const hooks2 = resolveTransitionHooks( 2501 vnode2, 2502 props, 2503 state, 2504 instance, 2505 postClone 2506 ); 2507 if (postClone) postClone(hooks2); 2508 return hooks2; 2509 } 2510 }; 2511 return hooks; 2512} 2513function emptyPlaceholder(vnode) { 2514 if (isKeepAlive(vnode)) { 2515 vnode = cloneVNode(vnode); 2516 vnode.children = null; 2517 return vnode; 2518 } 2519} 2520function getKeepAliveChild(vnode) { 2521 if (!isKeepAlive(vnode)) { 2522 return vnode; 2523 } 2524 if ( true && vnode.component) { 2525 return vnode.component.subTree; 2526 } 2527 const { shapeFlag, children } = vnode; 2528 if (children) { 2529 if (shapeFlag & 16) { 2530 return children[0]; 2531 } 2532 if (shapeFlag & 32 && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(children.default)) { 2533 return children.default(); 2534 } 2535 } 2536} 2537function setTransitionHooks(vnode, hooks) { 2538 if (vnode.shapeFlag & 6 && vnode.component) { 2539 setTransitionHooks(vnode.component.subTree, hooks); 2540 } else if (vnode.shapeFlag & 128) { 2541 vnode.ssContent.transition = hooks.clone(vnode.ssContent); 2542 vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); 2543 } else { 2544 vnode.transition = hooks; 2545 } 2546} 2547function getTransitionRawChildren(children, keepComment = false, parentKey) { 2548 let ret = []; 2549 let keyedFragmentCount = 0; 2550 for (let i = 0; i < children.length; i++) { 2551 let child = children[i]; 2552 const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); 2553 if (child.type === Fragment) { 2554 if (child.patchFlag & 128) keyedFragmentCount++; 2555 ret = ret.concat( 2556 getTransitionRawChildren(child.children, keepComment, key) 2557 ); 2558 } else if (keepComment || child.type !== Comment) { 2559 ret.push(key != null ? cloneVNode(child, { key }) : child); 2560 } 2561 } 2562 if (keyedFragmentCount > 1) { 2563 for (let i = 0; i < ret.length; i++) { 2564 ret[i].patchFlag = -2; 2565 } 2566 } 2567 return ret; 2568} 2569 2570/*! #__NO_SIDE_EFFECTS__ */ 2571// @__NO_SIDE_EFFECTS__ 2572function defineComponent(options, extraOptions) { 2573 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(options) ? ( 2574 // #8326: extend call and options.name access are considered side-effects 2575 // by Rollup, so we have to wrap it in a pure-annotated IIFE. 2576 /* @__PURE__ */ (() => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({ name: options.name }, extraOptions, { setup: options }))() 2577 ) : options; 2578} 2579 2580const isAsyncWrapper = (i) => !!i.type.__asyncLoader; 2581/*! #__NO_SIDE_EFFECTS__ */ 2582// @__NO_SIDE_EFFECTS__ 2583function defineAsyncComponent(source) { 2584 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) { 2585 source = { loader: source }; 2586 } 2587 const { 2588 loader, 2589 loadingComponent, 2590 errorComponent, 2591 delay = 200, 2592 timeout, 2593 // undefined = never times out 2594 suspensible = true, 2595 onError: userOnError 2596 } = source; 2597 let pendingRequest = null; 2598 let resolvedComp; 2599 let retries = 0; 2600 const retry = () => { 2601 retries++; 2602 pendingRequest = null; 2603 return load(); 2604 }; 2605 const load = () => { 2606 let thisRequest; 2607 return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { 2608 err = err instanceof Error ? err : new Error(String(err)); 2609 if (userOnError) { 2610 return new Promise((resolve, reject) => { 2611 const userRetry = () => resolve(retry()); 2612 const userFail = () => reject(err); 2613 userOnError(err, userRetry, userFail, retries + 1); 2614 }); 2615 } else { 2616 throw err; 2617 } 2618 }).then((comp) => { 2619 if (thisRequest !== pendingRequest && pendingRequest) { 2620 return pendingRequest; 2621 } 2622 if ( true && !comp) { 2623 warn$1( 2624 `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` 2625 ); 2626 } 2627 if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { 2628 comp = comp.default; 2629 } 2630 if ( true && comp && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) { 2631 throw new Error(`Invalid async component load result: ${comp}`); 2632 } 2633 resolvedComp = comp; 2634 return comp; 2635 })); 2636 }; 2637 return defineComponent({ 2638 name: "AsyncComponentWrapper", 2639 __asyncLoader: load, 2640 get __asyncResolved() { 2641 return resolvedComp; 2642 }, 2643 setup() { 2644 const instance = currentInstance; 2645 if (resolvedComp) { 2646 return () => createInnerComp(resolvedComp, instance); 2647 } 2648 const onError = (err) => { 2649 pendingRequest = null; 2650 handleError( 2651 err, 2652 instance, 2653 13, 2654 !errorComponent 2655 ); 2656 }; 2657 if (suspensible && instance.suspense || isInSSRComponentSetup) { 2658 return load().then((comp) => { 2659 return () => createInnerComp(comp, instance); 2660 }).catch((err) => { 2661 onError(err); 2662 return () => errorComponent ? createVNode(errorComponent, { 2663 error: err 2664 }) : null; 2665 }); 2666 } 2667 const loaded = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(false); 2668 const error = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(); 2669 const delayed = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(!!delay); 2670 if (delay) { 2671 setTimeout(() => { 2672 delayed.value = false; 2673 }, delay); 2674 } 2675 if (timeout != null) { 2676 setTimeout(() => { 2677 if (!loaded.value && !error.value) { 2678 const err = new Error( 2679 `Async component timed out after ${timeout}ms.` 2680 ); 2681 onError(err); 2682 error.value = err; 2683 } 2684 }, timeout); 2685 } 2686 load().then(() => { 2687 loaded.value = true; 2688 if (instance.parent && isKeepAlive(instance.parent.vnode)) { 2689 instance.parent.effect.dirty = true; 2690 queueJob(instance.parent.update); 2691 } 2692 }).catch((err) => { 2693 onError(err); 2694 error.value = err; 2695 }); 2696 return () => { 2697 if (loaded.value && resolvedComp) { 2698 return createInnerComp(resolvedComp, instance); 2699 } else if (error.value && errorComponent) { 2700 return createVNode(errorComponent, { 2701 error: error.value 2702 }); 2703 } else if (loadingComponent && !delayed.value) { 2704 return createVNode(loadingComponent); 2705 } 2706 }; 2707 } 2708 }); 2709} 2710function createInnerComp(comp, parent) { 2711 const { ref: ref2, props, children, ce } = parent.vnode; 2712 const vnode = createVNode(comp, props, children); 2713 vnode.ref = ref2; 2714 vnode.ce = ce; 2715 delete parent.vnode.ce; 2716 return vnode; 2717} 2718 2719const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; 2720const KeepAliveImpl = { 2721 name: `KeepAlive`, 2722 // Marker for special handling inside the renderer. We are not using a === 2723 // check directly on KeepAlive in the renderer, because importing it directly 2724 // would prevent it from being tree-shaken. 2725 __isKeepAlive: true, 2726 props: { 2727 include: [String, RegExp, Array], 2728 exclude: [String, RegExp, Array], 2729 max: [String, Number] 2730 }, 2731 setup(props, { slots }) { 2732 const instance = getCurrentInstance(); 2733 const sharedContext = instance.ctx; 2734 if (!sharedContext.renderer) { 2735 return () => { 2736 const children = slots.default && slots.default(); 2737 return children && children.length === 1 ? children[0] : children; 2738 }; 2739 } 2740 const cache = /* @__PURE__ */ new Map(); 2741 const keys = /* @__PURE__ */ new Set(); 2742 let current = null; 2743 if (true) { 2744 instance.__v_cache = cache; 2745 } 2746 const parentSuspense = instance.suspense; 2747 const { 2748 renderer: { 2749 p: patch, 2750 m: move, 2751 um: _unmount, 2752 o: { createElement } 2753 } 2754 } = sharedContext; 2755 const storageContainer = createElement("div"); 2756 sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { 2757 const instance2 = vnode.component; 2758 move(vnode, container, anchor, 0, parentSuspense); 2759 patch( 2760 instance2.vnode, 2761 vnode, 2762 container, 2763 anchor, 2764 instance2, 2765 parentSuspense, 2766 namespace, 2767 vnode.slotScopeIds, 2768 optimized 2769 ); 2770 queuePostRenderEffect(() => { 2771 instance2.isDeactivated = false; 2772 if (instance2.a) { 2773 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance2.a); 2774 } 2775 const vnodeHook = vnode.props && vnode.props.onVnodeMounted; 2776 if (vnodeHook) { 2777 invokeVNodeHook(vnodeHook, instance2.parent, vnode); 2778 } 2779 }, parentSuspense); 2780 if (true) { 2781 devtoolsComponentAdded(instance2); 2782 } 2783 }; 2784 sharedContext.deactivate = (vnode) => { 2785 const instance2 = vnode.component; 2786 invalidateMount(instance2.m); 2787 invalidateMount(instance2.a); 2788 move(vnode, storageContainer, null, 1, parentSuspense); 2789 queuePostRenderEffect(() => { 2790 if (instance2.da) { 2791 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance2.da); 2792 } 2793 const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; 2794 if (vnodeHook) { 2795 invokeVNodeHook(vnodeHook, instance2.parent, vnode); 2796 } 2797 instance2.isDeactivated = true; 2798 }, parentSuspense); 2799 if (true) { 2800 devtoolsComponentAdded(instance2); 2801 } 2802 }; 2803 function unmount(vnode) { 2804 resetShapeFlag(vnode); 2805 _unmount(vnode, instance, parentSuspense, true); 2806 } 2807 function pruneCache(filter) { 2808 cache.forEach((vnode, key) => { 2809 const name = getComponentName(vnode.type); 2810 if (name && (!filter || !filter(name))) { 2811 pruneCacheEntry(key); 2812 } 2813 }); 2814 } 2815 function pruneCacheEntry(key) { 2816 const cached = cache.get(key); 2817 if (cached && (!current || !isSameVNodeType(cached, current))) { 2818 unmount(cached); 2819 } else if (current) { 2820 resetShapeFlag(current); 2821 } 2822 cache.delete(key); 2823 keys.delete(key); 2824 } 2825 watch( 2826 () => [props.include, props.exclude], 2827 ([include, exclude]) => { 2828 include && pruneCache((name) => matches(include, name)); 2829 exclude && pruneCache((name) => !matches(exclude, name)); 2830 }, 2831 // prune post-render after `current` has been updated 2832 { flush: "post", deep: true } 2833 ); 2834 let pendingCacheKey = null; 2835 const cacheSubtree = () => { 2836 if (pendingCacheKey != null) { 2837 if (isSuspense(instance.subTree.type)) { 2838 queuePostRenderEffect(() => { 2839 cache.set(pendingCacheKey, getInnerChild(instance.subTree)); 2840 }, instance.subTree.suspense); 2841 } else { 2842 cache.set(pendingCacheKey, getInnerChild(instance.subTree)); 2843 } 2844 } 2845 }; 2846 onMounted(cacheSubtree); 2847 onUpdated(cacheSubtree); 2848 onBeforeUnmount(() => { 2849 cache.forEach((cached) => { 2850 const { subTree, suspense } = instance; 2851 const vnode = getInnerChild(subTree); 2852 if (cached.type === vnode.type && cached.key === vnode.key) { 2853 resetShapeFlag(vnode); 2854 const da = vnode.component.da; 2855 da && queuePostRenderEffect(da, suspense); 2856 return; 2857 } 2858 unmount(cached); 2859 }); 2860 }); 2861 return () => { 2862 pendingCacheKey = null; 2863 if (!slots.default) { 2864 return null; 2865 } 2866 const children = slots.default(); 2867 const rawVNode = children[0]; 2868 if (children.length > 1) { 2869 if (true) { 2870 warn$1(`KeepAlive should contain exactly one component child.`); 2871 } 2872 current = null; 2873 return children; 2874 } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { 2875 current = null; 2876 return rawVNode; 2877 } 2878 let vnode = getInnerChild(rawVNode); 2879 if (vnode.type === Comment) { 2880 current = null; 2881 return vnode; 2882 } 2883 const comp = vnode.type; 2884 const name = getComponentName( 2885 isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp 2886 ); 2887 const { include, exclude, max } = props; 2888 if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { 2889 current = vnode; 2890 return rawVNode; 2891 } 2892 const key = vnode.key == null ? comp : vnode.key; 2893 const cachedVNode = cache.get(key); 2894 if (vnode.el) { 2895 vnode = cloneVNode(vnode); 2896 if (rawVNode.shapeFlag & 128) { 2897 rawVNode.ssContent = vnode; 2898 } 2899 } 2900 pendingCacheKey = key; 2901 if (cachedVNode) { 2902 vnode.el = cachedVNode.el; 2903 vnode.component = cachedVNode.component; 2904 if (vnode.transition) { 2905 setTransitionHooks(vnode, vnode.transition); 2906 } 2907 vnode.shapeFlag |= 512; 2908 keys.delete(key); 2909 keys.add(key); 2910 } else { 2911 keys.add(key); 2912 if (max && keys.size > parseInt(max, 10)) { 2913 pruneCacheEntry(keys.values().next().value); 2914 } 2915 } 2916 vnode.shapeFlag |= 256; 2917 current = vnode; 2918 return isSuspense(rawVNode.type) ? rawVNode : vnode; 2919 }; 2920 } 2921}; 2922const KeepAlive = KeepAliveImpl; 2923function matches(pattern, name) { 2924 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(pattern)) { 2925 return pattern.some((p) => matches(p, name)); 2926 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(pattern)) { 2927 return pattern.split(",").includes(name); 2928 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isRegExp)(pattern)) { 2929 return pattern.test(name); 2930 } 2931 return false; 2932} 2933function onActivated(hook, target) { 2934 registerKeepAliveHook(hook, "a", target); 2935} 2936function onDeactivated(hook, target) { 2937 registerKeepAliveHook(hook, "da", target); 2938} 2939function registerKeepAliveHook(hook, type, target = currentInstance) { 2940 const wrappedHook = hook.__wdc || (hook.__wdc = () => { 2941 let current = target; 2942 while (current) { 2943 if (current.isDeactivated) { 2944 return; 2945 } 2946 current = current.parent; 2947 } 2948 return hook(); 2949 }); 2950 injectHook(type, wrappedHook, target); 2951 if (target) { 2952 let current = target.parent; 2953 while (current && current.parent) { 2954 if (isKeepAlive(current.parent.vnode)) { 2955 injectToKeepAliveRoot(wrappedHook, type, target, current); 2956 } 2957 current = current.parent; 2958 } 2959 } 2960} 2961function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { 2962 const injected = injectHook( 2963 type, 2964 hook, 2965 keepAliveRoot, 2966 true 2967 /* prepend */ 2968 ); 2969 onUnmounted(() => { 2970 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(keepAliveRoot[type], injected); 2971 }, target); 2972} 2973function resetShapeFlag(vnode) { 2974 vnode.shapeFlag &= ~256; 2975 vnode.shapeFlag &= ~512; 2976} 2977function getInnerChild(vnode) { 2978 return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; 2979} 2980 2981function injectHook(type, hook, target = currentInstance, prepend = false) { 2982 if (target) { 2983 const hooks = target[type] || (target[type] = []); 2984 const wrappedHook = hook.__weh || (hook.__weh = (...args) => { 2985 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 2986 const reset = setCurrentInstance(target); 2987 const res = callWithAsyncErrorHandling(hook, target, type, args); 2988 reset(); 2989 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 2990 return res; 2991 }); 2992 if (prepend) { 2993 hooks.unshift(wrappedHook); 2994 } else { 2995 hooks.push(wrappedHook); 2996 } 2997 return wrappedHook; 2998 } else if (true) { 2999 const apiName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(ErrorTypeStrings$1[type].replace(/ hook$/, "")); 3000 warn$1( 3001 `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) 3002 ); 3003 } 3004} 3005const createHook = (lifecycle) => (hook, target = currentInstance) => { 3006 if (!isInSSRComponentSetup || lifecycle === "sp") { 3007 injectHook(lifecycle, (...args) => hook(...args), target); 3008 } 3009}; 3010const onBeforeMount = createHook("bm"); 3011const onMounted = createHook("m"); 3012const onBeforeUpdate = createHook("bu"); 3013const onUpdated = createHook("u"); 3014const onBeforeUnmount = createHook("bum"); 3015const onUnmounted = createHook("um"); 3016const onServerPrefetch = createHook("sp"); 3017const onRenderTriggered = createHook( 3018 "rtg" 3019); 3020const onRenderTracked = createHook( 3021 "rtc" 3022); 3023function onErrorCaptured(hook, target = currentInstance) { 3024 injectHook("ec", hook, target); 3025} 3026 3027const COMPONENTS = "components"; 3028const DIRECTIVES = "directives"; 3029function resolveComponent(name, maybeSelfReference) { 3030 return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; 3031} 3032const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); 3033function resolveDynamicComponent(component) { 3034 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(component)) { 3035 return resolveAsset(COMPONENTS, component, false) || component; 3036 } else { 3037 return component || NULL_DYNAMIC_COMPONENT; 3038 } 3039} 3040function resolveDirective(name) { 3041 return resolveAsset(DIRECTIVES, name); 3042} 3043function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { 3044 const instance = currentRenderingInstance || currentInstance; 3045 if (instance) { 3046 const Component = instance.type; 3047 if (type === COMPONENTS) { 3048 const selfName = getComponentName( 3049 Component, 3050 false 3051 ); 3052 if (selfName && (selfName === name || selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name) || selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)))) { 3053 return Component; 3054 } 3055 } 3056 const res = ( 3057 // local registration 3058 // check instance[type] first which is resolved for options API 3059 resolve(instance[type] || Component[type], name) || // global registration 3060 resolve(instance.appContext[type], name) 3061 ); 3062 if (!res && maybeSelfReference) { 3063 return Component; 3064 } 3065 if ( true && warnMissing && !res) { 3066 const extra = type === COMPONENTS ? ` 3067If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; 3068 warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); 3069 } 3070 return res; 3071 } else if (true) { 3072 warn$1( 3073 `resolve${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(type.slice(0, -1))} can only be used in render() or setup().` 3074 ); 3075 } 3076} 3077function resolve(registry, name) { 3078 return registry && (registry[name] || registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)] || registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name))]); 3079} 3080 3081function renderList(source, renderItem, cache, index) { 3082 let ret; 3083 const cached = cache && cache[index]; 3084 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source)) { 3085 ret = new Array(source.length); 3086 for (let i = 0, l = source.length; i < l; i++) { 3087 ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); 3088 } 3089 } else if (typeof source === "number") { 3090 if ( true && !Number.isInteger(source)) { 3091 warn$1(`The v-for range expect an integer value but got ${source}.`); 3092 } 3093 ret = new Array(source); 3094 for (let i = 0; i < source; i++) { 3095 ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); 3096 } 3097 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(source)) { 3098 if (source[Symbol.iterator]) { 3099 ret = Array.from( 3100 source, 3101 (item, i) => renderItem(item, i, void 0, cached && cached[i]) 3102 ); 3103 } else { 3104 const keys = Object.keys(source); 3105 ret = new Array(keys.length); 3106 for (let i = 0, l = keys.length; i < l; i++) { 3107 const key = keys[i]; 3108 ret[i] = renderItem(source[key], key, i, cached && cached[i]); 3109 } 3110 } 3111 } else { 3112 ret = []; 3113 } 3114 if (cache) { 3115 cache[index] = ret; 3116 } 3117 return ret; 3118} 3119 3120function createSlots(slots, dynamicSlots) { 3121 for (let i = 0; i < dynamicSlots.length; i++) { 3122 const slot = dynamicSlots[i]; 3123 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(slot)) { 3124 for (let j = 0; j < slot.length; j++) { 3125 slots[slot[j].name] = slot[j].fn; 3126 } 3127 } else if (slot) { 3128 slots[slot.name] = slot.key ? (...args) => { 3129 const res = slot.fn(...args); 3130 if (res) res.key = slot.key; 3131 return res; 3132 } : slot.fn; 3133 } 3134 } 3135 return slots; 3136} 3137 3138function renderSlot(slots, name, props = {}, fallback, noSlotted) { 3139 if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { 3140 if (name !== "default") props.name = name; 3141 return createVNode("slot", props, fallback && fallback()); 3142 } 3143 let slot = slots[name]; 3144 if ( true && slot && slot.length > 1) { 3145 warn$1( 3146 `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` 3147 ); 3148 slot = () => []; 3149 } 3150 if (slot && slot._c) { 3151 slot._d = false; 3152 } 3153 openBlock(); 3154 const validSlotContent = slot && ensureValidVNode(slot(props)); 3155 const rendered = createBlock( 3156 Fragment, 3157 { 3158 key: (props.key || // slot content array of a dynamic conditional slot may have a branch 3159 // key attached in the `createSlots` helper, respect that 3160 validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content 3161 (!validSlotContent && fallback ? "_fb" : "") 3162 }, 3163 validSlotContent || (fallback ? fallback() : []), 3164 validSlotContent && slots._ === 1 ? 64 : -2 3165 ); 3166 if (!noSlotted && rendered.scopeId) { 3167 rendered.slotScopeIds = [rendered.scopeId + "-s"]; 3168 } 3169 if (slot && slot._c) { 3170 slot._d = true; 3171 } 3172 return rendered; 3173} 3174function ensureValidVNode(vnodes) { 3175 return vnodes.some((child) => { 3176 if (!isVNode(child)) return true; 3177 if (child.type === Comment) return false; 3178 if (child.type === Fragment && !ensureValidVNode(child.children)) 3179 return false; 3180 return true; 3181 }) ? vnodes : null; 3182} 3183 3184function toHandlers(obj, preserveCaseIfNecessary) { 3185 const ret = {}; 3186 if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) { 3187 warn$1(`v-on with no argument expects an object value.`); 3188 return ret; 3189 } 3190 for (const key in obj) { 3191 ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(key)] = obj[key]; 3192 } 3193 return ret; 3194} 3195 3196const getPublicInstance = (i) => { 3197 if (!i) return null; 3198 if (isStatefulComponent(i)) return getComponentPublicInstance(i); 3199 return getPublicInstance(i.parent); 3200}; 3201const publicPropertiesMap = ( 3202 // Move PURE marker to new line to workaround compiler discarding it 3203 // due to type annotation 3204 /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), { 3205 $: (i) => i, 3206 $el: (i) => i.vnode.el, 3207 $data: (i) => i.data, 3208 $props: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.props) : 0, 3209 $attrs: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.attrs) : 0, 3210 $slots: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.slots) : 0, 3211 $refs: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.refs) : 0, 3212 $parent: (i) => getPublicInstance(i.parent), 3213 $root: (i) => getPublicInstance(i.root), 3214 $emit: (i) => i.emit, 3215 $options: (i) => false ? 0 : i.type, 3216 $forceUpdate: (i) => i.f || (i.f = () => { 3217 i.effect.dirty = true; 3218 queueJob(i.update); 3219 }), 3220 $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), 3221 $watch: (i) => false ? 0 : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP 3222 }) 3223); 3224const isReservedPrefix = (key) => key === "_" || key === "$"; 3225const hasSetupBinding = (state, key) => state !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && !state.__isScriptSetup && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(state, key); 3226const PublicInstanceProxyHandlers = { 3227 get({ _: instance }, key) { 3228 if (key === "__v_skip") { 3229 return true; 3230 } 3231 const { ctx, setupState, data, props, accessCache, type, appContext } = instance; 3232 if ( true && key === "__isVue") { 3233 return true; 3234 } 3235 let normalizedProps; 3236 if (key[0] !== "$") { 3237 const n = accessCache[key]; 3238 if (n !== void 0) { 3239 switch (n) { 3240 case 1 /* SETUP */: 3241 return setupState[key]; 3242 case 2 /* DATA */: 3243 return data[key]; 3244 case 4 /* CONTEXT */: 3245 return ctx[key]; 3246 case 3 /* PROPS */: 3247 return props[key]; 3248 } 3249 } else if (hasSetupBinding(setupState, key)) { 3250 accessCache[key] = 1 /* SETUP */; 3251 return setupState[key]; 3252 } else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) { 3253 accessCache[key] = 2 /* DATA */; 3254 return data[key]; 3255 } else if ( 3256 // only cache other properties when instance has declared (thus stable) 3257 // props 3258 (normalizedProps = instance.propsOptions[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key) 3259 ) { 3260 accessCache[key] = 3 /* PROPS */; 3261 return props[key]; 3262 } else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) { 3263 accessCache[key] = 4 /* CONTEXT */; 3264 return ctx[key]; 3265 } else if (true) { 3266 accessCache[key] = 0 /* OTHER */; 3267 } 3268 } 3269 const publicGetter = publicPropertiesMap[key]; 3270 let cssModule, globalProperties; 3271 if (publicGetter) { 3272 if (key === "$attrs") { 3273 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance.attrs, "get", ""); 3274 true && markAttrsAccessed(); 3275 } else if ( true && key === "$slots") { 3276 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", key); 3277 } 3278 return publicGetter(instance); 3279 } else if ( 3280 // css module (injected by vue-loader) 3281 (cssModule = type.__cssModules) && (cssModule = cssModule[key]) 3282 ) { 3283 return cssModule; 3284 } else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) { 3285 accessCache[key] = 4 /* CONTEXT */; 3286 return ctx[key]; 3287 } else if ( 3288 // global properties 3289 globalProperties = appContext.config.globalProperties, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(globalProperties, key) 3290 ) { 3291 { 3292 return globalProperties[key]; 3293 } 3294 } else if ( true && currentRenderingInstance && (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading 3295 // to infinite warning loop 3296 key.indexOf("__v") !== 0)) { 3297 if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && isReservedPrefix(key[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) { 3298 warn$1( 3299 `Property ${JSON.stringify( 3300 key 3301 )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` 3302 ); 3303 } else if (instance === currentRenderingInstance) { 3304 warn$1( 3305 `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` 3306 ); 3307 } 3308 } 3309 }, 3310 set({ _: instance }, key, value) { 3311 const { data, setupState, ctx } = instance; 3312 if (hasSetupBinding(setupState, key)) { 3313 setupState[key] = value; 3314 return true; 3315 } else if ( true && setupState.__isScriptSetup && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) { 3316 warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); 3317 return false; 3318 } else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) { 3319 data[key] = value; 3320 return true; 3321 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(instance.props, key)) { 3322 true && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); 3323 return false; 3324 } 3325 if (key[0] === "$" && key.slice(1) in instance) { 3326 true && warn$1( 3327 `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` 3328 ); 3329 return false; 3330 } else { 3331 if ( true && key in instance.appContext.config.globalProperties) { 3332 Object.defineProperty(ctx, key, { 3333 enumerable: true, 3334 configurable: true, 3335 value 3336 }); 3337 } else { 3338 ctx[key] = value; 3339 } 3340 } 3341 return true; 3342 }, 3343 has({ 3344 _: { data, setupState, accessCache, ctx, appContext, propsOptions } 3345 }, key) { 3346 let normalizedProps; 3347 return !!accessCache[key] || data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(publicPropertiesMap, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(appContext.config.globalProperties, key); 3348 }, 3349 defineProperty(target, key, descriptor) { 3350 if (descriptor.get != null) { 3351 target._.accessCache[key] = 0; 3352 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(descriptor, "value")) { 3353 this.set(target, key, descriptor.value, null); 3354 } 3355 return Reflect.defineProperty(target, key, descriptor); 3356 } 3357}; 3358if (true) { 3359 PublicInstanceProxyHandlers.ownKeys = (target) => { 3360 warn$1( 3361 `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` 3362 ); 3363 return Reflect.ownKeys(target); 3364 }; 3365} 3366const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)( 3367 {}, 3368 PublicInstanceProxyHandlers, 3369 { 3370 get(target, key) { 3371 if (key === Symbol.unscopables) { 3372 return; 3373 } 3374 return PublicInstanceProxyHandlers.get(target, key, target); 3375 }, 3376 has(_, key) { 3377 const has = key[0] !== "_" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isGloballyAllowed)(key); 3378 if ( true && !has && PublicInstanceProxyHandlers.has(_, key)) { 3379 warn$1( 3380 `Property ${JSON.stringify( 3381 key 3382 )} should not start with _ which is a reserved prefix for Vue internals.` 3383 ); 3384 } 3385 return has; 3386 } 3387 } 3388); 3389function createDevRenderContext(instance) { 3390 const target = {}; 3391 Object.defineProperty(target, `_`, { 3392 configurable: true, 3393 enumerable: false, 3394 get: () => instance 3395 }); 3396 Object.keys(publicPropertiesMap).forEach((key) => { 3397 Object.defineProperty(target, key, { 3398 configurable: true, 3399 enumerable: false, 3400 get: () => publicPropertiesMap[key](instance), 3401 // intercepted by the proxy so no need for implementation, 3402 // but needed to prevent set errors 3403 set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP 3404 }); 3405 }); 3406 return target; 3407} 3408function exposePropsOnRenderContext(instance) { 3409 const { 3410 ctx, 3411 propsOptions: [propsOptions] 3412 } = instance; 3413 if (propsOptions) { 3414 Object.keys(propsOptions).forEach((key) => { 3415 Object.defineProperty(ctx, key, { 3416 enumerable: true, 3417 configurable: true, 3418 get: () => instance.props[key], 3419 set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP 3420 }); 3421 }); 3422 } 3423} 3424function exposeSetupStateOnRenderContext(instance) { 3425 const { ctx, setupState } = instance; 3426 Object.keys((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(setupState)).forEach((key) => { 3427 if (!setupState.__isScriptSetup) { 3428 if (isReservedPrefix(key[0])) { 3429 warn$1( 3430 `setup() return property ${JSON.stringify( 3431 key 3432 )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` 3433 ); 3434 return; 3435 } 3436 Object.defineProperty(ctx, key, { 3437 enumerable: true, 3438 configurable: true, 3439 get: () => setupState[key], 3440 set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP 3441 }); 3442 } 3443 }); 3444} 3445 3446const warnRuntimeUsage = (method) => warn$1( 3447 `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` 3448); 3449function defineProps() { 3450 if (true) { 3451 warnRuntimeUsage(`defineProps`); 3452 } 3453 return null; 3454} 3455function defineEmits() { 3456 if (true) { 3457 warnRuntimeUsage(`defineEmits`); 3458 } 3459 return null; 3460} 3461function defineExpose(exposed) { 3462 if (true) { 3463 warnRuntimeUsage(`defineExpose`); 3464 } 3465} 3466function defineOptions(options) { 3467 if (true) { 3468 warnRuntimeUsage(`defineOptions`); 3469 } 3470} 3471function defineSlots() { 3472 if (true) { 3473 warnRuntimeUsage(`defineSlots`); 3474 } 3475 return null; 3476} 3477function defineModel() { 3478 if (true) { 3479 warnRuntimeUsage("defineModel"); 3480 } 3481} 3482function withDefaults(props, defaults) { 3483 if (true) { 3484 warnRuntimeUsage(`withDefaults`); 3485 } 3486 return null; 3487} 3488function useSlots() { 3489 return getContext().slots; 3490} 3491function useAttrs() { 3492 return getContext().attrs; 3493} 3494function getContext() { 3495 const i = getCurrentInstance(); 3496 if ( true && !i) { 3497 warn$1(`useContext() called without active instance.`); 3498 } 3499 return i.setupContext || (i.setupContext = createSetupContext(i)); 3500} 3501function normalizePropsOrEmits(props) { 3502 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props) ? props.reduce( 3503 (normalized, p) => (normalized[p] = null, normalized), 3504 {} 3505 ) : props; 3506} 3507function mergeDefaults(raw, defaults) { 3508 const props = normalizePropsOrEmits(raw); 3509 for (const key in defaults) { 3510 if (key.startsWith("__skip")) continue; 3511 let opt = props[key]; 3512 if (opt) { 3513 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt)) { 3514 opt = props[key] = { type: opt, default: defaults[key] }; 3515 } else { 3516 opt.default = defaults[key]; 3517 } 3518 } else if (opt === null) { 3519 opt = props[key] = { default: defaults[key] }; 3520 } else if (true) { 3521 warn$1(`props default key "${key}" has no corresponding declaration.`); 3522 } 3523 if (opt && defaults[`__skip_${key}`]) { 3524 opt.skipFactory = true; 3525 } 3526 } 3527 return props; 3528} 3529function mergeModels(a, b) { 3530 if (!a || !b) return a || b; 3531 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(a) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(b)) return a.concat(b); 3532 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); 3533} 3534function createPropsRestProxy(props, excludedKeys) { 3535 const ret = {}; 3536 for (const key in props) { 3537 if (!excludedKeys.includes(key)) { 3538 Object.defineProperty(ret, key, { 3539 enumerable: true, 3540 get: () => props[key] 3541 }); 3542 } 3543 } 3544 return ret; 3545} 3546function withAsyncContext(getAwaitable) { 3547 const ctx = getCurrentInstance(); 3548 if ( true && !ctx) { 3549 warn$1( 3550 `withAsyncContext called without active current instance. This is likely a bug.` 3551 ); 3552 } 3553 let awaitable = getAwaitable(); 3554 unsetCurrentInstance(); 3555 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(awaitable)) { 3556 awaitable = awaitable.catch((e) => { 3557 setCurrentInstance(ctx); 3558 throw e; 3559 }); 3560 } 3561 return [awaitable, () => setCurrentInstance(ctx)]; 3562} 3563 3564function createDuplicateChecker() { 3565 const cache = /* @__PURE__ */ Object.create(null); 3566 return (type, key) => { 3567 if (cache[key]) { 3568 warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); 3569 } else { 3570 cache[key] = type; 3571 } 3572 }; 3573} 3574let shouldCacheAccess = true; 3575function applyOptions(instance) { 3576 const options = resolveMergedOptions(instance); 3577 const publicThis = instance.proxy; 3578 const ctx = instance.ctx; 3579 shouldCacheAccess = false; 3580 if (options.beforeCreate) { 3581 callHook(options.beforeCreate, instance, "bc"); 3582 } 3583 const { 3584 // state 3585 data: dataOptions, 3586 computed: computedOptions, 3587 methods, 3588 watch: watchOptions, 3589 provide: provideOptions, 3590 inject: injectOptions, 3591 // lifecycle 3592 created, 3593 beforeMount, 3594 mounted, 3595 beforeUpdate, 3596 updated, 3597 activated, 3598 deactivated, 3599 beforeDestroy, 3600 beforeUnmount, 3601 destroyed, 3602 unmounted, 3603 render, 3604 renderTracked, 3605 renderTriggered, 3606 errorCaptured, 3607 serverPrefetch, 3608 // public API 3609 expose, 3610 inheritAttrs, 3611 // assets 3612 components, 3613 directives, 3614 filters 3615 } = options; 3616 const checkDuplicateProperties = true ? createDuplicateChecker() : 0; 3617 if (true) { 3618 const [propsOptions] = instance.propsOptions; 3619 if (propsOptions) { 3620 for (const key in propsOptions) { 3621 checkDuplicateProperties("Props" /* PROPS */, key); 3622 } 3623 } 3624 } 3625 if (injectOptions) { 3626 resolveInjections(injectOptions, ctx, checkDuplicateProperties); 3627 } 3628 if (methods) { 3629 for (const key in methods) { 3630 const methodHandler = methods[key]; 3631 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(methodHandler)) { 3632 if (true) { 3633 Object.defineProperty(ctx, key, { 3634 value: methodHandler.bind(publicThis), 3635 configurable: true, 3636 enumerable: true, 3637 writable: true 3638 }); 3639 } else {} 3640 if (true) { 3641 checkDuplicateProperties("Methods" /* METHODS */, key); 3642 } 3643 } else if (true) { 3644 warn$1( 3645 `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` 3646 ); 3647 } 3648 } 3649 } 3650 if (dataOptions) { 3651 if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dataOptions)) { 3652 warn$1( 3653 `The data option must be a function. Plain object usage is no longer supported.` 3654 ); 3655 } 3656 const data = dataOptions.call(publicThis, publicThis); 3657 if ( true && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(data)) { 3658 warn$1( 3659 `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` 3660 ); 3661 } 3662 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(data)) { 3663 true && warn$1(`data() should return an object.`); 3664 } else { 3665 instance.data = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive)(data); 3666 if (true) { 3667 for (const key in data) { 3668 checkDuplicateProperties("Data" /* DATA */, key); 3669 if (!isReservedPrefix(key[0])) { 3670 Object.defineProperty(ctx, key, { 3671 configurable: true, 3672 enumerable: true, 3673 get: () => data[key], 3674 set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP 3675 }); 3676 } 3677 } 3678 } 3679 } 3680 } 3681 shouldCacheAccess = true; 3682 if (computedOptions) { 3683 for (const key in computedOptions) { 3684 const opt = computedOptions[key]; 3685 const get = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) ? opt.bind(publicThis, publicThis) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.get) ? opt.get.bind(publicThis, publicThis) : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 3686 if ( true && get === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) { 3687 warn$1(`Computed property "${key}" has no getter.`); 3688 } 3689 const set = !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.set) ? opt.set.bind(publicThis) : true ? () => { 3690 warn$1( 3691 `Write operation failed: computed property "${key}" is readonly.` 3692 ); 3693 } : 0; 3694 const c = computed({ 3695 get, 3696 set 3697 }); 3698 Object.defineProperty(ctx, key, { 3699 enumerable: true, 3700 configurable: true, 3701 get: () => c.value, 3702 set: (v) => c.value = v 3703 }); 3704 if (true) { 3705 checkDuplicateProperties("Computed" /* COMPUTED */, key); 3706 } 3707 } 3708 } 3709 if (watchOptions) { 3710 for (const key in watchOptions) { 3711 createWatcher(watchOptions[key], ctx, publicThis, key); 3712 } 3713 } 3714 if (provideOptions) { 3715 const provides = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(provideOptions) ? provideOptions.call(publicThis) : provideOptions; 3716 Reflect.ownKeys(provides).forEach((key) => { 3717 provide(key, provides[key]); 3718 }); 3719 } 3720 if (created) { 3721 callHook(created, instance, "c"); 3722 } 3723 function registerLifecycleHook(register, hook) { 3724 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) { 3725 hook.forEach((_hook) => register(_hook.bind(publicThis))); 3726 } else if (hook) { 3727 register(hook.bind(publicThis)); 3728 } 3729 } 3730 registerLifecycleHook(onBeforeMount, beforeMount); 3731 registerLifecycleHook(onMounted, mounted); 3732 registerLifecycleHook(onBeforeUpdate, beforeUpdate); 3733 registerLifecycleHook(onUpdated, updated); 3734 registerLifecycleHook(onActivated, activated); 3735 registerLifecycleHook(onDeactivated, deactivated); 3736 registerLifecycleHook(onErrorCaptured, errorCaptured); 3737 registerLifecycleHook(onRenderTracked, renderTracked); 3738 registerLifecycleHook(onRenderTriggered, renderTriggered); 3739 registerLifecycleHook(onBeforeUnmount, beforeUnmount); 3740 registerLifecycleHook(onUnmounted, unmounted); 3741 registerLifecycleHook(onServerPrefetch, serverPrefetch); 3742 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(expose)) { 3743 if (expose.length) { 3744 const exposed = instance.exposed || (instance.exposed = {}); 3745 expose.forEach((key) => { 3746 Object.defineProperty(exposed, key, { 3747 get: () => publicThis[key], 3748 set: (val) => publicThis[key] = val 3749 }); 3750 }); 3751 } else if (!instance.exposed) { 3752 instance.exposed = {}; 3753 } 3754 } 3755 if (render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) { 3756 instance.render = render; 3757 } 3758 if (inheritAttrs != null) { 3759 instance.inheritAttrs = inheritAttrs; 3760 } 3761 if (components) instance.components = components; 3762 if (directives) instance.directives = directives; 3763} 3764function resolveInjections(injectOptions, ctx, checkDuplicateProperties = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) { 3765 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(injectOptions)) { 3766 injectOptions = normalizeInject(injectOptions); 3767 } 3768 for (const key in injectOptions) { 3769 const opt = injectOptions[key]; 3770 let injected; 3771 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opt)) { 3772 if ("default" in opt) { 3773 injected = inject( 3774 opt.from || key, 3775 opt.default, 3776 true 3777 ); 3778 } else { 3779 injected = inject(opt.from || key); 3780 } 3781 } else { 3782 injected = inject(opt); 3783 } 3784 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(injected)) { 3785 Object.defineProperty(ctx, key, { 3786 enumerable: true, 3787 configurable: true, 3788 get: () => injected.value, 3789 set: (v) => injected.value = v 3790 }); 3791 } else { 3792 ctx[key] = injected; 3793 } 3794 if (true) { 3795 checkDuplicateProperties("Inject" /* INJECT */, key); 3796 } 3797 } 3798} 3799function callHook(hook, instance, type) { 3800 callWithAsyncErrorHandling( 3801 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), 3802 instance, 3803 type 3804 ); 3805} 3806function createWatcher(raw, ctx, publicThis, key) { 3807 const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; 3808 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw)) { 3809 const handler = ctx[raw]; 3810 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) { 3811 watch(getter, handler); 3812 } else if (true) { 3813 warn$1(`Invalid watch handler specified by key "${raw}"`, handler); 3814 } 3815 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw)) { 3816 watch(getter, raw.bind(publicThis)); 3817 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) { 3818 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) { 3819 raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); 3820 } else { 3821 const handler = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; 3822 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) { 3823 watch(getter, handler, raw); 3824 } else if (true) { 3825 warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); 3826 } 3827 } 3828 } else if (true) { 3829 warn$1(`Invalid watch option: "${key}"`, raw); 3830 } 3831} 3832function resolveMergedOptions(instance) { 3833 const base = instance.type; 3834 const { mixins, extends: extendsOptions } = base; 3835 const { 3836 mixins: globalMixins, 3837 optionsCache: cache, 3838 config: { optionMergeStrategies } 3839 } = instance.appContext; 3840 const cached = cache.get(base); 3841 let resolved; 3842 if (cached) { 3843 resolved = cached; 3844 } else if (!globalMixins.length && !mixins && !extendsOptions) { 3845 { 3846 resolved = base; 3847 } 3848 } else { 3849 resolved = {}; 3850 if (globalMixins.length) { 3851 globalMixins.forEach( 3852 (m) => mergeOptions(resolved, m, optionMergeStrategies, true) 3853 ); 3854 } 3855 mergeOptions(resolved, base, optionMergeStrategies); 3856 } 3857 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(base)) { 3858 cache.set(base, resolved); 3859 } 3860 return resolved; 3861} 3862function mergeOptions(to, from, strats, asMixin = false) { 3863 const { mixins, extends: extendsOptions } = from; 3864 if (extendsOptions) { 3865 mergeOptions(to, extendsOptions, strats, true); 3866 } 3867 if (mixins) { 3868 mixins.forEach( 3869 (m) => mergeOptions(to, m, strats, true) 3870 ); 3871 } 3872 for (const key in from) { 3873 if (asMixin && key === "expose") { 3874 true && warn$1( 3875 `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` 3876 ); 3877 } else { 3878 const strat = internalOptionMergeStrats[key] || strats && strats[key]; 3879 to[key] = strat ? strat(to[key], from[key]) : from[key]; 3880 } 3881 } 3882 return to; 3883} 3884const internalOptionMergeStrats = { 3885 data: mergeDataFn, 3886 props: mergeEmitsOrPropsOptions, 3887 emits: mergeEmitsOrPropsOptions, 3888 // objects 3889 methods: mergeObjectOptions, 3890 computed: mergeObjectOptions, 3891 // lifecycle 3892 beforeCreate: mergeAsArray, 3893 created: mergeAsArray, 3894 beforeMount: mergeAsArray, 3895 mounted: mergeAsArray, 3896 beforeUpdate: mergeAsArray, 3897 updated: mergeAsArray, 3898 beforeDestroy: mergeAsArray, 3899 beforeUnmount: mergeAsArray, 3900 destroyed: mergeAsArray, 3901 unmounted: mergeAsArray, 3902 activated: mergeAsArray, 3903 deactivated: mergeAsArray, 3904 errorCaptured: mergeAsArray, 3905 serverPrefetch: mergeAsArray, 3906 // assets 3907 components: mergeObjectOptions, 3908 directives: mergeObjectOptions, 3909 // watch 3910 watch: mergeWatchOptions, 3911 // provide / inject 3912 provide: mergeDataFn, 3913 inject: mergeInject 3914}; 3915function mergeDataFn(to, from) { 3916 if (!from) { 3917 return to; 3918 } 3919 if (!to) { 3920 return from; 3921 } 3922 return function mergedDataFn() { 3923 return ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend))( 3924 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(to) ? to.call(this, this) : to, 3925 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(from) ? from.call(this, this) : from 3926 ); 3927 }; 3928} 3929function mergeInject(to, from) { 3930 return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); 3931} 3932function normalizeInject(raw) { 3933 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) { 3934 const res = {}; 3935 for (let i = 0; i < raw.length; i++) { 3936 res[raw[i]] = raw[i]; 3937 } 3938 return res; 3939 } 3940 return raw; 3941} 3942function mergeAsArray(to, from) { 3943 return to ? [...new Set([].concat(to, from))] : from; 3944} 3945function mergeObjectOptions(to, from) { 3946 return to ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), to, from) : from; 3947} 3948function mergeEmitsOrPropsOptions(to, from) { 3949 if (to) { 3950 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(to) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(from)) { 3951 return [.../* @__PURE__ */ new Set([...to, ...from])]; 3952 } 3953 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)( 3954 /* @__PURE__ */ Object.create(null), 3955 normalizePropsOrEmits(to), 3956 normalizePropsOrEmits(from != null ? from : {}) 3957 ); 3958 } else { 3959 return from; 3960 } 3961} 3962function mergeWatchOptions(to, from) { 3963 if (!to) return from; 3964 if (!from) return to; 3965 const merged = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), to); 3966 for (const key in from) { 3967 merged[key] = mergeAsArray(to[key], from[key]); 3968 } 3969 return merged; 3970} 3971 3972function createAppContext() { 3973 return { 3974 app: null, 3975 config: { 3976 isNativeTag: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NO, 3977 performance: false, 3978 globalProperties: {}, 3979 optionMergeStrategies: {}, 3980 errorHandler: void 0, 3981 warnHandler: void 0, 3982 compilerOptions: {} 3983 }, 3984 mixins: [], 3985 components: {}, 3986 directives: {}, 3987 provides: /* @__PURE__ */ Object.create(null), 3988 optionsCache: /* @__PURE__ */ new WeakMap(), 3989 propsCache: /* @__PURE__ */ new WeakMap(), 3990 emitsCache: /* @__PURE__ */ new WeakMap() 3991 }; 3992} 3993let uid$1 = 0; 3994function createAppAPI(render, hydrate) { 3995 return function createApp(rootComponent, rootProps = null) { 3996 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(rootComponent)) { 3997 rootComponent = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, rootComponent); 3998 } 3999 if (rootProps != null && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(rootProps)) { 4000 true && warn$1(`root props passed to app.mount() must be an object.`); 4001 rootProps = null; 4002 } 4003 const context = createAppContext(); 4004 const installedPlugins = /* @__PURE__ */ new WeakSet(); 4005 let isMounted = false; 4006 const app = context.app = { 4007 _uid: uid$1++, 4008 _component: rootComponent, 4009 _props: rootProps, 4010 _container: null, 4011 _context: context, 4012 _instance: null, 4013 version, 4014 get config() { 4015 return context.config; 4016 }, 4017 set config(v) { 4018 if (true) { 4019 warn$1( 4020 `app.config cannot be replaced. Modify individual options instead.` 4021 ); 4022 } 4023 }, 4024 use(plugin, ...options) { 4025 if (installedPlugins.has(plugin)) { 4026 true && warn$1(`Plugin has already been applied to target app.`); 4027 } else if (plugin && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin.install)) { 4028 installedPlugins.add(plugin); 4029 plugin.install(app, ...options); 4030 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin)) { 4031 installedPlugins.add(plugin); 4032 plugin(app, ...options); 4033 } else if (true) { 4034 warn$1( 4035 `A plugin must either be a function or an object with an "install" function.` 4036 ); 4037 } 4038 return app; 4039 }, 4040 mixin(mixin) { 4041 if (false) {} else if (true) { 4042 warn$1("Mixins are only available in builds supporting Options API"); 4043 } 4044 return app; 4045 }, 4046 component(name, component) { 4047 if (true) { 4048 validateComponentName(name, context.config); 4049 } 4050 if (!component) { 4051 return context.components[name]; 4052 } 4053 if ( true && context.components[name]) { 4054 warn$1(`Component "${name}" has already been registered in target app.`); 4055 } 4056 context.components[name] = component; 4057 return app; 4058 }, 4059 directive(name, directive) { 4060 if (true) { 4061 validateDirectiveName(name); 4062 } 4063 if (!directive) { 4064 return context.directives[name]; 4065 } 4066 if ( true && context.directives[name]) { 4067 warn$1(`Directive "${name}" has already been registered in target app.`); 4068 } 4069 context.directives[name] = directive; 4070 return app; 4071 }, 4072 mount(rootContainer, isHydrate, namespace) { 4073 if (!isMounted) { 4074 if ( true && rootContainer.__vue_app__) { 4075 warn$1( 4076 `There is already an app instance mounted on the host container. 4077 If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` 4078 ); 4079 } 4080 const vnode = createVNode(rootComponent, rootProps); 4081 vnode.appContext = context; 4082 if (namespace === true) { 4083 namespace = "svg"; 4084 } else if (namespace === false) { 4085 namespace = void 0; 4086 } 4087 if (true) { 4088 context.reload = () => { 4089 render( 4090 cloneVNode(vnode), 4091 rootContainer, 4092 namespace 4093 ); 4094 }; 4095 } 4096 if (isHydrate && hydrate) { 4097 hydrate(vnode, rootContainer); 4098 } else { 4099 render(vnode, rootContainer, namespace); 4100 } 4101 isMounted = true; 4102 app._container = rootContainer; 4103 rootContainer.__vue_app__ = app; 4104 if (true) { 4105 app._instance = vnode.component; 4106 devtoolsInitApp(app, version); 4107 } 4108 return getComponentPublicInstance(vnode.component); 4109 } else if (true) { 4110 warn$1( 4111 `App has already been mounted. 4112If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` 4113 ); 4114 } 4115 }, 4116 unmount() { 4117 if (isMounted) { 4118 render(null, app._container); 4119 if (true) { 4120 app._instance = null; 4121 devtoolsUnmountApp(app); 4122 } 4123 delete app._container.__vue_app__; 4124 } else if (true) { 4125 warn$1(`Cannot unmount an app that is not mounted.`); 4126 } 4127 }, 4128 provide(key, value) { 4129 if ( true && key in context.provides) { 4130 warn$1( 4131 `App already provides property with key "${String(key)}". It will be overwritten with the new value.` 4132 ); 4133 } 4134 context.provides[key] = value; 4135 return app; 4136 }, 4137 runWithContext(fn) { 4138 const lastApp = currentApp; 4139 currentApp = app; 4140 try { 4141 return fn(); 4142 } finally { 4143 currentApp = lastApp; 4144 } 4145 } 4146 }; 4147 return app; 4148 }; 4149} 4150let currentApp = null; 4151 4152function provide(key, value) { 4153 if (!currentInstance) { 4154 if (true) { 4155 warn$1(`provide() can only be used inside setup().`); 4156 } 4157 } else { 4158 let provides = currentInstance.provides; 4159 const parentProvides = currentInstance.parent && currentInstance.parent.provides; 4160 if (parentProvides === provides) { 4161 provides = currentInstance.provides = Object.create(parentProvides); 4162 } 4163 provides[key] = value; 4164 } 4165} 4166function inject(key, defaultValue, treatDefaultAsFactory = false) { 4167 const instance = currentInstance || currentRenderingInstance; 4168 if (instance || currentApp) { 4169 const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; 4170 if (provides && key in provides) { 4171 return provides[key]; 4172 } else if (arguments.length > 1) { 4173 return treatDefaultAsFactory && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; 4174 } else if (true) { 4175 warn$1(`injection "${String(key)}" not found.`); 4176 } 4177 } else if (true) { 4178 warn$1(`inject() can only be used inside setup() or functional components.`); 4179 } 4180} 4181function hasInjectionContext() { 4182 return !!(currentInstance || currentRenderingInstance || currentApp); 4183} 4184 4185const internalObjectProto = {}; 4186const createInternalObject = () => Object.create(internalObjectProto); 4187const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; 4188 4189function initProps(instance, rawProps, isStateful, isSSR = false) { 4190 const props = {}; 4191 const attrs = createInternalObject(); 4192 instance.propsDefaults = /* @__PURE__ */ Object.create(null); 4193 setFullProps(instance, rawProps, props, attrs); 4194 for (const key in instance.propsOptions[0]) { 4195 if (!(key in props)) { 4196 props[key] = void 0; 4197 } 4198 } 4199 if (true) { 4200 validateProps(rawProps || {}, props, instance); 4201 } 4202 if (isStateful) { 4203 instance.props = isSSR ? props : (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive)(props); 4204 } else { 4205 if (!instance.type.props) { 4206 instance.props = attrs; 4207 } else { 4208 instance.props = props; 4209 } 4210 } 4211 instance.attrs = attrs; 4212} 4213function isInHmrContext(instance) { 4214 while (instance) { 4215 if (instance.type.__hmrId) return true; 4216 instance = instance.parent; 4217 } 4218} 4219function updateProps(instance, rawProps, rawPrevProps, optimized) { 4220 const { 4221 props, 4222 attrs, 4223 vnode: { patchFlag } 4224 } = instance; 4225 const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props); 4226 const [options] = instance.propsOptions; 4227 let hasAttrsChanged = false; 4228 if ( 4229 // always force full diff in dev 4230 // - #1942 if hmr is enabled with sfc component 4231 // - vite#872 non-sfc component used by sfc component 4232 !( true && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16) 4233 ) { 4234 if (patchFlag & 8) { 4235 const propsToUpdate = instance.vnode.dynamicProps; 4236 for (let i = 0; i < propsToUpdate.length; i++) { 4237 let key = propsToUpdate[i]; 4238 if (isEmitListener(instance.emitsOptions, key)) { 4239 continue; 4240 } 4241 const value = rawProps[key]; 4242 if (options) { 4243 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(attrs, key)) { 4244 if (value !== attrs[key]) { 4245 attrs[key] = value; 4246 hasAttrsChanged = true; 4247 } 4248 } else { 4249 const camelizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key); 4250 props[camelizedKey] = resolvePropValue( 4251 options, 4252 rawCurrentProps, 4253 camelizedKey, 4254 value, 4255 instance, 4256 false 4257 ); 4258 } 4259 } else { 4260 if (value !== attrs[key]) { 4261 attrs[key] = value; 4262 hasAttrsChanged = true; 4263 } 4264 } 4265 } 4266 } 4267 } else { 4268 if (setFullProps(instance, rawProps, props, attrs)) { 4269 hasAttrsChanged = true; 4270 } 4271 let kebabKey; 4272 for (const key in rawCurrentProps) { 4273 if (!rawProps || // for camelCase 4274 !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && // it's possible the original props was passed in as kebab-case 4275 // and converted to camelCase (#955) 4276 ((kebabKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) === key || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, kebabKey))) { 4277 if (options) { 4278 if (rawPrevProps && // for camelCase 4279 (rawPrevProps[key] !== void 0 || // for kebab-case 4280 rawPrevProps[kebabKey] !== void 0)) { 4281 props[key] = resolvePropValue( 4282 options, 4283 rawCurrentProps, 4284 key, 4285 void 0, 4286 instance, 4287 true 4288 ); 4289 } 4290 } else { 4291 delete props[key]; 4292 } 4293 } 4294 } 4295 if (attrs !== rawCurrentProps) { 4296 for (const key in attrs) { 4297 if (!rawProps || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && true) { 4298 delete attrs[key]; 4299 hasAttrsChanged = true; 4300 } 4301 } 4302 } 4303 } 4304 if (hasAttrsChanged) { 4305 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.trigger)(instance.attrs, "set", ""); 4306 } 4307 if (true) { 4308 validateProps(rawProps || {}, props, instance); 4309 } 4310} 4311function setFullProps(instance, rawProps, props, attrs) { 4312 const [options, needCastKeys] = instance.propsOptions; 4313 let hasAttrsChanged = false; 4314 let rawCastValues; 4315 if (rawProps) { 4316 for (let key in rawProps) { 4317 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) { 4318 continue; 4319 } 4320 const value = rawProps[key]; 4321 let camelKey; 4322 if (options && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, camelKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key))) { 4323 if (!needCastKeys || !needCastKeys.includes(camelKey)) { 4324 props[camelKey] = value; 4325 } else { 4326 (rawCastValues || (rawCastValues = {}))[camelKey] = value; 4327 } 4328 } else if (!isEmitListener(instance.emitsOptions, key)) { 4329 if (!(key in attrs) || value !== attrs[key]) { 4330 attrs[key] = value; 4331 hasAttrsChanged = true; 4332 } 4333 } 4334 } 4335 } 4336 if (needCastKeys) { 4337 const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props); 4338 const castValues = rawCastValues || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 4339 for (let i = 0; i < needCastKeys.length; i++) { 4340 const key = needCastKeys[i]; 4341 props[key] = resolvePropValue( 4342 options, 4343 rawCurrentProps, 4344 key, 4345 castValues[key], 4346 instance, 4347 !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(castValues, key) 4348 ); 4349 } 4350 } 4351 return hasAttrsChanged; 4352} 4353function resolvePropValue(options, props, key, value, instance, isAbsent) { 4354 const opt = options[key]; 4355 if (opt != null) { 4356 const hasDefault = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(opt, "default"); 4357 if (hasDefault && value === void 0) { 4358 const defaultValue = opt.default; 4359 if (opt.type !== Function && !opt.skipFactory && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue)) { 4360 const { propsDefaults } = instance; 4361 if (key in propsDefaults) { 4362 value = propsDefaults[key]; 4363 } else { 4364 const reset = setCurrentInstance(instance); 4365 value = propsDefaults[key] = defaultValue.call( 4366 null, 4367 props 4368 ); 4369 reset(); 4370 } 4371 } else { 4372 value = defaultValue; 4373 } 4374 } 4375 if (opt[0 /* shouldCast */]) { 4376 if (isAbsent && !hasDefault) { 4377 value = false; 4378 } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key))) { 4379 value = true; 4380 } 4381 } 4382 } 4383 return value; 4384} 4385const mixinPropsCache = /* @__PURE__ */ new WeakMap(); 4386function normalizePropsOptions(comp, appContext, asMixin = false) { 4387 const cache = false ? 0 : appContext.propsCache; 4388 const cached = cache.get(comp); 4389 if (cached) { 4390 return cached; 4391 } 4392 const raw = comp.props; 4393 const normalized = {}; 4394 const needCastKeys = []; 4395 let hasExtends = false; 4396 if (false) {} 4397 if (!raw && !hasExtends) { 4398 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) { 4399 cache.set(comp, _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR); 4400 } 4401 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR; 4402 } 4403 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) { 4404 for (let i = 0; i < raw.length; i++) { 4405 if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw[i])) { 4406 warn$1(`props must be strings when using array syntax.`, raw[i]); 4407 } 4408 const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(raw[i]); 4409 if (validatePropName(normalizedKey)) { 4410 normalized[normalizedKey] = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 4411 } 4412 } 4413 } else if (raw) { 4414 if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) { 4415 warn$1(`invalid props options`, raw); 4416 } 4417 for (const key in raw) { 4418 const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key); 4419 if (validatePropName(normalizedKey)) { 4420 const opt = raw[key]; 4421 const prop = normalized[normalizedKey] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) ? { type: opt } : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, opt); 4422 const propType = prop.type; 4423 let shouldCast = false; 4424 let shouldCastTrue = true; 4425 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(propType)) { 4426 for (let index = 0; index < propType.length; ++index) { 4427 const type = propType[index]; 4428 const typeName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(type) && type.name; 4429 if (typeName === "Boolean") { 4430 shouldCast = true; 4431 break; 4432 } else if (typeName === "String") { 4433 shouldCastTrue = false; 4434 } 4435 } 4436 } else { 4437 shouldCast = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(propType) && propType.name === "Boolean"; 4438 } 4439 prop[0 /* shouldCast */] = shouldCast; 4440 prop[1 /* shouldCastTrue */] = shouldCastTrue; 4441 if (shouldCast || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(prop, "default")) { 4442 needCastKeys.push(normalizedKey); 4443 } 4444 } 4445 } 4446 } 4447 const res = [normalized, needCastKeys]; 4448 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) { 4449 cache.set(comp, res); 4450 } 4451 return res; 4452} 4453function validatePropName(key) { 4454 if (key[0] !== "$" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) { 4455 return true; 4456 } else if (true) { 4457 warn$1(`Invalid prop name: "${key}" is a reserved property.`); 4458 } 4459 return false; 4460} 4461function getType(ctor) { 4462 if (ctor === null) { 4463 return "null"; 4464 } 4465 if (typeof ctor === "function") { 4466 return ctor.name || ""; 4467 } else if (typeof ctor === "object") { 4468 const name = ctor.constructor && ctor.constructor.name; 4469 return name || ""; 4470 } 4471 return ""; 4472} 4473function validateProps(rawProps, props, instance) { 4474 const resolvedValues = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props); 4475 const options = instance.propsOptions[0]; 4476 for (const key in options) { 4477 let opt = options[key]; 4478 if (opt == null) continue; 4479 validateProp( 4480 key, 4481 resolvedValues[key], 4482 opt, 4483 true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(resolvedValues) : 0, 4484 !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) 4485 ); 4486 } 4487} 4488function validateProp(name, value, prop, props, isAbsent) { 4489 const { type, required, validator, skipCheck } = prop; 4490 if (required && isAbsent) { 4491 warn$1('Missing required prop: "' + name + '"'); 4492 return; 4493 } 4494 if (value == null && !required) { 4495 return; 4496 } 4497 if (type != null && type !== true && !skipCheck) { 4498 let isValid = false; 4499 const types = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(type) ? type : [type]; 4500 const expectedTypes = []; 4501 for (let i = 0; i < types.length && !isValid; i++) { 4502 const { valid, expectedType } = assertType(value, types[i]); 4503 expectedTypes.push(expectedType || ""); 4504 isValid = valid; 4505 } 4506 if (!isValid) { 4507 warn$1(getInvalidTypeMessage(name, value, expectedTypes)); 4508 return; 4509 } 4510 } 4511 if (validator && !validator(value, props)) { 4512 warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); 4513 } 4514} 4515const isSimpleType = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)( 4516 "String,Number,Boolean,Function,Symbol,BigInt" 4517); 4518function assertType(value, type) { 4519 let valid; 4520 const expectedType = getType(type); 4521 if (isSimpleType(expectedType)) { 4522 const t = typeof value; 4523 valid = t === expectedType.toLowerCase(); 4524 if (!valid && t === "object") { 4525 valid = value instanceof type; 4526 } 4527 } else if (expectedType === "Object") { 4528 valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value); 4529 } else if (expectedType === "Array") { 4530 valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value); 4531 } else if (expectedType === "null") { 4532 valid = value === null; 4533 } else { 4534 valid = value instanceof type; 4535 } 4536 return { 4537 valid, 4538 expectedType 4539 }; 4540} 4541function getInvalidTypeMessage(name, value, expectedTypes) { 4542 if (expectedTypes.length === 0) { 4543 return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; 4544 } 4545 let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize).join(" | ")}`; 4546 const expectedType = expectedTypes[0]; 4547 const receivedType = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toRawType)(value); 4548 const expectedValue = styleValue(value, expectedType); 4549 const receivedValue = styleValue(value, receivedType); 4550 if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { 4551 message += ` with value ${expectedValue}`; 4552 } 4553 message += `, got ${receivedType} `; 4554 if (isExplicable(receivedType)) { 4555 message += `with value ${receivedValue}.`; 4556 } 4557 return message; 4558} 4559function styleValue(value, type) { 4560 if (type === "String") { 4561 return `"${value}"`; 4562 } else if (type === "Number") { 4563 return `${Number(value)}`; 4564 } else { 4565 return `${value}`; 4566 } 4567} 4568function isExplicable(type) { 4569 const explicitTypes = ["string", "number", "boolean"]; 4570 return explicitTypes.some((elem) => type.toLowerCase() === elem); 4571} 4572function isBoolean(...args) { 4573 return args.some((elem) => elem.toLowerCase() === "boolean"); 4574} 4575 4576const isInternalKey = (key) => key[0] === "_" || key === "$stable"; 4577const normalizeSlotValue = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; 4578const normalizeSlot = (key, rawSlot, ctx) => { 4579 if (rawSlot._n) { 4580 return rawSlot; 4581 } 4582 const normalized = withCtx((...args) => { 4583 if ( true && currentInstance && (!ctx || ctx.root === currentInstance.root)) { 4584 warn$1( 4585 `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` 4586 ); 4587 } 4588 return normalizeSlotValue(rawSlot(...args)); 4589 }, ctx); 4590 normalized._c = false; 4591 return normalized; 4592}; 4593const normalizeObjectSlots = (rawSlots, slots, instance) => { 4594 const ctx = rawSlots._ctx; 4595 for (const key in rawSlots) { 4596 if (isInternalKey(key)) continue; 4597 const value = rawSlots[key]; 4598 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) { 4599 slots[key] = normalizeSlot(key, value, ctx); 4600 } else if (value != null) { 4601 if (true) { 4602 warn$1( 4603 `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` 4604 ); 4605 } 4606 const normalized = normalizeSlotValue(value); 4607 slots[key] = () => normalized; 4608 } 4609 } 4610}; 4611const normalizeVNodeSlots = (instance, children) => { 4612 if ( true && !isKeepAlive(instance.vnode) && true) { 4613 warn$1( 4614 `Non-function value encountered for default slot. Prefer function slots for better performance.` 4615 ); 4616 } 4617 const normalized = normalizeSlotValue(children); 4618 instance.slots.default = () => normalized; 4619}; 4620const assignSlots = (slots, children, optimized) => { 4621 for (const key in children) { 4622 if (optimized || key !== "_") { 4623 slots[key] = children[key]; 4624 } 4625 } 4626}; 4627const initSlots = (instance, children, optimized) => { 4628 const slots = instance.slots = createInternalObject(); 4629 if (instance.vnode.shapeFlag & 32) { 4630 const type = children._; 4631 if (type) { 4632 assignSlots(slots, children, optimized); 4633 if (optimized) { 4634 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(slots, "_", type, true); 4635 } 4636 } else { 4637 normalizeObjectSlots(children, slots); 4638 } 4639 } else if (children) { 4640 normalizeVNodeSlots(instance, children); 4641 } 4642}; 4643const updateSlots = (instance, children, optimized) => { 4644 const { vnode, slots } = instance; 4645 let needDeletionCheck = true; 4646 let deletionComparisonTarget = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 4647 if (vnode.shapeFlag & 32) { 4648 const type = children._; 4649 if (type) { 4650 if ( true && isHmrUpdating) { 4651 assignSlots(slots, children, optimized); 4652 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.trigger)(instance, "set", "$slots"); 4653 } else if (optimized && type === 1) { 4654 needDeletionCheck = false; 4655 } else { 4656 assignSlots(slots, children, optimized); 4657 } 4658 } else { 4659 needDeletionCheck = !children.$stable; 4660 normalizeObjectSlots(children, slots); 4661 } 4662 deletionComparisonTarget = children; 4663 } else if (children) { 4664 normalizeVNodeSlots(instance, children); 4665 deletionComparisonTarget = { default: 1 }; 4666 } 4667 if (needDeletionCheck) { 4668 for (const key in slots) { 4669 if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { 4670 delete slots[key]; 4671 } 4672 } 4673 } 4674}; 4675 4676function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { 4677 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(rawRef)) { 4678 rawRef.forEach( 4679 (r, i) => setRef( 4680 r, 4681 oldRawRef && ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(oldRawRef) ? oldRawRef[i] : oldRawRef), 4682 parentSuspense, 4683 vnode, 4684 isUnmount 4685 ) 4686 ); 4687 return; 4688 } 4689 if (isAsyncWrapper(vnode) && !isUnmount) { 4690 return; 4691 } 4692 const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; 4693 const value = isUnmount ? null : refValue; 4694 const { i: owner, r: ref } = rawRef; 4695 if ( true && !owner) { 4696 warn$1( 4697 `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` 4698 ); 4699 return; 4700 } 4701 const oldRef = oldRawRef && oldRawRef.r; 4702 const refs = owner.refs === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ ? owner.refs = {} : owner.refs; 4703 const setupState = owner.setupState; 4704 if (oldRef != null && oldRef !== ref) { 4705 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(oldRef)) { 4706 refs[oldRef] = null; 4707 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, oldRef)) { 4708 setupState[oldRef] = null; 4709 } 4710 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(oldRef)) { 4711 oldRef.value = null; 4712 } 4713 } 4714 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref)) { 4715 callWithErrorHandling(ref, owner, 12, [value, refs]); 4716 } else { 4717 const _isString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref); 4718 const _isRef = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref); 4719 if (_isString || _isRef) { 4720 const doSet = () => { 4721 if (rawRef.f) { 4722 const existing = _isString ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; 4723 if (isUnmount) { 4724 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(existing, refValue); 4725 } else { 4726 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing)) { 4727 if (_isString) { 4728 refs[ref] = [refValue]; 4729 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref)) { 4730 setupState[ref] = refs[ref]; 4731 } 4732 } else { 4733 ref.value = [refValue]; 4734 if (rawRef.k) refs[rawRef.k] = ref.value; 4735 } 4736 } else if (!existing.includes(refValue)) { 4737 existing.push(refValue); 4738 } 4739 } 4740 } else if (_isString) { 4741 refs[ref] = value; 4742 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref)) { 4743 setupState[ref] = value; 4744 } 4745 } else if (_isRef) { 4746 ref.value = value; 4747 if (rawRef.k) refs[rawRef.k] = value; 4748 } else if (true) { 4749 warn$1("Invalid template ref type:", ref, `(${typeof ref})`); 4750 } 4751 }; 4752 if (value) { 4753 doSet.id = -1; 4754 queuePostRenderEffect(doSet, parentSuspense); 4755 } else { 4756 doSet(); 4757 } 4758 } else if (true) { 4759 warn$1("Invalid template ref type:", ref, `(${typeof ref})`); 4760 } 4761 } 4762} 4763 4764const TeleportEndKey = Symbol("_vte"); 4765const isTeleport = (type) => type.__isTeleport; 4766const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); 4767const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; 4768const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; 4769const resolveTarget = (props, select) => { 4770 const targetSelector = props && props.to; 4771 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(targetSelector)) { 4772 if (!select) { 4773 true && warn$1( 4774 `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` 4775 ); 4776 return null; 4777 } else { 4778 const target = select(targetSelector); 4779 if ( true && !target && !isTeleportDisabled(props)) { 4780 warn$1( 4781 `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` 4782 ); 4783 } 4784 return target; 4785 } 4786 } else { 4787 if ( true && !targetSelector && !isTeleportDisabled(props)) { 4788 warn$1(`Invalid Teleport target: ${targetSelector}`); 4789 } 4790 return targetSelector; 4791 } 4792}; 4793const TeleportImpl = { 4794 name: "Teleport", 4795 __isTeleport: true, 4796 process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { 4797 const { 4798 mc: mountChildren, 4799 pc: patchChildren, 4800 pbc: patchBlockChildren, 4801 o: { insert, querySelector, createText, createComment } 4802 } = internals; 4803 const disabled = isTeleportDisabled(n2.props); 4804 let { shapeFlag, children, dynamicChildren } = n2; 4805 if ( true && isHmrUpdating) { 4806 optimized = false; 4807 dynamicChildren = null; 4808 } 4809 if (n1 == null) { 4810 const placeholder = n2.el = true ? createComment("teleport start") : 0; 4811 const mainAnchor = n2.anchor = true ? createComment("teleport end") : 0; 4812 insert(placeholder, container, anchor); 4813 insert(mainAnchor, container, anchor); 4814 const target = n2.target = resolveTarget(n2.props, querySelector); 4815 const targetAnchor = prepareAnchor(target, n2, createText, insert); 4816 if (target) { 4817 if (namespace === "svg" || isTargetSVG(target)) { 4818 namespace = "svg"; 4819 } else if (namespace === "mathml" || isTargetMathML(target)) { 4820 namespace = "mathml"; 4821 } 4822 } else if ( true && !disabled) { 4823 warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); 4824 } 4825 const mount = (container2, anchor2) => { 4826 if (shapeFlag & 16) { 4827 mountChildren( 4828 children, 4829 container2, 4830 anchor2, 4831 parentComponent, 4832 parentSuspense, 4833 namespace, 4834 slotScopeIds, 4835 optimized 4836 ); 4837 } 4838 }; 4839 if (disabled) { 4840 mount(container, mainAnchor); 4841 } else if (target) { 4842 mount(target, targetAnchor); 4843 } 4844 } else { 4845 n2.el = n1.el; 4846 n2.targetStart = n1.targetStart; 4847 const mainAnchor = n2.anchor = n1.anchor; 4848 const target = n2.target = n1.target; 4849 const targetAnchor = n2.targetAnchor = n1.targetAnchor; 4850 const wasDisabled = isTeleportDisabled(n1.props); 4851 const currentContainer = wasDisabled ? container : target; 4852 const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; 4853 if (namespace === "svg" || isTargetSVG(target)) { 4854 namespace = "svg"; 4855 } else if (namespace === "mathml" || isTargetMathML(target)) { 4856 namespace = "mathml"; 4857 } 4858 if (dynamicChildren) { 4859 patchBlockChildren( 4860 n1.dynamicChildren, 4861 dynamicChildren, 4862 currentContainer, 4863 parentComponent, 4864 parentSuspense, 4865 namespace, 4866 slotScopeIds 4867 ); 4868 traverseStaticChildren(n1, n2, true); 4869 } else if (!optimized) { 4870 patchChildren( 4871 n1, 4872 n2, 4873 currentContainer, 4874 currentAnchor, 4875 parentComponent, 4876 parentSuspense, 4877 namespace, 4878 slotScopeIds, 4879 false 4880 ); 4881 } 4882 if (disabled) { 4883 if (!wasDisabled) { 4884 moveTeleport( 4885 n2, 4886 container, 4887 mainAnchor, 4888 internals, 4889 1 4890 ); 4891 } else { 4892 if (n2.props && n1.props && n2.props.to !== n1.props.to) { 4893 n2.props.to = n1.props.to; 4894 } 4895 } 4896 } else { 4897 if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { 4898 const nextTarget = n2.target = resolveTarget( 4899 n2.props, 4900 querySelector 4901 ); 4902 if (nextTarget) { 4903 moveTeleport( 4904 n2, 4905 nextTarget, 4906 null, 4907 internals, 4908 0 4909 ); 4910 } else if (true) { 4911 warn$1( 4912 "Invalid Teleport target on update:", 4913 target, 4914 `(${typeof target})` 4915 ); 4916 } 4917 } else if (wasDisabled) { 4918 moveTeleport( 4919 n2, 4920 target, 4921 targetAnchor, 4922 internals, 4923 1 4924 ); 4925 } 4926 } 4927 } 4928 updateCssVars(n2); 4929 }, 4930 remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { 4931 const { 4932 shapeFlag, 4933 children, 4934 anchor, 4935 targetStart, 4936 targetAnchor, 4937 target, 4938 props 4939 } = vnode; 4940 if (target) { 4941 hostRemove(targetStart); 4942 hostRemove(targetAnchor); 4943 } 4944 doRemove && hostRemove(anchor); 4945 if (shapeFlag & 16) { 4946 const shouldRemove = doRemove || !isTeleportDisabled(props); 4947 for (let i = 0; i < children.length; i++) { 4948 const child = children[i]; 4949 unmount( 4950 child, 4951 parentComponent, 4952 parentSuspense, 4953 shouldRemove, 4954 !!child.dynamicChildren 4955 ); 4956 } 4957 } 4958 }, 4959 move: moveTeleport, 4960 hydrate: hydrateTeleport 4961}; 4962function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { 4963 if (moveType === 0) { 4964 insert(vnode.targetAnchor, container, parentAnchor); 4965 } 4966 const { el, anchor, shapeFlag, children, props } = vnode; 4967 const isReorder = moveType === 2; 4968 if (isReorder) { 4969 insert(el, container, parentAnchor); 4970 } 4971 if (!isReorder || isTeleportDisabled(props)) { 4972 if (shapeFlag & 16) { 4973 for (let i = 0; i < children.length; i++) { 4974 move( 4975 children[i], 4976 container, 4977 parentAnchor, 4978 2 4979 ); 4980 } 4981 } 4982 } 4983 if (isReorder) { 4984 insert(anchor, container, parentAnchor); 4985 } 4986} 4987function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { 4988 o: { nextSibling, parentNode, querySelector, insert, createText } 4989}, hydrateChildren) { 4990 const target = vnode.target = resolveTarget( 4991 vnode.props, 4992 querySelector 4993 ); 4994 if (target) { 4995 const targetNode = target._lpa || target.firstChild; 4996 if (vnode.shapeFlag & 16) { 4997 if (isTeleportDisabled(vnode.props)) { 4998 vnode.anchor = hydrateChildren( 4999 nextSibling(node), 5000 vnode, 5001 parentNode(node), 5002 parentComponent, 5003 parentSuspense, 5004 slotScopeIds, 5005 optimized 5006 ); 5007 vnode.targetStart = targetNode; 5008 vnode.targetAnchor = targetNode && nextSibling(targetNode); 5009 } else { 5010 vnode.anchor = nextSibling(node); 5011 let targetAnchor = targetNode; 5012 while (targetAnchor) { 5013 if (targetAnchor && targetAnchor.nodeType === 8) { 5014 if (targetAnchor.data === "teleport start anchor") { 5015 vnode.targetStart = targetAnchor; 5016 } else if (targetAnchor.data === "teleport anchor") { 5017 vnode.targetAnchor = targetAnchor; 5018 target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); 5019 break; 5020 } 5021 } 5022 targetAnchor = nextSibling(targetAnchor); 5023 } 5024 if (!vnode.targetAnchor) { 5025 prepareAnchor(target, vnode, createText, insert); 5026 } 5027 hydrateChildren( 5028 targetNode && nextSibling(targetNode), 5029 vnode, 5030 target, 5031 parentComponent, 5032 parentSuspense, 5033 slotScopeIds, 5034 optimized 5035 ); 5036 } 5037 } 5038 updateCssVars(vnode); 5039 } 5040 return vnode.anchor && nextSibling(vnode.anchor); 5041} 5042const Teleport = TeleportImpl; 5043function updateCssVars(vnode) { 5044 const ctx = vnode.ctx; 5045 if (ctx && ctx.ut) { 5046 let node = vnode.children[0].el; 5047 while (node && node !== vnode.targetAnchor) { 5048 if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); 5049 node = node.nextSibling; 5050 } 5051 ctx.ut(); 5052 } 5053} 5054function prepareAnchor(target, vnode, createText, insert) { 5055 const targetStart = vnode.targetStart = createText(""); 5056 const targetAnchor = vnode.targetAnchor = createText(""); 5057 targetStart[TeleportEndKey] = targetAnchor; 5058 if (target) { 5059 insert(targetStart, target); 5060 insert(targetAnchor, target); 5061 } 5062 return targetAnchor; 5063} 5064 5065let hasLoggedMismatchError = false; 5066const logMismatchError = () => { 5067 if (hasLoggedMismatchError) { 5068 return; 5069 } 5070 console.error("Hydration completed but contains mismatches."); 5071 hasLoggedMismatchError = true; 5072}; 5073const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; 5074const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); 5075const getContainerType = (container) => { 5076 if (isSVGContainer(container)) return "svg"; 5077 if (isMathMLContainer(container)) return "mathml"; 5078 return void 0; 5079}; 5080const isComment = (node) => node.nodeType === 8 /* COMMENT */; 5081function createHydrationFunctions(rendererInternals) { 5082 const { 5083 mt: mountComponent, 5084 p: patch, 5085 o: { 5086 patchProp, 5087 createText, 5088 nextSibling, 5089 parentNode, 5090 remove, 5091 insert, 5092 createComment 5093 } 5094 } = rendererInternals; 5095 const hydrate = (vnode, container) => { 5096 if (!container.hasChildNodes()) { 5097 ( true) && warn$1( 5098 `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` 5099 ); 5100 patch(null, vnode, container); 5101 flushPostFlushCbs(); 5102 container._vnode = vnode; 5103 return; 5104 } 5105 hydrateNode(container.firstChild, vnode, null, null, null); 5106 flushPostFlushCbs(); 5107 container._vnode = vnode; 5108 }; 5109 const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { 5110 optimized = optimized || !!vnode.dynamicChildren; 5111 const isFragmentStart = isComment(node) && node.data === "["; 5112 const onMismatch = () => handleMismatch( 5113 node, 5114 vnode, 5115 parentComponent, 5116 parentSuspense, 5117 slotScopeIds, 5118 isFragmentStart 5119 ); 5120 const { type, ref, shapeFlag, patchFlag } = vnode; 5121 let domType = node.nodeType; 5122 vnode.el = node; 5123 if (true) { 5124 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(node, "__vnode", vnode, true); 5125 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(node, "__vueParentComponent", parentComponent, true); 5126 } 5127 if (patchFlag === -2) { 5128 optimized = false; 5129 vnode.dynamicChildren = null; 5130 } 5131 let nextNode = null; 5132 switch (type) { 5133 case Text: 5134 if (domType !== 3 /* TEXT */) { 5135 if (vnode.children === "") { 5136 insert(vnode.el = createText(""), parentNode(node), node); 5137 nextNode = node; 5138 } else { 5139 nextNode = onMismatch(); 5140 } 5141 } else { 5142 if (node.data !== vnode.children) { 5143 ( true) && warn$1( 5144 `Hydration text mismatch in`, 5145 node.parentNode, 5146 ` 5147 - rendered on server: ${JSON.stringify( 5148 node.data 5149 )} 5150 - expected on client: ${JSON.stringify(vnode.children)}` 5151 ); 5152 logMismatchError(); 5153 node.data = vnode.children; 5154 } 5155 nextNode = nextSibling(node); 5156 } 5157 break; 5158 case Comment: 5159 if (isTemplateNode(node)) { 5160 nextNode = nextSibling(node); 5161 replaceNode( 5162 vnode.el = node.content.firstChild, 5163 node, 5164 parentComponent 5165 ); 5166 } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { 5167 nextNode = onMismatch(); 5168 } else { 5169 nextNode = nextSibling(node); 5170 } 5171 break; 5172 case Static: 5173 if (isFragmentStart) { 5174 node = nextSibling(node); 5175 domType = node.nodeType; 5176 } 5177 if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { 5178 nextNode = node; 5179 const needToAdoptContent = !vnode.children.length; 5180 for (let i = 0; i < vnode.staticCount; i++) { 5181 if (needToAdoptContent) 5182 vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; 5183 if (i === vnode.staticCount - 1) { 5184 vnode.anchor = nextNode; 5185 } 5186 nextNode = nextSibling(nextNode); 5187 } 5188 return isFragmentStart ? nextSibling(nextNode) : nextNode; 5189 } else { 5190 onMismatch(); 5191 } 5192 break; 5193 case Fragment: 5194 if (!isFragmentStart) { 5195 nextNode = onMismatch(); 5196 } else { 5197 nextNode = hydrateFragment( 5198 node, 5199 vnode, 5200 parentComponent, 5201 parentSuspense, 5202 slotScopeIds, 5203 optimized 5204 ); 5205 } 5206 break; 5207 default: 5208 if (shapeFlag & 1) { 5209 if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { 5210 nextNode = onMismatch(); 5211 } else { 5212 nextNode = hydrateElement( 5213 node, 5214 vnode, 5215 parentComponent, 5216 parentSuspense, 5217 slotScopeIds, 5218 optimized 5219 ); 5220 } 5221 } else if (shapeFlag & 6) { 5222 vnode.slotScopeIds = slotScopeIds; 5223 const container = parentNode(node); 5224 if (isFragmentStart) { 5225 nextNode = locateClosingAnchor(node); 5226 } else if (isComment(node) && node.data === "teleport start") { 5227 nextNode = locateClosingAnchor(node, node.data, "teleport end"); 5228 } else { 5229 nextNode = nextSibling(node); 5230 } 5231 mountComponent( 5232 vnode, 5233 container, 5234 null, 5235 parentComponent, 5236 parentSuspense, 5237 getContainerType(container), 5238 optimized 5239 ); 5240 if (isAsyncWrapper(vnode)) { 5241 let subTree; 5242 if (isFragmentStart) { 5243 subTree = createVNode(Fragment); 5244 subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; 5245 } else { 5246 subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); 5247 } 5248 subTree.el = node; 5249 vnode.component.subTree = subTree; 5250 } 5251 } else if (shapeFlag & 64) { 5252 if (domType !== 8 /* COMMENT */) { 5253 nextNode = onMismatch(); 5254 } else { 5255 nextNode = vnode.type.hydrate( 5256 node, 5257 vnode, 5258 parentComponent, 5259 parentSuspense, 5260 slotScopeIds, 5261 optimized, 5262 rendererInternals, 5263 hydrateChildren 5264 ); 5265 } 5266 } else if (shapeFlag & 128) { 5267 nextNode = vnode.type.hydrate( 5268 node, 5269 vnode, 5270 parentComponent, 5271 parentSuspense, 5272 getContainerType(parentNode(node)), 5273 slotScopeIds, 5274 optimized, 5275 rendererInternals, 5276 hydrateNode 5277 ); 5278 } else if (true) { 5279 warn$1("Invalid HostVNode type:", type, `(${typeof type})`); 5280 } 5281 } 5282 if (ref != null) { 5283 setRef(ref, null, parentSuspense, vnode); 5284 } 5285 return nextNode; 5286 }; 5287 const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { 5288 optimized = optimized || !!vnode.dynamicChildren; 5289 const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; 5290 const forcePatch = type === "input" || type === "option"; 5291 if (true) { 5292 if (dirs) { 5293 invokeDirectiveHook(vnode, null, parentComponent, "created"); 5294 } 5295 let needCallTransitionHooks = false; 5296 if (isTemplateNode(el)) { 5297 needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; 5298 const content = el.content.firstChild; 5299 if (needCallTransitionHooks) { 5300 transition.beforeEnter(content); 5301 } 5302 replaceNode(content, el, parentComponent); 5303 vnode.el = el = content; 5304 } 5305 if (shapeFlag & 16 && // skip if element has innerHTML / textContent 5306 !(props && (props.innerHTML || props.textContent))) { 5307 let next = hydrateChildren( 5308 el.firstChild, 5309 vnode, 5310 el, 5311 parentComponent, 5312 parentSuspense, 5313 slotScopeIds, 5314 optimized 5315 ); 5316 let hasWarned = false; 5317 while (next) { 5318 if (( true) && !hasWarned) { 5319 warn$1( 5320 `Hydration children mismatch on`, 5321 el, 5322 ` 5323Server rendered element contains more child nodes than client vdom.` 5324 ); 5325 hasWarned = true; 5326 } 5327 logMismatchError(); 5328 const cur = next; 5329 next = next.nextSibling; 5330 remove(cur); 5331 } 5332 } else if (shapeFlag & 8) { 5333 if (el.textContent !== vnode.children) { 5334 ( true) && warn$1( 5335 `Hydration text content mismatch on`, 5336 el, 5337 ` 5338 - rendered on server: ${el.textContent} 5339 - expected on client: ${vnode.children}` 5340 ); 5341 logMismatchError(); 5342 el.textContent = vnode.children; 5343 } 5344 } 5345 if (props) { 5346 if (true) { 5347 const isCustomElement = el.tagName.includes("-"); 5348 for (const key in props) { 5349 if (( true) && // #11189 skip if this node has directives that have created hooks 5350 // as it could have mutated the DOM in any possible way 5351 !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { 5352 logMismatchError(); 5353 } 5354 if (forcePatch && (key.endsWith("value") || key === "indeterminate") || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key) || // force hydrate v-bind with .prop modifiers 5355 key[0] === "." || isCustomElement) { 5356 patchProp(el, key, null, props[key], void 0, parentComponent); 5357 } 5358 } 5359 } else {} 5360 } 5361 let vnodeHooks; 5362 if (vnodeHooks = props && props.onVnodeBeforeMount) { 5363 invokeVNodeHook(vnodeHooks, parentComponent, vnode); 5364 } 5365 if (dirs) { 5366 invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); 5367 } 5368 if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { 5369 queueEffectWithSuspense(() => { 5370 vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); 5371 needCallTransitionHooks && transition.enter(el); 5372 dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); 5373 }, parentSuspense); 5374 } 5375 } 5376 return el.nextSibling; 5377 }; 5378 const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { 5379 optimized = optimized || !!parentVNode.dynamicChildren; 5380 const children = parentVNode.children; 5381 const l = children.length; 5382 let hasWarned = false; 5383 for (let i = 0; i < l; i++) { 5384 const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); 5385 const isText = vnode.type === Text; 5386 if (node) { 5387 if (isText && !optimized) { 5388 let next = children[i + 1]; 5389 if (next && (next = normalizeVNode(next)).type === Text) { 5390 insert( 5391 createText( 5392 node.data.slice(vnode.children.length) 5393 ), 5394 container, 5395 nextSibling(node) 5396 ); 5397 node.data = vnode.children; 5398 } 5399 } 5400 node = hydrateNode( 5401 node, 5402 vnode, 5403 parentComponent, 5404 parentSuspense, 5405 slotScopeIds, 5406 optimized 5407 ); 5408 } else if (isText && !vnode.children) { 5409 insert(vnode.el = createText(""), container); 5410 } else { 5411 if (( true) && !hasWarned) { 5412 warn$1( 5413 `Hydration children mismatch on`, 5414 container, 5415 ` 5416Server rendered element contains fewer child nodes than client vdom.` 5417 ); 5418 hasWarned = true; 5419 } 5420 logMismatchError(); 5421 patch( 5422 null, 5423 vnode, 5424 container, 5425 null, 5426 parentComponent, 5427 parentSuspense, 5428 getContainerType(container), 5429 slotScopeIds 5430 ); 5431 } 5432 } 5433 return node; 5434 }; 5435 const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { 5436 const { slotScopeIds: fragmentSlotScopeIds } = vnode; 5437 if (fragmentSlotScopeIds) { 5438 slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; 5439 } 5440 const container = parentNode(node); 5441 const next = hydrateChildren( 5442 nextSibling(node), 5443 vnode, 5444 container, 5445 parentComponent, 5446 parentSuspense, 5447 slotScopeIds, 5448 optimized 5449 ); 5450 if (next && isComment(next) && next.data === "]") { 5451 return nextSibling(vnode.anchor = next); 5452 } else { 5453 logMismatchError(); 5454 insert(vnode.anchor = createComment(`]`), container, next); 5455 return next; 5456 } 5457 }; 5458 const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { 5459 ( true) && warn$1( 5460 `Hydration node mismatch: 5461- rendered on server:`, 5462 node, 5463 node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, 5464 ` 5465- expected on client:`, 5466 vnode.type 5467 ); 5468 logMismatchError(); 5469 vnode.el = null; 5470 if (isFragment) { 5471 const end = locateClosingAnchor(node); 5472 while (true) { 5473 const next2 = nextSibling(node); 5474 if (next2 && next2 !== end) { 5475 remove(next2); 5476 } else { 5477 break; 5478 } 5479 } 5480 } 5481 const next = nextSibling(node); 5482 const container = parentNode(node); 5483 remove(node); 5484 patch( 5485 null, 5486 vnode, 5487 container, 5488 next, 5489 parentComponent, 5490 parentSuspense, 5491 getContainerType(container), 5492 slotScopeIds 5493 ); 5494 return next; 5495 }; 5496 const locateClosingAnchor = (node, open = "[", close = "]") => { 5497 let match = 0; 5498 while (node) { 5499 node = nextSibling(node); 5500 if (node && isComment(node)) { 5501 if (node.data === open) match++; 5502 if (node.data === close) { 5503 if (match === 0) { 5504 return nextSibling(node); 5505 } else { 5506 match--; 5507 } 5508 } 5509 } 5510 } 5511 return node; 5512 }; 5513 const replaceNode = (newNode, oldNode, parentComponent) => { 5514 const parentNode2 = oldNode.parentNode; 5515 if (parentNode2) { 5516 parentNode2.replaceChild(newNode, oldNode); 5517 } 5518 let parent = parentComponent; 5519 while (parent) { 5520 if (parent.vnode.el === oldNode) { 5521 parent.vnode.el = parent.subTree.el = newNode; 5522 } 5523 parent = parent.parent; 5524 } 5525 }; 5526 const isTemplateNode = (node) => { 5527 return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; 5528 }; 5529 return [hydrate, hydrateNode]; 5530} 5531function propHasMismatch(el, key, clientValue, vnode, instance) { 5532 let mismatchType; 5533 let mismatchKey; 5534 let actual; 5535 let expected; 5536 if (key === "class") { 5537 actual = el.getAttribute("class"); 5538 expected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(clientValue); 5539 if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { 5540 mismatchType = mismatchKey = `class`; 5541 } 5542 } else if (key === "style") { 5543 actual = el.getAttribute("style") || ""; 5544 expected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(clientValue) ? clientValue : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.stringifyStyle)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)(clientValue)); 5545 const actualMap = toStyleMap(actual); 5546 const expectedMap = toStyleMap(expected); 5547 if (vnode.dirs) { 5548 for (const { dir, value } of vnode.dirs) { 5549 if (dir.name === "show" && !value) { 5550 expectedMap.set("display", "none"); 5551 } 5552 } 5553 } 5554 if (instance) { 5555 resolveCssVars(instance, vnode, expectedMap); 5556 } 5557 if (!isMapEqual(actualMap, expectedMap)) { 5558 mismatchType = mismatchKey = "style"; 5559 } 5560 } else if (el instanceof SVGElement && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isKnownSvgAttr)(key) || el instanceof HTMLElement && ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isBooleanAttr)(key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isKnownHtmlAttr)(key))) { 5561 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isBooleanAttr)(key)) { 5562 actual = el.hasAttribute(key); 5563 expected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(clientValue); 5564 } else if (clientValue == null) { 5565 actual = el.hasAttribute(key); 5566 expected = false; 5567 } else { 5568 if (el.hasAttribute(key)) { 5569 actual = el.getAttribute(key); 5570 } else if (key === "value" && el.tagName === "TEXTAREA") { 5571 actual = el.value; 5572 } else { 5573 actual = false; 5574 } 5575 expected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isRenderableAttrValue)(clientValue) ? String(clientValue) : false; 5576 } 5577 if (actual !== expected) { 5578 mismatchType = `attribute`; 5579 mismatchKey = key; 5580 } 5581 } 5582 if (mismatchType) { 5583 const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; 5584 const preSegment = `Hydration ${mismatchType} mismatch on`; 5585 const postSegment = ` 5586 - rendered on server: ${format(actual)} 5587 - expected on client: ${format(expected)} 5588 Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. 5589 You should fix the source of the mismatch.`; 5590 { 5591 warn$1(preSegment, el, postSegment); 5592 } 5593 return true; 5594 } 5595 return false; 5596} 5597function toClassSet(str) { 5598 return new Set(str.trim().split(/\s+/)); 5599} 5600function isSetEqual(a, b) { 5601 if (a.size !== b.size) { 5602 return false; 5603 } 5604 for (const s of a) { 5605 if (!b.has(s)) { 5606 return false; 5607 } 5608 } 5609 return true; 5610} 5611function toStyleMap(str) { 5612 const styleMap = /* @__PURE__ */ new Map(); 5613 for (const item of str.split(";")) { 5614 let [key, value] = item.split(":"); 5615 key = key.trim(); 5616 value = value && value.trim(); 5617 if (key && value) { 5618 styleMap.set(key, value); 5619 } 5620 } 5621 return styleMap; 5622} 5623function isMapEqual(a, b) { 5624 if (a.size !== b.size) { 5625 return false; 5626 } 5627 for (const [key, value] of a) { 5628 if (value !== b.get(key)) { 5629 return false; 5630 } 5631 } 5632 return true; 5633} 5634function resolveCssVars(instance, vnode, expectedMap) { 5635 const root = instance.subTree; 5636 if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { 5637 const cssVars = instance.getCssVars(); 5638 for (const key in cssVars) { 5639 expectedMap.set(`--${key}`, String(cssVars[key])); 5640 } 5641 } 5642 if (vnode === root && instance.parent) { 5643 resolveCssVars(instance.parent, instance.vnode, expectedMap); 5644 } 5645} 5646 5647let supported; 5648let perf; 5649function startMeasure(instance, type) { 5650 if (instance.appContext.config.performance && isSupported()) { 5651 perf.mark(`vue-${type}-${instance.uid}`); 5652 } 5653 if (true) { 5654 devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); 5655 } 5656} 5657function endMeasure(instance, type) { 5658 if (instance.appContext.config.performance && isSupported()) { 5659 const startTag = `vue-${type}-${instance.uid}`; 5660 const endTag = startTag + `:end`; 5661 perf.mark(endTag); 5662 perf.measure( 5663 `<${formatComponentName(instance, instance.type)}> ${type}`, 5664 startTag, 5665 endTag 5666 ); 5667 perf.clearMarks(startTag); 5668 perf.clearMarks(endTag); 5669 } 5670 if (true) { 5671 devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); 5672 } 5673} 5674function isSupported() { 5675 if (supported !== void 0) { 5676 return supported; 5677 } 5678 if (typeof window !== "undefined" && window.performance) { 5679 supported = true; 5680 perf = window.performance; 5681 } else { 5682 supported = false; 5683 } 5684 return supported; 5685} 5686 5687function initFeatureFlags() { 5688 const needWarn = []; 5689 if (false) {} 5690 if (false) {} 5691 if (false) {} 5692 if ( true && needWarn.length) { 5693 const multi = needWarn.length > 1; 5694 console.warn( 5695 `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle. 5696 5697For more details, see https://link.vuejs.org/feature-flags.` 5698 ); 5699 } 5700} 5701 5702const queuePostRenderEffect = queueEffectWithSuspense ; 5703function createRenderer(options) { 5704 return baseCreateRenderer(options); 5705} 5706function createHydrationRenderer(options) { 5707 return baseCreateRenderer(options, createHydrationFunctions); 5708} 5709function baseCreateRenderer(options, createHydrationFns) { 5710 { 5711 initFeatureFlags(); 5712 } 5713 const target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)(); 5714 target.__VUE__ = true; 5715 if (true) { 5716 setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); 5717 } 5718 const { 5719 insert: hostInsert, 5720 remove: hostRemove, 5721 patchProp: hostPatchProp, 5722 createElement: hostCreateElement, 5723 createText: hostCreateText, 5724 createComment: hostCreateComment, 5725 setText: hostSetText, 5726 setElementText: hostSetElementText, 5727 parentNode: hostParentNode, 5728 nextSibling: hostNextSibling, 5729 setScopeId: hostSetScopeId = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP, 5730 insertStaticContent: hostInsertStaticContent 5731 } = options; 5732 const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = true && isHmrUpdating ? false : !!n2.dynamicChildren) => { 5733 if (n1 === n2) { 5734 return; 5735 } 5736 if (n1 && !isSameVNodeType(n1, n2)) { 5737 anchor = getNextHostNode(n1); 5738 unmount(n1, parentComponent, parentSuspense, true); 5739 n1 = null; 5740 } 5741 if (n2.patchFlag === -2) { 5742 optimized = false; 5743 n2.dynamicChildren = null; 5744 } 5745 const { type, ref, shapeFlag } = n2; 5746 switch (type) { 5747 case Text: 5748 processText(n1, n2, container, anchor); 5749 break; 5750 case Comment: 5751 processCommentNode(n1, n2, container, anchor); 5752 break; 5753 case Static: 5754 if (n1 == null) { 5755 mountStaticNode(n2, container, anchor, namespace); 5756 } else if (true) { 5757 patchStaticNode(n1, n2, container, namespace); 5758 } 5759 break; 5760 case Fragment: 5761 processFragment( 5762 n1, 5763 n2, 5764 container, 5765 anchor, 5766 parentComponent, 5767 parentSuspense, 5768 namespace, 5769 slotScopeIds, 5770 optimized 5771 ); 5772 break; 5773 default: 5774 if (shapeFlag & 1) { 5775 processElement( 5776 n1, 5777 n2, 5778 container, 5779 anchor, 5780 parentComponent, 5781 parentSuspense, 5782 namespace, 5783 slotScopeIds, 5784 optimized 5785 ); 5786 } else if (shapeFlag & 6) { 5787 processComponent( 5788 n1, 5789 n2, 5790 container, 5791 anchor, 5792 parentComponent, 5793 parentSuspense, 5794 namespace, 5795 slotScopeIds, 5796 optimized 5797 ); 5798 } else if (shapeFlag & 64) { 5799 type.process( 5800 n1, 5801 n2, 5802 container, 5803 anchor, 5804 parentComponent, 5805 parentSuspense, 5806 namespace, 5807 slotScopeIds, 5808 optimized, 5809 internals 5810 ); 5811 } else if (shapeFlag & 128) { 5812 type.process( 5813 n1, 5814 n2, 5815 container, 5816 anchor, 5817 parentComponent, 5818 parentSuspense, 5819 namespace, 5820 slotScopeIds, 5821 optimized, 5822 internals 5823 ); 5824 } else if (true) { 5825 warn$1("Invalid VNode type:", type, `(${typeof type})`); 5826 } 5827 } 5828 if (ref != null && parentComponent) { 5829 setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); 5830 } 5831 }; 5832 const processText = (n1, n2, container, anchor) => { 5833 if (n1 == null) { 5834 hostInsert( 5835 n2.el = hostCreateText(n2.children), 5836 container, 5837 anchor 5838 ); 5839 } else { 5840 const el = n2.el = n1.el; 5841 if (n2.children !== n1.children) { 5842 hostSetText(el, n2.children); 5843 } 5844 } 5845 }; 5846 const processCommentNode = (n1, n2, container, anchor) => { 5847 if (n1 == null) { 5848 hostInsert( 5849 n2.el = hostCreateComment(n2.children || ""), 5850 container, 5851 anchor 5852 ); 5853 } else { 5854 n2.el = n1.el; 5855 } 5856 }; 5857 const mountStaticNode = (n2, container, anchor, namespace) => { 5858 [n2.el, n2.anchor] = hostInsertStaticContent( 5859 n2.children, 5860 container, 5861 anchor, 5862 namespace, 5863 n2.el, 5864 n2.anchor 5865 ); 5866 }; 5867 const patchStaticNode = (n1, n2, container, namespace) => { 5868 if (n2.children !== n1.children) { 5869 const anchor = hostNextSibling(n1.anchor); 5870 removeStaticNode(n1); 5871 [n2.el, n2.anchor] = hostInsertStaticContent( 5872 n2.children, 5873 container, 5874 anchor, 5875 namespace 5876 ); 5877 } else { 5878 n2.el = n1.el; 5879 n2.anchor = n1.anchor; 5880 } 5881 }; 5882 const moveStaticNode = ({ el, anchor }, container, nextSibling) => { 5883 let next; 5884 while (el && el !== anchor) { 5885 next = hostNextSibling(el); 5886 hostInsert(el, container, nextSibling); 5887 el = next; 5888 } 5889 hostInsert(anchor, container, nextSibling); 5890 }; 5891 const removeStaticNode = ({ el, anchor }) => { 5892 let next; 5893 while (el && el !== anchor) { 5894 next = hostNextSibling(el); 5895 hostRemove(el); 5896 el = next; 5897 } 5898 hostRemove(anchor); 5899 }; 5900 const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 5901 if (n2.type === "svg") { 5902 namespace = "svg"; 5903 } else if (n2.type === "math") { 5904 namespace = "mathml"; 5905 } 5906 if (n1 == null) { 5907 mountElement( 5908 n2, 5909 container, 5910 anchor, 5911 parentComponent, 5912 parentSuspense, 5913 namespace, 5914 slotScopeIds, 5915 optimized 5916 ); 5917 } else { 5918 patchElement( 5919 n1, 5920 n2, 5921 parentComponent, 5922 parentSuspense, 5923 namespace, 5924 slotScopeIds, 5925 optimized 5926 ); 5927 } 5928 }; 5929 const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 5930 let el; 5931 let vnodeHook; 5932 const { props, shapeFlag, transition, dirs } = vnode; 5933 el = vnode.el = hostCreateElement( 5934 vnode.type, 5935 namespace, 5936 props && props.is, 5937 props 5938 ); 5939 if (shapeFlag & 8) { 5940 hostSetElementText(el, vnode.children); 5941 } else if (shapeFlag & 16) { 5942 mountChildren( 5943 vnode.children, 5944 el, 5945 null, 5946 parentComponent, 5947 parentSuspense, 5948 resolveChildrenNamespace(vnode, namespace), 5949 slotScopeIds, 5950 optimized 5951 ); 5952 } 5953 if (dirs) { 5954 invokeDirectiveHook(vnode, null, parentComponent, "created"); 5955 } 5956 setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); 5957 if (props) { 5958 for (const key in props) { 5959 if (key !== "value" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) { 5960 hostPatchProp(el, key, null, props[key], namespace, parentComponent); 5961 } 5962 } 5963 if ("value" in props) { 5964 hostPatchProp(el, "value", null, props.value, namespace); 5965 } 5966 if (vnodeHook = props.onVnodeBeforeMount) { 5967 invokeVNodeHook(vnodeHook, parentComponent, vnode); 5968 } 5969 } 5970 if (true) { 5971 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(el, "__vnode", vnode, true); 5972 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(el, "__vueParentComponent", parentComponent, true); 5973 } 5974 if (dirs) { 5975 invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); 5976 } 5977 const needCallTransitionHooks = needTransition(parentSuspense, transition); 5978 if (needCallTransitionHooks) { 5979 transition.beforeEnter(el); 5980 } 5981 hostInsert(el, container, anchor); 5982 if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { 5983 queuePostRenderEffect(() => { 5984 vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); 5985 needCallTransitionHooks && transition.enter(el); 5986 dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); 5987 }, parentSuspense); 5988 } 5989 }; 5990 const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { 5991 if (scopeId) { 5992 hostSetScopeId(el, scopeId); 5993 } 5994 if (slotScopeIds) { 5995 for (let i = 0; i < slotScopeIds.length; i++) { 5996 hostSetScopeId(el, slotScopeIds[i]); 5997 } 5998 } 5999 if (parentComponent) { 6000 let subTree = parentComponent.subTree; 6001 if ( true && subTree.patchFlag > 0 && subTree.patchFlag & 2048) { 6002 subTree = filterSingleRoot(subTree.children) || subTree; 6003 } 6004 if (vnode === subTree) { 6005 const parentVNode = parentComponent.vnode; 6006 setScopeId( 6007 el, 6008 parentVNode, 6009 parentVNode.scopeId, 6010 parentVNode.slotScopeIds, 6011 parentComponent.parent 6012 ); 6013 } 6014 } 6015 }; 6016 const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { 6017 for (let i = start; i < children.length; i++) { 6018 const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); 6019 patch( 6020 null, 6021 child, 6022 container, 6023 anchor, 6024 parentComponent, 6025 parentSuspense, 6026 namespace, 6027 slotScopeIds, 6028 optimized 6029 ); 6030 } 6031 }; 6032 const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 6033 const el = n2.el = n1.el; 6034 if (true) { 6035 el.__vnode = n2; 6036 } 6037 let { patchFlag, dynamicChildren, dirs } = n2; 6038 patchFlag |= n1.patchFlag & 16; 6039 const oldProps = n1.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 6040 const newProps = n2.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 6041 let vnodeHook; 6042 parentComponent && toggleRecurse(parentComponent, false); 6043 if (vnodeHook = newProps.onVnodeBeforeUpdate) { 6044 invokeVNodeHook(vnodeHook, parentComponent, n2, n1); 6045 } 6046 if (dirs) { 6047 invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); 6048 } 6049 parentComponent && toggleRecurse(parentComponent, true); 6050 if ( true && isHmrUpdating) { 6051 patchFlag = 0; 6052 optimized = false; 6053 dynamicChildren = null; 6054 } 6055 if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { 6056 hostSetElementText(el, ""); 6057 } 6058 if (dynamicChildren) { 6059 patchBlockChildren( 6060 n1.dynamicChildren, 6061 dynamicChildren, 6062 el, 6063 parentComponent, 6064 parentSuspense, 6065 resolveChildrenNamespace(n2, namespace), 6066 slotScopeIds 6067 ); 6068 if (true) { 6069 traverseStaticChildren(n1, n2); 6070 } 6071 } else if (!optimized) { 6072 patchChildren( 6073 n1, 6074 n2, 6075 el, 6076 null, 6077 parentComponent, 6078 parentSuspense, 6079 resolveChildrenNamespace(n2, namespace), 6080 slotScopeIds, 6081 false 6082 ); 6083 } 6084 if (patchFlag > 0) { 6085 if (patchFlag & 16) { 6086 patchProps(el, oldProps, newProps, parentComponent, namespace); 6087 } else { 6088 if (patchFlag & 2) { 6089 if (oldProps.class !== newProps.class) { 6090 hostPatchProp(el, "class", null, newProps.class, namespace); 6091 } 6092 } 6093 if (patchFlag & 4) { 6094 hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); 6095 } 6096 if (patchFlag & 8) { 6097 const propsToUpdate = n2.dynamicProps; 6098 for (let i = 0; i < propsToUpdate.length; i++) { 6099 const key = propsToUpdate[i]; 6100 const prev = oldProps[key]; 6101 const next = newProps[key]; 6102 if (next !== prev || key === "value") { 6103 hostPatchProp(el, key, prev, next, namespace, parentComponent); 6104 } 6105 } 6106 } 6107 } 6108 if (patchFlag & 1) { 6109 if (n1.children !== n2.children) { 6110 hostSetElementText(el, n2.children); 6111 } 6112 } 6113 } else if (!optimized && dynamicChildren == null) { 6114 patchProps(el, oldProps, newProps, parentComponent, namespace); 6115 } 6116 if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { 6117 queuePostRenderEffect(() => { 6118 vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); 6119 dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); 6120 }, parentSuspense); 6121 } 6122 }; 6123 const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { 6124 for (let i = 0; i < newChildren.length; i++) { 6125 const oldVNode = oldChildren[i]; 6126 const newVNode = newChildren[i]; 6127 const container = ( 6128 // oldVNode may be an errored async setup() component inside Suspense 6129 // which will not have a mounted element 6130 oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent 6131 // of the Fragment itself so it can move its children. 6132 (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement 6133 // which also requires the correct parent container 6134 !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. 6135 oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( 6136 // In other cases, the parent container is not actually used so we 6137 // just pass the block element here to avoid a DOM parentNode call. 6138 fallbackContainer 6139 ) 6140 ); 6141 patch( 6142 oldVNode, 6143 newVNode, 6144 container, 6145 null, 6146 parentComponent, 6147 parentSuspense, 6148 namespace, 6149 slotScopeIds, 6150 true 6151 ); 6152 } 6153 }; 6154 const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { 6155 if (oldProps !== newProps) { 6156 if (oldProps !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) { 6157 for (const key in oldProps) { 6158 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key) && !(key in newProps)) { 6159 hostPatchProp( 6160 el, 6161 key, 6162 oldProps[key], 6163 null, 6164 namespace, 6165 parentComponent 6166 ); 6167 } 6168 } 6169 } 6170 for (const key in newProps) { 6171 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) continue; 6172 const next = newProps[key]; 6173 const prev = oldProps[key]; 6174 if (next !== prev && key !== "value") { 6175 hostPatchProp(el, key, prev, next, namespace, parentComponent); 6176 } 6177 } 6178 if ("value" in newProps) { 6179 hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); 6180 } 6181 } 6182 }; 6183 const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 6184 const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); 6185 const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); 6186 let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; 6187 if ( true && // #5523 dev root fragment may inherit directives 6188 (isHmrUpdating || patchFlag & 2048)) { 6189 patchFlag = 0; 6190 optimized = false; 6191 dynamicChildren = null; 6192 } 6193 if (fragmentSlotScopeIds) { 6194 slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; 6195 } 6196 if (n1 == null) { 6197 hostInsert(fragmentStartAnchor, container, anchor); 6198 hostInsert(fragmentEndAnchor, container, anchor); 6199 mountChildren( 6200 // #10007 6201 // such fragment like `<></>` will be compiled into 6202 // a fragment which doesn't have a children. 6203 // In this case fallback to an empty array 6204 n2.children || [], 6205 container, 6206 fragmentEndAnchor, 6207 parentComponent, 6208 parentSuspense, 6209 namespace, 6210 slotScopeIds, 6211 optimized 6212 ); 6213 } else { 6214 if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result 6215 // of renderSlot() with no valid children 6216 n1.dynamicChildren) { 6217 patchBlockChildren( 6218 n1.dynamicChildren, 6219 dynamicChildren, 6220 container, 6221 parentComponent, 6222 parentSuspense, 6223 namespace, 6224 slotScopeIds 6225 ); 6226 if (true) { 6227 traverseStaticChildren(n1, n2); 6228 } else {} 6229 } else { 6230 patchChildren( 6231 n1, 6232 n2, 6233 container, 6234 fragmentEndAnchor, 6235 parentComponent, 6236 parentSuspense, 6237 namespace, 6238 slotScopeIds, 6239 optimized 6240 ); 6241 } 6242 } 6243 }; 6244 const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 6245 n2.slotScopeIds = slotScopeIds; 6246 if (n1 == null) { 6247 if (n2.shapeFlag & 512) { 6248 parentComponent.ctx.activate( 6249 n2, 6250 container, 6251 anchor, 6252 namespace, 6253 optimized 6254 ); 6255 } else { 6256 mountComponent( 6257 n2, 6258 container, 6259 anchor, 6260 parentComponent, 6261 parentSuspense, 6262 namespace, 6263 optimized 6264 ); 6265 } 6266 } else { 6267 updateComponent(n1, n2, optimized); 6268 } 6269 }; 6270 const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { 6271 const instance = (initialVNode.component = createComponentInstance( 6272 initialVNode, 6273 parentComponent, 6274 parentSuspense 6275 )); 6276 if ( true && instance.type.__hmrId) { 6277 registerHMR(instance); 6278 } 6279 if (true) { 6280 pushWarningContext(initialVNode); 6281 startMeasure(instance, `mount`); 6282 } 6283 if (isKeepAlive(initialVNode)) { 6284 instance.ctx.renderer = internals; 6285 } 6286 { 6287 if (true) { 6288 startMeasure(instance, `init`); 6289 } 6290 setupComponent(instance, false, optimized); 6291 if (true) { 6292 endMeasure(instance, `init`); 6293 } 6294 } 6295 if (instance.asyncDep) { 6296 parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); 6297 if (!initialVNode.el) { 6298 const placeholder = instance.subTree = createVNode(Comment); 6299 processCommentNode(null, placeholder, container, anchor); 6300 } 6301 } else { 6302 setupRenderEffect( 6303 instance, 6304 initialVNode, 6305 container, 6306 anchor, 6307 parentSuspense, 6308 namespace, 6309 optimized 6310 ); 6311 } 6312 if (true) { 6313 popWarningContext(); 6314 endMeasure(instance, `mount`); 6315 } 6316 }; 6317 const updateComponent = (n1, n2, optimized) => { 6318 const instance = n2.component = n1.component; 6319 if (shouldUpdateComponent(n1, n2, optimized)) { 6320 if (instance.asyncDep && !instance.asyncResolved) { 6321 if (true) { 6322 pushWarningContext(n2); 6323 } 6324 updateComponentPreRender(instance, n2, optimized); 6325 if (true) { 6326 popWarningContext(); 6327 } 6328 return; 6329 } else { 6330 instance.next = n2; 6331 invalidateJob(instance.update); 6332 instance.effect.dirty = true; 6333 instance.update(); 6334 } 6335 } else { 6336 n2.el = n1.el; 6337 instance.vnode = n2; 6338 } 6339 }; 6340 const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { 6341 const componentUpdateFn = () => { 6342 if (!instance.isMounted) { 6343 let vnodeHook; 6344 const { el, props } = initialVNode; 6345 const { bm, m, parent } = instance; 6346 const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); 6347 toggleRecurse(instance, false); 6348 if (bm) { 6349 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bm); 6350 } 6351 if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { 6352 invokeVNodeHook(vnodeHook, parent, initialVNode); 6353 } 6354 toggleRecurse(instance, true); 6355 if (el && hydrateNode) { 6356 const hydrateSubTree = () => { 6357 if (true) { 6358 startMeasure(instance, `render`); 6359 } 6360 instance.subTree = renderComponentRoot(instance); 6361 if (true) { 6362 endMeasure(instance, `render`); 6363 } 6364 if (true) { 6365 startMeasure(instance, `hydrate`); 6366 } 6367 hydrateNode( 6368 el, 6369 instance.subTree, 6370 instance, 6371 parentSuspense, 6372 null 6373 ); 6374 if (true) { 6375 endMeasure(instance, `hydrate`); 6376 } 6377 }; 6378 if (isAsyncWrapperVNode) { 6379 initialVNode.type.__asyncLoader().then( 6380 // note: we are moving the render call into an async callback, 6381 // which means it won't track dependencies - but it's ok because 6382 // a server-rendered async wrapper is already in resolved state 6383 // and it will never need to change. 6384 () => !instance.isUnmounted && hydrateSubTree() 6385 ); 6386 } else { 6387 hydrateSubTree(); 6388 } 6389 } else { 6390 if (true) { 6391 startMeasure(instance, `render`); 6392 } 6393 const subTree = instance.subTree = renderComponentRoot(instance); 6394 if (true) { 6395 endMeasure(instance, `render`); 6396 } 6397 if (true) { 6398 startMeasure(instance, `patch`); 6399 } 6400 patch( 6401 null, 6402 subTree, 6403 container, 6404 anchor, 6405 instance, 6406 parentSuspense, 6407 namespace 6408 ); 6409 if (true) { 6410 endMeasure(instance, `patch`); 6411 } 6412 initialVNode.el = subTree.el; 6413 } 6414 if (m) { 6415 queuePostRenderEffect(m, parentSuspense); 6416 } 6417 if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { 6418 const scopedInitialVNode = initialVNode; 6419 queuePostRenderEffect( 6420 () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), 6421 parentSuspense 6422 ); 6423 } 6424 if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { 6425 instance.a && queuePostRenderEffect(instance.a, parentSuspense); 6426 } 6427 instance.isMounted = true; 6428 if (true) { 6429 devtoolsComponentAdded(instance); 6430 } 6431 initialVNode = container = anchor = null; 6432 } else { 6433 let { next, bu, u, parent, vnode } = instance; 6434 { 6435 const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); 6436 if (nonHydratedAsyncRoot) { 6437 if (next) { 6438 next.el = vnode.el; 6439 updateComponentPreRender(instance, next, optimized); 6440 } 6441 nonHydratedAsyncRoot.asyncDep.then(() => { 6442 if (!instance.isUnmounted) { 6443 componentUpdateFn(); 6444 } 6445 }); 6446 return; 6447 } 6448 } 6449 let originNext = next; 6450 let vnodeHook; 6451 if (true) { 6452 pushWarningContext(next || instance.vnode); 6453 } 6454 toggleRecurse(instance, false); 6455 if (next) { 6456 next.el = vnode.el; 6457 updateComponentPreRender(instance, next, optimized); 6458 } else { 6459 next = vnode; 6460 } 6461 if (bu) { 6462 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bu); 6463 } 6464 if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { 6465 invokeVNodeHook(vnodeHook, parent, next, vnode); 6466 } 6467 toggleRecurse(instance, true); 6468 if (true) { 6469 startMeasure(instance, `render`); 6470 } 6471 const nextTree = renderComponentRoot(instance); 6472 if (true) { 6473 endMeasure(instance, `render`); 6474 } 6475 const prevTree = instance.subTree; 6476 instance.subTree = nextTree; 6477 if (true) { 6478 startMeasure(instance, `patch`); 6479 } 6480 patch( 6481 prevTree, 6482 nextTree, 6483 // parent may have changed if it's in a teleport 6484 hostParentNode(prevTree.el), 6485 // anchor may have changed if it's in a fragment 6486 getNextHostNode(prevTree), 6487 instance, 6488 parentSuspense, 6489 namespace 6490 ); 6491 if (true) { 6492 endMeasure(instance, `patch`); 6493 } 6494 next.el = nextTree.el; 6495 if (originNext === null) { 6496 updateHOCHostEl(instance, nextTree.el); 6497 } 6498 if (u) { 6499 queuePostRenderEffect(u, parentSuspense); 6500 } 6501 if (vnodeHook = next.props && next.props.onVnodeUpdated) { 6502 queuePostRenderEffect( 6503 () => invokeVNodeHook(vnodeHook, parent, next, vnode), 6504 parentSuspense 6505 ); 6506 } 6507 if (true) { 6508 devtoolsComponentUpdated(instance); 6509 } 6510 if (true) { 6511 popWarningContext(); 6512 } 6513 } 6514 }; 6515 const effect = instance.effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect( 6516 componentUpdateFn, 6517 _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP, 6518 () => queueJob(update), 6519 instance.scope 6520 // track it in component's effect scope 6521 ); 6522 const update = instance.update = () => { 6523 if (effect.dirty) { 6524 effect.run(); 6525 } 6526 }; 6527 update.i = instance; 6528 update.id = instance.uid; 6529 toggleRecurse(instance, true); 6530 if (true) { 6531 effect.onTrack = instance.rtc ? (e) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtc, e) : void 0; 6532 effect.onTrigger = instance.rtg ? (e) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtg, e) : void 0; 6533 } 6534 update(); 6535 }; 6536 const updateComponentPreRender = (instance, nextVNode, optimized) => { 6537 nextVNode.component = instance; 6538 const prevProps = instance.vnode.props; 6539 instance.vnode = nextVNode; 6540 instance.next = null; 6541 updateProps(instance, nextVNode.props, prevProps, optimized); 6542 updateSlots(instance, nextVNode.children, optimized); 6543 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 6544 flushPreFlushCbs(instance); 6545 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 6546 }; 6547 const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { 6548 const c1 = n1 && n1.children; 6549 const prevShapeFlag = n1 ? n1.shapeFlag : 0; 6550 const c2 = n2.children; 6551 const { patchFlag, shapeFlag } = n2; 6552 if (patchFlag > 0) { 6553 if (patchFlag & 128) { 6554 patchKeyedChildren( 6555 c1, 6556 c2, 6557 container, 6558 anchor, 6559 parentComponent, 6560 parentSuspense, 6561 namespace, 6562 slotScopeIds, 6563 optimized 6564 ); 6565 return; 6566 } else if (patchFlag & 256) { 6567 patchUnkeyedChildren( 6568 c1, 6569 c2, 6570 container, 6571 anchor, 6572 parentComponent, 6573 parentSuspense, 6574 namespace, 6575 slotScopeIds, 6576 optimized 6577 ); 6578 return; 6579 } 6580 } 6581 if (shapeFlag & 8) { 6582 if (prevShapeFlag & 16) { 6583 unmountChildren(c1, parentComponent, parentSuspense); 6584 } 6585 if (c2 !== c1) { 6586 hostSetElementText(container, c2); 6587 } 6588 } else { 6589 if (prevShapeFlag & 16) { 6590 if (shapeFlag & 16) { 6591 patchKeyedChildren( 6592 c1, 6593 c2, 6594 container, 6595 anchor, 6596 parentComponent, 6597 parentSuspense, 6598 namespace, 6599 slotScopeIds, 6600 optimized 6601 ); 6602 } else { 6603 unmountChildren(c1, parentComponent, parentSuspense, true); 6604 } 6605 } else { 6606 if (prevShapeFlag & 8) { 6607 hostSetElementText(container, ""); 6608 } 6609 if (shapeFlag & 16) { 6610 mountChildren( 6611 c2, 6612 container, 6613 anchor, 6614 parentComponent, 6615 parentSuspense, 6616 namespace, 6617 slotScopeIds, 6618 optimized 6619 ); 6620 } 6621 } 6622 } 6623 }; 6624 const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 6625 c1 = c1 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR; 6626 c2 = c2 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR; 6627 const oldLength = c1.length; 6628 const newLength = c2.length; 6629 const commonLength = Math.min(oldLength, newLength); 6630 let i; 6631 for (i = 0; i < commonLength; i++) { 6632 const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); 6633 patch( 6634 c1[i], 6635 nextChild, 6636 container, 6637 null, 6638 parentComponent, 6639 parentSuspense, 6640 namespace, 6641 slotScopeIds, 6642 optimized 6643 ); 6644 } 6645 if (oldLength > newLength) { 6646 unmountChildren( 6647 c1, 6648 parentComponent, 6649 parentSuspense, 6650 true, 6651 false, 6652 commonLength 6653 ); 6654 } else { 6655 mountChildren( 6656 c2, 6657 container, 6658 anchor, 6659 parentComponent, 6660 parentSuspense, 6661 namespace, 6662 slotScopeIds, 6663 optimized, 6664 commonLength 6665 ); 6666 } 6667 }; 6668 const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { 6669 let i = 0; 6670 const l2 = c2.length; 6671 let e1 = c1.length - 1; 6672 let e2 = l2 - 1; 6673 while (i <= e1 && i <= e2) { 6674 const n1 = c1[i]; 6675 const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); 6676 if (isSameVNodeType(n1, n2)) { 6677 patch( 6678 n1, 6679 n2, 6680 container, 6681 null, 6682 parentComponent, 6683 parentSuspense, 6684 namespace, 6685 slotScopeIds, 6686 optimized 6687 ); 6688 } else { 6689 break; 6690 } 6691 i++; 6692 } 6693 while (i <= e1 && i <= e2) { 6694 const n1 = c1[e1]; 6695 const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); 6696 if (isSameVNodeType(n1, n2)) { 6697 patch( 6698 n1, 6699 n2, 6700 container, 6701 null, 6702 parentComponent, 6703 parentSuspense, 6704 namespace, 6705 slotScopeIds, 6706 optimized 6707 ); 6708 } else { 6709 break; 6710 } 6711 e1--; 6712 e2--; 6713 } 6714 if (i > e1) { 6715 if (i <= e2) { 6716 const nextPos = e2 + 1; 6717 const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; 6718 while (i <= e2) { 6719 patch( 6720 null, 6721 c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), 6722 container, 6723 anchor, 6724 parentComponent, 6725 parentSuspense, 6726 namespace, 6727 slotScopeIds, 6728 optimized 6729 ); 6730 i++; 6731 } 6732 } 6733 } else if (i > e2) { 6734 while (i <= e1) { 6735 unmount(c1[i], parentComponent, parentSuspense, true); 6736 i++; 6737 } 6738 } else { 6739 const s1 = i; 6740 const s2 = i; 6741 const keyToNewIndexMap = /* @__PURE__ */ new Map(); 6742 for (i = s2; i <= e2; i++) { 6743 const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); 6744 if (nextChild.key != null) { 6745 if ( true && keyToNewIndexMap.has(nextChild.key)) { 6746 warn$1( 6747 `Duplicate keys found during update:`, 6748 JSON.stringify(nextChild.key), 6749 `Make sure keys are unique.` 6750 ); 6751 } 6752 keyToNewIndexMap.set(nextChild.key, i); 6753 } 6754 } 6755 let j; 6756 let patched = 0; 6757 const toBePatched = e2 - s2 + 1; 6758 let moved = false; 6759 let maxNewIndexSoFar = 0; 6760 const newIndexToOldIndexMap = new Array(toBePatched); 6761 for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; 6762 for (i = s1; i <= e1; i++) { 6763 const prevChild = c1[i]; 6764 if (patched >= toBePatched) { 6765 unmount(prevChild, parentComponent, parentSuspense, true); 6766 continue; 6767 } 6768 let newIndex; 6769 if (prevChild.key != null) { 6770 newIndex = keyToNewIndexMap.get(prevChild.key); 6771 } else { 6772 for (j = s2; j <= e2; j++) { 6773 if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { 6774 newIndex = j; 6775 break; 6776 } 6777 } 6778 } 6779 if (newIndex === void 0) { 6780 unmount(prevChild, parentComponent, parentSuspense, true); 6781 } else { 6782 newIndexToOldIndexMap[newIndex - s2] = i + 1; 6783 if (newIndex >= maxNewIndexSoFar) { 6784 maxNewIndexSoFar = newIndex; 6785 } else { 6786 moved = true; 6787 } 6788 patch( 6789 prevChild, 6790 c2[newIndex], 6791 container, 6792 null, 6793 parentComponent, 6794 parentSuspense, 6795 namespace, 6796 slotScopeIds, 6797 optimized 6798 ); 6799 patched++; 6800 } 6801 } 6802 const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR; 6803 j = increasingNewIndexSequence.length - 1; 6804 for (i = toBePatched - 1; i >= 0; i--) { 6805 const nextIndex = s2 + i; 6806 const nextChild = c2[nextIndex]; 6807 const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; 6808 if (newIndexToOldIndexMap[i] === 0) { 6809 patch( 6810 null, 6811 nextChild, 6812 container, 6813 anchor, 6814 parentComponent, 6815 parentSuspense, 6816 namespace, 6817 slotScopeIds, 6818 optimized 6819 ); 6820 } else if (moved) { 6821 if (j < 0 || i !== increasingNewIndexSequence[j]) { 6822 move(nextChild, container, anchor, 2); 6823 } else { 6824 j--; 6825 } 6826 } 6827 } 6828 } 6829 }; 6830 const move = (vnode, container, anchor, moveType, parentSuspense = null) => { 6831 const { el, type, transition, children, shapeFlag } = vnode; 6832 if (shapeFlag & 6) { 6833 move(vnode.component.subTree, container, anchor, moveType); 6834 return; 6835 } 6836 if (shapeFlag & 128) { 6837 vnode.suspense.move(container, anchor, moveType); 6838 return; 6839 } 6840 if (shapeFlag & 64) { 6841 type.move(vnode, container, anchor, internals); 6842 return; 6843 } 6844 if (type === Fragment) { 6845 hostInsert(el, container, anchor); 6846 for (let i = 0; i < children.length; i++) { 6847 move(children[i], container, anchor, moveType); 6848 } 6849 hostInsert(vnode.anchor, container, anchor); 6850 return; 6851 } 6852 if (type === Static) { 6853 moveStaticNode(vnode, container, anchor); 6854 return; 6855 } 6856 const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; 6857 if (needTransition2) { 6858 if (moveType === 0) { 6859 transition.beforeEnter(el); 6860 hostInsert(el, container, anchor); 6861 queuePostRenderEffect(() => transition.enter(el), parentSuspense); 6862 } else { 6863 const { leave, delayLeave, afterLeave } = transition; 6864 const remove2 = () => hostInsert(el, container, anchor); 6865 const performLeave = () => { 6866 leave(el, () => { 6867 remove2(); 6868 afterLeave && afterLeave(); 6869 }); 6870 }; 6871 if (delayLeave) { 6872 delayLeave(el, remove2, performLeave); 6873 } else { 6874 performLeave(); 6875 } 6876 } 6877 } else { 6878 hostInsert(el, container, anchor); 6879 } 6880 }; 6881 const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { 6882 const { 6883 type, 6884 props, 6885 ref, 6886 children, 6887 dynamicChildren, 6888 shapeFlag, 6889 patchFlag, 6890 dirs, 6891 cacheIndex 6892 } = vnode; 6893 if (patchFlag === -2) { 6894 optimized = false; 6895 } 6896 if (ref != null) { 6897 setRef(ref, null, parentSuspense, vnode, true); 6898 } 6899 if (cacheIndex != null) { 6900 parentComponent.renderCache[cacheIndex] = void 0; 6901 } 6902 if (shapeFlag & 256) { 6903 parentComponent.ctx.deactivate(vnode); 6904 return; 6905 } 6906 const shouldInvokeDirs = shapeFlag & 1 && dirs; 6907 const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); 6908 let vnodeHook; 6909 if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { 6910 invokeVNodeHook(vnodeHook, parentComponent, vnode); 6911 } 6912 if (shapeFlag & 6) { 6913 unmountComponent(vnode.component, parentSuspense, doRemove); 6914 } else { 6915 if (shapeFlag & 128) { 6916 vnode.suspense.unmount(parentSuspense, doRemove); 6917 return; 6918 } 6919 if (shouldInvokeDirs) { 6920 invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); 6921 } 6922 if (shapeFlag & 64) { 6923 vnode.type.remove( 6924 vnode, 6925 parentComponent, 6926 parentSuspense, 6927 internals, 6928 doRemove 6929 ); 6930 } else if (dynamicChildren && // #5154 6931 // when v-once is used inside a block, setBlockTracking(-1) marks the 6932 // parent block with hasOnce: true 6933 // so that it doesn't take the fast path during unmount - otherwise 6934 // components nested in v-once are never unmounted. 6935 !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments 6936 (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { 6937 unmountChildren( 6938 dynamicChildren, 6939 parentComponent, 6940 parentSuspense, 6941 false, 6942 true 6943 ); 6944 } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { 6945 unmountChildren(children, parentComponent, parentSuspense); 6946 } 6947 if (doRemove) { 6948 remove(vnode); 6949 } 6950 } 6951 if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { 6952 queuePostRenderEffect(() => { 6953 vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); 6954 shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); 6955 }, parentSuspense); 6956 } 6957 }; 6958 const remove = (vnode) => { 6959 const { type, el, anchor, transition } = vnode; 6960 if (type === Fragment) { 6961 if ( true && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { 6962 vnode.children.forEach((child) => { 6963 if (child.type === Comment) { 6964 hostRemove(child.el); 6965 } else { 6966 remove(child); 6967 } 6968 }); 6969 } else { 6970 removeFragment(el, anchor); 6971 } 6972 return; 6973 } 6974 if (type === Static) { 6975 removeStaticNode(vnode); 6976 return; 6977 } 6978 const performRemove = () => { 6979 hostRemove(el); 6980 if (transition && !transition.persisted && transition.afterLeave) { 6981 transition.afterLeave(); 6982 } 6983 }; 6984 if (vnode.shapeFlag & 1 && transition && !transition.persisted) { 6985 const { leave, delayLeave } = transition; 6986 const performLeave = () => leave(el, performRemove); 6987 if (delayLeave) { 6988 delayLeave(vnode.el, performRemove, performLeave); 6989 } else { 6990 performLeave(); 6991 } 6992 } else { 6993 performRemove(); 6994 } 6995 }; 6996 const removeFragment = (cur, end) => { 6997 let next; 6998 while (cur !== end) { 6999 next = hostNextSibling(cur); 7000 hostRemove(cur); 7001 cur = next; 7002 } 7003 hostRemove(end); 7004 }; 7005 const unmountComponent = (instance, parentSuspense, doRemove) => { 7006 if ( true && instance.type.__hmrId) { 7007 unregisterHMR(instance); 7008 } 7009 const { bum, scope, update, subTree, um, m, a } = instance; 7010 invalidateMount(m); 7011 invalidateMount(a); 7012 if (bum) { 7013 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bum); 7014 } 7015 scope.stop(); 7016 if (update) { 7017 update.active = false; 7018 unmount(subTree, instance, parentSuspense, doRemove); 7019 } 7020 if (um) { 7021 queuePostRenderEffect(um, parentSuspense); 7022 } 7023 queuePostRenderEffect(() => { 7024 instance.isUnmounted = true; 7025 }, parentSuspense); 7026 if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { 7027 parentSuspense.deps--; 7028 if (parentSuspense.deps === 0) { 7029 parentSuspense.resolve(); 7030 } 7031 } 7032 if (true) { 7033 devtoolsComponentRemoved(instance); 7034 } 7035 }; 7036 const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { 7037 for (let i = start; i < children.length; i++) { 7038 unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); 7039 } 7040 }; 7041 const getNextHostNode = (vnode) => { 7042 if (vnode.shapeFlag & 6) { 7043 return getNextHostNode(vnode.component.subTree); 7044 } 7045 if (vnode.shapeFlag & 128) { 7046 return vnode.suspense.next(); 7047 } 7048 const el = hostNextSibling(vnode.anchor || vnode.el); 7049 const teleportEnd = el && el[TeleportEndKey]; 7050 return teleportEnd ? hostNextSibling(teleportEnd) : el; 7051 }; 7052 let isFlushing = false; 7053 const render = (vnode, container, namespace) => { 7054 if (vnode == null) { 7055 if (container._vnode) { 7056 unmount(container._vnode, null, null, true); 7057 } 7058 } else { 7059 patch( 7060 container._vnode || null, 7061 vnode, 7062 container, 7063 null, 7064 null, 7065 null, 7066 namespace 7067 ); 7068 } 7069 container._vnode = vnode; 7070 if (!isFlushing) { 7071 isFlushing = true; 7072 flushPreFlushCbs(); 7073 flushPostFlushCbs(); 7074 isFlushing = false; 7075 } 7076 }; 7077 const internals = { 7078 p: patch, 7079 um: unmount, 7080 m: move, 7081 r: remove, 7082 mt: mountComponent, 7083 mc: mountChildren, 7084 pc: patchChildren, 7085 pbc: patchBlockChildren, 7086 n: getNextHostNode, 7087 o: options 7088 }; 7089 let hydrate; 7090 let hydrateNode; 7091 if (createHydrationFns) { 7092 [hydrate, hydrateNode] = createHydrationFns( 7093 internals 7094 ); 7095 } 7096 return { 7097 render, 7098 hydrate, 7099 createApp: createAppAPI(render, hydrate) 7100 }; 7101} 7102function resolveChildrenNamespace({ type, props }, currentNamespace) { 7103 return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; 7104} 7105function toggleRecurse({ effect, update }, allowed) { 7106 effect.allowRecurse = update.allowRecurse = allowed; 7107} 7108function needTransition(parentSuspense, transition) { 7109 return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; 7110} 7111function traverseStaticChildren(n1, n2, shallow = false) { 7112 const ch1 = n1.children; 7113 const ch2 = n2.children; 7114 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch1) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch2)) { 7115 for (let i = 0; i < ch1.length; i++) { 7116 const c1 = ch1[i]; 7117 let c2 = ch2[i]; 7118 if (c2.shapeFlag & 1 && !c2.dynamicChildren) { 7119 if (c2.patchFlag <= 0 || c2.patchFlag === 32) { 7120 c2 = ch2[i] = cloneIfMounted(ch2[i]); 7121 c2.el = c1.el; 7122 } 7123 if (!shallow && c2.patchFlag !== -2) 7124 traverseStaticChildren(c1, c2); 7125 } 7126 if (c2.type === Text) { 7127 c2.el = c1.el; 7128 } 7129 if ( true && c2.type === Comment && !c2.el) { 7130 c2.el = c1.el; 7131 } 7132 } 7133 } 7134} 7135function getSequence(arr) { 7136 const p = arr.slice(); 7137 const result = [0]; 7138 let i, j, u, v, c; 7139 const len = arr.length; 7140 for (i = 0; i < len; i++) { 7141 const arrI = arr[i]; 7142 if (arrI !== 0) { 7143 j = result[result.length - 1]; 7144 if (arr[j] < arrI) { 7145 p[i] = j; 7146 result.push(i); 7147 continue; 7148 } 7149 u = 0; 7150 v = result.length - 1; 7151 while (u < v) { 7152 c = u + v >> 1; 7153 if (arr[result[c]] < arrI) { 7154 u = c + 1; 7155 } else { 7156 v = c; 7157 } 7158 } 7159 if (arrI < arr[result[u]]) { 7160 if (u > 0) { 7161 p[i] = result[u - 1]; 7162 } 7163 result[u] = i; 7164 } 7165 } 7166 } 7167 u = result.length; 7168 v = result[u - 1]; 7169 while (u-- > 0) { 7170 result[u] = v; 7171 v = p[v]; 7172 } 7173 return result; 7174} 7175function locateNonHydratedAsyncRoot(instance) { 7176 const subComponent = instance.subTree.component; 7177 if (subComponent) { 7178 if (subComponent.asyncDep && !subComponent.asyncResolved) { 7179 return subComponent; 7180 } else { 7181 return locateNonHydratedAsyncRoot(subComponent); 7182 } 7183 } 7184} 7185function invalidateMount(hooks) { 7186 if (hooks) { 7187 for (let i = 0; i < hooks.length; i++) hooks[i].active = false; 7188 } 7189} 7190 7191const ssrContextKey = Symbol.for("v-scx"); 7192const useSSRContext = () => { 7193 { 7194 const ctx = inject(ssrContextKey); 7195 if (!ctx) { 7196 true && warn$1( 7197 `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` 7198 ); 7199 } 7200 return ctx; 7201 } 7202}; 7203 7204function watchEffect(effect, options) { 7205 return doWatch(effect, null, options); 7206} 7207function watchPostEffect(effect, options) { 7208 return doWatch( 7209 effect, 7210 null, 7211 true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, options, { flush: "post" }) : 0 7212 ); 7213} 7214function watchSyncEffect(effect, options) { 7215 return doWatch( 7216 effect, 7217 null, 7218 true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, options, { flush: "sync" }) : 0 7219 ); 7220} 7221const INITIAL_WATCHER_VALUE = {}; 7222function watch(source, cb, options) { 7223 if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(cb)) { 7224 warn$1( 7225 `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` 7226 ); 7227 } 7228 return doWatch(source, cb, options); 7229} 7230function doWatch(source, cb, { 7231 immediate, 7232 deep, 7233 flush, 7234 once, 7235 onTrack, 7236 onTrigger 7237} = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) { 7238 if (cb && once) { 7239 const _cb = cb; 7240 cb = (...args) => { 7241 _cb(...args); 7242 unwatch(); 7243 }; 7244 } 7245 if ( true && deep !== void 0 && typeof deep === "number") { 7246 warn$1( 7247 `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` 7248 ); 7249 } 7250 if ( true && !cb) { 7251 if (immediate !== void 0) { 7252 warn$1( 7253 `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` 7254 ); 7255 } 7256 if (deep !== void 0) { 7257 warn$1( 7258 `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` 7259 ); 7260 } 7261 if (once !== void 0) { 7262 warn$1( 7263 `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` 7264 ); 7265 } 7266 } 7267 const warnInvalidSource = (s) => { 7268 warn$1( 7269 `Invalid watch source: `, 7270 s, 7271 `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` 7272 ); 7273 }; 7274 const instance = currentInstance; 7275 const reactiveGetter = (source2) => deep === true ? source2 : ( 7276 // for deep: false, only traverse root-level properties 7277 traverse(source2, deep === false ? 1 : void 0) 7278 ); 7279 let getter; 7280 let forceTrigger = false; 7281 let isMultiSource = false; 7282 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(source)) { 7283 getter = () => source.value; 7284 forceTrigger = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(source); 7285 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(source)) { 7286 getter = () => reactiveGetter(source); 7287 forceTrigger = true; 7288 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source)) { 7289 isMultiSource = true; 7290 forceTrigger = source.some((s) => (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(s) || (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(s)); 7291 getter = () => source.map((s) => { 7292 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(s)) { 7293 return s.value; 7294 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(s)) { 7295 return reactiveGetter(s); 7296 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) { 7297 return callWithErrorHandling(s, instance, 2); 7298 } else { 7299 true && warnInvalidSource(s); 7300 } 7301 }); 7302 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) { 7303 if (cb) { 7304 getter = () => callWithErrorHandling(source, instance, 2); 7305 } else { 7306 getter = () => { 7307 if (cleanup) { 7308 cleanup(); 7309 } 7310 return callWithAsyncErrorHandling( 7311 source, 7312 instance, 7313 3, 7314 [onCleanup] 7315 ); 7316 }; 7317 } 7318 } else { 7319 getter = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 7320 true && warnInvalidSource(source); 7321 } 7322 if (cb && deep) { 7323 const baseGetter = getter; 7324 getter = () => traverse(baseGetter()); 7325 } 7326 let cleanup; 7327 let onCleanup = (fn) => { 7328 cleanup = effect.onStop = () => { 7329 callWithErrorHandling(fn, instance, 4); 7330 cleanup = effect.onStop = void 0; 7331 }; 7332 }; 7333 let ssrCleanup; 7334 if (isInSSRComponentSetup) { 7335 onCleanup = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 7336 if (!cb) { 7337 getter(); 7338 } else if (immediate) { 7339 callWithAsyncErrorHandling(cb, instance, 3, [ 7340 getter(), 7341 isMultiSource ? [] : void 0, 7342 onCleanup 7343 ]); 7344 } 7345 if (flush === "sync") { 7346 const ctx = useSSRContext(); 7347 ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); 7348 } else { 7349 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 7350 } 7351 } 7352 let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; 7353 const job = () => { 7354 if (!effect.active || !effect.dirty) { 7355 return; 7356 } 7357 if (cb) { 7358 const newValue = effect.run(); 7359 if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(v, oldValue[i])) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(newValue, oldValue)) || false) { 7360 if (cleanup) { 7361 cleanup(); 7362 } 7363 callWithAsyncErrorHandling(cb, instance, 3, [ 7364 newValue, 7365 // pass undefined as the old value when it's changed for the first time 7366 oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, 7367 onCleanup 7368 ]); 7369 oldValue = newValue; 7370 } 7371 } else { 7372 effect.run(); 7373 } 7374 }; 7375 job.allowRecurse = !!cb; 7376 let scheduler; 7377 if (flush === "sync") { 7378 scheduler = job; 7379 } else if (flush === "post") { 7380 scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); 7381 } else { 7382 job.pre = true; 7383 if (instance) job.id = instance.uid; 7384 scheduler = () => queueJob(job); 7385 } 7386 const effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect(getter, _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP, scheduler); 7387 const scope = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope)(); 7388 const unwatch = () => { 7389 effect.stop(); 7390 if (scope) { 7391 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(scope.effects, effect); 7392 } 7393 }; 7394 if (true) { 7395 effect.onTrack = onTrack; 7396 effect.onTrigger = onTrigger; 7397 } 7398 if (cb) { 7399 if (immediate) { 7400 job(); 7401 } else { 7402 oldValue = effect.run(); 7403 } 7404 } else if (flush === "post") { 7405 queuePostRenderEffect( 7406 effect.run.bind(effect), 7407 instance && instance.suspense 7408 ); 7409 } else { 7410 effect.run(); 7411 } 7412 if (ssrCleanup) ssrCleanup.push(unwatch); 7413 return unwatch; 7414} 7415function instanceWatch(source, value, options) { 7416 const publicThis = this.proxy; 7417 const getter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); 7418 let cb; 7419 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) { 7420 cb = value; 7421 } else { 7422 cb = value.handler; 7423 options = value; 7424 } 7425 const reset = setCurrentInstance(this); 7426 const res = doWatch(getter, cb.bind(publicThis), options); 7427 reset(); 7428 return res; 7429} 7430function createPathGetter(ctx, path) { 7431 const segments = path.split("."); 7432 return () => { 7433 let cur = ctx; 7434 for (let i = 0; i < segments.length && cur; i++) { 7435 cur = cur[segments[i]]; 7436 } 7437 return cur; 7438 }; 7439} 7440function traverse(value, depth = Infinity, seen) { 7441 if (depth <= 0 || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value) || value["__v_skip"]) { 7442 return value; 7443 } 7444 seen = seen || /* @__PURE__ */ new Set(); 7445 if (seen.has(value)) { 7446 return value; 7447 } 7448 seen.add(value); 7449 depth--; 7450 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) { 7451 traverse(value.value, depth, seen); 7452 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) { 7453 for (let i = 0; i < value.length; i++) { 7454 traverse(value[i], depth, seen); 7455 } 7456 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isMap)(value)) { 7457 value.forEach((v) => { 7458 traverse(v, depth, seen); 7459 }); 7460 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(value)) { 7461 for (const key in value) { 7462 traverse(value[key], depth, seen); 7463 } 7464 for (const key of Object.getOwnPropertySymbols(value)) { 7465 if (Object.prototype.propertyIsEnumerable.call(value, key)) { 7466 traverse(value[key], depth, seen); 7467 } 7468 } 7469 } 7470 return value; 7471} 7472 7473function useModel(props, name, options = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) { 7474 const i = getCurrentInstance(); 7475 if ( true && !i) { 7476 warn$1(`useModel() called without active instance.`); 7477 return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(); 7478 } 7479 if ( true && !i.propsOptions[0][name]) { 7480 warn$1(`useModel() called with prop "${name}" which is not declared.`); 7481 return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(); 7482 } 7483 const camelizedName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name); 7484 const hyphenatedName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(name); 7485 const modifiers = getModelModifiers(props, name); 7486 const res = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.customRef)((track, trigger) => { 7487 let localValue; 7488 let prevSetValue = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 7489 let prevEmittedValue; 7490 watchSyncEffect(() => { 7491 const propValue = props[name]; 7492 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(localValue, propValue)) { 7493 localValue = propValue; 7494 trigger(); 7495 } 7496 }); 7497 return { 7498 get() { 7499 track(); 7500 return options.get ? options.get(localValue) : localValue; 7501 }, 7502 set(value) { 7503 const emittedValue = options.set ? options.set(value) : value; 7504 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(emittedValue, localValue) && !(prevSetValue !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(value, prevSetValue))) { 7505 return; 7506 } 7507 const rawProps = i.vnode.props; 7508 if (!(rawProps && // check if parent has passed v-model 7509 (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { 7510 localValue = value; 7511 trigger(); 7512 } 7513 i.emit(`update:${name}`, emittedValue); 7514 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(value, emittedValue) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(value, prevSetValue) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(emittedValue, prevEmittedValue)) { 7515 trigger(); 7516 } 7517 prevSetValue = value; 7518 prevEmittedValue = emittedValue; 7519 } 7520 }; 7521 }); 7522 res[Symbol.iterator] = () => { 7523 let i2 = 0; 7524 return { 7525 next() { 7526 if (i2 < 2) { 7527 return { value: i2++ ? modifiers || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ : res, done: false }; 7528 } else { 7529 return { done: true }; 7530 } 7531 } 7532 }; 7533 }; 7534 return res; 7535} 7536const getModelModifiers = (props, modelName) => { 7537 return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(modelName)}Modifiers`] || props[`${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(modelName)}Modifiers`]; 7538}; 7539 7540function emit(instance, event, ...rawArgs) { 7541 if (instance.isUnmounted) return; 7542 const props = instance.vnode.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 7543 if (true) { 7544 const { 7545 emitsOptions, 7546 propsOptions: [propsOptions] 7547 } = instance; 7548 if (emitsOptions) { 7549 if (!(event in emitsOptions) && true) { 7550 if (!propsOptions || !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(event)) in propsOptions)) { 7551 warn$1( 7552 `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(event))}" prop.` 7553 ); 7554 } 7555 } else { 7556 const validator = emitsOptions[event]; 7557 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(validator)) { 7558 const isValid = validator(...rawArgs); 7559 if (!isValid) { 7560 warn$1( 7561 `Invalid event arguments: event validation failed for event "${event}".` 7562 ); 7563 } 7564 } 7565 } 7566 } 7567 } 7568 let args = rawArgs; 7569 const isModelListener = event.startsWith("update:"); 7570 const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); 7571 if (modifiers) { 7572 if (modifiers.trim) { 7573 args = rawArgs.map((a) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(a) ? a.trim() : a); 7574 } 7575 if (modifiers.number) { 7576 args = rawArgs.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber); 7577 } 7578 } 7579 if (true) { 7580 devtoolsComponentEmit(instance, event, args); 7581 } 7582 if (true) { 7583 const lowerCaseEvent = event.toLowerCase(); 7584 if (lowerCaseEvent !== event && props[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(lowerCaseEvent)]) { 7585 warn$1( 7586 `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( 7587 instance, 7588 instance.type 7589 )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)( 7590 event 7591 )}" instead of "${event}".` 7592 ); 7593 } 7594 } 7595 let handlerName; 7596 let handler = props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event)] || // also try camelCase event handler (#2249) 7597 props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(event))]; 7598 if (!handler && isModelListener) { 7599 handler = props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event))]; 7600 } 7601 if (handler) { 7602 callWithAsyncErrorHandling( 7603 handler, 7604 instance, 7605 6, 7606 args 7607 ); 7608 } 7609 const onceHandler = props[handlerName + `Once`]; 7610 if (onceHandler) { 7611 if (!instance.emitted) { 7612 instance.emitted = {}; 7613 } else if (instance.emitted[handlerName]) { 7614 return; 7615 } 7616 instance.emitted[handlerName] = true; 7617 callWithAsyncErrorHandling( 7618 onceHandler, 7619 instance, 7620 6, 7621 args 7622 ); 7623 } 7624} 7625function normalizeEmitsOptions(comp, appContext, asMixin = false) { 7626 const cache = appContext.emitsCache; 7627 const cached = cache.get(comp); 7628 if (cached !== void 0) { 7629 return cached; 7630 } 7631 const raw = comp.emits; 7632 let normalized = {}; 7633 let hasExtends = false; 7634 if (false) {} 7635 if (!raw && !hasExtends) { 7636 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) { 7637 cache.set(comp, null); 7638 } 7639 return null; 7640 } 7641 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) { 7642 raw.forEach((key) => normalized[key] = null); 7643 } else { 7644 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, raw); 7645 } 7646 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) { 7647 cache.set(comp, normalized); 7648 } 7649 return normalized; 7650} 7651function isEmitListener(options, key) { 7652 if (!options || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) { 7653 return false; 7654 } 7655 key = key.slice(2).replace(/Once$/, ""); 7656 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key[0].toLowerCase() + key.slice(1)) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key); 7657} 7658 7659let accessedAttrs = false; 7660function markAttrsAccessed() { 7661 accessedAttrs = true; 7662} 7663function renderComponentRoot(instance) { 7664 const { 7665 type: Component, 7666 vnode, 7667 proxy, 7668 withProxy, 7669 propsOptions: [propsOptions], 7670 slots, 7671 attrs, 7672 emit, 7673 render, 7674 renderCache, 7675 props, 7676 data, 7677 setupState, 7678 ctx, 7679 inheritAttrs 7680 } = instance; 7681 const prev = setCurrentRenderingInstance(instance); 7682 let result; 7683 let fallthroughAttrs; 7684 if (true) { 7685 accessedAttrs = false; 7686 } 7687 try { 7688 if (vnode.shapeFlag & 4) { 7689 const proxyToUse = withProxy || proxy; 7690 const thisProxy = true && setupState.__isScriptSetup ? new Proxy(proxyToUse, { 7691 get(target, key, receiver) { 7692 warn$1( 7693 `Property '${String( 7694 key 7695 )}' was accessed via 'this'. Avoid using 'this' in templates.` 7696 ); 7697 return Reflect.get(target, key, receiver); 7698 } 7699 }) : proxyToUse; 7700 result = normalizeVNode( 7701 render.call( 7702 thisProxy, 7703 proxyToUse, 7704 renderCache, 7705 true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(props) : 0, 7706 setupState, 7707 data, 7708 ctx 7709 ) 7710 ); 7711 fallthroughAttrs = attrs; 7712 } else { 7713 const render2 = Component; 7714 if ( true && attrs === props) { 7715 markAttrsAccessed(); 7716 } 7717 result = normalizeVNode( 7718 render2.length > 1 ? render2( 7719 true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(props) : 0, 7720 true ? { 7721 get attrs() { 7722 markAttrsAccessed(); 7723 return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(attrs); 7724 }, 7725 slots, 7726 emit 7727 } : 0 7728 ) : render2( 7729 true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(props) : 0, 7730 null 7731 ) 7732 ); 7733 fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); 7734 } 7735 } catch (err) { 7736 blockStack.length = 0; 7737 handleError(err, instance, 1); 7738 result = createVNode(Comment); 7739 } 7740 let root = result; 7741 let setRoot = void 0; 7742 if ( true && result.patchFlag > 0 && result.patchFlag & 2048) { 7743 [root, setRoot] = getChildRoot(result); 7744 } 7745 if (fallthroughAttrs && inheritAttrs !== false) { 7746 const keys = Object.keys(fallthroughAttrs); 7747 const { shapeFlag } = root; 7748 if (keys.length) { 7749 if (shapeFlag & (1 | 6)) { 7750 if (propsOptions && keys.some(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)) { 7751 fallthroughAttrs = filterModelListeners( 7752 fallthroughAttrs, 7753 propsOptions 7754 ); 7755 } 7756 root = cloneVNode(root, fallthroughAttrs, false, true); 7757 } else if ( true && !accessedAttrs && root.type !== Comment) { 7758 const allAttrs = Object.keys(attrs); 7759 const eventAttrs = []; 7760 const extraAttrs = []; 7761 for (let i = 0, l = allAttrs.length; i < l; i++) { 7762 const key = allAttrs[i]; 7763 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) { 7764 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) { 7765 eventAttrs.push(key[2].toLowerCase() + key.slice(3)); 7766 } 7767 } else { 7768 extraAttrs.push(key); 7769 } 7770 } 7771 if (extraAttrs.length) { 7772 warn$1( 7773 `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` 7774 ); 7775 } 7776 if (eventAttrs.length) { 7777 warn$1( 7778 `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` 7779 ); 7780 } 7781 } 7782 } 7783 } 7784 if (vnode.dirs) { 7785 if ( true && !isElementRoot(root)) { 7786 warn$1( 7787 `Runtime directive used on component with non-element root node. The directives will not function as intended.` 7788 ); 7789 } 7790 root = cloneVNode(root, null, false, true); 7791 root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; 7792 } 7793 if (vnode.transition) { 7794 if ( true && !isElementRoot(root)) { 7795 warn$1( 7796 `Component inside <Transition> renders non-element root node that cannot be animated.` 7797 ); 7798 } 7799 root.transition = vnode.transition; 7800 } 7801 if ( true && setRoot) { 7802 setRoot(root); 7803 } else { 7804 result = root; 7805 } 7806 setCurrentRenderingInstance(prev); 7807 return result; 7808} 7809const getChildRoot = (vnode) => { 7810 const rawChildren = vnode.children; 7811 const dynamicChildren = vnode.dynamicChildren; 7812 const childRoot = filterSingleRoot(rawChildren, false); 7813 if (!childRoot) { 7814 return [vnode, void 0]; 7815 } else if ( true && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { 7816 return getChildRoot(childRoot); 7817 } 7818 const index = rawChildren.indexOf(childRoot); 7819 const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; 7820 const setRoot = (updatedRoot) => { 7821 rawChildren[index] = updatedRoot; 7822 if (dynamicChildren) { 7823 if (dynamicIndex > -1) { 7824 dynamicChildren[dynamicIndex] = updatedRoot; 7825 } else if (updatedRoot.patchFlag > 0) { 7826 vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; 7827 } 7828 } 7829 }; 7830 return [normalizeVNode(childRoot), setRoot]; 7831}; 7832function filterSingleRoot(children, recurse = true) { 7833 let singleRoot; 7834 for (let i = 0; i < children.length; i++) { 7835 const child = children[i]; 7836 if (isVNode(child)) { 7837 if (child.type !== Comment || child.children === "v-if") { 7838 if (singleRoot) { 7839 return; 7840 } else { 7841 singleRoot = child; 7842 if ( true && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { 7843 return filterSingleRoot(singleRoot.children); 7844 } 7845 } 7846 } 7847 } else { 7848 return; 7849 } 7850 } 7851 return singleRoot; 7852} 7853const getFunctionalFallthrough = (attrs) => { 7854 let res; 7855 for (const key in attrs) { 7856 if (key === "class" || key === "style" || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) { 7857 (res || (res = {}))[key] = attrs[key]; 7858 } 7859 } 7860 return res; 7861}; 7862const filterModelListeners = (attrs, props) => { 7863 const res = {}; 7864 for (const key in attrs) { 7865 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key) || !(key.slice(9) in props)) { 7866 res[key] = attrs[key]; 7867 } 7868 } 7869 return res; 7870}; 7871const isElementRoot = (vnode) => { 7872 return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; 7873}; 7874function shouldUpdateComponent(prevVNode, nextVNode, optimized) { 7875 const { props: prevProps, children: prevChildren, component } = prevVNode; 7876 const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; 7877 const emits = component.emitsOptions; 7878 if ( true && (prevChildren || nextChildren) && isHmrUpdating) { 7879 return true; 7880 } 7881 if (nextVNode.dirs || nextVNode.transition) { 7882 return true; 7883 } 7884 if (optimized && patchFlag >= 0) { 7885 if (patchFlag & 1024) { 7886 return true; 7887 } 7888 if (patchFlag & 16) { 7889 if (!prevProps) { 7890 return !!nextProps; 7891 } 7892 return hasPropsChanged(prevProps, nextProps, emits); 7893 } else if (patchFlag & 8) { 7894 const dynamicProps = nextVNode.dynamicProps; 7895 for (let i = 0; i < dynamicProps.length; i++) { 7896 const key = dynamicProps[i]; 7897 if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { 7898 return true; 7899 } 7900 } 7901 } 7902 } else { 7903 if (prevChildren || nextChildren) { 7904 if (!nextChildren || !nextChildren.$stable) { 7905 return true; 7906 } 7907 } 7908 if (prevProps === nextProps) { 7909 return false; 7910 } 7911 if (!prevProps) { 7912 return !!nextProps; 7913 } 7914 if (!nextProps) { 7915 return true; 7916 } 7917 return hasPropsChanged(prevProps, nextProps, emits); 7918 } 7919 return false; 7920} 7921function hasPropsChanged(prevProps, nextProps, emitsOptions) { 7922 const nextKeys = Object.keys(nextProps); 7923 if (nextKeys.length !== Object.keys(prevProps).length) { 7924 return true; 7925 } 7926 for (let i = 0; i < nextKeys.length; i++) { 7927 const key = nextKeys[i]; 7928 if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { 7929 return true; 7930 } 7931 } 7932 return false; 7933} 7934function updateHOCHostEl({ vnode, parent }, el) { 7935 while (parent) { 7936 const root = parent.subTree; 7937 if (root.suspense && root.suspense.activeBranch === vnode) { 7938 root.el = vnode.el; 7939 } 7940 if (root === vnode) { 7941 (vnode = parent.vnode).el = el; 7942 parent = parent.parent; 7943 } else { 7944 break; 7945 } 7946 } 7947} 7948 7949const isSuspense = (type) => type.__isSuspense; 7950let suspenseId = 0; 7951const SuspenseImpl = { 7952 name: "Suspense", 7953 // In order to make Suspense tree-shakable, we need to avoid importing it 7954 // directly in the renderer. The renderer checks for the __isSuspense flag 7955 // on a vnode's type and calls the `process` method, passing in renderer 7956 // internals. 7957 __isSuspense: true, 7958 process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { 7959 if (n1 == null) { 7960 mountSuspense( 7961 n2, 7962 container, 7963 anchor, 7964 parentComponent, 7965 parentSuspense, 7966 namespace, 7967 slotScopeIds, 7968 optimized, 7969 rendererInternals 7970 ); 7971 } else { 7972 if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { 7973 n2.suspense = n1.suspense; 7974 n2.suspense.vnode = n2; 7975 n2.el = n1.el; 7976 return; 7977 } 7978 patchSuspense( 7979 n1, 7980 n2, 7981 container, 7982 anchor, 7983 parentComponent, 7984 namespace, 7985 slotScopeIds, 7986 optimized, 7987 rendererInternals 7988 ); 7989 } 7990 }, 7991 hydrate: hydrateSuspense, 7992 normalize: normalizeSuspenseChildren 7993}; 7994const Suspense = SuspenseImpl ; 7995function triggerEvent(vnode, name) { 7996 const eventListener = vnode.props && vnode.props[name]; 7997 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(eventListener)) { 7998 eventListener(); 7999 } 8000} 8001function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { 8002 const { 8003 p: patch, 8004 o: { createElement } 8005 } = rendererInternals; 8006 const hiddenContainer = createElement("div"); 8007 const suspense = vnode.suspense = createSuspenseBoundary( 8008 vnode, 8009 parentSuspense, 8010 parentComponent, 8011 container, 8012 hiddenContainer, 8013 anchor, 8014 namespace, 8015 slotScopeIds, 8016 optimized, 8017 rendererInternals 8018 ); 8019 patch( 8020 null, 8021 suspense.pendingBranch = vnode.ssContent, 8022 hiddenContainer, 8023 null, 8024 parentComponent, 8025 suspense, 8026 namespace, 8027 slotScopeIds 8028 ); 8029 if (suspense.deps > 0) { 8030 triggerEvent(vnode, "onPending"); 8031 triggerEvent(vnode, "onFallback"); 8032 patch( 8033 null, 8034 vnode.ssFallback, 8035 container, 8036 anchor, 8037 parentComponent, 8038 null, 8039 // fallback tree will not have suspense context 8040 namespace, 8041 slotScopeIds 8042 ); 8043 setActiveBranch(suspense, vnode.ssFallback); 8044 } else { 8045 suspense.resolve(false, true); 8046 } 8047} 8048function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { 8049 const suspense = n2.suspense = n1.suspense; 8050 suspense.vnode = n2; 8051 n2.el = n1.el; 8052 const newBranch = n2.ssContent; 8053 const newFallback = n2.ssFallback; 8054 const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; 8055 if (pendingBranch) { 8056 suspense.pendingBranch = newBranch; 8057 if (isSameVNodeType(newBranch, pendingBranch)) { 8058 patch( 8059 pendingBranch, 8060 newBranch, 8061 suspense.hiddenContainer, 8062 null, 8063 parentComponent, 8064 suspense, 8065 namespace, 8066 slotScopeIds, 8067 optimized 8068 ); 8069 if (suspense.deps <= 0) { 8070 suspense.resolve(); 8071 } else if (isInFallback) { 8072 if (!isHydrating) { 8073 patch( 8074 activeBranch, 8075 newFallback, 8076 container, 8077 anchor, 8078 parentComponent, 8079 null, 8080 // fallback tree will not have suspense context 8081 namespace, 8082 slotScopeIds, 8083 optimized 8084 ); 8085 setActiveBranch(suspense, newFallback); 8086 } 8087 } 8088 } else { 8089 suspense.pendingId = suspenseId++; 8090 if (isHydrating) { 8091 suspense.isHydrating = false; 8092 suspense.activeBranch = pendingBranch; 8093 } else { 8094 unmount(pendingBranch, parentComponent, suspense); 8095 } 8096 suspense.deps = 0; 8097 suspense.effects.length = 0; 8098 suspense.hiddenContainer = createElement("div"); 8099 if (isInFallback) { 8100 patch( 8101 null, 8102 newBranch, 8103 suspense.hiddenContainer, 8104 null, 8105 parentComponent, 8106 suspense, 8107 namespace, 8108 slotScopeIds, 8109 optimized 8110 ); 8111 if (suspense.deps <= 0) { 8112 suspense.resolve(); 8113 } else { 8114 patch( 8115 activeBranch, 8116 newFallback, 8117 container, 8118 anchor, 8119 parentComponent, 8120 null, 8121 // fallback tree will not have suspense context 8122 namespace, 8123 slotScopeIds, 8124 optimized 8125 ); 8126 setActiveBranch(suspense, newFallback); 8127 } 8128 } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { 8129 patch( 8130 activeBranch, 8131 newBranch, 8132 container, 8133 anchor, 8134 parentComponent, 8135 suspense, 8136 namespace, 8137 slotScopeIds, 8138 optimized 8139 ); 8140 suspense.resolve(true); 8141 } else { 8142 patch( 8143 null, 8144 newBranch, 8145 suspense.hiddenContainer, 8146 null, 8147 parentComponent, 8148 suspense, 8149 namespace, 8150 slotScopeIds, 8151 optimized 8152 ); 8153 if (suspense.deps <= 0) { 8154 suspense.resolve(); 8155 } 8156 } 8157 } 8158 } else { 8159 if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { 8160 patch( 8161 activeBranch, 8162 newBranch, 8163 container, 8164 anchor, 8165 parentComponent, 8166 suspense, 8167 namespace, 8168 slotScopeIds, 8169 optimized 8170 ); 8171 setActiveBranch(suspense, newBranch); 8172 } else { 8173 triggerEvent(n2, "onPending"); 8174 suspense.pendingBranch = newBranch; 8175 if (newBranch.shapeFlag & 512) { 8176 suspense.pendingId = newBranch.component.suspenseId; 8177 } else { 8178 suspense.pendingId = suspenseId++; 8179 } 8180 patch( 8181 null, 8182 newBranch, 8183 suspense.hiddenContainer, 8184 null, 8185 parentComponent, 8186 suspense, 8187 namespace, 8188 slotScopeIds, 8189 optimized 8190 ); 8191 if (suspense.deps <= 0) { 8192 suspense.resolve(); 8193 } else { 8194 const { timeout, pendingId } = suspense; 8195 if (timeout > 0) { 8196 setTimeout(() => { 8197 if (suspense.pendingId === pendingId) { 8198 suspense.fallback(newFallback); 8199 } 8200 }, timeout); 8201 } else if (timeout === 0) { 8202 suspense.fallback(newFallback); 8203 } 8204 } 8205 } 8206 } 8207} 8208let hasWarned = false; 8209function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { 8210 if ( true && !hasWarned) { 8211 hasWarned = true; 8212 console[console.info ? "info" : "log"]( 8213 `<Suspense> is an experimental feature and its API will likely change.` 8214 ); 8215 } 8216 const { 8217 p: patch, 8218 m: move, 8219 um: unmount, 8220 n: next, 8221 o: { parentNode, remove } 8222 } = rendererInternals; 8223 let parentSuspenseId; 8224 const isSuspensible = isVNodeSuspensible(vnode); 8225 if (isSuspensible) { 8226 if (parentSuspense && parentSuspense.pendingBranch) { 8227 parentSuspenseId = parentSuspense.pendingId; 8228 parentSuspense.deps++; 8229 } 8230 } 8231 const timeout = vnode.props ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(vnode.props.timeout) : void 0; 8232 if (true) { 8233 assertNumber(timeout, `Suspense timeout`); 8234 } 8235 const initialAnchor = anchor; 8236 const suspense = { 8237 vnode, 8238 parent: parentSuspense, 8239 parentComponent, 8240 namespace, 8241 container, 8242 hiddenContainer, 8243 deps: 0, 8244 pendingId: suspenseId++, 8245 timeout: typeof timeout === "number" ? timeout : -1, 8246 activeBranch: null, 8247 pendingBranch: null, 8248 isInFallback: !isHydrating, 8249 isHydrating, 8250 isUnmounted: false, 8251 effects: [], 8252 resolve(resume = false, sync = false) { 8253 if (true) { 8254 if (!resume && !suspense.pendingBranch) { 8255 throw new Error( 8256 `suspense.resolve() is called without a pending branch.` 8257 ); 8258 } 8259 if (suspense.isUnmounted) { 8260 throw new Error( 8261 `suspense.resolve() is called on an already unmounted suspense boundary.` 8262 ); 8263 } 8264 } 8265 const { 8266 vnode: vnode2, 8267 activeBranch, 8268 pendingBranch, 8269 pendingId, 8270 effects, 8271 parentComponent: parentComponent2, 8272 container: container2 8273 } = suspense; 8274 let delayEnter = false; 8275 if (suspense.isHydrating) { 8276 suspense.isHydrating = false; 8277 } else if (!resume) { 8278 delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; 8279 if (delayEnter) { 8280 activeBranch.transition.afterLeave = () => { 8281 if (pendingId === suspense.pendingId) { 8282 move( 8283 pendingBranch, 8284 container2, 8285 anchor === initialAnchor ? next(activeBranch) : anchor, 8286 0 8287 ); 8288 queuePostFlushCb(effects); 8289 } 8290 }; 8291 } 8292 if (activeBranch) { 8293 if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { 8294 anchor = next(activeBranch); 8295 } 8296 unmount(activeBranch, parentComponent2, suspense, true); 8297 } 8298 if (!delayEnter) { 8299 move(pendingBranch, container2, anchor, 0); 8300 } 8301 } 8302 setActiveBranch(suspense, pendingBranch); 8303 suspense.pendingBranch = null; 8304 suspense.isInFallback = false; 8305 let parent = suspense.parent; 8306 let hasUnresolvedAncestor = false; 8307 while (parent) { 8308 if (parent.pendingBranch) { 8309 parent.effects.push(...effects); 8310 hasUnresolvedAncestor = true; 8311 break; 8312 } 8313 parent = parent.parent; 8314 } 8315 if (!hasUnresolvedAncestor && !delayEnter) { 8316 queuePostFlushCb(effects); 8317 } 8318 suspense.effects = []; 8319 if (isSuspensible) { 8320 if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { 8321 parentSuspense.deps--; 8322 if (parentSuspense.deps === 0 && !sync) { 8323 parentSuspense.resolve(); 8324 } 8325 } 8326 } 8327 triggerEvent(vnode2, "onResolve"); 8328 }, 8329 fallback(fallbackVNode) { 8330 if (!suspense.pendingBranch) { 8331 return; 8332 } 8333 const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; 8334 triggerEvent(vnode2, "onFallback"); 8335 const anchor2 = next(activeBranch); 8336 const mountFallback = () => { 8337 if (!suspense.isInFallback) { 8338 return; 8339 } 8340 patch( 8341 null, 8342 fallbackVNode, 8343 container2, 8344 anchor2, 8345 parentComponent2, 8346 null, 8347 // fallback tree will not have suspense context 8348 namespace2, 8349 slotScopeIds, 8350 optimized 8351 ); 8352 setActiveBranch(suspense, fallbackVNode); 8353 }; 8354 const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; 8355 if (delayEnter) { 8356 activeBranch.transition.afterLeave = mountFallback; 8357 } 8358 suspense.isInFallback = true; 8359 unmount( 8360 activeBranch, 8361 parentComponent2, 8362 null, 8363 // no suspense so unmount hooks fire now 8364 true 8365 // shouldRemove 8366 ); 8367 if (!delayEnter) { 8368 mountFallback(); 8369 } 8370 }, 8371 move(container2, anchor2, type) { 8372 suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); 8373 suspense.container = container2; 8374 }, 8375 next() { 8376 return suspense.activeBranch && next(suspense.activeBranch); 8377 }, 8378 registerDep(instance, setupRenderEffect, optimized2) { 8379 const isInPendingSuspense = !!suspense.pendingBranch; 8380 if (isInPendingSuspense) { 8381 suspense.deps++; 8382 } 8383 const hydratedEl = instance.vnode.el; 8384 instance.asyncDep.catch((err) => { 8385 handleError(err, instance, 0); 8386 }).then((asyncSetupResult) => { 8387 if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { 8388 return; 8389 } 8390 instance.asyncResolved = true; 8391 const { vnode: vnode2 } = instance; 8392 if (true) { 8393 pushWarningContext(vnode2); 8394 } 8395 handleSetupResult(instance, asyncSetupResult, false); 8396 if (hydratedEl) { 8397 vnode2.el = hydratedEl; 8398 } 8399 const placeholder = !hydratedEl && instance.subTree.el; 8400 setupRenderEffect( 8401 instance, 8402 vnode2, 8403 // component may have been moved before resolve. 8404 // if this is not a hydration, instance.subTree will be the comment 8405 // placeholder. 8406 parentNode(hydratedEl || instance.subTree.el), 8407 // anchor will not be used if this is hydration, so only need to 8408 // consider the comment placeholder case. 8409 hydratedEl ? null : next(instance.subTree), 8410 suspense, 8411 namespace, 8412 optimized2 8413 ); 8414 if (placeholder) { 8415 remove(placeholder); 8416 } 8417 updateHOCHostEl(instance, vnode2.el); 8418 if (true) { 8419 popWarningContext(); 8420 } 8421 if (isInPendingSuspense && --suspense.deps === 0) { 8422 suspense.resolve(); 8423 } 8424 }); 8425 }, 8426 unmount(parentSuspense2, doRemove) { 8427 suspense.isUnmounted = true; 8428 if (suspense.activeBranch) { 8429 unmount( 8430 suspense.activeBranch, 8431 parentComponent, 8432 parentSuspense2, 8433 doRemove 8434 ); 8435 } 8436 if (suspense.pendingBranch) { 8437 unmount( 8438 suspense.pendingBranch, 8439 parentComponent, 8440 parentSuspense2, 8441 doRemove 8442 ); 8443 } 8444 } 8445 }; 8446 return suspense; 8447} 8448function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { 8449 const suspense = vnode.suspense = createSuspenseBoundary( 8450 vnode, 8451 parentSuspense, 8452 parentComponent, 8453 node.parentNode, 8454 // eslint-disable-next-line no-restricted-globals 8455 document.createElement("div"), 8456 null, 8457 namespace, 8458 slotScopeIds, 8459 optimized, 8460 rendererInternals, 8461 true 8462 ); 8463 const result = hydrateNode( 8464 node, 8465 suspense.pendingBranch = vnode.ssContent, 8466 parentComponent, 8467 suspense, 8468 slotScopeIds, 8469 optimized 8470 ); 8471 if (suspense.deps === 0) { 8472 suspense.resolve(false, true); 8473 } 8474 return result; 8475} 8476function normalizeSuspenseChildren(vnode) { 8477 const { shapeFlag, children } = vnode; 8478 const isSlotChildren = shapeFlag & 32; 8479 vnode.ssContent = normalizeSuspenseSlot( 8480 isSlotChildren ? children.default : children 8481 ); 8482 vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); 8483} 8484function normalizeSuspenseSlot(s) { 8485 let block; 8486 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) { 8487 const trackBlock = isBlockTreeEnabled && s._c; 8488 if (trackBlock) { 8489 s._d = false; 8490 openBlock(); 8491 } 8492 s = s(); 8493 if (trackBlock) { 8494 s._d = true; 8495 block = currentBlock; 8496 closeBlock(); 8497 } 8498 } 8499 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(s)) { 8500 const singleChild = filterSingleRoot(s); 8501 if ( true && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { 8502 warn$1(`<Suspense> slots expect a single root node.`); 8503 } 8504 s = singleChild; 8505 } 8506 s = normalizeVNode(s); 8507 if (block && !s.dynamicChildren) { 8508 s.dynamicChildren = block.filter((c) => c !== s); 8509 } 8510 return s; 8511} 8512function queueEffectWithSuspense(fn, suspense) { 8513 if (suspense && suspense.pendingBranch) { 8514 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn)) { 8515 suspense.effects.push(...fn); 8516 } else { 8517 suspense.effects.push(fn); 8518 } 8519 } else { 8520 queuePostFlushCb(fn); 8521 } 8522} 8523function setActiveBranch(suspense, branch) { 8524 suspense.activeBranch = branch; 8525 const { vnode, parentComponent } = suspense; 8526 let el = branch.el; 8527 while (!el && branch.component) { 8528 branch = branch.component.subTree; 8529 el = branch.el; 8530 } 8531 vnode.el = el; 8532 if (parentComponent && parentComponent.subTree === vnode) { 8533 parentComponent.vnode.el = el; 8534 updateHOCHostEl(parentComponent, el); 8535 } 8536} 8537function isVNodeSuspensible(vnode) { 8538 const suspensible = vnode.props && vnode.props.suspensible; 8539 return suspensible != null && suspensible !== false; 8540} 8541 8542const Fragment = Symbol.for("v-fgt"); 8543const Text = Symbol.for("v-txt"); 8544const Comment = Symbol.for("v-cmt"); 8545const Static = Symbol.for("v-stc"); 8546const blockStack = []; 8547let currentBlock = null; 8548function openBlock(disableTracking = false) { 8549 blockStack.push(currentBlock = disableTracking ? null : []); 8550} 8551function closeBlock() { 8552 blockStack.pop(); 8553 currentBlock = blockStack[blockStack.length - 1] || null; 8554} 8555let isBlockTreeEnabled = 1; 8556function setBlockTracking(value) { 8557 isBlockTreeEnabled += value; 8558 if (value < 0 && currentBlock) { 8559 currentBlock.hasOnce = true; 8560 } 8561} 8562function setupBlock(vnode) { 8563 vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR : null; 8564 closeBlock(); 8565 if (isBlockTreeEnabled > 0 && currentBlock) { 8566 currentBlock.push(vnode); 8567 } 8568 return vnode; 8569} 8570function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { 8571 return setupBlock( 8572 createBaseVNode( 8573 type, 8574 props, 8575 children, 8576 patchFlag, 8577 dynamicProps, 8578 shapeFlag, 8579 true 8580 ) 8581 ); 8582} 8583function createBlock(type, props, children, patchFlag, dynamicProps) { 8584 return setupBlock( 8585 createVNode( 8586 type, 8587 props, 8588 children, 8589 patchFlag, 8590 dynamicProps, 8591 true 8592 ) 8593 ); 8594} 8595function isVNode(value) { 8596 return value ? value.__v_isVNode === true : false; 8597} 8598function isSameVNodeType(n1, n2) { 8599 if ( true && n2.shapeFlag & 6 && n1.component) { 8600 const dirtyInstances = hmrDirtyComponents.get(n2.type); 8601 if (dirtyInstances && dirtyInstances.has(n1.component)) { 8602 n1.shapeFlag &= ~256; 8603 n2.shapeFlag &= ~512; 8604 return false; 8605 } 8606 } 8607 return n1.type === n2.type && n1.key === n2.key; 8608} 8609let vnodeArgsTransformer; 8610function transformVNodeArgs(transformer) { 8611 vnodeArgsTransformer = transformer; 8612} 8613const createVNodeWithArgsTransform = (...args) => { 8614 return _createVNode( 8615 ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args 8616 ); 8617}; 8618const normalizeKey = ({ key }) => key != null ? key : null; 8619const normalizeRef = ({ 8620 ref, 8621 ref_key, 8622 ref_for 8623}) => { 8624 if (typeof ref === "number") { 8625 ref = "" + ref; 8626 } 8627 return ref != null ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref) || (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; 8628}; 8629function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { 8630 const vnode = { 8631 __v_isVNode: true, 8632 __v_skip: true, 8633 type, 8634 props, 8635 key: props && normalizeKey(props), 8636 ref: props && normalizeRef(props), 8637 scopeId: currentScopeId, 8638 slotScopeIds: null, 8639 children, 8640 component: null, 8641 suspense: null, 8642 ssContent: null, 8643 ssFallback: null, 8644 dirs: null, 8645 transition: null, 8646 el: null, 8647 anchor: null, 8648 target: null, 8649 targetStart: null, 8650 targetAnchor: null, 8651 staticCount: 0, 8652 shapeFlag, 8653 patchFlag, 8654 dynamicProps, 8655 dynamicChildren: null, 8656 appContext: null, 8657 ctx: currentRenderingInstance 8658 }; 8659 if (needFullChildrenNormalization) { 8660 normalizeChildren(vnode, children); 8661 if (shapeFlag & 128) { 8662 type.normalize(vnode); 8663 } 8664 } else if (children) { 8665 vnode.shapeFlag |= (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(children) ? 8 : 16; 8666 } 8667 if ( true && vnode.key !== vnode.key) { 8668 warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); 8669 } 8670 if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself 8671 !isBlockNode && // has current parent block 8672 currentBlock && // presence of a patch flag indicates this node needs patching on updates. 8673 // component nodes also should always be patched, because even if the 8674 // component doesn't need to update, it needs to persist the instance on to 8675 // the next vnode so that it can be properly unmounted later. 8676 (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the 8677 // vnode should not be considered dynamic due to handler caching. 8678 vnode.patchFlag !== 32) { 8679 currentBlock.push(vnode); 8680 } 8681 return vnode; 8682} 8683const createVNode = true ? createVNodeWithArgsTransform : 0; 8684function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { 8685 if (!type || type === NULL_DYNAMIC_COMPONENT) { 8686 if ( true && !type) { 8687 warn$1(`Invalid vnode type when creating vnode: ${type}.`); 8688 } 8689 type = Comment; 8690 } 8691 if (isVNode(type)) { 8692 const cloned = cloneVNode( 8693 type, 8694 props, 8695 true 8696 /* mergeRef: true */ 8697 ); 8698 if (children) { 8699 normalizeChildren(cloned, children); 8700 } 8701 if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { 8702 if (cloned.shapeFlag & 6) { 8703 currentBlock[currentBlock.indexOf(type)] = cloned; 8704 } else { 8705 currentBlock.push(cloned); 8706 } 8707 } 8708 cloned.patchFlag = -2; 8709 return cloned; 8710 } 8711 if (isClassComponent(type)) { 8712 type = type.__vccOpts; 8713 } 8714 if (props) { 8715 props = guardReactiveProps(props); 8716 let { class: klass, style } = props; 8717 if (klass && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(klass)) { 8718 props.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(klass); 8719 } 8720 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(style)) { 8721 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(style) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(style)) { 8722 style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, style); 8723 } 8724 props.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)(style); 8725 } 8726 } 8727 const shapeFlag = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(type) ? 4 : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(type) ? 2 : 0; 8728 if ( true && shapeFlag & 4 && (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(type)) { 8729 type = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(type); 8730 warn$1( 8731 `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, 8732 ` 8733Component that was made reactive: `, 8734 type 8735 ); 8736 } 8737 return createBaseVNode( 8738 type, 8739 props, 8740 children, 8741 patchFlag, 8742 dynamicProps, 8743 shapeFlag, 8744 isBlockNode, 8745 true 8746 ); 8747} 8748function guardReactiveProps(props) { 8749 if (!props) return null; 8750 return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(props) || isInternalObject(props) ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, props) : props; 8751} 8752function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { 8753 const { props, ref, patchFlag, children, transition } = vnode; 8754 const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; 8755 const cloned = { 8756 __v_isVNode: true, 8757 __v_skip: true, 8758 type: vnode.type, 8759 props: mergedProps, 8760 key: mergedProps && normalizeKey(mergedProps), 8761 ref: extraProps && extraProps.ref ? ( 8762 // #2078 in the case of <component :is="vnode" ref="extra"/> 8763 // if the vnode itself already has a ref, cloneVNode will need to merge 8764 // the refs so the single vnode can be set on multiple refs 8765 mergeRef && ref ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) 8766 ) : ref, 8767 scopeId: vnode.scopeId, 8768 slotScopeIds: vnode.slotScopeIds, 8769 children: true && patchFlag === -1 && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children) ? children.map(deepCloneVNode) : children, 8770 target: vnode.target, 8771 targetStart: vnode.targetStart, 8772 targetAnchor: vnode.targetAnchor, 8773 staticCount: vnode.staticCount, 8774 shapeFlag: vnode.shapeFlag, 8775 // if the vnode is cloned with extra props, we can no longer assume its 8776 // existing patch flag to be reliable and need to add the FULL_PROPS flag. 8777 // note: preserve flag for fragments since they use the flag for children 8778 // fast paths only. 8779 patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, 8780 dynamicProps: vnode.dynamicProps, 8781 dynamicChildren: vnode.dynamicChildren, 8782 appContext: vnode.appContext, 8783 dirs: vnode.dirs, 8784 transition, 8785 // These should technically only be non-null on mounted VNodes. However, 8786 // they *should* be copied for kept-alive vnodes. So we just always copy 8787 // them since them being non-null during a mount doesn't affect the logic as 8788 // they will simply be overwritten. 8789 component: vnode.component, 8790 suspense: vnode.suspense, 8791 ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), 8792 ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), 8793 el: vnode.el, 8794 anchor: vnode.anchor, 8795 ctx: vnode.ctx, 8796 ce: vnode.ce 8797 }; 8798 if (transition && cloneTransition) { 8799 setTransitionHooks( 8800 cloned, 8801 transition.clone(cloned) 8802 ); 8803 } 8804 return cloned; 8805} 8806function deepCloneVNode(vnode) { 8807 const cloned = cloneVNode(vnode); 8808 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) { 8809 cloned.children = vnode.children.map(deepCloneVNode); 8810 } 8811 return cloned; 8812} 8813function createTextVNode(text = " ", flag = 0) { 8814 return createVNode(Text, null, text, flag); 8815} 8816function createStaticVNode(content, numberOfNodes) { 8817 const vnode = createVNode(Static, null, content); 8818 vnode.staticCount = numberOfNodes; 8819 return vnode; 8820} 8821function createCommentVNode(text = "", asBlock = false) { 8822 return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); 8823} 8824function normalizeVNode(child) { 8825 if (child == null || typeof child === "boolean") { 8826 return createVNode(Comment); 8827 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(child)) { 8828 return createVNode( 8829 Fragment, 8830 null, 8831 // #3666, avoid reference pollution when reusing vnode 8832 child.slice() 8833 ); 8834 } else if (typeof child === "object") { 8835 return cloneIfMounted(child); 8836 } else { 8837 return createVNode(Text, null, String(child)); 8838 } 8839} 8840function cloneIfMounted(child) { 8841 return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); 8842} 8843function normalizeChildren(vnode, children) { 8844 let type = 0; 8845 const { shapeFlag } = vnode; 8846 if (children == null) { 8847 children = null; 8848 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children)) { 8849 type = 16; 8850 } else if (typeof children === "object") { 8851 if (shapeFlag & (1 | 64)) { 8852 const slot = children.default; 8853 if (slot) { 8854 slot._c && (slot._d = false); 8855 normalizeChildren(vnode, slot()); 8856 slot._c && (slot._d = true); 8857 } 8858 return; 8859 } else { 8860 type = 32; 8861 const slotFlag = children._; 8862 if (!slotFlag && !isInternalObject(children)) { 8863 children._ctx = currentRenderingInstance; 8864 } else if (slotFlag === 3 && currentRenderingInstance) { 8865 if (currentRenderingInstance.slots._ === 1) { 8866 children._ = 1; 8867 } else { 8868 children._ = 2; 8869 vnode.patchFlag |= 1024; 8870 } 8871 } 8872 } 8873 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(children)) { 8874 children = { default: children, _ctx: currentRenderingInstance }; 8875 type = 32; 8876 } else { 8877 children = String(children); 8878 if (shapeFlag & 64) { 8879 type = 16; 8880 children = [createTextVNode(children)]; 8881 } else { 8882 type = 8; 8883 } 8884 } 8885 vnode.children = children; 8886 vnode.shapeFlag |= type; 8887} 8888function mergeProps(...args) { 8889 const ret = {}; 8890 for (let i = 0; i < args.length; i++) { 8891 const toMerge = args[i]; 8892 for (const key in toMerge) { 8893 if (key === "class") { 8894 if (ret.class !== toMerge.class) { 8895 ret.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([ret.class, toMerge.class]); 8896 } 8897 } else if (key === "style") { 8898 ret.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)([ret.style, toMerge.style]); 8899 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) { 8900 const existing = ret[key]; 8901 const incoming = toMerge[key]; 8902 if (incoming && existing !== incoming && !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && existing.includes(incoming))) { 8903 ret[key] = existing ? [].concat(existing, incoming) : incoming; 8904 } 8905 } else if (key !== "") { 8906 ret[key] = toMerge[key]; 8907 } 8908 } 8909 } 8910 return ret; 8911} 8912function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { 8913 callWithAsyncErrorHandling(hook, instance, 7, [ 8914 vnode, 8915 prevVNode 8916 ]); 8917} 8918 8919const emptyAppContext = createAppContext(); 8920let uid = 0; 8921function createComponentInstance(vnode, parent, suspense) { 8922 const type = vnode.type; 8923 const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; 8924 const instance = { 8925 uid: uid++, 8926 vnode, 8927 type, 8928 parent, 8929 appContext, 8930 root: null, 8931 // to be immediately set 8932 next: null, 8933 subTree: null, 8934 // will be set synchronously right after creation 8935 effect: null, 8936 update: null, 8937 // will be set synchronously right after creation 8938 scope: new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope( 8939 true 8940 /* detached */ 8941 ), 8942 render: null, 8943 proxy: null, 8944 exposed: null, 8945 exposeProxy: null, 8946 withProxy: null, 8947 provides: parent ? parent.provides : Object.create(appContext.provides), 8948 accessCache: null, 8949 renderCache: [], 8950 // local resolved assets 8951 components: null, 8952 directives: null, 8953 // resolved props and emits options 8954 propsOptions: normalizePropsOptions(type, appContext), 8955 emitsOptions: normalizeEmitsOptions(type, appContext), 8956 // emit 8957 emit: null, 8958 // to be set immediately 8959 emitted: null, 8960 // props default value 8961 propsDefaults: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8962 // inheritAttrs 8963 inheritAttrs: type.inheritAttrs, 8964 // state 8965 ctx: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8966 data: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8967 props: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8968 attrs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8969 slots: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8970 refs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8971 setupState: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ, 8972 setupContext: null, 8973 // suspense related 8974 suspense, 8975 suspenseId: suspense ? suspense.pendingId : 0, 8976 asyncDep: null, 8977 asyncResolved: false, 8978 // lifecycle hooks 8979 // not using enums here because it results in computed properties 8980 isMounted: false, 8981 isUnmounted: false, 8982 isDeactivated: false, 8983 bc: null, 8984 c: null, 8985 bm: null, 8986 m: null, 8987 bu: null, 8988 u: null, 8989 um: null, 8990 bum: null, 8991 da: null, 8992 a: null, 8993 rtg: null, 8994 rtc: null, 8995 ec: null, 8996 sp: null 8997 }; 8998 if (true) { 8999 instance.ctx = createDevRenderContext(instance); 9000 } else {} 9001 instance.root = parent ? parent.root : instance; 9002 instance.emit = emit.bind(null, instance); 9003 if (vnode.ce) { 9004 vnode.ce(instance); 9005 } 9006 return instance; 9007} 9008let currentInstance = null; 9009const getCurrentInstance = () => currentInstance || currentRenderingInstance; 9010let internalSetCurrentInstance; 9011let setInSSRSetupState; 9012{ 9013 const g = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)(); 9014 const registerGlobalSetter = (key, setter) => { 9015 let setters; 9016 if (!(setters = g[key])) setters = g[key] = []; 9017 setters.push(setter); 9018 return (v) => { 9019 if (setters.length > 1) setters.forEach((set) => set(v)); 9020 else setters[0](v); 9021 }; 9022 }; 9023 internalSetCurrentInstance = registerGlobalSetter( 9024 `__VUE_INSTANCE_SETTERS__`, 9025 (v) => currentInstance = v 9026 ); 9027 setInSSRSetupState = registerGlobalSetter( 9028 `__VUE_SSR_SETTERS__`, 9029 (v) => isInSSRComponentSetup = v 9030 ); 9031} 9032const setCurrentInstance = (instance) => { 9033 const prev = currentInstance; 9034 internalSetCurrentInstance(instance); 9035 instance.scope.on(); 9036 return () => { 9037 instance.scope.off(); 9038 internalSetCurrentInstance(prev); 9039 }; 9040}; 9041const unsetCurrentInstance = () => { 9042 currentInstance && currentInstance.scope.off(); 9043 internalSetCurrentInstance(null); 9044}; 9045const isBuiltInTag = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)("slot,component"); 9046function validateComponentName(name, { isNativeTag }) { 9047 if (isBuiltInTag(name) || isNativeTag(name)) { 9048 warn$1( 9049 "Do not use built-in or reserved HTML elements as component id: " + name 9050 ); 9051 } 9052} 9053function isStatefulComponent(instance) { 9054 return instance.vnode.shapeFlag & 4; 9055} 9056let isInSSRComponentSetup = false; 9057function setupComponent(instance, isSSR = false, optimized = false) { 9058 isSSR && setInSSRSetupState(isSSR); 9059 const { props, children } = instance.vnode; 9060 const isStateful = isStatefulComponent(instance); 9061 initProps(instance, props, isStateful, isSSR); 9062 initSlots(instance, children, optimized); 9063 const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; 9064 isSSR && setInSSRSetupState(false); 9065 return setupResult; 9066} 9067function setupStatefulComponent(instance, isSSR) { 9068 var _a; 9069 const Component = instance.type; 9070 if (true) { 9071 if (Component.name) { 9072 validateComponentName(Component.name, instance.appContext.config); 9073 } 9074 if (Component.components) { 9075 const names = Object.keys(Component.components); 9076 for (let i = 0; i < names.length; i++) { 9077 validateComponentName(names[i], instance.appContext.config); 9078 } 9079 } 9080 if (Component.directives) { 9081 const names = Object.keys(Component.directives); 9082 for (let i = 0; i < names.length; i++) { 9083 validateDirectiveName(names[i]); 9084 } 9085 } 9086 if (Component.compilerOptions && isRuntimeOnly()) { 9087 warn$1( 9088 `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` 9089 ); 9090 } 9091 } 9092 instance.accessCache = /* @__PURE__ */ Object.create(null); 9093 instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); 9094 if (true) { 9095 exposePropsOnRenderContext(instance); 9096 } 9097 const { setup } = Component; 9098 if (setup) { 9099 const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; 9100 const reset = setCurrentInstance(instance); 9101 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)(); 9102 const setupResult = callWithErrorHandling( 9103 setup, 9104 instance, 9105 0, 9106 [ 9107 true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(instance.props) : 0, 9108 setupContext 9109 ] 9110 ); 9111 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)(); 9112 reset(); 9113 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(setupResult)) { 9114 setupResult.then(unsetCurrentInstance, unsetCurrentInstance); 9115 if (isSSR) { 9116 return setupResult.then((resolvedResult) => { 9117 handleSetupResult(instance, resolvedResult, isSSR); 9118 }).catch((e) => { 9119 handleError(e, instance, 0); 9120 }); 9121 } else { 9122 instance.asyncDep = setupResult; 9123 if ( true && !instance.suspense) { 9124 const name = (_a = Component.name) != null ? _a : "Anonymous"; 9125 warn$1( 9126 `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` 9127 ); 9128 } 9129 } 9130 } else { 9131 handleSetupResult(instance, setupResult, isSSR); 9132 } 9133 } else { 9134 finishComponentSetup(instance, isSSR); 9135 } 9136} 9137function handleSetupResult(instance, setupResult, isSSR) { 9138 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(setupResult)) { 9139 if (instance.type.__ssrInlineRender) { 9140 instance.ssrRender = setupResult; 9141 } else { 9142 instance.render = setupResult; 9143 } 9144 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(setupResult)) { 9145 if ( true && isVNode(setupResult)) { 9146 warn$1( 9147 `setup() should not return VNodes directly - return a render function instead.` 9148 ); 9149 } 9150 if (true) { 9151 instance.devtoolsRawSetupState = setupResult; 9152 } 9153 instance.setupState = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)(setupResult); 9154 if (true) { 9155 exposeSetupStateOnRenderContext(instance); 9156 } 9157 } else if ( true && setupResult !== void 0) { 9158 warn$1( 9159 `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` 9160 ); 9161 } 9162 finishComponentSetup(instance, isSSR); 9163} 9164let compile; 9165let installWithProxy; 9166function registerRuntimeCompiler(_compile) { 9167 compile = _compile; 9168 installWithProxy = (i) => { 9169 if (i.render._rc) { 9170 i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); 9171 } 9172 }; 9173} 9174const isRuntimeOnly = () => !compile; 9175function finishComponentSetup(instance, isSSR, skipOptions) { 9176 const Component = instance.type; 9177 if (!instance.render) { 9178 if (!isSSR && compile && !Component.render) { 9179 const template = Component.template || resolveMergedOptions(instance).template; 9180 if (template) { 9181 if (true) { 9182 startMeasure(instance, `compile`); 9183 } 9184 const { isCustomElement, compilerOptions } = instance.appContext.config; 9185 const { delimiters, compilerOptions: componentCompilerOptions } = Component; 9186 const finalCompilerOptions = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)( 9187 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)( 9188 { 9189 isCustomElement, 9190 delimiters 9191 }, 9192 compilerOptions 9193 ), 9194 componentCompilerOptions 9195 ); 9196 Component.render = compile(template, finalCompilerOptions); 9197 if (true) { 9198 endMeasure(instance, `compile`); 9199 } 9200 } 9201 } 9202 instance.render = Component.render || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 9203 if (installWithProxy) { 9204 installWithProxy(instance); 9205 } 9206 } 9207 if (false) {} 9208 if ( true && !Component.render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP && !isSSR) { 9209 if (!compile && Component.template) { 9210 warn$1( 9211 `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) 9212 ); 9213 } else { 9214 warn$1(`Component is missing template or render function: `, Component); 9215 } 9216 } 9217} 9218const attrsProxyHandlers = true ? { 9219 get(target, key) { 9220 markAttrsAccessed(); 9221 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(target, "get", ""); 9222 return target[key]; 9223 }, 9224 set() { 9225 warn$1(`setupContext.attrs is readonly.`); 9226 return false; 9227 }, 9228 deleteProperty() { 9229 warn$1(`setupContext.attrs is readonly.`); 9230 return false; 9231 } 9232} : 0; 9233function getSlotsProxy(instance) { 9234 return new Proxy(instance.slots, { 9235 get(target, key) { 9236 (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", "$slots"); 9237 return target[key]; 9238 } 9239 }); 9240} 9241function createSetupContext(instance) { 9242 const expose = (exposed) => { 9243 if (true) { 9244 if (instance.exposed) { 9245 warn$1(`expose() should be called only once per setup().`); 9246 } 9247 if (exposed != null) { 9248 let exposedType = typeof exposed; 9249 if (exposedType === "object") { 9250 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(exposed)) { 9251 exposedType = "array"; 9252 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(exposed)) { 9253 exposedType = "ref"; 9254 } 9255 } 9256 if (exposedType !== "object") { 9257 warn$1( 9258 `expose() should be passed a plain object, received ${exposedType}.` 9259 ); 9260 } 9261 } 9262 } 9263 instance.exposed = exposed || {}; 9264 }; 9265 if (true) { 9266 let attrsProxy; 9267 let slotsProxy; 9268 return Object.freeze({ 9269 get attrs() { 9270 return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); 9271 }, 9272 get slots() { 9273 return slotsProxy || (slotsProxy = getSlotsProxy(instance)); 9274 }, 9275 get emit() { 9276 return (event, ...args) => instance.emit(event, ...args); 9277 }, 9278 expose 9279 }); 9280 } else {} 9281} 9282function getComponentPublicInstance(instance) { 9283 if (instance.exposed) { 9284 return instance.exposeProxy || (instance.exposeProxy = new Proxy((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw)(instance.exposed)), { 9285 get(target, key) { 9286 if (key in target) { 9287 return target[key]; 9288 } else if (key in publicPropertiesMap) { 9289 return publicPropertiesMap[key](instance); 9290 } 9291 }, 9292 has(target, key) { 9293 return key in target || key in publicPropertiesMap; 9294 } 9295 })); 9296 } else { 9297 return instance.proxy; 9298 } 9299} 9300const classifyRE = /(?:^|[-_])(\w)/g; 9301const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); 9302function getComponentName(Component, includeInferred = true) { 9303 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; 9304} 9305function formatComponentName(instance, Component, isRoot = false) { 9306 let name = getComponentName(Component); 9307 if (!name && Component.__file) { 9308 const match = Component.__file.match(/([^/\\]+)\.\w+$/); 9309 if (match) { 9310 name = match[1]; 9311 } 9312 } 9313 if (!name && instance && instance.parent) { 9314 const inferFromRegistry = (registry) => { 9315 for (const key in registry) { 9316 if (registry[key] === Component) { 9317 return key; 9318 } 9319 } 9320 }; 9321 name = inferFromRegistry( 9322 instance.components || instance.parent.type.components 9323 ) || inferFromRegistry(instance.appContext.components); 9324 } 9325 return name ? classify(name) : isRoot ? `App` : `Anonymous`; 9326} 9327function isClassComponent(value) { 9328 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value) && "__vccOpts" in value; 9329} 9330 9331const computed = (getterOrOptions, debugOptions) => { 9332 const c = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.computed)(getterOrOptions, debugOptions, isInSSRComponentSetup); 9333 if (true) { 9334 const i = getCurrentInstance(); 9335 if (i && i.appContext.config.warnRecursiveComputed) { 9336 c._warnRecursive = true; 9337 } 9338 } 9339 return c; 9340}; 9341 9342function h(type, propsOrChildren, children) { 9343 const l = arguments.length; 9344 if (l === 2) { 9345 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(propsOrChildren) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(propsOrChildren)) { 9346 if (isVNode(propsOrChildren)) { 9347 return createVNode(type, null, [propsOrChildren]); 9348 } 9349 return createVNode(type, propsOrChildren); 9350 } else { 9351 return createVNode(type, null, propsOrChildren); 9352 } 9353 } else { 9354 if (l > 3) { 9355 children = Array.prototype.slice.call(arguments, 2); 9356 } else if (l === 3 && isVNode(children)) { 9357 children = [children]; 9358 } 9359 return createVNode(type, propsOrChildren, children); 9360 } 9361} 9362 9363function initCustomFormatter() { 9364 if ( false || typeof window === "undefined") { 9365 return; 9366 } 9367 const vueStyle = { style: "color:#3ba776" }; 9368 const numberStyle = { style: "color:#1677ff" }; 9369 const stringStyle = { style: "color:#f5222d" }; 9370 const keywordStyle = { style: "color:#eb2f96" }; 9371 const formatter = { 9372 __vue_custom_formatter: true, 9373 header(obj) { 9374 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) { 9375 return null; 9376 } 9377 if (obj.__isVue) { 9378 return ["div", vueStyle, `VueInstance`]; 9379 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(obj)) { 9380 return [ 9381 "div", 9382 {}, 9383 ["span", vueStyle, genRefFlag(obj)], 9384 "<", 9385 formatValue(obj.value), 9386 `>` 9387 ]; 9388 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(obj)) { 9389 return [ 9390 "div", 9391 {}, 9392 ["span", vueStyle, (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(obj) ? "ShallowReactive" : "Reactive"], 9393 "<", 9394 formatValue(obj), 9395 `>${(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj) ? ` (readonly)` : ``}` 9396 ]; 9397 } else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj)) { 9398 return [ 9399 "div", 9400 {}, 9401 ["span", vueStyle, (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(obj) ? "ShallowReadonly" : "Readonly"], 9402 "<", 9403 formatValue(obj), 9404 ">" 9405 ]; 9406 } 9407 return null; 9408 }, 9409 hasBody(obj) { 9410 return obj && obj.__isVue; 9411 }, 9412 body(obj) { 9413 if (obj && obj.__isVue) { 9414 return [ 9415 "div", 9416 {}, 9417 ...formatInstance(obj.$) 9418 ]; 9419 } 9420 } 9421 }; 9422 function formatInstance(instance) { 9423 const blocks = []; 9424 if (instance.type.props && instance.props) { 9425 blocks.push(createInstanceBlock("props", (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.props))); 9426 } 9427 if (instance.setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) { 9428 blocks.push(createInstanceBlock("setup", instance.setupState)); 9429 } 9430 if (instance.data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) { 9431 blocks.push(createInstanceBlock("data", (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.data))); 9432 } 9433 const computed = extractKeys(instance, "computed"); 9434 if (computed) { 9435 blocks.push(createInstanceBlock("computed", computed)); 9436 } 9437 const injected = extractKeys(instance, "inject"); 9438 if (injected) { 9439 blocks.push(createInstanceBlock("injected", injected)); 9440 } 9441 blocks.push([ 9442 "div", 9443 {}, 9444 [ 9445 "span", 9446 { 9447 style: keywordStyle.style + ";opacity:0.66" 9448 }, 9449 "$ (internal): " 9450 ], 9451 ["object", { object: instance }] 9452 ]); 9453 return blocks; 9454 } 9455 function createInstanceBlock(type, target) { 9456 target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, target); 9457 if (!Object.keys(target).length) { 9458 return ["span", {}]; 9459 } 9460 return [ 9461 "div", 9462 { style: "line-height:1.25em;margin-bottom:0.6em" }, 9463 [ 9464 "div", 9465 { 9466 style: "color:#476582" 9467 }, 9468 type 9469 ], 9470 [ 9471 "div", 9472 { 9473 style: "padding-left:1.25em" 9474 }, 9475 ...Object.keys(target).map((key) => { 9476 return [ 9477 "div", 9478 {}, 9479 ["span", keywordStyle, key + ": "], 9480 formatValue(target[key], false) 9481 ]; 9482 }) 9483 ] 9484 ]; 9485 } 9486 function formatValue(v, asRaw = true) { 9487 if (typeof v === "number") { 9488 return ["span", numberStyle, v]; 9489 } else if (typeof v === "string") { 9490 return ["span", stringStyle, JSON.stringify(v)]; 9491 } else if (typeof v === "boolean") { 9492 return ["span", keywordStyle, v]; 9493 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(v)) { 9494 return ["object", { object: asRaw ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(v) : v }]; 9495 } else { 9496 return ["span", stringStyle, String(v)]; 9497 } 9498 } 9499 function extractKeys(instance, type) { 9500 const Comp = instance.type; 9501 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Comp)) { 9502 return; 9503 } 9504 const extracted = {}; 9505 for (const key in instance.ctx) { 9506 if (isKeyOfType(Comp, key, type)) { 9507 extracted[key] = instance.ctx[key]; 9508 } 9509 } 9510 return extracted; 9511 } 9512 function isKeyOfType(Comp, key, type) { 9513 const opts = Comp[type]; 9514 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opts) && opts.includes(key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opts) && key in opts) { 9515 return true; 9516 } 9517 if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { 9518 return true; 9519 } 9520 if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { 9521 return true; 9522 } 9523 } 9524 function genRefFlag(v) { 9525 if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(v)) { 9526 return `ShallowRef`; 9527 } 9528 if (v.effect) { 9529 return `ComputedRef`; 9530 } 9531 return `Ref`; 9532 } 9533 if (window.devtoolsFormatters) { 9534 window.devtoolsFormatters.push(formatter); 9535 } else { 9536 window.devtoolsFormatters = [formatter]; 9537 } 9538} 9539 9540function withMemo(memo, render, cache, index) { 9541 const cached = cache[index]; 9542 if (cached && isMemoSame(cached, memo)) { 9543 return cached; 9544 } 9545 const ret = render(); 9546 ret.memo = memo.slice(); 9547 ret.cacheIndex = index; 9548 return cache[index] = ret; 9549} 9550function isMemoSame(cached, memo) { 9551 const prev = cached.memo; 9552 if (prev.length != memo.length) { 9553 return false; 9554 } 9555 for (let i = 0; i < prev.length; i++) { 9556 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(prev[i], memo[i])) { 9557 return false; 9558 } 9559 } 9560 if (isBlockTreeEnabled > 0 && currentBlock) { 9561 currentBlock.push(cached); 9562 } 9563 return true; 9564} 9565 9566const version = "3.4.37"; 9567const warn = true ? warn$1 : 0; 9568const ErrorTypeStrings = ErrorTypeStrings$1 ; 9569const devtools = true ? devtools$1 : 0; 9570const setDevtoolsHook = true ? setDevtoolsHook$1 : 0; 9571const _ssrUtils = { 9572 createComponentInstance, 9573 setupComponent, 9574 renderComponentRoot, 9575 setCurrentRenderingInstance, 9576 isVNode: isVNode, 9577 normalizeVNode, 9578 getComponentPublicInstance, 9579 ensureValidVNode 9580}; 9581const ssrUtils = _ssrUtils ; 9582const resolveFilter = null; 9583const compatUtils = null; 9584const DeprecationTypes = null; 9585 9586 9587 9588 9589/***/ }), 9590
vendor: 73,814 bytes, lines 9591-11380
9591/***/ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js": 9592/*!***********************************************************************!*\ 9593 !*** ./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js ***! 9594 \***********************************************************************/ 9595/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9596 9597"use strict"; 9598__webpack_require__.r(__webpack_exports__); 9599/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9600/* harmony export */ BaseTransition: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition), 9601/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators), 9602/* harmony export */ Comment: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Comment), 9603/* harmony export */ DeprecationTypes: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.DeprecationTypes), 9604/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.EffectScope), 9605/* harmony export */ ErrorCodes: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ErrorCodes), 9606/* harmony export */ ErrorTypeStrings: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ErrorTypeStrings), 9607/* harmony export */ Fragment: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment), 9608/* harmony export */ KeepAlive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.KeepAlive), 9609/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect), 9610/* harmony export */ Static: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static), 9611/* harmony export */ Suspense: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Suspense), 9612/* harmony export */ Teleport: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Teleport), 9613/* harmony export */ Text: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Text), 9614/* harmony export */ TrackOpTypes: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.TrackOpTypes), 9615/* harmony export */ Transition: () => (/* binding */ Transition), 9616/* harmony export */ TransitionGroup: () => (/* binding */ TransitionGroup), 9617/* harmony export */ TriggerOpTypes: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.TriggerOpTypes), 9618/* harmony export */ VueElement: () => (/* binding */ VueElement), 9619/* harmony export */ assertNumber: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.assertNumber), 9620/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling), 9621/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling), 9622/* harmony export */ camelize: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.camelize), 9623/* harmony export */ capitalize: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.capitalize), 9624/* harmony export */ cloneVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.cloneVNode), 9625/* harmony export */ compatUtils: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.compatUtils), 9626/* harmony export */ computed: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.computed), 9627/* harmony export */ createApp: () => (/* binding */ createApp), 9628/* harmony export */ createBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createBlock), 9629/* harmony export */ createCommentVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode), 9630/* harmony export */ createElementBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementBlock), 9631/* harmony export */ createElementVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementVNode), 9632/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer), 9633/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy), 9634/* harmony export */ createRenderer: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer), 9635/* harmony export */ createSSRApp: () => (/* binding */ createSSRApp), 9636/* harmony export */ createSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createSlots), 9637/* harmony export */ createStaticVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode), 9638/* harmony export */ createTextVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createTextVNode), 9639/* harmony export */ createVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode), 9640/* harmony export */ customRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.customRef), 9641/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent), 9642/* harmony export */ defineComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent), 9643/* harmony export */ defineCustomElement: () => (/* binding */ defineCustomElement), 9644/* harmony export */ defineEmits: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineEmits), 9645/* harmony export */ defineExpose: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineExpose), 9646/* harmony export */ defineModel: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineModel), 9647/* harmony export */ defineOptions: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineOptions), 9648/* harmony export */ defineProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineProps), 9649/* harmony export */ defineSSRCustomElement: () => (/* binding */ defineSSRCustomElement), 9650/* harmony export */ defineSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineSlots), 9651/* harmony export */ devtools: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.devtools), 9652/* harmony export */ effect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effect), 9653/* harmony export */ effectScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effectScope), 9654/* harmony export */ getCurrentInstance: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance), 9655/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope), 9656/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren), 9657/* harmony export */ guardReactiveProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps), 9658/* harmony export */ h: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h), 9659/* harmony export */ handleError: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.handleError), 9660/* harmony export */ hasInjectionContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext), 9661/* harmony export */ hydrate: () => (/* binding */ hydrate), 9662/* harmony export */ initCustomFormatter: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter), 9663/* harmony export */ initDirectivesForSSR: () => (/* binding */ initDirectivesForSSR), 9664/* harmony export */ inject: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.inject), 9665/* harmony export */ isMemoSame: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isMemoSame), 9666/* harmony export */ isProxy: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isProxy), 9667/* harmony export */ isReactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReactive), 9668/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReadonly), 9669/* harmony export */ isRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRef), 9670/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly), 9671/* harmony export */ isShallow: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isShallow), 9672/* harmony export */ isVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isVNode), 9673/* harmony export */ markRaw: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.markRaw), 9674/* harmony export */ mergeDefaults: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults), 9675/* harmony export */ mergeModels: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeModels), 9676/* harmony export */ mergeProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeProps), 9677/* harmony export */ nextTick: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick), 9678/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeClass), 9679/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeProps), 9680/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle), 9681/* harmony export */ onActivated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onActivated), 9682/* harmony export */ onBeforeMount: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount), 9683/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount), 9684/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate), 9685/* harmony export */ onDeactivated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onDeactivated), 9686/* harmony export */ onErrorCaptured: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured), 9687/* harmony export */ onMounted: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted), 9688/* harmony export */ onRenderTracked: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked), 9689/* harmony export */ onRenderTriggered: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered), 9690/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose), 9691/* harmony export */ onServerPrefetch: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch), 9692/* harmony export */ onUnmounted: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted), 9693/* harmony export */ onUpdated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated), 9694/* harmony export */ openBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.openBlock), 9695/* harmony export */ popScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.popScopeId), 9696/* harmony export */ provide: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.provide), 9697/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.proxyRefs), 9698/* harmony export */ pushScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.pushScopeId), 9699/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb), 9700/* harmony export */ reactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.reactive), 9701/* harmony export */ readonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.readonly), 9702/* harmony export */ ref: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ref), 9703/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler), 9704/* harmony export */ render: () => (/* binding */ render), 9705/* harmony export */ renderList: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderList), 9706/* harmony export */ renderSlot: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderSlot), 9707/* harmony export */ resolveComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveComponent), 9708/* harmony export */ resolveDirective: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDirective), 9709/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent), 9710/* harmony export */ resolveFilter: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveFilter), 9711/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks), 9712/* harmony export */ setBlockTracking: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking), 9713/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook), 9714/* harmony export */ setTransitionHooks: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks), 9715/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReactive), 9716/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly), 9717/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowRef), 9718/* harmony export */ ssrContextKey: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey), 9719/* harmony export */ ssrUtils: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrUtils), 9720/* harmony export */ stop: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.stop), 9721/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toDisplayString), 9722/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey), 9723/* harmony export */ toHandlers: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlers), 9724/* harmony export */ toRaw: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRaw), 9725/* harmony export */ toRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRef), 9726/* harmony export */ toRefs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRefs), 9727/* harmony export */ toValue: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toValue), 9728/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs), 9729/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.triggerRef), 9730/* harmony export */ unref: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.unref), 9731/* harmony export */ useAttrs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useAttrs), 9732/* harmony export */ useCssModule: () => (/* binding */ useCssModule), 9733/* harmony export */ useCssVars: () => (/* binding */ useCssVars), 9734/* harmony export */ useModel: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useModel), 9735/* harmony export */ useSSRContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSSRContext), 9736/* harmony export */ useSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSlots), 9737/* harmony export */ useTransitionState: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState), 9738/* harmony export */ vModelCheckbox: () => (/* binding */ vModelCheckbox), 9739/* harmony export */ vModelDynamic: () => (/* binding */ vModelDynamic), 9740/* harmony export */ vModelRadio: () => (/* binding */ vModelRadio), 9741/* harmony export */ vModelSelect: () => (/* binding */ vModelSelect), 9742/* harmony export */ vModelText: () => (/* binding */ vModelText), 9743/* harmony export */ vShow: () => (/* binding */ vShow), 9744/* harmony export */ version: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.version), 9745/* harmony export */ warn: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn), 9746/* harmony export */ watch: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watch), 9747/* harmony export */ watchEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchEffect), 9748/* harmony export */ watchPostEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect), 9749/* harmony export */ watchSyncEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect), 9750/* harmony export */ withAsyncContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext), 9751/* harmony export */ withCtx: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withCtx), 9752/* harmony export */ withDefaults: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDefaults), 9753/* harmony export */ withDirectives: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDirectives), 9754/* harmony export */ withKeys: () => (/* binding */ withKeys), 9755/* harmony export */ withMemo: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withMemo), 9756/* harmony export */ withModifiers: () => (/* binding */ withModifiers), 9757/* harmony export */ withScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withScopeId) 9758/* harmony export */ }); 9759/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js"); 9760/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js"); 9761/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js"); 9762/** 9763* @vue/runtime-dom v3.4.37 9764* (c) 2018-present Yuxi (Evan) You and Vue contributors 9765* @license MIT 9766**/ 9767 9768 9769 9770 9771const svgNS = "http://www.w3.org/2000/svg"; 9772const mathmlNS = "http://www.w3.org/1998/Math/MathML"; 9773const doc = typeof document !== "undefined" ? document : null; 9774const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); 9775const nodeOps = { 9776 insert: (child, parent, anchor) => { 9777 parent.insertBefore(child, anchor || null); 9778 }, 9779 remove: (child) => { 9780 const parent = child.parentNode; 9781 if (parent) { 9782 parent.removeChild(child); 9783 } 9784 }, 9785 createElement: (tag, namespace, is, props) => { 9786 const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); 9787 if (tag === "select" && props && props.multiple != null) { 9788 el.setAttribute("multiple", props.multiple); 9789 } 9790 return el; 9791 }, 9792 createText: (text) => doc.createTextNode(text), 9793 createComment: (text) => doc.createComment(text), 9794 setText: (node, text) => { 9795 node.nodeValue = text; 9796 }, 9797 setElementText: (el, text) => { 9798 el.textContent = text; 9799 }, 9800 parentNode: (node) => node.parentNode, 9801 nextSibling: (node) => node.nextSibling, 9802 querySelector: (selector) => doc.querySelector(selector), 9803 setScopeId(el, id) { 9804 el.setAttribute(id, ""); 9805 }, 9806 // __UNSAFE__ 9807 // Reason: innerHTML. 9808 // Static content here can only come from compiled templates. 9809 // As long as the user only uses trusted templates, this is safe. 9810 insertStaticContent(content, parent, anchor, namespace, start, end) { 9811 const before = anchor ? anchor.previousSibling : parent.lastChild; 9812 if (start && (start === end || start.nextSibling)) { 9813 while (true) { 9814 parent.insertBefore(start.cloneNode(true), anchor); 9815 if (start === end || !(start = start.nextSibling)) break; 9816 } 9817 } else { 9818 templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; 9819 const template = templateContainer.content; 9820 if (namespace === "svg" || namespace === "mathml") { 9821 const wrapper = template.firstChild; 9822 while (wrapper.firstChild) { 9823 template.appendChild(wrapper.firstChild); 9824 } 9825 template.removeChild(wrapper); 9826 } 9827 parent.insertBefore(template, anchor); 9828 } 9829 return [ 9830 // first 9831 before ? before.nextSibling : parent.firstChild, 9832 // last 9833 anchor ? anchor.previousSibling : parent.lastChild 9834 ]; 9835 } 9836}; 9837 9838const TRANSITION = "transition"; 9839const ANIMATION = "animation"; 9840const vtcKey = Symbol("_vtc"); 9841const Transition = (props, { slots }) => (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h)(_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition, resolveTransitionProps(props), slots); 9842Transition.displayName = "Transition"; 9843const DOMTransitionPropsValidators = { 9844 name: String, 9845 type: String, 9846 css: { 9847 type: Boolean, 9848 default: true 9849 }, 9850 duration: [String, Number, Object], 9851 enterFromClass: String, 9852 enterActiveClass: String, 9853 enterToClass: String, 9854 appearFromClass: String, 9855 appearActiveClass: String, 9856 appearToClass: String, 9857 leaveFromClass: String, 9858 leaveActiveClass: String, 9859 leaveToClass: String 9860}; 9861const TransitionPropsValidators = Transition.props = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)( 9862 {}, 9863 _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators, 9864 DOMTransitionPropsValidators 9865); 9866const callHook = (hook, args = []) => { 9867 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) { 9868 hook.forEach((h2) => h2(...args)); 9869 } else if (hook) { 9870 hook(...args); 9871 } 9872}; 9873const hasExplicitCallback = (hook) => { 9874 return hook ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; 9875}; 9876function resolveTransitionProps(rawProps) { 9877 const baseProps = {}; 9878 for (const key in rawProps) { 9879 if (!(key in DOMTransitionPropsValidators)) { 9880 baseProps[key] = rawProps[key]; 9881 } 9882 } 9883 if (rawProps.css === false) { 9884 return baseProps; 9885 } 9886 const { 9887 name = "v", 9888 type, 9889 duration, 9890 enterFromClass = `${name}-enter-from`, 9891 enterActiveClass = `${name}-enter-active`, 9892 enterToClass = `${name}-enter-to`, 9893 appearFromClass = enterFromClass, 9894 appearActiveClass = enterActiveClass, 9895 appearToClass = enterToClass, 9896 leaveFromClass = `${name}-leave-from`, 9897 leaveActiveClass = `${name}-leave-active`, 9898 leaveToClass = `${name}-leave-to` 9899 } = rawProps; 9900 const durations = normalizeDuration(duration); 9901 const enterDuration = durations && durations[0]; 9902 const leaveDuration = durations && durations[1]; 9903 const { 9904 onBeforeEnter, 9905 onEnter, 9906 onEnterCancelled, 9907 onLeave, 9908 onLeaveCancelled, 9909 onBeforeAppear = onBeforeEnter, 9910 onAppear = onEnter, 9911 onAppearCancelled = onEnterCancelled 9912 } = baseProps; 9913 const finishEnter = (el, isAppear, done) => { 9914 removeTransitionClass(el, isAppear ? appearToClass : enterToClass); 9915 removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); 9916 done && done(); 9917 }; 9918 const finishLeave = (el, done) => { 9919 el._isLeaving = false; 9920 removeTransitionClass(el, leaveFromClass); 9921 removeTransitionClass(el, leaveToClass); 9922 removeTransitionClass(el, leaveActiveClass); 9923 done && done(); 9924 }; 9925 const makeEnterHook = (isAppear) => { 9926 return (el, done) => { 9927 const hook = isAppear ? onAppear : onEnter; 9928 const resolve = () => finishEnter(el, isAppear, done); 9929 callHook(hook, [el, resolve]); 9930 nextFrame(() => { 9931 removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); 9932 addTransitionClass(el, isAppear ? appearToClass : enterToClass); 9933 if (!hasExplicitCallback(hook)) { 9934 whenTransitionEnds(el, type, enterDuration, resolve); 9935 } 9936 }); 9937 }; 9938 }; 9939 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(baseProps, { 9940 onBeforeEnter(el) { 9941 callHook(onBeforeEnter, [el]); 9942 addTransitionClass(el, enterFromClass); 9943 addTransitionClass(el, enterActiveClass); 9944 }, 9945 onBeforeAppear(el) { 9946 callHook(onBeforeAppear, [el]); 9947 addTransitionClass(el, appearFromClass); 9948 addTransitionClass(el, appearActiveClass); 9949 }, 9950 onEnter: makeEnterHook(false), 9951 onAppear: makeEnterHook(true), 9952 onLeave(el, done) { 9953 el._isLeaving = true; 9954 const resolve = () => finishLeave(el, done); 9955 addTransitionClass(el, leaveFromClass); 9956 addTransitionClass(el, leaveActiveClass); 9957 forceReflow(); 9958 nextFrame(() => { 9959 if (!el._isLeaving) { 9960 return; 9961 } 9962 removeTransitionClass(el, leaveFromClass); 9963 addTransitionClass(el, leaveToClass); 9964 if (!hasExplicitCallback(onLeave)) { 9965 whenTransitionEnds(el, type, leaveDuration, resolve); 9966 } 9967 }); 9968 callHook(onLeave, [el, resolve]); 9969 }, 9970 onEnterCancelled(el) { 9971 finishEnter(el, false); 9972 callHook(onEnterCancelled, [el]); 9973 }, 9974 onAppearCancelled(el) { 9975 finishEnter(el, true); 9976 callHook(onAppearCancelled, [el]); 9977 }, 9978 onLeaveCancelled(el) { 9979 finishLeave(el); 9980 callHook(onLeaveCancelled, [el]); 9981 } 9982 }); 9983} 9984function normalizeDuration(duration) { 9985 if (duration == null) { 9986 return null; 9987 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(duration)) { 9988 return [NumberOf(duration.enter), NumberOf(duration.leave)]; 9989 } else { 9990 const n = NumberOf(duration); 9991 return [n, n]; 9992 } 9993} 9994function NumberOf(val) { 9995 const res = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(val); 9996 if (true) { 9997 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.assertNumber)(res, "<transition> explicit duration"); 9998 } 9999 return res; 10000} 10001function addTransitionClass(el, cls) { 10002 cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); 10003 (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); 10004} 10005function removeTransitionClass(el, cls) { 10006 cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); 10007 const _vtc = el[vtcKey]; 10008 if (_vtc) { 10009 _vtc.delete(cls); 10010 if (!_vtc.size) { 10011 el[vtcKey] = void 0; 10012 } 10013 } 10014} 10015function nextFrame(cb) { 10016 requestAnimationFrame(() => { 10017 requestAnimationFrame(cb); 10018 }); 10019} 10020let endId = 0; 10021function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { 10022 const id = el._endId = ++endId; 10023 const resolveIfNotStale = () => { 10024 if (id === el._endId) { 10025 resolve(); 10026 } 10027 }; 10028 if (explicitTimeout) { 10029 return setTimeout(resolveIfNotStale, explicitTimeout); 10030 } 10031 const { type, timeout, propCount } = getTransitionInfo(el, expectedType); 10032 if (!type) { 10033 return resolve(); 10034 } 10035 const endEvent = type + "end"; 10036 let ended = 0; 10037 const end = () => { 10038 el.removeEventListener(endEvent, onEnd); 10039 resolveIfNotStale(); 10040 }; 10041 const onEnd = (e) => { 10042 if (e.target === el && ++ended >= propCount) { 10043 end(); 10044 } 10045 }; 10046 setTimeout(() => { 10047 if (ended < propCount) { 10048 end(); 10049 } 10050 }, timeout + 1); 10051 el.addEventListener(endEvent, onEnd); 10052} 10053function getTransitionInfo(el, expectedType) { 10054 const styles = window.getComputedStyle(el); 10055 const getStyleProperties = (key) => (styles[key] || "").split(", "); 10056 const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); 10057 const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); 10058 const transitionTimeout = getTimeout(transitionDelays, transitionDurations); 10059 const animationDelays = getStyleProperties(`${ANIMATION}Delay`); 10060 const animationDurations = getStyleProperties(`${ANIMATION}Duration`); 10061 const animationTimeout = getTimeout(animationDelays, animationDurations); 10062 let type = null; 10063 let timeout = 0; 10064 let propCount = 0; 10065 if (expectedType === TRANSITION) { 10066 if (transitionTimeout > 0) { 10067 type = TRANSITION; 10068 timeout = transitionTimeout; 10069 propCount = transitionDurations.length; 10070 } 10071 } else if (expectedType === ANIMATION) { 10072 if (animationTimeout > 0) { 10073 type = ANIMATION; 10074 timeout = animationTimeout; 10075 propCount = animationDurations.length; 10076 } 10077 } else { 10078 timeout = Math.max(transitionTimeout, animationTimeout); 10079 type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; 10080 propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; 10081 } 10082 const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( 10083 getStyleProperties(`${TRANSITION}Property`).toString() 10084 ); 10085 return { 10086 type, 10087 timeout, 10088 propCount, 10089 hasTransform 10090 }; 10091} 10092function getTimeout(delays, durations) { 10093 while (delays.length < durations.length) { 10094 delays = delays.concat(delays); 10095 } 10096 return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); 10097} 10098function toMs(s) { 10099 if (s === "auto") return 0; 10100 return Number(s.slice(0, -1).replace(",", ".")) * 1e3; 10101} 10102function forceReflow() { 10103 return document.body.offsetHeight; 10104} 10105 10106function patchClass(el, value, isSVG) { 10107 const transitionClasses = el[vtcKey]; 10108 if (transitionClasses) { 10109 value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); 10110 } 10111 if (value == null) { 10112 el.removeAttribute("class"); 10113 } else if (isSVG) { 10114 el.setAttribute("class", value); 10115 } else { 10116 el.className = value; 10117 } 10118} 10119 10120const vShowOriginalDisplay = Symbol("_vod"); 10121const vShowHidden = Symbol("_vsh"); 10122const vShow = { 10123 beforeMount(el, { value }, { transition }) { 10124 el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; 10125 if (transition && value) { 10126 transition.beforeEnter(el); 10127 } else { 10128 setDisplay(el, value); 10129 } 10130 }, 10131 mounted(el, { value }, { transition }) { 10132 if (transition && value) { 10133 transition.enter(el); 10134 } 10135 }, 10136 updated(el, { value, oldValue }, { transition }) { 10137 if (!value === !oldValue) return; 10138 if (transition) { 10139 if (value) { 10140 transition.beforeEnter(el); 10141 setDisplay(el, true); 10142 transition.enter(el); 10143 } else { 10144 transition.leave(el, () => { 10145 setDisplay(el, false); 10146 }); 10147 } 10148 } else { 10149 setDisplay(el, value); 10150 } 10151 }, 10152 beforeUnmount(el, { value }) { 10153 setDisplay(el, value); 10154 } 10155}; 10156if (true) { 10157 vShow.name = "show"; 10158} 10159function setDisplay(el, value) { 10160 el.style.display = value ? el[vShowOriginalDisplay] : "none"; 10161 el[vShowHidden] = !value; 10162} 10163function initVShowForSSR() { 10164 vShow.getSSRProps = ({ value }) => { 10165 if (!value) { 10166 return { style: { display: "none" } }; 10167 } 10168 }; 10169} 10170 10171const CSS_VAR_TEXT = Symbol( true ? "CSS_VAR_TEXT" : 0); 10172function useCssVars(getter) { 10173 const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)(); 10174 if (!instance) { 10175 true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssVars is called without current active component instance.`); 10176 return; 10177 } 10178 const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { 10179 Array.from( 10180 document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) 10181 ).forEach((node) => setVarsOnNode(node, vars)); 10182 }; 10183 if (true) { 10184 instance.getCssVars = () => getter(instance.proxy); 10185 } 10186 const setVars = () => { 10187 const vars = getter(instance.proxy); 10188 setVarsOnVNode(instance.subTree, vars); 10189 updateTeleports(vars); 10190 }; 10191 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(() => { 10192 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect)(setVars); 10193 }); 10194 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 10195 const ob = new MutationObserver(setVars); 10196 ob.observe(instance.subTree.el.parentNode, { childList: true }); 10197 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => ob.disconnect()); 10198 }); 10199} 10200function setVarsOnVNode(vnode, vars) { 10201 if (vnode.shapeFlag & 128) { 10202 const suspense = vnode.suspense; 10203 vnode = suspense.activeBranch; 10204 if (suspense.pendingBranch && !suspense.isHydrating) { 10205 suspense.effects.push(() => { 10206 setVarsOnVNode(suspense.activeBranch, vars); 10207 }); 10208 } 10209 } 10210 while (vnode.component) { 10211 vnode = vnode.component.subTree; 10212 } 10213 if (vnode.shapeFlag & 1 && vnode.el) { 10214 setVarsOnNode(vnode.el, vars); 10215 } else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment) { 10216 vnode.children.forEach((c) => setVarsOnVNode(c, vars)); 10217 } else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static) { 10218 let { el, anchor } = vnode; 10219 while (el) { 10220 setVarsOnNode(el, vars); 10221 if (el === anchor) break; 10222 el = el.nextSibling; 10223 } 10224 } 10225} 10226function setVarsOnNode(el, vars) { 10227 if (el.nodeType === 1) { 10228 const style = el.style; 10229 let cssText = ""; 10230 for (const key in vars) { 10231 style.setProperty(`--${key}`, vars[key]); 10232 cssText += `--${key}: ${vars[key]};`; 10233 } 10234 style[CSS_VAR_TEXT] = cssText; 10235 } 10236} 10237 10238const displayRE = /(^|;)\s*display\s*:/; 10239function patchStyle(el, prev, next) { 10240 const style = el.style; 10241 const isCssString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(next); 10242 let hasControlledDisplay = false; 10243 if (next && !isCssString) { 10244 if (prev) { 10245 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(prev)) { 10246 for (const key in prev) { 10247 if (next[key] == null) { 10248 setStyle(style, key, ""); 10249 } 10250 } 10251 } else { 10252 for (const prevStyle of prev.split(";")) { 10253 const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); 10254 if (next[key] == null) { 10255 setStyle(style, key, ""); 10256 } 10257 } 10258 } 10259 } 10260 for (const key in next) { 10261 if (key === "display") { 10262 hasControlledDisplay = true; 10263 } 10264 setStyle(style, key, next[key]); 10265 } 10266 } else { 10267 if (isCssString) { 10268 if (prev !== next) { 10269 const cssVarText = style[CSS_VAR_TEXT]; 10270 if (cssVarText) { 10271 next += ";" + cssVarText; 10272 } 10273 style.cssText = next; 10274 hasControlledDisplay = displayRE.test(next); 10275 } 10276 } else if (prev) { 10277 el.removeAttribute("style"); 10278 } 10279 } 10280 if (vShowOriginalDisplay in el) { 10281 el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; 10282 if (el[vShowHidden]) { 10283 style.display = "none"; 10284 } 10285 } 10286} 10287const semicolonRE = /[^\\];\s*$/; 10288const importantRE = /\s*!important$/; 10289function setStyle(style, name, val) { 10290 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(val)) { 10291 val.forEach((v) => setStyle(style, name, v)); 10292 } else { 10293 if (val == null) val = ""; 10294 if (true) { 10295 if (semicolonRE.test(val)) { 10296 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 10297 `Unexpected semicolon at the end of '${name}' style value: '${val}'` 10298 ); 10299 } 10300 } 10301 if (name.startsWith("--")) { 10302 style.setProperty(name, val); 10303 } else { 10304 const prefixed = autoPrefix(style, name); 10305 if (importantRE.test(val)) { 10306 style.setProperty( 10307 (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(prefixed), 10308 val.replace(importantRE, ""), 10309 "important" 10310 ); 10311 } else { 10312 style[prefixed] = val; 10313 } 10314 } 10315 } 10316} 10317const prefixes = ["Webkit", "Moz", "ms"]; 10318const prefixCache = {}; 10319function autoPrefix(style, rawName) { 10320 const cached = prefixCache[rawName]; 10321 if (cached) { 10322 return cached; 10323 } 10324 let name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(rawName); 10325 if (name !== "filter" && name in style) { 10326 return prefixCache[rawName] = name; 10327 } 10328 name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(name); 10329 for (let i = 0; i < prefixes.length; i++) { 10330 const prefixed = prefixes[i] + name; 10331 if (prefixed in style) { 10332 return prefixCache[rawName] = prefixed; 10333 } 10334 } 10335 return rawName; 10336} 10337 10338const xlinkNS = "http://www.w3.org/1999/xlink"; 10339function patchAttr(el, key, value, isSVG, instance, isBoolean = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSpecialBooleanAttr)(key)) { 10340 if (isSVG && key.startsWith("xlink:")) { 10341 if (value == null) { 10342 el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); 10343 } else { 10344 el.setAttributeNS(xlinkNS, key, value); 10345 } 10346 } else { 10347 if (value == null || isBoolean && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value)) { 10348 el.removeAttribute(key); 10349 } else { 10350 el.setAttribute( 10351 key, 10352 isBoolean ? "" : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSymbol)(value) ? String(value) : value 10353 ); 10354 } 10355 } 10356} 10357 10358function patchDOMProp(el, key, value, parentComponent) { 10359 if (key === "innerHTML" || key === "textContent") { 10360 if (value == null) return; 10361 el[key] = value; 10362 return; 10363 } 10364 const tag = el.tagName; 10365 if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally 10366 !tag.includes("-")) { 10367 const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; 10368 const newValue = value == null ? "" : String(value); 10369 if (oldValue !== newValue || !("_value" in el)) { 10370 el.value = newValue; 10371 } 10372 if (value == null) { 10373 el.removeAttribute(key); 10374 } 10375 el._value = value; 10376 return; 10377 } 10378 let needRemove = false; 10379 if (value === "" || value == null) { 10380 const type = typeof el[key]; 10381 if (type === "boolean") { 10382 value = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value); 10383 } else if (value == null && type === "string") { 10384 value = ""; 10385 needRemove = true; 10386 } else if (type === "number") { 10387 value = 0; 10388 needRemove = true; 10389 } 10390 } 10391 try { 10392 el[key] = value; 10393 } catch (e) { 10394 if ( true && !needRemove) { 10395 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 10396 `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, 10397 e 10398 ); 10399 } 10400 } 10401 needRemove && el.removeAttribute(key); 10402} 10403 10404function addEventListener(el, event, handler, options) { 10405 el.addEventListener(event, handler, options); 10406} 10407function removeEventListener(el, event, handler, options) { 10408 el.removeEventListener(event, handler, options); 10409} 10410const veiKey = Symbol("_vei"); 10411function patchEvent(el, rawName, prevValue, nextValue, instance = null) { 10412 const invokers = el[veiKey] || (el[veiKey] = {}); 10413 const existingInvoker = invokers[rawName]; 10414 if (nextValue && existingInvoker) { 10415 existingInvoker.value = true ? sanitizeEventValue(nextValue, rawName) : 0; 10416 } else { 10417 const [name, options] = parseName(rawName); 10418 if (nextValue) { 10419 const invoker = invokers[rawName] = createInvoker( 10420 true ? sanitizeEventValue(nextValue, rawName) : 0, 10421 instance 10422 ); 10423 addEventListener(el, name, invoker, options); 10424 } else if (existingInvoker) { 10425 removeEventListener(el, name, existingInvoker, options); 10426 invokers[rawName] = void 0; 10427 } 10428 } 10429} 10430const optionsModifierRE = /(?:Once|Passive|Capture)$/; 10431function parseName(name) { 10432 let options; 10433 if (optionsModifierRE.test(name)) { 10434 options = {}; 10435 let m; 10436 while (m = name.match(optionsModifierRE)) { 10437 name = name.slice(0, name.length - m[0].length); 10438 options[m[0].toLowerCase()] = true; 10439 } 10440 } 10441 const event = name[2] === ":" ? name.slice(3) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(name.slice(2)); 10442 return [event, options]; 10443} 10444let cachedNow = 0; 10445const p = /* @__PURE__ */ Promise.resolve(); 10446const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); 10447function createInvoker(initialValue, instance) { 10448 const invoker = (e) => { 10449 if (!e._vts) { 10450 e._vts = Date.now(); 10451 } else if (e._vts <= invoker.attached) { 10452 return; 10453 } 10454 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling)( 10455 patchStopImmediatePropagation(e, invoker.value), 10456 instance, 10457 5, 10458 [e] 10459 ); 10460 }; 10461 invoker.value = initialValue; 10462 invoker.attached = getNow(); 10463 return invoker; 10464} 10465function sanitizeEventValue(value, propName) { 10466 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) { 10467 return value; 10468 } 10469 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 10470 `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? 10471Expected function or array of functions, received type ${typeof value}.` 10472 ); 10473 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP; 10474} 10475function patchStopImmediatePropagation(e, value) { 10476 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) { 10477 const originalStop = e.stopImmediatePropagation; 10478 e.stopImmediatePropagation = () => { 10479 originalStop.call(e); 10480 e._stopped = true; 10481 }; 10482 return value.map( 10483 (fn) => (e2) => !e2._stopped && fn && fn(e2) 10484 ); 10485 } else { 10486 return value; 10487 } 10488} 10489 10490const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter 10491key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; 10492const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { 10493 const isSVG = namespace === "svg"; 10494 if (key === "class") { 10495 patchClass(el, nextValue, isSVG); 10496 } else if (key === "style") { 10497 patchStyle(el, prevValue, nextValue); 10498 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) { 10499 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) { 10500 patchEvent(el, key, prevValue, nextValue, parentComponent); 10501 } 10502 } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { 10503 patchDOMProp(el, key, nextValue); 10504 if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { 10505 patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); 10506 } 10507 } else { 10508 if (key === "true-value") { 10509 el._trueValue = nextValue; 10510 } else if (key === "false-value") { 10511 el._falseValue = nextValue; 10512 } 10513 patchAttr(el, key, nextValue, isSVG); 10514 } 10515}; 10516function shouldSetAsProp(el, key, value, isSVG) { 10517 if (isSVG) { 10518 if (key === "innerHTML" || key === "textContent") { 10519 return true; 10520 } 10521 if (key in el && isNativeOn(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) { 10522 return true; 10523 } 10524 return false; 10525 } 10526 if (key === "spellcheck" || key === "draggable" || key === "translate") { 10527 return false; 10528 } 10529 if (key === "form") { 10530 return false; 10531 } 10532 if (key === "list" && el.tagName === "INPUT") { 10533 return false; 10534 } 10535 if (key === "type" && el.tagName === "TEXTAREA") { 10536 return false; 10537 } 10538 if (key === "width" || key === "height") { 10539 const tag = el.tagName; 10540 if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { 10541 return false; 10542 } 10543 } 10544 if (isNativeOn(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) { 10545 return false; 10546 } 10547 return key in el; 10548} 10549 10550/*! #__NO_SIDE_EFFECTS__ */ 10551// @__NO_SIDE_EFFECTS__ 10552function defineCustomElement(options, extraOptions, hydrate2) { 10553 const Comp = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent)(options, extraOptions); 10554 class VueCustomElement extends VueElement { 10555 constructor(initialProps) { 10556 super(Comp, initialProps, hydrate2); 10557 } 10558 } 10559 VueCustomElement.def = Comp; 10560 return VueCustomElement; 10561} 10562/*! #__NO_SIDE_EFFECTS__ */ 10563const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { 10564 return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate); 10565}; 10566const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { 10567}; 10568class VueElement extends BaseClass { 10569 constructor(_def, _props = {}, hydrate2) { 10570 super(); 10571 this._def = _def; 10572 this._props = _props; 10573 /** 10574 * @internal 10575 */ 10576 this._instance = null; 10577 this._connected = false; 10578 this._resolved = false; 10579 this._numberProps = null; 10580 this._ob = null; 10581 if (this.shadowRoot && hydrate2) { 10582 hydrate2(this._createVNode(), this.shadowRoot); 10583 } else { 10584 if ( true && this.shadowRoot) { 10585 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 10586 `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` 10587 ); 10588 } 10589 this.attachShadow({ mode: "open" }); 10590 if (!this._def.__asyncLoader) { 10591 this._resolveProps(this._def); 10592 } 10593 } 10594 } 10595 connectedCallback() { 10596 this._connected = true; 10597 if (!this._instance) { 10598 if (this._resolved) { 10599 this._update(); 10600 } else { 10601 this._resolveDef(); 10602 } 10603 } 10604 } 10605 disconnectedCallback() { 10606 this._connected = false; 10607 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 10608 if (!this._connected) { 10609 if (this._ob) { 10610 this._ob.disconnect(); 10611 this._ob = null; 10612 } 10613 render(null, this.shadowRoot); 10614 this._instance = null; 10615 } 10616 }); 10617 } 10618 /** 10619 * resolve inner component definition (handle possible async component) 10620 */ 10621 _resolveDef() { 10622 this._resolved = true; 10623 for (let i = 0; i < this.attributes.length; i++) { 10624 this._setAttr(this.attributes[i].name); 10625 } 10626 this._ob = new MutationObserver((mutations) => { 10627 for (const m of mutations) { 10628 this._setAttr(m.attributeName); 10629 } 10630 }); 10631 this._ob.observe(this, { attributes: true }); 10632 const resolve = (def, isAsync = false) => { 10633 const { props, styles } = def; 10634 let numberProps; 10635 if (props && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props)) { 10636 for (const key in props) { 10637 const opt = props[key]; 10638 if (opt === Number || opt && opt.type === Number) { 10639 if (key in this._props) { 10640 this._props[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(this._props[key]); 10641 } 10642 (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key)] = true; 10643 } 10644 } 10645 } 10646 this._numberProps = numberProps; 10647 if (isAsync) { 10648 this._resolveProps(def); 10649 } 10650 this._applyStyles(styles); 10651 this._update(); 10652 }; 10653 const asyncDef = this._def.__asyncLoader; 10654 if (asyncDef) { 10655 asyncDef().then((def) => resolve(def, true)); 10656 } else { 10657 resolve(this._def); 10658 } 10659 } 10660 _resolveProps(def) { 10661 const { props } = def; 10662 const declaredPropKeys = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props) ? props : Object.keys(props || {}); 10663 for (const key of Object.keys(this)) { 10664 if (key[0] !== "_" && declaredPropKeys.includes(key)) { 10665 this._setProp(key, this[key], true, false); 10666 } 10667 } 10668 for (const key of declaredPropKeys.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)) { 10669 Object.defineProperty(this, key, { 10670 get() { 10671 return this._getProp(key); 10672 }, 10673 set(val) { 10674 this._setProp(key, val); 10675 } 10676 }); 10677 } 10678 } 10679 _setAttr(key) { 10680 let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0; 10681 const camelKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key); 10682 if (this._numberProps && this._numberProps[camelKey]) { 10683 value = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(value); 10684 } 10685 this._setProp(camelKey, value, false); 10686 } 10687 /** 10688 * @internal 10689 */ 10690 _getProp(key) { 10691 return this._props[key]; 10692 } 10693 /** 10694 * @internal 10695 */ 10696 _setProp(key, val, shouldReflect = true, shouldUpdate = true) { 10697 if (val !== this._props[key]) { 10698 this._props[key] = val; 10699 if (shouldUpdate && this._instance) { 10700 this._update(); 10701 } 10702 if (shouldReflect) { 10703 if (val === true) { 10704 this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), ""); 10705 } else if (typeof val === "string" || typeof val === "number") { 10706 this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), val + ""); 10707 } else if (!val) { 10708 this.removeAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)); 10709 } 10710 } 10711 } 10712 } 10713 _update() { 10714 render(this._createVNode(), this.shadowRoot); 10715 } 10716 _createVNode() { 10717 const vnode = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(this._def, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, this._props)); 10718 if (!this._instance) { 10719 vnode.ce = (instance) => { 10720 this._instance = instance; 10721 instance.isCE = true; 10722 if (true) { 10723 instance.ceReload = (newStyles) => { 10724 if (this._styles) { 10725 this._styles.forEach((s) => this.shadowRoot.removeChild(s)); 10726 this._styles.length = 0; 10727 } 10728 this._applyStyles(newStyles); 10729 this._instance = null; 10730 this._update(); 10731 }; 10732 } 10733 const dispatch = (event, args) => { 10734 this.dispatchEvent( 10735 new CustomEvent(event, { 10736 detail: args 10737 }) 10738 ); 10739 }; 10740 instance.emit = (event, ...args) => { 10741 dispatch(event, args); 10742 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event) !== event) { 10743 dispatch((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event), args); 10744 } 10745 }; 10746 let parent = this; 10747 while (parent = parent && (parent.parentNode || parent.host)) { 10748 if (parent instanceof VueElement) { 10749 instance.parent = parent._instance; 10750 instance.provides = parent._instance.provides; 10751 break; 10752 } 10753 } 10754 }; 10755 } 10756 return vnode; 10757 } 10758 _applyStyles(styles) { 10759 if (styles) { 10760 styles.forEach((css) => { 10761 const s = document.createElement("style"); 10762 s.textContent = css; 10763 this.shadowRoot.appendChild(s); 10764 if (true) { 10765 (this._styles || (this._styles = [])).push(s); 10766 } 10767 }); 10768 } 10769 } 10770} 10771 10772function useCssModule(name = "$style") { 10773 { 10774 const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)(); 10775 if (!instance) { 10776 true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssModule must be called inside setup()`); 10777 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 10778 } 10779 const modules = instance.type.__cssModules; 10780 if (!modules) { 10781 true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS modules injected.`); 10782 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 10783 } 10784 const mod = modules[name]; 10785 if (!mod) { 10786 true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS module named "${name}".`); 10787 return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ; 10788 } 10789 return mod; 10790 } 10791} 10792 10793const positionMap = /* @__PURE__ */ new WeakMap(); 10794const newPositionMap = /* @__PURE__ */ new WeakMap(); 10795const moveCbKey = Symbol("_moveCb"); 10796const enterCbKey = Symbol("_enterCb"); 10797const TransitionGroupImpl = { 10798 name: "TransitionGroup", 10799 props: /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, TransitionPropsValidators, { 10800 tag: String, 10801 moveClass: String 10802 }), 10803 setup(props, { slots }) { 10804 const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)(); 10805 const state = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState)(); 10806 let prevChildren; 10807 let children; 10808 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => { 10809 if (!prevChildren.length) { 10810 return; 10811 } 10812 const moveClass = props.moveClass || `${props.name || "v"}-move`; 10813 if (!hasCSSTransform( 10814 prevChildren[0].el, 10815 instance.vnode.el, 10816 moveClass 10817 )) { 10818 return; 10819 } 10820 prevChildren.forEach(callPendingCbs); 10821 prevChildren.forEach(recordPosition); 10822 const movedChildren = prevChildren.filter(applyTranslation); 10823 forceReflow(); 10824 movedChildren.forEach((c) => { 10825 const el = c.el; 10826 const style = el.style; 10827 addTransitionClass(el, moveClass); 10828 style.transform = style.webkitTransform = style.transitionDuration = ""; 10829 const cb = el[moveCbKey] = (e) => { 10830 if (e && e.target !== el) { 10831 return; 10832 } 10833 if (!e || /transform$/.test(e.propertyName)) { 10834 el.removeEventListener("transitionend", cb); 10835 el[moveCbKey] = null; 10836 removeTransitionClass(el, moveClass); 10837 } 10838 }; 10839 el.addEventListener("transitionend", cb); 10840 }); 10841 }); 10842 return () => { 10843 const rawProps = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__.toRaw)(props); 10844 const cssTransitionProps = resolveTransitionProps(rawProps); 10845 let tag = rawProps.tag || _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment; 10846 prevChildren = []; 10847 if (children) { 10848 for (let i = 0; i < children.length; i++) { 10849 const child = children[i]; 10850 if (child.el && child.el instanceof Element) { 10851 prevChildren.push(child); 10852 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)( 10853 child, 10854 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)( 10855 child, 10856 cssTransitionProps, 10857 state, 10858 instance 10859 ) 10860 ); 10861 positionMap.set( 10862 child, 10863 child.el.getBoundingClientRect() 10864 ); 10865 } 10866 } 10867 } 10868 children = slots.default ? (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren)(slots.default()) : []; 10869 for (let i = 0; i < children.length; i++) { 10870 const child = children[i]; 10871 if (child.key != null) { 10872 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)( 10873 child, 10874 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)(child, cssTransitionProps, state, instance) 10875 ); 10876 } else if (true) { 10877 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<TransitionGroup> children must be keyed.`); 10878 } 10879 } 10880 return (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(tag, null, children); 10881 }; 10882 } 10883}; 10884const removeMode = (props) => delete props.mode; 10885/* @__PURE__ */ removeMode(TransitionGroupImpl.props); 10886const TransitionGroup = TransitionGroupImpl; 10887function callPendingCbs(c) { 10888 const el = c.el; 10889 if (el[moveCbKey]) { 10890 el[moveCbKey](); 10891 } 10892 if (el[enterCbKey]) { 10893 el[enterCbKey](); 10894 } 10895} 10896function recordPosition(c) { 10897 newPositionMap.set(c, c.el.getBoundingClientRect()); 10898} 10899function applyTranslation(c) { 10900 const oldPos = positionMap.get(c); 10901 const newPos = newPositionMap.get(c); 10902 const dx = oldPos.left - newPos.left; 10903 const dy = oldPos.top - newPos.top; 10904 if (dx || dy) { 10905 const s = c.el.style; 10906 s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; 10907 s.transitionDuration = "0s"; 10908 return c; 10909 } 10910} 10911function hasCSSTransform(el, root, moveClass) { 10912 const clone = el.cloneNode(); 10913 const _vtc = el[vtcKey]; 10914 if (_vtc) { 10915 _vtc.forEach((cls) => { 10916 cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); 10917 }); 10918 } 10919 moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); 10920 clone.style.display = "none"; 10921 const container = root.nodeType === 1 ? root : root.parentNode; 10922 container.appendChild(clone); 10923 const { hasTransform } = getTransitionInfo(clone); 10924 container.removeChild(clone); 10925 return hasTransform; 10926} 10927 10928const getModelAssigner = (vnode) => { 10929 const fn = vnode.props["onUpdate:modelValue"] || false; 10930 return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn) ? (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(fn, value) : fn; 10931}; 10932function onCompositionStart(e) { 10933 e.target.composing = true; 10934} 10935function onCompositionEnd(e) { 10936 const target = e.target; 10937 if (target.composing) { 10938 target.composing = false; 10939 target.dispatchEvent(new Event("input")); 10940 } 10941} 10942const assignKey = Symbol("_assign"); 10943const vModelText = { 10944 created(el, { modifiers: { lazy, trim, number } }, vnode) { 10945 el[assignKey] = getModelAssigner(vnode); 10946 const castToNumber = number || vnode.props && vnode.props.type === "number"; 10947 addEventListener(el, lazy ? "change" : "input", (e) => { 10948 if (e.target.composing) return; 10949 let domValue = el.value; 10950 if (trim) { 10951 domValue = domValue.trim(); 10952 } 10953 if (castToNumber) { 10954 domValue = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(domValue); 10955 } 10956 el[assignKey](domValue); 10957 }); 10958 if (trim) { 10959 addEventListener(el, "change", () => { 10960 el.value = el.value.trim(); 10961 }); 10962 } 10963 if (!lazy) { 10964 addEventListener(el, "compositionstart", onCompositionStart); 10965 addEventListener(el, "compositionend", onCompositionEnd); 10966 addEventListener(el, "change", onCompositionEnd); 10967 } 10968 }, 10969 // set value on mounted so it's after min/max for type="range" 10970 mounted(el, { value }) { 10971 el.value = value == null ? "" : value; 10972 }, 10973 beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { 10974 el[assignKey] = getModelAssigner(vnode); 10975 if (el.composing) return; 10976 const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(el.value) : el.value; 10977 const newValue = value == null ? "" : value; 10978 if (elValue === newValue) { 10979 return; 10980 } 10981 if (document.activeElement === el && el.type !== "range") { 10982 if (lazy && value === oldValue) { 10983 return; 10984 } 10985 if (trim && el.value.trim() === newValue) { 10986 return; 10987 } 10988 } 10989 el.value = newValue; 10990 } 10991}; 10992const vModelCheckbox = { 10993 // #4096 array checkboxes need to be deep traversed 10994 deep: true, 10995 created(el, _, vnode) { 10996 el[assignKey] = getModelAssigner(vnode); 10997 addEventListener(el, "change", () => { 10998 const modelValue = el._modelValue; 10999 const elementValue = getValue(el); 11000 const checked = el.checked; 11001 const assign = el[assignKey]; 11002 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(modelValue)) { 11003 const index = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(modelValue, elementValue); 11004 const found = index !== -1; 11005 if (checked && !found) { 11006 assign(modelValue.concat(elementValue)); 11007 } else if (!checked && found) { 11008 const filtered = [...modelValue]; 11009 filtered.splice(index, 1); 11010 assign(filtered); 11011 } 11012 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(modelValue)) { 11013 const cloned = new Set(modelValue); 11014 if (checked) { 11015 cloned.add(elementValue); 11016 } else { 11017 cloned.delete(elementValue); 11018 } 11019 assign(cloned); 11020 } else { 11021 assign(getCheckboxValue(el, checked)); 11022 } 11023 }); 11024 }, 11025 // set initial checked on mount to wait for true-value/false-value 11026 mounted: setChecked, 11027 beforeUpdate(el, binding, vnode) { 11028 el[assignKey] = getModelAssigner(vnode); 11029 setChecked(el, binding, vnode); 11030 } 11031}; 11032function setChecked(el, { value, oldValue }, vnode) { 11033 el._modelValue = value; 11034 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) { 11035 el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1; 11036 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) { 11037 el.checked = value.has(vnode.props.value); 11038 } else if (value !== oldValue) { 11039 el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, getCheckboxValue(el, true)); 11040 } 11041} 11042const vModelRadio = { 11043 created(el, { value }, vnode) { 11044 el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value); 11045 el[assignKey] = getModelAssigner(vnode); 11046 addEventListener(el, "change", () => { 11047 el[assignKey](getValue(el)); 11048 }); 11049 }, 11050 beforeUpdate(el, { value, oldValue }, vnode) { 11051 el[assignKey] = getModelAssigner(vnode); 11052 if (value !== oldValue) { 11053 el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value); 11054 } 11055 } 11056}; 11057const vModelSelect = { 11058 // <select multiple> value need to be deep traversed 11059 deep: true, 11060 created(el, { value, modifiers: { number } }, vnode) { 11061 const isSetModel = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value); 11062 addEventListener(el, "change", () => { 11063 const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( 11064 (o) => number ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(getValue(o)) : getValue(o) 11065 ); 11066 el[assignKey]( 11067 el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] 11068 ); 11069 el._assigning = true; 11070 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 11071 el._assigning = false; 11072 }); 11073 }); 11074 el[assignKey] = getModelAssigner(vnode); 11075 }, 11076 // set value in mounted & updated because <select> relies on its children 11077 // <option>s. 11078 mounted(el, { value, modifiers: { number } }) { 11079 setSelected(el, value); 11080 }, 11081 beforeUpdate(el, _binding, vnode) { 11082 el[assignKey] = getModelAssigner(vnode); 11083 }, 11084 updated(el, { value, modifiers: { number } }) { 11085 if (!el._assigning) { 11086 setSelected(el, value); 11087 } 11088 } 11089}; 11090function setSelected(el, value, number) { 11091 const isMultiple = el.multiple; 11092 const isArrayValue = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value); 11093 if (isMultiple && !isArrayValue && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) { 11094 true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 11095 `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` 11096 ); 11097 return; 11098 } 11099 for (let i = 0, l = el.options.length; i < l; i++) { 11100 const option = el.options[i]; 11101 const optionValue = getValue(option); 11102 if (isMultiple) { 11103 if (isArrayValue) { 11104 const optionType = typeof optionValue; 11105 if (optionType === "string" || optionType === "number") { 11106 option.selected = value.some((v) => String(v) === String(optionValue)); 11107 } else { 11108 option.selected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, optionValue) > -1; 11109 } 11110 } else { 11111 option.selected = value.has(optionValue); 11112 } 11113 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(getValue(option), value)) { 11114 if (el.selectedIndex !== i) el.selectedIndex = i; 11115 return; 11116 } 11117 } 11118 if (!isMultiple && el.selectedIndex !== -1) { 11119 el.selectedIndex = -1; 11120 } 11121} 11122function getValue(el) { 11123 return "_value" in el ? el._value : el.value; 11124} 11125function getCheckboxValue(el, checked) { 11126 const key = checked ? "_trueValue" : "_falseValue"; 11127 return key in el ? el[key] : checked; 11128} 11129const vModelDynamic = { 11130 created(el, binding, vnode) { 11131 callModelHook(el, binding, vnode, null, "created"); 11132 }, 11133 mounted(el, binding, vnode) { 11134 callModelHook(el, binding, vnode, null, "mounted"); 11135 }, 11136 beforeUpdate(el, binding, vnode, prevVNode) { 11137 callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); 11138 }, 11139 updated(el, binding, vnode, prevVNode) { 11140 callModelHook(el, binding, vnode, prevVNode, "updated"); 11141 } 11142}; 11143function resolveDynamicModel(tagName, type) { 11144 switch (tagName) { 11145 case "SELECT": 11146 return vModelSelect; 11147 case "TEXTAREA": 11148 return vModelText; 11149 default: 11150 switch (type) { 11151 case "checkbox": 11152 return vModelCheckbox; 11153 case "radio": 11154 return vModelRadio; 11155 default: 11156 return vModelText; 11157 } 11158 } 11159} 11160function callModelHook(el, binding, vnode, prevVNode, hook) { 11161 const modelToUse = resolveDynamicModel( 11162 el.tagName, 11163 vnode.props && vnode.props.type 11164 ); 11165 const fn = modelToUse[hook]; 11166 fn && fn(el, binding, vnode, prevVNode); 11167} 11168function initVModelForSSR() { 11169 vModelText.getSSRProps = ({ value }) => ({ value }); 11170 vModelRadio.getSSRProps = ({ value }, vnode) => { 11171 if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(vnode.props.value, value)) { 11172 return { checked: true }; 11173 } 11174 }; 11175 vModelCheckbox.getSSRProps = ({ value }, vnode) => { 11176 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) { 11177 if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1) { 11178 return { checked: true }; 11179 } 11180 } else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) { 11181 if (vnode.props && value.has(vnode.props.value)) { 11182 return { checked: true }; 11183 } 11184 } else if (value) { 11185 return { checked: true }; 11186 } 11187 }; 11188 vModelDynamic.getSSRProps = (binding, vnode) => { 11189 if (typeof vnode.type !== "string") { 11190 return; 11191 } 11192 const modelToUse = resolveDynamicModel( 11193 // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase 11194 vnode.type.toUpperCase(), 11195 vnode.props && vnode.props.type 11196 ); 11197 if (modelToUse.getSSRProps) { 11198 return modelToUse.getSSRProps(binding, vnode); 11199 } 11200 }; 11201} 11202 11203const systemModifiers = ["ctrl", "shift", "alt", "meta"]; 11204const modifierGuards = { 11205 stop: (e) => e.stopPropagation(), 11206 prevent: (e) => e.preventDefault(), 11207 self: (e) => e.target !== e.currentTarget, 11208 ctrl: (e) => !e.ctrlKey, 11209 shift: (e) => !e.shiftKey, 11210 alt: (e) => !e.altKey, 11211 meta: (e) => !e.metaKey, 11212 left: (e) => "button" in e && e.button !== 0, 11213 middle: (e) => "button" in e && e.button !== 1, 11214 right: (e) => "button" in e && e.button !== 2, 11215 exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) 11216}; 11217const withModifiers = (fn, modifiers) => { 11218 const cache = fn._withMods || (fn._withMods = {}); 11219 const cacheKey = modifiers.join("."); 11220 return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { 11221 for (let i = 0; i < modifiers.length; i++) { 11222 const guard = modifierGuards[modifiers[i]]; 11223 if (guard && guard(event, modifiers)) return; 11224 } 11225 return fn(event, ...args); 11226 }); 11227}; 11228const keyNames = { 11229 esc: "escape", 11230 space: " ", 11231 up: "arrow-up", 11232 left: "arrow-left", 11233 right: "arrow-right", 11234 down: "arrow-down", 11235 delete: "backspace" 11236}; 11237const withKeys = (fn, modifiers) => { 11238 const cache = fn._withKeys || (fn._withKeys = {}); 11239 const cacheKey = modifiers.join("."); 11240 return cache[cacheKey] || (cache[cacheKey] = (event) => { 11241 if (!("key" in event)) { 11242 return; 11243 } 11244 const eventKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event.key); 11245 if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { 11246 return fn(event); 11247 } 11248 }); 11249}; 11250 11251const rendererOptions = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({ patchProp }, nodeOps); 11252let renderer; 11253let enabledHydration = false; 11254function ensureRenderer() { 11255 return renderer || (renderer = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer)(rendererOptions)); 11256} 11257function ensureHydrationRenderer() { 11258 renderer = enabledHydration ? renderer : (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer)(rendererOptions); 11259 enabledHydration = true; 11260 return renderer; 11261} 11262const render = (...args) => { 11263 ensureRenderer().render(...args); 11264}; 11265const hydrate = (...args) => { 11266 ensureHydrationRenderer().hydrate(...args); 11267}; 11268const createApp = (...args) => { 11269 const app = ensureRenderer().createApp(...args); 11270 if (true) { 11271 injectNativeTagCheck(app); 11272 injectCompilerOptionsCheck(app); 11273 } 11274 const { mount } = app; 11275 app.mount = (containerOrSelector) => { 11276 const container = normalizeContainer(containerOrSelector); 11277 if (!container) return; 11278 const component = app._component; 11279 if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(component) && !component.render && !component.template) { 11280 component.template = container.innerHTML; 11281 } 11282 container.innerHTML = ""; 11283 const proxy = mount(container, false, resolveRootNamespace(container)); 11284 if (container instanceof Element) { 11285 container.removeAttribute("v-cloak"); 11286 container.setAttribute("data-v-app", ""); 11287 } 11288 return proxy; 11289 }; 11290 return app; 11291}; 11292const createSSRApp = (...args) => { 11293 const app = ensureHydrationRenderer().createApp(...args); 11294 if (true) { 11295 injectNativeTagCheck(app); 11296 injectCompilerOptionsCheck(app); 11297 } 11298 const { mount } = app; 11299 app.mount = (containerOrSelector) => { 11300 const container = normalizeContainer(containerOrSelector); 11301 if (container) { 11302 return mount(container, true, resolveRootNamespace(container)); 11303 } 11304 }; 11305 return app; 11306}; 11307function resolveRootNamespace(container) { 11308 if (container instanceof SVGElement) { 11309 return "svg"; 11310 } 11311 if (typeof MathMLElement === "function" && container instanceof MathMLElement) { 11312 return "mathml"; 11313 } 11314} 11315function injectNativeTagCheck(app) { 11316 Object.defineProperty(app.config, "isNativeTag", { 11317 value: (tag) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isHTMLTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSVGTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isMathMLTag)(tag), 11318 writable: false 11319 }); 11320} 11321function injectCompilerOptionsCheck(app) { 11322 if ((0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly)()) { 11323 const isCustomElement = app.config.isCustomElement; 11324 Object.defineProperty(app.config, "isCustomElement", { 11325 get() { 11326 return isCustomElement; 11327 }, 11328 set() { 11329 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 11330 `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` 11331 ); 11332 } 11333 }); 11334 const compilerOptions = app.config.compilerOptions; 11335 const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. 11336- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. 11337- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader 11338- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; 11339 Object.defineProperty(app.config, "compilerOptions", { 11340 get() { 11341 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg); 11342 return compilerOptions; 11343 }, 11344 set() { 11345 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg); 11346 } 11347 }); 11348 } 11349} 11350function normalizeContainer(container) { 11351 if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(container)) { 11352 const res = document.querySelector(container); 11353 if ( true && !res) { 11354 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 11355 `Failed to mount app: mount target selector "${container}" returned null.` 11356 ); 11357 } 11358 return res; 11359 } 11360 if ( true && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { 11361 (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)( 11362 `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` 11363 ); 11364 } 11365 return container; 11366} 11367let ssrDirectiveInitialized = false; 11368const initDirectivesForSSR = () => { 11369 if (!ssrDirectiveInitialized) { 11370 ssrDirectiveInitialized = true; 11371 initVModelForSSR(); 11372 initVShowForSSR(); 11373 } 11374} ; 11375 11376 11377 11378 11379/***/ }), 11380
vendor: 25,594 bytes, lines 11381-11961
11381/***/ "./node_modules/@vue/shared/dist/shared.esm-bundler.js": 11382/*!*************************************************************!*\ 11383 !*** ./node_modules/@vue/shared/dist/shared.esm-bundler.js ***! 11384 \*************************************************************/ 11385/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 11386 11387"use strict"; 11388__webpack_require__.r(__webpack_exports__); 11389/* harmony export */ __webpack_require__.d(__webpack_exports__, { 11390/* harmony export */ EMPTY_ARR: () => (/* binding */ EMPTY_ARR), 11391/* harmony export */ EMPTY_OBJ: () => (/* binding */ EMPTY_OBJ), 11392/* harmony export */ NO: () => (/* binding */ NO), 11393/* harmony export */ NOOP: () => (/* binding */ NOOP), 11394/* harmony export */ PatchFlagNames: () => (/* binding */ PatchFlagNames), 11395/* harmony export */ PatchFlags: () => (/* binding */ PatchFlags), 11396/* harmony export */ ShapeFlags: () => (/* binding */ ShapeFlags), 11397/* harmony export */ SlotFlags: () => (/* binding */ SlotFlags), 11398/* harmony export */ camelize: () => (/* binding */ camelize), 11399/* harmony export */ capitalize: () => (/* binding */ capitalize), 11400/* harmony export */ def: () => (/* binding */ def), 11401/* harmony export */ escapeHtml: () => (/* binding */ escapeHtml), 11402/* harmony export */ escapeHtmlComment: () => (/* binding */ escapeHtmlComment), 11403/* harmony export */ extend: () => (/* binding */ extend), 11404/* harmony export */ genPropsAccessExp: () => (/* binding */ genPropsAccessExp), 11405/* harmony export */ generateCodeFrame: () => (/* binding */ generateCodeFrame), 11406/* harmony export */ getGlobalThis: () => (/* binding */ getGlobalThis), 11407/* harmony export */ hasChanged: () => (/* binding */ hasChanged), 11408/* harmony export */ hasOwn: () => (/* binding */ hasOwn), 11409/* harmony export */ hyphenate: () => (/* binding */ hyphenate), 11410/* harmony export */ includeBooleanAttr: () => (/* binding */ includeBooleanAttr), 11411/* harmony export */ invokeArrayFns: () => (/* binding */ invokeArrayFns), 11412/* harmony export */ isArray: () => (/* binding */ isArray), 11413/* harmony export */ isBooleanAttr: () => (/* binding */ isBooleanAttr), 11414/* harmony export */ isBuiltInDirective: () => (/* binding */ isBuiltInDirective), 11415/* harmony export */ isDate: () => (/* binding */ isDate), 11416/* harmony export */ isFunction: () => (/* binding */ isFunction), 11417/* harmony export */ isGloballyAllowed: () => (/* binding */ isGloballyAllowed), 11418/* harmony export */ isGloballyWhitelisted: () => (/* binding */ isGloballyWhitelisted), 11419/* harmony export */ isHTMLTag: () => (/* binding */ isHTMLTag), 11420/* harmony export */ isIntegerKey: () => (/* binding */ isIntegerKey), 11421/* harmony export */ isKnownHtmlAttr: () => (/* binding */ isKnownHtmlAttr), 11422/* harmony export */ isKnownSvgAttr: () => (/* binding */ isKnownSvgAttr), 11423/* harmony export */ isMap: () => (/* binding */ isMap), 11424/* harmony export */ isMathMLTag: () => (/* binding */ isMathMLTag), 11425/* harmony export */ isModelListener: () => (/* binding */ isModelListener), 11426/* harmony export */ isObject: () => (/* binding */ isObject), 11427/* harmony export */ isOn: () => (/* binding */ isOn), 11428/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject), 11429/* harmony export */ isPromise: () => (/* binding */ isPromise), 11430/* harmony export */ isRegExp: () => (/* binding */ isRegExp), 11431/* harmony export */ isRenderableAttrValue: () => (/* binding */ isRenderableAttrValue), 11432/* harmony export */ isReservedProp: () => (/* binding */ isReservedProp), 11433/* harmony export */ isSSRSafeAttrName: () => (/* binding */ isSSRSafeAttrName), 11434/* harmony export */ isSVGTag: () => (/* binding */ isSVGTag), 11435/* harmony export */ isSet: () => (/* binding */ isSet), 11436/* harmony export */ isSpecialBooleanAttr: () => (/* binding */ isSpecialBooleanAttr), 11437/* harmony export */ isString: () => (/* binding */ isString), 11438/* harmony export */ isSymbol: () => (/* binding */ isSymbol), 11439/* harmony export */ isVoidTag: () => (/* binding */ isVoidTag), 11440/* harmony export */ looseEqual: () => (/* binding */ looseEqual), 11441/* harmony export */ looseIndexOf: () => (/* binding */ looseIndexOf), 11442/* harmony export */ looseToNumber: () => (/* binding */ looseToNumber), 11443/* harmony export */ makeMap: () => (/* binding */ makeMap), 11444/* harmony export */ normalizeClass: () => (/* binding */ normalizeClass), 11445/* harmony export */ normalizeProps: () => (/* binding */ normalizeProps), 11446/* harmony export */ normalizeStyle: () => (/* binding */ normalizeStyle), 11447/* harmony export */ objectToString: () => (/* binding */ objectToString), 11448/* harmony export */ parseStringStyle: () => (/* binding */ parseStringStyle), 11449/* harmony export */ propsToAttrMap: () => (/* binding */ propsToAttrMap), 11450/* harmony export */ remove: () => (/* binding */ remove), 11451/* harmony export */ slotFlagsText: () => (/* binding */ slotFlagsText), 11452/* harmony export */ stringifyStyle: () => (/* binding */ stringifyStyle), 11453/* harmony export */ toDisplayString: () => (/* binding */ toDisplayString), 11454/* harmony export */ toHandlerKey: () => (/* binding */ toHandlerKey), 11455/* harmony export */ toNumber: () => (/* binding */ toNumber), 11456/* harmony export */ toRawType: () => (/* binding */ toRawType), 11457/* harmony export */ toTypeString: () => (/* binding */ toTypeString) 11458/* harmony export */ }); 11459/** 11460* @vue/shared v3.4.37 11461* (c) 2018-present Yuxi (Evan) You and Vue contributors 11462* @license MIT 11463**/ 11464/*! #__NO_SIDE_EFFECTS__ */ 11465// @__NO_SIDE_EFFECTS__ 11466function makeMap(str, expectsLowerCase) { 11467 const set = new Set(str.split(",")); 11468 return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); 11469} 11470 11471const EMPTY_OBJ = true ? Object.freeze({}) : 0; 11472const EMPTY_ARR = true ? Object.freeze([]) : 0; 11473const NOOP = () => { 11474}; 11475const NO = () => false; 11476const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter 11477(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); 11478const isModelListener = (key) => key.startsWith("onUpdate:"); 11479const extend = Object.assign; 11480const remove = (arr, el) => { 11481 const i = arr.indexOf(el); 11482 if (i > -1) { 11483 arr.splice(i, 1); 11484 } 11485}; 11486const hasOwnProperty = Object.prototype.hasOwnProperty; 11487const hasOwn = (val, key) => hasOwnProperty.call(val, key); 11488const isArray = Array.isArray; 11489const isMap = (val) => toTypeString(val) === "[object Map]"; 11490const isSet = (val) => toTypeString(val) === "[object Set]"; 11491const isDate = (val) => toTypeString(val) === "[object Date]"; 11492const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; 11493const isFunction = (val) => typeof val === "function"; 11494const isString = (val) => typeof val === "string"; 11495const isSymbol = (val) => typeof val === "symbol"; 11496const isObject = (val) => val !== null && typeof val === "object"; 11497const isPromise = (val) => { 11498 return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); 11499}; 11500const objectToString = Object.prototype.toString; 11501const toTypeString = (value) => objectToString.call(value); 11502const toRawType = (value) => { 11503 return toTypeString(value).slice(8, -1); 11504}; 11505const isPlainObject = (val) => toTypeString(val) === "[object Object]"; 11506const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; 11507const isReservedProp = /* @__PURE__ */ makeMap( 11508 // the leading comma is intentional so empty string "" is also included 11509 ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" 11510); 11511const isBuiltInDirective = /* @__PURE__ */ makeMap( 11512 "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" 11513); 11514const cacheStringFunction = (fn) => { 11515 const cache = /* @__PURE__ */ Object.create(null); 11516 return (str) => { 11517 const hit = cache[str]; 11518 return hit || (cache[str] = fn(str)); 11519 }; 11520}; 11521const camelizeRE = /-(\w)/g; 11522const camelize = cacheStringFunction((str) => { 11523 return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); 11524}); 11525const hyphenateRE = /\B([A-Z])/g; 11526const hyphenate = cacheStringFunction( 11527 (str) => str.replace(hyphenateRE, "-$1").toLowerCase() 11528); 11529const capitalize = cacheStringFunction((str) => { 11530 return str.charAt(0).toUpperCase() + str.slice(1); 11531}); 11532const toHandlerKey = cacheStringFunction((str) => { 11533 const s = str ? `on${capitalize(str)}` : ``; 11534 return s; 11535}); 11536const hasChanged = (value, oldValue) => !Object.is(value, oldValue); 11537const invokeArrayFns = (fns, ...arg) => { 11538 for (let i = 0; i < fns.length; i++) { 11539 fns[i](...arg); 11540 } 11541}; 11542const def = (obj, key, value, writable = false) => { 11543 Object.defineProperty(obj, key, { 11544 configurable: true, 11545 enumerable: false, 11546 writable, 11547 value 11548 }); 11549}; 11550const looseToNumber = (val) => { 11551 const n = parseFloat(val); 11552 return isNaN(n) ? val : n; 11553}; 11554const toNumber = (val) => { 11555 const n = isString(val) ? Number(val) : NaN; 11556 return isNaN(n) ? val : n; 11557}; 11558let _globalThis; 11559const getGlobalThis = () => { 11560 return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : {}); 11561}; 11562const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; 11563function genPropsAccessExp(name) { 11564 return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; 11565} 11566 11567const PatchFlags = { 11568 "TEXT": 1, 11569 "1": "TEXT", 11570 "CLASS": 2, 11571 "2": "CLASS", 11572 "STYLE": 4, 11573 "4": "STYLE", 11574 "PROPS": 8, 11575 "8": "PROPS", 11576 "FULL_PROPS": 16, 11577 "16": "FULL_PROPS", 11578 "NEED_HYDRATION": 32, 11579 "32": "NEED_HYDRATION", 11580 "STABLE_FRAGMENT": 64, 11581 "64": "STABLE_FRAGMENT", 11582 "KEYED_FRAGMENT": 128, 11583 "128": "KEYED_FRAGMENT", 11584 "UNKEYED_FRAGMENT": 256, 11585 "256": "UNKEYED_FRAGMENT", 11586 "NEED_PATCH": 512, 11587 "512": "NEED_PATCH", 11588 "DYNAMIC_SLOTS": 1024, 11589 "1024": "DYNAMIC_SLOTS", 11590 "DEV_ROOT_FRAGMENT": 2048, 11591 "2048": "DEV_ROOT_FRAGMENT", 11592 "HOISTED": -1, 11593 "-1": "HOISTED", 11594 "BAIL": -2, 11595 "-2": "BAIL" 11596}; 11597const PatchFlagNames = { 11598 [1]: `TEXT`, 11599 [2]: `CLASS`, 11600 [4]: `STYLE`, 11601 [8]: `PROPS`, 11602 [16]: `FULL_PROPS`, 11603 [32]: `NEED_HYDRATION`, 11604 [64]: `STABLE_FRAGMENT`, 11605 [128]: `KEYED_FRAGMENT`, 11606 [256]: `UNKEYED_FRAGMENT`, 11607 [512]: `NEED_PATCH`, 11608 [1024]: `DYNAMIC_SLOTS`, 11609 [2048]: `DEV_ROOT_FRAGMENT`, 11610 [-1]: `HOISTED`, 11611 [-2]: `BAIL` 11612}; 11613 11614const ShapeFlags = { 11615 "ELEMENT": 1, 11616 "1": "ELEMENT", 11617 "FUNCTIONAL_COMPONENT": 2, 11618 "2": "FUNCTIONAL_COMPONENT", 11619 "STATEFUL_COMPONENT": 4, 11620 "4": "STATEFUL_COMPONENT", 11621 "TEXT_CHILDREN": 8, 11622 "8": "TEXT_CHILDREN", 11623 "ARRAY_CHILDREN": 16, 11624 "16": "ARRAY_CHILDREN", 11625 "SLOTS_CHILDREN": 32, 11626 "32": "SLOTS_CHILDREN", 11627 "TELEPORT": 64, 11628 "64": "TELEPORT", 11629 "SUSPENSE": 128, 11630 "128": "SUSPENSE", 11631 "COMPONENT_SHOULD_KEEP_ALIVE": 256, 11632 "256": "COMPONENT_SHOULD_KEEP_ALIVE", 11633 "COMPONENT_KEPT_ALIVE": 512, 11634 "512": "COMPONENT_KEPT_ALIVE", 11635 "COMPONENT": 6, 11636 "6": "COMPONENT" 11637}; 11638 11639const SlotFlags = { 11640 "STABLE": 1, 11641 "1": "STABLE", 11642 "DYNAMIC": 2, 11643 "2": "DYNAMIC", 11644 "FORWARDED": 3, 11645 "3": "FORWARDED" 11646}; 11647const slotFlagsText = { 11648 [1]: "STABLE", 11649 [2]: "DYNAMIC", 11650 [3]: "FORWARDED" 11651}; 11652 11653const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; 11654const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); 11655const isGloballyWhitelisted = isGloballyAllowed; 11656 11657const range = 2; 11658function generateCodeFrame(source, start = 0, end = source.length) { 11659 start = Math.max(0, Math.min(start, source.length)); 11660 end = Math.max(0, Math.min(end, source.length)); 11661 if (start > end) return ""; 11662 let lines = source.split(/(\r?\n)/); 11663 const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); 11664 lines = lines.filter((_, idx) => idx % 2 === 0); 11665 let count = 0; 11666 const res = []; 11667 for (let i = 0; i < lines.length; i++) { 11668 count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); 11669 if (count >= start) { 11670 for (let j = i - range; j <= i + range || end > count; j++) { 11671 if (j < 0 || j >= lines.length) continue; 11672 const line = j + 1; 11673 res.push( 11674 `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` 11675 ); 11676 const lineLength = lines[j].length; 11677 const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; 11678 if (j === i) { 11679 const pad = start - (count - (lineLength + newLineSeqLength)); 11680 const length = Math.max( 11681 1, 11682 end > count ? lineLength - pad : end - start 11683 ); 11684 res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); 11685 } else if (j > i) { 11686 if (end > count) { 11687 const length = Math.max(Math.min(end - count, lineLength), 1); 11688 res.push(` | ` + "^".repeat(length)); 11689 } 11690 count += lineLength + newLineSeqLength; 11691 } 11692 } 11693 break; 11694 } 11695 } 11696 return res.join("\n"); 11697} 11698 11699function normalizeStyle(value) { 11700 if (isArray(value)) { 11701 const res = {}; 11702 for (let i = 0; i < value.length; i++) { 11703 const item = value[i]; 11704 const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); 11705 if (normalized) { 11706 for (const key in normalized) { 11707 res[key] = normalized[key]; 11708 } 11709 } 11710 } 11711 return res; 11712 } else if (isString(value) || isObject(value)) { 11713 return value; 11714 } 11715} 11716const listDelimiterRE = /;(?![^(]*\))/g; 11717const propertyDelimiterRE = /:([^]+)/; 11718const styleCommentRE = /\/\*[^]*?\*\//g; 11719function parseStringStyle(cssText) { 11720 const ret = {}; 11721 cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { 11722 if (item) { 11723 const tmp = item.split(propertyDelimiterRE); 11724 tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); 11725 } 11726 }); 11727 return ret; 11728} 11729function stringifyStyle(styles) { 11730 let ret = ""; 11731 if (!styles || isString(styles)) { 11732 return ret; 11733 } 11734 for (const key in styles) { 11735 const value = styles[key]; 11736 if (isString(value) || typeof value === "number") { 11737 const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); 11738 ret += `${normalizedKey}:${value};`; 11739 } 11740 } 11741 return ret; 11742} 11743function normalizeClass(value) { 11744 let res = ""; 11745 if (isString(value)) { 11746 res = value; 11747 } else if (isArray(value)) { 11748 for (let i = 0; i < value.length; i++) { 11749 const normalized = normalizeClass(value[i]); 11750 if (normalized) { 11751 res += normalized + " "; 11752 } 11753 } 11754 } else if (isObject(value)) { 11755 for (const name in value) { 11756 if (value[name]) { 11757 res += name + " "; 11758 } 11759 } 11760 } 11761 return res.trim(); 11762} 11763function normalizeProps(props) { 11764 if (!props) return null; 11765 let { class: klass, style } = props; 11766 if (klass && !isString(klass)) { 11767 props.class = normalizeClass(klass); 11768 } 11769 if (style) { 11770 props.style = normalizeStyle(style); 11771 } 11772 return props; 11773} 11774 11775const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; 11776const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; 11777const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; 11778const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; 11779const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); 11780const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); 11781const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); 11782const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); 11783 11784const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; 11785const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); 11786const isBooleanAttr = /* @__PURE__ */ makeMap( 11787 specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` 11788); 11789function includeBooleanAttr(value) { 11790 return !!value || value === ""; 11791} 11792const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; 11793const attrValidationCache = {}; 11794function isSSRSafeAttrName(name) { 11795 if (attrValidationCache.hasOwnProperty(name)) { 11796 return attrValidationCache[name]; 11797 } 11798 const isUnsafe = unsafeAttrCharRE.test(name); 11799 if (isUnsafe) { 11800 console.error(`unsafe attribute name: ${name}`); 11801 } 11802 return attrValidationCache[name] = !isUnsafe; 11803} 11804const propsToAttrMap = { 11805 acceptCharset: "accept-charset", 11806 className: "class", 11807 htmlFor: "for", 11808 httpEquiv: "http-equiv" 11809}; 11810const isKnownHtmlAttr = /* @__PURE__ */ makeMap( 11811 `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` 11812); 11813const isKnownSvgAttr = /* @__PURE__ */ makeMap( 11814 `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` 11815); 11816function isRenderableAttrValue(value) { 11817 if (value == null) { 11818 return false; 11819 } 11820 const type = typeof value; 11821 return type === "string" || type === "number" || type === "boolean"; 11822} 11823 11824const escapeRE = /["'&<>]/; 11825function escapeHtml(string) { 11826 const str = "" + string; 11827 const match = escapeRE.exec(str); 11828 if (!match) { 11829 return str; 11830 } 11831 let html = ""; 11832 let escaped; 11833 let index; 11834 let lastIndex = 0; 11835 for (index = match.index; index < str.length; index++) { 11836 switch (str.charCodeAt(index)) { 11837 case 34: 11838 escaped = """; 11839 break; 11840 case 38: 11841 escaped = "&"; 11842 break; 11843 case 39: 11844 escaped = "'"; 11845 break; 11846 case 60: 11847 escaped = "<"; 11848 break; 11849 case 62: 11850 escaped = ">"; 11851 break; 11852 default: 11853 continue; 11854 } 11855 if (lastIndex !== index) { 11856 html += str.slice(lastIndex, index); 11857 } 11858 lastIndex = index + 1; 11859 html += escaped; 11860 } 11861 return lastIndex !== index ? html + str.slice(lastIndex, index) : html; 11862} 11863const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; 11864function escapeHtmlComment(src) { 11865 return src.replace(commentStripRE, ""); 11866} 11867 11868function looseCompareArrays(a, b) { 11869 if (a.length !== b.length) return false; 11870 let equal = true; 11871 for (let i = 0; equal && i < a.length; i++) { 11872 equal = looseEqual(a[i], b[i]); 11873 } 11874 return equal; 11875} 11876function looseEqual(a, b) { 11877 if (a === b) return true; 11878 let aValidType = isDate(a); 11879 let bValidType = isDate(b); 11880 if (aValidType || bValidType) { 11881 return aValidType && bValidType ? a.getTime() === b.getTime() : false; 11882 } 11883 aValidType = isSymbol(a); 11884 bValidType = isSymbol(b); 11885 if (aValidType || bValidType) { 11886 return a === b; 11887 } 11888 aValidType = isArray(a); 11889 bValidType = isArray(b); 11890 if (aValidType || bValidType) { 11891 return aValidType && bValidType ? looseCompareArrays(a, b) : false; 11892 } 11893 aValidType = isObject(a); 11894 bValidType = isObject(b); 11895 if (aValidType || bValidType) { 11896 if (!aValidType || !bValidType) { 11897 return false; 11898 } 11899 const aKeysCount = Object.keys(a).length; 11900 const bKeysCount = Object.keys(b).length; 11901 if (aKeysCount !== bKeysCount) { 11902 return false; 11903 } 11904 for (const key in a) { 11905 const aHasKey = a.hasOwnProperty(key); 11906 const bHasKey = b.hasOwnProperty(key); 11907 if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { 11908 return false; 11909 } 11910 } 11911 } 11912 return String(a) === String(b); 11913} 11914function looseIndexOf(arr, val) { 11915 return arr.findIndex((item) => looseEqual(item, val)); 11916} 11917 11918const isRef = (val) => { 11919 return !!(val && val.__v_isRef === true); 11920}; 11921const toDisplayString = (val) => { 11922 return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); 11923}; 11924const replacer = (_key, val) => { 11925 if (isRef(val)) { 11926 return replacer(_key, val.value); 11927 } else if (isMap(val)) { 11928 return { 11929 [`Map(${val.size})`]: [...val.entries()].reduce( 11930 (entries, [key, val2], i) => { 11931 entries[stringifySymbol(key, i) + " =>"] = val2; 11932 return entries; 11933 }, 11934 {} 11935 ) 11936 }; 11937 } else if (isSet(val)) { 11938 return { 11939 [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) 11940 }; 11941 } else if (isSymbol(val)) { 11942 return stringifySymbol(val); 11943 } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { 11944 return String(val); 11945 } 11946 return val; 11947}; 11948const stringifySymbol = (v, i = "") => { 11949 var _a; 11950 return ( 11951 // Symbol.description in es2019+ so we need to cast here to pass 11952 // the lib: es2016 check 11953 isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v 11954 ); 11955}; 11956 11957 11958 11959 11960/***/ }), 11961
vendor: 4,522 bytes, lines 11962-12148
11962/***/ "./node_modules/ansi-html-community/index.js": 11963/*!***************************************************!*\ 11964 !*** ./node_modules/ansi-html-community/index.js ***! 11965 \***************************************************/ 11966/***/ ((module) => { 11967 11968"use strict"; 11969 11970 11971module.exports = ansiHTML 11972 11973// Reference to https://github.com/sindresorhus/ansi-regex 11974var _regANSI = /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/ 11975 11976var _defColors = { 11977 reset: ['fff', '000'], // [FOREGROUD_COLOR, BACKGROUND_COLOR] 11978 black: '000', 11979 red: 'ff0000', 11980 green: '209805', 11981 yellow: 'e8bf03', 11982 blue: '0000ff', 11983 magenta: 'ff00ff', 11984 cyan: '00ffee', 11985 lightgrey: 'f0f0f0', 11986 darkgrey: '888' 11987} 11988var _styles = { 11989 30: 'black', 11990 31: 'red', 11991 32: 'green', 11992 33: 'yellow', 11993 34: 'blue', 11994 35: 'magenta', 11995 36: 'cyan', 11996 37: 'lightgrey' 11997} 11998var _openTags = { 11999 '1': 'font-weight:bold', // bold 12000 '2': 'opacity:0.5', // dim 12001 '3': '<i>', // italic 12002 '4': '<u>', // underscore 12003 '8': 'display:none', // hidden 12004 '9': '<del>' // delete 12005} 12006var _closeTags = { 12007 '23': '</i>', // reset italic 12008 '24': '</u>', // reset underscore 12009 '29': '</del>' // reset delete 12010} 12011 12012;[0, 21, 22, 27, 28, 39, 49].forEach(function (n) { 12013 _closeTags[n] = '</span>' 12014}) 12015 12016/** 12017 * Converts text with ANSI color codes to HTML markup. 12018 * @param {String} text 12019 * @returns {*} 12020 */ 12021function ansiHTML (text) { 12022 // Returns the text if the string has no ANSI escape code. 12023 if (!_regANSI.test(text)) { 12024 return text 12025 } 12026 12027 // Cache opened sequence. 12028 var ansiCodes = [] 12029 // Replace with markup. 12030 var ret = text.replace(/\033\[(\d+)m/g, function (match, seq) { 12031 var ot = _openTags[seq] 12032 if (ot) { 12033 // If current sequence has been opened, close it. 12034 if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast 12035 ansiCodes.pop() 12036 return '</span>' 12037 } 12038 // Open tag. 12039 ansiCodes.push(seq) 12040 return ot[0] === '<' ? ot : '<span style="' + ot + ';">' 12041 } 12042 12043 var ct = _closeTags[seq] 12044 if (ct) { 12045 // Pop sequence 12046 ansiCodes.pop() 12047 return ct 12048 } 12049 return '' 12050 }) 12051 12052 // Make sure tags are closed. 12053 var l = ansiCodes.length 12054 ;(l > 0) && (ret += Array(l + 1).join('</span>')) 12055 12056 return ret 12057} 12058 12059/** 12060 * Customize colors. 12061 * @param {Object} colors reference to _defColors 12062 */ 12063ansiHTML.setColors = function (colors) { 12064 if (typeof colors !== 'object') { 12065 throw new Error('`colors` parameter must be an Object.') 12066 } 12067 12068 var _finalColors = {} 12069 for (var key in _defColors) { 12070 var hex = colors.hasOwnProperty(key) ? colors[key] : null 12071 if (!hex) { 12072 _finalColors[key] = _defColors[key] 12073 continue 12074 } 12075 if ('reset' === key) { 12076 if (typeof hex === 'string') { 12077 hex = [hex] 12078 } 12079 if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) { 12080 return typeof h !== 'string' 12081 })) { 12082 throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000') 12083 } 12084 var defHexColor = _defColors[key] 12085 if (!hex[0]) { 12086 hex[0] = defHexColor[0] 12087 } 12088 if (hex.length === 1 || !hex[1]) { 12089 hex = [hex[0]] 12090 hex.push(defHexColor[1]) 12091 } 12092 12093 hex = hex.slice(0, 2) 12094 } else if (typeof hex !== 'string') { 12095 throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000') 12096 } 12097 _finalColors[key] = hex 12098 } 12099 _setTags(_finalColors) 12100} 12101 12102/** 12103 * Reset colors. 12104 */ 12105ansiHTML.reset = function () { 12106 _setTags(_defColors) 12107} 12108 12109/** 12110 * Expose tags, including open and close. 12111 * @type {Object} 12112 */ 12113ansiHTML.tags = {} 12114 12115if (Object.defineProperty) { 12116 Object.defineProperty(ansiHTML.tags, 'open', { 12117 get: function () { return _openTags } 12118 }) 12119 Object.defineProperty(ansiHTML.tags, 'close', { 12120 get: function () { return _closeTags } 12121 }) 12122} else { 12123 ansiHTML.tags.open = _openTags 12124 ansiHTML.tags.close = _closeTags 12125} 12126 12127function _setTags (colors) { 12128 // reset all 12129 _openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1] 12130 // inverse 12131 _openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0] 12132 // dark grey 12133 _openTags['90'] = 'color:#' + colors.darkgrey 12134 12135 for (var code in _styles) { 12136 var color = _styles[code] 12137 var oriColor = colors[color] || '000' 12138 _openTags[code] = 'color:#' + oriColor 12139 code = parseInt(code) 12140 _openTags[(code + 10).toString()] = 'background:#' + oriColor 12141 } 12142} 12143 12144ansiHTML.reset() 12145 12146 12147/***/ }), 12148
vendor: 15,101 bytes, lines 12149-12656
12149/***/ "./node_modules/events/events.js": 12150/*!***************************************!*\ 12151 !*** ./node_modules/events/events.js ***! 12152 \***************************************/ 12153/***/ ((module) => { 12154 12155"use strict"; 12156// Copyright Joyent, Inc. and other Node contributors. 12157// 12158// Permission is hereby granted, free of charge, to any person obtaining a 12159// copy of this software and associated documentation files (the 12160// "Software"), to deal in the Software without restriction, including 12161// without limitation the rights to use, copy, modify, merge, publish, 12162// distribute, sublicense, and/or sell copies of the Software, and to permit 12163// persons to whom the Software is furnished to do so, subject to the 12164// following conditions: 12165// 12166// The above copyright notice and this permission notice shall be included 12167// in all copies or substantial portions of the Software. 12168// 12169// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 12170// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 12171// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 12172// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 12173// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 12174// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 12175// USE OR OTHER DEALINGS IN THE SOFTWARE. 12176 12177 12178 12179var R = typeof Reflect === 'object' ? Reflect : null 12180var ReflectApply = R && typeof R.apply === 'function' 12181 ? R.apply 12182 : function ReflectApply(target, receiver, args) { 12183 return Function.prototype.apply.call(target, receiver, args); 12184 } 12185 12186var ReflectOwnKeys 12187if (R && typeof R.ownKeys === 'function') { 12188 ReflectOwnKeys = R.ownKeys 12189} else if (Object.getOwnPropertySymbols) { 12190 ReflectOwnKeys = function ReflectOwnKeys(target) { 12191 return Object.getOwnPropertyNames(target) 12192 .concat(Object.getOwnPropertySymbols(target)); 12193 }; 12194} else { 12195 ReflectOwnKeys = function ReflectOwnKeys(target) { 12196 return Object.getOwnPropertyNames(target); 12197 }; 12198} 12199 12200function ProcessEmitWarning(warning) { 12201 if (console && console.warn) console.warn(warning); 12202} 12203 12204var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { 12205 return value !== value; 12206} 12207 12208function EventEmitter() { 12209 EventEmitter.init.call(this); 12210} 12211module.exports = EventEmitter; 12212module.exports.once = once; 12213 12214// Backwards-compat with node 0.10.x 12215EventEmitter.EventEmitter = EventEmitter; 12216 12217EventEmitter.prototype._events = undefined; 12218EventEmitter.prototype._eventsCount = 0; 12219EventEmitter.prototype._maxListeners = undefined; 12220 12221// By default EventEmitters will print a warning if more than 10 listeners are 12222// added to it. This is a useful default which helps finding memory leaks. 12223var defaultMaxListeners = 10; 12224 12225function checkListener(listener) { 12226 if (typeof listener !== 'function') { 12227 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); 12228 } 12229} 12230 12231Object.defineProperty(EventEmitter, 'defaultMaxListeners', { 12232 enumerable: true, 12233 get: function() { 12234 return defaultMaxListeners; 12235 }, 12236 set: function(arg) { 12237 if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { 12238 throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); 12239 } 12240 defaultMaxListeners = arg; 12241 } 12242}); 12243 12244EventEmitter.init = function() { 12245 12246 if (this._events === undefined || 12247 this._events === Object.getPrototypeOf(this)._events) { 12248 this._events = Object.create(null); 12249 this._eventsCount = 0; 12250 } 12251 12252 this._maxListeners = this._maxListeners || undefined; 12253}; 12254 12255// Obviously not all Emitters should be limited to 10. This function allows 12256// that to be increased. Set to zero for unlimited. 12257EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { 12258 if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { 12259 throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); 12260 } 12261 this._maxListeners = n; 12262 return this; 12263}; 12264 12265function _getMaxListeners(that) { 12266 if (that._maxListeners === undefined) 12267 return EventEmitter.defaultMaxListeners; 12268 return that._maxListeners; 12269} 12270 12271EventEmitter.prototype.getMaxListeners = function getMaxListeners() { 12272 return _getMaxListeners(this); 12273}; 12274 12275EventEmitter.prototype.emit = function emit(type) { 12276 var args = []; 12277 for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); 12278 var doError = (type === 'error'); 12279 12280 var events = this._events; 12281 if (events !== undefined) 12282 doError = (doError && events.error === undefined); 12283 else if (!doError) 12284 return false; 12285 12286 // If there is no 'error' event listener then throw. 12287 if (doError) { 12288 var er; 12289 if (args.length > 0) 12290 er = args[0]; 12291 if (er instanceof Error) { 12292 // Note: The comments on the `throw` lines are intentional, they show 12293 // up in Node's output if this results in an unhandled exception. 12294 throw er; // Unhandled 'error' event 12295 } 12296 // At least give some kind of context to the user 12297 var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); 12298 err.context = er; 12299 throw err; // Unhandled 'error' event 12300 } 12301 12302 var handler = events[type]; 12303 12304 if (handler === undefined) 12305 return false; 12306 12307 if (typeof handler === 'function') { 12308 ReflectApply(handler, this, args); 12309 } else { 12310 var len = handler.length; 12311 var listeners = arrayClone(handler, len); 12312 for (var i = 0; i < len; ++i) 12313 ReflectApply(listeners[i], this, args); 12314 } 12315 12316 return true; 12317}; 12318 12319function _addListener(target, type, listener, prepend) { 12320 var m; 12321 var events; 12322 var existing; 12323 12324 checkListener(listener); 12325 12326 events = target._events; 12327 if (events === undefined) { 12328 events = target._events = Object.create(null); 12329 target._eventsCount = 0; 12330 } else { 12331 // To avoid recursion in the case that type === "newListener"! Before 12332 // adding it to the listeners, first emit "newListener". 12333 if (events.newListener !== undefined) { 12334 target.emit('newListener', type, 12335 listener.listener ? listener.listener : listener); 12336 12337 // Re-assign `events` because a newListener handler could have caused the 12338 // this._events to be assigned to a new object 12339 events = target._events; 12340 } 12341 existing = events[type]; 12342 } 12343 12344 if (existing === undefined) { 12345 // Optimize the case of one listener. Don't need the extra array object. 12346 existing = events[type] = listener; 12347 ++target._eventsCount; 12348 } else { 12349 if (typeof existing === 'function') { 12350 // Adding the second element, need to change to array. 12351 existing = events[type] = 12352 prepend ? [listener, existing] : [existing, listener]; 12353 // If we've already got an array, just append. 12354 } else if (prepend) { 12355 existing.unshift(listener); 12356 } else { 12357 existing.push(listener); 12358 } 12359 12360 // Check for listener leak 12361 m = _getMaxListeners(target); 12362 if (m > 0 && existing.length > m && !existing.warned) { 12363 existing.warned = true; 12364 // No error code for this since it is a Warning 12365 // eslint-disable-next-line no-restricted-syntax 12366 var w = new Error('Possible EventEmitter memory leak detected. ' + 12367 existing.length + ' ' + String(type) + ' listeners ' + 12368 'added. Use emitter.setMaxListeners() to ' + 12369 'increase limit'); 12370 w.name = 'MaxListenersExceededWarning'; 12371 w.emitter = target; 12372 w.type = type; 12373 w.count = existing.length; 12374 ProcessEmitWarning(w); 12375 } 12376 } 12377 12378 return target; 12379} 12380 12381EventEmitter.prototype.addListener = function addListener(type, listener) { 12382 return _addListener(this, type, listener, false); 12383}; 12384 12385EventEmitter.prototype.on = EventEmitter.prototype.addListener; 12386 12387EventEmitter.prototype.prependListener = 12388 function prependListener(type, listener) { 12389 return _addListener(this, type, listener, true); 12390 }; 12391 12392function onceWrapper() { 12393 if (!this.fired) { 12394 this.target.removeListener(this.type, this.wrapFn); 12395 this.fired = true; 12396 if (arguments.length === 0) 12397 return this.listener.call(this.target); 12398 return this.listener.apply(this.target, arguments); 12399 } 12400} 12401 12402function _onceWrap(target, type, listener) { 12403 var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; 12404 var wrapped = onceWrapper.bind(state); 12405 wrapped.listener = listener; 12406 state.wrapFn = wrapped; 12407 return wrapped; 12408} 12409 12410EventEmitter.prototype.once = function once(type, listener) { 12411 checkListener(listener); 12412 this.on(type, _onceWrap(this, type, listener)); 12413 return this; 12414}; 12415 12416EventEmitter.prototype.prependOnceListener = 12417 function prependOnceListener(type, listener) { 12418 checkListener(listener); 12419 this.prependListener(type, _onceWrap(this, type, listener)); 12420 return this; 12421 }; 12422 12423// Emits a 'removeListener' event if and only if the listener was removed. 12424EventEmitter.prototype.removeListener = 12425 function removeListener(type, listener) { 12426 var list, events, position, i, originalListener; 12427 12428 checkListener(listener); 12429 12430 events = this._events; 12431 if (events === undefined) 12432 return this; 12433 12434 list = events[type]; 12435 if (list === undefined) 12436 return this; 12437 12438 if (list === listener || list.listener === listener) { 12439 if (--this._eventsCount === 0) 12440 this._events = Object.create(null); 12441 else { 12442 delete events[type]; 12443 if (events.removeListener) 12444 this.emit('removeListener', type, list.listener || listener); 12445 } 12446 } else if (typeof list !== 'function') { 12447 position = -1; 12448 12449 for (i = list.length - 1; i >= 0; i--) { 12450 if (list[i] === listener || list[i].listener === listener) { 12451 originalListener = list[i].listener; 12452 position = i; 12453 break; 12454 } 12455 } 12456 12457 if (position < 0) 12458 return this; 12459 12460 if (position === 0) 12461 list.shift(); 12462 else { 12463 spliceOne(list, position); 12464 } 12465 12466 if (list.length === 1) 12467 events[type] = list[0]; 12468 12469 if (events.removeListener !== undefined) 12470 this.emit('removeListener', type, originalListener || listener); 12471 } 12472 12473 return this; 12474 }; 12475 12476EventEmitter.prototype.off = EventEmitter.prototype.removeListener; 12477 12478EventEmitter.prototype.removeAllListeners = 12479 function removeAllListeners(type) { 12480 var listeners, events, i; 12481 12482 events = this._events; 12483 if (events === undefined) 12484 return this; 12485 12486 // not listening for removeListener, no need to emit 12487 if (events.removeListener === undefined) { 12488 if (arguments.length === 0) { 12489 this._events = Object.create(null); 12490 this._eventsCount = 0; 12491 } else if (events[type] !== undefined) { 12492 if (--this._eventsCount === 0) 12493 this._events = Object.create(null); 12494 else 12495 delete events[type]; 12496 } 12497 return this; 12498 } 12499 12500 // emit removeListener for all listeners on all events 12501 if (arguments.length === 0) { 12502 var keys = Object.keys(events); 12503 var key; 12504 for (i = 0; i < keys.length; ++i) { 12505 key = keys[i]; 12506 if (key === 'removeListener') continue; 12507 this.removeAllListeners(key); 12508 } 12509 this.removeAllListeners('removeListener'); 12510 this._events = Object.create(null); 12511 this._eventsCount = 0; 12512 return this; 12513 } 12514 12515 listeners = events[type]; 12516 12517 if (typeof listeners === 'function') { 12518 this.removeListener(type, listeners); 12519 } else if (listeners !== undefined) { 12520 // LIFO order 12521 for (i = listeners.length - 1; i >= 0; i--) { 12522 this.removeListener(type, listeners[i]); 12523 } 12524 } 12525 12526 return this; 12527 }; 12528 12529function _listeners(target, type, unwrap) { 12530 var events = target._events; 12531 12532 if (events === undefined) 12533 return []; 12534 12535 var evlistener = events[type]; 12536 if (evlistener === undefined) 12537 return []; 12538 12539 if (typeof evlistener === 'function') 12540 return unwrap ? [evlistener.listener || evlistener] : [evlistener]; 12541 12542 return unwrap ? 12543 unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); 12544} 12545 12546EventEmitter.prototype.listeners = function listeners(type) { 12547 return _listeners(this, type, true); 12548}; 12549 12550EventEmitter.prototype.rawListeners = function rawListeners(type) { 12551 return _listeners(this, type, false); 12552}; 12553 12554EventEmitter.listenerCount = function(emitter, type) { 12555 if (typeof emitter.listenerCount === 'function') { 12556 return emitter.listenerCount(type); 12557 } else { 12558 return listenerCount.call(emitter, type); 12559 } 12560}; 12561 12562EventEmitter.prototype.listenerCount = listenerCount; 12563function listenerCount(type) { 12564 var events = this._events; 12565 12566 if (events !== undefined) { 12567 var evlistener = events[type]; 12568 12569 if (typeof evlistener === 'function') { 12570 return 1; 12571 } else if (evlistener !== undefined) { 12572 return evlistener.length; 12573 } 12574 } 12575 12576 return 0; 12577} 12578 12579EventEmitter.prototype.eventNames = function eventNames() { 12580 return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; 12581}; 12582 12583function arrayClone(arr, n) { 12584 var copy = new Array(n); 12585 for (var i = 0; i < n; ++i) 12586 copy[i] = arr[i]; 12587 return copy; 12588} 12589 12590function spliceOne(list, index) { 12591 for (; index + 1 < list.length; index++) 12592 list[index] = list[index + 1]; 12593 list.pop(); 12594} 12595 12596function unwrapListeners(arr) { 12597 var ret = new Array(arr.length); 12598 for (var i = 0; i < ret.length; ++i) { 12599 ret[i] = arr[i].listener || arr[i]; 12600 } 12601 return ret; 12602} 12603 12604function once(emitter, name) { 12605 return new Promise(function (resolve, reject) { 12606 function errorListener(err) { 12607 emitter.removeListener(name, resolver); 12608 reject(err); 12609 } 12610 12611 function resolver() { 12612 if (typeof emitter.removeListener === 'function') { 12613 emitter.removeListener('error', errorListener); 12614 } 12615 resolve([].slice.call(arguments)); 12616 }; 12617 12618 eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); 12619 if (name !== 'error') { 12620 addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); 12621 } 12622 }); 12623} 12624 12625function addErrorHandlerIfEventEmitter(emitter, handler, flags) { 12626 if (typeof emitter.on === 'function') { 12627 eventTargetAgnosticAddListener(emitter, 'error', handler, flags); 12628 } 12629} 12630 12631function eventTargetAgnosticAddListener(emitter, name, listener, flags) { 12632 if (typeof emitter.on === 'function') { 12633 if (flags.once) { 12634 emitter.once(name, listener); 12635 } else { 12636 emitter.on(name, listener); 12637 } 12638 } else if (typeof emitter.addEventListener === 'function') { 12639 // EventTarget does not have `error` event semantics like Node 12640 // EventEmitters, we do not listen for `error` events here. 12641 emitter.addEventListener(name, function wrapListener(arg) { 12642 // IE does not have builtin `{ once: true }` support so we 12643 // have to do it manually. 12644 if (flags.once) { 12645 emitter.removeEventListener(name, wrapListener); 12646 } 12647 listener(arg); 12648 }); 12649 } else { 12650 throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); 12651 } 12652} 12653 12654 12655/***/ }), 12656
vendor: 5,483 bytes, lines 12657-12668
12657/***/ "./node_modules/html-entities/lib/index.js": 12658/*!*************************************************!*\ 12659 !*** ./node_modules/html-entities/lib/index.js ***! 12660 \*************************************************/ 12661/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 12662 12663"use strict"; 12664var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};Object.defineProperty(exports, "__esModule", ({value:true}));var named_references_1=__webpack_require__(/*! ./named-references */ "./node_modules/html-entities/lib/named-references.js");var numeric_unicode_map_1=__webpack_require__(/*! ./numeric-unicode-map */ "./node_modules/html-entities/lib/numeric-unicode-map.js");var surrogate_pairs_1=__webpack_require__(/*! ./surrogate-pairs */ "./node_modules/html-entities/lib/surrogate-pairs.js");var allNamedReferences=__assign(__assign({},named_references_1.namedReferences),{all:named_references_1.namedReferences.html5});function replaceUsingRegExp(macroText,macroRegExp,macroReplacer){macroRegExp.lastIndex=0;var replaceMatch=macroRegExp.exec(macroText);var replaceResult;if(replaceMatch){replaceResult="";var replaceLastIndex=0;do{if(replaceLastIndex!==replaceMatch.index){replaceResult+=macroText.substring(replaceLastIndex,replaceMatch.index)}var replaceInput=replaceMatch[0];replaceResult+=macroReplacer(replaceInput);replaceLastIndex=replaceMatch.index+replaceInput.length}while(replaceMatch=macroRegExp.exec(macroText));if(replaceLastIndex!==macroText.length){replaceResult+=macroText.substring(replaceLastIndex)}}else{replaceResult=macroText}return replaceResult}var encodeRegExps={specialChars:/[<>'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g};var defaultEncodeOptions={mode:"specialChars",level:"all",numeric:"decimal"};function encode(text,_a){var _b=_a===void 0?defaultEncodeOptions:_a,_c=_b.mode,mode=_c===void 0?"specialChars":_c,_d=_b.numeric,numeric=_d===void 0?"decimal":_d,_e=_b.level,level=_e===void 0?"all":_e;if(!text){return""}var encodeRegExp=encodeRegExps[mode];var references=allNamedReferences[level].characters;var isHex=numeric==="hexadecimal";return replaceUsingRegExp(text,encodeRegExp,(function(input){var result=references[input];if(!result){var code=input.length>1?surrogate_pairs_1.getCodePoint(input,0):input.charCodeAt(0);result=(isHex?"&#x"+code.toString(16):"&#"+code)+";"}return result}))}exports.encode=encode;var defaultDecodeOptions={scope:"body",level:"all"};var strict=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;var attribute=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;var baseDecodeRegExps={xml:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.xml},html4:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html4},html5:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html5}};var decodeRegExps=__assign(__assign({},baseDecodeRegExps),{all:baseDecodeRegExps.html5});var fromCharCode=String.fromCharCode;var outOfBoundsChar=fromCharCode(65533);var defaultDecodeEntityOptions={level:"all"};function getDecodedEntity(entity,references,isAttribute,isStrict){var decodeResult=entity;var decodeEntityLastChar=entity[entity.length-1];if(isAttribute&&decodeEntityLastChar==="="){decodeResult=entity}else if(isStrict&&decodeEntityLastChar!==";"){decodeResult=entity}else{var decodeResultByReference=references[entity];if(decodeResultByReference){decodeResult=decodeResultByReference}else if(entity[0]==="&"&&entity[1]==="#"){var decodeSecondChar=entity[2];var decodeCode=decodeSecondChar=="x"||decodeSecondChar=="X"?parseInt(entity.substr(3),16):parseInt(entity.substr(2));decodeResult=decodeCode>=1114111?outOfBoundsChar:decodeCode>65535?surrogate_pairs_1.fromCodePoint(decodeCode):fromCharCode(numeric_unicode_map_1.numericUnicodeMap[decodeCode]||decodeCode)}}return decodeResult}function decodeEntity(entity,_a){var _b=(_a===void 0?defaultDecodeEntityOptions:_a).level,level=_b===void 0?"all":_b;if(!entity){return""}return getDecodedEntity(entity,allNamedReferences[level].entities,false,false)}exports.decodeEntity=decodeEntity;function decode(text,_a){var _b=_a===void 0?defaultDecodeOptions:_a,_c=_b.level,level=_c===void 0?"all":_c,_d=_b.scope,scope=_d===void 0?level==="xml"?"strict":"body":_d;if(!text){return""}var decodeRegExp=decodeRegExps[level][scope];var references=allNamedReferences[level].entities;var isAttribute=scope==="attribute";var isStrict=scope==="strict";return replaceUsingRegExp(text,decodeRegExp,(function(entity){return getDecodedEntity(entity,references,isAttribute,isStrict)}))}exports.decode=decode; 12665//# sourceMappingURL=./index.js.map 12666 12667/***/ }), 12668
vendor: 75,173 bytes, lines 12669-12680
12669/***/ "./node_modules/html-entities/lib/named-references.js": 12670/*!************************************************************!*\ 12671 !*** ./node_modules/html-entities/lib/named-references.js ***! 12672 \************************************************************/ 12673/***/ ((__unused_webpack_module, exports) => { 12674 12675"use strict"; 12676Object.defineProperty(exports, "__esModule", ({value:true}));exports.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};exports.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"Â¥","¥":"Â¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"Â","­":"Â","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"Ã","À":"Ã","Á":"Ã","Á":"Ã","Â":"Ã","Â":"Ã","Ã":"Ã","Ã":"Ã","Ä":"Ã","Ä":"Ã","Å":"à ","Å":"à ","Æ":"Ã","Æ":"Ã","Ç":"Ã","Ç":"Ã","È":"Ã","È":"Ã","É":"Ã","É":"Ã","Ê":"Ã","Ê":"Ã","Ë":"Ã","Ë":"Ã","Ì":"Ã","Ì":"Ã","Í":"Ã","Í":"Ã","Î":"Ã","Î":"Ã","Ï":"Ã","Ï":"Ã","Ð":"Ã","Ð":"Ã","Ñ":"Ã","Ñ":"Ã","Ò":"Ã","Ò":"Ã","Ó":"Ã","Ó":"Ã","Ô":"Ã","Ô":"Ã","Õ":"Ã","Õ":"Ã","Ö":"Ã","Ö":"Ã","×":"Ã","×":"Ã","Ø":"Ã","Ø":"Ã","Ù":"Ã","Ù":"Ã","Ú":"Ã","Ú":"Ã","Û":"Ã","Û":"Ã","Ü":"Ã","Ü":"Ã","Ý":"Ã","Ý":"Ã","Þ":"Ã","Þ":"Ã","ß":"Ã","ß":"Ã","à":"à ","à":"à ","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"Ã¥","å":"Ã¥","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"Ã","í":"Ã","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Å","œ":"Å","Š":"Å ","š":"Å¡","Ÿ":"Ÿ","ˆ":"Ë","˜":"Ë"," ":"â"," ":"â"," ":"â","‌":"â","‍":"â","‎":"â","‏":"â","–":"â","—":"â","‘":"â","’":"â","‚":"â","“":"â","”":"â","„":"â","†":"â ","‡":"â¡","‰":"â°","‹":"â¹","›":"âº","€":"â¬","ƒ":"Æ","Α":"Î","Β":"Î","Γ":"Î","Δ":"Î","Ε":"Î","Ζ":"Î","Η":"Î","Θ":"Î","Ι":"Î","Κ":"Î","Λ":"Î","Μ":"Î","Ν":"Î","Ξ":"Î","Ο":"Î","Π":"Î ","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Î¥","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"Ï","ρ":"Ï","ς":"Ï","σ":"Ï","τ":"Ï","υ":"Ï ","φ":"Ï","χ":"Ï","ψ":"Ï","ω":"Ï","ϑ":"Ï","ϒ":"Ï","ϖ":"Ï","•":"â¢","…":"â¦","′":"â²","″":"â³","‾":"â¾","⁄":"â","℘":"â","ℑ":"â","ℜ":"â","™":"â¢","ℵ":"âµ","←":"â","↑":"â","→":"â","↓":"â","↔":"â","↵":"âµ","⇐":"â","⇑":"â","⇒":"â","⇓":"â","⇔":"â","∀":"â","∂":"â","∃":"â","∅":"â ","∇":"â","∈":"â","∉":"â","∋":"â","∏":"â","∑":"â","−":"â","∗":"â","√":"â","∝":"â","∞":"â","∠":"â ","∧":"â§","∨":"â¨","∩":"â©","∪":"âª","∫":"â«","∴":"â´","∼":"â¼","≅":"â ","≈":"â","≠":"â ","≡":"â¡","≤":"â¤","≥":"â¥","⊂":"â","⊃":"â","⊄":"â","⊆":"â","⊇":"â","⊕":"â","⊗":"â","⊥":"â¥","⋅":"â ","⌈":"â","⌉":"â","⌊":"â","⌋":"â","⟨":"â©","⟩":"âª","◊":"â","♠":"â ","♣":"â£","♥":"â¥","♦":"â¦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","Â¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","Â":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","Ã":"À","Ã":"Á","Ã":"Â","Ã":"Ã","Ã":"Ä","à ":"Å","Ã":"Æ","Ã":"Ç","Ã":"È","Ã":"É","Ã":"Ê","Ã":"Ë","Ã":"Ì","Ã":"Í","Ã":"Î","Ã":"Ï","Ã":"Ð","Ã":"Ñ","Ã":"Ò","Ã":"Ó","Ã":"Ô","Ã":"Õ","Ã":"Ö","Ã":"×","Ã":"Ø","Ã":"Ù","Ã":"Ú","Ã":"Û","Ã":"Ü","Ã":"Ý","Ã":"Þ","Ã":"ß","à ":"à","á":"á","â":"â","ã":"ã","ä":"ä","Ã¥":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","Ã":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Å":"Œ","Å":"œ","Å ":"Š","Å¡":"š","Ÿ":"Ÿ","Ë":"ˆ","Ë":"˜","â":" ","â":" ","â":" ","â":"‌","â":"‍","â":"‎","â":"‏","â":"–","â":"—","â":"‘","â":"’","â":"‚","â":"“","â":"”","â":"„","â ":"†","â¡":"‡","â°":"‰","â¹":"‹","âº":"›","â¬":"€","Æ":"ƒ","Î":"Α","Î":"Β","Î":"Γ","Î":"Δ","Î":"Ε","Î":"Ζ","Î":"Η","Î":"Θ","Î":"Ι","Î":"Κ","Î":"Λ","Î":"Μ","Î":"Ν","Î":"Ξ","Î":"Ο","Î ":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Î¥":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","Ï":"π","Ï":"ρ","Ï":"ς","Ï":"σ","Ï":"τ","Ï ":"υ","Ï":"φ","Ï":"χ","Ï":"ψ","Ï":"ω","Ï":"ϑ","Ï":"ϒ","Ï":"ϖ","â¢":"•","â¦":"…","â²":"′","â³":"″","â¾":"‾","â":"⁄","â":"℘","â":"ℑ","â":"ℜ","â¢":"™","âµ":"ℵ","â":"←","â":"↑","â":"→","â":"↓","â":"↔","âµ":"↵","â":"⇐","â":"⇑","â":"⇒","â":"⇓","â":"⇔","â":"∀","â":"∂","â":"∃","â ":"∅","â":"∇","â":"∈","â":"∉","â":"∋","â":"∏","â":"∑","â":"−","â":"∗","â":"√","â":"∝","â":"∞","â ":"∠","â§":"∧","â¨":"∨","â©":"∩","âª":"∪","â«":"∫","â´":"∴","â¼":"∼","â ":"≅","â":"≈","â ":"≠","â¡":"≡","â¤":"≤","â¥":"≥","â":"⊂","â":"⊃","â":"⊄","â":"⊆","â":"⊇","â":"⊕","â":"⊗","â¥":"⊥","â ":"⋅","â":"⌈","â":"⌉","â":"⌊","â":"⌋","â©":"⟨","âª":"⟩","â":"◊","â ":"♠","â£":"♣","â¥":"♥","â¦":"♦"}},html5:{entities:{"Æ":"Ã","Æ":"Ã","&":"&","&":"&","Á":"Ã","Á":"Ã","Ă":"Ä","Â":"Ã","Â":"Ã","А":"Ð","𝔄":"ð","À":"Ã","À":"Ã","Α":"Î","Ā":"Ä","⩓":"â©","Ą":"Ä","𝔸":"ð¸","⁡":"â¡","Å":"à ","Å":"à ","𝒜":"ð","≔":"â","Ã":"Ã","Ã":"Ã","Ä":"Ã","Ä":"Ã","∖":"â","⫧":"â«§","⌆":"â","Б":"Ð","∵":"âµ","ℬ":"â¬","Β":"Î","𝔅":"ð ","𝔹":"ð¹","˘":"Ë","ℬ":"â¬","≎":"â","Ч":"Ч","©":"©","©":"©","Ć":"Ä","⋒":"â","ⅅ":"â ","ℭ":"â","Č":"Ä","Ç":"Ã","Ç":"Ã","Ĉ":"Ä","∰":"â°","Ċ":"Ä","¸":"¸","·":"·","ℭ":"â","Χ":"Χ","⊙":"â","⊖":"â","⊕":"â","⊗":"â","∲":"â²","”":"â","’":"â","∷":"â·","⩴":"â©´","≡":"â¡","∯":"â¯","∮":"â®","ℂ":"â","∐":"â","∳":"â³","⨯":"⨯","𝒞":"ð","⋓":"â","≍":"â","ⅅ":"â ","⤑":"â¤","Ђ":"Ð","Ѕ":"Ð ","Џ":"Ð","‡":"â¡","↡":"â¡","⫤":"⫤","Ď":"Ä","Д":"Ð","∇":"â","Δ":"Î","𝔇":"ð","´":"´","˙":"Ë","˝":"Ë","`":"`","˜":"Ë","⋄":"â","ⅆ":"â ","𝔻":"ð»","¨":"¨","⃜":"â","≐":"â","∯":"â¯","¨":"¨","⇓":"â","⇐":"â","⇔":"â","⫤":"⫤","⟸":"â¸","⟺":"âº","⟹":"â¹","⇒":"â","⊨":"â¨","⇑":"â","⇕":"â","∥":"â¥","↓":"â","⤓":"â¤","⇵":"âµ","̑":"Ì","⥐":"â¥","⥞":"â¥","↽":"â½","⥖":"â¥","⥟":"â¥","⇁":"â","⥗":"â¥","⊤":"â¤","↧":"â§","⇓":"â","𝒟":"ð","Đ":"Ä","Ŋ":"Å","Ð":"Ã","Ð":"Ã","É":"Ã","É":"Ã","Ě":"Ä","Ê":"Ã","Ê":"Ã","Э":"Ð","Ė":"Ä","𝔈":"ð","È":"Ã","È":"Ã","∈":"â","Ē":"Ä","◻":"â»","▫":"â«","Ę":"Ä","𝔼":"ð¼","Ε":"Î","⩵":"⩵","≂":"â","⇌":"â","ℰ":"â°","⩳":"⩳","Η":"Î","Ë":"Ã","Ë":"Ã","∃":"â","ⅇ":"â ","Ф":"Ф","𝔉":"ð","◼":"â¼","▪":"âª","𝔽":"ð½","∀":"â","ℱ":"â±","ℱ":"â±","Ѓ":"Ð",">":">",">":">","Γ":"Î","Ϝ":"Ï","Ğ":"Ä","Ģ":"Ä¢","Ĝ":"Ä","Г":"Ð","Ġ":"Ä ","𝔊":"ð","⋙":"â","𝔾":"ð¾","≥":"â¥","⋛":"â","≧":"â§","⪢":"⪢","≷":"â·","⩾":"⩾","≳":"â³","𝒢":"ð¢","≫":"â«","Ъ":"Ъ","ˇ":"Ë","^":"^","Ĥ":"Ĥ","ℌ":"â","ℋ":"â","ℍ":"â","─":"â","ℋ":"â","Ħ":"Ħ","≎":"â","≏":"â","Е":"Ð","IJ":"IJ","Ё":"Ð","Í":"Ã","Í":"Ã","Î":"Ã","Î":"Ã","И":"Ð","İ":"İ","ℑ":"â","Ì":"Ã","Ì":"Ã","ℑ":"â","Ī":"Ī","ⅈ":"â ","⇒":"â","∬":"â¬","∫":"â«","⋂":"â","⁣":"â£","⁢":"â¢","Į":"Ä®","𝕀":"ð","Ι":"Î","ℐ":"â","Ĩ":"Ĩ","І":"Ð","Ï":"Ã","Ï":"Ã","Ĵ":"Ä´","Й":"Ð","𝔍":"ð","𝕁":"ð","𝒥":"ð¥","Ј":"Ð","Є":"Ð","Х":"Ð¥","Ќ":"Ð","Κ":"Î","Ķ":"Ķ","К":"Ð","𝔎":"ð","𝕂":"ð","𝒦":"ð¦","Љ":"Ð","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Î","⟪":"âª","ℒ":"â","↞":"â","Ľ":"Ľ","Ļ":"Ä»","Л":"Ð","⟨":"â¨","←":"â","⇤":"â¤","⇆":"â","⌈":"â","⟦":"â¦","⥡":"⥡","⇃":"â","⥙":"â¥","⌊":"â","↔":"â","⥎":"â¥","⊣":"â£","↤":"â¤","⥚":"â¥","⊲":"â²","⧏":"â§","⊴":"â´","⥑":"â¥","⥠":"⥠","↿":"â¿","⥘":"â¥","↼":"â¼","⥒":"â¥","⇐":"â","⇔":"â","⋚":"â","≦":"â¦","≶":"â¶","⪡":"⪡","⩽":"⩽","≲":"â²","𝔏":"ð","⋘":"â","⇚":"â","Ŀ":"Ä¿","⟵":"âµ","⟷":"â·","⟶":"â¶","⟸":"â¸","⟺":"âº","⟹":"â¹","𝕃":"ð","↙":"â","↘":"â","ℒ":"â","↰":"â°","Ł":"Å","≪":"âª","⤅":"⤠","М":"Ð"," ":"â","ℳ":"â³","𝔐":"ð","∓":"â","𝕄":"ð","ℳ":"â³","Μ":"Î","Њ":"Ð","Ń":"Å","Ň":"Å","Ņ":"Å ","Н":"Ð","​":"â","​":"â","​":"â","​":"â","≫":"â«","≪":"âª","
":"\n","𝔑":"ð","⁠":"â "," ":" ","ℕ":"â","⫬":"⫬","≢":"â¢","≭":"â","∦":"â¦","∉":"â","≠":"â ","≂̸":"â̸","∄":"â","≯":"â¯","≱":"â±","≧̸":"â§Ì¸","≫̸":"â«Ì¸","≹":"â¹","⩾̸":"⩾̸","≵":"âµ","≎̸":"â̸","≏̸":"â̸","⋪":"âª","⧏̸":"â§Ì¸","⋬":"â¬","≮":"â®","≰":"â°","≸":"â¸","≪̸":"âªÌ¸","⩽̸":"⩽̸","≴":"â´","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"â","⪯̸":"⪯̸","⋠":"â ","∌":"â","⋫":"â«","⧐̸":"â§Ì¸","⋭":"â","⊏̸":"â̸","⋢":"â¢","⊐̸":"â̸","⋣":"â£","⊂⃒":"ââ","⊈":"â","⊁":"â","⪰̸":"⪰̸","⋡":"â¡","≿̸":"â¿Ì¸","⊃⃒":"ââ","⊉":"â","≁":"â","≄":"â","≇":"â","≉":"â","∤":"â¤","𝒩":"ð©","Ñ":"Ã","Ñ":"Ã","Ν":"Î","Œ":"Å","Ó":"Ã","Ó":"Ã","Ô":"Ã","Ô":"Ã","О":"Ð","Ő":"Å","𝔒":"ð","Ò":"Ã","Ò":"Ã","Ō":"Å","Ω":"Ω","Ο":"Î","𝕆":"ð","“":"â","‘":"â","⩔":"â©","𝒪":"ðª","Ø":"Ã","Ø":"Ã","Õ":"Ã","Õ":"Ã","⨷":"⨷","Ö":"Ã","Ö":"Ã","‾":"â¾","⏞":"â","⎴":"â´","⏜":"â","∂":"â","П":"Ð","𝔓":"ð","Φ":"Φ","Π":"Î ","±":"±","ℌ":"â","ℙ":"â","⪻":"⪻","≺":"âº","⪯":"⪯","≼":"â¼","≾":"â¾","″":"â³","∏":"â","∷":"â·","∝":"â","𝒫":"ð«","Ψ":"Ψ",""":'"',""":'"',"𝔔":"ð","ℚ":"â","𝒬":"ð¬","⤐":"â¤","®":"®","®":"®","Ŕ":"Å","⟫":"â«","↠":"â ","⤖":"â¤","Ř":"Å","Ŗ":"Å","Р":"Ð ","ℜ":"â","∋":"â","⇋":"â","⥯":"⥯","ℜ":"â","Ρ":"Ρ","⟩":"â©","→":"â","⇥":"â¥","⇄":"â","⌉":"â","⟧":"â§","⥝":"â¥","⇂":"â","⥕":"â¥","⌋":"â","⊢":"â¢","↦":"â¦","⥛":"â¥","⊳":"â³","⧐":"â§","⊵":"âµ","⥏":"â¥","⥜":"â¥","↾":"â¾","⥔":"â¥","⇀":"â","⥓":"â¥","⇒":"â","ℝ":"â","⥰":"⥰","⇛":"â","ℛ":"â","↱":"â±","⧴":"â§´","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Å","⪼":"⪼","Š":"Å ","Ş":"Å","Ŝ":"Å","С":"С","𝔖":"ð","↓":"â","←":"â","→":"â","↑":"â","Σ":"Σ","∘":"â","𝕊":"ð","√":"â","□":"â¡","⊓":"â","⊏":"â","⊑":"â","⊐":"â","⊒":"â","⊔":"â","𝒮":"ð®","⋆":"â","⋐":"â","⋐":"â","⊆":"â","≻":"â»","⪰":"⪰","≽":"â½","≿":"â¿","∋":"â","∑":"â","⋑":"â","⊃":"â","⊇":"â","⋑":"â","Þ":"Ã","Þ":"Ã","™":"â¢","Ћ":"Ð","Ц":"Ц","	":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Å¢","Т":"Т","𝔗":"ð","∴":"â´","Θ":"Î","  ":"ââ"," ":"â","∼":"â¼","≃":"â","≅":"â ","≈":"â","𝕋":"ð","⃛":"â","𝒯":"ð¯","Ŧ":"Ŧ","Ú":"Ã","Ú":"Ã","↟":"â","⥉":"â¥","Ў":"Ð","Ŭ":"Ŭ","Û":"Ã","Û":"Ã","У":"У","Ű":"Ű","𝔘":"ð","Ù":"Ã","Ù":"Ã","Ū":"Ū","_":"_","⏟":"â","⎵":"âµ","⏝":"â","⋃":"â","⊎":"â","Ų":"Ų","𝕌":"ð","↑":"â","⤒":"â¤","⇅":"â ","↕":"â","⥮":"⥮","⊥":"â¥","↥":"â¥","⇑":"â","⇕":"â","↖":"â","↗":"â","ϒ":"Ï","Υ":"Î¥","Ů":"Å®","𝒰":"ð°","Ũ":"Ũ","Ü":"Ã","Ü":"Ã","⊫":"â«","⫫":"â««","В":"Ð","⊩":"â©","⫦":"⫦","⋁":"â","‖":"â","‖":"â","∣":"â£","|":"|","❘":"â","≀":"â"," ":"â","𝔙":"ð","𝕍":"ð","𝒱":"ð±","⊪":"âª","Ŵ":"Å´","⋀":"â","𝔚":"ð","𝕎":"ð","𝒲":"ð²","𝔛":"ð","Ξ":"Î","𝕏":"ð","𝒳":"ð³","Я":"Я","Ї":"Ð","Ю":"Ю","Ý":"Ã","Ý":"Ã","Ŷ":"Ŷ","Ы":"Ы","𝔜":"ð","𝕐":"ð","𝒴":"ð´","Ÿ":"Ÿ","Ж":"Ð","Ź":"Ź","Ž":"Ž","З":"Ð","Ż":"Å»","​":"â","Ζ":"Î","ℨ":"â¨","ℤ":"â¤","𝒵":"ðµ","á":"á","á":"á","ă":"Ä","∾":"â¾","∾̳":"â¾Ì³","∿":"â¿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"â¡","𝔞":"ð","à":"à ","à":"à ","ℵ":"âµ","ℵ":"âµ","α":"α","ā":"Ä","⨿":"⨿","&":"&","&":"&","∧":"â§","⩕":"â©","⩜":"â©","⩘":"â©","⩚":"â©","∠":"â ","⦤":"⦤","∠":"â ","∡":"â¡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"â¦","⦮":"⦮","⦯":"⦯","∟":"â","⊾":"â¾","⦝":"â¦","∢":"â¢","Å":"à ","⍼":"â¼","ą":"Ä ","𝕒":"ð","≈":"â","⩰":"â©°","⩯":"⩯","≊":"â","≋":"â","'":"'","≈":"â","≊":"â","å":"Ã¥","å":"Ã¥","𝒶":"ð¶","*":"*","≈":"â","≍":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"â³","⨑":"â¨","⫭":"â«","≌":"â","϶":"϶","‵":"âµ","∽":"â½","⋍":"â","⊽":"â½","⌅":"â ","⌅":"â ","⎵":"âµ","⎶":"â¶","≌":"â","б":"б","„":"â","∵":"âµ","∵":"âµ","⦰":"⦰","϶":"϶","ℬ":"â¬","β":"β","ℶ":"â¶","≬":"â¬","𝔟":"ð","⋂":"â","◯":"â¯","⋃":"â","⨀":"â¨","⨁":"â¨","⨂":"â¨","⨆":"â¨","★":"â ","▽":"â½","△":"â³","⨄":"â¨","⋁":"â","⋀":"â","⤍":"â¤","⧫":"â§«","▪":"âª","▴":"â´","▾":"â¾","◂":"â","▸":"â¸","␣":"â£","▒":"â","░":"â","▓":"â","█":"â","=⃥":"=â¥","≡⃥":"â¡â¥","⌐":"â","𝕓":"ð","⊥":"â¥","⊥":"â¥","⋈":"â","╗":"â","╔":"â","╖":"â","╓":"â","═":"â","╦":"â¦","╩":"â©","╤":"â¤","╧":"â§","╝":"â","╚":"â","╜":"â","╙":"â","║":"â","╬":"â¬","╣":"â£","╠":"â ","╫":"â«","╢":"â¢","╟":"â","⧉":"â§","╕":"â","╒":"â","┐":"â","┌":"â","─":"â","╥":"â¥","╨":"â¨","┬":"â¬","┴":"â´","⊟":"â","⊞":"â","⊠":"â ","╛":"â","╘":"â","┘":"â","└":"â","│":"â","╪":"âª","╡":"â¡","╞":"â","┼":"â¼","┤":"â¤","├":"â","‵":"âµ","˘":"Ë","¦":"¦","¦":"¦","𝒷":"ð·","⁏":"â","∽":"â½","⋍":"â","\":"\\","⧅":"â§ ","⟈":"â","•":"â¢","•":"â¢","≎":"â","⪮":"⪮","≏":"â","≏":"â","ć":"Ä","∩":"â©","⩄":"â©","⩉":"â©","⩋":"â©","⩇":"â©","⩀":"â©","∩︀":"â©ï¸","⁁":"â","ˇ":"Ë","⩍":"â©","č":"Ä","ç":"ç","ç":"ç","ĉ":"Ä","⩌":"â©","⩐":"â©","ċ":"Ä","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"ð ","ч":"Ñ","✓":"â","✓":"â","χ":"Ï","○":"â","⧃":"â§","ˆ":"Ë","≗":"â","↺":"âº","↻":"â»","®":"®","Ⓢ":"â","⊛":"â","⊚":"â","⊝":"â","≗":"â","⨐":"â¨","⫯":"⫯","⧂":"â§","♣":"â£","♣":"â£",":":":","≔":"â","≔":"â",",":",","@":"@","∁":"â","∘":"â","∁":"â","ℂ":"â","≅":"â ","⩭":"â©","∮":"â®","𝕔":"ð","∐":"â","©":"©","©":"©","℗":"â","↵":"âµ","✗":"â","𝒸":"ð¸","⫏":"â«","⫑":"â«","⫐":"â«","⫒":"â«","⋯":"â¯","⤸":"⤸","⤵":"⤵","⋞":"â","⋟":"â","↶":"â¶","⤽":"⤽","∪":"âª","⩈":"â©","⩆":"â©","⩊":"â©","⊍":"â","⩅":"â© ","∪︀":"âªï¸","↷":"â·","⤼":"⤼","⋞":"â","⋟":"â","⋎":"â","⋏":"â","¤":"¤","¤":"¤","↶":"â¶","↷":"â·","⋎":"â","⋏":"â","∲":"â²","∱":"â±","⌭":"â","⇓":"â","⥥":"⥥","†":"â ","ℸ":"â¸","↓":"â","‐":"â","⊣":"â£","⤏":"â¤","˝":"Ë","ď":"Ä","д":"д","ⅆ":"â ","‡":"â¡","⇊":"â","⩷":"â©·","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"ð¡","⇃":"â","⇂":"â","⋄":"â","⋄":"â","♦":"â¦","♦":"â¦","¨":"¨","ϝ":"Ï","⋲":"â²","÷":"÷","÷":"÷","÷":"÷","⋇":"â","⋇":"â","ђ":"Ñ","⌞":"â","⌍":"â","$":"$","𝕕":"ð","˙":"Ë","≐":"â","≑":"â","∸":"â¸","∔":"â","⊡":"â¡","⌆":"â","↓":"â","⇊":"â","⇃":"â","⇂":"â","⤐":"â¤","⌟":"â","⌌":"â","𝒹":"ð¹","ѕ":"Ñ","⧶":"â§¶","đ":"Ä","⋱":"â±","▿":"â¿","▾":"â¾","⇵":"âµ","⥯":"⥯","⦦":"⦦","џ":"Ñ","⟿":"â¿","⩷":"â©·","≑":"â","é":"é","é":"é","⩮":"â©®","ě":"Ä","≖":"â","ê":"ê","ê":"ê","≕":"â","э":"Ñ","ė":"Ä","ⅇ":"â ","≒":"â","𝔢":"ð¢","⪚":"âª","è":"è","è":"è","⪖":"âª","⪘":"âª","⪙":"âª","⏧":"â§","ℓ":"â","⪕":"âª","⪗":"âª","ē":"Ä","∅":"â ","∅":"â ","∅":"â "," ":"â"," ":"â "," ":"â","ŋ":"Å"," ":"â","ę":"Ä","𝕖":"ð","⋕":"â","⧣":"â§£","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"â","≕":"â","≂":"â","⪖":"âª","⪕":"âª","=":"=","≟":"â","≡":"â¡","⩸":"⩸","⧥":"â§¥","≓":"â","⥱":"⥱","ℯ":"â¯","≐":"â","≂":"â","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"â¬","!":"!","∃":"â","ℰ":"â°","ⅇ":"â ","≒":"â","ф":"Ñ","♀":"â","ffi":"ï¬","ff":"ï¬","ffl":"ï¬","𝔣":"ð£","fi":"ï¬","fj":"fj","♭":"â","fl":"ï¬","▱":"â±","ƒ":"Æ","𝕗":"ð","∀":"â","⋔":"â","⫙":"â«","⨍":"â¨","½":"½","½":"½","⅓":"â ","¼":"¼","¼":"¼","⅕":"â ","⅙":"â ","⅛":"â ","⅔":"â ","⅖":"â ","¾":"¾","¾":"¾","⅗":"â ","⅜":"â ","⅘":"â ","⅚":"â ","⅝":"â ","⅞":"â ","⁄":"â","⌢":"â¢","𝒻":"ð»","≧":"â§","⪌":"âª","ǵ":"ǵ","γ":"γ","ϝ":"Ï","⪆":"âª","ğ":"Ä","ĝ":"Ä","г":"г","ġ":"Ä¡","≥":"â¥","⋛":"â","≥":"â¥","≧":"â§","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"âª","⪂":"âª","⪄":"âª","⋛︀":"âï¸","⪔":"âª","𝔤":"ð¤","≫":"â«","⋙":"â","ℷ":"â·","ѓ":"Ñ","≷":"â·","⪒":"âª","⪥":"⪥","⪤":"⪤","≩":"â©","⪊":"âª","⪊":"âª","⪈":"âª","⪈":"âª","≩":"â©","⋧":"â§","𝕘":"ð","`":"`","ℊ":"â","≳":"â³","⪎":"âª","⪐":"âª",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"â","⦕":"â¦","⩼":"⩼","⪆":"âª","⥸":"⥸","⋗":"â","⋛":"â","⪌":"âª","≷":"â·","≳":"â³","≩︀":"â©ï¸","≩︀":"â©ï¸","⇔":"â"," ":"â","½":"½","ℋ":"â","ъ":"Ñ","↔":"â","⥈":"â¥","↭":"â","ℏ":"â","ĥ":"Ä¥","♥":"â¥","♥":"â¥","…":"â¦","⊹":"â¹","𝔥":"ð¥","⤥":"⤥","⤦":"⤦","⇿":"â¿","∻":"â»","↩":"â©","↪":"âª","𝕙":"ð","―":"â","𝒽":"ð½","ℏ":"â","ħ":"ħ","⁃":"â","‐":"â","í":"Ã","í":"Ã","⁣":"â£","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"â","𝔦":"ð¦","ì":"ì","ì":"ì","ⅈ":"â ","⨌":"â¨","∭":"â","⧜":"â§","℩":"â©","ij":"ij","ī":"Ä«","ℑ":"â","ℐ":"â","ℑ":"â","ı":"ı","⊷":"â·","Ƶ":"Ƶ","∈":"â","℅":"â ","∞":"â","⧝":"â§","ı":"ı","∫":"â«","⊺":"âº","ℤ":"â¤","⊺":"âº","⨗":"â¨","⨼":"⨼","ё":"Ñ","į":"į","𝕚":"ð","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"ð¾","∈":"â","⋹":"â¹","⋵":"âµ","⋴":"â´","⋳":"â³","∈":"â","⁢":"â¢","ĩ":"Ä©","і":"Ñ","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"ð§","ȷ":"È·","𝕛":"ð","𝒿":"ð¿","ј":"Ñ","є":"Ñ","κ":"κ","ϰ":"ϰ","ķ":"Ä·","к":"к","𝔨":"ð¨","ĸ":"ĸ","х":"Ñ ","ќ":"Ñ","𝕜":"ð","𝓀":"ð","⇚":"â","⇐":"â","⤛":"â¤","⤎":"â¤","≦":"â¦","⪋":"âª","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"â","λ":"λ","⟨":"â¨","⦑":"â¦","⟨":"â¨","⪅":"⪠","«":"«","«":"«","←":"â","⇤":"â¤","⤟":"â¤","⤝":"â¤","↩":"â©","↫":"â«","⤹":"⤹","⥳":"⥳","↢":"â¢","⪫":"⪫","⤙":"â¤","⪭":"âª","⪭︀":"âªï¸","⤌":"â¤","❲":"â²","{":"{","[":"[","⦋":"â¦","⦏":"â¦","⦍":"â¦","ľ":"ľ","ļ":"ļ","⌈":"â","{":"{","л":"л","⤶":"⤶","“":"â","„":"â","⥧":"⥧","⥋":"â¥","↲":"â²","≤":"â¤","←":"â","↢":"â¢","↽":"â½","↼":"â¼","⇇":"â","↔":"â","⇆":"â","⇋":"â","↭":"â","⋋":"â","⋚":"â","≤":"â¤","≦":"â¦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"â©¿","⪁":"âª","⪃":"âª","⋚︀":"âï¸","⪓":"âª","⪅":"⪠","⋖":"â","⋚":"â","⪋":"âª","≶":"â¶","≲":"â²","⥼":"⥼","⌊":"â","𝔩":"ð©","≶":"â¶","⪑":"âª","↽":"â½","↼":"â¼","⥪":"⥪","▄":"â","љ":"Ñ","≪":"âª","⇇":"â","⌞":"â","⥫":"⥫","◺":"âº","ŀ":"Å","⎰":"â°","⎰":"â°","≨":"â¨","⪉":"âª","⪉":"âª","⪇":"âª","⪇":"âª","≨":"â¨","⋦":"â¦","⟬":"â¬","⇽":"â½","⟦":"â¦","⟵":"âµ","⟷":"â·","⟼":"â¼","⟶":"â¶","↫":"â«","↬":"â¬","⦅":"⦠","𝕝":"ð","⨭":"â¨","⨴":"⨴","∗":"â","_":"_","◊":"â","◊":"â","⧫":"â§«","(":"(","⦓":"â¦","⇆":"â","⌟":"â","⇋":"â","⥭":"â¥","‎":"â","⊿":"â¿","‹":"â¹","𝓁":"ð","↰":"â°","≲":"â²","⪍":"âª","⪏":"âª","[":"[","‘":"â","‚":"â","ł":"Å","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"â","⋋":"â","⋉":"â","⥶":"⥶","⩻":"â©»","⦖":"â¦","◃":"â","⊴":"â´","◂":"â","⥊":"â¥","⥦":"⥦","≨︀":"â¨ï¸","≨︀":"â¨ï¸","∺":"âº","¯":"¯","¯":"¯","♂":"â","✠":"â ","✠":"â ","↦":"â¦","↦":"â¦","↧":"â§","↤":"â¤","↥":"â¥","▮":"â®","⨩":"⨩","м":"м","—":"â","∡":"â¡","𝔪":"ðª","℧":"â§","µ":"µ","µ":"µ","∣":"â£","*":"*","⫰":"â«°","·":"·","·":"·","−":"â","⊟":"â","∸":"â¸","⨪":"⨪","⫛":"â«","…":"â¦","∓":"â","⊧":"â§","𝕞":"ð","∓":"â","𝓂":"ð","∾":"â¾","μ":"μ","⊸":"â¸","⊸":"â¸","⋙̸":"â̸","≫⃒":"â«â","≫̸":"â«Ì¸","⇍":"â","⇎":"â","⋘̸":"â̸","≪⃒":"âªâ","≪̸":"âªÌ¸","⇏":"â","⊯":"â¯","⊮":"â®","∇":"â","ń":"Å","∠⃒":"â â","≉":"â","⩰̸":"⩰̸","≋̸":"â̸","ʼn":"Å","≉":"â","♮":"â®","♮":"â®","ℕ":"â"," ":" "," ":" ","≎̸":"â̸","≏̸":"â̸","⩃":"â©","ň":"Å","ņ":"Å","≇":"â","⩭̸":"â©Ì¸","⩂":"â©","н":"н","–":"â","≠":"â ","⇗":"â","⤤":"⤤","↗":"â","↗":"â","≐̸":"â̸","≢":"â¢","⤨":"⤨","≂̸":"â̸","∄":"â","∄":"â","𝔫":"ð«","≧̸":"â§Ì¸","≱":"â±","≱":"â±","≧̸":"â§Ì¸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"âµ","≯":"â¯","≯":"â¯","⇎":"â","↮":"â®","⫲":"⫲","∋":"â","⋼":"â¼","⋺":"âº","∋":"â","њ":"Ñ","⇍":"â","≦̸":"â¦Ì¸","↚":"â","‥":"â¥","≰":"â°","↚":"â","↮":"â®","≰":"â°","≦̸":"â¦Ì¸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"â®","≴":"â´","≮":"â®","⋪":"âª","⋬":"â¬","∤":"â¤","𝕟":"ð","¬":"¬","¬":"¬","∉":"â","⋹̸":"â¹Ì¸","⋵̸":"âµÌ¸","∉":"â","⋷":"â·","⋶":"â¶","∌":"â","∌":"â","⋾":"â¾","⋽":"â½","∦":"â¦","∦":"â¦","⫽⃥":"⫽â¥","∂̸":"â̸","⨔":"â¨","⊀":"â","⋠":"â ","⪯̸":"⪯̸","⊀":"â","⪯̸":"⪯̸","⇏":"â","↛":"â","⤳̸":"⤳̸","↝̸":"â̸","↛":"â","⋫":"â«","⋭":"â","⊁":"â","⋡":"â¡","⪰̸":"⪰̸","𝓃":"ð","∤":"â¤","∦":"â¦","≁":"â","≄":"â","≄":"â","∤":"â¤","∦":"â¦","⋢":"â¢","⋣":"â£","⊄":"â","⫅̸":"⫠̸","⊈":"â","⊂⃒":"ââ","⊈":"â","⫅̸":"⫠̸","⊁":"â","⪰̸":"⪰̸","⊅":"â ","⫆̸":"â«Ì¸","⊉":"â","⊃⃒":"ââ","⊉":"â","⫆̸":"â«Ì¸","≹":"â¹","ñ":"ñ","ñ":"ñ","≸":"â¸","⋪":"âª","⋬":"â¬","⋫":"â«","⋭":"â","ν":"ν","#":"#","№":"â"," ":"â","⊭":"â","⤄":"â¤","≍⃒":"ââ","⊬":"â¬","≥⃒":"â¥â",">⃒":">â","⧞":"â§","⤂":"â¤","≤⃒":"â¤â","<⃒":"<â","⊴⃒":"â´â","⤃":"â¤","⊵⃒":"âµâ","∼⃒":"â¼â","⇖":"â","⤣":"⤣","↖":"â","↖":"â","⤧":"⤧","Ⓢ":"â","ó":"ó","ó":"ó","⊛":"â","⊚":"â","ô":"ô","ô":"ô","о":"о","⊝":"â","ő":"Å","⨸":"⨸","⊙":"â","⦼":"⦼","œ":"Å","⦿":"⦿","𝔬":"ð¬","˛":"Ë","ò":"ò","ò":"ò","⧁":"â§","⦵":"⦵","Ω":"Ω","∮":"â®","↺":"âº","⦾":"⦾","⦻":"⦻","‾":"â¾","⧀":"â§","ō":"Å","ω":"Ï","ο":"ο","⦶":"⦶","⊖":"â","𝕠":"ð ","⦷":"⦷","⦹":"⦹","⊕":"â","∨":"â¨","↻":"â»","⩝":"â©","ℴ":"â´","ℴ":"â´","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"â¶","⩖":"â©","⩗":"â©","⩛":"â©","ℴ":"â´","ø":"ø","ø":"ø","⊘":"â","õ":"õ","õ":"õ","⊗":"â","⨶":"⨶","ö":"ö","ö":"ö","⌽":"â½","∥":"â¥","¶":"¶","¶":"¶","∥":"â¥","⫳":"⫳","⫽":"⫽","∂":"â","п":"п","%":"%",".":".","‰":"â°","⊥":"â¥","‱":"â±","𝔭":"ð","φ":"Ï","ϕ":"Ï","ℳ":"â³","☎":"â","π":"Ï","⋔":"â","ϖ":"Ï","ℏ":"â","ℎ":"â","ℏ":"â","+":"+","⨣":"⨣","⊞":"â","⨢":"⨢","∔":"â","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"â¨","𝕡":"ð¡","£":"£","£":"£","≺":"âº","⪳":"⪳","⪷":"⪷","≼":"â¼","⪯":"⪯","≺":"âº","⪷":"⪷","≼":"â¼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"â¨","≾":"â¾","′":"â²","ℙ":"â","⪵":"⪵","⪹":"⪹","⋨":"â¨","∏":"â","⌮":"â®","⌒":"â","⌓":"â","∝":"â","∝":"â","≾":"â¾","⊰":"â°","𝓅":"ð ","ψ":"Ï"," ":"â","𝔮":"ð®","⨌":"â¨","𝕢":"ð¢","⁗":"â","𝓆":"ð","ℍ":"â","⨖":"â¨","?":"?","≟":"â",""":'"',""":'"',"⇛":"â","⇒":"â","⤜":"â¤","⤏":"â¤","⥤":"⥤","∽̱":"â½Ì±","ŕ":"Å","√":"â","⦳":"⦳","⟩":"â©","⦒":"â¦","⦥":"⦥","⟩":"â©","»":"»","»":"»","→":"â","⥵":"⥵","⇥":"â¥","⤠":"⤠","⤳":"⤳","⤞":"â¤","↪":"âª","↬":"â¬","⥅":"⥠","⥴":"⥴","↣":"â£","↝":"â","⤚":"â¤","∶":"â¶","ℚ":"â","⤍":"â¤","❳":"â³","}":"}","]":"]","⦌":"â¦","⦎":"â¦","⦐":"â¦","ř":"Å","ŗ":"Å","⌉":"â","}":"}","р":"Ñ","⤷":"⤷","⥩":"⥩","”":"â","”":"â","↳":"â³","ℜ":"â","ℛ":"â","ℜ":"â","ℝ":"â","▭":"â","®":"®","®":"®","⥽":"⥽","⌋":"â","𝔯":"ð¯","⇁":"â","⇀":"â","⥬":"⥬","ρ":"Ï","ϱ":"ϱ","→":"â","↣":"â£","⇁":"â","⇀":"â","⇄":"â","⇌":"â","⇉":"â","↝":"â","⋌":"â","˚":"Ë","≓":"â","⇄":"â","⇌":"â","‏":"â","⎱":"â±","⎱":"â±","⫮":"â«®","⟭":"â","⇾":"â¾","⟧":"â§","⦆":"â¦","𝕣":"ð£","⨮":"⨮","⨵":"⨵",")":")","⦔":"â¦","⨒":"â¨","⇉":"â","›":"âº","𝓇":"ð","↱":"â±","]":"]","’":"â","’":"â","⋌":"â","⋊":"â","▹":"â¹","⊵":"âµ","▸":"â¸","⧎":"â§","⥨":"⥨","℞":"â","ś":"Å","‚":"â","≻":"â»","⪴":"⪴","⪸":"⪸","š":"Å¡","≽":"â½","⪰":"⪰","ş":"Å","ŝ":"Å","⪶":"⪶","⪺":"⪺","⋩":"â©","⨓":"â¨","≿":"â¿","с":"Ñ","⋅":"â ","⊡":"â¡","⩦":"⩦","⇘":"â","⤥":"⤥","↘":"â","↘":"â","§":"§","§":"§",";":";","⤩":"⤩","∖":"â","∖":"â","✶":"â¶","𝔰":"ð°","⌢":"â¢","♯":"â¯","щ":"Ñ","ш":"Ñ","∣":"â£","∥":"â¥","­":"Â","­":"Â","σ":"Ï","ς":"Ï","ς":"Ï","∼":"â¼","⩪":"⩪","≃":"â","≃":"â","⪞":"âª","⪠":"⪠","⪝":"âª","⪟":"âª","≆":"â","⨤":"⨤","⥲":"⥲","←":"â","∖":"â","⨳":"⨳","⧤":"⧤","∣":"â£","⌣":"â£","⪪":"⪪","⪬":"⪬","⪬︀":"⪬ï¸","ь":"Ñ","/":"/","⧄":"â§","⌿":"â¿","𝕤":"ð¤","♠":"â ","♠":"â ","∥":"â¥","⊓":"â","⊓︀":"âï¸","⊔":"â","⊔︀":"âï¸","⊏":"â","⊑":"â","⊏":"â","⊑":"â","⊐":"â","⊒":"â","⊐":"â","⊒":"â","□":"â¡","□":"â¡","▪":"âª","▪":"âª","→":"â","𝓈":"ð","∖":"â","⌣":"â£","⋆":"â","☆":"â","★":"â ","ϵ":"ϵ","ϕ":"Ï","¯":"¯","⊂":"â","⫅":"â« ","⪽":"⪽","⊆":"â","⫃":"â«","⫁":"â«","⫋":"â«","⊊":"â","⪿":"⪿","⥹":"⥹","⊂":"â","⊆":"â","⫅":"â« ","⊊":"â","⫋":"â«","⫇":"â«","⫕":"â«","⫓":"â«","≻":"â»","⪸":"⪸","≽":"â½","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"â©","≿":"â¿","∑":"â","♪":"âª","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"â","⫆":"â«","⪾":"⪾","⫘":"â«","⊇":"â","⫄":"â«","⟉":"â","⫗":"â«","⥻":"⥻","⫂":"â«","⫌":"â«","⊋":"â","⫀":"â«","⊃":"â","⊇":"â","⫆":"â«","⊋":"â","⫌":"â«","⫈":"â«","⫔":"â«","⫖":"â«","⇙":"â","⤦":"⤦","↙":"â","↙":"â","⤪":"⤪","ß":"Ã","ß":"Ã","⌖":"â","τ":"Ï","⎴":"â´","ť":"Å¥","ţ":"Å£","т":"Ñ","⃛":"â","⌕":"â","𝔱":"ð±","∴":"â´","∴":"â´","θ":"θ","ϑ":"Ï","ϑ":"Ï","≈":"â","∼":"â¼"," ":"â","≈":"â","∼":"â¼","þ":"þ","þ":"þ","˜":"Ë","×":"Ã","×":"Ã","⊠":"â ","⨱":"⨱","⨰":"⨰","∭":"â","⤨":"⤨","⊤":"â¤","⌶":"â¶","⫱":"⫱","𝕥":"ð¥","⫚":"â«","⤩":"⤩","‴":"â´","™":"â¢","▵":"âµ","▿":"â¿","◃":"â","⊴":"â´","≜":"â","▹":"â¹","⊵":"âµ","◬":"â¬","≜":"â","⨺":"⨺","⨹":"⨹","⧍":"â§","⨻":"⨻","⏢":"â¢","𝓉":"ð","ц":"Ñ","ћ":"Ñ","ŧ":"ŧ","≬":"â¬","↞":"â","↠":"â ","⇑":"â","⥣":"⥣","ú":"ú","ú":"ú","↑":"â","ў":"Ñ","ŭ":"Å","û":"û","û":"û","у":"Ñ","⇅":"â ","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"ð²","ù":"ù","ù":"ù","↿":"â¿","↾":"â¾","▀":"â","⌜":"â","⌜":"â","⌏":"â","◸":"â¸","ū":"Å«","¨":"¨","¨":"¨","ų":"ų","𝕦":"ð¦","↑":"â","↕":"â","↿":"â¿","↾":"â¾","⊎":"â","υ":"Ï ","ϒ":"Ï","υ":"Ï ","⇈":"â","⌝":"â","⌝":"â","⌎":"â","ů":"ů","◹":"â¹","𝓊":"ð","⋰":"â°","ũ":"Å©","▵":"âµ","▴":"â´","⇈":"â","ü":"ü","ü":"ü","⦧":"⦧","⇕":"â","⫨":"⫨","⫩":"â«©","⊨":"â¨","⦜":"â¦","ϵ":"ϵ","ϰ":"ϰ","∅":"â ","ϕ":"Ï","ϖ":"Ï","∝":"â","↕":"â","ϱ":"ϱ","ς":"Ï","⊊︀":"âï¸","⫋︀":"â«ï¸","⊋︀":"âï¸","⫌︀":"â«ï¸","ϑ":"Ï","⊲":"â²","⊳":"â³","в":"в","⊢":"â¢","∨":"â¨","⊻":"â»","≚":"â","⋮":"â®","|":"|","|":"|","𝔳":"ð³","⊲":"â²","⊂⃒":"ââ","⊃⃒":"ââ","𝕧":"ð§","∝":"â","⊳":"â³","𝓋":"ð","⫋︀":"â«ï¸","⊊︀":"âï¸","⫌︀":"â«ï¸","⊋︀":"âï¸","⦚":"â¦","ŵ":"ŵ","⩟":"â©","∧":"â§","≙":"â","℘":"â","𝔴":"ð´","𝕨":"ð¨","℘":"â","≀":"â","≀":"â","𝓌":"ð","⋂":"â","◯":"â¯","⋃":"â","▽":"â½","𝔵":"ðµ","⟺":"âº","⟷":"â·","ξ":"ξ","⟸":"â¸","⟵":"âµ","⟼":"â¼","⋻":"â»","⨀":"â¨","𝕩":"ð©","⨁":"â¨","⨂":"â¨","⟹":"â¹","⟶":"â¶","𝓍":"ð","⨆":"â¨","⨄":"â¨","△":"â³","⋁":"â","⋀":"â","ý":"ý","ý":"ý","я":"Ñ","ŷ":"Å·","ы":"Ñ","¥":"Â¥","¥":"Â¥","𝔶":"ð¶","ї":"Ñ","𝕪":"ðª","𝓎":"ð","ю":"Ñ","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"â¨","ζ":"ζ","𝔷":"ð·","ж":"ж","⇝":"â","𝕫":"ð«","𝓏":"ð","‍":"â","‌":"â"},characters:{"Ã":"Æ","&":"&","Ã":"Á","Ä":"Ă","Ã":"Â","Ð":"А","ð":"𝔄","Ã":"À","Î":"Α","Ä":"Ā","â©":"⩓","Ä":"Ą","ð¸":"𝔸","â¡":"⁡","à ":"Å","ð":"𝒜","â":"≔","Ã":"Ã","Ã":"Ä","â":"∖","â«§":"⫧","â":"⌆","Ð":"Б","âµ":"∵","â¬":"ℬ","Î":"Β","ð ":"𝔅","ð¹":"𝔹","Ë":"˘","â":"≎","Ч":"Ч","©":"©","Ä":"Ć","â":"⋒","â ":"ⅅ","â":"ℭ","Ä":"Č","Ã":"Ç","Ä":"Ĉ","â°":"∰","Ä":"Ċ","¸":"¸","·":"·","Χ":"Χ","â":"⊙","â":"⊖","â":"⊕","â":"⊗","â²":"∲","â":"”","â":"’","â·":"∷","â©´":"⩴","â¡":"≡","â¯":"∯","â®":"∮","â":"ℂ","â":"∐","â³":"∳","⨯":"⨯","ð":"𝒞","â":"⋓","â":"≍","â¤":"⤑","Ð":"Ђ","Ð ":"Ѕ","Ð":"Џ","â¡":"‡","â¡":"↡","⫤":"⫤","Ä":"Ď","Ð":"Д","â":"∇","Î":"Δ","ð":"𝔇","´":"´","Ë":"˙","Ë":"˝","`":"`","Ë":"˜","â":"⋄","â ":"ⅆ","ð»":"𝔻","¨":"¨","â":"⃜","â":"≐","â":"⇓","â":"⇐","â":"⇔","â¸":"⟸","âº":"⟺","â¹":"⟹","â":"⇒","â¨":"⊨","â":"⇑","â":"⇕","â¥":"∥","â":"↓","â¤":"⤓","âµ":"⇵","Ì":"̑","â¥":"⥐","â¥":"⥞","â½":"↽","â¥":"⥖","â¥":"⥟","â":"⇁","â¥":"⥗","â¤":"⊤","â§":"↧","ð":"𝒟","Ä":"Đ","Å":"Ŋ","Ã":"Ð","Ã":"É","Ä":"Ě","Ã":"Ê","Ð":"Э","Ä":"Ė","ð":"𝔈","Ã":"È","â":"∈","Ä":"Ē","â»":"◻","â«":"▫","Ä":"Ę","ð¼":"𝔼","Î":"Ε","⩵":"⩵","â":"≂","â":"⇌","â°":"ℰ","⩳":"⩳","Î":"Η","Ã":"Ë","â":"∃","â ":"ⅇ","Ф":"Ф","ð":"𝔉","â¼":"◼","âª":"▪","ð½":"𝔽","â":"∀","â±":"ℱ","Ð":"Ѓ",">":">","Î":"Γ","Ï":"Ϝ","Ä":"Ğ","Ä¢":"Ģ","Ä":"Ĝ","Ð":"Г","Ä ":"Ġ","ð":"𝔊","â":"⋙","ð¾":"𝔾","â¥":"≥","â":"⋛","â§":"≧","⪢":"⪢","â·":"≷","⩾":"⩾","â³":"≳","ð¢":"𝒢","â«":"≫","Ъ":"Ъ","Ë":"ˇ","^":"^","Ĥ":"Ĥ","â":"ℌ","â":"ℋ","â":"ℍ","â":"─","Ħ":"Ħ","â":"≏","Ð":"Е","IJ":"IJ","Ð":"Ё","Ã":"Í","Ã":"Î","Ð":"И","İ":"İ","â":"ℑ","Ã":"Ì","Ī":"Ī","â ":"ⅈ","â¬":"∬","â«":"∫","â":"⋂","â£":"⁣","â¢":"⁢","Ä®":"Į","ð":"𝕀","Î":"Ι","â":"ℐ","Ĩ":"Ĩ","Ð":"І","Ã":"Ï","Ä´":"Ĵ","Ð":"Й","ð":"𝔍","ð":"𝕁","ð¥":"𝒥","Ð":"Ј","Ð":"Є","Ð¥":"Х","Ð":"Ќ","Î":"Κ","Ķ":"Ķ","Ð":"К","ð":"𝔎","ð":"𝕂","ð¦":"𝒦","Ð":"Љ","<":"<","Ĺ":"Ĺ","Î":"Λ","âª":"⟪","â":"ℒ","â":"↞","Ľ":"Ľ","Ä»":"Ļ","Ð":"Л","â¨":"⟨","â":"←","â¤":"⇤","â":"⇆","â":"⌈","â¦":"⟦","⥡":"⥡","â":"⇃","â¥":"⥙","â":"⌊","â":"↔","â¥":"⥎","â£":"⊣","â¤":"↤","â¥":"⥚","â²":"⊲","â§":"⧏","â´":"⊴","â¥":"⥑","⥠":"⥠","â¿":"↿","â¥":"⥘","â¼":"↼","â¥":"⥒","â":"⋚","â¦":"≦","â¶":"≶","⪡":"⪡","⩽":"⩽","â²":"≲","ð":"𝔏","â":"⋘","â":"⇚","Ä¿":"Ŀ","âµ":"⟵","â·":"⟷","â¶":"⟶","ð":"𝕃","â":"↙","â":"↘","â°":"↰","Å":"Ł","âª":"≪","⤠":"⤅","Ð":"М","â":" ","â³":"ℳ","ð":"𝔐","â":"∓","ð":"𝕄","Î":"Μ","Ð":"Њ","Å":"Ń","Å":"Ň","Å ":"Ņ","Ð":"Н","â":"​","\n":"
","ð":"𝔑","â ":"⁠"," ":" ","â":"ℕ","⫬":"⫬","â¢":"≢","â":"≭","â¦":"∦","â":"∉","â ":"≠","â̸":"≂̸","â":"∄","â¯":"≯","â±":"≱","â§Ì¸":"≧̸","â«Ì¸":"≫̸","â¹":"≹","⩾̸":"⩾̸","âµ":"≵","â̸":"≎̸","â̸":"≏̸","âª":"⋪","â§Ì¸":"⧏̸","â¬":"⋬","â®":"≮","â°":"≰","â¸":"≸","âªÌ¸":"≪̸","⩽̸":"⩽̸","â´":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","â":"⊀","⪯̸":"⪯̸","â ":"⋠","â":"∌","â«":"⋫","â§Ì¸":"⧐̸","â":"⋭","â̸":"⊏̸","â¢":"⋢","â̸":"⊐̸","â£":"⋣","ââ":"⊂⃒","â":"⊈","â":"⊁","⪰̸":"⪰̸","â¡":"⋡","â¿Ì¸":"≿̸","ââ":"⊃⃒","â":"⊉","â":"≁","â":"≄","â":"≇","â":"≉","â¤":"∤","ð©":"𝒩","Ã":"Ñ","Î":"Ν","Å":"Œ","Ã":"Ó","Ã":"Ô","Ð":"О","Å":"Ő","ð":"𝔒","Ã":"Ò","Å":"Ō","Ω":"Ω","Î":"Ο","ð":"𝕆","â":"“","â":"‘","â©":"⩔","ðª":"𝒪","Ã":"Ø","Ã":"Õ","⨷":"⨷","Ã":"Ö","â¾":"‾","â":"⏞","â´":"⎴","â":"⏜","â":"∂","Ð":"П","ð":"𝔓","Φ":"Φ","Î ":"Π","±":"±","â":"ℙ","⪻":"⪻","âº":"≺","⪯":"⪯","â¼":"≼","â¾":"≾","â³":"″","â":"∏","â":"∝","ð«":"𝒫","Ψ":"Ψ",'"':""","ð":"𝔔","â":"ℚ","ð¬":"𝒬","â¤":"⤐","®":"®","Å":"Ŕ","â«":"⟫","â ":"↠","â¤":"⤖","Å":"Ř","Å":"Ŗ","Ð ":"Р","â":"ℜ","â":"∋","â":"⇋","⥯":"⥯","Ρ":"Ρ","â©":"⟩","â":"→","â¥":"⇥","â":"⇄","â":"⌉","â§":"⟧","â¥":"⥝","â":"⇂","â¥":"⥕","â":"⌋","â¢":"⊢","â¦":"↦","â¥":"⥛","â³":"⊳","â§":"⧐","âµ":"⊵","â¥":"⥏","â¥":"⥜","â¾":"↾","â¥":"⥔","â":"⇀","â¥":"⥓","â":"ℝ","⥰":"⥰","â":"⇛","â":"ℛ","â±":"↱","â§´":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Å":"Ś","⪼":"⪼","Å ":"Š","Å":"Ş","Å":"Ŝ","С":"С","ð":"𝔖","â":"↑","Σ":"Σ","â":"∘","ð":"𝕊","â":"√","â¡":"□","â":"⊓","â":"⊏","â":"⊑","â":"⊐","â":"⊒","â":"⊔","ð®":"𝒮","â":"⋆","â":"⋐","â":"⊆","â»":"≻","⪰":"⪰","â½":"≽","â¿":"≿","â":"∑","â":"⋑","â":"⊃","â":"⊇","Ã":"Þ","â¢":"™","Ð":"Ћ","Ц":"Ц","\t":"	","Τ":"Τ","Ť":"Ť","Å¢":"Ţ","Т":"Т","ð":"𝔗","â´":"∴","Î":"Θ","ââ":"  ","â":" ","â¼":"∼","â":"≃","â ":"≅","â":"≈","ð":"𝕋","â":"⃛","ð¯":"𝒯","Ŧ":"Ŧ","Ã":"Ú","â":"↟","â¥":"⥉","Ð":"Ў","Ŭ":"Ŭ","Ã":"Û","У":"У","Ű":"Ű","ð":"𝔘","Ã":"Ù","Ū":"Ū",_:"_","â":"⏟","âµ":"⎵","â":"⏝","â":"⋃","â":"⊎","Ų":"Ų","ð":"𝕌","â¤":"⤒","â ":"⇅","â":"↕","⥮":"⥮","â¥":"⊥","â¥":"↥","â":"↖","â":"↗","Ï":"ϒ","Î¥":"Υ","Å®":"Ů","ð°":"𝒰","Ũ":"Ũ","Ã":"Ü","â«":"⊫","â««":"⫫","Ð":"В","â©":"⊩","⫦":"⫦","â":"⋁","â":"‖","â£":"∣","|":"|","â":"❘","â":"≀","â":" ","ð":"𝔙","ð":"𝕍","ð±":"𝒱","âª":"⊪","Å´":"Ŵ","â":"⋀","ð":"𝔚","ð":"𝕎","ð²":"𝒲","ð":"𝔛","Î":"Ξ","ð":"𝕏","ð³":"𝒳","Я":"Я","Ð":"Ї","Ю":"Ю","Ã":"Ý","Ŷ":"Ŷ","Ы":"Ы","ð":"𝔜","ð":"𝕐","ð´":"𝒴","Ÿ":"Ÿ","Ð":"Ж","Ź":"Ź","Ž":"Ž","Ð":"З","Å»":"Ż","Î":"Ζ","â¨":"ℨ","â¤":"ℤ","ðµ":"𝒵","á":"á","Ä":"ă","â¾":"∾","â¾Ì³":"∾̳","â¿":"∿","â":"â","а":"а","æ":"æ","ð":"𝔞","à ":"à","âµ":"ℵ","α":"α","Ä":"ā","⨿":"⨿","â§":"∧","â©":"⩕","â©":"⩜","â©":"⩘","â©":"⩚","â ":"∠","⦤":"⦤","â¡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","â¦":"⦭","⦮":"⦮","⦯":"⦯","â":"∟","â¾":"⊾","â¦":"⦝","â¢":"∢","â¼":"⍼","Ä ":"ą","ð":"𝕒","â©°":"⩰","⩯":"⩯","â":"≊","â":"≋","'":"'","Ã¥":"å","ð¶":"𝒶","*":"*","ã":"ã","ä":"ä","â¨":"⨑","â«":"⫭","â":"≌","϶":"϶","âµ":"‵","â½":"∽","â":"⋍","â½":"⊽","â ":"⌅","â¶":"⎶","б":"б","â":"„","⦰":"⦰","β":"β","â¶":"ℶ","â¬":"≬","ð":"𝔟","â¯":"◯","â¨":"⨀","â¨":"⨁","â¨":"⨂","â¨":"⨆","â ":"★","â½":"▽","â³":"△","â¨":"⨄","â¤":"⤍","â§«":"⧫","â´":"▴","â¾":"▾","â":"◂","â¸":"▸","â£":"␣","â":"▒","â":"░","â":"▓","â":"█","=â¥":"=⃥","â¡â¥":"≡⃥","â":"⌐","ð":"𝕓","â":"⋈","â":"╗","â":"╔","â":"╖","â":"╓","â":"═","â¦":"╦","â©":"╩","â¤":"╤","â§":"╧","â":"╝","â":"╚","â":"╜","â":"╙","â":"║","â¬":"╬","â£":"╣","â ":"╠","â«":"╫","â¢":"╢","â":"╟","â§":"⧉","â":"╕","â":"╒","â":"┐","â":"┌","â¥":"╥","â¨":"╨","â¬":"┬","â´":"┴","â":"⊟","â":"⊞","â ":"⊠","â":"╛","â":"╘","â":"┘","â":"└","â":"│","âª":"╪","â¡":"╡","â":"╞","â¼":"┼","â¤":"┤","â":"├","¦":"¦","ð·":"𝒷","â":"⁏","\\":"\","â§ ":"⧅","â":"⟈","â¢":"•","⪮":"⪮","Ä":"ć","â©":"∩","â©":"⩄","â©":"⩉","â©":"⩋","â©":"⩇","â©":"⩀","â©ï¸":"∩︀","â":"⁁","â©":"⩍","Ä":"č","ç":"ç","Ä":"ĉ","â©":"⩌","â©":"⩐","Ä":"ċ","⦲":"⦲","¢":"¢","ð ":"𝔠","Ñ":"ч","â":"✓","Ï":"χ","â":"○","â§":"⧃","Ë":"ˆ","â":"≗","âº":"↺","â»":"↻","â":"Ⓢ","â":"⊛","â":"⊚","â":"⊝","â¨":"⨐","⫯":"⫯","â§":"⧂","â£":"♣",":":":",",":",","@":"@","â":"∁","â©":"⩭","ð":"𝕔","â":"℗","âµ":"↵","â":"✗","ð¸":"𝒸","â«":"⫏","â«":"⫑","â«":"⫐","â«":"⫒","â¯":"⋯","⤸":"⤸","⤵":"⤵","â":"⋞","â":"⋟","â¶":"↶","⤽":"⤽","âª":"∪","â©":"⩈","â©":"⩆","â©":"⩊","â":"⊍","â© ":"⩅","âªï¸":"∪︀","â·":"↷","⤼":"⤼","â":"⋎","â":"⋏","¤":"¤","â±":"∱","â":"⌭","⥥":"⥥","â ":"†","â¸":"ℸ","â":"‐","â¤":"⤏","Ä":"ď","д":"д","â":"⇊","â©·":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","ð¡":"𝔡","â¦":"♦","Ï":"ϝ","â²":"⋲","÷":"÷","â":"⋇","Ñ":"ђ","â":"⌞","â":"⌍",$:"$","ð":"𝕕","â":"≑","â¸":"∸","â":"∔","â¡":"⊡","â":"⌟","â":"⌌","ð¹":"𝒹","Ñ":"ѕ","â§¶":"⧶","Ä":"đ","â±":"⋱","â¿":"▿","⦦":"⦦","Ñ":"џ","â¿":"⟿","é":"é","â©®":"⩮","Ä":"ě","â":"≖","ê":"ê","â":"≕","Ñ":"э","Ä":"ė","â":"≒","ð¢":"𝔢","âª":"⪚","è":"è","âª":"⪖","âª":"⪘","âª":"⪙","â§":"⏧","â":"ℓ","âª":"⪕","âª":"⪗","Ä":"ē","â ":"∅","â":" ","â ":" ","â":" ","Å":"ŋ","â":" ","Ä":"ę","ð":"𝕖","â":"⋕","â§£":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","â":"≟","⩸":"⩸","â§¥":"⧥","â":"≓","⥱":"⥱","â¯":"ℯ","η":"η","ð":"ð","ë":"ë","â¬":"€","!":"!","Ñ":"ф","â":"♀","ï¬":"ffi","ï¬":"ff","ï¬":"ffl","ð£":"𝔣","ï¬":"fi",fj:"fj","â":"♭","ï¬":"fl","â±":"▱","Æ":"ƒ","ð":"𝕗","â":"⋔","â«":"⫙","â¨":"⨍","½":"½","â ":"⅓","¼":"¼","â ":"⅕","â ":"⅙","â ":"⅛","â ":"⅔","â ":"⅖","¾":"¾","â ":"⅗","â ":"⅜","â ":"⅘","â ":"⅚","â ":"⅝","â ":"⅞","â":"⁄","â¢":"⌢","ð»":"𝒻","âª":"⪌","ǵ":"ǵ","γ":"γ","âª":"⪆","Ä":"ğ","Ä":"ĝ","г":"г","Ä¡":"ġ","⪩":"⪩","âª":"⪀","âª":"⪂","âª":"⪄","âï¸":"⋛︀","âª":"⪔","ð¤":"𝔤","â·":"ℷ","Ñ":"ѓ","âª":"⪒","⪥":"⪥","⪤":"⪤","â©":"≩","âª":"⪊","âª":"⪈","â§":"⋧","ð":"𝕘","â":"ℊ","âª":"⪎","âª":"⪐","⪧":"⪧","⩺":"⩺","â":"⋗","â¦":"⦕","⩼":"⩼","⥸":"⥸","â©ï¸":"≩︀","Ñ":"ъ","â¥":"⥈","â":"↭","â":"ℏ","Ä¥":"ĥ","â¥":"♥","â¦":"…","â¹":"⊹","ð¥":"𝔥","⤥":"⤥","⤦":"⤦","â¿":"⇿","â»":"∻","â©":"↩","âª":"↪","ð":"𝕙","â":"―","ð½":"𝒽","ħ":"ħ","â":"⁃","Ã":"í","î":"î","и":"и","е":"е","¡":"¡","ð¦":"𝔦","ì":"ì","â¨":"⨌","â":"∭","â§":"⧜","â©":"℩","ij":"ij","Ä«":"ī","ı":"ı","â·":"⊷","Ƶ":"Ƶ","â ":"℅","â":"∞","â§":"⧝","âº":"⊺","â¨":"⨗","⨼":"⨼","Ñ":"ё","į":"į","ð":"𝕚","ι":"ι","¿":"¿","ð¾":"𝒾","â¹":"⋹","âµ":"⋵","â´":"⋴","â³":"⋳","Ä©":"ĩ","Ñ":"і","ï":"ï","ĵ":"ĵ","й":"й","ð§":"𝔧","È·":"ȷ","ð":"𝕛","ð¿":"𝒿","Ñ":"ј","Ñ":"є","κ":"κ","ϰ":"ϰ","Ä·":"ķ","к":"к","ð¨":"𝔨","ĸ":"ĸ","Ñ ":"х","Ñ":"ќ","ð":"𝕜","ð":"𝓀","â¤":"⤛","â¤":"⤎","âª":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","â¦":"⦑","⪠":"⪅","«":"«","â¤":"⤟","â¤":"⤝","â«":"↫","⤹":"⤹","⥳":"⥳","â¢":"↢","⪫":"⪫","â¤":"⤙","âª":"⪭","âªï¸":"⪭︀","â¤":"⤌","â²":"❲","{":"{","[":"[","â¦":"⦋","â¦":"⦏","â¦":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","â¥":"⥋","â²":"↲","â¤":"≤","â":"⇇","â":"⋋","⪨":"⪨","â©¿":"⩿","âª":"⪁","âª":"⪃","âï¸":"⋚︀","âª":"⪓","â":"⋖","⥼":"⥼","ð©":"𝔩","âª":"⪑","⥪":"⥪","â":"▄","Ñ":"љ","⥫":"⥫","âº":"◺","Å":"ŀ","â°":"⎰","â¨":"≨","âª":"⪉","âª":"⪇","â¦":"⋦","â¬":"⟬","â½":"⇽","â¼":"⟼","â¬":"↬","⦠":"⦅","ð":"𝕝","â¨":"⨭","⨴":"⨴","â":"∗","â":"◊","(":"(","â¦":"⦓","â¥":"⥭","â":"‎","â¿":"⊿","â¹":"‹","ð":"𝓁","âª":"⪍","âª":"⪏","â":"‚","Å":"ł","⪦":"⪦","⩹":"⩹","â":"⋉","⥶":"⥶","â©»":"⩻","â¦":"⦖","â":"◃","â¥":"⥊","⥦":"⥦","â¨ï¸":"≨︀","âº":"∺","¯":"¯","â":"♂","â ":"✠","â®":"▮","⨩":"⨩","м":"м","â":"—","ðª":"𝔪","â§":"℧","µ":"µ","â«°":"⫰","â":"−","⨪":"⨪","â«":"⫛","â§":"⊧","ð":"𝕞","ð":"𝓂","μ":"μ","â¸":"⊸","â̸":"⋙̸","â«â":"≫⃒","â":"⇍","â":"⇎","â̸":"⋘̸","âªâ":"≪⃒","â":"⇏","â¯":"⊯","â®":"⊮","Å":"ń","â â":"∠⃒","⩰̸":"⩰̸","â̸":"≋̸","Å":"ʼn","â®":"♮","â©":"⩃","Å":"ň","Å":"ņ","â©Ì¸":"⩭̸","â©":"⩂","н":"н","â":"–","â":"⇗","⤤":"⤤","â̸":"≐̸","⤨":"⤨","ð«":"𝔫","â®":"↮","⫲":"⫲","â¼":"⋼","âº":"⋺","Ñ":"њ","â¦Ì¸":"≦̸","â":"↚","â¥":"‥","ð":"𝕟","¬":"¬","â¹Ì¸":"⋹̸","âµÌ¸":"⋵̸","â·":"⋷","â¶":"⋶","â¾":"⋾","â½":"⋽","⫽â¥":"⫽⃥","â̸":"∂̸","â¨":"⨔","â":"↛","⤳̸":"⤳̸","â̸":"↝̸","ð":"𝓃","â":"⊄","⫠̸":"⫅̸","â ":"⊅","â«Ì¸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","â":"№","â":" ","â":"⊭","â¤":"⤄","ââ":"≍⃒","â¬":"⊬","â¥â":"≥⃒",">â":">⃒","â§":"⧞","â¤":"⤂","â¤â":"≤⃒","<â":"<⃒","â´â":"⊴⃒","â¤":"⤃","âµâ":"⊵⃒","â¼â":"∼⃒","â":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","Å":"ő","⨸":"⨸","⦼":"⦼","Å":"œ","⦿":"⦿","ð¬":"𝔬","Ë":"˛","ò":"ò","â§":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","â§":"⧀","Å":"ō","Ï":"ω","ο":"ο","⦶":"⦶","ð ":"𝕠","⦷":"⦷","⦹":"⦹","â¨":"∨","â©":"⩝","â´":"ℴ","ª":"ª","º":"º","â¶":"⊶","â©":"⩖","â©":"⩗","â©":"⩛","ø":"ø","â":"⊘","õ":"õ","⨶":"⨶","ö":"ö","â½":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","â°":"‰","â±":"‱","ð":"𝔭","Ï":"φ","Ï":"ϕ","â":"☎","Ï":"π","Ï":"ϖ","â":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","â¨":"⨕","ð¡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","â¨":"⋨","â²":"′","â®":"⌮","â":"⌒","â":"⌓","â°":"⊰","ð ":"𝓅","Ï":"ψ","â":" ","ð®":"𝔮","ð¢":"𝕢","â":"⁗","ð":"𝓆","â¨":"⨖","?":"?","â¤":"⤜","⥤":"⥤","â½Ì±":"∽̱","Å":"ŕ","⦳":"⦳","â¦":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","â¤":"⤞","⥠":"⥅","⥴":"⥴","â£":"↣","â":"↝","â¤":"⤚","â¶":"∶","â³":"❳","}":"}","]":"]","â¦":"⦌","â¦":"⦎","â¦":"⦐","Å":"ř","Å":"ŗ","Ñ":"р","⤷":"⤷","⥩":"⥩","â³":"↳","â":"▭","⥽":"⥽","ð¯":"𝔯","⥬":"⥬","Ï":"ρ","ϱ":"ϱ","â":"⇉","â":"⋌","Ë":"˚","â":"‏","â±":"⎱","â«®":"⫮","â":"⟭","â¾":"⇾","â¦":"⦆","ð£":"𝕣","⨮":"⨮","⨵":"⨵",")":")","â¦":"⦔","â¨":"⨒","âº":"›","ð":"𝓇","â":"⋊","â¹":"▹","â§":"⧎","⥨":"⥨","â":"℞","Å":"ś","⪴":"⪴","⪸":"⪸","Å¡":"š","Å":"ş","Å":"ŝ","⪶":"⪶","⪺":"⪺","â©":"⋩","â¨":"⨓","Ñ":"с","â ":"⋅","⩦":"⩦","â":"⇘","§":"§",";":";","⤩":"⤩","â¶":"✶","ð°":"𝔰","â¯":"♯","Ñ":"щ","Ñ":"ш","Â":"­","Ï":"σ","Ï":"ς","⩪":"⩪","âª":"⪞","⪠":"⪠","âª":"⪝","âª":"⪟","â":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","â£":"⌣","⪪":"⪪","⪬":"⪬","⪬ï¸":"⪬︀","Ñ":"ь","/":"/","â§":"⧄","â¿":"⌿","ð¤":"𝕤","â ":"♠","âï¸":"⊓︀","âï¸":"⊔︀","ð":"𝓈","â":"☆","â":"⊂","â« ":"⫅","⪽":"⪽","â«":"⫃","â«":"⫁","â«":"⫋","â":"⊊","⪿":"⪿","⥹":"⥹","â«":"⫇","â«":"⫕","â«":"⫓","âª":"♪","¹":"¹","²":"²","³":"³","â«":"⫆","⪾":"⪾","â«":"⫘","â«":"⫄","â":"⟉","â«":"⫗","⥻":"⥻","â«":"⫂","â«":"⫌","â":"⊋","â«":"⫀","â«":"⫈","â«":"⫔","â«":"⫖","â":"⇙","⤪":"⤪","Ã":"ß","â":"⌖","Ï":"τ","Å¥":"ť","Å£":"ţ","Ñ":"т","â":"⌕","ð±":"𝔱","θ":"θ","Ï":"ϑ","þ":"þ","Ã":"×","⨱":"⨱","⨰":"⨰","â¶":"⌶","⫱":"⫱","ð¥":"𝕥","â«":"⫚","â´":"‴","âµ":"▵","â":"≜","â¬":"◬","⨺":"⨺","⨹":"⨹","â§":"⧍","⨻":"⨻","â¢":"⏢","ð":"𝓉","Ñ":"ц","Ñ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","Ñ":"ў","Å":"ŭ","û":"û","Ñ":"у","ű":"ű","⥾":"⥾","ð²":"𝔲","ù":"ù","â":"▀","â":"⌜","â":"⌏","â¸":"◸","Å«":"ū","ų":"ų","ð¦":"𝕦","Ï ":"υ","â":"⇈","â":"⌝","â":"⌎","ů":"ů","â¹":"◹","ð":"𝓊","â°":"⋰","Å©":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","â«©":"⫩","â¦":"⦜","âï¸":"⊊︀","â«ï¸":"⫋︀","âï¸":"⊋︀","â«ï¸":"⫌︀","в":"в","â»":"⊻","â":"≚","â®":"⋮","ð³":"𝔳","ð§":"𝕧","ð":"𝓋","â¦":"⦚","ŵ":"ŵ","â©":"⩟","â":"≙","â":"℘","ð´":"𝔴","ð¨":"𝕨","ð":"𝓌","ðµ":"𝔵","ξ":"ξ","â»":"⋻","ð©":"𝕩","ð":"𝓍","ý":"ý","Ñ":"я","Å·":"ŷ","Ñ":"ы","Â¥":"¥","ð¶":"𝔶","Ñ":"ї","ðª":"𝕪","ð":"𝓎","Ñ":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","ð·":"𝔷","ж":"ж","â":"⇝","ð«":"𝕫","ð":"𝓏","â":"‍","â":"‌"}}}; 12677//# sourceMappingURL=./named-references.js.map 12678 12679/***/ }), 12680
vendor: 726 bytes, lines 12681-12692
12681/***/ "./node_modules/html-entities/lib/numeric-unicode-map.js": 12682/*!***************************************************************!*\ 12683 !*** ./node_modules/html-entities/lib/numeric-unicode-map.js ***! 12684 \***************************************************************/ 12685/***/ ((__unused_webpack_module, exports) => { 12686 12687"use strict"; 12688Object.defineProperty(exports, "__esModule", ({value:true}));exports.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}; 12689//# sourceMappingURL=./numeric-unicode-map.js.map 12690 12691/***/ }), 12692
vendor: 904 bytes, lines 12693-12704
12693/***/ "./node_modules/html-entities/lib/surrogate-pairs.js": 12694/*!***********************************************************!*\ 12695 !*** ./node_modules/html-entities/lib/surrogate-pairs.js ***! 12696 \***********************************************************/ 12697/***/ ((__unused_webpack_module, exports) => { 12698 12699"use strict"; 12700Object.defineProperty(exports, "__esModule", ({value:true}));exports.fromCodePoint=String.fromCodePoint||function(astralCodePoint){return String.fromCharCode(Math.floor((astralCodePoint-65536)/1024)+55296,(astralCodePoint-65536)%1024+56320)};exports.getCodePoint=String.prototype.codePointAt?function(input,position){return input.codePointAt(position)}:function(input,position){return(input.charCodeAt(position)-55296)*1024+input.charCodeAt(position+1)-56320+65536};exports.highSurrogateFrom=55296;exports.highSurrogateTo=56319; 12701//# sourceMappingURL=./surrogate-pairs.js.map 12702 12703/***/ }), 12704
vendor: 544,380 bytes, lines 12705-29916
12705/***/ "./node_modules/lodash/lodash.js": 12706/*!***************************************!*\ 12707 !*** ./node_modules/lodash/lodash.js ***! 12708 \***************************************/ 12709/***/ (function(module, exports, __webpack_require__) { 12710 12711/* module decorator */ module = __webpack_require__.nmd(module); 12712var __WEBPACK_AMD_DEFINE_RESULT__;/** 12713 * @license 12714 * Lodash <https://lodash.com/> 12715 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 12716 * Released under MIT license <https://lodash.com/license> 12717 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 12718 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 12719 */ 12720;(function() { 12721 12722 /** Used as a safe reference for `undefined` in pre-ES5 environments. */ 12723 var undefined; 12724 12725 /** Used as the semantic version number. */ 12726 var VERSION = '4.17.21'; 12727 12728 /** Used as the size to enable large array optimizations. */ 12729 var LARGE_ARRAY_SIZE = 200; 12730 12731 /** Error message constants. */ 12732 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', 12733 FUNC_ERROR_TEXT = 'Expected a function', 12734 INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; 12735 12736 /** Used to stand-in for `undefined` hash values. */ 12737 var HASH_UNDEFINED = '__lodash_hash_undefined__'; 12738 12739 /** Used as the maximum memoize cache size. */ 12740 var MAX_MEMOIZE_SIZE = 500; 12741 12742 /** Used as the internal argument placeholder. */ 12743 var PLACEHOLDER = '__lodash_placeholder__'; 12744 12745 /** Used to compose bitmasks for cloning. */ 12746 var CLONE_DEEP_FLAG = 1, 12747 CLONE_FLAT_FLAG = 2, 12748 CLONE_SYMBOLS_FLAG = 4; 12749 12750 /** Used to compose bitmasks for value comparisons. */ 12751 var COMPARE_PARTIAL_FLAG = 1, 12752 COMPARE_UNORDERED_FLAG = 2; 12753 12754 /** Used to compose bitmasks for function metadata. */ 12755 var WRAP_BIND_FLAG = 1, 12756 WRAP_BIND_KEY_FLAG = 2, 12757 WRAP_CURRY_BOUND_FLAG = 4, 12758 WRAP_CURRY_FLAG = 8, 12759 WRAP_CURRY_RIGHT_FLAG = 16, 12760 WRAP_PARTIAL_FLAG = 32, 12761 WRAP_PARTIAL_RIGHT_FLAG = 64, 12762 WRAP_ARY_FLAG = 128, 12763 WRAP_REARG_FLAG = 256, 12764 WRAP_FLIP_FLAG = 512; 12765 12766 /** Used as default options for `_.truncate`. */ 12767 var DEFAULT_TRUNC_LENGTH = 30, 12768 DEFAULT_TRUNC_OMISSION = '...'; 12769 12770 /** Used to detect hot functions by number of calls within a span of milliseconds. */ 12771 var HOT_COUNT = 800, 12772 HOT_SPAN = 16; 12773 12774 /** Used to indicate the type of lazy iteratees. */ 12775 var LAZY_FILTER_FLAG = 1, 12776 LAZY_MAP_FLAG = 2, 12777 LAZY_WHILE_FLAG = 3; 12778 12779 /** Used as references for various `Number` constants. */ 12780 var INFINITY = 1 / 0, 12781 MAX_SAFE_INTEGER = 9007199254740991, 12782 MAX_INTEGER = 1.7976931348623157e+308, 12783 NAN = 0 / 0; 12784 12785 /** Used as references for the maximum length and index of an array. */ 12786 var MAX_ARRAY_LENGTH = 4294967295, 12787 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, 12788 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; 12789 12790 /** Used to associate wrap methods with their bit flags. */ 12791 var wrapFlags = [ 12792 ['ary', WRAP_ARY_FLAG], 12793 ['bind', WRAP_BIND_FLAG], 12794 ['bindKey', WRAP_BIND_KEY_FLAG], 12795 ['curry', WRAP_CURRY_FLAG], 12796 ['curryRight', WRAP_CURRY_RIGHT_FLAG], 12797 ['flip', WRAP_FLIP_FLAG], 12798 ['partial', WRAP_PARTIAL_FLAG], 12799 ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], 12800 ['rearg', WRAP_REARG_FLAG] 12801 ]; 12802 12803 /** `Object#toString` result references. */ 12804 var argsTag = '[object Arguments]', 12805 arrayTag = '[object Array]', 12806 asyncTag = '[object AsyncFunction]', 12807 boolTag = '[object Boolean]', 12808 dateTag = '[object Date]', 12809 domExcTag = '[object DOMException]', 12810 errorTag = '[object Error]', 12811 funcTag = '[object Function]', 12812 genTag = '[object GeneratorFunction]', 12813 mapTag = '[object Map]', 12814 numberTag = '[object Number]', 12815 nullTag = '[object Null]', 12816 objectTag = '[object Object]', 12817 promiseTag = '[object Promise]', 12818 proxyTag = '[object Proxy]', 12819 regexpTag = '[object RegExp]', 12820 setTag = '[object Set]', 12821 stringTag = '[object String]', 12822 symbolTag = '[object Symbol]', 12823 undefinedTag = '[object Undefined]', 12824 weakMapTag = '[object WeakMap]', 12825 weakSetTag = '[object WeakSet]'; 12826 12827 var arrayBufferTag = '[object ArrayBuffer]', 12828 dataViewTag = '[object DataView]', 12829 float32Tag = '[object Float32Array]', 12830 float64Tag = '[object Float64Array]', 12831 int8Tag = '[object Int8Array]', 12832 int16Tag = '[object Int16Array]', 12833 int32Tag = '[object Int32Array]', 12834 uint8Tag = '[object Uint8Array]', 12835 uint8ClampedTag = '[object Uint8ClampedArray]', 12836 uint16Tag = '[object Uint16Array]', 12837 uint32Tag = '[object Uint32Array]'; 12838 12839 /** Used to match empty string literals in compiled template source. */ 12840 var reEmptyStringLeading = /\b__p \+= '';/g, 12841 reEmptyStringMiddle = /\b(__p \+=) '' \+/g, 12842 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; 12843 12844 /** Used to match HTML entities and HTML characters. */ 12845 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, 12846 reUnescapedHtml = /[&<>"']/g, 12847 reHasEscapedHtml = RegExp(reEscapedHtml.source), 12848 reHasUnescapedHtml = RegExp(reUnescapedHtml.source); 12849 12850 /** Used to match template delimiters. */ 12851 var reEscape = /<%-([\s\S]+?)%>/g, 12852 reEvaluate = /<%([\s\S]+?)%>/g, 12853 reInterpolate = /<%=([\s\S]+?)%>/g; 12854 12855 /** Used to match property names within property paths. */ 12856 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, 12857 reIsPlainProp = /^\w*$/, 12858 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; 12859 12860 /** 12861 * Used to match `RegExp` 12862 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). 12863 */ 12864 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, 12865 reHasRegExpChar = RegExp(reRegExpChar.source); 12866 12867 /** Used to match leading whitespace. */ 12868 var reTrimStart = /^\s+/; 12869 12870 /** Used to match a single whitespace character. */ 12871 var reWhitespace = /\s/; 12872 12873 /** Used to match wrap detail comments. */ 12874 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, 12875 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, 12876 reSplitDetails = /,? & /; 12877 12878 /** Used to match words composed of alphanumeric characters. */ 12879 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; 12880 12881 /** 12882 * Used to validate the `validate` option in `_.template` variable. 12883 * 12884 * Forbids characters which could potentially change the meaning of the function argument definition: 12885 * - "()," (modification of function parameters) 12886 * - "=" (default value) 12887 * - "[]{}" (destructuring of function parameters) 12888 * - "/" (beginning of a comment) 12889 * - whitespace 12890 */ 12891 var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; 12892 12893 /** Used to match backslashes in property paths. */ 12894 var reEscapeChar = /\\(\\)?/g; 12895 12896 /** 12897 * Used to match 12898 * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). 12899 */ 12900 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; 12901 12902 /** Used to match `RegExp` flags from their coerced string values. */ 12903 var reFlags = /\w*$/; 12904 12905 /** Used to detect bad signed hexadecimal string values. */ 12906 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; 12907 12908 /** Used to detect binary string values. */ 12909 var reIsBinary = /^0b[01]+$/i; 12910 12911 /** Used to detect host constructors (Safari). */ 12912 var reIsHostCtor = /^\[object .+?Constructor\]$/; 12913 12914 /** Used to detect octal string values. */ 12915 var reIsOctal = /^0o[0-7]+$/i; 12916 12917 /** Used to detect unsigned integer values. */ 12918 var reIsUint = /^(?:0|[1-9]\d*)$/; 12919 12920 /** Used to match Latin Unicode letters (excluding mathematical operators). */ 12921 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; 12922 12923 /** Used to ensure capturing order of template delimiters. */ 12924 var reNoMatch = /($^)/; 12925 12926 /** Used to match unescaped characters in compiled string literals. */ 12927 var reUnescapedString = /['\n\r\u2028\u2029\\]/g; 12928 12929 /** Used to compose unicode character classes. */ 12930 var rsAstralRange = '\\ud800-\\udfff', 12931 rsComboMarksRange = '\\u0300-\\u036f', 12932 reComboHalfMarksRange = '\\ufe20-\\ufe2f', 12933 rsComboSymbolsRange = '\\u20d0-\\u20ff', 12934 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, 12935 rsDingbatRange = '\\u2700-\\u27bf', 12936 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', 12937 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', 12938 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', 12939 rsPunctuationRange = '\\u2000-\\u206f', 12940 rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', 12941 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', 12942 rsVarRange = '\\ufe0e\\ufe0f', 12943 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; 12944 12945 /** Used to compose unicode capture groups. */ 12946 var rsApos = "['\u2019]", 12947 rsAstral = '[' + rsAstralRange + ']', 12948 rsBreak = '[' + rsBreakRange + ']', 12949 rsCombo = '[' + rsComboRange + ']', 12950 rsDigits = '\\d+', 12951 rsDingbat = '[' + rsDingbatRange + ']', 12952 rsLower = '[' + rsLowerRange + ']', 12953 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', 12954 rsFitz = '\\ud83c[\\udffb-\\udfff]', 12955 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', 12956 rsNonAstral = '[^' + rsAstralRange + ']', 12957 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', 12958 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', 12959 rsUpper = '[' + rsUpperRange + ']', 12960 rsZWJ = '\\u200d'; 12961 12962 /** Used to compose unicode regexes. */ 12963 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', 12964 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', 12965 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', 12966 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', 12967 reOptMod = rsModifier + '?', 12968 rsOptVar = '[' + rsVarRange + ']?', 12969 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', 12970 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', 12971 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', 12972 rsSeq = rsOptVar + reOptMod + rsOptJoin, 12973 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, 12974 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; 12975 12976 /** Used to match apostrophes. */ 12977 var reApos = RegExp(rsApos, 'g'); 12978 12979 /** 12980 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and 12981 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). 12982 */ 12983 var reComboMark = RegExp(rsCombo, 'g'); 12984 12985 /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ 12986 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); 12987 12988 /** Used to match complex or compound words. */ 12989 var reUnicodeWord = RegExp([ 12990 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', 12991 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', 12992 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, 12993 rsUpper + '+' + rsOptContrUpper, 12994 rsOrdUpper, 12995 rsOrdLower, 12996 rsDigits, 12997 rsEmoji 12998 ].join('|'), 'g'); 12999 13000 /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ 13001 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); 13002 13003 /** Used to detect strings that need a more robust regexp to match words. */ 13004 var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; 13005 13006 /** Used to assign default `context` object properties. */ 13007 var contextProps = [ 13008 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 13009 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 13010 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 13011 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 13012 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' 13013 ]; 13014 13015 /** Used to make template sourceURLs easier to identify. */ 13016 var templateCounter = -1; 13017 13018 /** Used to identify `toStringTag` values of typed arrays. */ 13019 var typedArrayTags = {}; 13020 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = 13021 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = 13022 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = 13023 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = 13024 typedArrayTags[uint32Tag] = true; 13025 typedArrayTags[argsTag] = typedArrayTags[arrayTag] = 13026 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = 13027 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = 13028 typedArrayTags[errorTag] = typedArrayTags[funcTag] = 13029 typedArrayTags[mapTag] = typedArrayTags[numberTag] = 13030 typedArrayTags[objectTag] = typedArrayTags[regexpTag] = 13031 typedArrayTags[setTag] = typedArrayTags[stringTag] = 13032 typedArrayTags[weakMapTag] = false; 13033 13034 /** Used to identify `toStringTag` values supported by `_.clone`. */ 13035 var cloneableTags = {}; 13036 cloneableTags[argsTag] = cloneableTags[arrayTag] = 13037 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = 13038 cloneableTags[boolTag] = cloneableTags[dateTag] = 13039 cloneableTags[float32Tag] = cloneableTags[float64Tag] = 13040 cloneableTags[int8Tag] = cloneableTags[int16Tag] = 13041 cloneableTags[int32Tag] = cloneableTags[mapTag] = 13042 cloneableTags[numberTag] = cloneableTags[objectTag] = 13043 cloneableTags[regexpTag] = cloneableTags[setTag] = 13044 cloneableTags[stringTag] = cloneableTags[symbolTag] = 13045 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = 13046 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; 13047 cloneableTags[errorTag] = cloneableTags[funcTag] = 13048 cloneableTags[weakMapTag] = false; 13049 13050 /** Used to map Latin Unicode letters to basic Latin letters. */ 13051 var deburredLetters = { 13052 // Latin-1 Supplement block. 13053 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', 13054 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', 13055 '\xc7': 'C', '\xe7': 'c', 13056 '\xd0': 'D', '\xf0': 'd', 13057 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', 13058 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', 13059 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', 13060 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', 13061 '\xd1': 'N', '\xf1': 'n', 13062 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', 13063 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', 13064 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', 13065 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', 13066 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', 13067 '\xc6': 'Ae', '\xe6': 'ae', 13068 '\xde': 'Th', '\xfe': 'th', 13069 '\xdf': 'ss', 13070 // Latin Extended-A block. 13071 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', 13072 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', 13073 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', 13074 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', 13075 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', 13076 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', 13077 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', 13078 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', 13079 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', 13080 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', 13081 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', 13082 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', 13083 '\u0134': 'J', '\u0135': 'j', 13084 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', 13085 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', 13086 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', 13087 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', 13088 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', 13089 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', 13090 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', 13091 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', 13092 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', 13093 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', 13094 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', 13095 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', 13096 '\u0163': 't', '\u0165': 't', '\u0167': 't', 13097 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', 13098 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', 13099 '\u0174': 'W', '\u0175': 'w', 13100 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', 13101 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', 13102 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', 13103 '\u0132': 'IJ', '\u0133': 'ij', 13104 '\u0152': 'Oe', '\u0153': 'oe', 13105 '\u0149': "'n", '\u017f': 's' 13106 }; 13107 13108 /** Used to map characters to HTML entities. */ 13109 var htmlEscapes = { 13110 '&': '&', 13111 '<': '<', 13112 '>': '>', 13113 '"': '"', 13114 "'": ''' 13115 }; 13116 13117 /** Used to map HTML entities to characters. */ 13118 var htmlUnescapes = { 13119 '&': '&', 13120 '<': '<', 13121 '>': '>', 13122 '"': '"', 13123 ''': "'" 13124 }; 13125 13126 /** Used to escape characters for inclusion in compiled string literals. */ 13127 var stringEscapes = { 13128 '\\': '\\', 13129 "'": "'", 13130 '\n': 'n', 13131 '\r': 'r', 13132 '\u2028': 'u2028', 13133 '\u2029': 'u2029' 13134 }; 13135 13136 /** Built-in method references without a dependency on `root`. */ 13137 var freeParseFloat = parseFloat, 13138 freeParseInt = parseInt; 13139 13140 /** Detect free variable `global` from Node.js. */ 13141 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; 13142 13143 /** Detect free variable `self`. */ 13144 var freeSelf = typeof self == 'object' && self && self.Object === Object && self; 13145 13146 /** Used as a reference to the global object. */ 13147 var root = freeGlobal || freeSelf || Function('return this')(); 13148 13149 /** Detect free variable `exports`. */ 13150 var freeExports = true && exports && !exports.nodeType && exports; 13151 13152 /** Detect free variable `module`. */ 13153 var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; 13154 13155 /** Detect the popular CommonJS extension `module.exports`. */ 13156 var moduleExports = freeModule && freeModule.exports === freeExports; 13157 13158 /** Detect free variable `process` from Node.js. */ 13159 var freeProcess = moduleExports && freeGlobal.process; 13160 13161 /** Used to access faster Node.js helpers. */ 13162 var nodeUtil = (function() { 13163 try { 13164 // Use `util.types` for Node.js 10+. 13165 var types = freeModule && freeModule.require && freeModule.require('util').types; 13166 13167 if (types) { 13168 return types; 13169 } 13170 13171 // Legacy `process.binding('util')` for Node.js < 10. 13172 return freeProcess && freeProcess.binding && freeProcess.binding('util'); 13173 } catch (e) {} 13174 }()); 13175 13176 /* Node.js helper references. */ 13177 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, 13178 nodeIsDate = nodeUtil && nodeUtil.isDate, 13179 nodeIsMap = nodeUtil && nodeUtil.isMap, 13180 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, 13181 nodeIsSet = nodeUtil && nodeUtil.isSet, 13182 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; 13183 13184 /*--------------------------------------------------------------------------*/ 13185 13186 /** 13187 * A faster alternative to `Function#apply`, this function invokes `func` 13188 * with the `this` binding of `thisArg` and the arguments of `args`. 13189 * 13190 * @private 13191 * @param {Function} func The function to invoke. 13192 * @param {*} thisArg The `this` binding of `func`. 13193 * @param {Array} args The arguments to invoke `func` with. 13194 * @returns {*} Returns the result of `func`. 13195 */ 13196 function apply(func, thisArg, args) { 13197 switch (args.length) { 13198 case 0: return func.call(thisArg); 13199 case 1: return func.call(thisArg, args[0]); 13200 case 2: return func.call(thisArg, args[0], args[1]); 13201 case 3: return func.call(thisArg, args[0], args[1], args[2]); 13202 } 13203 return func.apply(thisArg, args); 13204 } 13205 13206 /** 13207 * A specialized version of `baseAggregator` for arrays. 13208 * 13209 * @private 13210 * @param {Array} [array] The array to iterate over. 13211 * @param {Function} setter The function to set `accumulator` values. 13212 * @param {Function} iteratee The iteratee to transform keys. 13213 * @param {Object} accumulator The initial aggregated object. 13214 * @returns {Function} Returns `accumulator`. 13215 */ 13216 function arrayAggregator(array, setter, iteratee, accumulator) { 13217 var index = -1, 13218 length = array == null ? 0 : array.length; 13219 13220 while (++index < length) { 13221 var value = array[index]; 13222 setter(accumulator, value, iteratee(value), array); 13223 } 13224 return accumulator; 13225 } 13226 13227 /** 13228 * A specialized version of `_.forEach` for arrays without support for 13229 * iteratee shorthands. 13230 * 13231 * @private 13232 * @param {Array} [array] The array to iterate over. 13233 * @param {Function} iteratee The function invoked per iteration. 13234 * @returns {Array} Returns `array`. 13235 */ 13236 function arrayEach(array, iteratee) { 13237 var index = -1, 13238 length = array == null ? 0 : array.length; 13239 13240 while (++index < length) { 13241 if (iteratee(array[index], index, array) === false) { 13242 break; 13243 } 13244 } 13245 return array; 13246 } 13247 13248 /** 13249 * A specialized version of `_.forEachRight` for arrays without support for 13250 * iteratee shorthands. 13251 * 13252 * @private 13253 * @param {Array} [array] The array to iterate over. 13254 * @param {Function} iteratee The function invoked per iteration. 13255 * @returns {Array} Returns `array`. 13256 */ 13257 function arrayEachRight(array, iteratee) { 13258 var length = array == null ? 0 : array.length; 13259 13260 while (length--) { 13261 if (iteratee(array[length], length, array) === false) { 13262 break; 13263 } 13264 } 13265 return array; 13266 } 13267 13268 /** 13269 * A specialized version of `_.every` for arrays without support for 13270 * iteratee shorthands. 13271 * 13272 * @private 13273 * @param {Array} [array] The array to iterate over. 13274 * @param {Function} predicate The function invoked per iteration. 13275 * @returns {boolean} Returns `true` if all elements pass the predicate check, 13276 * else `false`. 13277 */ 13278 function arrayEvery(array, predicate) { 13279 var index = -1, 13280 length = array == null ? 0 : array.length; 13281 13282 while (++index < length) { 13283 if (!predicate(array[index], index, array)) { 13284 return false; 13285 } 13286 } 13287 return true; 13288 } 13289 13290 /** 13291 * A specialized version of `_.filter` for arrays without support for 13292 * iteratee shorthands. 13293 * 13294 * @private 13295 * @param {Array} [array] The array to iterate over. 13296 * @param {Function} predicate The function invoked per iteration. 13297 * @returns {Array} Returns the new filtered array. 13298 */ 13299 function arrayFilter(array, predicate) { 13300 var index = -1, 13301 length = array == null ? 0 : array.length, 13302 resIndex = 0, 13303 result = []; 13304 13305 while (++index < length) { 13306 var value = array[index]; 13307 if (predicate(value, index, array)) { 13308 result[resIndex++] = value; 13309 } 13310 } 13311 return result; 13312 } 13313 13314 /** 13315 * A specialized version of `_.includes` for arrays without support for 13316 * specifying an index to search from. 13317 * 13318 * @private 13319 * @param {Array} [array] The array to inspect. 13320 * @param {*} target The value to search for. 13321 * @returns {boolean} Returns `true` if `target` is found, else `false`. 13322 */ 13323 function arrayIncludes(array, value) { 13324 var length = array == null ? 0 : array.length; 13325 return !!length && baseIndexOf(array, value, 0) > -1; 13326 } 13327 13328 /** 13329 * This function is like `arrayIncludes` except that it accepts a comparator. 13330 * 13331 * @private 13332 * @param {Array} [array] The array to inspect. 13333 * @param {*} target The value to search for. 13334 * @param {Function} comparator The comparator invoked per element. 13335 * @returns {boolean} Returns `true` if `target` is found, else `false`. 13336 */ 13337 function arrayIncludesWith(array, value, comparator) { 13338 var index = -1, 13339 length = array == null ? 0 : array.length; 13340 13341 while (++index < length) { 13342 if (comparator(value, array[index])) { 13343 return true; 13344 } 13345 } 13346 return false; 13347 } 13348 13349 /** 13350 * A specialized version of `_.map` for arrays without support for iteratee 13351 * shorthands. 13352 * 13353 * @private 13354 * @param {Array} [array] The array to iterate over. 13355 * @param {Function} iteratee The function invoked per iteration. 13356 * @returns {Array} Returns the new mapped array. 13357 */ 13358 function arrayMap(array, iteratee) { 13359 var index = -1, 13360 length = array == null ? 0 : array.length, 13361 result = Array(length); 13362 13363 while (++index < length) { 13364 result[index] = iteratee(array[index], index, array); 13365 } 13366 return result; 13367 } 13368 13369 /** 13370 * Appends the elements of `values` to `array`. 13371 * 13372 * @private 13373 * @param {Array} array The array to modify. 13374 * @param {Array} values The values to append. 13375 * @returns {Array} Returns `array`. 13376 */ 13377 function arrayPush(array, values) { 13378 var index = -1, 13379 length = values.length, 13380 offset = array.length; 13381 13382 while (++index < length) { 13383 array[offset + index] = values[index]; 13384 } 13385 return array; 13386 } 13387 13388 /** 13389 * A specialized version of `_.reduce` for arrays without support for 13390 * iteratee shorthands. 13391 * 13392 * @private 13393 * @param {Array} [array] The array to iterate over. 13394 * @param {Function} iteratee The function invoked per iteration. 13395 * @param {*} [accumulator] The initial value. 13396 * @param {boolean} [initAccum] Specify using the first element of `array` as 13397 * the initial value. 13398 * @returns {*} Returns the accumulated value. 13399 */ 13400 function arrayReduce(array, iteratee, accumulator, initAccum) { 13401 var index = -1, 13402 length = array == null ? 0 : array.length; 13403 13404 if (initAccum && length) { 13405 accumulator = array[++index]; 13406 } 13407 while (++index < length) { 13408 accumulator = iteratee(accumulator, array[index], index, array); 13409 } 13410 return accumulator; 13411 } 13412 13413 /** 13414 * A specialized version of `_.reduceRight` for arrays without support for 13415 * iteratee shorthands. 13416 * 13417 * @private 13418 * @param {Array} [array] The array to iterate over. 13419 * @param {Function} iteratee The function invoked per iteration. 13420 * @param {*} [accumulator] The initial value. 13421 * @param {boolean} [initAccum] Specify using the last element of `array` as 13422 * the initial value. 13423 * @returns {*} Returns the accumulated value. 13424 */ 13425 function arrayReduceRight(array, iteratee, accumulator, initAccum) { 13426 var length = array == null ? 0 : array.length; 13427 if (initAccum && length) { 13428 accumulator = array[--length]; 13429 } 13430 while (length--) { 13431 accumulator = iteratee(accumulator, array[length], length, array); 13432 } 13433 return accumulator; 13434 } 13435 13436 /** 13437 * A specialized version of `_.some` for arrays without support for iteratee 13438 * shorthands. 13439 * 13440 * @private 13441 * @param {Array} [array] The array to iterate over. 13442 * @param {Function} predicate The function invoked per iteration. 13443 * @returns {boolean} Returns `true` if any element passes the predicate check, 13444 * else `false`. 13445 */ 13446 function arraySome(array, predicate) { 13447 var index = -1, 13448 length = array == null ? 0 : array.length; 13449 13450 while (++index < length) { 13451 if (predicate(array[index], index, array)) { 13452 return true; 13453 } 13454 } 13455 return false; 13456 } 13457 13458 /** 13459 * Gets the size of an ASCII `string`. 13460 * 13461 * @private 13462 * @param {string} string The string inspect. 13463 * @returns {number} Returns the string size. 13464 */ 13465 var asciiSize = baseProperty('length'); 13466 13467 /** 13468 * Converts an ASCII `string` to an array. 13469 * 13470 * @private 13471 * @param {string} string The string to convert. 13472 * @returns {Array} Returns the converted array. 13473 */ 13474 function asciiToArray(string) { 13475 return string.split(''); 13476 } 13477 13478 /** 13479 * Splits an ASCII `string` into an array of its words. 13480 * 13481 * @private 13482 * @param {string} The string to inspect. 13483 * @returns {Array} Returns the words of `string`. 13484 */ 13485 function asciiWords(string) { 13486 return string.match(reAsciiWord) || []; 13487 } 13488 13489 /** 13490 * The base implementation of methods like `_.findKey` and `_.findLastKey`, 13491 * without support for iteratee shorthands, which iterates over `collection` 13492 * using `eachFunc`. 13493 * 13494 * @private 13495 * @param {Array|Object} collection The collection to inspect. 13496 * @param {Function} predicate The function invoked per iteration. 13497 * @param {Function} eachFunc The function to iterate over `collection`. 13498 * @returns {*} Returns the found element or its key, else `undefined`. 13499 */ 13500 function baseFindKey(collection, predicate, eachFunc) { 13501 var result; 13502 eachFunc(collection, function(value, key, collection) { 13503 if (predicate(value, key, collection)) { 13504 result = key; 13505 return false; 13506 } 13507 }); 13508 return result; 13509 } 13510 13511 /** 13512 * The base implementation of `_.findIndex` and `_.findLastIndex` without 13513 * support for iteratee shorthands. 13514 * 13515 * @private 13516 * @param {Array} array The array to inspect. 13517 * @param {Function} predicate The function invoked per iteration. 13518 * @param {number} fromIndex The index to search from. 13519 * @param {boolean} [fromRight] Specify iterating from right to left. 13520 * @returns {number} Returns the index of the matched value, else `-1`. 13521 */ 13522 function baseFindIndex(array, predicate, fromIndex, fromRight) { 13523 var length = array.length, 13524 index = fromIndex + (fromRight ? 1 : -1); 13525 13526 while ((fromRight ? index-- : ++index < length)) { 13527 if (predicate(array[index], index, array)) { 13528 return index; 13529 } 13530 } 13531 return -1; 13532 } 13533 13534 /** 13535 * The base implementation of `_.indexOf` without `fromIndex` bounds checks. 13536 * 13537 * @private 13538 * @param {Array} array The array to inspect. 13539 * @param {*} value The value to search for. 13540 * @param {number} fromIndex The index to search from. 13541 * @returns {number} Returns the index of the matched value, else `-1`. 13542 */ 13543 function baseIndexOf(array, value, fromIndex) { 13544 return value === value 13545 ? strictIndexOf(array, value, fromIndex) 13546 : baseFindIndex(array, baseIsNaN, fromIndex); 13547 } 13548 13549 /** 13550 * This function is like `baseIndexOf` except that it accepts a comparator. 13551 * 13552 * @private 13553 * @param {Array} array The array to inspect. 13554 * @param {*} value The value to search for. 13555 * @param {number} fromIndex The index to search from. 13556 * @param {Function} comparator The comparator invoked per element. 13557 * @returns {number} Returns the index of the matched value, else `-1`. 13558 */ 13559 function baseIndexOfWith(array, value, fromIndex, comparator) { 13560 var index = fromIndex - 1, 13561 length = array.length; 13562 13563 while (++index < length) { 13564 if (comparator(array[index], value)) { 13565 return index; 13566 } 13567 } 13568 return -1; 13569 } 13570 13571 /** 13572 * The base implementation of `_.isNaN` without support for number objects. 13573 * 13574 * @private 13575 * @param {*} value The value to check. 13576 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. 13577 */ 13578 function baseIsNaN(value) { 13579 return value !== value; 13580 } 13581 13582 /** 13583 * The base implementation of `_.mean` and `_.meanBy` without support for 13584 * iteratee shorthands. 13585 * 13586 * @private 13587 * @param {Array} array The array to iterate over. 13588 * @param {Function} iteratee The function invoked per iteration. 13589 * @returns {number} Returns the mean. 13590 */ 13591 function baseMean(array, iteratee) { 13592 var length = array == null ? 0 : array.length; 13593 return length ? (baseSum(array, iteratee) / length) : NAN; 13594 } 13595 13596 /** 13597 * The base implementation of `_.property` without support for deep paths. 13598 * 13599 * @private 13600 * @param {string} key The key of the property to get. 13601 * @returns {Function} Returns the new accessor function. 13602 */ 13603 function baseProperty(key) { 13604 return function(object) { 13605 return object == null ? undefined : object[key]; 13606 }; 13607 } 13608 13609 /** 13610 * The base implementation of `_.propertyOf` without support for deep paths. 13611 * 13612 * @private 13613 * @param {Object} object The object to query. 13614 * @returns {Function} Returns the new accessor function. 13615 */ 13616 function basePropertyOf(object) { 13617 return function(key) { 13618 return object == null ? undefined : object[key]; 13619 }; 13620 } 13621 13622 /** 13623 * The base implementation of `_.reduce` and `_.reduceRight`, without support 13624 * for iteratee shorthands, which iterates over `collection` using `eachFunc`. 13625 * 13626 * @private 13627 * @param {Array|Object} collection The collection to iterate over. 13628 * @param {Function} iteratee The function invoked per iteration. 13629 * @param {*} accumulator The initial value. 13630 * @param {boolean} initAccum Specify using the first or last element of 13631 * `collection` as the initial value. 13632 * @param {Function} eachFunc The function to iterate over `collection`. 13633 * @returns {*} Returns the accumulated value. 13634 */ 13635 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { 13636 eachFunc(collection, function(value, index, collection) { 13637 accumulator = initAccum 13638 ? (initAccum = false, value) 13639 : iteratee(accumulator, value, index, collection); 13640 }); 13641 return accumulator; 13642 } 13643 13644 /** 13645 * The base implementation of `_.sortBy` which uses `comparer` to define the 13646 * sort order of `array` and replaces criteria objects with their corresponding 13647 * values. 13648 * 13649 * @private 13650 * @param {Array} array The array to sort. 13651 * @param {Function} comparer The function to define sort order. 13652 * @returns {Array} Returns `array`. 13653 */ 13654 function baseSortBy(array, comparer) { 13655 var length = array.length; 13656 13657 array.sort(comparer); 13658 while (length--) { 13659 array[length] = array[length].value; 13660 } 13661 return array; 13662 } 13663 13664 /** 13665 * The base implementation of `_.sum` and `_.sumBy` without support for 13666 * iteratee shorthands. 13667 * 13668 * @private 13669 * @param {Array} array The array to iterate over. 13670 * @param {Function} iteratee The function invoked per iteration. 13671 * @returns {number} Returns the sum. 13672 */ 13673 function baseSum(array, iteratee) { 13674 var result, 13675 index = -1, 13676 length = array.length; 13677 13678 while (++index < length) { 13679 var current = iteratee(array[index]); 13680 if (current !== undefined) { 13681 result = result === undefined ? current : (result + current); 13682 } 13683 } 13684 return result; 13685 } 13686 13687 /** 13688 * The base implementation of `_.times` without support for iteratee shorthands 13689 * or max array length checks. 13690 * 13691 * @private 13692 * @param {number} n The number of times to invoke `iteratee`. 13693 * @param {Function} iteratee The function invoked per iteration. 13694 * @returns {Array} Returns the array of results. 13695 */ 13696 function baseTimes(n, iteratee) { 13697 var index = -1, 13698 result = Array(n); 13699 13700 while (++index < n) { 13701 result[index] = iteratee(index); 13702 } 13703 return result; 13704 } 13705 13706 /** 13707 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array 13708 * of key-value pairs for `object` corresponding to the property names of `props`. 13709 * 13710 * @private 13711 * @param {Object} object The object to query. 13712 * @param {Array} props The property names to get values for. 13713 * @returns {Object} Returns the key-value pairs. 13714 */ 13715 function baseToPairs(object, props) { 13716 return arrayMap(props, function(key) { 13717 return [key, object[key]]; 13718 }); 13719 } 13720 13721 /** 13722 * The base implementation of `_.trim`. 13723 * 13724 * @private 13725 * @param {string} string The string to trim. 13726 * @returns {string} Returns the trimmed string. 13727 */ 13728 function baseTrim(string) { 13729 return string 13730 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') 13731 : string; 13732 } 13733 13734 /** 13735 * The base implementation of `_.unary` without support for storing metadata. 13736 * 13737 * @private 13738 * @param {Function} func The function to cap arguments for. 13739 * @returns {Function} Returns the new capped function. 13740 */ 13741 function baseUnary(func) { 13742 return function(value) { 13743 return func(value); 13744 }; 13745 } 13746 13747 /** 13748 * The base implementation of `_.values` and `_.valuesIn` which creates an 13749 * array of `object` property values corresponding to the property names 13750 * of `props`. 13751 * 13752 * @private 13753 * @param {Object} object The object to query. 13754 * @param {Array} props The property names to get values for. 13755 * @returns {Object} Returns the array of property values. 13756 */ 13757 function baseValues(object, props) { 13758 return arrayMap(props, function(key) { 13759 return object[key]; 13760 }); 13761 } 13762 13763 /** 13764 * Checks if a `cache` value for `key` exists. 13765 * 13766 * @private 13767 * @param {Object} cache The cache to query. 13768 * @param {string} key The key of the entry to check. 13769 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 13770 */ 13771 function cacheHas(cache, key) { 13772 return cache.has(key); 13773 } 13774 13775 /** 13776 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol 13777 * that is not found in the character symbols. 13778 * 13779 * @private 13780 * @param {Array} strSymbols The string symbols to inspect. 13781 * @param {Array} chrSymbols The character symbols to find. 13782 * @returns {number} Returns the index of the first unmatched string symbol. 13783 */ 13784 function charsStartIndex(strSymbols, chrSymbols) { 13785 var index = -1, 13786 length = strSymbols.length; 13787 13788 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} 13789 return index; 13790 } 13791 13792 /** 13793 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol 13794 * that is not found in the character symbols. 13795 * 13796 * @private 13797 * @param {Array} strSymbols The string symbols to inspect. 13798 * @param {Array} chrSymbols The character symbols to find. 13799 * @returns {number} Returns the index of the last unmatched string symbol. 13800 */ 13801 function charsEndIndex(strSymbols, chrSymbols) { 13802 var index = strSymbols.length; 13803 13804 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} 13805 return index; 13806 } 13807 13808 /** 13809 * Gets the number of `placeholder` occurrences in `array`. 13810 * 13811 * @private 13812 * @param {Array} array The array to inspect. 13813 * @param {*} placeholder The placeholder to search for. 13814 * @returns {number} Returns the placeholder count. 13815 */ 13816 function countHolders(array, placeholder) { 13817 var length = array.length, 13818 result = 0; 13819 13820 while (length--) { 13821 if (array[length] === placeholder) { 13822 ++result; 13823 } 13824 } 13825 return result; 13826 } 13827 13828 /** 13829 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A 13830 * letters to basic Latin letters. 13831 * 13832 * @private 13833 * @param {string} letter The matched letter to deburr. 13834 * @returns {string} Returns the deburred letter. 13835 */ 13836 var deburrLetter = basePropertyOf(deburredLetters); 13837 13838 /** 13839 * Used by `_.escape` to convert characters to HTML entities. 13840 * 13841 * @private 13842 * @param {string} chr The matched character to escape. 13843 * @returns {string} Returns the escaped character. 13844 */ 13845 var escapeHtmlChar = basePropertyOf(htmlEscapes); 13846 13847 /** 13848 * Used by `_.template` to escape characters for inclusion in compiled string literals. 13849 * 13850 * @private 13851 * @param {string} chr The matched character to escape. 13852 * @returns {string} Returns the escaped character. 13853 */ 13854 function escapeStringChar(chr) { 13855 return '\\' + stringEscapes[chr]; 13856 } 13857 13858 /** 13859 * Gets the value at `key` of `object`. 13860 * 13861 * @private 13862 * @param {Object} [object] The object to query. 13863 * @param {string} key The key of the property to get. 13864 * @returns {*} Returns the property value. 13865 */ 13866 function getValue(object, key) { 13867 return object == null ? undefined : object[key]; 13868 } 13869 13870 /** 13871 * Checks if `string` contains Unicode symbols. 13872 * 13873 * @private 13874 * @param {string} string The string to inspect. 13875 * @returns {boolean} Returns `true` if a symbol is found, else `false`. 13876 */ 13877 function hasUnicode(string) { 13878 return reHasUnicode.test(string); 13879 } 13880 13881 /** 13882 * Checks if `string` contains a word composed of Unicode symbols. 13883 * 13884 * @private 13885 * @param {string} string The string to inspect. 13886 * @returns {boolean} Returns `true` if a word is found, else `false`. 13887 */ 13888 function hasUnicodeWord(string) { 13889 return reHasUnicodeWord.test(string); 13890 } 13891 13892 /** 13893 * Converts `iterator` to an array. 13894 * 13895 * @private 13896 * @param {Object} iterator The iterator to convert. 13897 * @returns {Array} Returns the converted array. 13898 */ 13899 function iteratorToArray(iterator) { 13900 var data, 13901 result = []; 13902 13903 while (!(data = iterator.next()).done) { 13904 result.push(data.value); 13905 } 13906 return result; 13907 } 13908 13909 /** 13910 * Converts `map` to its key-value pairs. 13911 * 13912 * @private 13913 * @param {Object} map The map to convert. 13914 * @returns {Array} Returns the key-value pairs. 13915 */ 13916 function mapToArray(map) { 13917 var index = -1, 13918 result = Array(map.size); 13919 13920 map.forEach(function(value, key) { 13921 result[++index] = [key, value]; 13922 }); 13923 return result; 13924 } 13925 13926 /** 13927 * Creates a unary function that invokes `func` with its argument transformed. 13928 * 13929 * @private 13930 * @param {Function} func The function to wrap. 13931 * @param {Function} transform The argument transform. 13932 * @returns {Function} Returns the new function. 13933 */ 13934 function overArg(func, transform) { 13935 return function(arg) { 13936 return func(transform(arg)); 13937 }; 13938 } 13939 13940 /** 13941 * Replaces all `placeholder` elements in `array` with an internal placeholder 13942 * and returns an array of their indexes. 13943 * 13944 * @private 13945 * @param {Array} array The array to modify. 13946 * @param {*} placeholder The placeholder to replace. 13947 * @returns {Array} Returns the new array of placeholder indexes. 13948 */ 13949 function replaceHolders(array, placeholder) { 13950 var index = -1, 13951 length = array.length, 13952 resIndex = 0, 13953 result = []; 13954 13955 while (++index < length) { 13956 var value = array[index]; 13957 if (value === placeholder || value === PLACEHOLDER) { 13958 array[index] = PLACEHOLDER; 13959 result[resIndex++] = index; 13960 } 13961 } 13962 return result; 13963 } 13964 13965 /** 13966 * Converts `set` to an array of its values. 13967 * 13968 * @private 13969 * @param {Object} set The set to convert. 13970 * @returns {Array} Returns the values. 13971 */ 13972 function setToArray(set) { 13973 var index = -1, 13974 result = Array(set.size); 13975 13976 set.forEach(function(value) { 13977 result[++index] = value; 13978 }); 13979 return result; 13980 } 13981 13982 /** 13983 * Converts `set` to its value-value pairs. 13984 * 13985 * @private 13986 * @param {Object} set The set to convert. 13987 * @returns {Array} Returns the value-value pairs. 13988 */ 13989 function setToPairs(set) { 13990 var index = -1, 13991 result = Array(set.size); 13992 13993 set.forEach(function(value) { 13994 result[++index] = [value, value]; 13995 }); 13996 return result; 13997 } 13998 13999 /** 14000 * A specialized version of `_.indexOf` which performs strict equality 14001 * comparisons of values, i.e. `===`. 14002 * 14003 * @private 14004 * @param {Array} array The array to inspect. 14005 * @param {*} value The value to search for. 14006 * @param {number} fromIndex The index to search from. 14007 * @returns {number} Returns the index of the matched value, else `-1`. 14008 */ 14009 function strictIndexOf(array, value, fromIndex) { 14010 var index = fromIndex - 1, 14011 length = array.length; 14012 14013 while (++index < length) { 14014 if (array[index] === value) { 14015 return index; 14016 } 14017 } 14018 return -1; 14019 } 14020 14021 /** 14022 * A specialized version of `_.lastIndexOf` which performs strict equality 14023 * comparisons of values, i.e. `===`. 14024 * 14025 * @private 14026 * @param {Array} array The array to inspect. 14027 * @param {*} value The value to search for. 14028 * @param {number} fromIndex The index to search from. 14029 * @returns {number} Returns the index of the matched value, else `-1`. 14030 */ 14031 function strictLastIndexOf(array, value, fromIndex) { 14032 var index = fromIndex + 1; 14033 while (index--) { 14034 if (array[index] === value) { 14035 return index; 14036 } 14037 } 14038 return index; 14039 } 14040 14041 /** 14042 * Gets the number of symbols in `string`. 14043 * 14044 * @private 14045 * @param {string} string The string to inspect. 14046 * @returns {number} Returns the string size. 14047 */ 14048 function stringSize(string) { 14049 return hasUnicode(string) 14050 ? unicodeSize(string) 14051 : asciiSize(string); 14052 } 14053 14054 /** 14055 * Converts `string` to an array. 14056 * 14057 * @private 14058 * @param {string} string The string to convert. 14059 * @returns {Array} Returns the converted array. 14060 */ 14061 function stringToArray(string) { 14062 return hasUnicode(string) 14063 ? unicodeToArray(string) 14064 : asciiToArray(string); 14065 } 14066 14067 /** 14068 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace 14069 * character of `string`. 14070 * 14071 * @private 14072 * @param {string} string The string to inspect. 14073 * @returns {number} Returns the index of the last non-whitespace character. 14074 */ 14075 function trimmedEndIndex(string) { 14076 var index = string.length; 14077 14078 while (index-- && reWhitespace.test(string.charAt(index))) {} 14079 return index; 14080 } 14081 14082 /** 14083 * Used by `_.unescape` to convert HTML entities to characters. 14084 * 14085 * @private 14086 * @param {string} chr The matched character to unescape. 14087 * @returns {string} Returns the unescaped character. 14088 */ 14089 var unescapeHtmlChar = basePropertyOf(htmlUnescapes); 14090 14091 /** 14092 * Gets the size of a Unicode `string`. 14093 * 14094 * @private 14095 * @param {string} string The string inspect. 14096 * @returns {number} Returns the string size. 14097 */ 14098 function unicodeSize(string) { 14099 var result = reUnicode.lastIndex = 0; 14100 while (reUnicode.test(string)) { 14101 ++result; 14102 } 14103 return result; 14104 } 14105 14106 /** 14107 * Converts a Unicode `string` to an array. 14108 * 14109 * @private 14110 * @param {string} string The string to convert. 14111 * @returns {Array} Returns the converted array. 14112 */ 14113 function unicodeToArray(string) { 14114 return string.match(reUnicode) || []; 14115 } 14116 14117 /** 14118 * Splits a Unicode `string` into an array of its words. 14119 * 14120 * @private 14121 * @param {string} The string to inspect. 14122 * @returns {Array} Returns the words of `string`. 14123 */ 14124 function unicodeWords(string) { 14125 return string.match(reUnicodeWord) || []; 14126 } 14127 14128 /*--------------------------------------------------------------------------*/ 14129 14130 /** 14131 * Create a new pristine `lodash` function using the `context` object. 14132 * 14133 * @static 14134 * @memberOf _ 14135 * @since 1.1.0 14136 * @category Util 14137 * @param {Object} [context=root] The context object. 14138 * @returns {Function} Returns a new `lodash` function. 14139 * @example 14140 * 14141 * _.mixin({ 'foo': _.constant('foo') }); 14142 * 14143 * var lodash = _.runInContext(); 14144 * lodash.mixin({ 'bar': lodash.constant('bar') }); 14145 * 14146 * _.isFunction(_.foo); 14147 * // => true 14148 * _.isFunction(_.bar); 14149 * // => false 14150 * 14151 * lodash.isFunction(lodash.foo); 14152 * // => false 14153 * lodash.isFunction(lodash.bar); 14154 * // => true 14155 * 14156 * // Create a suped-up `defer` in Node.js. 14157 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; 14158 */ 14159 var runInContext = (function runInContext(context) { 14160 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); 14161 14162 /** Built-in constructor references. */ 14163 var Array = context.Array, 14164 Date = context.Date, 14165 Error = context.Error, 14166 Function = context.Function, 14167 Math = context.Math, 14168 Object = context.Object, 14169 RegExp = context.RegExp, 14170 String = context.String, 14171 TypeError = context.TypeError; 14172 14173 /** Used for built-in method references. */ 14174 var arrayProto = Array.prototype, 14175 funcProto = Function.prototype, 14176 objectProto = Object.prototype; 14177 14178 /** Used to detect overreaching core-js shims. */ 14179 var coreJsData = context['__core-js_shared__']; 14180 14181 /** Used to resolve the decompiled source of functions. */ 14182 var funcToString = funcProto.toString; 14183 14184 /** Used to check objects for own properties. */ 14185 var hasOwnProperty = objectProto.hasOwnProperty; 14186 14187 /** Used to generate unique IDs. */ 14188 var idCounter = 0; 14189 14190 /** Used to detect methods masquerading as native. */ 14191 var maskSrcKey = (function() { 14192 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); 14193 return uid ? ('Symbol(src)_1.' + uid) : ''; 14194 }()); 14195 14196 /** 14197 * Used to resolve the 14198 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) 14199 * of values. 14200 */ 14201 var nativeObjectToString = objectProto.toString; 14202 14203 /** Used to infer the `Object` constructor. */ 14204 var objectCtorString = funcToString.call(Object); 14205 14206 /** Used to restore the original `_` reference in `_.noConflict`. */ 14207 var oldDash = root._; 14208 14209 /** Used to detect if a method is native. */ 14210 var reIsNative = RegExp('^' + 14211 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') 14212 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' 14213 ); 14214 14215 /** Built-in value references. */ 14216 var Buffer = moduleExports ? context.Buffer : undefined, 14217 Symbol = context.Symbol, 14218 Uint8Array = context.Uint8Array, 14219 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, 14220 getPrototype = overArg(Object.getPrototypeOf, Object), 14221 objectCreate = Object.create, 14222 propertyIsEnumerable = objectProto.propertyIsEnumerable, 14223 splice = arrayProto.splice, 14224 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, 14225 symIterator = Symbol ? Symbol.iterator : undefined, 14226 symToStringTag = Symbol ? Symbol.toStringTag : undefined; 14227 14228 var defineProperty = (function() { 14229 try { 14230 var func = getNative(Object, 'defineProperty'); 14231 func({}, '', {}); 14232 return func; 14233 } catch (e) {} 14234 }()); 14235 14236 /** Mocked built-ins. */ 14237 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, 14238 ctxNow = Date && Date.now !== root.Date.now && Date.now, 14239 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; 14240 14241 /* Built-in method references for those with the same name as other `lodash` methods. */ 14242 var nativeCeil = Math.ceil, 14243 nativeFloor = Math.floor, 14244 nativeGetSymbols = Object.getOwnPropertySymbols, 14245 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, 14246 nativeIsFinite = context.isFinite, 14247 nativeJoin = arrayProto.join, 14248 nativeKeys = overArg(Object.keys, Object), 14249 nativeMax = Math.max, 14250 nativeMin = Math.min, 14251 nativeNow = Date.now, 14252 nativeParseInt = context.parseInt, 14253 nativeRandom = Math.random, 14254 nativeReverse = arrayProto.reverse; 14255 14256 /* Built-in method references that are verified to be native. */ 14257 var DataView = getNative(context, 'DataView'), 14258 Map = getNative(context, 'Map'), 14259 Promise = getNative(context, 'Promise'), 14260 Set = getNative(context, 'Set'), 14261 WeakMap = getNative(context, 'WeakMap'), 14262 nativeCreate = getNative(Object, 'create'); 14263 14264 /** Used to store function metadata. */ 14265 var metaMap = WeakMap && new WeakMap; 14266 14267 /** Used to lookup unminified function names. */ 14268 var realNames = {}; 14269 14270 /** Used to detect maps, sets, and weakmaps. */ 14271 var dataViewCtorString = toSource(DataView), 14272 mapCtorString = toSource(Map), 14273 promiseCtorString = toSource(Promise), 14274 setCtorString = toSource(Set), 14275 weakMapCtorString = toSource(WeakMap); 14276 14277 /** Used to convert symbols to primitives and strings. */ 14278 var symbolProto = Symbol ? Symbol.prototype : undefined, 14279 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, 14280 symbolToString = symbolProto ? symbolProto.toString : undefined; 14281 14282 /*------------------------------------------------------------------------*/ 14283 14284 /** 14285 * Creates a `lodash` object which wraps `value` to enable implicit method 14286 * chain sequences. Methods that operate on and return arrays, collections, 14287 * and functions can be chained together. Methods that retrieve a single value 14288 * or may return a primitive value will automatically end the chain sequence 14289 * and return the unwrapped value. Otherwise, the value must be unwrapped 14290 * with `_#value`. 14291 * 14292 * Explicit chain sequences, which must be unwrapped with `_#value`, may be 14293 * enabled using `_.chain`. 14294 * 14295 * The execution of chained methods is lazy, that is, it's deferred until 14296 * `_#value` is implicitly or explicitly called. 14297 * 14298 * Lazy evaluation allows several methods to support shortcut fusion. 14299 * Shortcut fusion is an optimization to merge iteratee calls; this avoids 14300 * the creation of intermediate arrays and can greatly reduce the number of 14301 * iteratee executions. Sections of a chain sequence qualify for shortcut 14302 * fusion if the section is applied to an array and iteratees accept only 14303 * one argument. The heuristic for whether a section qualifies for shortcut 14304 * fusion is subject to change. 14305 * 14306 * Chaining is supported in custom builds as long as the `_#value` method is 14307 * directly or indirectly included in the build. 14308 * 14309 * In addition to lodash methods, wrappers have `Array` and `String` methods. 14310 * 14311 * The wrapper `Array` methods are: 14312 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` 14313 * 14314 * The wrapper `String` methods are: 14315 * `replace` and `split` 14316 * 14317 * The wrapper methods that support shortcut fusion are: 14318 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, 14319 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, 14320 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` 14321 * 14322 * The chainable wrapper methods are: 14323 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, 14324 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, 14325 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, 14326 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, 14327 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, 14328 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, 14329 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, 14330 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, 14331 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, 14332 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, 14333 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, 14334 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, 14335 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, 14336 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, 14337 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, 14338 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, 14339 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, 14340 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, 14341 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, 14342 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, 14343 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, 14344 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, 14345 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, 14346 * `zipObject`, `zipObjectDeep`, and `zipWith` 14347 * 14348 * The wrapper methods that are **not** chainable by default are: 14349 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, 14350 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, 14351 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, 14352 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, 14353 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, 14354 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, 14355 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, 14356 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, 14357 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, 14358 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, 14359 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, 14360 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, 14361 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, 14362 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, 14363 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, 14364 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, 14365 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, 14366 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, 14367 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, 14368 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, 14369 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, 14370 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, 14371 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, 14372 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, 14373 * `upperFirst`, `value`, and `words` 14374 * 14375 * @name _ 14376 * @constructor 14377 * @category Seq 14378 * @param {*} value The value to wrap in a `lodash` instance. 14379 * @returns {Object} Returns the new `lodash` wrapper instance. 14380 * @example 14381 * 14382 * function square(n) { 14383 * return n * n; 14384 * } 14385 * 14386 * var wrapped = _([1, 2, 3]); 14387 * 14388 * // Returns an unwrapped value. 14389 * wrapped.reduce(_.add); 14390 * // => 6 14391 * 14392 * // Returns a wrapped value. 14393 * var squares = wrapped.map(square); 14394 * 14395 * _.isArray(squares); 14396 * // => false 14397 * 14398 * _.isArray(squares.value()); 14399 * // => true 14400 */ 14401 function lodash(value) { 14402 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { 14403 if (value instanceof LodashWrapper) { 14404 return value; 14405 } 14406 if (hasOwnProperty.call(value, '__wrapped__')) { 14407 return wrapperClone(value); 14408 } 14409 } 14410 return new LodashWrapper(value); 14411 } 14412 14413 /** 14414 * The base implementation of `_.create` without support for assigning 14415 * properties to the created object. 14416 * 14417 * @private 14418 * @param {Object} proto The object to inherit from. 14419 * @returns {Object} Returns the new object. 14420 */ 14421 var baseCreate = (function() { 14422 function object() {} 14423 return function(proto) { 14424 if (!isObject(proto)) { 14425 return {}; 14426 } 14427 if (objectCreate) { 14428 return objectCreate(proto); 14429 } 14430 object.prototype = proto; 14431 var result = new object; 14432 object.prototype = undefined; 14433 return result; 14434 }; 14435 }()); 14436 14437 /** 14438 * The function whose prototype chain sequence wrappers inherit from. 14439 * 14440 * @private 14441 */ 14442 function baseLodash() { 14443 // No operation performed. 14444 } 14445 14446 /** 14447 * The base constructor for creating `lodash` wrapper objects. 14448 * 14449 * @private 14450 * @param {*} value The value to wrap. 14451 * @param {boolean} [chainAll] Enable explicit method chain sequences. 14452 */ 14453 function LodashWrapper(value, chainAll) { 14454 this.__wrapped__ = value; 14455 this.__actions__ = []; 14456 this.__chain__ = !!chainAll; 14457 this.__index__ = 0; 14458 this.__values__ = undefined; 14459 } 14460 14461 /** 14462 * By default, the template delimiters used by lodash are like those in 14463 * embedded Ruby (ERB) as well as ES2015 template strings. Change the 14464 * following template settings to use alternative delimiters. 14465 * 14466 * @static 14467 * @memberOf _ 14468 * @type {Object} 14469 */ 14470 lodash.templateSettings = { 14471 14472 /** 14473 * Used to detect `data` property values to be HTML-escaped. 14474 * 14475 * @memberOf _.templateSettings 14476 * @type {RegExp} 14477 */ 14478 'escape': reEscape, 14479 14480 /** 14481 * Used to detect code to be evaluated. 14482 * 14483 * @memberOf _.templateSettings 14484 * @type {RegExp} 14485 */ 14486 'evaluate': reEvaluate, 14487 14488 /** 14489 * Used to detect `data` property values to inject. 14490 * 14491 * @memberOf _.templateSettings 14492 * @type {RegExp} 14493 */ 14494 'interpolate': reInterpolate, 14495 14496 /** 14497 * Used to reference the data object in the template text. 14498 * 14499 * @memberOf _.templateSettings 14500 * @type {string} 14501 */ 14502 'variable': '', 14503 14504 /** 14505 * Used to import variables into the compiled template. 14506 * 14507 * @memberOf _.templateSettings 14508 * @type {Object} 14509 */ 14510 'imports': { 14511 14512 /** 14513 * A reference to the `lodash` function. 14514 * 14515 * @memberOf _.templateSettings.imports 14516 * @type {Function} 14517 */ 14518 '_': lodash 14519 } 14520 }; 14521 14522 // Ensure wrappers are instances of `baseLodash`. 14523 lodash.prototype = baseLodash.prototype; 14524 lodash.prototype.constructor = lodash; 14525 14526 LodashWrapper.prototype = baseCreate(baseLodash.prototype); 14527 LodashWrapper.prototype.constructor = LodashWrapper; 14528 14529 /*------------------------------------------------------------------------*/ 14530 14531 /** 14532 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. 14533 * 14534 * @private 14535 * @constructor 14536 * @param {*} value The value to wrap. 14537 */ 14538 function LazyWrapper(value) { 14539 this.__wrapped__ = value; 14540 this.__actions__ = []; 14541 this.__dir__ = 1; 14542 this.__filtered__ = false; 14543 this.__iteratees__ = []; 14544 this.__takeCount__ = MAX_ARRAY_LENGTH; 14545 this.__views__ = []; 14546 } 14547 14548 /** 14549 * Creates a clone of the lazy wrapper object. 14550 * 14551 * @private 14552 * @name clone 14553 * @memberOf LazyWrapper 14554 * @returns {Object} Returns the cloned `LazyWrapper` object. 14555 */ 14556 function lazyClone() { 14557 var result = new LazyWrapper(this.__wrapped__); 14558 result.__actions__ = copyArray(this.__actions__); 14559 result.__dir__ = this.__dir__; 14560 result.__filtered__ = this.__filtered__; 14561 result.__iteratees__ = copyArray(this.__iteratees__); 14562 result.__takeCount__ = this.__takeCount__; 14563 result.__views__ = copyArray(this.__views__); 14564 return result; 14565 } 14566 14567 /** 14568 * Reverses the direction of lazy iteration. 14569 * 14570 * @private 14571 * @name reverse 14572 * @memberOf LazyWrapper 14573 * @returns {Object} Returns the new reversed `LazyWrapper` object. 14574 */ 14575 function lazyReverse() { 14576 if (this.__filtered__) { 14577 var result = new LazyWrapper(this); 14578 result.__dir__ = -1; 14579 result.__filtered__ = true; 14580 } else { 14581 result = this.clone(); 14582 result.__dir__ *= -1; 14583 } 14584 return result; 14585 } 14586 14587 /** 14588 * Extracts the unwrapped value from its lazy wrapper. 14589 * 14590 * @private 14591 * @name value 14592 * @memberOf LazyWrapper 14593 * @returns {*} Returns the unwrapped value. 14594 */ 14595 function lazyValue() { 14596 var array = this.__wrapped__.value(), 14597 dir = this.__dir__, 14598 isArr = isArray(array), 14599 isRight = dir < 0, 14600 arrLength = isArr ? array.length : 0, 14601 view = getView(0, arrLength, this.__views__), 14602 start = view.start, 14603 end = view.end, 14604 length = end - start, 14605 index = isRight ? end : (start - 1), 14606 iteratees = this.__iteratees__, 14607 iterLength = iteratees.length, 14608 resIndex = 0, 14609 takeCount = nativeMin(length, this.__takeCount__); 14610 14611 if (!isArr || (!isRight && arrLength == length && takeCount == length)) { 14612 return baseWrapperValue(array, this.__actions__); 14613 } 14614 var result = []; 14615 14616 outer: 14617 while (length-- && resIndex < takeCount) { 14618 index += dir; 14619 14620 var iterIndex = -1, 14621 value = array[index]; 14622 14623 while (++iterIndex < iterLength) { 14624 var data = iteratees[iterIndex], 14625 iteratee = data.iteratee, 14626 type = data.type, 14627 computed = iteratee(value); 14628 14629 if (type == LAZY_MAP_FLAG) { 14630 value = computed; 14631 } else if (!computed) { 14632 if (type == LAZY_FILTER_FLAG) { 14633 continue outer; 14634 } else { 14635 break outer; 14636 } 14637 } 14638 } 14639 result[resIndex++] = value; 14640 } 14641 return result; 14642 } 14643 14644 // Ensure `LazyWrapper` is an instance of `baseLodash`. 14645 LazyWrapper.prototype = baseCreate(baseLodash.prototype); 14646 LazyWrapper.prototype.constructor = LazyWrapper; 14647 14648 /*------------------------------------------------------------------------*/ 14649 14650 /** 14651 * Creates a hash object. 14652 * 14653 * @private 14654 * @constructor 14655 * @param {Array} [entries] The key-value pairs to cache. 14656 */ 14657 function Hash(entries) { 14658 var index = -1, 14659 length = entries == null ? 0 : entries.length; 14660 14661 this.clear(); 14662 while (++index < length) { 14663 var entry = entries[index]; 14664 this.set(entry[0], entry[1]); 14665 } 14666 } 14667 14668 /** 14669 * Removes all key-value entries from the hash. 14670 * 14671 * @private 14672 * @name clear 14673 * @memberOf Hash 14674 */ 14675 function hashClear() { 14676 this.__data__ = nativeCreate ? nativeCreate(null) : {}; 14677 this.size = 0; 14678 } 14679 14680 /** 14681 * Removes `key` and its value from the hash. 14682 * 14683 * @private 14684 * @name delete 14685 * @memberOf Hash 14686 * @param {Object} hash The hash to modify. 14687 * @param {string} key The key of the value to remove. 14688 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 14689 */ 14690 function hashDelete(key) { 14691 var result = this.has(key) && delete this.__data__[key]; 14692 this.size -= result ? 1 : 0; 14693 return result; 14694 } 14695 14696 /** 14697 * Gets the hash value for `key`. 14698 * 14699 * @private 14700 * @name get 14701 * @memberOf Hash 14702 * @param {string} key The key of the value to get. 14703 * @returns {*} Returns the entry value. 14704 */ 14705 function hashGet(key) { 14706 var data = this.__data__; 14707 if (nativeCreate) { 14708 var result = data[key]; 14709 return result === HASH_UNDEFINED ? undefined : result; 14710 } 14711 return hasOwnProperty.call(data, key) ? data[key] : undefined; 14712 } 14713 14714 /** 14715 * Checks if a hash value for `key` exists. 14716 * 14717 * @private 14718 * @name has 14719 * @memberOf Hash 14720 * @param {string} key The key of the entry to check. 14721 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 14722 */ 14723 function hashHas(key) { 14724 var data = this.__data__; 14725 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); 14726 } 14727 14728 /** 14729 * Sets the hash `key` to `value`. 14730 * 14731 * @private 14732 * @name set 14733 * @memberOf Hash 14734 * @param {string} key The key of the value to set. 14735 * @param {*} value The value to set. 14736 * @returns {Object} Returns the hash instance. 14737 */ 14738 function hashSet(key, value) { 14739 var data = this.__data__; 14740 this.size += this.has(key) ? 0 : 1; 14741 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; 14742 return this; 14743 } 14744 14745 // Add methods to `Hash`. 14746 Hash.prototype.clear = hashClear; 14747 Hash.prototype['delete'] = hashDelete; 14748 Hash.prototype.get = hashGet; 14749 Hash.prototype.has = hashHas; 14750 Hash.prototype.set = hashSet; 14751 14752 /*------------------------------------------------------------------------*/ 14753 14754 /** 14755 * Creates an list cache object. 14756 * 14757 * @private 14758 * @constructor 14759 * @param {Array} [entries] The key-value pairs to cache. 14760 */ 14761 function ListCache(entries) { 14762 var index = -1, 14763 length = entries == null ? 0 : entries.length; 14764 14765 this.clear(); 14766 while (++index < length) { 14767 var entry = entries[index]; 14768 this.set(entry[0], entry[1]); 14769 } 14770 } 14771 14772 /** 14773 * Removes all key-value entries from the list cache. 14774 * 14775 * @private 14776 * @name clear 14777 * @memberOf ListCache 14778 */ 14779 function listCacheClear() { 14780 this.__data__ = []; 14781 this.size = 0; 14782 } 14783 14784 /** 14785 * Removes `key` and its value from the list cache. 14786 * 14787 * @private 14788 * @name delete 14789 * @memberOf ListCache 14790 * @param {string} key The key of the value to remove. 14791 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 14792 */ 14793 function listCacheDelete(key) { 14794 var data = this.__data__, 14795 index = assocIndexOf(data, key); 14796 14797 if (index < 0) { 14798 return false; 14799 } 14800 var lastIndex = data.length - 1; 14801 if (index == lastIndex) { 14802 data.pop(); 14803 } else { 14804 splice.call(data, index, 1); 14805 } 14806 --this.size; 14807 return true; 14808 } 14809 14810 /** 14811 * Gets the list cache value for `key`. 14812 * 14813 * @private 14814 * @name get 14815 * @memberOf ListCache 14816 * @param {string} key The key of the value to get. 14817 * @returns {*} Returns the entry value. 14818 */ 14819 function listCacheGet(key) { 14820 var data = this.__data__, 14821 index = assocIndexOf(data, key); 14822 14823 return index < 0 ? undefined : data[index][1]; 14824 } 14825 14826 /** 14827 * Checks if a list cache value for `key` exists. 14828 * 14829 * @private 14830 * @name has 14831 * @memberOf ListCache 14832 * @param {string} key The key of the entry to check. 14833 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 14834 */ 14835 function listCacheHas(key) { 14836 return assocIndexOf(this.__data__, key) > -1; 14837 } 14838 14839 /** 14840 * Sets the list cache `key` to `value`. 14841 * 14842 * @private 14843 * @name set 14844 * @memberOf ListCache 14845 * @param {string} key The key of the value to set. 14846 * @param {*} value The value to set. 14847 * @returns {Object} Returns the list cache instance. 14848 */ 14849 function listCacheSet(key, value) { 14850 var data = this.__data__, 14851 index = assocIndexOf(data, key); 14852 14853 if (index < 0) { 14854 ++this.size; 14855 data.push([key, value]); 14856 } else { 14857 data[index][1] = value; 14858 } 14859 return this; 14860 } 14861 14862 // Add methods to `ListCache`. 14863 ListCache.prototype.clear = listCacheClear; 14864 ListCache.prototype['delete'] = listCacheDelete; 14865 ListCache.prototype.get = listCacheGet; 14866 ListCache.prototype.has = listCacheHas; 14867 ListCache.prototype.set = listCacheSet; 14868 14869 /*------------------------------------------------------------------------*/ 14870 14871 /** 14872 * Creates a map cache object to store key-value pairs. 14873 * 14874 * @private 14875 * @constructor 14876 * @param {Array} [entries] The key-value pairs to cache. 14877 */ 14878 function MapCache(entries) { 14879 var index = -1, 14880 length = entries == null ? 0 : entries.length; 14881 14882 this.clear(); 14883 while (++index < length) { 14884 var entry = entries[index]; 14885 this.set(entry[0], entry[1]); 14886 } 14887 } 14888 14889 /** 14890 * Removes all key-value entries from the map. 14891 * 14892 * @private 14893 * @name clear 14894 * @memberOf MapCache 14895 */ 14896 function mapCacheClear() { 14897 this.size = 0; 14898 this.__data__ = { 14899 'hash': new Hash, 14900 'map': new (Map || ListCache), 14901 'string': new Hash 14902 }; 14903 } 14904 14905 /** 14906 * Removes `key` and its value from the map. 14907 * 14908 * @private 14909 * @name delete 14910 * @memberOf MapCache 14911 * @param {string} key The key of the value to remove. 14912 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 14913 */ 14914 function mapCacheDelete(key) { 14915 var result = getMapData(this, key)['delete'](key); 14916 this.size -= result ? 1 : 0; 14917 return result; 14918 } 14919 14920 /** 14921 * Gets the map value for `key`. 14922 * 14923 * @private 14924 * @name get 14925 * @memberOf MapCache 14926 * @param {string} key The key of the value to get. 14927 * @returns {*} Returns the entry value. 14928 */ 14929 function mapCacheGet(key) { 14930 return getMapData(this, key).get(key); 14931 } 14932 14933 /** 14934 * Checks if a map value for `key` exists. 14935 * 14936 * @private 14937 * @name has 14938 * @memberOf MapCache 14939 * @param {string} key The key of the entry to check. 14940 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 14941 */ 14942 function mapCacheHas(key) { 14943 return getMapData(this, key).has(key); 14944 } 14945 14946 /** 14947 * Sets the map `key` to `value`. 14948 * 14949 * @private 14950 * @name set 14951 * @memberOf MapCache 14952 * @param {string} key The key of the value to set. 14953 * @param {*} value The value to set. 14954 * @returns {Object} Returns the map cache instance. 14955 */ 14956 function mapCacheSet(key, value) { 14957 var data = getMapData(this, key), 14958 size = data.size; 14959 14960 data.set(key, value); 14961 this.size += data.size == size ? 0 : 1; 14962 return this; 14963 } 14964 14965 // Add methods to `MapCache`. 14966 MapCache.prototype.clear = mapCacheClear; 14967 MapCache.prototype['delete'] = mapCacheDelete; 14968 MapCache.prototype.get = mapCacheGet; 14969 MapCache.prototype.has = mapCacheHas; 14970 MapCache.prototype.set = mapCacheSet; 14971 14972 /*------------------------------------------------------------------------*/ 14973 14974 /** 14975 * 14976 * Creates an array cache object to store unique values. 14977 * 14978 * @private 14979 * @constructor 14980 * @param {Array} [values] The values to cache. 14981 */ 14982 function SetCache(values) { 14983 var index = -1, 14984 length = values == null ? 0 : values.length; 14985 14986 this.__data__ = new MapCache; 14987 while (++index < length) { 14988 this.add(values[index]); 14989 } 14990 } 14991 14992 /** 14993 * Adds `value` to the array cache. 14994 * 14995 * @private 14996 * @name add 14997 * @memberOf SetCache 14998 * @alias push 14999 * @param {*} value The value to cache. 15000 * @returns {Object} Returns the cache instance. 15001 */ 15002 function setCacheAdd(value) { 15003 this.__data__.set(value, HASH_UNDEFINED); 15004 return this; 15005 } 15006 15007 /** 15008 * Checks if `value` is in the array cache. 15009 * 15010 * @private 15011 * @name has 15012 * @memberOf SetCache 15013 * @param {*} value The value to search for. 15014 * @returns {number} Returns `true` if `value` is found, else `false`. 15015 */ 15016 function setCacheHas(value) { 15017 return this.__data__.has(value); 15018 } 15019 15020 // Add methods to `SetCache`. 15021 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; 15022 SetCache.prototype.has = setCacheHas; 15023 15024 /*------------------------------------------------------------------------*/ 15025 15026 /** 15027 * Creates a stack cache object to store key-value pairs. 15028 * 15029 * @private 15030 * @constructor 15031 * @param {Array} [entries] The key-value pairs to cache. 15032 */ 15033 function Stack(entries) { 15034 var data = this.__data__ = new ListCache(entries); 15035 this.size = data.size; 15036 } 15037 15038 /** 15039 * Removes all key-value entries from the stack. 15040 * 15041 * @private 15042 * @name clear 15043 * @memberOf Stack 15044 */ 15045 function stackClear() { 15046 this.__data__ = new ListCache; 15047 this.size = 0; 15048 } 15049 15050 /** 15051 * Removes `key` and its value from the stack. 15052 * 15053 * @private 15054 * @name delete 15055 * @memberOf Stack 15056 * @param {string} key The key of the value to remove. 15057 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 15058 */ 15059 function stackDelete(key) { 15060 var data = this.__data__, 15061 result = data['delete'](key); 15062 15063 this.size = data.size; 15064 return result; 15065 } 15066 15067 /** 15068 * Gets the stack value for `key`. 15069 * 15070 * @private 15071 * @name get 15072 * @memberOf Stack 15073 * @param {string} key The key of the value to get. 15074 * @returns {*} Returns the entry value. 15075 */ 15076 function stackGet(key) { 15077 return this.__data__.get(key); 15078 } 15079 15080 /** 15081 * Checks if a stack value for `key` exists. 15082 * 15083 * @private 15084 * @name has 15085 * @memberOf Stack 15086 * @param {string} key The key of the entry to check. 15087 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 15088 */ 15089 function stackHas(key) { 15090 return this.__data__.has(key); 15091 } 15092 15093 /** 15094 * Sets the stack `key` to `value`. 15095 * 15096 * @private 15097 * @name set 15098 * @memberOf Stack 15099 * @param {string} key The key of the value to set. 15100 * @param {*} value The value to set. 15101 * @returns {Object} Returns the stack cache instance. 15102 */ 15103 function stackSet(key, value) { 15104 var data = this.__data__; 15105 if (data instanceof ListCache) { 15106 var pairs = data.__data__; 15107 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { 15108 pairs.push([key, value]); 15109 this.size = ++data.size; 15110 return this; 15111 } 15112 data = this.__data__ = new MapCache(pairs); 15113 } 15114 data.set(key, value); 15115 this.size = data.size; 15116 return this; 15117 } 15118 15119 // Add methods to `Stack`. 15120 Stack.prototype.clear = stackClear; 15121 Stack.prototype['delete'] = stackDelete; 15122 Stack.prototype.get = stackGet; 15123 Stack.prototype.has = stackHas; 15124 Stack.prototype.set = stackSet; 15125 15126 /*------------------------------------------------------------------------*/ 15127 15128 /** 15129 * Creates an array of the enumerable property names of the array-like `value`. 15130 * 15131 * @private 15132 * @param {*} value The value to query. 15133 * @param {boolean} inherited Specify returning inherited property names. 15134 * @returns {Array} Returns the array of property names. 15135 */ 15136 function arrayLikeKeys(value, inherited) { 15137 var isArr = isArray(value), 15138 isArg = !isArr && isArguments(value), 15139 isBuff = !isArr && !isArg && isBuffer(value), 15140 isType = !isArr && !isArg && !isBuff && isTypedArray(value), 15141 skipIndexes = isArr || isArg || isBuff || isType, 15142 result = skipIndexes ? baseTimes(value.length, String) : [], 15143 length = result.length; 15144 15145 for (var key in value) { 15146 if ((inherited || hasOwnProperty.call(value, key)) && 15147 !(skipIndexes && ( 15148 // Safari 9 has enumerable `arguments.length` in strict mode. 15149 key == 'length' || 15150 // Node.js 0.10 has enumerable non-index properties on buffers. 15151 (isBuff && (key == 'offset' || key == 'parent')) || 15152 // PhantomJS 2 has enumerable non-index properties on typed arrays. 15153 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || 15154 // Skip index properties. 15155 isIndex(key, length) 15156 ))) { 15157 result.push(key); 15158 } 15159 } 15160 return result; 15161 } 15162 15163 /** 15164 * A specialized version of `_.sample` for arrays. 15165 * 15166 * @private 15167 * @param {Array} array The array to sample. 15168 * @returns {*} Returns the random element. 15169 */ 15170 function arraySample(array) { 15171 var length = array.length; 15172 return length ? array[baseRandom(0, length - 1)] : undefined; 15173 } 15174 15175 /** 15176 * A specialized version of `_.sampleSize` for arrays. 15177 * 15178 * @private 15179 * @param {Array} array The array to sample. 15180 * @param {number} n The number of elements to sample. 15181 * @returns {Array} Returns the random elements. 15182 */ 15183 function arraySampleSize(array, n) { 15184 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); 15185 } 15186 15187 /** 15188 * A specialized version of `_.shuffle` for arrays. 15189 * 15190 * @private 15191 * @param {Array} array The array to shuffle. 15192 * @returns {Array} Returns the new shuffled array. 15193 */ 15194 function arrayShuffle(array) { 15195 return shuffleSelf(copyArray(array)); 15196 } 15197 15198 /** 15199 * This function is like `assignValue` except that it doesn't assign 15200 * `undefined` values. 15201 * 15202 * @private 15203 * @param {Object} object The object to modify. 15204 * @param {string} key The key of the property to assign. 15205 * @param {*} value The value to assign. 15206 */ 15207 function assignMergeValue(object, key, value) { 15208 if ((value !== undefined && !eq(object[key], value)) || 15209 (value === undefined && !(key in object))) { 15210 baseAssignValue(object, key, value); 15211 } 15212 } 15213 15214 /** 15215 * Assigns `value` to `key` of `object` if the existing value is not equivalent 15216 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 15217 * for equality comparisons. 15218 * 15219 * @private 15220 * @param {Object} object The object to modify. 15221 * @param {string} key The key of the property to assign. 15222 * @param {*} value The value to assign. 15223 */ 15224 function assignValue(object, key, value) { 15225 var objValue = object[key]; 15226 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || 15227 (value === undefined && !(key in object))) { 15228 baseAssignValue(object, key, value); 15229 } 15230 } 15231 15232 /** 15233 * Gets the index at which the `key` is found in `array` of key-value pairs. 15234 * 15235 * @private 15236 * @param {Array} array The array to inspect. 15237 * @param {*} key The key to search for. 15238 * @returns {number} Returns the index of the matched value, else `-1`. 15239 */ 15240 function assocIndexOf(array, key) { 15241 var length = array.length; 15242 while (length--) { 15243 if (eq(array[length][0], key)) { 15244 return length; 15245 } 15246 } 15247 return -1; 15248 } 15249 15250 /** 15251 * Aggregates elements of `collection` on `accumulator` with keys transformed 15252 * by `iteratee` and values set by `setter`. 15253 * 15254 * @private 15255 * @param {Array|Object} collection The collection to iterate over. 15256 * @param {Function} setter The function to set `accumulator` values. 15257 * @param {Function} iteratee The iteratee to transform keys. 15258 * @param {Object} accumulator The initial aggregated object. 15259 * @returns {Function} Returns `accumulator`. 15260 */ 15261 function baseAggregator(collection, setter, iteratee, accumulator) { 15262 baseEach(collection, function(value, key, collection) { 15263 setter(accumulator, value, iteratee(value), collection); 15264 }); 15265 return accumulator; 15266 } 15267 15268 /** 15269 * The base implementation of `_.assign` without support for multiple sources 15270 * or `customizer` functions. 15271 * 15272 * @private 15273 * @param {Object} object The destination object. 15274 * @param {Object} source The source object. 15275 * @returns {Object} Returns `object`. 15276 */ 15277 function baseAssign(object, source) { 15278 return object && copyObject(source, keys(source), object); 15279 } 15280 15281 /** 15282 * The base implementation of `_.assignIn` without support for multiple sources 15283 * or `customizer` functions. 15284 * 15285 * @private 15286 * @param {Object} object The destination object. 15287 * @param {Object} source The source object. 15288 * @returns {Object} Returns `object`. 15289 */ 15290 function baseAssignIn(object, source) { 15291 return object && copyObject(source, keysIn(source), object); 15292 } 15293 15294 /** 15295 * The base implementation of `assignValue` and `assignMergeValue` without 15296 * value checks. 15297 * 15298 * @private 15299 * @param {Object} object The object to modify. 15300 * @param {string} key The key of the property to assign. 15301 * @param {*} value The value to assign. 15302 */ 15303 function baseAssignValue(object, key, value) { 15304 if (key == '__proto__' && defineProperty) { 15305 defineProperty(object, key, { 15306 'configurable': true, 15307 'enumerable': true, 15308 'value': value, 15309 'writable': true 15310 }); 15311 } else { 15312 object[key] = value; 15313 } 15314 } 15315 15316 /** 15317 * The base implementation of `_.at` without support for individual paths. 15318 * 15319 * @private 15320 * @param {Object} object The object to iterate over. 15321 * @param {string[]} paths The property paths to pick. 15322 * @returns {Array} Returns the picked elements. 15323 */ 15324 function baseAt(object, paths) { 15325 var index = -1, 15326 length = paths.length, 15327 result = Array(length), 15328 skip = object == null; 15329 15330 while (++index < length) { 15331 result[index] = skip ? undefined : get(object, paths[index]); 15332 } 15333 return result; 15334 } 15335 15336 /** 15337 * The base implementation of `_.clamp` which doesn't coerce arguments. 15338 * 15339 * @private 15340 * @param {number} number The number to clamp. 15341 * @param {number} [lower] The lower bound. 15342 * @param {number} upper The upper bound. 15343 * @returns {number} Returns the clamped number. 15344 */ 15345 function baseClamp(number, lower, upper) { 15346 if (number === number) { 15347 if (upper !== undefined) { 15348 number = number <= upper ? number : upper; 15349 } 15350 if (lower !== undefined) { 15351 number = number >= lower ? number : lower; 15352 } 15353 } 15354 return number; 15355 } 15356 15357 /** 15358 * The base implementation of `_.clone` and `_.cloneDeep` which tracks 15359 * traversed objects. 15360 * 15361 * @private 15362 * @param {*} value The value to clone. 15363 * @param {boolean} bitmask The bitmask flags. 15364 * 1 - Deep clone 15365 * 2 - Flatten inherited properties 15366 * 4 - Clone symbols 15367 * @param {Function} [customizer] The function to customize cloning. 15368 * @param {string} [key] The key of `value`. 15369 * @param {Object} [object] The parent object of `value`. 15370 * @param {Object} [stack] Tracks traversed objects and their clone counterparts. 15371 * @returns {*} Returns the cloned value. 15372 */ 15373 function baseClone(value, bitmask, customizer, key, object, stack) { 15374 var result, 15375 isDeep = bitmask & CLONE_DEEP_FLAG, 15376 isFlat = bitmask & CLONE_FLAT_FLAG, 15377 isFull = bitmask & CLONE_SYMBOLS_FLAG; 15378 15379 if (customizer) { 15380 result = object ? customizer(value, key, object, stack) : customizer(value); 15381 } 15382 if (result !== undefined) { 15383 return result; 15384 } 15385 if (!isObject(value)) { 15386 return value; 15387 } 15388 var isArr = isArray(value); 15389 if (isArr) { 15390 result = initCloneArray(value); 15391 if (!isDeep) { 15392 return copyArray(value, result); 15393 } 15394 } else { 15395 var tag = getTag(value), 15396 isFunc = tag == funcTag || tag == genTag; 15397 15398 if (isBuffer(value)) { 15399 return cloneBuffer(value, isDeep); 15400 } 15401 if (tag == objectTag || tag == argsTag || (isFunc && !object)) { 15402 result = (isFlat || isFunc) ? {} : initCloneObject(value); 15403 if (!isDeep) { 15404 return isFlat 15405 ? copySymbolsIn(value, baseAssignIn(result, value)) 15406 : copySymbols(value, baseAssign(result, value)); 15407 } 15408 } else { 15409 if (!cloneableTags[tag]) { 15410 return object ? value : {}; 15411 } 15412 result = initCloneByTag(value, tag, isDeep); 15413 } 15414 } 15415 // Check for circular references and return its corresponding clone. 15416 stack || (stack = new Stack); 15417 var stacked = stack.get(value); 15418 if (stacked) { 15419 return stacked; 15420 } 15421 stack.set(value, result); 15422 15423 if (isSet(value)) { 15424 value.forEach(function(subValue) { 15425 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); 15426 }); 15427 } else if (isMap(value)) { 15428 value.forEach(function(subValue, key) { 15429 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); 15430 }); 15431 } 15432 15433 var keysFunc = isFull 15434 ? (isFlat ? getAllKeysIn : getAllKeys) 15435 : (isFlat ? keysIn : keys); 15436 15437 var props = isArr ? undefined : keysFunc(value); 15438 arrayEach(props || value, function(subValue, key) { 15439 if (props) { 15440 key = subValue; 15441 subValue = value[key]; 15442 } 15443 // Recursively populate clone (susceptible to call stack limits). 15444 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); 15445 }); 15446 return result; 15447 } 15448 15449 /** 15450 * The base implementation of `_.conforms` which doesn't clone `source`. 15451 * 15452 * @private 15453 * @param {Object} source The object of property predicates to conform to. 15454 * @returns {Function} Returns the new spec function. 15455 */ 15456 function baseConforms(source) { 15457 var props = keys(source); 15458 return function(object) { 15459 return baseConformsTo(object, source, props); 15460 }; 15461 } 15462 15463 /** 15464 * The base implementation of `_.conformsTo` which accepts `props` to check. 15465 * 15466 * @private 15467 * @param {Object} object The object to inspect. 15468 * @param {Object} source The object of property predicates to conform to. 15469 * @returns {boolean} Returns `true` if `object` conforms, else `false`. 15470 */ 15471 function baseConformsTo(object, source, props) { 15472 var length = props.length; 15473 if (object == null) { 15474 return !length; 15475 } 15476 object = Object(object); 15477 while (length--) { 15478 var key = props[length], 15479 predicate = source[key], 15480 value = object[key]; 15481 15482 if ((value === undefined && !(key in object)) || !predicate(value)) { 15483 return false; 15484 } 15485 } 15486 return true; 15487 } 15488 15489 /** 15490 * The base implementation of `_.delay` and `_.defer` which accepts `args` 15491 * to provide to `func`. 15492 * 15493 * @private 15494 * @param {Function} func The function to delay. 15495 * @param {number} wait The number of milliseconds to delay invocation. 15496 * @param {Array} args The arguments to provide to `func`. 15497 * @returns {number|Object} Returns the timer id or timeout object. 15498 */ 15499 function baseDelay(func, wait, args) { 15500 if (typeof func != 'function') { 15501 throw new TypeError(FUNC_ERROR_TEXT); 15502 } 15503 return setTimeout(function() { func.apply(undefined, args); }, wait); 15504 } 15505 15506 /** 15507 * The base implementation of methods like `_.difference` without support 15508 * for excluding multiple arrays or iteratee shorthands. 15509 * 15510 * @private 15511 * @param {Array} array The array to inspect. 15512 * @param {Array} values The values to exclude. 15513 * @param {Function} [iteratee] The iteratee invoked per element. 15514 * @param {Function} [comparator] The comparator invoked per element. 15515 * @returns {Array} Returns the new array of filtered values. 15516 */ 15517 function baseDifference(array, values, iteratee, comparator) { 15518 var index = -1, 15519 includes = arrayIncludes, 15520 isCommon = true, 15521 length = array.length, 15522 result = [], 15523 valuesLength = values.length; 15524 15525 if (!length) { 15526 return result; 15527 } 15528 if (iteratee) { 15529 values = arrayMap(values, baseUnary(iteratee)); 15530 } 15531 if (comparator) { 15532 includes = arrayIncludesWith; 15533 isCommon = false; 15534 } 15535 else if (values.length >= LARGE_ARRAY_SIZE) { 15536 includes = cacheHas; 15537 isCommon = false; 15538 values = new SetCache(values); 15539 } 15540 outer: 15541 while (++index < length) { 15542 var value = array[index], 15543 computed = iteratee == null ? value : iteratee(value); 15544 15545 value = (comparator || value !== 0) ? value : 0; 15546 if (isCommon && computed === computed) { 15547 var valuesIndex = valuesLength; 15548 while (valuesIndex--) { 15549 if (values[valuesIndex] === computed) { 15550 continue outer; 15551 } 15552 } 15553 result.push(value); 15554 } 15555 else if (!includes(values, computed, comparator)) { 15556 result.push(value); 15557 } 15558 } 15559 return result; 15560 } 15561 15562 /** 15563 * The base implementation of `_.forEach` without support for iteratee shorthands. 15564 * 15565 * @private 15566 * @param {Array|Object} collection The collection to iterate over. 15567 * @param {Function} iteratee The function invoked per iteration. 15568 * @returns {Array|Object} Returns `collection`. 15569 */ 15570 var baseEach = createBaseEach(baseForOwn); 15571 15572 /** 15573 * The base implementation of `_.forEachRight` without support for iteratee shorthands. 15574 * 15575 * @private 15576 * @param {Array|Object} collection The collection to iterate over. 15577 * @param {Function} iteratee The function invoked per iteration. 15578 * @returns {Array|Object} Returns `collection`. 15579 */ 15580 var baseEachRight = createBaseEach(baseForOwnRight, true); 15581 15582 /** 15583 * The base implementation of `_.every` without support for iteratee shorthands. 15584 * 15585 * @private 15586 * @param {Array|Object} collection The collection to iterate over. 15587 * @param {Function} predicate The function invoked per iteration. 15588 * @returns {boolean} Returns `true` if all elements pass the predicate check, 15589 * else `false` 15590 */ 15591 function baseEvery(collection, predicate) { 15592 var result = true; 15593 baseEach(collection, function(value, index, collection) { 15594 result = !!predicate(value, index, collection); 15595 return result; 15596 }); 15597 return result; 15598 } 15599 15600 /** 15601 * The base implementation of methods like `_.max` and `_.min` which accepts a 15602 * `comparator` to determine the extremum value. 15603 * 15604 * @private 15605 * @param {Array} array The array to iterate over. 15606 * @param {Function} iteratee The iteratee invoked per iteration. 15607 * @param {Function} comparator The comparator used to compare values. 15608 * @returns {*} Returns the extremum value. 15609 */ 15610 function baseExtremum(array, iteratee, comparator) { 15611 var index = -1, 15612 length = array.length; 15613 15614 while (++index < length) { 15615 var value = array[index], 15616 current = iteratee(value); 15617 15618 if (current != null && (computed === undefined 15619 ? (current === current && !isSymbol(current)) 15620 : comparator(current, computed) 15621 )) { 15622 var computed = current, 15623 result = value; 15624 } 15625 } 15626 return result; 15627 } 15628 15629 /** 15630 * The base implementation of `_.fill` without an iteratee call guard. 15631 * 15632 * @private 15633 * @param {Array} array The array to fill. 15634 * @param {*} value The value to fill `array` with. 15635 * @param {number} [start=0] The start position. 15636 * @param {number} [end=array.length] The end position. 15637 * @returns {Array} Returns `array`. 15638 */ 15639 function baseFill(array, value, start, end) { 15640 var length = array.length; 15641 15642 start = toInteger(start); 15643 if (start < 0) { 15644 start = -start > length ? 0 : (length + start); 15645 } 15646 end = (end === undefined || end > length) ? length : toInteger(end); 15647 if (end < 0) { 15648 end += length; 15649 } 15650 end = start > end ? 0 : toLength(end); 15651 while (start < end) { 15652 array[start++] = value; 15653 } 15654 return array; 15655 } 15656 15657 /** 15658 * The base implementation of `_.filter` without support for iteratee shorthands. 15659 * 15660 * @private 15661 * @param {Array|Object} collection The collection to iterate over. 15662 * @param {Function} predicate The function invoked per iteration. 15663 * @returns {Array} Returns the new filtered array. 15664 */ 15665 function baseFilter(collection, predicate) { 15666 var result = []; 15667 baseEach(collection, function(value, index, collection) { 15668 if (predicate(value, index, collection)) { 15669 result.push(value); 15670 } 15671 }); 15672 return result; 15673 } 15674 15675 /** 15676 * The base implementation of `_.flatten` with support for restricting flattening. 15677 * 15678 * @private 15679 * @param {Array} array The array to flatten. 15680 * @param {number} depth The maximum recursion depth. 15681 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. 15682 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. 15683 * @param {Array} [result=[]] The initial result value. 15684 * @returns {Array} Returns the new flattened array. 15685 */ 15686 function baseFlatten(array, depth, predicate, isStrict, result) { 15687 var index = -1, 15688 length = array.length; 15689 15690 predicate || (predicate = isFlattenable); 15691 result || (result = []); 15692 15693 while (++index < length) { 15694 var value = array[index]; 15695 if (depth > 0 && predicate(value)) { 15696 if (depth > 1) { 15697 // Recursively flatten arrays (susceptible to call stack limits). 15698 baseFlatten(value, depth - 1, predicate, isStrict, result); 15699 } else { 15700 arrayPush(result, value); 15701 } 15702 } else if (!isStrict) { 15703 result[result.length] = value; 15704 } 15705 } 15706 return result; 15707 } 15708 15709 /** 15710 * The base implementation of `baseForOwn` which iterates over `object` 15711 * properties returned by `keysFunc` and invokes `iteratee` for each property. 15712 * Iteratee functions may exit iteration early by explicitly returning `false`. 15713 * 15714 * @private 15715 * @param {Object} object The object to iterate over. 15716 * @param {Function} iteratee The function invoked per iteration. 15717 * @param {Function} keysFunc The function to get the keys of `object`. 15718 * @returns {Object} Returns `object`. 15719 */ 15720 var baseFor = createBaseFor(); 15721 15722 /** 15723 * This function is like `baseFor` except that it iterates over properties 15724 * in the opposite order. 15725 * 15726 * @private 15727 * @param {Object} object The object to iterate over. 15728 * @param {Function} iteratee The function invoked per iteration. 15729 * @param {Function} keysFunc The function to get the keys of `object`. 15730 * @returns {Object} Returns `object`. 15731 */ 15732 var baseForRight = createBaseFor(true); 15733 15734 /** 15735 * The base implementation of `_.forOwn` without support for iteratee shorthands. 15736 * 15737 * @private 15738 * @param {Object} object The object to iterate over. 15739 * @param {Function} iteratee The function invoked per iteration. 15740 * @returns {Object} Returns `object`. 15741 */ 15742 function baseForOwn(object, iteratee) { 15743 return object && baseFor(object, iteratee, keys); 15744 } 15745 15746 /** 15747 * The base implementation of `_.forOwnRight` without support for iteratee shorthands. 15748 * 15749 * @private 15750 * @param {Object} object The object to iterate over. 15751 * @param {Function} iteratee The function invoked per iteration. 15752 * @returns {Object} Returns `object`. 15753 */ 15754 function baseForOwnRight(object, iteratee) { 15755 return object && baseForRight(object, iteratee, keys); 15756 } 15757 15758 /** 15759 * The base implementation of `_.functions` which creates an array of 15760 * `object` function property names filtered from `props`. 15761 * 15762 * @private 15763 * @param {Object} object The object to inspect. 15764 * @param {Array} props The property names to filter. 15765 * @returns {Array} Returns the function names. 15766 */ 15767 function baseFunctions(object, props) { 15768 return arrayFilter(props, function(key) { 15769 return isFunction(object[key]); 15770 }); 15771 } 15772 15773 /** 15774 * The base implementation of `_.get` without support for default values. 15775 * 15776 * @private 15777 * @param {Object} object The object to query. 15778 * @param {Array|string} path The path of the property to get. 15779 * @returns {*} Returns the resolved value. 15780 */ 15781 function baseGet(object, path) { 15782 path = castPath(path, object); 15783 15784 var index = 0, 15785 length = path.length; 15786 15787 while (object != null && index < length) { 15788 object = object[toKey(path[index++])]; 15789 } 15790 return (index && index == length) ? object : undefined; 15791 } 15792 15793 /** 15794 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses 15795 * `keysFunc` and `symbolsFunc` to get the enumerable property names and 15796 * symbols of `object`. 15797 * 15798 * @private 15799 * @param {Object} object The object to query. 15800 * @param {Function} keysFunc The function to get the keys of `object`. 15801 * @param {Function} symbolsFunc The function to get the symbols of `object`. 15802 * @returns {Array} Returns the array of property names and symbols. 15803 */ 15804 function baseGetAllKeys(object, keysFunc, symbolsFunc) { 15805 var result = keysFunc(object); 15806 return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); 15807 } 15808 15809 /** 15810 * The base implementation of `getTag` without fallbacks for buggy environments. 15811 * 15812 * @private 15813 * @param {*} value The value to query. 15814 * @returns {string} Returns the `toStringTag`. 15815 */ 15816 function baseGetTag(value) { 15817 if (value == null) { 15818 return value === undefined ? undefinedTag : nullTag; 15819 } 15820 return (symToStringTag && symToStringTag in Object(value)) 15821 ? getRawTag(value) 15822 : objectToString(value); 15823 } 15824 15825 /** 15826 * The base implementation of `_.gt` which doesn't coerce arguments. 15827 * 15828 * @private 15829 * @param {*} value The value to compare. 15830 * @param {*} other The other value to compare. 15831 * @returns {boolean} Returns `true` if `value` is greater than `other`, 15832 * else `false`. 15833 */ 15834 function baseGt(value, other) { 15835 return value > other; 15836 } 15837 15838 /** 15839 * The base implementation of `_.has` without support for deep paths. 15840 * 15841 * @private 15842 * @param {Object} [object] The object to query. 15843 * @param {Array|string} key The key to check. 15844 * @returns {boolean} Returns `true` if `key` exists, else `false`. 15845 */ 15846 function baseHas(object, key) { 15847 return object != null && hasOwnProperty.call(object, key); 15848 } 15849 15850 /** 15851 * The base implementation of `_.hasIn` without support for deep paths. 15852 * 15853 * @private 15854 * @param {Object} [object] The object to query. 15855 * @param {Array|string} key The key to check. 15856 * @returns {boolean} Returns `true` if `key` exists, else `false`. 15857 */ 15858 function baseHasIn(object, key) { 15859 return object != null && key in Object(object); 15860 } 15861 15862 /** 15863 * The base implementation of `_.inRange` which doesn't coerce arguments. 15864 * 15865 * @private 15866 * @param {number} number The number to check. 15867 * @param {number} start The start of the range. 15868 * @param {number} end The end of the range. 15869 * @returns {boolean} Returns `true` if `number` is in the range, else `false`. 15870 */ 15871 function baseInRange(number, start, end) { 15872 return number >= nativeMin(start, end) && number < nativeMax(start, end); 15873 } 15874 15875 /** 15876 * The base implementation of methods like `_.intersection`, without support 15877 * for iteratee shorthands, that accepts an array of arrays to inspect. 15878 * 15879 * @private 15880 * @param {Array} arrays The arrays to inspect. 15881 * @param {Function} [iteratee] The iteratee invoked per element. 15882 * @param {Function} [comparator] The comparator invoked per element. 15883 * @returns {Array} Returns the new array of shared values. 15884 */ 15885 function baseIntersection(arrays, iteratee, comparator) { 15886 var includes = comparator ? arrayIncludesWith : arrayIncludes, 15887 length = arrays[0].length, 15888 othLength = arrays.length, 15889 othIndex = othLength, 15890 caches = Array(othLength), 15891 maxLength = Infinity, 15892 result = []; 15893 15894 while (othIndex--) { 15895 var array = arrays[othIndex]; 15896 if (othIndex && iteratee) { 15897 array = arrayMap(array, baseUnary(iteratee)); 15898 } 15899 maxLength = nativeMin(array.length, maxLength); 15900 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) 15901 ? new SetCache(othIndex && array) 15902 : undefined; 15903 } 15904 array = arrays[0]; 15905 15906 var index = -1, 15907 seen = caches[0]; 15908 15909 outer: 15910 while (++index < length && result.length < maxLength) { 15911 var value = array[index], 15912 computed = iteratee ? iteratee(value) : value; 15913 15914 value = (comparator || value !== 0) ? value : 0; 15915 if (!(seen 15916 ? cacheHas(seen, computed) 15917 : includes(result, computed, comparator) 15918 )) { 15919 othIndex = othLength; 15920 while (--othIndex) { 15921 var cache = caches[othIndex]; 15922 if (!(cache 15923 ? cacheHas(cache, computed) 15924 : includes(arrays[othIndex], computed, comparator)) 15925 ) { 15926 continue outer; 15927 } 15928 } 15929 if (seen) { 15930 seen.push(computed); 15931 } 15932 result.push(value); 15933 } 15934 } 15935 return result; 15936 } 15937 15938 /** 15939 * The base implementation of `_.invert` and `_.invertBy` which inverts 15940 * `object` with values transformed by `iteratee` and set by `setter`. 15941 * 15942 * @private 15943 * @param {Object} object The object to iterate over. 15944 * @param {Function} setter The function to set `accumulator` values. 15945 * @param {Function} iteratee The iteratee to transform values. 15946 * @param {Object} accumulator The initial inverted object. 15947 * @returns {Function} Returns `accumulator`. 15948 */ 15949 function baseInverter(object, setter, iteratee, accumulator) { 15950 baseForOwn(object, function(value, key, object) { 15951 setter(accumulator, iteratee(value), key, object); 15952 }); 15953 return accumulator; 15954 } 15955 15956 /** 15957 * The base implementation of `_.invoke` without support for individual 15958 * method arguments. 15959 * 15960 * @private 15961 * @param {Object} object The object to query. 15962 * @param {Array|string} path The path of the method to invoke. 15963 * @param {Array} args The arguments to invoke the method with. 15964 * @returns {*} Returns the result of the invoked method. 15965 */ 15966 function baseInvoke(object, path, args) { 15967 path = castPath(path, object); 15968 object = parent(object, path); 15969 var func = object == null ? object : object[toKey(last(path))]; 15970 return func == null ? undefined : apply(func, object, args); 15971 } 15972 15973 /** 15974 * The base implementation of `_.isArguments`. 15975 * 15976 * @private 15977 * @param {*} value The value to check. 15978 * @returns {boolean} Returns `true` if `value` is an `arguments` object, 15979 */ 15980 function baseIsArguments(value) { 15981 return isObjectLike(value) && baseGetTag(value) == argsTag; 15982 } 15983 15984 /** 15985 * The base implementation of `_.isArrayBuffer` without Node.js optimizations. 15986 * 15987 * @private 15988 * @param {*} value The value to check. 15989 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. 15990 */ 15991 function baseIsArrayBuffer(value) { 15992 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; 15993 } 15994 15995 /** 15996 * The base implementation of `_.isDate` without Node.js optimizations. 15997 * 15998 * @private 15999 * @param {*} value The value to check. 16000 * @returns {boolean} Returns `true` if `value` is a date object, else `false`. 16001 */ 16002 function baseIsDate(value) { 16003 return isObjectLike(value) && baseGetTag(value) == dateTag; 16004 } 16005 16006 /** 16007 * The base implementation of `_.isEqual` which supports partial comparisons 16008 * and tracks traversed objects. 16009 * 16010 * @private 16011 * @param {*} value The value to compare. 16012 * @param {*} other The other value to compare. 16013 * @param {boolean} bitmask The bitmask flags. 16014 * 1 - Unordered comparison 16015 * 2 - Partial comparison 16016 * @param {Function} [customizer] The function to customize comparisons. 16017 * @param {Object} [stack] Tracks traversed `value` and `other` objects. 16018 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 16019 */ 16020 function baseIsEqual(value, other, bitmask, customizer, stack) { 16021 if (value === other) { 16022 return true; 16023 } 16024 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { 16025 return value !== value && other !== other; 16026 } 16027 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); 16028 } 16029 16030 /** 16031 * A specialized version of `baseIsEqual` for arrays and objects which performs 16032 * deep comparisons and tracks traversed objects enabling objects with circular 16033 * references to be compared. 16034 * 16035 * @private 16036 * @param {Object} object The object to compare. 16037 * @param {Object} other The other object to compare. 16038 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 16039 * @param {Function} customizer The function to customize comparisons. 16040 * @param {Function} equalFunc The function to determine equivalents of values. 16041 * @param {Object} [stack] Tracks traversed `object` and `other` objects. 16042 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 16043 */ 16044 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { 16045 var objIsArr = isArray(object), 16046 othIsArr = isArray(other), 16047 objTag = objIsArr ? arrayTag : getTag(object), 16048 othTag = othIsArr ? arrayTag : getTag(other); 16049 16050 objTag = objTag == argsTag ? objectTag : objTag; 16051 othTag = othTag == argsTag ? objectTag : othTag; 16052 16053 var objIsObj = objTag == objectTag, 16054 othIsObj = othTag == objectTag, 16055 isSameTag = objTag == othTag; 16056 16057 if (isSameTag && isBuffer(object)) { 16058 if (!isBuffer(other)) { 16059 return false; 16060 } 16061 objIsArr = true; 16062 objIsObj = false; 16063 } 16064 if (isSameTag && !objIsObj) { 16065 stack || (stack = new Stack); 16066 return (objIsArr || isTypedArray(object)) 16067 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) 16068 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); 16069 } 16070 if (!(bitmask & COMPARE_PARTIAL_FLAG)) { 16071 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), 16072 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); 16073 16074 if (objIsWrapped || othIsWrapped) { 16075 var objUnwrapped = objIsWrapped ? object.value() : object, 16076 othUnwrapped = othIsWrapped ? other.value() : other; 16077 16078 stack || (stack = new Stack); 16079 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); 16080 } 16081 } 16082 if (!isSameTag) { 16083 return false; 16084 } 16085 stack || (stack = new Stack); 16086 return equalObjects(object, other, bitmask, customizer, equalFunc, stack); 16087 } 16088 16089 /** 16090 * The base implementation of `_.isMap` without Node.js optimizations. 16091 * 16092 * @private 16093 * @param {*} value The value to check. 16094 * @returns {boolean} Returns `true` if `value` is a map, else `false`. 16095 */ 16096 function baseIsMap(value) { 16097 return isObjectLike(value) && getTag(value) == mapTag; 16098 } 16099 16100 /** 16101 * The base implementation of `_.isMatch` without support for iteratee shorthands. 16102 * 16103 * @private 16104 * @param {Object} object The object to inspect. 16105 * @param {Object} source The object of property values to match. 16106 * @param {Array} matchData The property names, values, and compare flags to match. 16107 * @param {Function} [customizer] The function to customize comparisons. 16108 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 16109 */ 16110 function baseIsMatch(object, source, matchData, customizer) { 16111 var index = matchData.length, 16112 length = index, 16113 noCustomizer = !customizer; 16114 16115 if (object == null) { 16116 return !length; 16117 } 16118 object = Object(object); 16119 while (index--) { 16120 var data = matchData[index]; 16121 if ((noCustomizer && data[2]) 16122 ? data[1] !== object[data[0]] 16123 : !(data[0] in object) 16124 ) { 16125 return false; 16126 } 16127 } 16128 while (++index < length) { 16129 data = matchData[index]; 16130 var key = data[0], 16131 objValue = object[key], 16132 srcValue = data[1]; 16133 16134 if (noCustomizer && data[2]) { 16135 if (objValue === undefined && !(key in object)) { 16136 return false; 16137 } 16138 } else { 16139 var stack = new Stack; 16140 if (customizer) { 16141 var result = customizer(objValue, srcValue, key, object, source, stack); 16142 } 16143 if (!(result === undefined 16144 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) 16145 : result 16146 )) { 16147 return false; 16148 } 16149 } 16150 } 16151 return true; 16152 } 16153 16154 /** 16155 * The base implementation of `_.isNative` without bad shim checks. 16156 * 16157 * @private 16158 * @param {*} value The value to check. 16159 * @returns {boolean} Returns `true` if `value` is a native function, 16160 * else `false`. 16161 */ 16162 function baseIsNative(value) { 16163 if (!isObject(value) || isMasked(value)) { 16164 return false; 16165 } 16166 var pattern = isFunction(value) ? reIsNative : reIsHostCtor; 16167 return pattern.test(toSource(value)); 16168 } 16169 16170 /** 16171 * The base implementation of `_.isRegExp` without Node.js optimizations. 16172 * 16173 * @private 16174 * @param {*} value The value to check. 16175 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. 16176 */ 16177 function baseIsRegExp(value) { 16178 return isObjectLike(value) && baseGetTag(value) == regexpTag; 16179 } 16180 16181 /** 16182 * The base implementation of `_.isSet` without Node.js optimizations. 16183 * 16184 * @private 16185 * @param {*} value The value to check. 16186 * @returns {boolean} Returns `true` if `value` is a set, else `false`. 16187 */ 16188 function baseIsSet(value) { 16189 return isObjectLike(value) && getTag(value) == setTag; 16190 } 16191 16192 /** 16193 * The base implementation of `_.isTypedArray` without Node.js optimizations. 16194 * 16195 * @private 16196 * @param {*} value The value to check. 16197 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. 16198 */ 16199 function baseIsTypedArray(value) { 16200 return isObjectLike(value) && 16201 isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; 16202 } 16203 16204 /** 16205 * The base implementation of `_.iteratee`. 16206 * 16207 * @private 16208 * @param {*} [value=_.identity] The value to convert to an iteratee. 16209 * @returns {Function} Returns the iteratee. 16210 */ 16211 function baseIteratee(value) { 16212 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. 16213 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. 16214 if (typeof value == 'function') { 16215 return value; 16216 } 16217 if (value == null) { 16218 return identity; 16219 } 16220 if (typeof value == 'object') { 16221 return isArray(value) 16222 ? baseMatchesProperty(value[0], value[1]) 16223 : baseMatches(value); 16224 } 16225 return property(value); 16226 } 16227 16228 /** 16229 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. 16230 * 16231 * @private 16232 * @param {Object} object The object to query. 16233 * @returns {Array} Returns the array of property names. 16234 */ 16235 function baseKeys(object) { 16236 if (!isPrototype(object)) { 16237 return nativeKeys(object); 16238 } 16239 var result = []; 16240 for (var key in Object(object)) { 16241 if (hasOwnProperty.call(object, key) && key != 'constructor') { 16242 result.push(key); 16243 } 16244 } 16245 return result; 16246 } 16247 16248 /** 16249 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. 16250 * 16251 * @private 16252 * @param {Object} object The object to query. 16253 * @returns {Array} Returns the array of property names. 16254 */ 16255 function baseKeysIn(object) { 16256 if (!isObject(object)) { 16257 return nativeKeysIn(object); 16258 } 16259 var isProto = isPrototype(object), 16260 result = []; 16261 16262 for (var key in object) { 16263 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { 16264 result.push(key); 16265 } 16266 } 16267 return result; 16268 } 16269 16270 /** 16271 * The base implementation of `_.lt` which doesn't coerce arguments. 16272 * 16273 * @private 16274 * @param {*} value The value to compare. 16275 * @param {*} other The other value to compare. 16276 * @returns {boolean} Returns `true` if `value` is less than `other`, 16277 * else `false`. 16278 */ 16279 function baseLt(value, other) { 16280 return value < other; 16281 } 16282 16283 /** 16284 * The base implementation of `_.map` without support for iteratee shorthands. 16285 * 16286 * @private 16287 * @param {Array|Object} collection The collection to iterate over. 16288 * @param {Function} iteratee The function invoked per iteration. 16289 * @returns {Array} Returns the new mapped array. 16290 */ 16291 function baseMap(collection, iteratee) { 16292 var index = -1, 16293 result = isArrayLike(collection) ? Array(collection.length) : []; 16294 16295 baseEach(collection, function(value, key, collection) { 16296 result[++index] = iteratee(value, key, collection); 16297 }); 16298 return result; 16299 } 16300 16301 /** 16302 * The base implementation of `_.matches` which doesn't clone `source`. 16303 * 16304 * @private 16305 * @param {Object} source The object of property values to match. 16306 * @returns {Function} Returns the new spec function. 16307 */ 16308 function baseMatches(source) { 16309 var matchData = getMatchData(source); 16310 if (matchData.length == 1 && matchData[0][2]) { 16311 return matchesStrictComparable(matchData[0][0], matchData[0][1]); 16312 } 16313 return function(object) { 16314 return object === source || baseIsMatch(object, source, matchData); 16315 }; 16316 } 16317 16318 /** 16319 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. 16320 * 16321 * @private 16322 * @param {string} path The path of the property to get. 16323 * @param {*} srcValue The value to match. 16324 * @returns {Function} Returns the new spec function. 16325 */ 16326 function baseMatchesProperty(path, srcValue) { 16327 if (isKey(path) && isStrictComparable(srcValue)) { 16328 return matchesStrictComparable(toKey(path), srcValue); 16329 } 16330 return function(object) { 16331 var objValue = get(object, path); 16332 return (objValue === undefined && objValue === srcValue) 16333 ? hasIn(object, path) 16334 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); 16335 }; 16336 } 16337 16338 /** 16339 * The base implementation of `_.merge` without support for multiple sources. 16340 * 16341 * @private 16342 * @param {Object} object The destination object. 16343 * @param {Object} source The source object. 16344 * @param {number} srcIndex The index of `source`. 16345 * @param {Function} [customizer] The function to customize merged values. 16346 * @param {Object} [stack] Tracks traversed source values and their merged 16347 * counterparts. 16348 */ 16349 function baseMerge(object, source, srcIndex, customizer, stack) { 16350 if (object === source) { 16351 return; 16352 } 16353 baseFor(source, function(srcValue, key) { 16354 stack || (stack = new Stack); 16355 if (isObject(srcValue)) { 16356 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); 16357 } 16358 else { 16359 var newValue = customizer 16360 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) 16361 : undefined; 16362 16363 if (newValue === undefined) { 16364 newValue = srcValue; 16365 } 16366 assignMergeValue(object, key, newValue); 16367 } 16368 }, keysIn); 16369 } 16370 16371 /** 16372 * A specialized version of `baseMerge` for arrays and objects which performs 16373 * deep merges and tracks traversed objects enabling objects with circular 16374 * references to be merged. 16375 * 16376 * @private 16377 * @param {Object} object The destination object. 16378 * @param {Object} source The source object. 16379 * @param {string} key The key of the value to merge. 16380 * @param {number} srcIndex The index of `source`. 16381 * @param {Function} mergeFunc The function to merge values. 16382 * @param {Function} [customizer] The function to customize assigned values. 16383 * @param {Object} [stack] Tracks traversed source values and their merged 16384 * counterparts. 16385 */ 16386 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { 16387 var objValue = safeGet(object, key), 16388 srcValue = safeGet(source, key), 16389 stacked = stack.get(srcValue); 16390 16391 if (stacked) { 16392 assignMergeValue(object, key, stacked); 16393 return; 16394 } 16395 var newValue = customizer 16396 ? customizer(objValue, srcValue, (key + ''), object, source, stack) 16397 : undefined; 16398 16399 var isCommon = newValue === undefined; 16400 16401 if (isCommon) { 16402 var isArr = isArray(srcValue), 16403 isBuff = !isArr && isBuffer(srcValue), 16404 isTyped = !isArr && !isBuff && isTypedArray(srcValue); 16405 16406 newValue = srcValue; 16407 if (isArr || isBuff || isTyped) { 16408 if (isArray(objValue)) { 16409 newValue = objValue; 16410 } 16411 else if (isArrayLikeObject(objValue)) { 16412 newValue = copyArray(objValue); 16413 } 16414 else if (isBuff) { 16415 isCommon = false; 16416 newValue = cloneBuffer(srcValue, true); 16417 } 16418 else if (isTyped) { 16419 isCommon = false; 16420 newValue = cloneTypedArray(srcValue, true); 16421 } 16422 else { 16423 newValue = []; 16424 } 16425 } 16426 else if (isPlainObject(srcValue) || isArguments(srcValue)) { 16427 newValue = objValue; 16428 if (isArguments(objValue)) { 16429 newValue = toPlainObject(objValue); 16430 } 16431 else if (!isObject(objValue) || isFunction(objValue)) { 16432 newValue = initCloneObject(srcValue); 16433 } 16434 } 16435 else { 16436 isCommon = false; 16437 } 16438 } 16439 if (isCommon) { 16440 // Recursively merge objects and arrays (susceptible to call stack limits). 16441 stack.set(srcValue, newValue); 16442 mergeFunc(newValue, srcValue, srcIndex, customizer, stack); 16443 stack['delete'](srcValue); 16444 } 16445 assignMergeValue(object, key, newValue); 16446 } 16447 16448 /** 16449 * The base implementation of `_.nth` which doesn't coerce arguments. 16450 * 16451 * @private 16452 * @param {Array} array The array to query. 16453 * @param {number} n The index of the element to return. 16454 * @returns {*} Returns the nth element of `array`. 16455 */ 16456 function baseNth(array, n) { 16457 var length = array.length; 16458 if (!length) { 16459 return; 16460 } 16461 n += n < 0 ? length : 0; 16462 return isIndex(n, length) ? array[n] : undefined; 16463 } 16464 16465 /** 16466 * The base implementation of `_.orderBy` without param guards. 16467 * 16468 * @private 16469 * @param {Array|Object} collection The collection to iterate over. 16470 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. 16471 * @param {string[]} orders The sort orders of `iteratees`. 16472 * @returns {Array} Returns the new sorted array. 16473 */ 16474 function baseOrderBy(collection, iteratees, orders) { 16475 if (iteratees.length) { 16476 iteratees = arrayMap(iteratees, function(iteratee) { 16477 if (isArray(iteratee)) { 16478 return function(value) { 16479 return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); 16480 } 16481 } 16482 return iteratee; 16483 }); 16484 } else { 16485 iteratees = [identity]; 16486 } 16487 16488 var index = -1; 16489 iteratees = arrayMap(iteratees, baseUnary(getIteratee())); 16490 16491 var result = baseMap(collection, function(value, key, collection) { 16492 var criteria = arrayMap(iteratees, function(iteratee) { 16493 return iteratee(value); 16494 }); 16495 return { 'criteria': criteria, 'index': ++index, 'value': value }; 16496 }); 16497 16498 return baseSortBy(result, function(object, other) { 16499 return compareMultiple(object, other, orders); 16500 }); 16501 } 16502 16503 /** 16504 * The base implementation of `_.pick` without support for individual 16505 * property identifiers. 16506 * 16507 * @private 16508 * @param {Object} object The source object. 16509 * @param {string[]} paths The property paths to pick. 16510 * @returns {Object} Returns the new object. 16511 */ 16512 function basePick(object, paths) { 16513 return basePickBy(object, paths, function(value, path) { 16514 return hasIn(object, path); 16515 }); 16516 } 16517 16518 /** 16519 * The base implementation of `_.pickBy` without support for iteratee shorthands. 16520 * 16521 * @private 16522 * @param {Object} object The source object. 16523 * @param {string[]} paths The property paths to pick. 16524 * @param {Function} predicate The function invoked per property. 16525 * @returns {Object} Returns the new object. 16526 */ 16527 function basePickBy(object, paths, predicate) { 16528 var index = -1, 16529 length = paths.length, 16530 result = {}; 16531 16532 while (++index < length) { 16533 var path = paths[index], 16534 value = baseGet(object, path); 16535 16536 if (predicate(value, path)) { 16537 baseSet(result, castPath(path, object), value); 16538 } 16539 } 16540 return result; 16541 } 16542 16543 /** 16544 * A specialized version of `baseProperty` which supports deep paths. 16545 * 16546 * @private 16547 * @param {Array|string} path The path of the property to get. 16548 * @returns {Function} Returns the new accessor function. 16549 */ 16550 function basePropertyDeep(path) { 16551 return function(object) { 16552 return baseGet(object, path); 16553 }; 16554 } 16555 16556 /** 16557 * The base implementation of `_.pullAllBy` without support for iteratee 16558 * shorthands. 16559 * 16560 * @private 16561 * @param {Array} array The array to modify. 16562 * @param {Array} values The values to remove. 16563 * @param {Function} [iteratee] The iteratee invoked per element. 16564 * @param {Function} [comparator] The comparator invoked per element. 16565 * @returns {Array} Returns `array`. 16566 */ 16567 function basePullAll(array, values, iteratee, comparator) { 16568 var indexOf = comparator ? baseIndexOfWith : baseIndexOf, 16569 index = -1, 16570 length = values.length, 16571 seen = array; 16572 16573 if (array === values) { 16574 values = copyArray(values); 16575 } 16576 if (iteratee) { 16577 seen = arrayMap(array, baseUnary(iteratee)); 16578 } 16579 while (++index < length) { 16580 var fromIndex = 0, 16581 value = values[index], 16582 computed = iteratee ? iteratee(value) : value; 16583 16584 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { 16585 if (seen !== array) { 16586 splice.call(seen, fromIndex, 1); 16587 } 16588 splice.call(array, fromIndex, 1); 16589 } 16590 } 16591 return array; 16592 } 16593 16594 /** 16595 * The base implementation of `_.pullAt` without support for individual 16596 * indexes or capturing the removed elements. 16597 * 16598 * @private 16599 * @param {Array} array The array to modify. 16600 * @param {number[]} indexes The indexes of elements to remove. 16601 * @returns {Array} Returns `array`. 16602 */ 16603 function basePullAt(array, indexes) { 16604 var length = array ? indexes.length : 0, 16605 lastIndex = length - 1; 16606 16607 while (length--) { 16608 var index = indexes[length]; 16609 if (length == lastIndex || index !== previous) { 16610 var previous = index; 16611 if (isIndex(index)) { 16612 splice.call(array, index, 1); 16613 } else { 16614 baseUnset(array, index); 16615 } 16616 } 16617 } 16618 return array; 16619 } 16620 16621 /** 16622 * The base implementation of `_.random` without support for returning 16623 * floating-point numbers. 16624 * 16625 * @private 16626 * @param {number} lower The lower bound. 16627 * @param {number} upper The upper bound. 16628 * @returns {number} Returns the random number. 16629 */ 16630 function baseRandom(lower, upper) { 16631 return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); 16632 } 16633 16634 /** 16635 * The base implementation of `_.range` and `_.rangeRight` which doesn't 16636 * coerce arguments. 16637 * 16638 * @private 16639 * @param {number} start The start of the range. 16640 * @param {number} end The end of the range. 16641 * @param {number} step The value to increment or decrement by. 16642 * @param {boolean} [fromRight] Specify iterating from right to left. 16643 * @returns {Array} Returns the range of numbers. 16644 */ 16645 function baseRange(start, end, step, fromRight) { 16646 var index = -1, 16647 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), 16648 result = Array(length); 16649 16650 while (length--) { 16651 result[fromRight ? length : ++index] = start; 16652 start += step; 16653 } 16654 return result; 16655 } 16656 16657 /** 16658 * The base implementation of `_.repeat` which doesn't coerce arguments. 16659 * 16660 * @private 16661 * @param {string} string The string to repeat. 16662 * @param {number} n The number of times to repeat the string. 16663 * @returns {string} Returns the repeated string. 16664 */ 16665 function baseRepeat(string, n) { 16666 var result = ''; 16667 if (!string || n < 1 || n > MAX_SAFE_INTEGER) { 16668 return result; 16669 } 16670 // Leverage the exponentiation by squaring algorithm for a faster repeat. 16671 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. 16672 do { 16673 if (n % 2) { 16674 result += string; 16675 } 16676 n = nativeFloor(n / 2); 16677 if (n) { 16678 string += string; 16679 } 16680 } while (n); 16681 16682 return result; 16683 } 16684 16685 /** 16686 * The base implementation of `_.rest` which doesn't validate or coerce arguments. 16687 * 16688 * @private 16689 * @param {Function} func The function to apply a rest parameter to. 16690 * @param {number} [start=func.length-1] The start position of the rest parameter. 16691 * @returns {Function} Returns the new function. 16692 */ 16693 function baseRest(func, start) { 16694 return setToString(overRest(func, start, identity), func + ''); 16695 } 16696 16697 /** 16698 * The base implementation of `_.sample`. 16699 * 16700 * @private 16701 * @param {Array|Object} collection The collection to sample. 16702 * @returns {*} Returns the random element. 16703 */ 16704 function baseSample(collection) { 16705 return arraySample(values(collection)); 16706 } 16707 16708 /** 16709 * The base implementation of `_.sampleSize` without param guards. 16710 * 16711 * @private 16712 * @param {Array|Object} collection The collection to sample. 16713 * @param {number} n The number of elements to sample. 16714 * @returns {Array} Returns the random elements. 16715 */ 16716 function baseSampleSize(collection, n) { 16717 var array = values(collection); 16718 return shuffleSelf(array, baseClamp(n, 0, array.length)); 16719 } 16720 16721 /** 16722 * The base implementation of `_.set`. 16723 * 16724 * @private 16725 * @param {Object} object The object to modify. 16726 * @param {Array|string} path The path of the property to set. 16727 * @param {*} value The value to set. 16728 * @param {Function} [customizer] The function to customize path creation. 16729 * @returns {Object} Returns `object`. 16730 */ 16731 function baseSet(object, path, value, customizer) { 16732 if (!isObject(object)) { 16733 return object; 16734 } 16735 path = castPath(path, object); 16736 16737 var index = -1, 16738 length = path.length, 16739 lastIndex = length - 1, 16740 nested = object; 16741 16742 while (nested != null && ++index < length) { 16743 var key = toKey(path[index]), 16744 newValue = value; 16745 16746 if (key === '__proto__' || key === 'constructor' || key === 'prototype') { 16747 return object; 16748 } 16749 16750 if (index != lastIndex) { 16751 var objValue = nested[key]; 16752 newValue = customizer ? customizer(objValue, key, nested) : undefined; 16753 if (newValue === undefined) { 16754 newValue = isObject(objValue) 16755 ? objValue 16756 : (isIndex(path[index + 1]) ? [] : {}); 16757 } 16758 } 16759 assignValue(nested, key, newValue); 16760 nested = nested[key]; 16761 } 16762 return object; 16763 } 16764 16765 /** 16766 * The base implementation of `setData` without support for hot loop shorting. 16767 * 16768 * @private 16769 * @param {Function} func The function to associate metadata with. 16770 * @param {*} data The metadata. 16771 * @returns {Function} Returns `func`. 16772 */ 16773 var baseSetData = !metaMap ? identity : function(func, data) { 16774 metaMap.set(func, data); 16775 return func; 16776 }; 16777 16778 /** 16779 * The base implementation of `setToString` without support for hot loop shorting. 16780 * 16781 * @private 16782 * @param {Function} func The function to modify. 16783 * @param {Function} string The `toString` result. 16784 * @returns {Function} Returns `func`. 16785 */ 16786 var baseSetToString = !defineProperty ? identity : function(func, string) { 16787 return defineProperty(func, 'toString', { 16788 'configurable': true, 16789 'enumerable': false, 16790 'value': constant(string), 16791 'writable': true 16792 }); 16793 }; 16794 16795 /** 16796 * The base implementation of `_.shuffle`. 16797 * 16798 * @private 16799 * @param {Array|Object} collection The collection to shuffle. 16800 * @returns {Array} Returns the new shuffled array. 16801 */ 16802 function baseShuffle(collection) { 16803 return shuffleSelf(values(collection)); 16804 } 16805 16806 /** 16807 * The base implementation of `_.slice` without an iteratee call guard. 16808 * 16809 * @private 16810 * @param {Array} array The array to slice. 16811 * @param {number} [start=0] The start position. 16812 * @param {number} [end=array.length] The end position. 16813 * @returns {Array} Returns the slice of `array`. 16814 */ 16815 function baseSlice(array, start, end) { 16816 var index = -1, 16817 length = array.length; 16818 16819 if (start < 0) { 16820 start = -start > length ? 0 : (length + start); 16821 } 16822 end = end > length ? length : end; 16823 if (end < 0) { 16824 end += length; 16825 } 16826 length = start > end ? 0 : ((end - start) >>> 0); 16827 start >>>= 0; 16828 16829 var result = Array(length); 16830 while (++index < length) { 16831 result[index] = array[index + start]; 16832 } 16833 return result; 16834 } 16835 16836 /** 16837 * The base implementation of `_.some` without support for iteratee shorthands. 16838 * 16839 * @private 16840 * @param {Array|Object} collection The collection to iterate over. 16841 * @param {Function} predicate The function invoked per iteration. 16842 * @returns {boolean} Returns `true` if any element passes the predicate check, 16843 * else `false`. 16844 */ 16845 function baseSome(collection, predicate) { 16846 var result; 16847 16848 baseEach(collection, function(value, index, collection) { 16849 result = predicate(value, index, collection); 16850 return !result; 16851 }); 16852 return !!result; 16853 } 16854 16855 /** 16856 * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which 16857 * performs a binary search of `array` to determine the index at which `value` 16858 * should be inserted into `array` in order to maintain its sort order. 16859 * 16860 * @private 16861 * @param {Array} array The sorted array to inspect. 16862 * @param {*} value The value to evaluate. 16863 * @param {boolean} [retHighest] Specify returning the highest qualified index. 16864 * @returns {number} Returns the index at which `value` should be inserted 16865 * into `array`. 16866 */ 16867 function baseSortedIndex(array, value, retHighest) { 16868 var low = 0, 16869 high = array == null ? low : array.length; 16870 16871 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { 16872 while (low < high) { 16873 var mid = (low + high) >>> 1, 16874 computed = array[mid]; 16875 16876 if (computed !== null && !isSymbol(computed) && 16877 (retHighest ? (computed <= value) : (computed < value))) { 16878 low = mid + 1; 16879 } else { 16880 high = mid; 16881 } 16882 } 16883 return high; 16884 } 16885 return baseSortedIndexBy(array, value, identity, retHighest); 16886 } 16887 16888 /** 16889 * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` 16890 * which invokes `iteratee` for `value` and each element of `array` to compute 16891 * their sort ranking. The iteratee is invoked with one argument; (value). 16892 * 16893 * @private 16894 * @param {Array} array The sorted array to inspect. 16895 * @param {*} value The value to evaluate. 16896 * @param {Function} iteratee The iteratee invoked per element. 16897 * @param {boolean} [retHighest] Specify returning the highest qualified index. 16898 * @returns {number} Returns the index at which `value` should be inserted 16899 * into `array`. 16900 */ 16901 function baseSortedIndexBy(array, value, iteratee, retHighest) { 16902 var low = 0, 16903 high = array == null ? 0 : array.length; 16904 if (high === 0) { 16905 return 0; 16906 } 16907 16908 value = iteratee(value); 16909 var valIsNaN = value !== value, 16910 valIsNull = value === null, 16911 valIsSymbol = isSymbol(value), 16912 valIsUndefined = value === undefined; 16913 16914 while (low < high) { 16915 var mid = nativeFloor((low + high) / 2), 16916 computed = iteratee(array[mid]), 16917 othIsDefined = computed !== undefined, 16918 othIsNull = computed === null, 16919 othIsReflexive = computed === computed, 16920 othIsSymbol = isSymbol(computed); 16921 16922 if (valIsNaN) { 16923 var setLow = retHighest || othIsReflexive; 16924 } else if (valIsUndefined) { 16925 setLow = othIsReflexive && (retHighest || othIsDefined); 16926 } else if (valIsNull) { 16927 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); 16928 } else if (valIsSymbol) { 16929 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); 16930 } else if (othIsNull || othIsSymbol) { 16931 setLow = false; 16932 } else { 16933 setLow = retHighest ? (computed <= value) : (computed < value); 16934 } 16935 if (setLow) { 16936 low = mid + 1; 16937 } else { 16938 high = mid; 16939 } 16940 } 16941 return nativeMin(high, MAX_ARRAY_INDEX); 16942 } 16943 16944 /** 16945 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without 16946 * support for iteratee shorthands. 16947 * 16948 * @private 16949 * @param {Array} array The array to inspect. 16950 * @param {Function} [iteratee] The iteratee invoked per element. 16951 * @returns {Array} Returns the new duplicate free array. 16952 */ 16953 function baseSortedUniq(array, iteratee) { 16954 var index = -1, 16955 length = array.length, 16956 resIndex = 0, 16957 result = []; 16958 16959 while (++index < length) { 16960 var value = array[index], 16961 computed = iteratee ? iteratee(value) : value; 16962 16963 if (!index || !eq(computed, seen)) { 16964 var seen = computed; 16965 result[resIndex++] = value === 0 ? 0 : value; 16966 } 16967 } 16968 return result; 16969 } 16970 16971 /** 16972 * The base implementation of `_.toNumber` which doesn't ensure correct 16973 * conversions of binary, hexadecimal, or octal string values. 16974 * 16975 * @private 16976 * @param {*} value The value to process. 16977 * @returns {number} Returns the number. 16978 */ 16979 function baseToNumber(value) { 16980 if (typeof value == 'number') { 16981 return value; 16982 } 16983 if (isSymbol(value)) { 16984 return NAN; 16985 } 16986 return +value; 16987 } 16988 16989 /** 16990 * The base implementation of `_.toString` which doesn't convert nullish 16991 * values to empty strings. 16992 * 16993 * @private 16994 * @param {*} value The value to process. 16995 * @returns {string} Returns the string. 16996 */ 16997 function baseToString(value) { 16998 // Exit early for strings to avoid a performance hit in some environments. 16999 if (typeof value == 'string') { 17000 return value; 17001 } 17002 if (isArray(value)) { 17003 // Recursively convert values (susceptible to call stack limits). 17004 return arrayMap(value, baseToString) + ''; 17005 } 17006 if (isSymbol(value)) { 17007 return symbolToString ? symbolToString.call(value) : ''; 17008 } 17009 var result = (value + ''); 17010 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; 17011 } 17012 17013 /** 17014 * The base implementation of `_.uniqBy` without support for iteratee shorthands. 17015 * 17016 * @private 17017 * @param {Array} array The array to inspect. 17018 * @param {Function} [iteratee] The iteratee invoked per element. 17019 * @param {Function} [comparator] The comparator invoked per element. 17020 * @returns {Array} Returns the new duplicate free array. 17021 */ 17022 function baseUniq(array, iteratee, comparator) { 17023 var index = -1, 17024 includes = arrayIncludes, 17025 length = array.length, 17026 isCommon = true, 17027 result = [], 17028 seen = result; 17029 17030 if (comparator) { 17031 isCommon = false; 17032 includes = arrayIncludesWith; 17033 } 17034 else if (length >= LARGE_ARRAY_SIZE) { 17035 var set = iteratee ? null : createSet(array); 17036 if (set) { 17037 return setToArray(set); 17038 } 17039 isCommon = false; 17040 includes = cacheHas; 17041 seen = new SetCache; 17042 } 17043 else { 17044 seen = iteratee ? [] : result; 17045 } 17046 outer: 17047 while (++index < length) { 17048 var value = array[index], 17049 computed = iteratee ? iteratee(value) : value; 17050 17051 value = (comparator || value !== 0) ? value : 0; 17052 if (isCommon && computed === computed) { 17053 var seenIndex = seen.length; 17054 while (seenIndex--) { 17055 if (seen[seenIndex] === computed) { 17056 continue outer; 17057 } 17058 } 17059 if (iteratee) { 17060 seen.push(computed); 17061 } 17062 result.push(value); 17063 } 17064 else if (!includes(seen, computed, comparator)) { 17065 if (seen !== result) { 17066 seen.push(computed); 17067 } 17068 result.push(value); 17069 } 17070 } 17071 return result; 17072 } 17073 17074 /** 17075 * The base implementation of `_.unset`. 17076 * 17077 * @private 17078 * @param {Object} object The object to modify. 17079 * @param {Array|string} path The property path to unset. 17080 * @returns {boolean} Returns `true` if the property is deleted, else `false`. 17081 */ 17082 function baseUnset(object, path) { 17083 path = castPath(path, object); 17084 object = parent(object, path); 17085 return object == null || delete object[toKey(last(path))]; 17086 } 17087 17088 /** 17089 * The base implementation of `_.update`. 17090 * 17091 * @private 17092 * @param {Object} object The object to modify. 17093 * @param {Array|string} path The path of the property to update. 17094 * @param {Function} updater The function to produce the updated value. 17095 * @param {Function} [customizer] The function to customize path creation. 17096 * @returns {Object} Returns `object`. 17097 */ 17098 function baseUpdate(object, path, updater, customizer) { 17099 return baseSet(object, path, updater(baseGet(object, path)), customizer); 17100 } 17101 17102 /** 17103 * The base implementation of methods like `_.dropWhile` and `_.takeWhile` 17104 * without support for iteratee shorthands. 17105 * 17106 * @private 17107 * @param {Array} array The array to query. 17108 * @param {Function} predicate The function invoked per iteration. 17109 * @param {boolean} [isDrop] Specify dropping elements instead of taking them. 17110 * @param {boolean} [fromRight] Specify iterating from right to left. 17111 * @returns {Array} Returns the slice of `array`. 17112 */ 17113 function baseWhile(array, predicate, isDrop, fromRight) { 17114 var length = array.length, 17115 index = fromRight ? length : -1; 17116 17117 while ((fromRight ? index-- : ++index < length) && 17118 predicate(array[index], index, array)) {} 17119 17120 return isDrop 17121 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) 17122 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); 17123 } 17124 17125 /** 17126 * The base implementation of `wrapperValue` which returns the result of 17127 * performing a sequence of actions on the unwrapped `value`, where each 17128 * successive action is supplied the return value of the previous. 17129 * 17130 * @private 17131 * @param {*} value The unwrapped value. 17132 * @param {Array} actions Actions to perform to resolve the unwrapped value. 17133 * @returns {*} Returns the resolved value. 17134 */ 17135 function baseWrapperValue(value, actions) { 17136 var result = value; 17137 if (result instanceof LazyWrapper) { 17138 result = result.value(); 17139 } 17140 return arrayReduce(actions, function(result, action) { 17141 return action.func.apply(action.thisArg, arrayPush([result], action.args)); 17142 }, result); 17143 } 17144 17145 /** 17146 * The base implementation of methods like `_.xor`, without support for 17147 * iteratee shorthands, that accepts an array of arrays to inspect. 17148 * 17149 * @private 17150 * @param {Array} arrays The arrays to inspect. 17151 * @param {Function} [iteratee] The iteratee invoked per element. 17152 * @param {Function} [comparator] The comparator invoked per element. 17153 * @returns {Array} Returns the new array of values. 17154 */ 17155 function baseXor(arrays, iteratee, comparator) { 17156 var length = arrays.length; 17157 if (length < 2) { 17158 return length ? baseUniq(arrays[0]) : []; 17159 } 17160 var index = -1, 17161 result = Array(length); 17162 17163 while (++index < length) { 17164 var array = arrays[index], 17165 othIndex = -1; 17166 17167 while (++othIndex < length) { 17168 if (othIndex != index) { 17169 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); 17170 } 17171 } 17172 } 17173 return baseUniq(baseFlatten(result, 1), iteratee, comparator); 17174 } 17175 17176 /** 17177 * This base implementation of `_.zipObject` which assigns values using `assignFunc`. 17178 * 17179 * @private 17180 * @param {Array} props The property identifiers. 17181 * @param {Array} values The property values. 17182 * @param {Function} assignFunc The function to assign values. 17183 * @returns {Object} Returns the new object. 17184 */ 17185 function baseZipObject(props, values, assignFunc) { 17186 var index = -1, 17187 length = props.length, 17188 valsLength = values.length, 17189 result = {}; 17190 17191 while (++index < length) { 17192 var value = index < valsLength ? values[index] : undefined; 17193 assignFunc(result, props[index], value); 17194 } 17195 return result; 17196 } 17197 17198 /** 17199 * Casts `value` to an empty array if it's not an array like object. 17200 * 17201 * @private 17202 * @param {*} value The value to inspect. 17203 * @returns {Array|Object} Returns the cast array-like object. 17204 */ 17205 function castArrayLikeObject(value) { 17206 return isArrayLikeObject(value) ? value : []; 17207 } 17208 17209 /** 17210 * Casts `value` to `identity` if it's not a function. 17211 * 17212 * @private 17213 * @param {*} value The value to inspect. 17214 * @returns {Function} Returns cast function. 17215 */ 17216 function castFunction(value) { 17217 return typeof value == 'function' ? value : identity; 17218 } 17219 17220 /** 17221 * Casts `value` to a path array if it's not one. 17222 * 17223 * @private 17224 * @param {*} value The value to inspect. 17225 * @param {Object} [object] The object to query keys on. 17226 * @returns {Array} Returns the cast property path array. 17227 */ 17228 function castPath(value, object) { 17229 if (isArray(value)) { 17230 return value; 17231 } 17232 return isKey(value, object) ? [value] : stringToPath(toString(value)); 17233 } 17234 17235 /** 17236 * A `baseRest` alias which can be replaced with `identity` by module 17237 * replacement plugins. 17238 * 17239 * @private 17240 * @type {Function} 17241 * @param {Function} func The function to apply a rest parameter to. 17242 * @returns {Function} Returns the new function. 17243 */ 17244 var castRest = baseRest; 17245 17246 /** 17247 * Casts `array` to a slice if it's needed. 17248 * 17249 * @private 17250 * @param {Array} array The array to inspect. 17251 * @param {number} start The start position. 17252 * @param {number} [end=array.length] The end position. 17253 * @returns {Array} Returns the cast slice. 17254 */ 17255 function castSlice(array, start, end) { 17256 var length = array.length; 17257 end = end === undefined ? length : end; 17258 return (!start && end >= length) ? array : baseSlice(array, start, end); 17259 } 17260 17261 /** 17262 * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). 17263 * 17264 * @private 17265 * @param {number|Object} id The timer id or timeout object of the timer to clear. 17266 */ 17267 var clearTimeout = ctxClearTimeout || function(id) { 17268 return root.clearTimeout(id); 17269 }; 17270 17271 /** 17272 * Creates a clone of `buffer`. 17273 * 17274 * @private 17275 * @param {Buffer} buffer The buffer to clone. 17276 * @param {boolean} [isDeep] Specify a deep clone. 17277 * @returns {Buffer} Returns the cloned buffer. 17278 */ 17279 function cloneBuffer(buffer, isDeep) { 17280 if (isDeep) { 17281 return buffer.slice(); 17282 } 17283 var length = buffer.length, 17284 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); 17285 17286 buffer.copy(result); 17287 return result; 17288 } 17289 17290 /** 17291 * Creates a clone of `arrayBuffer`. 17292 * 17293 * @private 17294 * @param {ArrayBuffer} arrayBuffer The array buffer to clone. 17295 * @returns {ArrayBuffer} Returns the cloned array buffer. 17296 */ 17297 function cloneArrayBuffer(arrayBuffer) { 17298 var result = new arrayBuffer.constructor(arrayBuffer.byteLength); 17299 new Uint8Array(result).set(new Uint8Array(arrayBuffer)); 17300 return result; 17301 } 17302 17303 /** 17304 * Creates a clone of `dataView`. 17305 * 17306 * @private 17307 * @param {Object} dataView The data view to clone. 17308 * @param {boolean} [isDeep] Specify a deep clone. 17309 * @returns {Object} Returns the cloned data view. 17310 */ 17311 function cloneDataView(dataView, isDeep) { 17312 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; 17313 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); 17314 } 17315 17316 /** 17317 * Creates a clone of `regexp`. 17318 * 17319 * @private 17320 * @param {Object} regexp The regexp to clone. 17321 * @returns {Object} Returns the cloned regexp. 17322 */ 17323 function cloneRegExp(regexp) { 17324 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); 17325 result.lastIndex = regexp.lastIndex; 17326 return result; 17327 } 17328 17329 /** 17330 * Creates a clone of the `symbol` object. 17331 * 17332 * @private 17333 * @param {Object} symbol The symbol object to clone. 17334 * @returns {Object} Returns the cloned symbol object. 17335 */ 17336 function cloneSymbol(symbol) { 17337 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; 17338 } 17339 17340 /** 17341 * Creates a clone of `typedArray`. 17342 * 17343 * @private 17344 * @param {Object} typedArray The typed array to clone. 17345 * @param {boolean} [isDeep] Specify a deep clone. 17346 * @returns {Object} Returns the cloned typed array. 17347 */ 17348 function cloneTypedArray(typedArray, isDeep) { 17349 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; 17350 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); 17351 } 17352 17353 /** 17354 * Compares values to sort them in ascending order. 17355 * 17356 * @private 17357 * @param {*} value The value to compare. 17358 * @param {*} other The other value to compare. 17359 * @returns {number} Returns the sort order indicator for `value`. 17360 */ 17361 function compareAscending(value, other) { 17362 if (value !== other) { 17363 var valIsDefined = value !== undefined, 17364 valIsNull = value === null, 17365 valIsReflexive = value === value, 17366 valIsSymbol = isSymbol(value); 17367 17368 var othIsDefined = other !== undefined, 17369 othIsNull = other === null, 17370 othIsReflexive = other === other, 17371 othIsSymbol = isSymbol(other); 17372 17373 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || 17374 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || 17375 (valIsNull && othIsDefined && othIsReflexive) || 17376 (!valIsDefined && othIsReflexive) || 17377 !valIsReflexive) { 17378 return 1; 17379 } 17380 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || 17381 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || 17382 (othIsNull && valIsDefined && valIsReflexive) || 17383 (!othIsDefined && valIsReflexive) || 17384 !othIsReflexive) { 17385 return -1; 17386 } 17387 } 17388 return 0; 17389 } 17390 17391 /** 17392 * Used by `_.orderBy` to compare multiple properties of a value to another 17393 * and stable sort them. 17394 * 17395 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, 17396 * specify an order of "desc" for descending or "asc" for ascending sort order 17397 * of corresponding values. 17398 * 17399 * @private 17400 * @param {Object} object The object to compare. 17401 * @param {Object} other The other object to compare. 17402 * @param {boolean[]|string[]} orders The order to sort by for each property. 17403 * @returns {number} Returns the sort order indicator for `object`. 17404 */ 17405 function compareMultiple(object, other, orders) { 17406 var index = -1, 17407 objCriteria = object.criteria, 17408 othCriteria = other.criteria, 17409 length = objCriteria.length, 17410 ordersLength = orders.length; 17411 17412 while (++index < length) { 17413 var result = compareAscending(objCriteria[index], othCriteria[index]); 17414 if (result) { 17415 if (index >= ordersLength) { 17416 return result; 17417 } 17418 var order = orders[index]; 17419 return result * (order == 'desc' ? -1 : 1); 17420 } 17421 } 17422 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications 17423 // that causes it, under certain circumstances, to provide the same value for 17424 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 17425 // for more details. 17426 // 17427 // This also ensures a stable sort in V8 and other engines. 17428 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. 17429 return object.index - other.index; 17430 } 17431 17432 /** 17433 * Creates an array that is the composition of partially applied arguments, 17434 * placeholders, and provided arguments into a single array of arguments. 17435 * 17436 * @private 17437 * @param {Array} args The provided arguments. 17438 * @param {Array} partials The arguments to prepend to those provided. 17439 * @param {Array} holders The `partials` placeholder indexes. 17440 * @params {boolean} [isCurried] Specify composing for a curried function. 17441 * @returns {Array} Returns the new array of composed arguments. 17442 */ 17443 function composeArgs(args, partials, holders, isCurried) { 17444 var argsIndex = -1, 17445 argsLength = args.length, 17446 holdersLength = holders.length, 17447 leftIndex = -1, 17448 leftLength = partials.length, 17449 rangeLength = nativeMax(argsLength - holdersLength, 0), 17450 result = Array(leftLength + rangeLength), 17451 isUncurried = !isCurried; 17452 17453 while (++leftIndex < leftLength) { 17454 result[leftIndex] = partials[leftIndex]; 17455 } 17456 while (++argsIndex < holdersLength) { 17457 if (isUncurried || argsIndex < argsLength) { 17458 result[holders[argsIndex]] = args[argsIndex]; 17459 } 17460 } 17461 while (rangeLength--) { 17462 result[leftIndex++] = args[argsIndex++]; 17463 } 17464 return result; 17465 } 17466 17467 /** 17468 * This function is like `composeArgs` except that the arguments composition 17469 * is tailored for `_.partialRight`. 17470 * 17471 * @private 17472 * @param {Array} args The provided arguments. 17473 * @param {Array} partials The arguments to append to those provided. 17474 * @param {Array} holders The `partials` placeholder indexes. 17475 * @params {boolean} [isCurried] Specify composing for a curried function. 17476 * @returns {Array} Returns the new array of composed arguments. 17477 */ 17478 function composeArgsRight(args, partials, holders, isCurried) { 17479 var argsIndex = -1, 17480 argsLength = args.length, 17481 holdersIndex = -1, 17482 holdersLength = holders.length, 17483 rightIndex = -1, 17484 rightLength = partials.length, 17485 rangeLength = nativeMax(argsLength - holdersLength, 0), 17486 result = Array(rangeLength + rightLength), 17487 isUncurried = !isCurried; 17488 17489 while (++argsIndex < rangeLength) { 17490 result[argsIndex] = args[argsIndex]; 17491 } 17492 var offset = argsIndex; 17493 while (++rightIndex < rightLength) { 17494 result[offset + rightIndex] = partials[rightIndex]; 17495 } 17496 while (++holdersIndex < holdersLength) { 17497 if (isUncurried || argsIndex < argsLength) { 17498 result[offset + holders[holdersIndex]] = args[argsIndex++]; 17499 } 17500 } 17501 return result; 17502 } 17503 17504 /** 17505 * Copies the values of `source` to `array`. 17506 * 17507 * @private 17508 * @param {Array} source The array to copy values from. 17509 * @param {Array} [array=[]] The array to copy values to. 17510 * @returns {Array} Returns `array`. 17511 */ 17512 function copyArray(source, array) { 17513 var index = -1, 17514 length = source.length; 17515 17516 array || (array = Array(length)); 17517 while (++index < length) { 17518 array[index] = source[index]; 17519 } 17520 return array; 17521 } 17522 17523 /** 17524 * Copies properties of `source` to `object`. 17525 * 17526 * @private 17527 * @param {Object} source The object to copy properties from. 17528 * @param {Array} props The property identifiers to copy. 17529 * @param {Object} [object={}] The object to copy properties to. 17530 * @param {Function} [customizer] The function to customize copied values. 17531 * @returns {Object} Returns `object`. 17532 */ 17533 function copyObject(source, props, object, customizer) { 17534 var isNew = !object; 17535 object || (object = {}); 17536 17537 var index = -1, 17538 length = props.length; 17539 17540 while (++index < length) { 17541 var key = props[index]; 17542 17543 var newValue = customizer 17544 ? customizer(object[key], source[key], key, object, source) 17545 : undefined; 17546 17547 if (newValue === undefined) { 17548 newValue = source[key]; 17549 } 17550 if (isNew) { 17551 baseAssignValue(object, key, newValue); 17552 } else { 17553 assignValue(object, key, newValue); 17554 } 17555 } 17556 return object; 17557 } 17558 17559 /** 17560 * Copies own symbols of `source` to `object`. 17561 * 17562 * @private 17563 * @param {Object} source The object to copy symbols from. 17564 * @param {Object} [object={}] The object to copy symbols to. 17565 * @returns {Object} Returns `object`. 17566 */ 17567 function copySymbols(source, object) { 17568 return copyObject(source, getSymbols(source), object); 17569 } 17570 17571 /** 17572 * Copies own and inherited symbols of `source` to `object`. 17573 * 17574 * @private 17575 * @param {Object} source The object to copy symbols from. 17576 * @param {Object} [object={}] The object to copy symbols to. 17577 * @returns {Object} Returns `object`. 17578 */ 17579 function copySymbolsIn(source, object) { 17580 return copyObject(source, getSymbolsIn(source), object); 17581 } 17582 17583 /** 17584 * Creates a function like `_.groupBy`. 17585 * 17586 * @private 17587 * @param {Function} setter The function to set accumulator values. 17588 * @param {Function} [initializer] The accumulator object initializer. 17589 * @returns {Function} Returns the new aggregator function. 17590 */ 17591 function createAggregator(setter, initializer) { 17592 return function(collection, iteratee) { 17593 var func = isArray(collection) ? arrayAggregator : baseAggregator, 17594 accumulator = initializer ? initializer() : {}; 17595 17596 return func(collection, setter, getIteratee(iteratee, 2), accumulator); 17597 }; 17598 } 17599 17600 /** 17601 * Creates a function like `_.assign`. 17602 * 17603 * @private 17604 * @param {Function} assigner The function to assign values. 17605 * @returns {Function} Returns the new assigner function. 17606 */ 17607 function createAssigner(assigner) { 17608 return baseRest(function(object, sources) { 17609 var index = -1, 17610 length = sources.length, 17611 customizer = length > 1 ? sources[length - 1] : undefined, 17612 guard = length > 2 ? sources[2] : undefined; 17613 17614 customizer = (assigner.length > 3 && typeof customizer == 'function') 17615 ? (length--, customizer) 17616 : undefined; 17617 17618 if (guard && isIterateeCall(sources[0], sources[1], guard)) { 17619 customizer = length < 3 ? undefined : customizer; 17620 length = 1; 17621 } 17622 object = Object(object); 17623 while (++index < length) { 17624 var source = sources[index]; 17625 if (source) { 17626 assigner(object, source, index, customizer); 17627 } 17628 } 17629 return object; 17630 }); 17631 } 17632 17633 /** 17634 * Creates a `baseEach` or `baseEachRight` function. 17635 * 17636 * @private 17637 * @param {Function} eachFunc The function to iterate over a collection. 17638 * @param {boolean} [fromRight] Specify iterating from right to left. 17639 * @returns {Function} Returns the new base function. 17640 */ 17641 function createBaseEach(eachFunc, fromRight) { 17642 return function(collection, iteratee) { 17643 if (collection == null) { 17644 return collection; 17645 } 17646 if (!isArrayLike(collection)) { 17647 return eachFunc(collection, iteratee); 17648 } 17649 var length = collection.length, 17650 index = fromRight ? length : -1, 17651 iterable = Object(collection); 17652 17653 while ((fromRight ? index-- : ++index < length)) { 17654 if (iteratee(iterable[index], index, iterable) === false) { 17655 break; 17656 } 17657 } 17658 return collection; 17659 }; 17660 } 17661 17662 /** 17663 * Creates a base function for methods like `_.forIn` and `_.forOwn`. 17664 * 17665 * @private 17666 * @param {boolean} [fromRight] Specify iterating from right to left. 17667 * @returns {Function} Returns the new base function. 17668 */ 17669 function createBaseFor(fromRight) { 17670 return function(object, iteratee, keysFunc) { 17671 var index = -1, 17672 iterable = Object(object), 17673 props = keysFunc(object), 17674 length = props.length; 17675 17676 while (length--) { 17677 var key = props[fromRight ? length : ++index]; 17678 if (iteratee(iterable[key], key, iterable) === false) { 17679 break; 17680 } 17681 } 17682 return object; 17683 }; 17684 } 17685 17686 /** 17687 * Creates a function that wraps `func` to invoke it with the optional `this` 17688 * binding of `thisArg`. 17689 * 17690 * @private 17691 * @param {Function} func The function to wrap. 17692 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 17693 * @param {*} [thisArg] The `this` binding of `func`. 17694 * @returns {Function} Returns the new wrapped function. 17695 */ 17696 function createBind(func, bitmask, thisArg) { 17697 var isBind = bitmask & WRAP_BIND_FLAG, 17698 Ctor = createCtor(func); 17699 17700 function wrapper() { 17701 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 17702 return fn.apply(isBind ? thisArg : this, arguments); 17703 } 17704 return wrapper; 17705 } 17706 17707 /** 17708 * Creates a function like `_.lowerFirst`. 17709 * 17710 * @private 17711 * @param {string} methodName The name of the `String` case method to use. 17712 * @returns {Function} Returns the new case function. 17713 */ 17714 function createCaseFirst(methodName) { 17715 return function(string) { 17716 string = toString(string); 17717 17718 var strSymbols = hasUnicode(string) 17719 ? stringToArray(string) 17720 : undefined; 17721 17722 var chr = strSymbols 17723 ? strSymbols[0] 17724 : string.charAt(0); 17725 17726 var trailing = strSymbols 17727 ? castSlice(strSymbols, 1).join('') 17728 : string.slice(1); 17729 17730 return chr[methodName]() + trailing; 17731 }; 17732 } 17733 17734 /** 17735 * Creates a function like `_.camelCase`. 17736 * 17737 * @private 17738 * @param {Function} callback The function to combine each word. 17739 * @returns {Function} Returns the new compounder function. 17740 */ 17741 function createCompounder(callback) { 17742 return function(string) { 17743 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); 17744 }; 17745 } 17746 17747 /** 17748 * Creates a function that produces an instance of `Ctor` regardless of 17749 * whether it was invoked as part of a `new` expression or by `call` or `apply`. 17750 * 17751 * @private 17752 * @param {Function} Ctor The constructor to wrap. 17753 * @returns {Function} Returns the new wrapped function. 17754 */ 17755 function createCtor(Ctor) { 17756 return function() { 17757 // Use a `switch` statement to work with class constructors. See 17758 // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist 17759 // for more details. 17760 var args = arguments; 17761 switch (args.length) { 17762 case 0: return new Ctor; 17763 case 1: return new Ctor(args[0]); 17764 case 2: return new Ctor(args[0], args[1]); 17765 case 3: return new Ctor(args[0], args[1], args[2]); 17766 case 4: return new Ctor(args[0], args[1], args[2], args[3]); 17767 case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); 17768 case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); 17769 case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); 17770 } 17771 var thisBinding = baseCreate(Ctor.prototype), 17772 result = Ctor.apply(thisBinding, args); 17773 17774 // Mimic the constructor's `return` behavior. 17775 // See https://es5.github.io/#x13.2.2 for more details. 17776 return isObject(result) ? result : thisBinding; 17777 }; 17778 } 17779 17780 /** 17781 * Creates a function that wraps `func` to enable currying. 17782 * 17783 * @private 17784 * @param {Function} func The function to wrap. 17785 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 17786 * @param {number} arity The arity of `func`. 17787 * @returns {Function} Returns the new wrapped function. 17788 */ 17789 function createCurry(func, bitmask, arity) { 17790 var Ctor = createCtor(func); 17791 17792 function wrapper() { 17793 var length = arguments.length, 17794 args = Array(length), 17795 index = length, 17796 placeholder = getHolder(wrapper); 17797 17798 while (index--) { 17799 args[index] = arguments[index]; 17800 } 17801 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) 17802 ? [] 17803 : replaceHolders(args, placeholder); 17804 17805 length -= holders.length; 17806 if (length < arity) { 17807 return createRecurry( 17808 func, bitmask, createHybrid, wrapper.placeholder, undefined, 17809 args, holders, undefined, undefined, arity - length); 17810 } 17811 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 17812 return apply(fn, this, args); 17813 } 17814 return wrapper; 17815 } 17816 17817 /** 17818 * Creates a `_.find` or `_.findLast` function. 17819 * 17820 * @private 17821 * @param {Function} findIndexFunc The function to find the collection index. 17822 * @returns {Function} Returns the new find function. 17823 */ 17824 function createFind(findIndexFunc) { 17825 return function(collection, predicate, fromIndex) { 17826 var iterable = Object(collection); 17827 if (!isArrayLike(collection)) { 17828 var iteratee = getIteratee(predicate, 3); 17829 collection = keys(collection); 17830 predicate = function(key) { return iteratee(iterable[key], key, iterable); }; 17831 } 17832 var index = findIndexFunc(collection, predicate, fromIndex); 17833 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; 17834 }; 17835 } 17836 17837 /** 17838 * Creates a `_.flow` or `_.flowRight` function. 17839 * 17840 * @private 17841 * @param {boolean} [fromRight] Specify iterating from right to left. 17842 * @returns {Function} Returns the new flow function. 17843 */ 17844 function createFlow(fromRight) { 17845 return flatRest(function(funcs) { 17846 var length = funcs.length, 17847 index = length, 17848 prereq = LodashWrapper.prototype.thru; 17849 17850 if (fromRight) { 17851 funcs.reverse(); 17852 } 17853 while (index--) { 17854 var func = funcs[index]; 17855 if (typeof func != 'function') { 17856 throw new TypeError(FUNC_ERROR_TEXT); 17857 } 17858 if (prereq && !wrapper && getFuncName(func) == 'wrapper') { 17859 var wrapper = new LodashWrapper([], true); 17860 } 17861 } 17862 index = wrapper ? index : length; 17863 while (++index < length) { 17864 func = funcs[index]; 17865 17866 var funcName = getFuncName(func), 17867 data = funcName == 'wrapper' ? getData(func) : undefined; 17868 17869 if (data && isLaziable(data[0]) && 17870 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && 17871 !data[4].length && data[9] == 1 17872 ) { 17873 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); 17874 } else { 17875 wrapper = (func.length == 1 && isLaziable(func)) 17876 ? wrapper[funcName]() 17877 : wrapper.thru(func); 17878 } 17879 } 17880 return function() { 17881 var args = arguments, 17882 value = args[0]; 17883 17884 if (wrapper && args.length == 1 && isArray(value)) { 17885 return wrapper.plant(value).value(); 17886 } 17887 var index = 0, 17888 result = length ? funcs[index].apply(this, args) : value; 17889 17890 while (++index < length) { 17891 result = funcs[index].call(this, result); 17892 } 17893 return result; 17894 }; 17895 }); 17896 } 17897 17898 /** 17899 * Creates a function that wraps `func` to invoke it with optional `this` 17900 * binding of `thisArg`, partial application, and currying. 17901 * 17902 * @private 17903 * @param {Function|string} func The function or method name to wrap. 17904 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 17905 * @param {*} [thisArg] The `this` binding of `func`. 17906 * @param {Array} [partials] The arguments to prepend to those provided to 17907 * the new function. 17908 * @param {Array} [holders] The `partials` placeholder indexes. 17909 * @param {Array} [partialsRight] The arguments to append to those provided 17910 * to the new function. 17911 * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. 17912 * @param {Array} [argPos] The argument positions of the new function. 17913 * @param {number} [ary] The arity cap of `func`. 17914 * @param {number} [arity] The arity of `func`. 17915 * @returns {Function} Returns the new wrapped function. 17916 */ 17917 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { 17918 var isAry = bitmask & WRAP_ARY_FLAG, 17919 isBind = bitmask & WRAP_BIND_FLAG, 17920 isBindKey = bitmask & WRAP_BIND_KEY_FLAG, 17921 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), 17922 isFlip = bitmask & WRAP_FLIP_FLAG, 17923 Ctor = isBindKey ? undefined : createCtor(func); 17924 17925 function wrapper() { 17926 var length = arguments.length, 17927 args = Array(length), 17928 index = length; 17929 17930 while (index--) { 17931 args[index] = arguments[index]; 17932 } 17933 if (isCurried) { 17934 var placeholder = getHolder(wrapper), 17935 holdersCount = countHolders(args, placeholder); 17936 } 17937 if (partials) { 17938 args = composeArgs(args, partials, holders, isCurried); 17939 } 17940 if (partialsRight) { 17941 args = composeArgsRight(args, partialsRight, holdersRight, isCurried); 17942 } 17943 length -= holdersCount; 17944 if (isCurried && length < arity) { 17945 var newHolders = replaceHolders(args, placeholder); 17946 return createRecurry( 17947 func, bitmask, createHybrid, wrapper.placeholder, thisArg, 17948 args, newHolders, argPos, ary, arity - length 17949 ); 17950 } 17951 var thisBinding = isBind ? thisArg : this, 17952 fn = isBindKey ? thisBinding[func] : func; 17953 17954 length = args.length; 17955 if (argPos) { 17956 args = reorder(args, argPos); 17957 } else if (isFlip && length > 1) { 17958 args.reverse(); 17959 } 17960 if (isAry && ary < length) { 17961 args.length = ary; 17962 } 17963 if (this && this !== root && this instanceof wrapper) { 17964 fn = Ctor || createCtor(fn); 17965 } 17966 return fn.apply(thisBinding, args); 17967 } 17968 return wrapper; 17969 } 17970 17971 /** 17972 * Creates a function like `_.invertBy`. 17973 * 17974 * @private 17975 * @param {Function} setter The function to set accumulator values. 17976 * @param {Function} toIteratee The function to resolve iteratees. 17977 * @returns {Function} Returns the new inverter function. 17978 */ 17979 function createInverter(setter, toIteratee) { 17980 return function(object, iteratee) { 17981 return baseInverter(object, setter, toIteratee(iteratee), {}); 17982 }; 17983 } 17984 17985 /** 17986 * Creates a function that performs a mathematical operation on two values. 17987 * 17988 * @private 17989 * @param {Function} operator The function to perform the operation. 17990 * @param {number} [defaultValue] The value used for `undefined` arguments. 17991 * @returns {Function} Returns the new mathematical operation function. 17992 */ 17993 function createMathOperation(operator, defaultValue) { 17994 return function(value, other) { 17995 var result; 17996 if (value === undefined && other === undefined) { 17997 return defaultValue; 17998 } 17999 if (value !== undefined) { 18000 result = value; 18001 } 18002 if (other !== undefined) { 18003 if (result === undefined) { 18004 return other; 18005 } 18006 if (typeof value == 'string' || typeof other == 'string') { 18007 value = baseToString(value); 18008 other = baseToString(other); 18009 } else { 18010 value = baseToNumber(value); 18011 other = baseToNumber(other); 18012 } 18013 result = operator(value, other); 18014 } 18015 return result; 18016 }; 18017 } 18018 18019 /** 18020 * Creates a function like `_.over`. 18021 * 18022 * @private 18023 * @param {Function} arrayFunc The function to iterate over iteratees. 18024 * @returns {Function} Returns the new over function. 18025 */ 18026 function createOver(arrayFunc) { 18027 return flatRest(function(iteratees) { 18028 iteratees = arrayMap(iteratees, baseUnary(getIteratee())); 18029 return baseRest(function(args) { 18030 var thisArg = this; 18031 return arrayFunc(iteratees, function(iteratee) { 18032 return apply(iteratee, thisArg, args); 18033 }); 18034 }); 18035 }); 18036 } 18037 18038 /** 18039 * Creates the padding for `string` based on `length`. The `chars` string 18040 * is truncated if the number of characters exceeds `length`. 18041 * 18042 * @private 18043 * @param {number} length The padding length. 18044 * @param {string} [chars=' '] The string used as padding. 18045 * @returns {string} Returns the padding for `string`. 18046 */ 18047 function createPadding(length, chars) { 18048 chars = chars === undefined ? ' ' : baseToString(chars); 18049 18050 var charsLength = chars.length; 18051 if (charsLength < 2) { 18052 return charsLength ? baseRepeat(chars, length) : chars; 18053 } 18054 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); 18055 return hasUnicode(chars) 18056 ? castSlice(stringToArray(result), 0, length).join('') 18057 : result.slice(0, length); 18058 } 18059 18060 /** 18061 * Creates a function that wraps `func` to invoke it with the `this` binding 18062 * of `thisArg` and `partials` prepended to the arguments it receives. 18063 * 18064 * @private 18065 * @param {Function} func The function to wrap. 18066 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 18067 * @param {*} thisArg The `this` binding of `func`. 18068 * @param {Array} partials The arguments to prepend to those provided to 18069 * the new function. 18070 * @returns {Function} Returns the new wrapped function. 18071 */ 18072 function createPartial(func, bitmask, thisArg, partials) { 18073 var isBind = bitmask & WRAP_BIND_FLAG, 18074 Ctor = createCtor(func); 18075 18076 function wrapper() { 18077 var argsIndex = -1, 18078 argsLength = arguments.length, 18079 leftIndex = -1, 18080 leftLength = partials.length, 18081 args = Array(leftLength + argsLength), 18082 fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 18083 18084 while (++leftIndex < leftLength) { 18085 args[leftIndex] = partials[leftIndex]; 18086 } 18087 while (argsLength--) { 18088 args[leftIndex++] = arguments[++argsIndex]; 18089 } 18090 return apply(fn, isBind ? thisArg : this, args); 18091 } 18092 return wrapper; 18093 } 18094 18095 /** 18096 * Creates a `_.range` or `_.rangeRight` function. 18097 * 18098 * @private 18099 * @param {boolean} [fromRight] Specify iterating from right to left. 18100 * @returns {Function} Returns the new range function. 18101 */ 18102 function createRange(fromRight) { 18103 return function(start, end, step) { 18104 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { 18105 end = step = undefined; 18106 } 18107 // Ensure the sign of `-0` is preserved. 18108 start = toFinite(start); 18109 if (end === undefined) { 18110 end = start; 18111 start = 0; 18112 } else { 18113 end = toFinite(end); 18114 } 18115 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); 18116 return baseRange(start, end, step, fromRight); 18117 }; 18118 } 18119 18120 /** 18121 * Creates a function that performs a relational operation on two values. 18122 * 18123 * @private 18124 * @param {Function} operator The function to perform the operation. 18125 * @returns {Function} Returns the new relational operation function. 18126 */ 18127 function createRelationalOperation(operator) { 18128 return function(value, other) { 18129 if (!(typeof value == 'string' && typeof other == 'string')) { 18130 value = toNumber(value); 18131 other = toNumber(other); 18132 } 18133 return operator(value, other); 18134 }; 18135 } 18136 18137 /** 18138 * Creates a function that wraps `func` to continue currying. 18139 * 18140 * @private 18141 * @param {Function} func The function to wrap. 18142 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 18143 * @param {Function} wrapFunc The function to create the `func` wrapper. 18144 * @param {*} placeholder The placeholder value. 18145 * @param {*} [thisArg] The `this` binding of `func`. 18146 * @param {Array} [partials] The arguments to prepend to those provided to 18147 * the new function. 18148 * @param {Array} [holders] The `partials` placeholder indexes. 18149 * @param {Array} [argPos] The argument positions of the new function. 18150 * @param {number} [ary] The arity cap of `func`. 18151 * @param {number} [arity] The arity of `func`. 18152 * @returns {Function} Returns the new wrapped function. 18153 */ 18154 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { 18155 var isCurry = bitmask & WRAP_CURRY_FLAG, 18156 newHolders = isCurry ? holders : undefined, 18157 newHoldersRight = isCurry ? undefined : holders, 18158 newPartials = isCurry ? partials : undefined, 18159 newPartialsRight = isCurry ? undefined : partials; 18160 18161 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); 18162 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); 18163 18164 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { 18165 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); 18166 } 18167 var newData = [ 18168 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, 18169 newHoldersRight, argPos, ary, arity 18170 ]; 18171 18172 var result = wrapFunc.apply(undefined, newData); 18173 if (isLaziable(func)) { 18174 setData(result, newData); 18175 } 18176 result.placeholder = placeholder; 18177 return setWrapToString(result, func, bitmask); 18178 } 18179 18180 /** 18181 * Creates a function like `_.round`. 18182 * 18183 * @private 18184 * @param {string} methodName The name of the `Math` method to use when rounding. 18185 * @returns {Function} Returns the new round function. 18186 */ 18187 function createRound(methodName) { 18188 var func = Math[methodName]; 18189 return function(number, precision) { 18190 number = toNumber(number); 18191 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); 18192 if (precision && nativeIsFinite(number)) { 18193 // Shift with exponential notation to avoid floating-point issues. 18194 // See [MDN](https://mdn.io/round#Examples) for more details. 18195 var pair = (toString(number) + 'e').split('e'), 18196 value = func(pair[0] + 'e' + (+pair[1] + precision)); 18197 18198 pair = (toString(value) + 'e').split('e'); 18199 return +(pair[0] + 'e' + (+pair[1] - precision)); 18200 } 18201 return func(number); 18202 }; 18203 } 18204 18205 /** 18206 * Creates a set object of `values`. 18207 * 18208 * @private 18209 * @param {Array} values The values to add to the set. 18210 * @returns {Object} Returns the new set. 18211 */ 18212 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { 18213 return new Set(values); 18214 }; 18215 18216 /** 18217 * Creates a `_.toPairs` or `_.toPairsIn` function. 18218 * 18219 * @private 18220 * @param {Function} keysFunc The function to get the keys of a given object. 18221 * @returns {Function} Returns the new pairs function. 18222 */ 18223 function createToPairs(keysFunc) { 18224 return function(object) { 18225 var tag = getTag(object); 18226 if (tag == mapTag) { 18227 return mapToArray(object); 18228 } 18229 if (tag == setTag) { 18230 return setToPairs(object); 18231 } 18232 return baseToPairs(object, keysFunc(object)); 18233 }; 18234 } 18235 18236 /** 18237 * Creates a function that either curries or invokes `func` with optional 18238 * `this` binding and partially applied arguments. 18239 * 18240 * @private 18241 * @param {Function|string} func The function or method name to wrap. 18242 * @param {number} bitmask The bitmask flags. 18243 * 1 - `_.bind` 18244 * 2 - `_.bindKey` 18245 * 4 - `_.curry` or `_.curryRight` of a bound function 18246 * 8 - `_.curry` 18247 * 16 - `_.curryRight` 18248 * 32 - `_.partial` 18249 * 64 - `_.partialRight` 18250 * 128 - `_.rearg` 18251 * 256 - `_.ary` 18252 * 512 - `_.flip` 18253 * @param {*} [thisArg] The `this` binding of `func`. 18254 * @param {Array} [partials] The arguments to be partially applied. 18255 * @param {Array} [holders] The `partials` placeholder indexes. 18256 * @param {Array} [argPos] The argument positions of the new function. 18257 * @param {number} [ary] The arity cap of `func`. 18258 * @param {number} [arity] The arity of `func`. 18259 * @returns {Function} Returns the new wrapped function. 18260 */ 18261 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { 18262 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; 18263 if (!isBindKey && typeof func != 'function') { 18264 throw new TypeError(FUNC_ERROR_TEXT); 18265 } 18266 var length = partials ? partials.length : 0; 18267 if (!length) { 18268 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); 18269 partials = holders = undefined; 18270 } 18271 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); 18272 arity = arity === undefined ? arity : toInteger(arity); 18273 length -= holders ? holders.length : 0; 18274 18275 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { 18276 var partialsRight = partials, 18277 holdersRight = holders; 18278 18279 partials = holders = undefined; 18280 } 18281 var data = isBindKey ? undefined : getData(func); 18282 18283 var newData = [ 18284 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, 18285 argPos, ary, arity 18286 ]; 18287 18288 if (data) { 18289 mergeData(newData, data); 18290 } 18291 func = newData[0]; 18292 bitmask = newData[1]; 18293 thisArg = newData[2]; 18294 partials = newData[3]; 18295 holders = newData[4]; 18296 arity = newData[9] = newData[9] === undefined 18297 ? (isBindKey ? 0 : func.length) 18298 : nativeMax(newData[9] - length, 0); 18299 18300 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { 18301 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); 18302 } 18303 if (!bitmask || bitmask == WRAP_BIND_FLAG) { 18304 var result = createBind(func, bitmask, thisArg); 18305 } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { 18306 result = createCurry(func, bitmask, arity); 18307 } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { 18308 result = createPartial(func, bitmask, thisArg, partials); 18309 } else { 18310 result = createHybrid.apply(undefined, newData); 18311 } 18312 var setter = data ? baseSetData : setData; 18313 return setWrapToString(setter(result, newData), func, bitmask); 18314 } 18315 18316 /** 18317 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties 18318 * of source objects to the destination object for all destination properties 18319 * that resolve to `undefined`. 18320 * 18321 * @private 18322 * @param {*} objValue The destination value. 18323 * @param {*} srcValue The source value. 18324 * @param {string} key The key of the property to assign. 18325 * @param {Object} object The parent object of `objValue`. 18326 * @returns {*} Returns the value to assign. 18327 */ 18328 function customDefaultsAssignIn(objValue, srcValue, key, object) { 18329 if (objValue === undefined || 18330 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { 18331 return srcValue; 18332 } 18333 return objValue; 18334 } 18335 18336 /** 18337 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source 18338 * objects into destination objects that are passed thru. 18339 * 18340 * @private 18341 * @param {*} objValue The destination value. 18342 * @param {*} srcValue The source value. 18343 * @param {string} key The key of the property to merge. 18344 * @param {Object} object The parent object of `objValue`. 18345 * @param {Object} source The parent object of `srcValue`. 18346 * @param {Object} [stack] Tracks traversed source values and their merged 18347 * counterparts. 18348 * @returns {*} Returns the value to assign. 18349 */ 18350 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { 18351 if (isObject(objValue) && isObject(srcValue)) { 18352 // Recursively merge objects and arrays (susceptible to call stack limits). 18353 stack.set(srcValue, objValue); 18354 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); 18355 stack['delete'](srcValue); 18356 } 18357 return objValue; 18358 } 18359 18360 /** 18361 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain 18362 * objects. 18363 * 18364 * @private 18365 * @param {*} value The value to inspect. 18366 * @param {string} key The key of the property to inspect. 18367 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. 18368 */ 18369 function customOmitClone(value) { 18370 return isPlainObject(value) ? undefined : value; 18371 } 18372 18373 /** 18374 * A specialized version of `baseIsEqualDeep` for arrays with support for 18375 * partial deep comparisons. 18376 * 18377 * @private 18378 * @param {Array} array The array to compare. 18379 * @param {Array} other The other array to compare. 18380 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 18381 * @param {Function} customizer The function to customize comparisons. 18382 * @param {Function} equalFunc The function to determine equivalents of values. 18383 * @param {Object} stack Tracks traversed `array` and `other` objects. 18384 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. 18385 */ 18386 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { 18387 var isPartial = bitmask & COMPARE_PARTIAL_FLAG, 18388 arrLength = array.length, 18389 othLength = other.length; 18390 18391 if (arrLength != othLength && !(isPartial && othLength > arrLength)) { 18392 return false; 18393 } 18394 // Check that cyclic values are equal. 18395 var arrStacked = stack.get(array); 18396 var othStacked = stack.get(other); 18397 if (arrStacked && othStacked) { 18398 return arrStacked == other && othStacked == array; 18399 } 18400 var index = -1, 18401 result = true, 18402 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; 18403 18404 stack.set(array, other); 18405 stack.set(other, array); 18406 18407 // Ignore non-index properties. 18408 while (++index < arrLength) { 18409 var arrValue = array[index], 18410 othValue = other[index]; 18411 18412 if (customizer) { 18413 var compared = isPartial 18414 ? customizer(othValue, arrValue, index, other, array, stack) 18415 : customizer(arrValue, othValue, index, array, other, stack); 18416 } 18417 if (compared !== undefined) { 18418 if (compared) { 18419 continue; 18420 } 18421 result = false; 18422 break; 18423 } 18424 // Recursively compare arrays (susceptible to call stack limits). 18425 if (seen) { 18426 if (!arraySome(other, function(othValue, othIndex) { 18427 if (!cacheHas(seen, othIndex) && 18428 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { 18429 return seen.push(othIndex); 18430 } 18431 })) { 18432 result = false; 18433 break; 18434 } 18435 } else if (!( 18436 arrValue === othValue || 18437 equalFunc(arrValue, othValue, bitmask, customizer, stack) 18438 )) { 18439 result = false; 18440 break; 18441 } 18442 } 18443 stack['delete'](array); 18444 stack['delete'](other); 18445 return result; 18446 } 18447 18448 /** 18449 * A specialized version of `baseIsEqualDeep` for comparing objects of 18450 * the same `toStringTag`. 18451 * 18452 * **Note:** This function only supports comparing values with tags of 18453 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. 18454 * 18455 * @private 18456 * @param {Object} object The object to compare. 18457 * @param {Object} other The other object to compare. 18458 * @param {string} tag The `toStringTag` of the objects to compare. 18459 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 18460 * @param {Function} customizer The function to customize comparisons. 18461 * @param {Function} equalFunc The function to determine equivalents of values. 18462 * @param {Object} stack Tracks traversed `object` and `other` objects. 18463 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 18464 */ 18465 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { 18466 switch (tag) { 18467 case dataViewTag: 18468 if ((object.byteLength != other.byteLength) || 18469 (object.byteOffset != other.byteOffset)) { 18470 return false; 18471 } 18472 object = object.buffer; 18473 other = other.buffer; 18474 18475 case arrayBufferTag: 18476 if ((object.byteLength != other.byteLength) || 18477 !equalFunc(new Uint8Array(object), new Uint8Array(other))) { 18478 return false; 18479 } 18480 return true; 18481 18482 case boolTag: 18483 case dateTag: 18484 case numberTag: 18485 // Coerce booleans to `1` or `0` and dates to milliseconds. 18486 // Invalid dates are coerced to `NaN`. 18487 return eq(+object, +other); 18488 18489 case errorTag: 18490 return object.name == other.name && object.message == other.message; 18491 18492 case regexpTag: 18493 case stringTag: 18494 // Coerce regexes to strings and treat strings, primitives and objects, 18495 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring 18496 // for more details. 18497 return object == (other + ''); 18498 18499 case mapTag: 18500 var convert = mapToArray; 18501 18502 case setTag: 18503 var isPartial = bitmask & COMPARE_PARTIAL_FLAG; 18504 convert || (convert = setToArray); 18505 18506 if (object.size != other.size && !isPartial) { 18507 return false; 18508 } 18509 // Assume cyclic values are equal. 18510 var stacked = stack.get(object); 18511 if (stacked) { 18512 return stacked == other; 18513 } 18514 bitmask |= COMPARE_UNORDERED_FLAG; 18515 18516 // Recursively compare objects (susceptible to call stack limits). 18517 stack.set(object, other); 18518 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); 18519 stack['delete'](object); 18520 return result; 18521 18522 case symbolTag: 18523 if (symbolValueOf) { 18524 return symbolValueOf.call(object) == symbolValueOf.call(other); 18525 } 18526 } 18527 return false; 18528 } 18529 18530 /** 18531 * A specialized version of `baseIsEqualDeep` for objects with support for 18532 * partial deep comparisons. 18533 * 18534 * @private 18535 * @param {Object} object The object to compare. 18536 * @param {Object} other The other object to compare. 18537 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 18538 * @param {Function} customizer The function to customize comparisons. 18539 * @param {Function} equalFunc The function to determine equivalents of values. 18540 * @param {Object} stack Tracks traversed `object` and `other` objects. 18541 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 18542 */ 18543 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { 18544 var isPartial = bitmask & COMPARE_PARTIAL_FLAG, 18545 objProps = getAllKeys(object), 18546 objLength = objProps.length, 18547 othProps = getAllKeys(other), 18548 othLength = othProps.length; 18549 18550 if (objLength != othLength && !isPartial) { 18551 return false; 18552 } 18553 var index = objLength; 18554 while (index--) { 18555 var key = objProps[index]; 18556 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { 18557 return false; 18558 } 18559 } 18560 // Check that cyclic values are equal. 18561 var objStacked = stack.get(object); 18562 var othStacked = stack.get(other); 18563 if (objStacked && othStacked) { 18564 return objStacked == other && othStacked == object; 18565 } 18566 var result = true; 18567 stack.set(object, other); 18568 stack.set(other, object); 18569 18570 var skipCtor = isPartial; 18571 while (++index < objLength) { 18572 key = objProps[index]; 18573 var objValue = object[key], 18574 othValue = other[key]; 18575 18576 if (customizer) { 18577 var compared = isPartial 18578 ? customizer(othValue, objValue, key, other, object, stack) 18579 : customizer(objValue, othValue, key, object, other, stack); 18580 } 18581 // Recursively compare objects (susceptible to call stack limits). 18582 if (!(compared === undefined 18583 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) 18584 : compared 18585 )) { 18586 result = false; 18587 break; 18588 } 18589 skipCtor || (skipCtor = key == 'constructor'); 18590 } 18591 if (result && !skipCtor) { 18592 var objCtor = object.constructor, 18593 othCtor = other.constructor; 18594 18595 // Non `Object` object instances with different constructors are not equal. 18596 if (objCtor != othCtor && 18597 ('constructor' in object && 'constructor' in other) && 18598 !(typeof objCtor == 'function' && objCtor instanceof objCtor && 18599 typeof othCtor == 'function' && othCtor instanceof othCtor)) { 18600 result = false; 18601 } 18602 } 18603 stack['delete'](object); 18604 stack['delete'](other); 18605 return result; 18606 } 18607 18608 /** 18609 * A specialized version of `baseRest` which flattens the rest array. 18610 * 18611 * @private 18612 * @param {Function} func The function to apply a rest parameter to. 18613 * @returns {Function} Returns the new function. 18614 */ 18615 function flatRest(func) { 18616 return setToString(overRest(func, undefined, flatten), func + ''); 18617 } 18618 18619 /** 18620 * Creates an array of own enumerable property names and symbols of `object`. 18621 * 18622 * @private 18623 * @param {Object} object The object to query. 18624 * @returns {Array} Returns the array of property names and symbols. 18625 */ 18626 function getAllKeys(object) { 18627 return baseGetAllKeys(object, keys, getSymbols); 18628 } 18629 18630 /** 18631 * Creates an array of own and inherited enumerable property names and 18632 * symbols of `object`. 18633 * 18634 * @private 18635 * @param {Object} object The object to query. 18636 * @returns {Array} Returns the array of property names and symbols. 18637 */ 18638 function getAllKeysIn(object) { 18639 return baseGetAllKeys(object, keysIn, getSymbolsIn); 18640 } 18641 18642 /** 18643 * Gets metadata for `func`. 18644 * 18645 * @private 18646 * @param {Function} func The function to query. 18647 * @returns {*} Returns the metadata for `func`. 18648 */ 18649 var getData = !metaMap ? noop : function(func) { 18650 return metaMap.get(func); 18651 }; 18652 18653 /** 18654 * Gets the name of `func`. 18655 * 18656 * @private 18657 * @param {Function} func The function to query. 18658 * @returns {string} Returns the function name. 18659 */ 18660 function getFuncName(func) { 18661 var result = (func.name + ''), 18662 array = realNames[result], 18663 length = hasOwnProperty.call(realNames, result) ? array.length : 0; 18664 18665 while (length--) { 18666 var data = array[length], 18667 otherFunc = data.func; 18668 if (otherFunc == null || otherFunc == func) { 18669 return data.name; 18670 } 18671 } 18672 return result; 18673 } 18674 18675 /** 18676 * Gets the argument placeholder value for `func`. 18677 * 18678 * @private 18679 * @param {Function} func The function to inspect. 18680 * @returns {*} Returns the placeholder value. 18681 */ 18682 function getHolder(func) { 18683 var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; 18684 return object.placeholder; 18685 } 18686 18687 /** 18688 * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, 18689 * this function returns the custom method, otherwise it returns `baseIteratee`. 18690 * If arguments are provided, the chosen function is invoked with them and 18691 * its result is returned. 18692 * 18693 * @private 18694 * @param {*} [value] The value to convert to an iteratee. 18695 * @param {number} [arity] The arity of the created iteratee. 18696 * @returns {Function} Returns the chosen function or its result. 18697 */ 18698 function getIteratee() { 18699 var result = lodash.iteratee || iteratee; 18700 result = result === iteratee ? baseIteratee : result; 18701 return arguments.length ? result(arguments[0], arguments[1]) : result; 18702 } 18703 18704 /** 18705 * Gets the data for `map`. 18706 * 18707 * @private 18708 * @param {Object} map The map to query. 18709 * @param {string} key The reference key. 18710 * @returns {*} Returns the map data. 18711 */ 18712 function getMapData(map, key) { 18713 var data = map.__data__; 18714 return isKeyable(key) 18715 ? data[typeof key == 'string' ? 'string' : 'hash'] 18716 : data.map; 18717 } 18718 18719 /** 18720 * Gets the property names, values, and compare flags of `object`. 18721 * 18722 * @private 18723 * @param {Object} object The object to query. 18724 * @returns {Array} Returns the match data of `object`. 18725 */ 18726 function getMatchData(object) { 18727 var result = keys(object), 18728 length = result.length; 18729 18730 while (length--) { 18731 var key = result[length], 18732 value = object[key]; 18733 18734 result[length] = [key, value, isStrictComparable(value)]; 18735 } 18736 return result; 18737 } 18738 18739 /** 18740 * Gets the native function at `key` of `object`. 18741 * 18742 * @private 18743 * @param {Object} object The object to query. 18744 * @param {string} key The key of the method to get. 18745 * @returns {*} Returns the function if it's native, else `undefined`. 18746 */ 18747 function getNative(object, key) { 18748 var value = getValue(object, key); 18749 return baseIsNative(value) ? value : undefined; 18750 } 18751 18752 /** 18753 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. 18754 * 18755 * @private 18756 * @param {*} value The value to query. 18757 * @returns {string} Returns the raw `toStringTag`. 18758 */ 18759 function getRawTag(value) { 18760 var isOwn = hasOwnProperty.call(value, symToStringTag), 18761 tag = value[symToStringTag]; 18762 18763 try { 18764 value[symToStringTag] = undefined; 18765 var unmasked = true; 18766 } catch (e) {} 18767 18768 var result = nativeObjectToString.call(value); 18769 if (unmasked) { 18770 if (isOwn) { 18771 value[symToStringTag] = tag; 18772 } else { 18773 delete value[symToStringTag]; 18774 } 18775 } 18776 return result; 18777 } 18778 18779 /** 18780 * Creates an array of the own enumerable symbols of `object`. 18781 * 18782 * @private 18783 * @param {Object} object The object to query. 18784 * @returns {Array} Returns the array of symbols. 18785 */ 18786 var getSymbols = !nativeGetSymbols ? stubArray : function(object) { 18787 if (object == null) { 18788 return []; 18789 } 18790 object = Object(object); 18791 return arrayFilter(nativeGetSymbols(object), function(symbol) { 18792 return propertyIsEnumerable.call(object, symbol); 18793 }); 18794 }; 18795 18796 /** 18797 * Creates an array of the own and inherited enumerable symbols of `object`. 18798 * 18799 * @private 18800 * @param {Object} object The object to query. 18801 * @returns {Array} Returns the array of symbols. 18802 */ 18803 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { 18804 var result = []; 18805 while (object) { 18806 arrayPush(result, getSymbols(object)); 18807 object = getPrototype(object); 18808 } 18809 return result; 18810 }; 18811 18812 /** 18813 * Gets the `toStringTag` of `value`. 18814 * 18815 * @private 18816 * @param {*} value The value to query. 18817 * @returns {string} Returns the `toStringTag`. 18818 */ 18819 var getTag = baseGetTag; 18820 18821 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. 18822 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || 18823 (Map && getTag(new Map) != mapTag) || 18824 (Promise && getTag(Promise.resolve()) != promiseTag) || 18825 (Set && getTag(new Set) != setTag) || 18826 (WeakMap && getTag(new WeakMap) != weakMapTag)) { 18827 getTag = function(value) { 18828 var result = baseGetTag(value), 18829 Ctor = result == objectTag ? value.constructor : undefined, 18830 ctorString = Ctor ? toSource(Ctor) : ''; 18831 18832 if (ctorString) { 18833 switch (ctorString) { 18834 case dataViewCtorString: return dataViewTag; 18835 case mapCtorString: return mapTag; 18836 case promiseCtorString: return promiseTag; 18837 case setCtorString: return setTag; 18838 case weakMapCtorString: return weakMapTag; 18839 } 18840 } 18841 return result; 18842 }; 18843 } 18844 18845 /** 18846 * Gets the view, applying any `transforms` to the `start` and `end` positions. 18847 * 18848 * @private 18849 * @param {number} start The start of the view. 18850 * @param {number} end The end of the view. 18851 * @param {Array} transforms The transformations to apply to the view. 18852 * @returns {Object} Returns an object containing the `start` and `end` 18853 * positions of the view. 18854 */ 18855 function getView(start, end, transforms) { 18856 var index = -1, 18857 length = transforms.length; 18858 18859 while (++index < length) { 18860 var data = transforms[index], 18861 size = data.size; 18862 18863 switch (data.type) { 18864 case 'drop': start += size; break; 18865 case 'dropRight': end -= size; break; 18866 case 'take': end = nativeMin(end, start + size); break; 18867 case 'takeRight': start = nativeMax(start, end - size); break; 18868 } 18869 } 18870 return { 'start': start, 'end': end }; 18871 } 18872 18873 /** 18874 * Extracts wrapper details from the `source` body comment. 18875 * 18876 * @private 18877 * @param {string} source The source to inspect. 18878 * @returns {Array} Returns the wrapper details. 18879 */ 18880 function getWrapDetails(source) { 18881 var match = source.match(reWrapDetails); 18882 return match ? match[1].split(reSplitDetails) : []; 18883 } 18884 18885 /** 18886 * Checks if `path` exists on `object`. 18887 * 18888 * @private 18889 * @param {Object} object The object to query. 18890 * @param {Array|string} path The path to check. 18891 * @param {Function} hasFunc The function to check properties. 18892 * @returns {boolean} Returns `true` if `path` exists, else `false`. 18893 */ 18894 function hasPath(object, path, hasFunc) { 18895 path = castPath(path, object); 18896 18897 var index = -1, 18898 length = path.length, 18899 result = false; 18900 18901 while (++index < length) { 18902 var key = toKey(path[index]); 18903 if (!(result = object != null && hasFunc(object, key))) { 18904 break; 18905 } 18906 object = object[key]; 18907 } 18908 if (result || ++index != length) { 18909 return result; 18910 } 18911 length = object == null ? 0 : object.length; 18912 return !!length && isLength(length) && isIndex(key, length) && 18913 (isArray(object) || isArguments(object)); 18914 } 18915 18916 /** 18917 * Initializes an array clone. 18918 * 18919 * @private 18920 * @param {Array} array The array to clone. 18921 * @returns {Array} Returns the initialized clone. 18922 */ 18923 function initCloneArray(array) { 18924 var length = array.length, 18925 result = new array.constructor(length); 18926 18927 // Add properties assigned by `RegExp#exec`. 18928 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { 18929 result.index = array.index; 18930 result.input = array.input; 18931 } 18932 return result; 18933 } 18934 18935 /** 18936 * Initializes an object clone. 18937 * 18938 * @private 18939 * @param {Object} object The object to clone. 18940 * @returns {Object} Returns the initialized clone. 18941 */ 18942 function initCloneObject(object) { 18943 return (typeof object.constructor == 'function' && !isPrototype(object)) 18944 ? baseCreate(getPrototype(object)) 18945 : {}; 18946 } 18947 18948 /** 18949 * Initializes an object clone based on its `toStringTag`. 18950 * 18951 * **Note:** This function only supports cloning values with tags of 18952 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. 18953 * 18954 * @private 18955 * @param {Object} object The object to clone. 18956 * @param {string} tag The `toStringTag` of the object to clone. 18957 * @param {boolean} [isDeep] Specify a deep clone. 18958 * @returns {Object} Returns the initialized clone. 18959 */ 18960 function initCloneByTag(object, tag, isDeep) { 18961 var Ctor = object.constructor; 18962 switch (tag) { 18963 case arrayBufferTag: 18964 return cloneArrayBuffer(object); 18965 18966 case boolTag: 18967 case dateTag: 18968 return new Ctor(+object); 18969 18970 case dataViewTag: 18971 return cloneDataView(object, isDeep); 18972 18973 case float32Tag: case float64Tag: 18974 case int8Tag: case int16Tag: case int32Tag: 18975 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: 18976 return cloneTypedArray(object, isDeep); 18977 18978 case mapTag: 18979 return new Ctor; 18980 18981 case numberTag: 18982 case stringTag: 18983 return new Ctor(object); 18984 18985 case regexpTag: 18986 return cloneRegExp(object); 18987 18988 case setTag: 18989 return new Ctor; 18990 18991 case symbolTag: 18992 return cloneSymbol(object); 18993 } 18994 } 18995 18996 /** 18997 * Inserts wrapper `details` in a comment at the top of the `source` body. 18998 * 18999 * @private 19000 * @param {string} source The source to modify. 19001 * @returns {Array} details The details to insert. 19002 * @returns {string} Returns the modified source. 19003 */ 19004 function insertWrapDetails(source, details) { 19005 var length = details.length; 19006 if (!length) { 19007 return source; 19008 } 19009 var lastIndex = length - 1; 19010 details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; 19011 details = details.join(length > 2 ? ', ' : ' '); 19012 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); 19013 } 19014 19015 /** 19016 * Checks if `value` is a flattenable `arguments` object or array. 19017 * 19018 * @private 19019 * @param {*} value The value to check. 19020 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. 19021 */ 19022 function isFlattenable(value) { 19023 return isArray(value) || isArguments(value) || 19024 !!(spreadableSymbol && value && value[spreadableSymbol]); 19025 } 19026 19027 /** 19028 * Checks if `value` is a valid array-like index. 19029 * 19030 * @private 19031 * @param {*} value The value to check. 19032 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. 19033 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. 19034 */ 19035 function isIndex(value, length) { 19036 var type = typeof value; 19037 length = length == null ? MAX_SAFE_INTEGER : length; 19038 19039 return !!length && 19040 (type == 'number' || 19041 (type != 'symbol' && reIsUint.test(value))) && 19042 (value > -1 && value % 1 == 0 && value < length); 19043 } 19044 19045 /** 19046 * Checks if the given arguments are from an iteratee call. 19047 * 19048 * @private 19049 * @param {*} value The potential iteratee value argument. 19050 * @param {*} index The potential iteratee index or key argument. 19051 * @param {*} object The potential iteratee object argument. 19052 * @returns {boolean} Returns `true` if the arguments are from an iteratee call, 19053 * else `false`. 19054 */ 19055 function isIterateeCall(value, index, object) { 19056 if (!isObject(object)) { 19057 return false; 19058 } 19059 var type = typeof index; 19060 if (type == 'number' 19061 ? (isArrayLike(object) && isIndex(index, object.length)) 19062 : (type == 'string' && index in object) 19063 ) { 19064 return eq(object[index], value); 19065 } 19066 return false; 19067 } 19068 19069 /** 19070 * Checks if `value` is a property name and not a property path. 19071 * 19072 * @private 19073 * @param {*} value The value to check. 19074 * @param {Object} [object] The object to query keys on. 19075 * @returns {boolean} Returns `true` if `value` is a property name, else `false`. 19076 */ 19077 function isKey(value, object) { 19078 if (isArray(value)) { 19079 return false; 19080 } 19081 var type = typeof value; 19082 if (type == 'number' || type == 'symbol' || type == 'boolean' || 19083 value == null || isSymbol(value)) { 19084 return true; 19085 } 19086 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || 19087 (object != null && value in Object(object)); 19088 } 19089 19090 /** 19091 * Checks if `value` is suitable for use as unique object key. 19092 * 19093 * @private 19094 * @param {*} value The value to check. 19095 * @returns {boolean} Returns `true` if `value` is suitable, else `false`. 19096 */ 19097 function isKeyable(value) { 19098 var type = typeof value; 19099 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') 19100 ? (value !== '__proto__') 19101 : (value === null); 19102 } 19103 19104 /** 19105 * Checks if `func` has a lazy counterpart. 19106 * 19107 * @private 19108 * @param {Function} func The function to check. 19109 * @returns {boolean} Returns `true` if `func` has a lazy counterpart, 19110 * else `false`. 19111 */ 19112 function isLaziable(func) { 19113 var funcName = getFuncName(func), 19114 other = lodash[funcName]; 19115 19116 if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { 19117 return false; 19118 } 19119 if (func === other) { 19120 return true; 19121 } 19122 var data = getData(other); 19123 return !!data && func === data[0]; 19124 } 19125 19126 /** 19127 * Checks if `func` has its source masked. 19128 * 19129 * @private 19130 * @param {Function} func The function to check. 19131 * @returns {boolean} Returns `true` if `func` is masked, else `false`. 19132 */ 19133 function isMasked(func) { 19134 return !!maskSrcKey && (maskSrcKey in func); 19135 } 19136 19137 /** 19138 * Checks if `func` is capable of being masked. 19139 * 19140 * @private 19141 * @param {*} value The value to check. 19142 * @returns {boolean} Returns `true` if `func` is maskable, else `false`. 19143 */ 19144 var isMaskable = coreJsData ? isFunction : stubFalse; 19145 19146 /** 19147 * Checks if `value` is likely a prototype object. 19148 * 19149 * @private 19150 * @param {*} value The value to check. 19151 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. 19152 */ 19153 function isPrototype(value) { 19154 var Ctor = value && value.constructor, 19155 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; 19156 19157 return value === proto; 19158 } 19159 19160 /** 19161 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. 19162 * 19163 * @private 19164 * @param {*} value The value to check. 19165 * @returns {boolean} Returns `true` if `value` if suitable for strict 19166 * equality comparisons, else `false`. 19167 */ 19168 function isStrictComparable(value) { 19169 return value === value && !isObject(value); 19170 } 19171 19172 /** 19173 * A specialized version of `matchesProperty` for source values suitable 19174 * for strict equality comparisons, i.e. `===`. 19175 * 19176 * @private 19177 * @param {string} key The key of the property to get. 19178 * @param {*} srcValue The value to match. 19179 * @returns {Function} Returns the new spec function. 19180 */ 19181 function matchesStrictComparable(key, srcValue) { 19182 return function(object) { 19183 if (object == null) { 19184 return false; 19185 } 19186 return object[key] === srcValue && 19187 (srcValue !== undefined || (key in Object(object))); 19188 }; 19189 } 19190 19191 /** 19192 * A specialized version of `_.memoize` which clears the memoized function's 19193 * cache when it exceeds `MAX_MEMOIZE_SIZE`. 19194 * 19195 * @private 19196 * @param {Function} func The function to have its output memoized. 19197 * @returns {Function} Returns the new memoized function. 19198 */ 19199 function memoizeCapped(func) { 19200 var result = memoize(func, function(key) { 19201 if (cache.size === MAX_MEMOIZE_SIZE) { 19202 cache.clear(); 19203 } 19204 return key; 19205 }); 19206 19207 var cache = result.cache; 19208 return result; 19209 } 19210 19211 /** 19212 * Merges the function metadata of `source` into `data`. 19213 * 19214 * Merging metadata reduces the number of wrappers used to invoke a function. 19215 * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` 19216 * may be applied regardless of execution order. Methods like `_.ary` and 19217 * `_.rearg` modify function arguments, making the order in which they are 19218 * executed important, preventing the merging of metadata. However, we make 19219 * an exception for a safe combined case where curried functions have `_.ary` 19220 * and or `_.rearg` applied. 19221 * 19222 * @private 19223 * @param {Array} data The destination metadata. 19224 * @param {Array} source The source metadata. 19225 * @returns {Array} Returns `data`. 19226 */ 19227 function mergeData(data, source) { 19228 var bitmask = data[1], 19229 srcBitmask = source[1], 19230 newBitmask = bitmask | srcBitmask, 19231 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); 19232 19233 var isCombo = 19234 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || 19235 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || 19236 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); 19237 19238 // Exit early if metadata can't be merged. 19239 if (!(isCommon || isCombo)) { 19240 return data; 19241 } 19242 // Use source `thisArg` if available. 19243 if (srcBitmask & WRAP_BIND_FLAG) { 19244 data[2] = source[2]; 19245 // Set when currying a bound function. 19246 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; 19247 } 19248 // Compose partial arguments. 19249 var value = source[3]; 19250 if (value) { 19251 var partials = data[3]; 19252 data[3] = partials ? composeArgs(partials, value, source[4]) : value; 19253 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; 19254 } 19255 // Compose partial right arguments. 19256 value = source[5]; 19257 if (value) { 19258 partials = data[5]; 19259 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; 19260 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; 19261 } 19262 // Use source `argPos` if available. 19263 value = source[7]; 19264 if (value) { 19265 data[7] = value; 19266 } 19267 // Use source `ary` if it's smaller. 19268 if (srcBitmask & WRAP_ARY_FLAG) { 19269 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); 19270 } 19271 // Use source `arity` if one is not provided. 19272 if (data[9] == null) { 19273 data[9] = source[9]; 19274 } 19275 // Use source `func` and merge bitmasks. 19276 data[0] = source[0]; 19277 data[1] = newBitmask; 19278 19279 return data; 19280 } 19281 19282 /** 19283 * This function is like 19284 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) 19285 * except that it includes inherited enumerable properties. 19286 * 19287 * @private 19288 * @param {Object} object The object to query. 19289 * @returns {Array} Returns the array of property names. 19290 */ 19291 function nativeKeysIn(object) { 19292 var result = []; 19293 if (object != null) { 19294 for (var key in Object(object)) { 19295 result.push(key); 19296 } 19297 } 19298 return result; 19299 } 19300 19301 /** 19302 * Converts `value` to a string using `Object.prototype.toString`. 19303 * 19304 * @private 19305 * @param {*} value The value to convert. 19306 * @returns {string} Returns the converted string. 19307 */ 19308 function objectToString(value) { 19309 return nativeObjectToString.call(value); 19310 } 19311 19312 /** 19313 * A specialized version of `baseRest` which transforms the rest array. 19314 * 19315 * @private 19316 * @param {Function} func The function to apply a rest parameter to. 19317 * @param {number} [start=func.length-1] The start position of the rest parameter. 19318 * @param {Function} transform The rest array transform. 19319 * @returns {Function} Returns the new function. 19320 */ 19321 function overRest(func, start, transform) { 19322 start = nativeMax(start === undefined ? (func.length - 1) : start, 0); 19323 return function() { 19324 var args = arguments, 19325 index = -1, 19326 length = nativeMax(args.length - start, 0), 19327 array = Array(length); 19328 19329 while (++index < length) { 19330 array[index] = args[start + index]; 19331 } 19332 index = -1; 19333 var otherArgs = Array(start + 1); 19334 while (++index < start) { 19335 otherArgs[index] = args[index]; 19336 } 19337 otherArgs[start] = transform(array); 19338 return apply(func, this, otherArgs); 19339 }; 19340 } 19341 19342 /** 19343 * Gets the parent value at `path` of `object`. 19344 * 19345 * @private 19346 * @param {Object} object The object to query. 19347 * @param {Array} path The path to get the parent value of. 19348 * @returns {*} Returns the parent value. 19349 */ 19350 function parent(object, path) { 19351 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); 19352 } 19353 19354 /** 19355 * Reorder `array` according to the specified indexes where the element at 19356 * the first index is assigned as the first element, the element at 19357 * the second index is assigned as the second element, and so on. 19358 * 19359 * @private 19360 * @param {Array} array The array to reorder. 19361 * @param {Array} indexes The arranged array indexes. 19362 * @returns {Array} Returns `array`. 19363 */ 19364 function reorder(array, indexes) { 19365 var arrLength = array.length, 19366 length = nativeMin(indexes.length, arrLength), 19367 oldArray = copyArray(array); 19368 19369 while (length--) { 19370 var index = indexes[length]; 19371 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; 19372 } 19373 return array; 19374 } 19375 19376 /** 19377 * Gets the value at `key`, unless `key` is "__proto__" or "constructor". 19378 * 19379 * @private 19380 * @param {Object} object The object to query. 19381 * @param {string} key The key of the property to get. 19382 * @returns {*} Returns the property value. 19383 */ 19384 function safeGet(object, key) { 19385 if (key === 'constructor' && typeof object[key] === 'function') { 19386 return; 19387 } 19388 19389 if (key == '__proto__') { 19390 return; 19391 } 19392 19393 return object[key]; 19394 } 19395 19396 /** 19397 * Sets metadata for `func`. 19398 * 19399 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short 19400 * period of time, it will trip its breaker and transition to an identity 19401 * function to avoid garbage collection pauses in V8. See 19402 * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) 19403 * for more details. 19404 * 19405 * @private 19406 * @param {Function} func The function to associate metadata with. 19407 * @param {*} data The metadata. 19408 * @returns {Function} Returns `func`. 19409 */ 19410 var setData = shortOut(baseSetData); 19411 19412 /** 19413 * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). 19414 * 19415 * @private 19416 * @param {Function} func The function to delay. 19417 * @param {number} wait The number of milliseconds to delay invocation. 19418 * @returns {number|Object} Returns the timer id or timeout object. 19419 */ 19420 var setTimeout = ctxSetTimeout || function(func, wait) { 19421 return root.setTimeout(func, wait); 19422 }; 19423 19424 /** 19425 * Sets the `toString` method of `func` to return `string`. 19426 * 19427 * @private 19428 * @param {Function} func The function to modify. 19429 * @param {Function} string The `toString` result. 19430 * @returns {Function} Returns `func`. 19431 */ 19432 var setToString = shortOut(baseSetToString); 19433 19434 /** 19435 * Sets the `toString` method of `wrapper` to mimic the source of `reference` 19436 * with wrapper details in a comment at the top of the source body. 19437 * 19438 * @private 19439 * @param {Function} wrapper The function to modify. 19440 * @param {Function} reference The reference function. 19441 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 19442 * @returns {Function} Returns `wrapper`. 19443 */ 19444 function setWrapToString(wrapper, reference, bitmask) { 19445 var source = (reference + ''); 19446 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); 19447 } 19448 19449 /** 19450 * Creates a function that'll short out and invoke `identity` instead 19451 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` 19452 * milliseconds. 19453 * 19454 * @private 19455 * @param {Function} func The function to restrict. 19456 * @returns {Function} Returns the new shortable function. 19457 */ 19458 function shortOut(func) { 19459 var count = 0, 19460 lastCalled = 0; 19461 19462 return function() { 19463 var stamp = nativeNow(), 19464 remaining = HOT_SPAN - (stamp - lastCalled); 19465 19466 lastCalled = stamp; 19467 if (remaining > 0) { 19468 if (++count >= HOT_COUNT) { 19469 return arguments[0]; 19470 } 19471 } else { 19472 count = 0; 19473 } 19474 return func.apply(undefined, arguments); 19475 }; 19476 } 19477 19478 /** 19479 * A specialized version of `_.shuffle` which mutates and sets the size of `array`. 19480 * 19481 * @private 19482 * @param {Array} array The array to shuffle. 19483 * @param {number} [size=array.length] The size of `array`. 19484 * @returns {Array} Returns `array`. 19485 */ 19486 function shuffleSelf(array, size) { 19487 var index = -1, 19488 length = array.length, 19489 lastIndex = length - 1; 19490 19491 size = size === undefined ? length : size; 19492 while (++index < size) { 19493 var rand = baseRandom(index, lastIndex), 19494 value = array[rand]; 19495 19496 array[rand] = array[index]; 19497 array[index] = value; 19498 } 19499 array.length = size; 19500 return array; 19501 } 19502 19503 /** 19504 * Converts `string` to a property path array. 19505 * 19506 * @private 19507 * @param {string} string The string to convert. 19508 * @returns {Array} Returns the property path array. 19509 */ 19510 var stringToPath = memoizeCapped(function(string) { 19511 var result = []; 19512 if (string.charCodeAt(0) === 46 /* . */) { 19513 result.push(''); 19514 } 19515 string.replace(rePropName, function(match, number, quote, subString) { 19516 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); 19517 }); 19518 return result; 19519 }); 19520 19521 /** 19522 * Converts `value` to a string key if it's not a string or symbol. 19523 * 19524 * @private 19525 * @param {*} value The value to inspect. 19526 * @returns {string|symbol} Returns the key. 19527 */ 19528 function toKey(value) { 19529 if (typeof value == 'string' || isSymbol(value)) { 19530 return value; 19531 } 19532 var result = (value + ''); 19533 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; 19534 } 19535 19536 /** 19537 * Converts `func` to its source code. 19538 * 19539 * @private 19540 * @param {Function} func The function to convert. 19541 * @returns {string} Returns the source code. 19542 */ 19543 function toSource(func) { 19544 if (func != null) { 19545 try { 19546 return funcToString.call(func); 19547 } catch (e) {} 19548 try { 19549 return (func + ''); 19550 } catch (e) {} 19551 } 19552 return ''; 19553 } 19554 19555 /** 19556 * Updates wrapper `details` based on `bitmask` flags. 19557 * 19558 * @private 19559 * @returns {Array} details The details to modify. 19560 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 19561 * @returns {Array} Returns `details`. 19562 */ 19563 function updateWrapDetails(details, bitmask) { 19564 arrayEach(wrapFlags, function(pair) { 19565 var value = '_.' + pair[0]; 19566 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { 19567 details.push(value); 19568 } 19569 }); 19570 return details.sort(); 19571 } 19572 19573 /** 19574 * Creates a clone of `wrapper`. 19575 * 19576 * @private 19577 * @param {Object} wrapper The wrapper to clone. 19578 * @returns {Object} Returns the cloned wrapper. 19579 */ 19580 function wrapperClone(wrapper) { 19581 if (wrapper instanceof LazyWrapper) { 19582 return wrapper.clone(); 19583 } 19584 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); 19585 result.__actions__ = copyArray(wrapper.__actions__); 19586 result.__index__ = wrapper.__index__; 19587 result.__values__ = wrapper.__values__; 19588 return result; 19589 } 19590 19591 /*------------------------------------------------------------------------*/ 19592 19593 /** 19594 * Creates an array of elements split into groups the length of `size`. 19595 * If `array` can't be split evenly, the final chunk will be the remaining 19596 * elements. 19597 * 19598 * @static 19599 * @memberOf _ 19600 * @since 3.0.0 19601 * @category Array 19602 * @param {Array} array The array to process. 19603 * @param {number} [size=1] The length of each chunk 19604 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 19605 * @returns {Array} Returns the new array of chunks. 19606 * @example 19607 * 19608 * _.chunk(['a', 'b', 'c', 'd'], 2); 19609 * // => [['a', 'b'], ['c', 'd']] 19610 * 19611 * _.chunk(['a', 'b', 'c', 'd'], 3); 19612 * // => [['a', 'b', 'c'], ['d']] 19613 */ 19614 function chunk(array, size, guard) { 19615 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { 19616 size = 1; 19617 } else { 19618 size = nativeMax(toInteger(size), 0); 19619 } 19620 var length = array == null ? 0 : array.length; 19621 if (!length || size < 1) { 19622 return []; 19623 } 19624 var index = 0, 19625 resIndex = 0, 19626 result = Array(nativeCeil(length / size)); 19627 19628 while (index < length) { 19629 result[resIndex++] = baseSlice(array, index, (index += size)); 19630 } 19631 return result; 19632 } 19633 19634 /** 19635 * Creates an array with all falsey values removed. The values `false`, `null`, 19636 * `0`, `""`, `undefined`, and `NaN` are falsey. 19637 * 19638 * @static 19639 * @memberOf _ 19640 * @since 0.1.0 19641 * @category Array 19642 * @param {Array} array The array to compact. 19643 * @returns {Array} Returns the new array of filtered values. 19644 * @example 19645 * 19646 * _.compact([0, 1, false, 2, '', 3]); 19647 * // => [1, 2, 3] 19648 */ 19649 function compact(array) { 19650 var index = -1, 19651 length = array == null ? 0 : array.length, 19652 resIndex = 0, 19653 result = []; 19654 19655 while (++index < length) { 19656 var value = array[index]; 19657 if (value) { 19658 result[resIndex++] = value; 19659 } 19660 } 19661 return result; 19662 } 19663 19664 /** 19665 * Creates a new array concatenating `array` with any additional arrays 19666 * and/or values. 19667 * 19668 * @static 19669 * @memberOf _ 19670 * @since 4.0.0 19671 * @category Array 19672 * @param {Array} array The array to concatenate. 19673 * @param {...*} [values] The values to concatenate. 19674 * @returns {Array} Returns the new concatenated array. 19675 * @example 19676 * 19677 * var array = [1]; 19678 * var other = _.concat(array, 2, [3], [[4]]); 19679 * 19680 * console.log(other); 19681 * // => [1, 2, 3, [4]] 19682 * 19683 * console.log(array); 19684 * // => [1] 19685 */ 19686 function concat() { 19687 var length = arguments.length; 19688 if (!length) { 19689 return []; 19690 } 19691 var args = Array(length - 1), 19692 array = arguments[0], 19693 index = length; 19694 19695 while (index--) { 19696 args[index - 1] = arguments[index]; 19697 } 19698 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); 19699 } 19700 19701 /** 19702 * Creates an array of `array` values not included in the other given arrays 19703 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 19704 * for equality comparisons. The order and references of result values are 19705 * determined by the first array. 19706 * 19707 * **Note:** Unlike `_.pullAll`, this method returns a new array. 19708 * 19709 * @static 19710 * @memberOf _ 19711 * @since 0.1.0 19712 * @category Array 19713 * @param {Array} array The array to inspect. 19714 * @param {...Array} [values] The values to exclude. 19715 * @returns {Array} Returns the new array of filtered values. 19716 * @see _.without, _.xor 19717 * @example 19718 * 19719 * _.difference([2, 1], [2, 3]); 19720 * // => [1] 19721 */ 19722 var difference = baseRest(function(array, values) { 19723 return isArrayLikeObject(array) 19724 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) 19725 : []; 19726 }); 19727 19728 /** 19729 * This method is like `_.difference` except that it accepts `iteratee` which 19730 * is invoked for each element of `array` and `values` to generate the criterion 19731 * by which they're compared. The order and references of result values are 19732 * determined by the first array. The iteratee is invoked with one argument: 19733 * (value). 19734 * 19735 * **Note:** Unlike `_.pullAllBy`, this method returns a new array. 19736 * 19737 * @static 19738 * @memberOf _ 19739 * @since 4.0.0 19740 * @category Array 19741 * @param {Array} array The array to inspect. 19742 * @param {...Array} [values] The values to exclude. 19743 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 19744 * @returns {Array} Returns the new array of filtered values. 19745 * @example 19746 * 19747 * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); 19748 * // => [1.2] 19749 * 19750 * // The `_.property` iteratee shorthand. 19751 * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); 19752 * // => [{ 'x': 2 }] 19753 */ 19754 var differenceBy = baseRest(function(array, values) { 19755 var iteratee = last(values); 19756 if (isArrayLikeObject(iteratee)) { 19757 iteratee = undefined; 19758 } 19759 return isArrayLikeObject(array) 19760 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) 19761 : []; 19762 }); 19763 19764 /** 19765 * This method is like `_.difference` except that it accepts `comparator` 19766 * which is invoked to compare elements of `array` to `values`. The order and 19767 * references of result values are determined by the first array. The comparator 19768 * is invoked with two arguments: (arrVal, othVal). 19769 * 19770 * **Note:** Unlike `_.pullAllWith`, this method returns a new array. 19771 * 19772 * @static 19773 * @memberOf _ 19774 * @since 4.0.0 19775 * @category Array 19776 * @param {Array} array The array to inspect. 19777 * @param {...Array} [values] The values to exclude. 19778 * @param {Function} [comparator] The comparator invoked per element. 19779 * @returns {Array} Returns the new array of filtered values. 19780 * @example 19781 * 19782 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 19783 * 19784 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); 19785 * // => [{ 'x': 2, 'y': 1 }] 19786 */ 19787 var differenceWith = baseRest(function(array, values) { 19788 var comparator = last(values); 19789 if (isArrayLikeObject(comparator)) { 19790 comparator = undefined; 19791 } 19792 return isArrayLikeObject(array) 19793 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) 19794 : []; 19795 }); 19796 19797 /** 19798 * Creates a slice of `array` with `n` elements dropped from the beginning. 19799 * 19800 * @static 19801 * @memberOf _ 19802 * @since 0.5.0 19803 * @category Array 19804 * @param {Array} array The array to query. 19805 * @param {number} [n=1] The number of elements to drop. 19806 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 19807 * @returns {Array} Returns the slice of `array`. 19808 * @example 19809 * 19810 * _.drop([1, 2, 3]); 19811 * // => [2, 3] 19812 * 19813 * _.drop([1, 2, 3], 2); 19814 * // => [3] 19815 * 19816 * _.drop([1, 2, 3], 5); 19817 * // => [] 19818 * 19819 * _.drop([1, 2, 3], 0); 19820 * // => [1, 2, 3] 19821 */ 19822 function drop(array, n, guard) { 19823 var length = array == null ? 0 : array.length; 19824 if (!length) { 19825 return []; 19826 } 19827 n = (guard || n === undefined) ? 1 : toInteger(n); 19828 return baseSlice(array, n < 0 ? 0 : n, length); 19829 } 19830 19831 /** 19832 * Creates a slice of `array` with `n` elements dropped from the end. 19833 * 19834 * @static 19835 * @memberOf _ 19836 * @since 3.0.0 19837 * @category Array 19838 * @param {Array} array The array to query. 19839 * @param {number} [n=1] The number of elements to drop. 19840 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 19841 * @returns {Array} Returns the slice of `array`. 19842 * @example 19843 * 19844 * _.dropRight([1, 2, 3]); 19845 * // => [1, 2] 19846 * 19847 * _.dropRight([1, 2, 3], 2); 19848 * // => [1] 19849 * 19850 * _.dropRight([1, 2, 3], 5); 19851 * // => [] 19852 * 19853 * _.dropRight([1, 2, 3], 0); 19854 * // => [1, 2, 3] 19855 */ 19856 function dropRight(array, n, guard) { 19857 var length = array == null ? 0 : array.length; 19858 if (!length) { 19859 return []; 19860 } 19861 n = (guard || n === undefined) ? 1 : toInteger(n); 19862 n = length - n; 19863 return baseSlice(array, 0, n < 0 ? 0 : n); 19864 } 19865 19866 /** 19867 * Creates a slice of `array` excluding elements dropped from the end. 19868 * Elements are dropped until `predicate` returns falsey. The predicate is 19869 * invoked with three arguments: (value, index, array). 19870 * 19871 * @static 19872 * @memberOf _ 19873 * @since 3.0.0 19874 * @category Array 19875 * @param {Array} array The array to query. 19876 * @param {Function} [predicate=_.identity] The function invoked per iteration. 19877 * @returns {Array} Returns the slice of `array`. 19878 * @example 19879 * 19880 * var users = [ 19881 * { 'user': 'barney', 'active': true }, 19882 * { 'user': 'fred', 'active': false }, 19883 * { 'user': 'pebbles', 'active': false } 19884 * ]; 19885 * 19886 * _.dropRightWhile(users, function(o) { return !o.active; }); 19887 * // => objects for ['barney'] 19888 * 19889 * // The `_.matches` iteratee shorthand. 19890 * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); 19891 * // => objects for ['barney', 'fred'] 19892 * 19893 * // The `_.matchesProperty` iteratee shorthand. 19894 * _.dropRightWhile(users, ['active', false]); 19895 * // => objects for ['barney'] 19896 * 19897 * // The `_.property` iteratee shorthand. 19898 * _.dropRightWhile(users, 'active'); 19899 * // => objects for ['barney', 'fred', 'pebbles'] 19900 */ 19901 function dropRightWhile(array, predicate) { 19902 return (array && array.length) 19903 ? baseWhile(array, getIteratee(predicate, 3), true, true) 19904 : []; 19905 } 19906 19907 /** 19908 * Creates a slice of `array` excluding elements dropped from the beginning. 19909 * Elements are dropped until `predicate` returns falsey. The predicate is 19910 * invoked with three arguments: (value, index, array). 19911 * 19912 * @static 19913 * @memberOf _ 19914 * @since 3.0.0 19915 * @category Array 19916 * @param {Array} array The array to query. 19917 * @param {Function} [predicate=_.identity] The function invoked per iteration. 19918 * @returns {Array} Returns the slice of `array`. 19919 * @example 19920 * 19921 * var users = [ 19922 * { 'user': 'barney', 'active': false }, 19923 * { 'user': 'fred', 'active': false }, 19924 * { 'user': 'pebbles', 'active': true } 19925 * ]; 19926 * 19927 * _.dropWhile(users, function(o) { return !o.active; }); 19928 * // => objects for ['pebbles'] 19929 * 19930 * // The `_.matches` iteratee shorthand. 19931 * _.dropWhile(users, { 'user': 'barney', 'active': false }); 19932 * // => objects for ['fred', 'pebbles'] 19933 * 19934 * // The `_.matchesProperty` iteratee shorthand. 19935 * _.dropWhile(users, ['active', false]); 19936 * // => objects for ['pebbles'] 19937 * 19938 * // The `_.property` iteratee shorthand. 19939 * _.dropWhile(users, 'active'); 19940 * // => objects for ['barney', 'fred', 'pebbles'] 19941 */ 19942 function dropWhile(array, predicate) { 19943 return (array && array.length) 19944 ? baseWhile(array, getIteratee(predicate, 3), true) 19945 : []; 19946 } 19947 19948 /** 19949 * Fills elements of `array` with `value` from `start` up to, but not 19950 * including, `end`. 19951 * 19952 * **Note:** This method mutates `array`. 19953 * 19954 * @static 19955 * @memberOf _ 19956 * @since 3.2.0 19957 * @category Array 19958 * @param {Array} array The array to fill. 19959 * @param {*} value The value to fill `array` with. 19960 * @param {number} [start=0] The start position. 19961 * @param {number} [end=array.length] The end position. 19962 * @returns {Array} Returns `array`. 19963 * @example 19964 * 19965 * var array = [1, 2, 3]; 19966 * 19967 * _.fill(array, 'a'); 19968 * console.log(array); 19969 * // => ['a', 'a', 'a'] 19970 * 19971 * _.fill(Array(3), 2); 19972 * // => [2, 2, 2] 19973 * 19974 * _.fill([4, 6, 8, 10], '*', 1, 3); 19975 * // => [4, '*', '*', 10] 19976 */ 19977 function fill(array, value, start, end) { 19978 var length = array == null ? 0 : array.length; 19979 if (!length) { 19980 return []; 19981 } 19982 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { 19983 start = 0; 19984 end = length; 19985 } 19986 return baseFill(array, value, start, end); 19987 } 19988 19989 /** 19990 * This method is like `_.find` except that it returns the index of the first 19991 * element `predicate` returns truthy for instead of the element itself. 19992 * 19993 * @static 19994 * @memberOf _ 19995 * @since 1.1.0 19996 * @category Array 19997 * @param {Array} array The array to inspect. 19998 * @param {Function} [predicate=_.identity] The function invoked per iteration. 19999 * @param {number} [fromIndex=0] The index to search from. 20000 * @returns {number} Returns the index of the found element, else `-1`. 20001 * @example 20002 * 20003 * var users = [ 20004 * { 'user': 'barney', 'active': false }, 20005 * { 'user': 'fred', 'active': false }, 20006 * { 'user': 'pebbles', 'active': true } 20007 * ]; 20008 * 20009 * _.findIndex(users, function(o) { return o.user == 'barney'; }); 20010 * // => 0 20011 * 20012 * // The `_.matches` iteratee shorthand. 20013 * _.findIndex(users, { 'user': 'fred', 'active': false }); 20014 * // => 1 20015 * 20016 * // The `_.matchesProperty` iteratee shorthand. 20017 * _.findIndex(users, ['active', false]); 20018 * // => 0 20019 * 20020 * // The `_.property` iteratee shorthand. 20021 * _.findIndex(users, 'active'); 20022 * // => 2 20023 */ 20024 function findIndex(array, predicate, fromIndex) { 20025 var length = array == null ? 0 : array.length; 20026 if (!length) { 20027 return -1; 20028 } 20029 var index = fromIndex == null ? 0 : toInteger(fromIndex); 20030 if (index < 0) { 20031 index = nativeMax(length + index, 0); 20032 } 20033 return baseFindIndex(array, getIteratee(predicate, 3), index); 20034 } 20035 20036 /** 20037 * This method is like `_.findIndex` except that it iterates over elements 20038 * of `collection` from right to left. 20039 * 20040 * @static 20041 * @memberOf _ 20042 * @since 2.0.0 20043 * @category Array 20044 * @param {Array} array The array to inspect. 20045 * @param {Function} [predicate=_.identity] The function invoked per iteration. 20046 * @param {number} [fromIndex=array.length-1] The index to search from. 20047 * @returns {number} Returns the index of the found element, else `-1`. 20048 * @example 20049 * 20050 * var users = [ 20051 * { 'user': 'barney', 'active': true }, 20052 * { 'user': 'fred', 'active': false }, 20053 * { 'user': 'pebbles', 'active': false } 20054 * ]; 20055 * 20056 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); 20057 * // => 2 20058 * 20059 * // The `_.matches` iteratee shorthand. 20060 * _.findLastIndex(users, { 'user': 'barney', 'active': true }); 20061 * // => 0 20062 * 20063 * // The `_.matchesProperty` iteratee shorthand. 20064 * _.findLastIndex(users, ['active', false]); 20065 * // => 2 20066 * 20067 * // The `_.property` iteratee shorthand. 20068 * _.findLastIndex(users, 'active'); 20069 * // => 0 20070 */ 20071 function findLastIndex(array, predicate, fromIndex) { 20072 var length = array == null ? 0 : array.length; 20073 if (!length) { 20074 return -1; 20075 } 20076 var index = length - 1; 20077 if (fromIndex !== undefined) { 20078 index = toInteger(fromIndex); 20079 index = fromIndex < 0 20080 ? nativeMax(length + index, 0) 20081 : nativeMin(index, length - 1); 20082 } 20083 return baseFindIndex(array, getIteratee(predicate, 3), index, true); 20084 } 20085 20086 /** 20087 * Flattens `array` a single level deep. 20088 * 20089 * @static 20090 * @memberOf _ 20091 * @since 0.1.0 20092 * @category Array 20093 * @param {Array} array The array to flatten. 20094 * @returns {Array} Returns the new flattened array. 20095 * @example 20096 * 20097 * _.flatten([1, [2, [3, [4]], 5]]); 20098 * // => [1, 2, [3, [4]], 5] 20099 */ 20100 function flatten(array) { 20101 var length = array == null ? 0 : array.length; 20102 return length ? baseFlatten(array, 1) : []; 20103 } 20104 20105 /** 20106 * Recursively flattens `array`. 20107 * 20108 * @static 20109 * @memberOf _ 20110 * @since 3.0.0 20111 * @category Array 20112 * @param {Array} array The array to flatten. 20113 * @returns {Array} Returns the new flattened array. 20114 * @example 20115 * 20116 * _.flattenDeep([1, [2, [3, [4]], 5]]); 20117 * // => [1, 2, 3, 4, 5] 20118 */ 20119 function flattenDeep(array) { 20120 var length = array == null ? 0 : array.length; 20121 return length ? baseFlatten(array, INFINITY) : []; 20122 } 20123 20124 /** 20125 * Recursively flatten `array` up to `depth` times. 20126 * 20127 * @static 20128 * @memberOf _ 20129 * @since 4.4.0 20130 * @category Array 20131 * @param {Array} array The array to flatten. 20132 * @param {number} [depth=1] The maximum recursion depth. 20133 * @returns {Array} Returns the new flattened array. 20134 * @example 20135 * 20136 * var array = [1, [2, [3, [4]], 5]]; 20137 * 20138 * _.flattenDepth(array, 1); 20139 * // => [1, 2, [3, [4]], 5] 20140 * 20141 * _.flattenDepth(array, 2); 20142 * // => [1, 2, 3, [4], 5] 20143 */ 20144 function flattenDepth(array, depth) { 20145 var length = array == null ? 0 : array.length; 20146 if (!length) { 20147 return []; 20148 } 20149 depth = depth === undefined ? 1 : toInteger(depth); 20150 return baseFlatten(array, depth); 20151 } 20152 20153 /** 20154 * The inverse of `_.toPairs`; this method returns an object composed 20155 * from key-value `pairs`. 20156 * 20157 * @static 20158 * @memberOf _ 20159 * @since 4.0.0 20160 * @category Array 20161 * @param {Array} pairs The key-value pairs. 20162 * @returns {Object} Returns the new object. 20163 * @example 20164 * 20165 * _.fromPairs([['a', 1], ['b', 2]]); 20166 * // => { 'a': 1, 'b': 2 } 20167 */ 20168 function fromPairs(pairs) { 20169 var index = -1, 20170 length = pairs == null ? 0 : pairs.length, 20171 result = {}; 20172 20173 while (++index < length) { 20174 var pair = pairs[index]; 20175 result[pair[0]] = pair[1]; 20176 } 20177 return result; 20178 } 20179 20180 /** 20181 * Gets the first element of `array`. 20182 * 20183 * @static 20184 * @memberOf _ 20185 * @since 0.1.0 20186 * @alias first 20187 * @category Array 20188 * @param {Array} array The array to query. 20189 * @returns {*} Returns the first element of `array`. 20190 * @example 20191 * 20192 * _.head([1, 2, 3]); 20193 * // => 1 20194 * 20195 * _.head([]); 20196 * // => undefined 20197 */ 20198 function head(array) { 20199 return (array && array.length) ? array[0] : undefined; 20200 } 20201 20202 /** 20203 * Gets the index at which the first occurrence of `value` is found in `array` 20204 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 20205 * for equality comparisons. If `fromIndex` is negative, it's used as the 20206 * offset from the end of `array`. 20207 * 20208 * @static 20209 * @memberOf _ 20210 * @since 0.1.0 20211 * @category Array 20212 * @param {Array} array The array to inspect. 20213 * @param {*} value The value to search for. 20214 * @param {number} [fromIndex=0] The index to search from. 20215 * @returns {number} Returns the index of the matched value, else `-1`. 20216 * @example 20217 * 20218 * _.indexOf([1, 2, 1, 2], 2); 20219 * // => 1 20220 * 20221 * // Search from the `fromIndex`. 20222 * _.indexOf([1, 2, 1, 2], 2, 2); 20223 * // => 3 20224 */ 20225 function indexOf(array, value, fromIndex) { 20226 var length = array == null ? 0 : array.length; 20227 if (!length) { 20228 return -1; 20229 } 20230 var index = fromIndex == null ? 0 : toInteger(fromIndex); 20231 if (index < 0) { 20232 index = nativeMax(length + index, 0); 20233 } 20234 return baseIndexOf(array, value, index); 20235 } 20236 20237 /** 20238 * Gets all but the last element of `array`. 20239 * 20240 * @static 20241 * @memberOf _ 20242 * @since 0.1.0 20243 * @category Array 20244 * @param {Array} array The array to query. 20245 * @returns {Array} Returns the slice of `array`. 20246 * @example 20247 * 20248 * _.initial([1, 2, 3]); 20249 * // => [1, 2] 20250 */ 20251 function initial(array) { 20252 var length = array == null ? 0 : array.length; 20253 return length ? baseSlice(array, 0, -1) : []; 20254 } 20255 20256 /** 20257 * Creates an array of unique values that are included in all given arrays 20258 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 20259 * for equality comparisons. The order and references of result values are 20260 * determined by the first array. 20261 * 20262 * @static 20263 * @memberOf _ 20264 * @since 0.1.0 20265 * @category Array 20266 * @param {...Array} [arrays] The arrays to inspect. 20267 * @returns {Array} Returns the new array of intersecting values. 20268 * @example 20269 * 20270 * _.intersection([2, 1], [2, 3]); 20271 * // => [2] 20272 */ 20273 var intersection = baseRest(function(arrays) { 20274 var mapped = arrayMap(arrays, castArrayLikeObject); 20275 return (mapped.length && mapped[0] === arrays[0]) 20276 ? baseIntersection(mapped) 20277 : []; 20278 }); 20279 20280 /** 20281 * This method is like `_.intersection` except that it accepts `iteratee` 20282 * which is invoked for each element of each `arrays` to generate the criterion 20283 * by which they're compared. The order and references of result values are 20284 * determined by the first array. The iteratee is invoked with one argument: 20285 * (value). 20286 * 20287 * @static 20288 * @memberOf _ 20289 * @since 4.0.0 20290 * @category Array 20291 * @param {...Array} [arrays] The arrays to inspect. 20292 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 20293 * @returns {Array} Returns the new array of intersecting values. 20294 * @example 20295 * 20296 * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); 20297 * // => [2.1] 20298 * 20299 * // The `_.property` iteratee shorthand. 20300 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 20301 * // => [{ 'x': 1 }] 20302 */ 20303 var intersectionBy = baseRest(function(arrays) { 20304 var iteratee = last(arrays), 20305 mapped = arrayMap(arrays, castArrayLikeObject); 20306 20307 if (iteratee === last(mapped)) { 20308 iteratee = undefined; 20309 } else { 20310 mapped.pop(); 20311 } 20312 return (mapped.length && mapped[0] === arrays[0]) 20313 ? baseIntersection(mapped, getIteratee(iteratee, 2)) 20314 : []; 20315 }); 20316 20317 /** 20318 * This method is like `_.intersection` except that it accepts `comparator` 20319 * which is invoked to compare elements of `arrays`. The order and references 20320 * of result values are determined by the first array. The comparator is 20321 * invoked with two arguments: (arrVal, othVal). 20322 * 20323 * @static 20324 * @memberOf _ 20325 * @since 4.0.0 20326 * @category Array 20327 * @param {...Array} [arrays] The arrays to inspect. 20328 * @param {Function} [comparator] The comparator invoked per element. 20329 * @returns {Array} Returns the new array of intersecting values. 20330 * @example 20331 * 20332 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 20333 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 20334 * 20335 * _.intersectionWith(objects, others, _.isEqual); 20336 * // => [{ 'x': 1, 'y': 2 }] 20337 */ 20338 var intersectionWith = baseRest(function(arrays) { 20339 var comparator = last(arrays), 20340 mapped = arrayMap(arrays, castArrayLikeObject); 20341 20342 comparator = typeof comparator == 'function' ? comparator : undefined; 20343 if (comparator) { 20344 mapped.pop(); 20345 } 20346 return (mapped.length && mapped[0] === arrays[0]) 20347 ? baseIntersection(mapped, undefined, comparator) 20348 : []; 20349 }); 20350 20351 /** 20352 * Converts all elements in `array` into a string separated by `separator`. 20353 * 20354 * @static 20355 * @memberOf _ 20356 * @since 4.0.0 20357 * @category Array 20358 * @param {Array} array The array to convert. 20359 * @param {string} [separator=','] The element separator. 20360 * @returns {string} Returns the joined string. 20361 * @example 20362 * 20363 * _.join(['a', 'b', 'c'], '~'); 20364 * // => 'a~b~c' 20365 */ 20366 function join(array, separator) { 20367 return array == null ? '' : nativeJoin.call(array, separator); 20368 } 20369 20370 /** 20371 * Gets the last element of `array`. 20372 * 20373 * @static 20374 * @memberOf _ 20375 * @since 0.1.0 20376 * @category Array 20377 * @param {Array} array The array to query. 20378 * @returns {*} Returns the last element of `array`. 20379 * @example 20380 * 20381 * _.last([1, 2, 3]); 20382 * // => 3 20383 */ 20384 function last(array) { 20385 var length = array == null ? 0 : array.length; 20386 return length ? array[length - 1] : undefined; 20387 } 20388 20389 /** 20390 * This method is like `_.indexOf` except that it iterates over elements of 20391 * `array` from right to left. 20392 * 20393 * @static 20394 * @memberOf _ 20395 * @since 0.1.0 20396 * @category Array 20397 * @param {Array} array The array to inspect. 20398 * @param {*} value The value to search for. 20399 * @param {number} [fromIndex=array.length-1] The index to search from. 20400 * @returns {number} Returns the index of the matched value, else `-1`. 20401 * @example 20402 * 20403 * _.lastIndexOf([1, 2, 1, 2], 2); 20404 * // => 3 20405 * 20406 * // Search from the `fromIndex`. 20407 * _.lastIndexOf([1, 2, 1, 2], 2, 2); 20408 * // => 1 20409 */ 20410 function lastIndexOf(array, value, fromIndex) { 20411 var length = array == null ? 0 : array.length; 20412 if (!length) { 20413 return -1; 20414 } 20415 var index = length; 20416 if (fromIndex !== undefined) { 20417 index = toInteger(fromIndex); 20418 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); 20419 } 20420 return value === value 20421 ? strictLastIndexOf(array, value, index) 20422 : baseFindIndex(array, baseIsNaN, index, true); 20423 } 20424 20425 /** 20426 * Gets the element at index `n` of `array`. If `n` is negative, the nth 20427 * element from the end is returned. 20428 * 20429 * @static 20430 * @memberOf _ 20431 * @since 4.11.0 20432 * @category Array 20433 * @param {Array} array The array to query. 20434 * @param {number} [n=0] The index of the element to return. 20435 * @returns {*} Returns the nth element of `array`. 20436 * @example 20437 * 20438 * var array = ['a', 'b', 'c', 'd']; 20439 * 20440 * _.nth(array, 1); 20441 * // => 'b' 20442 * 20443 * _.nth(array, -2); 20444 * // => 'c'; 20445 */ 20446 function nth(array, n) { 20447 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; 20448 } 20449 20450 /** 20451 * Removes all given values from `array` using 20452 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 20453 * for equality comparisons. 20454 * 20455 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` 20456 * to remove elements from an array by predicate. 20457 * 20458 * @static 20459 * @memberOf _ 20460 * @since 2.0.0 20461 * @category Array 20462 * @param {Array} array The array to modify. 20463 * @param {...*} [values] The values to remove. 20464 * @returns {Array} Returns `array`. 20465 * @example 20466 * 20467 * var array = ['a', 'b', 'c', 'a', 'b', 'c']; 20468 * 20469 * _.pull(array, 'a', 'c'); 20470 * console.log(array); 20471 * // => ['b', 'b'] 20472 */ 20473 var pull = baseRest(pullAll); 20474 20475 /** 20476 * This method is like `_.pull` except that it accepts an array of values to remove. 20477 * 20478 * **Note:** Unlike `_.difference`, this method mutates `array`. 20479 * 20480 * @static 20481 * @memberOf _ 20482 * @since 4.0.0 20483 * @category Array 20484 * @param {Array} array The array to modify. 20485 * @param {Array} values The values to remove. 20486 * @returns {Array} Returns `array`. 20487 * @example 20488 * 20489 * var array = ['a', 'b', 'c', 'a', 'b', 'c']; 20490 * 20491 * _.pullAll(array, ['a', 'c']); 20492 * console.log(array); 20493 * // => ['b', 'b'] 20494 */ 20495 function pullAll(array, values) { 20496 return (array && array.length && values && values.length) 20497 ? basePullAll(array, values) 20498 : array; 20499 } 20500 20501 /** 20502 * This method is like `_.pullAll` except that it accepts `iteratee` which is 20503 * invoked for each element of `array` and `values` to generate the criterion 20504 * by which they're compared. The iteratee is invoked with one argument: (value). 20505 * 20506 * **Note:** Unlike `_.differenceBy`, this method mutates `array`. 20507 * 20508 * @static 20509 * @memberOf _ 20510 * @since 4.0.0 20511 * @category Array 20512 * @param {Array} array The array to modify. 20513 * @param {Array} values The values to remove. 20514 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 20515 * @returns {Array} Returns `array`. 20516 * @example 20517 * 20518 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; 20519 * 20520 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); 20521 * console.log(array); 20522 * // => [{ 'x': 2 }] 20523 */ 20524 function pullAllBy(array, values, iteratee) { 20525 return (array && array.length && values && values.length) 20526 ? basePullAll(array, values, getIteratee(iteratee, 2)) 20527 : array; 20528 } 20529 20530 /** 20531 * This method is like `_.pullAll` except that it accepts `comparator` which 20532 * is invoked to compare elements of `array` to `values`. The comparator is 20533 * invoked with two arguments: (arrVal, othVal). 20534 * 20535 * **Note:** Unlike `_.differenceWith`, this method mutates `array`. 20536 * 20537 * @static 20538 * @memberOf _ 20539 * @since 4.6.0 20540 * @category Array 20541 * @param {Array} array The array to modify. 20542 * @param {Array} values The values to remove. 20543 * @param {Function} [comparator] The comparator invoked per element. 20544 * @returns {Array} Returns `array`. 20545 * @example 20546 * 20547 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; 20548 * 20549 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); 20550 * console.log(array); 20551 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] 20552 */ 20553 function pullAllWith(array, values, comparator) { 20554 return (array && array.length && values && values.length) 20555 ? basePullAll(array, values, undefined, comparator) 20556 : array; 20557 } 20558 20559 /** 20560 * Removes elements from `array` corresponding to `indexes` and returns an 20561 * array of removed elements. 20562 * 20563 * **Note:** Unlike `_.at`, this method mutates `array`. 20564 * 20565 * @static 20566 * @memberOf _ 20567 * @since 3.0.0 20568 * @category Array 20569 * @param {Array} array The array to modify. 20570 * @param {...(number|number[])} [indexes] The indexes of elements to remove. 20571 * @returns {Array} Returns the new array of removed elements. 20572 * @example 20573 * 20574 * var array = ['a', 'b', 'c', 'd']; 20575 * var pulled = _.pullAt(array, [1, 3]); 20576 * 20577 * console.log(array); 20578 * // => ['a', 'c'] 20579 * 20580 * console.log(pulled); 20581 * // => ['b', 'd'] 20582 */ 20583 var pullAt = flatRest(function(array, indexes) { 20584 var length = array == null ? 0 : array.length, 20585 result = baseAt(array, indexes); 20586 20587 basePullAt(array, arrayMap(indexes, function(index) { 20588 return isIndex(index, length) ? +index : index; 20589 }).sort(compareAscending)); 20590 20591 return result; 20592 }); 20593 20594 /** 20595 * Removes all elements from `array` that `predicate` returns truthy for 20596 * and returns an array of the removed elements. The predicate is invoked 20597 * with three arguments: (value, index, array). 20598 * 20599 * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` 20600 * to pull elements from an array by value. 20601 * 20602 * @static 20603 * @memberOf _ 20604 * @since 2.0.0 20605 * @category Array 20606 * @param {Array} array The array to modify. 20607 * @param {Function} [predicate=_.identity] The function invoked per iteration. 20608 * @returns {Array} Returns the new array of removed elements. 20609 * @example 20610 * 20611 * var array = [1, 2, 3, 4]; 20612 * var evens = _.remove(array, function(n) { 20613 * return n % 2 == 0; 20614 * }); 20615 * 20616 * console.log(array); 20617 * // => [1, 3] 20618 * 20619 * console.log(evens); 20620 * // => [2, 4] 20621 */ 20622 function remove(array, predicate) { 20623 var result = []; 20624 if (!(array && array.length)) { 20625 return result; 20626 } 20627 var index = -1, 20628 indexes = [], 20629 length = array.length; 20630 20631 predicate = getIteratee(predicate, 3); 20632 while (++index < length) { 20633 var value = array[index]; 20634 if (predicate(value, index, array)) { 20635 result.push(value); 20636 indexes.push(index); 20637 } 20638 } 20639 basePullAt(array, indexes); 20640 return result; 20641 } 20642 20643 /** 20644 * Reverses `array` so that the first element becomes the last, the second 20645 * element becomes the second to last, and so on. 20646 * 20647 * **Note:** This method mutates `array` and is based on 20648 * [`Array#reverse`](https://mdn.io/Array/reverse). 20649 * 20650 * @static 20651 * @memberOf _ 20652 * @since 4.0.0 20653 * @category Array 20654 * @param {Array} array The array to modify. 20655 * @returns {Array} Returns `array`. 20656 * @example 20657 * 20658 * var array = [1, 2, 3]; 20659 * 20660 * _.reverse(array); 20661 * // => [3, 2, 1] 20662 * 20663 * console.log(array); 20664 * // => [3, 2, 1] 20665 */ 20666 function reverse(array) { 20667 return array == null ? array : nativeReverse.call(array); 20668 } 20669 20670 /** 20671 * Creates a slice of `array` from `start` up to, but not including, `end`. 20672 * 20673 * **Note:** This method is used instead of 20674 * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are 20675 * returned. 20676 * 20677 * @static 20678 * @memberOf _ 20679 * @since 3.0.0 20680 * @category Array 20681 * @param {Array} array The array to slice. 20682 * @param {number} [start=0] The start position. 20683 * @param {number} [end=array.length] The end position. 20684 * @returns {Array} Returns the slice of `array`. 20685 */ 20686 function slice(array, start, end) { 20687 var length = array == null ? 0 : array.length; 20688 if (!length) { 20689 return []; 20690 } 20691 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { 20692 start = 0; 20693 end = length; 20694 } 20695 else { 20696 start = start == null ? 0 : toInteger(start); 20697 end = end === undefined ? length : toInteger(end); 20698 } 20699 return baseSlice(array, start, end); 20700 } 20701 20702 /** 20703 * Uses a binary search to determine the lowest index at which `value` 20704 * should be inserted into `array` in order to maintain its sort order. 20705 * 20706 * @static 20707 * @memberOf _ 20708 * @since 0.1.0 20709 * @category Array 20710 * @param {Array} array The sorted array to inspect. 20711 * @param {*} value The value to evaluate. 20712 * @returns {number} Returns the index at which `value` should be inserted 20713 * into `array`. 20714 * @example 20715 * 20716 * _.sortedIndex([30, 50], 40); 20717 * // => 1 20718 */ 20719 function sortedIndex(array, value) { 20720 return baseSortedIndex(array, value); 20721 } 20722 20723 /** 20724 * This method is like `_.sortedIndex` except that it accepts `iteratee` 20725 * which is invoked for `value` and each element of `array` to compute their 20726 * sort ranking. The iteratee is invoked with one argument: (value). 20727 * 20728 * @static 20729 * @memberOf _ 20730 * @since 4.0.0 20731 * @category Array 20732 * @param {Array} array The sorted array to inspect. 20733 * @param {*} value The value to evaluate. 20734 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 20735 * @returns {number} Returns the index at which `value` should be inserted 20736 * into `array`. 20737 * @example 20738 * 20739 * var objects = [{ 'x': 4 }, { 'x': 5 }]; 20740 * 20741 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); 20742 * // => 0 20743 * 20744 * // The `_.property` iteratee shorthand. 20745 * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); 20746 * // => 0 20747 */ 20748 function sortedIndexBy(array, value, iteratee) { 20749 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); 20750 } 20751 20752 /** 20753 * This method is like `_.indexOf` except that it performs a binary 20754 * search on a sorted `array`. 20755 * 20756 * @static 20757 * @memberOf _ 20758 * @since 4.0.0 20759 * @category Array 20760 * @param {Array} array The array to inspect. 20761 * @param {*} value The value to search for. 20762 * @returns {number} Returns the index of the matched value, else `-1`. 20763 * @example 20764 * 20765 * _.sortedIndexOf([4, 5, 5, 5, 6], 5); 20766 * // => 1 20767 */ 20768 function sortedIndexOf(array, value) { 20769 var length = array == null ? 0 : array.length; 20770 if (length) { 20771 var index = baseSortedIndex(array, value); 20772 if (index < length && eq(array[index], value)) { 20773 return index; 20774 } 20775 } 20776 return -1; 20777 } 20778 20779 /** 20780 * This method is like `_.sortedIndex` except that it returns the highest 20781 * index at which `value` should be inserted into `array` in order to 20782 * maintain its sort order. 20783 * 20784 * @static 20785 * @memberOf _ 20786 * @since 3.0.0 20787 * @category Array 20788 * @param {Array} array The sorted array to inspect. 20789 * @param {*} value The value to evaluate. 20790 * @returns {number} Returns the index at which `value` should be inserted 20791 * into `array`. 20792 * @example 20793 * 20794 * _.sortedLastIndex([4, 5, 5, 5, 6], 5); 20795 * // => 4 20796 */ 20797 function sortedLastIndex(array, value) { 20798 return baseSortedIndex(array, value, true); 20799 } 20800 20801 /** 20802 * This method is like `_.sortedLastIndex` except that it accepts `iteratee` 20803 * which is invoked for `value` and each element of `array` to compute their 20804 * sort ranking. The iteratee is invoked with one argument: (value). 20805 * 20806 * @static 20807 * @memberOf _ 20808 * @since 4.0.0 20809 * @category Array 20810 * @param {Array} array The sorted array to inspect. 20811 * @param {*} value The value to evaluate. 20812 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 20813 * @returns {number} Returns the index at which `value` should be inserted 20814 * into `array`. 20815 * @example 20816 * 20817 * var objects = [{ 'x': 4 }, { 'x': 5 }]; 20818 * 20819 * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); 20820 * // => 1 20821 * 20822 * // The `_.property` iteratee shorthand. 20823 * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); 20824 * // => 1 20825 */ 20826 function sortedLastIndexBy(array, value, iteratee) { 20827 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); 20828 } 20829 20830 /** 20831 * This method is like `_.lastIndexOf` except that it performs a binary 20832 * search on a sorted `array`. 20833 * 20834 * @static 20835 * @memberOf _ 20836 * @since 4.0.0 20837 * @category Array 20838 * @param {Array} array The array to inspect. 20839 * @param {*} value The value to search for. 20840 * @returns {number} Returns the index of the matched value, else `-1`. 20841 * @example 20842 * 20843 * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); 20844 * // => 3 20845 */ 20846 function sortedLastIndexOf(array, value) { 20847 var length = array == null ? 0 : array.length; 20848 if (length) { 20849 var index = baseSortedIndex(array, value, true) - 1; 20850 if (eq(array[index], value)) { 20851 return index; 20852 } 20853 } 20854 return -1; 20855 } 20856 20857 /** 20858 * This method is like `_.uniq` except that it's designed and optimized 20859 * for sorted arrays. 20860 * 20861 * @static 20862 * @memberOf _ 20863 * @since 4.0.0 20864 * @category Array 20865 * @param {Array} array The array to inspect. 20866 * @returns {Array} Returns the new duplicate free array. 20867 * @example 20868 * 20869 * _.sortedUniq([1, 1, 2]); 20870 * // => [1, 2] 20871 */ 20872 function sortedUniq(array) { 20873 return (array && array.length) 20874 ? baseSortedUniq(array) 20875 : []; 20876 } 20877 20878 /** 20879 * This method is like `_.uniqBy` except that it's designed and optimized 20880 * for sorted arrays. 20881 * 20882 * @static 20883 * @memberOf _ 20884 * @since 4.0.0 20885 * @category Array 20886 * @param {Array} array The array to inspect. 20887 * @param {Function} [iteratee] The iteratee invoked per element. 20888 * @returns {Array} Returns the new duplicate free array. 20889 * @example 20890 * 20891 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); 20892 * // => [1.1, 2.3] 20893 */ 20894 function sortedUniqBy(array, iteratee) { 20895 return (array && array.length) 20896 ? baseSortedUniq(array, getIteratee(iteratee, 2)) 20897 : []; 20898 } 20899 20900 /** 20901 * Gets all but the first element of `array`. 20902 * 20903 * @static 20904 * @memberOf _ 20905 * @since 4.0.0 20906 * @category Array 20907 * @param {Array} array The array to query. 20908 * @returns {Array} Returns the slice of `array`. 20909 * @example 20910 * 20911 * _.tail([1, 2, 3]); 20912 * // => [2, 3] 20913 */ 20914 function tail(array) { 20915 var length = array == null ? 0 : array.length; 20916 return length ? baseSlice(array, 1, length) : []; 20917 } 20918 20919 /** 20920 * Creates a slice of `array` with `n` elements taken from the beginning. 20921 * 20922 * @static 20923 * @memberOf _ 20924 * @since 0.1.0 20925 * @category Array 20926 * @param {Array} array The array to query. 20927 * @param {number} [n=1] The number of elements to take. 20928 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 20929 * @returns {Array} Returns the slice of `array`. 20930 * @example 20931 * 20932 * _.take([1, 2, 3]); 20933 * // => [1] 20934 * 20935 * _.take([1, 2, 3], 2); 20936 * // => [1, 2] 20937 * 20938 * _.take([1, 2, 3], 5); 20939 * // => [1, 2, 3] 20940 * 20941 * _.take([1, 2, 3], 0); 20942 * // => [] 20943 */ 20944 function take(array, n, guard) { 20945 if (!(array && array.length)) { 20946 return []; 20947 } 20948 n = (guard || n === undefined) ? 1 : toInteger(n); 20949 return baseSlice(array, 0, n < 0 ? 0 : n); 20950 } 20951 20952 /** 20953 * Creates a slice of `array` with `n` elements taken from the end. 20954 * 20955 * @static 20956 * @memberOf _ 20957 * @since 3.0.0 20958 * @category Array 20959 * @param {Array} array The array to query. 20960 * @param {number} [n=1] The number of elements to take. 20961 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 20962 * @returns {Array} Returns the slice of `array`. 20963 * @example 20964 * 20965 * _.takeRight([1, 2, 3]); 20966 * // => [3] 20967 * 20968 * _.takeRight([1, 2, 3], 2); 20969 * // => [2, 3] 20970 * 20971 * _.takeRight([1, 2, 3], 5); 20972 * // => [1, 2, 3] 20973 * 20974 * _.takeRight([1, 2, 3], 0); 20975 * // => [] 20976 */ 20977 function takeRight(array, n, guard) { 20978 var length = array == null ? 0 : array.length; 20979 if (!length) { 20980 return []; 20981 } 20982 n = (guard || n === undefined) ? 1 : toInteger(n); 20983 n = length - n; 20984 return baseSlice(array, n < 0 ? 0 : n, length); 20985 } 20986 20987 /** 20988 * Creates a slice of `array` with elements taken from the end. Elements are 20989 * taken until `predicate` returns falsey. The predicate is invoked with 20990 * three arguments: (value, index, array). 20991 * 20992 * @static 20993 * @memberOf _ 20994 * @since 3.0.0 20995 * @category Array 20996 * @param {Array} array The array to query. 20997 * @param {Function} [predicate=_.identity] The function invoked per iteration. 20998 * @returns {Array} Returns the slice of `array`. 20999 * @example 21000 * 21001 * var users = [ 21002 * { 'user': 'barney', 'active': true }, 21003 * { 'user': 'fred', 'active': false }, 21004 * { 'user': 'pebbles', 'active': false } 21005 * ]; 21006 * 21007 * _.takeRightWhile(users, function(o) { return !o.active; }); 21008 * // => objects for ['fred', 'pebbles'] 21009 * 21010 * // The `_.matches` iteratee shorthand. 21011 * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); 21012 * // => objects for ['pebbles'] 21013 * 21014 * // The `_.matchesProperty` iteratee shorthand. 21015 * _.takeRightWhile(users, ['active', false]); 21016 * // => objects for ['fred', 'pebbles'] 21017 * 21018 * // The `_.property` iteratee shorthand. 21019 * _.takeRightWhile(users, 'active'); 21020 * // => [] 21021 */ 21022 function takeRightWhile(array, predicate) { 21023 return (array && array.length) 21024 ? baseWhile(array, getIteratee(predicate, 3), false, true) 21025 : []; 21026 } 21027 21028 /** 21029 * Creates a slice of `array` with elements taken from the beginning. Elements 21030 * are taken until `predicate` returns falsey. The predicate is invoked with 21031 * three arguments: (value, index, array). 21032 * 21033 * @static 21034 * @memberOf _ 21035 * @since 3.0.0 21036 * @category Array 21037 * @param {Array} array The array to query. 21038 * @param {Function} [predicate=_.identity] The function invoked per iteration. 21039 * @returns {Array} Returns the slice of `array`. 21040 * @example 21041 * 21042 * var users = [ 21043 * { 'user': 'barney', 'active': false }, 21044 * { 'user': 'fred', 'active': false }, 21045 * { 'user': 'pebbles', 'active': true } 21046 * ]; 21047 * 21048 * _.takeWhile(users, function(o) { return !o.active; }); 21049 * // => objects for ['barney', 'fred'] 21050 * 21051 * // The `_.matches` iteratee shorthand. 21052 * _.takeWhile(users, { 'user': 'barney', 'active': false }); 21053 * // => objects for ['barney'] 21054 * 21055 * // The `_.matchesProperty` iteratee shorthand. 21056 * _.takeWhile(users, ['active', false]); 21057 * // => objects for ['barney', 'fred'] 21058 * 21059 * // The `_.property` iteratee shorthand. 21060 * _.takeWhile(users, 'active'); 21061 * // => [] 21062 */ 21063 function takeWhile(array, predicate) { 21064 return (array && array.length) 21065 ? baseWhile(array, getIteratee(predicate, 3)) 21066 : []; 21067 } 21068 21069 /** 21070 * Creates an array of unique values, in order, from all given arrays using 21071 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 21072 * for equality comparisons. 21073 * 21074 * @static 21075 * @memberOf _ 21076 * @since 0.1.0 21077 * @category Array 21078 * @param {...Array} [arrays] The arrays to inspect. 21079 * @returns {Array} Returns the new array of combined values. 21080 * @example 21081 * 21082 * _.union([2], [1, 2]); 21083 * // => [2, 1] 21084 */ 21085 var union = baseRest(function(arrays) { 21086 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); 21087 }); 21088 21089 /** 21090 * This method is like `_.union` except that it accepts `iteratee` which is 21091 * invoked for each element of each `arrays` to generate the criterion by 21092 * which uniqueness is computed. Result values are chosen from the first 21093 * array in which the value occurs. The iteratee is invoked with one argument: 21094 * (value). 21095 * 21096 * @static 21097 * @memberOf _ 21098 * @since 4.0.0 21099 * @category Array 21100 * @param {...Array} [arrays] The arrays to inspect. 21101 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 21102 * @returns {Array} Returns the new array of combined values. 21103 * @example 21104 * 21105 * _.unionBy([2.1], [1.2, 2.3], Math.floor); 21106 * // => [2.1, 1.2] 21107 * 21108 * // The `_.property` iteratee shorthand. 21109 * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 21110 * // => [{ 'x': 1 }, { 'x': 2 }] 21111 */ 21112 var unionBy = baseRest(function(arrays) { 21113 var iteratee = last(arrays); 21114 if (isArrayLikeObject(iteratee)) { 21115 iteratee = undefined; 21116 } 21117 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); 21118 }); 21119 21120 /** 21121 * This method is like `_.union` except that it accepts `comparator` which 21122 * is invoked to compare elements of `arrays`. Result values are chosen from 21123 * the first array in which the value occurs. The comparator is invoked 21124 * with two arguments: (arrVal, othVal). 21125 * 21126 * @static 21127 * @memberOf _ 21128 * @since 4.0.0 21129 * @category Array 21130 * @param {...Array} [arrays] The arrays to inspect. 21131 * @param {Function} [comparator] The comparator invoked per element. 21132 * @returns {Array} Returns the new array of combined values. 21133 * @example 21134 * 21135 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 21136 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 21137 * 21138 * _.unionWith(objects, others, _.isEqual); 21139 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] 21140 */ 21141 var unionWith = baseRest(function(arrays) { 21142 var comparator = last(arrays); 21143 comparator = typeof comparator == 'function' ? comparator : undefined; 21144 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); 21145 }); 21146 21147 /** 21148 * Creates a duplicate-free version of an array, using 21149 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 21150 * for equality comparisons, in which only the first occurrence of each element 21151 * is kept. The order of result values is determined by the order they occur 21152 * in the array. 21153 * 21154 * @static 21155 * @memberOf _ 21156 * @since 0.1.0 21157 * @category Array 21158 * @param {Array} array The array to inspect. 21159 * @returns {Array} Returns the new duplicate free array. 21160 * @example 21161 * 21162 * _.uniq([2, 1, 2]); 21163 * // => [2, 1] 21164 */ 21165 function uniq(array) { 21166 return (array && array.length) ? baseUniq(array) : []; 21167 } 21168 21169 /** 21170 * This method is like `_.uniq` except that it accepts `iteratee` which is 21171 * invoked for each element in `array` to generate the criterion by which 21172 * uniqueness is computed. The order of result values is determined by the 21173 * order they occur in the array. The iteratee is invoked with one argument: 21174 * (value). 21175 * 21176 * @static 21177 * @memberOf _ 21178 * @since 4.0.0 21179 * @category Array 21180 * @param {Array} array The array to inspect. 21181 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 21182 * @returns {Array} Returns the new duplicate free array. 21183 * @example 21184 * 21185 * _.uniqBy([2.1, 1.2, 2.3], Math.floor); 21186 * // => [2.1, 1.2] 21187 * 21188 * // The `_.property` iteratee shorthand. 21189 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); 21190 * // => [{ 'x': 1 }, { 'x': 2 }] 21191 */ 21192 function uniqBy(array, iteratee) { 21193 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; 21194 } 21195 21196 /** 21197 * This method is like `_.uniq` except that it accepts `comparator` which 21198 * is invoked to compare elements of `array`. The order of result values is 21199 * determined by the order they occur in the array.The comparator is invoked 21200 * with two arguments: (arrVal, othVal). 21201 * 21202 * @static 21203 * @memberOf _ 21204 * @since 4.0.0 21205 * @category Array 21206 * @param {Array} array The array to inspect. 21207 * @param {Function} [comparator] The comparator invoked per element. 21208 * @returns {Array} Returns the new duplicate free array. 21209 * @example 21210 * 21211 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; 21212 * 21213 * _.uniqWith(objects, _.isEqual); 21214 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] 21215 */ 21216 function uniqWith(array, comparator) { 21217 comparator = typeof comparator == 'function' ? comparator : undefined; 21218 return (array && array.length) ? baseUniq(array, undefined, comparator) : []; 21219 } 21220 21221 /** 21222 * This method is like `_.zip` except that it accepts an array of grouped 21223 * elements and creates an array regrouping the elements to their pre-zip 21224 * configuration. 21225 * 21226 * @static 21227 * @memberOf _ 21228 * @since 1.2.0 21229 * @category Array 21230 * @param {Array} array The array of grouped elements to process. 21231 * @returns {Array} Returns the new array of regrouped elements. 21232 * @example 21233 * 21234 * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); 21235 * // => [['a', 1, true], ['b', 2, false]] 21236 * 21237 * _.unzip(zipped); 21238 * // => [['a', 'b'], [1, 2], [true, false]] 21239 */ 21240 function unzip(array) { 21241 if (!(array && array.length)) { 21242 return []; 21243 } 21244 var length = 0; 21245 array = arrayFilter(array, function(group) { 21246 if (isArrayLikeObject(group)) { 21247 length = nativeMax(group.length, length); 21248 return true; 21249 } 21250 }); 21251 return baseTimes(length, function(index) { 21252 return arrayMap(array, baseProperty(index)); 21253 }); 21254 } 21255 21256 /** 21257 * This method is like `_.unzip` except that it accepts `iteratee` to specify 21258 * how regrouped values should be combined. The iteratee is invoked with the 21259 * elements of each group: (...group). 21260 * 21261 * @static 21262 * @memberOf _ 21263 * @since 3.8.0 21264 * @category Array 21265 * @param {Array} array The array of grouped elements to process. 21266 * @param {Function} [iteratee=_.identity] The function to combine 21267 * regrouped values. 21268 * @returns {Array} Returns the new array of regrouped elements. 21269 * @example 21270 * 21271 * var zipped = _.zip([1, 2], [10, 20], [100, 200]); 21272 * // => [[1, 10, 100], [2, 20, 200]] 21273 * 21274 * _.unzipWith(zipped, _.add); 21275 * // => [3, 30, 300] 21276 */ 21277 function unzipWith(array, iteratee) { 21278 if (!(array && array.length)) { 21279 return []; 21280 } 21281 var result = unzip(array); 21282 if (iteratee == null) { 21283 return result; 21284 } 21285 return arrayMap(result, function(group) { 21286 return apply(iteratee, undefined, group); 21287 }); 21288 } 21289 21290 /** 21291 * Creates an array excluding all given values using 21292 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 21293 * for equality comparisons. 21294 * 21295 * **Note:** Unlike `_.pull`, this method returns a new array. 21296 * 21297 * @static 21298 * @memberOf _ 21299 * @since 0.1.0 21300 * @category Array 21301 * @param {Array} array The array to inspect. 21302 * @param {...*} [values] The values to exclude. 21303 * @returns {Array} Returns the new array of filtered values. 21304 * @see _.difference, _.xor 21305 * @example 21306 * 21307 * _.without([2, 1, 2, 3], 1, 2); 21308 * // => [3] 21309 */ 21310 var without = baseRest(function(array, values) { 21311 return isArrayLikeObject(array) 21312 ? baseDifference(array, values) 21313 : []; 21314 }); 21315 21316 /** 21317 * Creates an array of unique values that is the 21318 * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) 21319 * of the given arrays. The order of result values is determined by the order 21320 * they occur in the arrays. 21321 * 21322 * @static 21323 * @memberOf _ 21324 * @since 2.4.0 21325 * @category Array 21326 * @param {...Array} [arrays] The arrays to inspect. 21327 * @returns {Array} Returns the new array of filtered values. 21328 * @see _.difference, _.without 21329 * @example 21330 * 21331 * _.xor([2, 1], [2, 3]); 21332 * // => [1, 3] 21333 */ 21334 var xor = baseRest(function(arrays) { 21335 return baseXor(arrayFilter(arrays, isArrayLikeObject)); 21336 }); 21337 21338 /** 21339 * This method is like `_.xor` except that it accepts `iteratee` which is 21340 * invoked for each element of each `arrays` to generate the criterion by 21341 * which by which they're compared. The order of result values is determined 21342 * by the order they occur in the arrays. The iteratee is invoked with one 21343 * argument: (value). 21344 * 21345 * @static 21346 * @memberOf _ 21347 * @since 4.0.0 21348 * @category Array 21349 * @param {...Array} [arrays] The arrays to inspect. 21350 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 21351 * @returns {Array} Returns the new array of filtered values. 21352 * @example 21353 * 21354 * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); 21355 * // => [1.2, 3.4] 21356 * 21357 * // The `_.property` iteratee shorthand. 21358 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 21359 * // => [{ 'x': 2 }] 21360 */ 21361 var xorBy = baseRest(function(arrays) { 21362 var iteratee = last(arrays); 21363 if (isArrayLikeObject(iteratee)) { 21364 iteratee = undefined; 21365 } 21366 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); 21367 }); 21368 21369 /** 21370 * This method is like `_.xor` except that it accepts `comparator` which is 21371 * invoked to compare elements of `arrays`. The order of result values is 21372 * determined by the order they occur in the arrays. The comparator is invoked 21373 * with two arguments: (arrVal, othVal). 21374 * 21375 * @static 21376 * @memberOf _ 21377 * @since 4.0.0 21378 * @category Array 21379 * @param {...Array} [arrays] The arrays to inspect. 21380 * @param {Function} [comparator] The comparator invoked per element. 21381 * @returns {Array} Returns the new array of filtered values. 21382 * @example 21383 * 21384 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 21385 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 21386 * 21387 * _.xorWith(objects, others, _.isEqual); 21388 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] 21389 */ 21390 var xorWith = baseRest(function(arrays) { 21391 var comparator = last(arrays); 21392 comparator = typeof comparator == 'function' ? comparator : undefined; 21393 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); 21394 }); 21395 21396 /** 21397 * Creates an array of grouped elements, the first of which contains the 21398 * first elements of the given arrays, the second of which contains the 21399 * second elements of the given arrays, and so on. 21400 * 21401 * @static 21402 * @memberOf _ 21403 * @since 0.1.0 21404 * @category Array 21405 * @param {...Array} [arrays] The arrays to process. 21406 * @returns {Array} Returns the new array of grouped elements. 21407 * @example 21408 * 21409 * _.zip(['a', 'b'], [1, 2], [true, false]); 21410 * // => [['a', 1, true], ['b', 2, false]] 21411 */ 21412 var zip = baseRest(unzip); 21413 21414 /** 21415 * This method is like `_.fromPairs` except that it accepts two arrays, 21416 * one of property identifiers and one of corresponding values. 21417 * 21418 * @static 21419 * @memberOf _ 21420 * @since 0.4.0 21421 * @category Array 21422 * @param {Array} [props=[]] The property identifiers. 21423 * @param {Array} [values=[]] The property values. 21424 * @returns {Object} Returns the new object. 21425 * @example 21426 * 21427 * _.zipObject(['a', 'b'], [1, 2]); 21428 * // => { 'a': 1, 'b': 2 } 21429 */ 21430 function zipObject(props, values) { 21431 return baseZipObject(props || [], values || [], assignValue); 21432 } 21433 21434 /** 21435 * This method is like `_.zipObject` except that it supports property paths. 21436 * 21437 * @static 21438 * @memberOf _ 21439 * @since 4.1.0 21440 * @category Array 21441 * @param {Array} [props=[]] The property identifiers. 21442 * @param {Array} [values=[]] The property values. 21443 * @returns {Object} Returns the new object. 21444 * @example 21445 * 21446 * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); 21447 * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } 21448 */ 21449 function zipObjectDeep(props, values) { 21450 return baseZipObject(props || [], values || [], baseSet); 21451 } 21452 21453 /** 21454 * This method is like `_.zip` except that it accepts `iteratee` to specify 21455 * how grouped values should be combined. The iteratee is invoked with the 21456 * elements of each group: (...group). 21457 * 21458 * @static 21459 * @memberOf _ 21460 * @since 3.8.0 21461 * @category Array 21462 * @param {...Array} [arrays] The arrays to process. 21463 * @param {Function} [iteratee=_.identity] The function to combine 21464 * grouped values. 21465 * @returns {Array} Returns the new array of grouped elements. 21466 * @example 21467 * 21468 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { 21469 * return a + b + c; 21470 * }); 21471 * // => [111, 222] 21472 */ 21473 var zipWith = baseRest(function(arrays) { 21474 var length = arrays.length, 21475 iteratee = length > 1 ? arrays[length - 1] : undefined; 21476 21477 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; 21478 return unzipWith(arrays, iteratee); 21479 }); 21480 21481 /*------------------------------------------------------------------------*/ 21482 21483 /** 21484 * Creates a `lodash` wrapper instance that wraps `value` with explicit method 21485 * chain sequences enabled. The result of such sequences must be unwrapped 21486 * with `_#value`. 21487 * 21488 * @static 21489 * @memberOf _ 21490 * @since 1.3.0 21491 * @category Seq 21492 * @param {*} value The value to wrap. 21493 * @returns {Object} Returns the new `lodash` wrapper instance. 21494 * @example 21495 * 21496 * var users = [ 21497 * { 'user': 'barney', 'age': 36 }, 21498 * { 'user': 'fred', 'age': 40 }, 21499 * { 'user': 'pebbles', 'age': 1 } 21500 * ]; 21501 * 21502 * var youngest = _ 21503 * .chain(users) 21504 * .sortBy('age') 21505 * .map(function(o) { 21506 * return o.user + ' is ' + o.age; 21507 * }) 21508 * .head() 21509 * .value(); 21510 * // => 'pebbles is 1' 21511 */ 21512 function chain(value) { 21513 var result = lodash(value); 21514 result.__chain__ = true; 21515 return result; 21516 } 21517 21518 /** 21519 * This method invokes `interceptor` and returns `value`. The interceptor 21520 * is invoked with one argument; (value). The purpose of this method is to 21521 * "tap into" a method chain sequence in order to modify intermediate results. 21522 * 21523 * @static 21524 * @memberOf _ 21525 * @since 0.1.0 21526 * @category Seq 21527 * @param {*} value The value to provide to `interceptor`. 21528 * @param {Function} interceptor The function to invoke. 21529 * @returns {*} Returns `value`. 21530 * @example 21531 * 21532 * _([1, 2, 3]) 21533 * .tap(function(array) { 21534 * // Mutate input array. 21535 * array.pop(); 21536 * }) 21537 * .reverse() 21538 * .value(); 21539 * // => [2, 1] 21540 */ 21541 function tap(value, interceptor) { 21542 interceptor(value); 21543 return value; 21544 } 21545 21546 /** 21547 * This method is like `_.tap` except that it returns the result of `interceptor`. 21548 * The purpose of this method is to "pass thru" values replacing intermediate 21549 * results in a method chain sequence. 21550 * 21551 * @static 21552 * @memberOf _ 21553 * @since 3.0.0 21554 * @category Seq 21555 * @param {*} value The value to provide to `interceptor`. 21556 * @param {Function} interceptor The function to invoke. 21557 * @returns {*} Returns the result of `interceptor`. 21558 * @example 21559 * 21560 * _(' abc ') 21561 * .chain() 21562 * .trim() 21563 * .thru(function(value) { 21564 * return [value]; 21565 * }) 21566 * .value(); 21567 * // => ['abc'] 21568 */ 21569 function thru(value, interceptor) { 21570 return interceptor(value); 21571 } 21572 21573 /** 21574 * This method is the wrapper version of `_.at`. 21575 * 21576 * @name at 21577 * @memberOf _ 21578 * @since 1.0.0 21579 * @category Seq 21580 * @param {...(string|string[])} [paths] The property paths to pick. 21581 * @returns {Object} Returns the new `lodash` wrapper instance. 21582 * @example 21583 * 21584 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; 21585 * 21586 * _(object).at(['a[0].b.c', 'a[1]']).value(); 21587 * // => [3, 4] 21588 */ 21589 var wrapperAt = flatRest(function(paths) { 21590 var length = paths.length, 21591 start = length ? paths[0] : 0, 21592 value = this.__wrapped__, 21593 interceptor = function(object) { return baseAt(object, paths); }; 21594 21595 if (length > 1 || this.__actions__.length || 21596 !(value instanceof LazyWrapper) || !isIndex(start)) { 21597 return this.thru(interceptor); 21598 } 21599 value = value.slice(start, +start + (length ? 1 : 0)); 21600 value.__actions__.push({ 21601 'func': thru, 21602 'args': [interceptor], 21603 'thisArg': undefined 21604 }); 21605 return new LodashWrapper(value, this.__chain__).thru(function(array) { 21606 if (length && !array.length) { 21607 array.push(undefined); 21608 } 21609 return array; 21610 }); 21611 }); 21612 21613 /** 21614 * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. 21615 * 21616 * @name chain 21617 * @memberOf _ 21618 * @since 0.1.0 21619 * @category Seq 21620 * @returns {Object} Returns the new `lodash` wrapper instance. 21621 * @example 21622 * 21623 * var users = [ 21624 * { 'user': 'barney', 'age': 36 }, 21625 * { 'user': 'fred', 'age': 40 } 21626 * ]; 21627 * 21628 * // A sequence without explicit chaining. 21629 * _(users).head(); 21630 * // => { 'user': 'barney', 'age': 36 } 21631 * 21632 * // A sequence with explicit chaining. 21633 * _(users) 21634 * .chain() 21635 * .head() 21636 * .pick('user') 21637 * .value(); 21638 * // => { 'user': 'barney' } 21639 */ 21640 function wrapperChain() { 21641 return chain(this); 21642 } 21643 21644 /** 21645 * Executes the chain sequence and returns the wrapped result. 21646 * 21647 * @name commit 21648 * @memberOf _ 21649 * @since 3.2.0 21650 * @category Seq 21651 * @returns {Object} Returns the new `lodash` wrapper instance. 21652 * @example 21653 * 21654 * var array = [1, 2]; 21655 * var wrapped = _(array).push(3); 21656 * 21657 * console.log(array); 21658 * // => [1, 2] 21659 * 21660 * wrapped = wrapped.commit(); 21661 * console.log(array); 21662 * // => [1, 2, 3] 21663 * 21664 * wrapped.last(); 21665 * // => 3 21666 * 21667 * console.log(array); 21668 * // => [1, 2, 3] 21669 */ 21670 function wrapperCommit() { 21671 return new LodashWrapper(this.value(), this.__chain__); 21672 } 21673 21674 /** 21675 * Gets the next value on a wrapped object following the 21676 * [iterator protocol](https://mdn.io/iteration_protocols#iterator). 21677 * 21678 * @name next 21679 * @memberOf _ 21680 * @since 4.0.0 21681 * @category Seq 21682 * @returns {Object} Returns the next iterator value. 21683 * @example 21684 * 21685 * var wrapped = _([1, 2]); 21686 * 21687 * wrapped.next(); 21688 * // => { 'done': false, 'value': 1 } 21689 * 21690 * wrapped.next(); 21691 * // => { 'done': false, 'value': 2 } 21692 * 21693 * wrapped.next(); 21694 * // => { 'done': true, 'value': undefined } 21695 */ 21696 function wrapperNext() { 21697 if (this.__values__ === undefined) { 21698 this.__values__ = toArray(this.value()); 21699 } 21700 var done = this.__index__ >= this.__values__.length, 21701 value = done ? undefined : this.__values__[this.__index__++]; 21702 21703 return { 'done': done, 'value': value }; 21704 } 21705 21706 /** 21707 * Enables the wrapper to be iterable. 21708 * 21709 * @name Symbol.iterator 21710 * @memberOf _ 21711 * @since 4.0.0 21712 * @category Seq 21713 * @returns {Object} Returns the wrapper object. 21714 * @example 21715 * 21716 * var wrapped = _([1, 2]); 21717 * 21718 * wrapped[Symbol.iterator]() === wrapped; 21719 * // => true 21720 * 21721 * Array.from(wrapped); 21722 * // => [1, 2] 21723 */ 21724 function wrapperToIterator() { 21725 return this; 21726 } 21727 21728 /** 21729 * Creates a clone of the chain sequence planting `value` as the wrapped value. 21730 * 21731 * @name plant 21732 * @memberOf _ 21733 * @since 3.2.0 21734 * @category Seq 21735 * @param {*} value The value to plant. 21736 * @returns {Object} Returns the new `lodash` wrapper instance. 21737 * @example 21738 * 21739 * function square(n) { 21740 * return n * n; 21741 * } 21742 * 21743 * var wrapped = _([1, 2]).map(square); 21744 * var other = wrapped.plant([3, 4]); 21745 * 21746 * other.value(); 21747 * // => [9, 16] 21748 * 21749 * wrapped.value(); 21750 * // => [1, 4] 21751 */ 21752 function wrapperPlant(value) { 21753 var result, 21754 parent = this; 21755 21756 while (parent instanceof baseLodash) { 21757 var clone = wrapperClone(parent); 21758 clone.__index__ = 0; 21759 clone.__values__ = undefined; 21760 if (result) { 21761 previous.__wrapped__ = clone; 21762 } else { 21763 result = clone; 21764 } 21765 var previous = clone; 21766 parent = parent.__wrapped__; 21767 } 21768 previous.__wrapped__ = value; 21769 return result; 21770 } 21771 21772 /** 21773 * This method is the wrapper version of `_.reverse`. 21774 * 21775 * **Note:** This method mutates the wrapped array. 21776 * 21777 * @name reverse 21778 * @memberOf _ 21779 * @since 0.1.0 21780 * @category Seq 21781 * @returns {Object} Returns the new `lodash` wrapper instance. 21782 * @example 21783 * 21784 * var array = [1, 2, 3]; 21785 * 21786 * _(array).reverse().value() 21787 * // => [3, 2, 1] 21788 * 21789 * console.log(array); 21790 * // => [3, 2, 1] 21791 */ 21792 function wrapperReverse() { 21793 var value = this.__wrapped__; 21794 if (value instanceof LazyWrapper) { 21795 var wrapped = value; 21796 if (this.__actions__.length) { 21797 wrapped = new LazyWrapper(this); 21798 } 21799 wrapped = wrapped.reverse(); 21800 wrapped.__actions__.push({ 21801 'func': thru, 21802 'args': [reverse], 21803 'thisArg': undefined 21804 }); 21805 return new LodashWrapper(wrapped, this.__chain__); 21806 } 21807 return this.thru(reverse); 21808 } 21809 21810 /** 21811 * Executes the chain sequence to resolve the unwrapped value. 21812 * 21813 * @name value 21814 * @memberOf _ 21815 * @since 0.1.0 21816 * @alias toJSON, valueOf 21817 * @category Seq 21818 * @returns {*} Returns the resolved unwrapped value. 21819 * @example 21820 * 21821 * _([1, 2, 3]).value(); 21822 * // => [1, 2, 3] 21823 */ 21824 function wrapperValue() { 21825 return baseWrapperValue(this.__wrapped__, this.__actions__); 21826 } 21827 21828 /*------------------------------------------------------------------------*/ 21829 21830 /** 21831 * Creates an object composed of keys generated from the results of running 21832 * each element of `collection` thru `iteratee`. The corresponding value of 21833 * each key is the number of times the key was returned by `iteratee`. The 21834 * iteratee is invoked with one argument: (value). 21835 * 21836 * @static 21837 * @memberOf _ 21838 * @since 0.5.0 21839 * @category Collection 21840 * @param {Array|Object} collection The collection to iterate over. 21841 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 21842 * @returns {Object} Returns the composed aggregate object. 21843 * @example 21844 * 21845 * _.countBy([6.1, 4.2, 6.3], Math.floor); 21846 * // => { '4': 1, '6': 2 } 21847 * 21848 * // The `_.property` iteratee shorthand. 21849 * _.countBy(['one', 'two', 'three'], 'length'); 21850 * // => { '3': 2, '5': 1 } 21851 */ 21852 var countBy = createAggregator(function(result, value, key) { 21853 if (hasOwnProperty.call(result, key)) { 21854 ++result[key]; 21855 } else { 21856 baseAssignValue(result, key, 1); 21857 } 21858 }); 21859 21860 /** 21861 * Checks if `predicate` returns truthy for **all** elements of `collection`. 21862 * Iteration is stopped once `predicate` returns falsey. The predicate is 21863 * invoked with three arguments: (value, index|key, collection). 21864 * 21865 * **Note:** This method returns `true` for 21866 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because 21867 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of 21868 * elements of empty collections. 21869 * 21870 * @static 21871 * @memberOf _ 21872 * @since 0.1.0 21873 * @category Collection 21874 * @param {Array|Object} collection The collection to iterate over. 21875 * @param {Function} [predicate=_.identity] The function invoked per iteration. 21876 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 21877 * @returns {boolean} Returns `true` if all elements pass the predicate check, 21878 * else `false`. 21879 * @example 21880 * 21881 * _.every([true, 1, null, 'yes'], Boolean); 21882 * // => false 21883 * 21884 * var users = [ 21885 * { 'user': 'barney', 'age': 36, 'active': false }, 21886 * { 'user': 'fred', 'age': 40, 'active': false } 21887 * ]; 21888 * 21889 * // The `_.matches` iteratee shorthand. 21890 * _.every(users, { 'user': 'barney', 'active': false }); 21891 * // => false 21892 * 21893 * // The `_.matchesProperty` iteratee shorthand. 21894 * _.every(users, ['active', false]); 21895 * // => true 21896 * 21897 * // The `_.property` iteratee shorthand. 21898 * _.every(users, 'active'); 21899 * // => false 21900 */ 21901 function every(collection, predicate, guard) { 21902 var func = isArray(collection) ? arrayEvery : baseEvery; 21903 if (guard && isIterateeCall(collection, predicate, guard)) { 21904 predicate = undefined; 21905 } 21906 return func(collection, getIteratee(predicate, 3)); 21907 } 21908 21909 /** 21910 * Iterates over elements of `collection`, returning an array of all elements 21911 * `predicate` returns truthy for. The predicate is invoked with three 21912 * arguments: (value, index|key, collection). 21913 * 21914 * **Note:** Unlike `_.remove`, this method returns a new array. 21915 * 21916 * @static 21917 * @memberOf _ 21918 * @since 0.1.0 21919 * @category Collection 21920 * @param {Array|Object} collection The collection to iterate over. 21921 * @param {Function} [predicate=_.identity] The function invoked per iteration. 21922 * @returns {Array} Returns the new filtered array. 21923 * @see _.reject 21924 * @example 21925 * 21926 * var users = [ 21927 * { 'user': 'barney', 'age': 36, 'active': true }, 21928 * { 'user': 'fred', 'age': 40, 'active': false } 21929 * ]; 21930 * 21931 * _.filter(users, function(o) { return !o.active; }); 21932 * // => objects for ['fred'] 21933 * 21934 * // The `_.matches` iteratee shorthand. 21935 * _.filter(users, { 'age': 36, 'active': true }); 21936 * // => objects for ['barney'] 21937 * 21938 * // The `_.matchesProperty` iteratee shorthand. 21939 * _.filter(users, ['active', false]); 21940 * // => objects for ['fred'] 21941 * 21942 * // The `_.property` iteratee shorthand. 21943 * _.filter(users, 'active'); 21944 * // => objects for ['barney'] 21945 * 21946 * // Combining several predicates using `_.overEvery` or `_.overSome`. 21947 * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); 21948 * // => objects for ['fred', 'barney'] 21949 */ 21950 function filter(collection, predicate) { 21951 var func = isArray(collection) ? arrayFilter : baseFilter; 21952 return func(collection, getIteratee(predicate, 3)); 21953 } 21954 21955 /** 21956 * Iterates over elements of `collection`, returning the first element 21957 * `predicate` returns truthy for. The predicate is invoked with three 21958 * arguments: (value, index|key, collection). 21959 * 21960 * @static 21961 * @memberOf _ 21962 * @since 0.1.0 21963 * @category Collection 21964 * @param {Array|Object} collection The collection to inspect. 21965 * @param {Function} [predicate=_.identity] The function invoked per iteration. 21966 * @param {number} [fromIndex=0] The index to search from. 21967 * @returns {*} Returns the matched element, else `undefined`. 21968 * @example 21969 * 21970 * var users = [ 21971 * { 'user': 'barney', 'age': 36, 'active': true }, 21972 * { 'user': 'fred', 'age': 40, 'active': false }, 21973 * { 'user': 'pebbles', 'age': 1, 'active': true } 21974 * ]; 21975 * 21976 * _.find(users, function(o) { return o.age < 40; }); 21977 * // => object for 'barney' 21978 * 21979 * // The `_.matches` iteratee shorthand. 21980 * _.find(users, { 'age': 1, 'active': true }); 21981 * // => object for 'pebbles' 21982 * 21983 * // The `_.matchesProperty` iteratee shorthand. 21984 * _.find(users, ['active', false]); 21985 * // => object for 'fred' 21986 * 21987 * // The `_.property` iteratee shorthand. 21988 * _.find(users, 'active'); 21989 * // => object for 'barney' 21990 */ 21991 var find = createFind(findIndex); 21992 21993 /** 21994 * This method is like `_.find` except that it iterates over elements of 21995 * `collection` from right to left. 21996 * 21997 * @static 21998 * @memberOf _ 21999 * @since 2.0.0 22000 * @category Collection 22001 * @param {Array|Object} collection The collection to inspect. 22002 * @param {Function} [predicate=_.identity] The function invoked per iteration. 22003 * @param {number} [fromIndex=collection.length-1] The index to search from. 22004 * @returns {*} Returns the matched element, else `undefined`. 22005 * @example 22006 * 22007 * _.findLast([1, 2, 3, 4], function(n) { 22008 * return n % 2 == 1; 22009 * }); 22010 * // => 3 22011 */ 22012 var findLast = createFind(findLastIndex); 22013 22014 /** 22015 * Creates a flattened array of values by running each element in `collection` 22016 * thru `iteratee` and flattening the mapped results. The iteratee is invoked 22017 * with three arguments: (value, index|key, collection). 22018 * 22019 * @static 22020 * @memberOf _ 22021 * @since 4.0.0 22022 * @category Collection 22023 * @param {Array|Object} collection The collection to iterate over. 22024 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22025 * @returns {Array} Returns the new flattened array. 22026 * @example 22027 * 22028 * function duplicate(n) { 22029 * return [n, n]; 22030 * } 22031 * 22032 * _.flatMap([1, 2], duplicate); 22033 * // => [1, 1, 2, 2] 22034 */ 22035 function flatMap(collection, iteratee) { 22036 return baseFlatten(map(collection, iteratee), 1); 22037 } 22038 22039 /** 22040 * This method is like `_.flatMap` except that it recursively flattens the 22041 * mapped results. 22042 * 22043 * @static 22044 * @memberOf _ 22045 * @since 4.7.0 22046 * @category Collection 22047 * @param {Array|Object} collection The collection to iterate over. 22048 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22049 * @returns {Array} Returns the new flattened array. 22050 * @example 22051 * 22052 * function duplicate(n) { 22053 * return [[[n, n]]]; 22054 * } 22055 * 22056 * _.flatMapDeep([1, 2], duplicate); 22057 * // => [1, 1, 2, 2] 22058 */ 22059 function flatMapDeep(collection, iteratee) { 22060 return baseFlatten(map(collection, iteratee), INFINITY); 22061 } 22062 22063 /** 22064 * This method is like `_.flatMap` except that it recursively flattens the 22065 * mapped results up to `depth` times. 22066 * 22067 * @static 22068 * @memberOf _ 22069 * @since 4.7.0 22070 * @category Collection 22071 * @param {Array|Object} collection The collection to iterate over. 22072 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22073 * @param {number} [depth=1] The maximum recursion depth. 22074 * @returns {Array} Returns the new flattened array. 22075 * @example 22076 * 22077 * function duplicate(n) { 22078 * return [[[n, n]]]; 22079 * } 22080 * 22081 * _.flatMapDepth([1, 2], duplicate, 2); 22082 * // => [[1, 1], [2, 2]] 22083 */ 22084 function flatMapDepth(collection, iteratee, depth) { 22085 depth = depth === undefined ? 1 : toInteger(depth); 22086 return baseFlatten(map(collection, iteratee), depth); 22087 } 22088 22089 /** 22090 * Iterates over elements of `collection` and invokes `iteratee` for each element. 22091 * The iteratee is invoked with three arguments: (value, index|key, collection). 22092 * Iteratee functions may exit iteration early by explicitly returning `false`. 22093 * 22094 * **Note:** As with other "Collections" methods, objects with a "length" 22095 * property are iterated like arrays. To avoid this behavior use `_.forIn` 22096 * or `_.forOwn` for object iteration. 22097 * 22098 * @static 22099 * @memberOf _ 22100 * @since 0.1.0 22101 * @alias each 22102 * @category Collection 22103 * @param {Array|Object} collection The collection to iterate over. 22104 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22105 * @returns {Array|Object} Returns `collection`. 22106 * @see _.forEachRight 22107 * @example 22108 * 22109 * _.forEach([1, 2], function(value) { 22110 * console.log(value); 22111 * }); 22112 * // => Logs `1` then `2`. 22113 * 22114 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { 22115 * console.log(key); 22116 * }); 22117 * // => Logs 'a' then 'b' (iteration order is not guaranteed). 22118 */ 22119 function forEach(collection, iteratee) { 22120 var func = isArray(collection) ? arrayEach : baseEach; 22121 return func(collection, getIteratee(iteratee, 3)); 22122 } 22123 22124 /** 22125 * This method is like `_.forEach` except that it iterates over elements of 22126 * `collection` from right to left. 22127 * 22128 * @static 22129 * @memberOf _ 22130 * @since 2.0.0 22131 * @alias eachRight 22132 * @category Collection 22133 * @param {Array|Object} collection The collection to iterate over. 22134 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22135 * @returns {Array|Object} Returns `collection`. 22136 * @see _.forEach 22137 * @example 22138 * 22139 * _.forEachRight([1, 2], function(value) { 22140 * console.log(value); 22141 * }); 22142 * // => Logs `2` then `1`. 22143 */ 22144 function forEachRight(collection, iteratee) { 22145 var func = isArray(collection) ? arrayEachRight : baseEachRight; 22146 return func(collection, getIteratee(iteratee, 3)); 22147 } 22148 22149 /** 22150 * Creates an object composed of keys generated from the results of running 22151 * each element of `collection` thru `iteratee`. The order of grouped values 22152 * is determined by the order they occur in `collection`. The corresponding 22153 * value of each key is an array of elements responsible for generating the 22154 * key. The iteratee is invoked with one argument: (value). 22155 * 22156 * @static 22157 * @memberOf _ 22158 * @since 0.1.0 22159 * @category Collection 22160 * @param {Array|Object} collection The collection to iterate over. 22161 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 22162 * @returns {Object} Returns the composed aggregate object. 22163 * @example 22164 * 22165 * _.groupBy([6.1, 4.2, 6.3], Math.floor); 22166 * // => { '4': [4.2], '6': [6.1, 6.3] } 22167 * 22168 * // The `_.property` iteratee shorthand. 22169 * _.groupBy(['one', 'two', 'three'], 'length'); 22170 * // => { '3': ['one', 'two'], '5': ['three'] } 22171 */ 22172 var groupBy = createAggregator(function(result, value, key) { 22173 if (hasOwnProperty.call(result, key)) { 22174 result[key].push(value); 22175 } else { 22176 baseAssignValue(result, key, [value]); 22177 } 22178 }); 22179 22180 /** 22181 * Checks if `value` is in `collection`. If `collection` is a string, it's 22182 * checked for a substring of `value`, otherwise 22183 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 22184 * is used for equality comparisons. If `fromIndex` is negative, it's used as 22185 * the offset from the end of `collection`. 22186 * 22187 * @static 22188 * @memberOf _ 22189 * @since 0.1.0 22190 * @category Collection 22191 * @param {Array|Object|string} collection The collection to inspect. 22192 * @param {*} value The value to search for. 22193 * @param {number} [fromIndex=0] The index to search from. 22194 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. 22195 * @returns {boolean} Returns `true` if `value` is found, else `false`. 22196 * @example 22197 * 22198 * _.includes([1, 2, 3], 1); 22199 * // => true 22200 * 22201 * _.includes([1, 2, 3], 1, 2); 22202 * // => false 22203 * 22204 * _.includes({ 'a': 1, 'b': 2 }, 1); 22205 * // => true 22206 * 22207 * _.includes('abcd', 'bc'); 22208 * // => true 22209 */ 22210 function includes(collection, value, fromIndex, guard) { 22211 collection = isArrayLike(collection) ? collection : values(collection); 22212 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; 22213 22214 var length = collection.length; 22215 if (fromIndex < 0) { 22216 fromIndex = nativeMax(length + fromIndex, 0); 22217 } 22218 return isString(collection) 22219 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) 22220 : (!!length && baseIndexOf(collection, value, fromIndex) > -1); 22221 } 22222 22223 /** 22224 * Invokes the method at `path` of each element in `collection`, returning 22225 * an array of the results of each invoked method. Any additional arguments 22226 * are provided to each invoked method. If `path` is a function, it's invoked 22227 * for, and `this` bound to, each element in `collection`. 22228 * 22229 * @static 22230 * @memberOf _ 22231 * @since 4.0.0 22232 * @category Collection 22233 * @param {Array|Object} collection The collection to iterate over. 22234 * @param {Array|Function|string} path The path of the method to invoke or 22235 * the function invoked per iteration. 22236 * @param {...*} [args] The arguments to invoke each method with. 22237 * @returns {Array} Returns the array of results. 22238 * @example 22239 * 22240 * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); 22241 * // => [[1, 5, 7], [1, 2, 3]] 22242 * 22243 * _.invokeMap([123, 456], String.prototype.split, ''); 22244 * // => [['1', '2', '3'], ['4', '5', '6']] 22245 */ 22246 var invokeMap = baseRest(function(collection, path, args) { 22247 var index = -1, 22248 isFunc = typeof path == 'function', 22249 result = isArrayLike(collection) ? Array(collection.length) : []; 22250 22251 baseEach(collection, function(value) { 22252 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); 22253 }); 22254 return result; 22255 }); 22256 22257 /** 22258 * Creates an object composed of keys generated from the results of running 22259 * each element of `collection` thru `iteratee`. The corresponding value of 22260 * each key is the last element responsible for generating the key. The 22261 * iteratee is invoked with one argument: (value). 22262 * 22263 * @static 22264 * @memberOf _ 22265 * @since 4.0.0 22266 * @category Collection 22267 * @param {Array|Object} collection The collection to iterate over. 22268 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 22269 * @returns {Object} Returns the composed aggregate object. 22270 * @example 22271 * 22272 * var array = [ 22273 * { 'dir': 'left', 'code': 97 }, 22274 * { 'dir': 'right', 'code': 100 } 22275 * ]; 22276 * 22277 * _.keyBy(array, function(o) { 22278 * return String.fromCharCode(o.code); 22279 * }); 22280 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } 22281 * 22282 * _.keyBy(array, 'dir'); 22283 * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } 22284 */ 22285 var keyBy = createAggregator(function(result, value, key) { 22286 baseAssignValue(result, key, value); 22287 }); 22288 22289 /** 22290 * Creates an array of values by running each element in `collection` thru 22291 * `iteratee`. The iteratee is invoked with three arguments: 22292 * (value, index|key, collection). 22293 * 22294 * Many lodash methods are guarded to work as iteratees for methods like 22295 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. 22296 * 22297 * The guarded methods are: 22298 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, 22299 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, 22300 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, 22301 * `template`, `trim`, `trimEnd`, `trimStart`, and `words` 22302 * 22303 * @static 22304 * @memberOf _ 22305 * @since 0.1.0 22306 * @category Collection 22307 * @param {Array|Object} collection The collection to iterate over. 22308 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22309 * @returns {Array} Returns the new mapped array. 22310 * @example 22311 * 22312 * function square(n) { 22313 * return n * n; 22314 * } 22315 * 22316 * _.map([4, 8], square); 22317 * // => [16, 64] 22318 * 22319 * _.map({ 'a': 4, 'b': 8 }, square); 22320 * // => [16, 64] (iteration order is not guaranteed) 22321 * 22322 * var users = [ 22323 * { 'user': 'barney' }, 22324 * { 'user': 'fred' } 22325 * ]; 22326 * 22327 * // The `_.property` iteratee shorthand. 22328 * _.map(users, 'user'); 22329 * // => ['barney', 'fred'] 22330 */ 22331 function map(collection, iteratee) { 22332 var func = isArray(collection) ? arrayMap : baseMap; 22333 return func(collection, getIteratee(iteratee, 3)); 22334 } 22335 22336 /** 22337 * This method is like `_.sortBy` except that it allows specifying the sort 22338 * orders of the iteratees to sort by. If `orders` is unspecified, all values 22339 * are sorted in ascending order. Otherwise, specify an order of "desc" for 22340 * descending or "asc" for ascending sort order of corresponding values. 22341 * 22342 * @static 22343 * @memberOf _ 22344 * @since 4.0.0 22345 * @category Collection 22346 * @param {Array|Object} collection The collection to iterate over. 22347 * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] 22348 * The iteratees to sort by. 22349 * @param {string[]} [orders] The sort orders of `iteratees`. 22350 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. 22351 * @returns {Array} Returns the new sorted array. 22352 * @example 22353 * 22354 * var users = [ 22355 * { 'user': 'fred', 'age': 48 }, 22356 * { 'user': 'barney', 'age': 34 }, 22357 * { 'user': 'fred', 'age': 40 }, 22358 * { 'user': 'barney', 'age': 36 } 22359 * ]; 22360 * 22361 * // Sort by `user` in ascending order and by `age` in descending order. 22362 * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); 22363 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] 22364 */ 22365 function orderBy(collection, iteratees, orders, guard) { 22366 if (collection == null) { 22367 return []; 22368 } 22369 if (!isArray(iteratees)) { 22370 iteratees = iteratees == null ? [] : [iteratees]; 22371 } 22372 orders = guard ? undefined : orders; 22373 if (!isArray(orders)) { 22374 orders = orders == null ? [] : [orders]; 22375 } 22376 return baseOrderBy(collection, iteratees, orders); 22377 } 22378 22379 /** 22380 * Creates an array of elements split into two groups, the first of which 22381 * contains elements `predicate` returns truthy for, the second of which 22382 * contains elements `predicate` returns falsey for. The predicate is 22383 * invoked with one argument: (value). 22384 * 22385 * @static 22386 * @memberOf _ 22387 * @since 3.0.0 22388 * @category Collection 22389 * @param {Array|Object} collection The collection to iterate over. 22390 * @param {Function} [predicate=_.identity] The function invoked per iteration. 22391 * @returns {Array} Returns the array of grouped elements. 22392 * @example 22393 * 22394 * var users = [ 22395 * { 'user': 'barney', 'age': 36, 'active': false }, 22396 * { 'user': 'fred', 'age': 40, 'active': true }, 22397 * { 'user': 'pebbles', 'age': 1, 'active': false } 22398 * ]; 22399 * 22400 * _.partition(users, function(o) { return o.active; }); 22401 * // => objects for [['fred'], ['barney', 'pebbles']] 22402 * 22403 * // The `_.matches` iteratee shorthand. 22404 * _.partition(users, { 'age': 1, 'active': false }); 22405 * // => objects for [['pebbles'], ['barney', 'fred']] 22406 * 22407 * // The `_.matchesProperty` iteratee shorthand. 22408 * _.partition(users, ['active', false]); 22409 * // => objects for [['barney', 'pebbles'], ['fred']] 22410 * 22411 * // The `_.property` iteratee shorthand. 22412 * _.partition(users, 'active'); 22413 * // => objects for [['fred'], ['barney', 'pebbles']] 22414 */ 22415 var partition = createAggregator(function(result, value, key) { 22416 result[key ? 0 : 1].push(value); 22417 }, function() { return [[], []]; }); 22418 22419 /** 22420 * Reduces `collection` to a value which is the accumulated result of running 22421 * each element in `collection` thru `iteratee`, where each successive 22422 * invocation is supplied the return value of the previous. If `accumulator` 22423 * is not given, the first element of `collection` is used as the initial 22424 * value. The iteratee is invoked with four arguments: 22425 * (accumulator, value, index|key, collection). 22426 * 22427 * Many lodash methods are guarded to work as iteratees for methods like 22428 * `_.reduce`, `_.reduceRight`, and `_.transform`. 22429 * 22430 * The guarded methods are: 22431 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, 22432 * and `sortBy` 22433 * 22434 * @static 22435 * @memberOf _ 22436 * @since 0.1.0 22437 * @category Collection 22438 * @param {Array|Object} collection The collection to iterate over. 22439 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22440 * @param {*} [accumulator] The initial value. 22441 * @returns {*} Returns the accumulated value. 22442 * @see _.reduceRight 22443 * @example 22444 * 22445 * _.reduce([1, 2], function(sum, n) { 22446 * return sum + n; 22447 * }, 0); 22448 * // => 3 22449 * 22450 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { 22451 * (result[value] || (result[value] = [])).push(key); 22452 * return result; 22453 * }, {}); 22454 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) 22455 */ 22456 function reduce(collection, iteratee, accumulator) { 22457 var func = isArray(collection) ? arrayReduce : baseReduce, 22458 initAccum = arguments.length < 3; 22459 22460 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); 22461 } 22462 22463 /** 22464 * This method is like `_.reduce` except that it iterates over elements of 22465 * `collection` from right to left. 22466 * 22467 * @static 22468 * @memberOf _ 22469 * @since 0.1.0 22470 * @category Collection 22471 * @param {Array|Object} collection The collection to iterate over. 22472 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 22473 * @param {*} [accumulator] The initial value. 22474 * @returns {*} Returns the accumulated value. 22475 * @see _.reduce 22476 * @example 22477 * 22478 * var array = [[0, 1], [2, 3], [4, 5]]; 22479 * 22480 * _.reduceRight(array, function(flattened, other) { 22481 * return flattened.concat(other); 22482 * }, []); 22483 * // => [4, 5, 2, 3, 0, 1] 22484 */ 22485 function reduceRight(collection, iteratee, accumulator) { 22486 var func = isArray(collection) ? arrayReduceRight : baseReduce, 22487 initAccum = arguments.length < 3; 22488 22489 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); 22490 } 22491 22492 /** 22493 * The opposite of `_.filter`; this method returns the elements of `collection` 22494 * that `predicate` does **not** return truthy for. 22495 * 22496 * @static 22497 * @memberOf _ 22498 * @since 0.1.0 22499 * @category Collection 22500 * @param {Array|Object} collection The collection to iterate over. 22501 * @param {Function} [predicate=_.identity] The function invoked per iteration. 22502 * @returns {Array} Returns the new filtered array. 22503 * @see _.filter 22504 * @example 22505 * 22506 * var users = [ 22507 * { 'user': 'barney', 'age': 36, 'active': false }, 22508 * { 'user': 'fred', 'age': 40, 'active': true } 22509 * ]; 22510 * 22511 * _.reject(users, function(o) { return !o.active; }); 22512 * // => objects for ['fred'] 22513 * 22514 * // The `_.matches` iteratee shorthand. 22515 * _.reject(users, { 'age': 40, 'active': true }); 22516 * // => objects for ['barney'] 22517 * 22518 * // The `_.matchesProperty` iteratee shorthand. 22519 * _.reject(users, ['active', false]); 22520 * // => objects for ['fred'] 22521 * 22522 * // The `_.property` iteratee shorthand. 22523 * _.reject(users, 'active'); 22524 * // => objects for ['barney'] 22525 */ 22526 function reject(collection, predicate) { 22527 var func = isArray(collection) ? arrayFilter : baseFilter; 22528 return func(collection, negate(getIteratee(predicate, 3))); 22529 } 22530 22531 /** 22532 * Gets a random element from `collection`. 22533 * 22534 * @static 22535 * @memberOf _ 22536 * @since 2.0.0 22537 * @category Collection 22538 * @param {Array|Object} collection The collection to sample. 22539 * @returns {*} Returns the random element. 22540 * @example 22541 * 22542 * _.sample([1, 2, 3, 4]); 22543 * // => 2 22544 */ 22545 function sample(collection) { 22546 var func = isArray(collection) ? arraySample : baseSample; 22547 return func(collection); 22548 } 22549 22550 /** 22551 * Gets `n` random elements at unique keys from `collection` up to the 22552 * size of `collection`. 22553 * 22554 * @static 22555 * @memberOf _ 22556 * @since 4.0.0 22557 * @category Collection 22558 * @param {Array|Object} collection The collection to sample. 22559 * @param {number} [n=1] The number of elements to sample. 22560 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 22561 * @returns {Array} Returns the random elements. 22562 * @example 22563 * 22564 * _.sampleSize([1, 2, 3], 2); 22565 * // => [3, 1] 22566 * 22567 * _.sampleSize([1, 2, 3], 4); 22568 * // => [2, 3, 1] 22569 */ 22570 function sampleSize(collection, n, guard) { 22571 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { 22572 n = 1; 22573 } else { 22574 n = toInteger(n); 22575 } 22576 var func = isArray(collection) ? arraySampleSize : baseSampleSize; 22577 return func(collection, n); 22578 } 22579 22580 /** 22581 * Creates an array of shuffled values, using a version of the 22582 * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). 22583 * 22584 * @static 22585 * @memberOf _ 22586 * @since 0.1.0 22587 * @category Collection 22588 * @param {Array|Object} collection The collection to shuffle. 22589 * @returns {Array} Returns the new shuffled array. 22590 * @example 22591 * 22592 * _.shuffle([1, 2, 3, 4]); 22593 * // => [4, 1, 3, 2] 22594 */ 22595 function shuffle(collection) { 22596 var func = isArray(collection) ? arrayShuffle : baseShuffle; 22597 return func(collection); 22598 } 22599 22600 /** 22601 * Gets the size of `collection` by returning its length for array-like 22602 * values or the number of own enumerable string keyed properties for objects. 22603 * 22604 * @static 22605 * @memberOf _ 22606 * @since 0.1.0 22607 * @category Collection 22608 * @param {Array|Object|string} collection The collection to inspect. 22609 * @returns {number} Returns the collection size. 22610 * @example 22611 * 22612 * _.size([1, 2, 3]); 22613 * // => 3 22614 * 22615 * _.size({ 'a': 1, 'b': 2 }); 22616 * // => 2 22617 * 22618 * _.size('pebbles'); 22619 * // => 7 22620 */ 22621 function size(collection) { 22622 if (collection == null) { 22623 return 0; 22624 } 22625 if (isArrayLike(collection)) { 22626 return isString(collection) ? stringSize(collection) : collection.length; 22627 } 22628 var tag = getTag(collection); 22629 if (tag == mapTag || tag == setTag) { 22630 return collection.size; 22631 } 22632 return baseKeys(collection).length; 22633 } 22634 22635 /** 22636 * Checks if `predicate` returns truthy for **any** element of `collection`. 22637 * Iteration is stopped once `predicate` returns truthy. The predicate is 22638 * invoked with three arguments: (value, index|key, collection). 22639 * 22640 * @static 22641 * @memberOf _ 22642 * @since 0.1.0 22643 * @category Collection 22644 * @param {Array|Object} collection The collection to iterate over. 22645 * @param {Function} [predicate=_.identity] The function invoked per iteration. 22646 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 22647 * @returns {boolean} Returns `true` if any element passes the predicate check, 22648 * else `false`. 22649 * @example 22650 * 22651 * _.some([null, 0, 'yes', false], Boolean); 22652 * // => true 22653 * 22654 * var users = [ 22655 * { 'user': 'barney', 'active': true }, 22656 * { 'user': 'fred', 'active': false } 22657 * ]; 22658 * 22659 * // The `_.matches` iteratee shorthand. 22660 * _.some(users, { 'user': 'barney', 'active': false }); 22661 * // => false 22662 * 22663 * // The `_.matchesProperty` iteratee shorthand. 22664 * _.some(users, ['active', false]); 22665 * // => true 22666 * 22667 * // The `_.property` iteratee shorthand. 22668 * _.some(users, 'active'); 22669 * // => true 22670 */ 22671 function some(collection, predicate, guard) { 22672 var func = isArray(collection) ? arraySome : baseSome; 22673 if (guard && isIterateeCall(collection, predicate, guard)) { 22674 predicate = undefined; 22675 } 22676 return func(collection, getIteratee(predicate, 3)); 22677 } 22678 22679 /** 22680 * Creates an array of elements, sorted in ascending order by the results of 22681 * running each element in a collection thru each iteratee. This method 22682 * performs a stable sort, that is, it preserves the original sort order of 22683 * equal elements. The iteratees are invoked with one argument: (value). 22684 * 22685 * @static 22686 * @memberOf _ 22687 * @since 0.1.0 22688 * @category Collection 22689 * @param {Array|Object} collection The collection to iterate over. 22690 * @param {...(Function|Function[])} [iteratees=[_.identity]] 22691 * The iteratees to sort by. 22692 * @returns {Array} Returns the new sorted array. 22693 * @example 22694 * 22695 * var users = [ 22696 * { 'user': 'fred', 'age': 48 }, 22697 * { 'user': 'barney', 'age': 36 }, 22698 * { 'user': 'fred', 'age': 30 }, 22699 * { 'user': 'barney', 'age': 34 } 22700 * ]; 22701 * 22702 * _.sortBy(users, [function(o) { return o.user; }]); 22703 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] 22704 * 22705 * _.sortBy(users, ['user', 'age']); 22706 * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] 22707 */ 22708 var sortBy = baseRest(function(collection, iteratees) { 22709 if (collection == null) { 22710 return []; 22711 } 22712 var length = iteratees.length; 22713 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { 22714 iteratees = []; 22715 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { 22716 iteratees = [iteratees[0]]; 22717 } 22718 return baseOrderBy(collection, baseFlatten(iteratees, 1), []); 22719 }); 22720 22721 /*------------------------------------------------------------------------*/ 22722 22723 /** 22724 * Gets the timestamp of the number of milliseconds that have elapsed since 22725 * the Unix epoch (1 January 1970 00:00:00 UTC). 22726 * 22727 * @static 22728 * @memberOf _ 22729 * @since 2.4.0 22730 * @category Date 22731 * @returns {number} Returns the timestamp. 22732 * @example 22733 * 22734 * _.defer(function(stamp) { 22735 * console.log(_.now() - stamp); 22736 * }, _.now()); 22737 * // => Logs the number of milliseconds it took for the deferred invocation. 22738 */ 22739 var now = ctxNow || function() { 22740 return root.Date.now(); 22741 }; 22742 22743 /*------------------------------------------------------------------------*/ 22744 22745 /** 22746 * The opposite of `_.before`; this method creates a function that invokes 22747 * `func` once it's called `n` or more times. 22748 * 22749 * @static 22750 * @memberOf _ 22751 * @since 0.1.0 22752 * @category Function 22753 * @param {number} n The number of calls before `func` is invoked. 22754 * @param {Function} func The function to restrict. 22755 * @returns {Function} Returns the new restricted function. 22756 * @example 22757 * 22758 * var saves = ['profile', 'settings']; 22759 * 22760 * var done = _.after(saves.length, function() { 22761 * console.log('done saving!'); 22762 * }); 22763 * 22764 * _.forEach(saves, function(type) { 22765 * asyncSave({ 'type': type, 'complete': done }); 22766 * }); 22767 * // => Logs 'done saving!' after the two async saves have completed. 22768 */ 22769 function after(n, func) { 22770 if (typeof func != 'function') { 22771 throw new TypeError(FUNC_ERROR_TEXT); 22772 } 22773 n = toInteger(n); 22774 return function() { 22775 if (--n < 1) { 22776 return func.apply(this, arguments); 22777 } 22778 }; 22779 } 22780 22781 /** 22782 * Creates a function that invokes `func`, with up to `n` arguments, 22783 * ignoring any additional arguments. 22784 * 22785 * @static 22786 * @memberOf _ 22787 * @since 3.0.0 22788 * @category Function 22789 * @param {Function} func The function to cap arguments for. 22790 * @param {number} [n=func.length] The arity cap. 22791 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 22792 * @returns {Function} Returns the new capped function. 22793 * @example 22794 * 22795 * _.map(['6', '8', '10'], _.ary(parseInt, 1)); 22796 * // => [6, 8, 10] 22797 */ 22798 function ary(func, n, guard) { 22799 n = guard ? undefined : n; 22800 n = (func && n == null) ? func.length : n; 22801 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); 22802 } 22803 22804 /** 22805 * Creates a function that invokes `func`, with the `this` binding and arguments 22806 * of the created function, while it's called less than `n` times. Subsequent 22807 * calls to the created function return the result of the last `func` invocation. 22808 * 22809 * @static 22810 * @memberOf _ 22811 * @since 3.0.0 22812 * @category Function 22813 * @param {number} n The number of calls at which `func` is no longer invoked. 22814 * @param {Function} func The function to restrict. 22815 * @returns {Function} Returns the new restricted function. 22816 * @example 22817 * 22818 * jQuery(element).on('click', _.before(5, addContactToList)); 22819 * // => Allows adding up to 4 contacts to the list. 22820 */ 22821 function before(n, func) { 22822 var result; 22823 if (typeof func != 'function') { 22824 throw new TypeError(FUNC_ERROR_TEXT); 22825 } 22826 n = toInteger(n); 22827 return function() { 22828 if (--n > 0) { 22829 result = func.apply(this, arguments); 22830 } 22831 if (n <= 1) { 22832 func = undefined; 22833 } 22834 return result; 22835 }; 22836 } 22837 22838 /** 22839 * Creates a function that invokes `func` with the `this` binding of `thisArg` 22840 * and `partials` prepended to the arguments it receives. 22841 * 22842 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, 22843 * may be used as a placeholder for partially applied arguments. 22844 * 22845 * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" 22846 * property of bound functions. 22847 * 22848 * @static 22849 * @memberOf _ 22850 * @since 0.1.0 22851 * @category Function 22852 * @param {Function} func The function to bind. 22853 * @param {*} thisArg The `this` binding of `func`. 22854 * @param {...*} [partials] The arguments to be partially applied. 22855 * @returns {Function} Returns the new bound function. 22856 * @example 22857 * 22858 * function greet(greeting, punctuation) { 22859 * return greeting + ' ' + this.user + punctuation; 22860 * } 22861 * 22862 * var object = { 'user': 'fred' }; 22863 * 22864 * var bound = _.bind(greet, object, 'hi'); 22865 * bound('!'); 22866 * // => 'hi fred!' 22867 * 22868 * // Bound with placeholders. 22869 * var bound = _.bind(greet, object, _, '!'); 22870 * bound('hi'); 22871 * // => 'hi fred!' 22872 */ 22873 var bind = baseRest(function(func, thisArg, partials) { 22874 var bitmask = WRAP_BIND_FLAG; 22875 if (partials.length) { 22876 var holders = replaceHolders(partials, getHolder(bind)); 22877 bitmask |= WRAP_PARTIAL_FLAG; 22878 } 22879 return createWrap(func, bitmask, thisArg, partials, holders); 22880 }); 22881 22882 /** 22883 * Creates a function that invokes the method at `object[key]` with `partials` 22884 * prepended to the arguments it receives. 22885 * 22886 * This method differs from `_.bind` by allowing bound functions to reference 22887 * methods that may be redefined or don't yet exist. See 22888 * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) 22889 * for more details. 22890 * 22891 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic 22892 * builds, may be used as a placeholder for partially applied arguments. 22893 * 22894 * @static 22895 * @memberOf _ 22896 * @since 0.10.0 22897 * @category Function 22898 * @param {Object} object The object to invoke the method on. 22899 * @param {string} key The key of the method. 22900 * @param {...*} [partials] The arguments to be partially applied. 22901 * @returns {Function} Returns the new bound function. 22902 * @example 22903 * 22904 * var object = { 22905 * 'user': 'fred', 22906 * 'greet': function(greeting, punctuation) { 22907 * return greeting + ' ' + this.user + punctuation; 22908 * } 22909 * }; 22910 * 22911 * var bound = _.bindKey(object, 'greet', 'hi'); 22912 * bound('!'); 22913 * // => 'hi fred!' 22914 * 22915 * object.greet = function(greeting, punctuation) { 22916 * return greeting + 'ya ' + this.user + punctuation; 22917 * }; 22918 * 22919 * bound('!'); 22920 * // => 'hiya fred!' 22921 * 22922 * // Bound with placeholders. 22923 * var bound = _.bindKey(object, 'greet', _, '!'); 22924 * bound('hi'); 22925 * // => 'hiya fred!' 22926 */ 22927 var bindKey = baseRest(function(object, key, partials) { 22928 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; 22929 if (partials.length) { 22930 var holders = replaceHolders(partials, getHolder(bindKey)); 22931 bitmask |= WRAP_PARTIAL_FLAG; 22932 } 22933 return createWrap(key, bitmask, object, partials, holders); 22934 }); 22935 22936 /** 22937 * Creates a function that accepts arguments of `func` and either invokes 22938 * `func` returning its result, if at least `arity` number of arguments have 22939 * been provided, or returns a function that accepts the remaining `func` 22940 * arguments, and so on. The arity of `func` may be specified if `func.length` 22941 * is not sufficient. 22942 * 22943 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, 22944 * may be used as a placeholder for provided arguments. 22945 * 22946 * **Note:** This method doesn't set the "length" property of curried functions. 22947 * 22948 * @static 22949 * @memberOf _ 22950 * @since 2.0.0 22951 * @category Function 22952 * @param {Function} func The function to curry. 22953 * @param {number} [arity=func.length] The arity of `func`. 22954 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 22955 * @returns {Function} Returns the new curried function. 22956 * @example 22957 * 22958 * var abc = function(a, b, c) { 22959 * return [a, b, c]; 22960 * }; 22961 * 22962 * var curried = _.curry(abc); 22963 * 22964 * curried(1)(2)(3); 22965 * // => [1, 2, 3] 22966 * 22967 * curried(1, 2)(3); 22968 * // => [1, 2, 3] 22969 * 22970 * curried(1, 2, 3); 22971 * // => [1, 2, 3] 22972 * 22973 * // Curried with placeholders. 22974 * curried(1)(_, 3)(2); 22975 * // => [1, 2, 3] 22976 */ 22977 function curry(func, arity, guard) { 22978 arity = guard ? undefined : arity; 22979 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); 22980 result.placeholder = curry.placeholder; 22981 return result; 22982 } 22983 22984 /** 22985 * This method is like `_.curry` except that arguments are applied to `func` 22986 * in the manner of `_.partialRight` instead of `_.partial`. 22987 * 22988 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic 22989 * builds, may be used as a placeholder for provided arguments. 22990 * 22991 * **Note:** This method doesn't set the "length" property of curried functions. 22992 * 22993 * @static 22994 * @memberOf _ 22995 * @since 3.0.0 22996 * @category Function 22997 * @param {Function} func The function to curry. 22998 * @param {number} [arity=func.length] The arity of `func`. 22999 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 23000 * @returns {Function} Returns the new curried function. 23001 * @example 23002 * 23003 * var abc = function(a, b, c) { 23004 * return [a, b, c]; 23005 * }; 23006 * 23007 * var curried = _.curryRight(abc); 23008 * 23009 * curried(3)(2)(1); 23010 * // => [1, 2, 3] 23011 * 23012 * curried(2, 3)(1); 23013 * // => [1, 2, 3] 23014 * 23015 * curried(1, 2, 3); 23016 * // => [1, 2, 3] 23017 * 23018 * // Curried with placeholders. 23019 * curried(3)(1, _)(2); 23020 * // => [1, 2, 3] 23021 */ 23022 function curryRight(func, arity, guard) { 23023 arity = guard ? undefined : arity; 23024 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); 23025 result.placeholder = curryRight.placeholder; 23026 return result; 23027 } 23028 23029 /** 23030 * Creates a debounced function that delays invoking `func` until after `wait` 23031 * milliseconds have elapsed since the last time the debounced function was 23032 * invoked. The debounced function comes with a `cancel` method to cancel 23033 * delayed `func` invocations and a `flush` method to immediately invoke them. 23034 * Provide `options` to indicate whether `func` should be invoked on the 23035 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked 23036 * with the last arguments provided to the debounced function. Subsequent 23037 * calls to the debounced function return the result of the last `func` 23038 * invocation. 23039 * 23040 * **Note:** If `leading` and `trailing` options are `true`, `func` is 23041 * invoked on the trailing edge of the timeout only if the debounced function 23042 * is invoked more than once during the `wait` timeout. 23043 * 23044 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred 23045 * until to the next tick, similar to `setTimeout` with a timeout of `0`. 23046 * 23047 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) 23048 * for details over the differences between `_.debounce` and `_.throttle`. 23049 * 23050 * @static 23051 * @memberOf _ 23052 * @since 0.1.0 23053 * @category Function 23054 * @param {Function} func The function to debounce. 23055 * @param {number} [wait=0] The number of milliseconds to delay. 23056 * @param {Object} [options={}] The options object. 23057 * @param {boolean} [options.leading=false] 23058 * Specify invoking on the leading edge of the timeout. 23059 * @param {number} [options.maxWait] 23060 * The maximum time `func` is allowed to be delayed before it's invoked. 23061 * @param {boolean} [options.trailing=true] 23062 * Specify invoking on the trailing edge of the timeout. 23063 * @returns {Function} Returns the new debounced function. 23064 * @example 23065 * 23066 * // Avoid costly calculations while the window size is in flux. 23067 * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); 23068 * 23069 * // Invoke `sendMail` when clicked, debouncing subsequent calls. 23070 * jQuery(element).on('click', _.debounce(sendMail, 300, { 23071 * 'leading': true, 23072 * 'trailing': false 23073 * })); 23074 * 23075 * // Ensure `batchLog` is invoked once after 1 second of debounced calls. 23076 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); 23077 * var source = new EventSource('/stream'); 23078 * jQuery(source).on('message', debounced); 23079 * 23080 * // Cancel the trailing debounced invocation. 23081 * jQuery(window).on('popstate', debounced.cancel); 23082 */ 23083 function debounce(func, wait, options) { 23084 var lastArgs, 23085 lastThis, 23086 maxWait, 23087 result, 23088 timerId, 23089 lastCallTime, 23090 lastInvokeTime = 0, 23091 leading = false, 23092 maxing = false, 23093 trailing = true; 23094 23095 if (typeof func != 'function') { 23096 throw new TypeError(FUNC_ERROR_TEXT); 23097 } 23098 wait = toNumber(wait) || 0; 23099 if (isObject(options)) { 23100 leading = !!options.leading; 23101 maxing = 'maxWait' in options; 23102 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; 23103 trailing = 'trailing' in options ? !!options.trailing : trailing; 23104 } 23105 23106 function invokeFunc(time) { 23107 var args = lastArgs, 23108 thisArg = lastThis; 23109 23110 lastArgs = lastThis = undefined; 23111 lastInvokeTime = time; 23112 result = func.apply(thisArg, args); 23113 return result; 23114 } 23115 23116 function leadingEdge(time) { 23117 // Reset any `maxWait` timer. 23118 lastInvokeTime = time; 23119 // Start the timer for the trailing edge. 23120 timerId = setTimeout(timerExpired, wait); 23121 // Invoke the leading edge. 23122 return leading ? invokeFunc(time) : result; 23123 } 23124 23125 function remainingWait(time) { 23126 var timeSinceLastCall = time - lastCallTime, 23127 timeSinceLastInvoke = time - lastInvokeTime, 23128 timeWaiting = wait - timeSinceLastCall; 23129 23130 return maxing 23131 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) 23132 : timeWaiting; 23133 } 23134 23135 function shouldInvoke(time) { 23136 var timeSinceLastCall = time - lastCallTime, 23137 timeSinceLastInvoke = time - lastInvokeTime; 23138 23139 // Either this is the first call, activity has stopped and we're at the 23140 // trailing edge, the system time has gone backwards and we're treating 23141 // it as the trailing edge, or we've hit the `maxWait` limit. 23142 return (lastCallTime === undefined || (timeSinceLastCall >= wait) || 23143 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); 23144 } 23145 23146 function timerExpired() { 23147 var time = now(); 23148 if (shouldInvoke(time)) { 23149 return trailingEdge(time); 23150 } 23151 // Restart the timer. 23152 timerId = setTimeout(timerExpired, remainingWait(time)); 23153 } 23154 23155 function trailingEdge(time) { 23156 timerId = undefined; 23157 23158 // Only invoke if we have `lastArgs` which means `func` has been 23159 // debounced at least once. 23160 if (trailing && lastArgs) { 23161 return invokeFunc(time); 23162 } 23163 lastArgs = lastThis = undefined; 23164 return result; 23165 } 23166 23167 function cancel() { 23168 if (timerId !== undefined) { 23169 clearTimeout(timerId); 23170 } 23171 lastInvokeTime = 0; 23172 lastArgs = lastCallTime = lastThis = timerId = undefined; 23173 } 23174 23175 function flush() { 23176 return timerId === undefined ? result : trailingEdge(now()); 23177 } 23178 23179 function debounced() { 23180 var time = now(), 23181 isInvoking = shouldInvoke(time); 23182 23183 lastArgs = arguments; 23184 lastThis = this; 23185 lastCallTime = time; 23186 23187 if (isInvoking) { 23188 if (timerId === undefined) { 23189 return leadingEdge(lastCallTime); 23190 } 23191 if (maxing) { 23192 // Handle invocations in a tight loop. 23193 clearTimeout(timerId); 23194 timerId = setTimeout(timerExpired, wait); 23195 return invokeFunc(lastCallTime); 23196 } 23197 } 23198 if (timerId === undefined) { 23199 timerId = setTimeout(timerExpired, wait); 23200 } 23201 return result; 23202 } 23203 debounced.cancel = cancel; 23204 debounced.flush = flush; 23205 return debounced; 23206 } 23207 23208 /** 23209 * Defers invoking the `func` until the current call stack has cleared. Any 23210 * additional arguments are provided to `func` when it's invoked. 23211 * 23212 * @static 23213 * @memberOf _ 23214 * @since 0.1.0 23215 * @category Function 23216 * @param {Function} func The function to defer. 23217 * @param {...*} [args] The arguments to invoke `func` with. 23218 * @returns {number} Returns the timer id. 23219 * @example 23220 * 23221 * _.defer(function(text) { 23222 * console.log(text); 23223 * }, 'deferred'); 23224 * // => Logs 'deferred' after one millisecond. 23225 */ 23226 var defer = baseRest(function(func, args) { 23227 return baseDelay(func, 1, args); 23228 }); 23229 23230 /** 23231 * Invokes `func` after `wait` milliseconds. Any additional arguments are 23232 * provided to `func` when it's invoked. 23233 * 23234 * @static 23235 * @memberOf _ 23236 * @since 0.1.0 23237 * @category Function 23238 * @param {Function} func The function to delay. 23239 * @param {number} wait The number of milliseconds to delay invocation. 23240 * @param {...*} [args] The arguments to invoke `func` with. 23241 * @returns {number} Returns the timer id. 23242 * @example 23243 * 23244 * _.delay(function(text) { 23245 * console.log(text); 23246 * }, 1000, 'later'); 23247 * // => Logs 'later' after one second. 23248 */ 23249 var delay = baseRest(function(func, wait, args) { 23250 return baseDelay(func, toNumber(wait) || 0, args); 23251 }); 23252 23253 /** 23254 * Creates a function that invokes `func` with arguments reversed. 23255 * 23256 * @static 23257 * @memberOf _ 23258 * @since 4.0.0 23259 * @category Function 23260 * @param {Function} func The function to flip arguments for. 23261 * @returns {Function} Returns the new flipped function. 23262 * @example 23263 * 23264 * var flipped = _.flip(function() { 23265 * return _.toArray(arguments); 23266 * }); 23267 * 23268 * flipped('a', 'b', 'c', 'd'); 23269 * // => ['d', 'c', 'b', 'a'] 23270 */ 23271 function flip(func) { 23272 return createWrap(func, WRAP_FLIP_FLAG); 23273 } 23274 23275 /** 23276 * Creates a function that memoizes the result of `func`. If `resolver` is 23277 * provided, it determines the cache key for storing the result based on the 23278 * arguments provided to the memoized function. By default, the first argument 23279 * provided to the memoized function is used as the map cache key. The `func` 23280 * is invoked with the `this` binding of the memoized function. 23281 * 23282 * **Note:** The cache is exposed as the `cache` property on the memoized 23283 * function. Its creation may be customized by replacing the `_.memoize.Cache` 23284 * constructor with one whose instances implement the 23285 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) 23286 * method interface of `clear`, `delete`, `get`, `has`, and `set`. 23287 * 23288 * @static 23289 * @memberOf _ 23290 * @since 0.1.0 23291 * @category Function 23292 * @param {Function} func The function to have its output memoized. 23293 * @param {Function} [resolver] The function to resolve the cache key. 23294 * @returns {Function} Returns the new memoized function. 23295 * @example 23296 * 23297 * var object = { 'a': 1, 'b': 2 }; 23298 * var other = { 'c': 3, 'd': 4 }; 23299 * 23300 * var values = _.memoize(_.values); 23301 * values(object); 23302 * // => [1, 2] 23303 * 23304 * values(other); 23305 * // => [3, 4] 23306 * 23307 * object.a = 2; 23308 * values(object); 23309 * // => [1, 2] 23310 * 23311 * // Modify the result cache. 23312 * values.cache.set(object, ['a', 'b']); 23313 * values(object); 23314 * // => ['a', 'b'] 23315 * 23316 * // Replace `_.memoize.Cache`. 23317 * _.memoize.Cache = WeakMap; 23318 */ 23319 function memoize(func, resolver) { 23320 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { 23321 throw new TypeError(FUNC_ERROR_TEXT); 23322 } 23323 var memoized = function() { 23324 var args = arguments, 23325 key = resolver ? resolver.apply(this, args) : args[0], 23326 cache = memoized.cache; 23327 23328 if (cache.has(key)) { 23329 return cache.get(key); 23330 } 23331 var result = func.apply(this, args); 23332 memoized.cache = cache.set(key, result) || cache; 23333 return result; 23334 }; 23335 memoized.cache = new (memoize.Cache || MapCache); 23336 return memoized; 23337 } 23338 23339 // Expose `MapCache`. 23340 memoize.Cache = MapCache; 23341 23342 /** 23343 * Creates a function that negates the result of the predicate `func`. The 23344 * `func` predicate is invoked with the `this` binding and arguments of the 23345 * created function. 23346 * 23347 * @static 23348 * @memberOf _ 23349 * @since 3.0.0 23350 * @category Function 23351 * @param {Function} predicate The predicate to negate. 23352 * @returns {Function} Returns the new negated function. 23353 * @example 23354 * 23355 * function isEven(n) { 23356 * return n % 2 == 0; 23357 * } 23358 * 23359 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); 23360 * // => [1, 3, 5] 23361 */ 23362 function negate(predicate) { 23363 if (typeof predicate != 'function') { 23364 throw new TypeError(FUNC_ERROR_TEXT); 23365 } 23366 return function() { 23367 var args = arguments; 23368 switch (args.length) { 23369 case 0: return !predicate.call(this); 23370 case 1: return !predicate.call(this, args[0]); 23371 case 2: return !predicate.call(this, args[0], args[1]); 23372 case 3: return !predicate.call(this, args[0], args[1], args[2]); 23373 } 23374 return !predicate.apply(this, args); 23375 }; 23376 } 23377 23378 /** 23379 * Creates a function that is restricted to invoking `func` once. Repeat calls 23380 * to the function return the value of the first invocation. The `func` is 23381 * invoked with the `this` binding and arguments of the created function. 23382 * 23383 * @static 23384 * @memberOf _ 23385 * @since 0.1.0 23386 * @category Function 23387 * @param {Function} func The function to restrict. 23388 * @returns {Function} Returns the new restricted function. 23389 * @example 23390 * 23391 * var initialize = _.once(createApplication); 23392 * initialize(); 23393 * initialize(); 23394 * // => `createApplication` is invoked once 23395 */ 23396 function once(func) { 23397 return before(2, func); 23398 } 23399 23400 /** 23401 * Creates a function that invokes `func` with its arguments transformed. 23402 * 23403 * @static 23404 * @since 4.0.0 23405 * @memberOf _ 23406 * @category Function 23407 * @param {Function} func The function to wrap. 23408 * @param {...(Function|Function[])} [transforms=[_.identity]] 23409 * The argument transforms. 23410 * @returns {Function} Returns the new function. 23411 * @example 23412 * 23413 * function doubled(n) { 23414 * return n * 2; 23415 * } 23416 * 23417 * function square(n) { 23418 * return n * n; 23419 * } 23420 * 23421 * var func = _.overArgs(function(x, y) { 23422 * return [x, y]; 23423 * }, [square, doubled]); 23424 * 23425 * func(9, 3); 23426 * // => [81, 6] 23427 * 23428 * func(10, 5); 23429 * // => [100, 10] 23430 */ 23431 var overArgs = castRest(function(func, transforms) { 23432 transforms = (transforms.length == 1 && isArray(transforms[0])) 23433 ? arrayMap(transforms[0], baseUnary(getIteratee())) 23434 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); 23435 23436 var funcsLength = transforms.length; 23437 return baseRest(function(args) { 23438 var index = -1, 23439 length = nativeMin(args.length, funcsLength); 23440 23441 while (++index < length) { 23442 args[index] = transforms[index].call(this, args[index]); 23443 } 23444 return apply(func, this, args); 23445 }); 23446 }); 23447 23448 /** 23449 * Creates a function that invokes `func` with `partials` prepended to the 23450 * arguments it receives. This method is like `_.bind` except it does **not** 23451 * alter the `this` binding. 23452 * 23453 * The `_.partial.placeholder` value, which defaults to `_` in monolithic 23454 * builds, may be used as a placeholder for partially applied arguments. 23455 * 23456 * **Note:** This method doesn't set the "length" property of partially 23457 * applied functions. 23458 * 23459 * @static 23460 * @memberOf _ 23461 * @since 0.2.0 23462 * @category Function 23463 * @param {Function} func The function to partially apply arguments to. 23464 * @param {...*} [partials] The arguments to be partially applied. 23465 * @returns {Function} Returns the new partially applied function. 23466 * @example 23467 * 23468 * function greet(greeting, name) { 23469 * return greeting + ' ' + name; 23470 * } 23471 * 23472 * var sayHelloTo = _.partial(greet, 'hello'); 23473 * sayHelloTo('fred'); 23474 * // => 'hello fred' 23475 * 23476 * // Partially applied with placeholders. 23477 * var greetFred = _.partial(greet, _, 'fred'); 23478 * greetFred('hi'); 23479 * // => 'hi fred' 23480 */ 23481 var partial = baseRest(function(func, partials) { 23482 var holders = replaceHolders(partials, getHolder(partial)); 23483 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); 23484 }); 23485 23486 /** 23487 * This method is like `_.partial` except that partially applied arguments 23488 * are appended to the arguments it receives. 23489 * 23490 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic 23491 * builds, may be used as a placeholder for partially applied arguments. 23492 * 23493 * **Note:** This method doesn't set the "length" property of partially 23494 * applied functions. 23495 * 23496 * @static 23497 * @memberOf _ 23498 * @since 1.0.0 23499 * @category Function 23500 * @param {Function} func The function to partially apply arguments to. 23501 * @param {...*} [partials] The arguments to be partially applied. 23502 * @returns {Function} Returns the new partially applied function. 23503 * @example 23504 * 23505 * function greet(greeting, name) { 23506 * return greeting + ' ' + name; 23507 * } 23508 * 23509 * var greetFred = _.partialRight(greet, 'fred'); 23510 * greetFred('hi'); 23511 * // => 'hi fred' 23512 * 23513 * // Partially applied with placeholders. 23514 * var sayHelloTo = _.partialRight(greet, 'hello', _); 23515 * sayHelloTo('fred'); 23516 * // => 'hello fred' 23517 */ 23518 var partialRight = baseRest(function(func, partials) { 23519 var holders = replaceHolders(partials, getHolder(partialRight)); 23520 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); 23521 }); 23522 23523 /** 23524 * Creates a function that invokes `func` with arguments arranged according 23525 * to the specified `indexes` where the argument value at the first index is 23526 * provided as the first argument, the argument value at the second index is 23527 * provided as the second argument, and so on. 23528 * 23529 * @static 23530 * @memberOf _ 23531 * @since 3.0.0 23532 * @category Function 23533 * @param {Function} func The function to rearrange arguments for. 23534 * @param {...(number|number[])} indexes The arranged argument indexes. 23535 * @returns {Function} Returns the new function. 23536 * @example 23537 * 23538 * var rearged = _.rearg(function(a, b, c) { 23539 * return [a, b, c]; 23540 * }, [2, 0, 1]); 23541 * 23542 * rearged('b', 'c', 'a') 23543 * // => ['a', 'b', 'c'] 23544 */ 23545 var rearg = flatRest(function(func, indexes) { 23546 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); 23547 }); 23548 23549 /** 23550 * Creates a function that invokes `func` with the `this` binding of the 23551 * created function and arguments from `start` and beyond provided as 23552 * an array. 23553 * 23554 * **Note:** This method is based on the 23555 * [rest parameter](https://mdn.io/rest_parameters). 23556 * 23557 * @static 23558 * @memberOf _ 23559 * @since 4.0.0 23560 * @category Function 23561 * @param {Function} func The function to apply a rest parameter to. 23562 * @param {number} [start=func.length-1] The start position of the rest parameter. 23563 * @returns {Function} Returns the new function. 23564 * @example 23565 * 23566 * var say = _.rest(function(what, names) { 23567 * return what + ' ' + _.initial(names).join(', ') + 23568 * (_.size(names) > 1 ? ', & ' : '') + _.last(names); 23569 * }); 23570 * 23571 * say('hello', 'fred', 'barney', 'pebbles'); 23572 * // => 'hello fred, barney, & pebbles' 23573 */ 23574 function rest(func, start) { 23575 if (typeof func != 'function') { 23576 throw new TypeError(FUNC_ERROR_TEXT); 23577 } 23578 start = start === undefined ? start : toInteger(start); 23579 return baseRest(func, start); 23580 } 23581 23582 /** 23583 * Creates a function that invokes `func` with the `this` binding of the 23584 * create function and an array of arguments much like 23585 * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). 23586 * 23587 * **Note:** This method is based on the 23588 * [spread operator](https://mdn.io/spread_operator). 23589 * 23590 * @static 23591 * @memberOf _ 23592 * @since 3.2.0 23593 * @category Function 23594 * @param {Function} func The function to spread arguments over. 23595 * @param {number} [start=0] The start position of the spread. 23596 * @returns {Function} Returns the new function. 23597 * @example 23598 * 23599 * var say = _.spread(function(who, what) { 23600 * return who + ' says ' + what; 23601 * }); 23602 * 23603 * say(['fred', 'hello']); 23604 * // => 'fred says hello' 23605 * 23606 * var numbers = Promise.all([ 23607 * Promise.resolve(40), 23608 * Promise.resolve(36) 23609 * ]); 23610 * 23611 * numbers.then(_.spread(function(x, y) { 23612 * return x + y; 23613 * })); 23614 * // => a Promise of 76 23615 */ 23616 function spread(func, start) { 23617 if (typeof func != 'function') { 23618 throw new TypeError(FUNC_ERROR_TEXT); 23619 } 23620 start = start == null ? 0 : nativeMax(toInteger(start), 0); 23621 return baseRest(function(args) { 23622 var array = args[start], 23623 otherArgs = castSlice(args, 0, start); 23624 23625 if (array) { 23626 arrayPush(otherArgs, array); 23627 } 23628 return apply(func, this, otherArgs); 23629 }); 23630 } 23631 23632 /** 23633 * Creates a throttled function that only invokes `func` at most once per 23634 * every `wait` milliseconds. The throttled function comes with a `cancel` 23635 * method to cancel delayed `func` invocations and a `flush` method to 23636 * immediately invoke them. Provide `options` to indicate whether `func` 23637 * should be invoked on the leading and/or trailing edge of the `wait` 23638 * timeout. The `func` is invoked with the last arguments provided to the 23639 * throttled function. Subsequent calls to the throttled function return the 23640 * result of the last `func` invocation. 23641 * 23642 * **Note:** If `leading` and `trailing` options are `true`, `func` is 23643 * invoked on the trailing edge of the timeout only if the throttled function 23644 * is invoked more than once during the `wait` timeout. 23645 * 23646 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred 23647 * until to the next tick, similar to `setTimeout` with a timeout of `0`. 23648 * 23649 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) 23650 * for details over the differences between `_.throttle` and `_.debounce`. 23651 * 23652 * @static 23653 * @memberOf _ 23654 * @since 0.1.0 23655 * @category Function 23656 * @param {Function} func The function to throttle. 23657 * @param {number} [wait=0] The number of milliseconds to throttle invocations to. 23658 * @param {Object} [options={}] The options object. 23659 * @param {boolean} [options.leading=true] 23660 * Specify invoking on the leading edge of the timeout. 23661 * @param {boolean} [options.trailing=true] 23662 * Specify invoking on the trailing edge of the timeout. 23663 * @returns {Function} Returns the new throttled function. 23664 * @example 23665 * 23666 * // Avoid excessively updating the position while scrolling. 23667 * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); 23668 * 23669 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. 23670 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); 23671 * jQuery(element).on('click', throttled); 23672 * 23673 * // Cancel the trailing throttled invocation. 23674 * jQuery(window).on('popstate', throttled.cancel); 23675 */ 23676 function throttle(func, wait, options) { 23677 var leading = true, 23678 trailing = true; 23679 23680 if (typeof func != 'function') { 23681 throw new TypeError(FUNC_ERROR_TEXT); 23682 } 23683 if (isObject(options)) { 23684 leading = 'leading' in options ? !!options.leading : leading; 23685 trailing = 'trailing' in options ? !!options.trailing : trailing; 23686 } 23687 return debounce(func, wait, { 23688 'leading': leading, 23689 'maxWait': wait, 23690 'trailing': trailing 23691 }); 23692 } 23693 23694 /** 23695 * Creates a function that accepts up to one argument, ignoring any 23696 * additional arguments. 23697 * 23698 * @static 23699 * @memberOf _ 23700 * @since 4.0.0 23701 * @category Function 23702 * @param {Function} func The function to cap arguments for. 23703 * @returns {Function} Returns the new capped function. 23704 * @example 23705 * 23706 * _.map(['6', '8', '10'], _.unary(parseInt)); 23707 * // => [6, 8, 10] 23708 */ 23709 function unary(func) { 23710 return ary(func, 1); 23711 } 23712 23713 /** 23714 * Creates a function that provides `value` to `wrapper` as its first 23715 * argument. Any additional arguments provided to the function are appended 23716 * to those provided to the `wrapper`. The wrapper is invoked with the `this` 23717 * binding of the created function. 23718 * 23719 * @static 23720 * @memberOf _ 23721 * @since 0.1.0 23722 * @category Function 23723 * @param {*} value The value to wrap. 23724 * @param {Function} [wrapper=identity] The wrapper function. 23725 * @returns {Function} Returns the new function. 23726 * @example 23727 * 23728 * var p = _.wrap(_.escape, function(func, text) { 23729 * return '<p>' + func(text) + '</p>'; 23730 * }); 23731 * 23732 * p('fred, barney, & pebbles'); 23733 * // => '<p>fred, barney, & pebbles</p>' 23734 */ 23735 function wrap(value, wrapper) { 23736 return partial(castFunction(wrapper), value); 23737 } 23738 23739 /*------------------------------------------------------------------------*/ 23740 23741 /** 23742 * Casts `value` as an array if it's not one. 23743 * 23744 * @static 23745 * @memberOf _ 23746 * @since 4.4.0 23747 * @category Lang 23748 * @param {*} value The value to inspect. 23749 * @returns {Array} Returns the cast array. 23750 * @example 23751 * 23752 * _.castArray(1); 23753 * // => [1] 23754 * 23755 * _.castArray({ 'a': 1 }); 23756 * // => [{ 'a': 1 }] 23757 * 23758 * _.castArray('abc'); 23759 * // => ['abc'] 23760 * 23761 * _.castArray(null); 23762 * // => [null] 23763 * 23764 * _.castArray(undefined); 23765 * // => [undefined] 23766 * 23767 * _.castArray(); 23768 * // => [] 23769 * 23770 * var array = [1, 2, 3]; 23771 * console.log(_.castArray(array) === array); 23772 * // => true 23773 */ 23774 function castArray() { 23775 if (!arguments.length) { 23776 return []; 23777 } 23778 var value = arguments[0]; 23779 return isArray(value) ? value : [value]; 23780 } 23781 23782 /** 23783 * Creates a shallow clone of `value`. 23784 * 23785 * **Note:** This method is loosely based on the 23786 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) 23787 * and supports cloning arrays, array buffers, booleans, date objects, maps, 23788 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed 23789 * arrays. The own enumerable properties of `arguments` objects are cloned 23790 * as plain objects. An empty object is returned for uncloneable values such 23791 * as error objects, functions, DOM nodes, and WeakMaps. 23792 * 23793 * @static 23794 * @memberOf _ 23795 * @since 0.1.0 23796 * @category Lang 23797 * @param {*} value The value to clone. 23798 * @returns {*} Returns the cloned value. 23799 * @see _.cloneDeep 23800 * @example 23801 * 23802 * var objects = [{ 'a': 1 }, { 'b': 2 }]; 23803 * 23804 * var shallow = _.clone(objects); 23805 * console.log(shallow[0] === objects[0]); 23806 * // => true 23807 */ 23808 function clone(value) { 23809 return baseClone(value, CLONE_SYMBOLS_FLAG); 23810 } 23811 23812 /** 23813 * This method is like `_.clone` except that it accepts `customizer` which 23814 * is invoked to produce the cloned value. If `customizer` returns `undefined`, 23815 * cloning is handled by the method instead. The `customizer` is invoked with 23816 * up to four arguments; (value [, index|key, object, stack]). 23817 * 23818 * @static 23819 * @memberOf _ 23820 * @since 4.0.0 23821 * @category Lang 23822 * @param {*} value The value to clone. 23823 * @param {Function} [customizer] The function to customize cloning. 23824 * @returns {*} Returns the cloned value. 23825 * @see _.cloneDeepWith 23826 * @example 23827 * 23828 * function customizer(value) { 23829 * if (_.isElement(value)) { 23830 * return value.cloneNode(false); 23831 * } 23832 * } 23833 * 23834 * var el = _.cloneWith(document.body, customizer); 23835 * 23836 * console.log(el === document.body); 23837 * // => false 23838 * console.log(el.nodeName); 23839 * // => 'BODY' 23840 * console.log(el.childNodes.length); 23841 * // => 0 23842 */ 23843 function cloneWith(value, customizer) { 23844 customizer = typeof customizer == 'function' ? customizer : undefined; 23845 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); 23846 } 23847 23848 /** 23849 * This method is like `_.clone` except that it recursively clones `value`. 23850 * 23851 * @static 23852 * @memberOf _ 23853 * @since 1.0.0 23854 * @category Lang 23855 * @param {*} value The value to recursively clone. 23856 * @returns {*} Returns the deep cloned value. 23857 * @see _.clone 23858 * @example 23859 * 23860 * var objects = [{ 'a': 1 }, { 'b': 2 }]; 23861 * 23862 * var deep = _.cloneDeep(objects); 23863 * console.log(deep[0] === objects[0]); 23864 * // => false 23865 */ 23866 function cloneDeep(value) { 23867 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); 23868 } 23869 23870 /** 23871 * This method is like `_.cloneWith` except that it recursively clones `value`. 23872 * 23873 * @static 23874 * @memberOf _ 23875 * @since 4.0.0 23876 * @category Lang 23877 * @param {*} value The value to recursively clone. 23878 * @param {Function} [customizer] The function to customize cloning. 23879 * @returns {*} Returns the deep cloned value. 23880 * @see _.cloneWith 23881 * @example 23882 * 23883 * function customizer(value) { 23884 * if (_.isElement(value)) { 23885 * return value.cloneNode(true); 23886 * } 23887 * } 23888 * 23889 * var el = _.cloneDeepWith(document.body, customizer); 23890 * 23891 * console.log(el === document.body); 23892 * // => false 23893 * console.log(el.nodeName); 23894 * // => 'BODY' 23895 * console.log(el.childNodes.length); 23896 * // => 20 23897 */ 23898 function cloneDeepWith(value, customizer) { 23899 customizer = typeof customizer == 'function' ? customizer : undefined; 23900 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); 23901 } 23902 23903 /** 23904 * Checks if `object` conforms to `source` by invoking the predicate 23905 * properties of `source` with the corresponding property values of `object`. 23906 * 23907 * **Note:** This method is equivalent to `_.conforms` when `source` is 23908 * partially applied. 23909 * 23910 * @static 23911 * @memberOf _ 23912 * @since 4.14.0 23913 * @category Lang 23914 * @param {Object} object The object to inspect. 23915 * @param {Object} source The object of property predicates to conform to. 23916 * @returns {boolean} Returns `true` if `object` conforms, else `false`. 23917 * @example 23918 * 23919 * var object = { 'a': 1, 'b': 2 }; 23920 * 23921 * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); 23922 * // => true 23923 * 23924 * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); 23925 * // => false 23926 */ 23927 function conformsTo(object, source) { 23928 return source == null || baseConformsTo(object, source, keys(source)); 23929 } 23930 23931 /** 23932 * Performs a 23933 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 23934 * comparison between two values to determine if they are equivalent. 23935 * 23936 * @static 23937 * @memberOf _ 23938 * @since 4.0.0 23939 * @category Lang 23940 * @param {*} value The value to compare. 23941 * @param {*} other The other value to compare. 23942 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 23943 * @example 23944 * 23945 * var object = { 'a': 1 }; 23946 * var other = { 'a': 1 }; 23947 * 23948 * _.eq(object, object); 23949 * // => true 23950 * 23951 * _.eq(object, other); 23952 * // => false 23953 * 23954 * _.eq('a', 'a'); 23955 * // => true 23956 * 23957 * _.eq('a', Object('a')); 23958 * // => false 23959 * 23960 * _.eq(NaN, NaN); 23961 * // => true 23962 */ 23963 function eq(value, other) { 23964 return value === other || (value !== value && other !== other); 23965 } 23966 23967 /** 23968 * Checks if `value` is greater than `other`. 23969 * 23970 * @static 23971 * @memberOf _ 23972 * @since 3.9.0 23973 * @category Lang 23974 * @param {*} value The value to compare. 23975 * @param {*} other The other value to compare. 23976 * @returns {boolean} Returns `true` if `value` is greater than `other`, 23977 * else `false`. 23978 * @see _.lt 23979 * @example 23980 * 23981 * _.gt(3, 1); 23982 * // => true 23983 * 23984 * _.gt(3, 3); 23985 * // => false 23986 * 23987 * _.gt(1, 3); 23988 * // => false 23989 */ 23990 var gt = createRelationalOperation(baseGt); 23991 23992 /** 23993 * Checks if `value` is greater than or equal to `other`. 23994 * 23995 * @static 23996 * @memberOf _ 23997 * @since 3.9.0 23998 * @category Lang 23999 * @param {*} value The value to compare. 24000 * @param {*} other The other value to compare. 24001 * @returns {boolean} Returns `true` if `value` is greater than or equal to 24002 * `other`, else `false`. 24003 * @see _.lte 24004 * @example 24005 * 24006 * _.gte(3, 1); 24007 * // => true 24008 * 24009 * _.gte(3, 3); 24010 * // => true 24011 * 24012 * _.gte(1, 3); 24013 * // => false 24014 */ 24015 var gte = createRelationalOperation(function(value, other) { 24016 return value >= other; 24017 }); 24018 24019 /** 24020 * Checks if `value` is likely an `arguments` object. 24021 * 24022 * @static 24023 * @memberOf _ 24024 * @since 0.1.0 24025 * @category Lang 24026 * @param {*} value The value to check. 24027 * @returns {boolean} Returns `true` if `value` is an `arguments` object, 24028 * else `false`. 24029 * @example 24030 * 24031 * _.isArguments(function() { return arguments; }()); 24032 * // => true 24033 * 24034 * _.isArguments([1, 2, 3]); 24035 * // => false 24036 */ 24037 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { 24038 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && 24039 !propertyIsEnumerable.call(value, 'callee'); 24040 }; 24041 24042 /** 24043 * Checks if `value` is classified as an `Array` object. 24044 * 24045 * @static 24046 * @memberOf _ 24047 * @since 0.1.0 24048 * @category Lang 24049 * @param {*} value The value to check. 24050 * @returns {boolean} Returns `true` if `value` is an array, else `false`. 24051 * @example 24052 * 24053 * _.isArray([1, 2, 3]); 24054 * // => true 24055 * 24056 * _.isArray(document.body.children); 24057 * // => false 24058 * 24059 * _.isArray('abc'); 24060 * // => false 24061 * 24062 * _.isArray(_.noop); 24063 * // => false 24064 */ 24065 var isArray = Array.isArray; 24066 24067 /** 24068 * Checks if `value` is classified as an `ArrayBuffer` object. 24069 * 24070 * @static 24071 * @memberOf _ 24072 * @since 4.3.0 24073 * @category Lang 24074 * @param {*} value The value to check. 24075 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. 24076 * @example 24077 * 24078 * _.isArrayBuffer(new ArrayBuffer(2)); 24079 * // => true 24080 * 24081 * _.isArrayBuffer(new Array(2)); 24082 * // => false 24083 */ 24084 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; 24085 24086 /** 24087 * Checks if `value` is array-like. A value is considered array-like if it's 24088 * not a function and has a `value.length` that's an integer greater than or 24089 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. 24090 * 24091 * @static 24092 * @memberOf _ 24093 * @since 4.0.0 24094 * @category Lang 24095 * @param {*} value The value to check. 24096 * @returns {boolean} Returns `true` if `value` is array-like, else `false`. 24097 * @example 24098 * 24099 * _.isArrayLike([1, 2, 3]); 24100 * // => true 24101 * 24102 * _.isArrayLike(document.body.children); 24103 * // => true 24104 * 24105 * _.isArrayLike('abc'); 24106 * // => true 24107 * 24108 * _.isArrayLike(_.noop); 24109 * // => false 24110 */ 24111 function isArrayLike(value) { 24112 return value != null && isLength(value.length) && !isFunction(value); 24113 } 24114 24115 /** 24116 * This method is like `_.isArrayLike` except that it also checks if `value` 24117 * is an object. 24118 * 24119 * @static 24120 * @memberOf _ 24121 * @since 4.0.0 24122 * @category Lang 24123 * @param {*} value The value to check. 24124 * @returns {boolean} Returns `true` if `value` is an array-like object, 24125 * else `false`. 24126 * @example 24127 * 24128 * _.isArrayLikeObject([1, 2, 3]); 24129 * // => true 24130 * 24131 * _.isArrayLikeObject(document.body.children); 24132 * // => true 24133 * 24134 * _.isArrayLikeObject('abc'); 24135 * // => false 24136 * 24137 * _.isArrayLikeObject(_.noop); 24138 * // => false 24139 */ 24140 function isArrayLikeObject(value) { 24141 return isObjectLike(value) && isArrayLike(value); 24142 } 24143 24144 /** 24145 * Checks if `value` is classified as a boolean primitive or object. 24146 * 24147 * @static 24148 * @memberOf _ 24149 * @since 0.1.0 24150 * @category Lang 24151 * @param {*} value The value to check. 24152 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. 24153 * @example 24154 * 24155 * _.isBoolean(false); 24156 * // => true 24157 * 24158 * _.isBoolean(null); 24159 * // => false 24160 */ 24161 function isBoolean(value) { 24162 return value === true || value === false || 24163 (isObjectLike(value) && baseGetTag(value) == boolTag); 24164 } 24165 24166 /** 24167 * Checks if `value` is a buffer. 24168 * 24169 * @static 24170 * @memberOf _ 24171 * @since 4.3.0 24172 * @category Lang 24173 * @param {*} value The value to check. 24174 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. 24175 * @example 24176 * 24177 * _.isBuffer(new Buffer(2)); 24178 * // => true 24179 * 24180 * _.isBuffer(new Uint8Array(2)); 24181 * // => false 24182 */ 24183 var isBuffer = nativeIsBuffer || stubFalse; 24184 24185 /** 24186 * Checks if `value` is classified as a `Date` object. 24187 * 24188 * @static 24189 * @memberOf _ 24190 * @since 0.1.0 24191 * @category Lang 24192 * @param {*} value The value to check. 24193 * @returns {boolean} Returns `true` if `value` is a date object, else `false`. 24194 * @example 24195 * 24196 * _.isDate(new Date); 24197 * // => true 24198 * 24199 * _.isDate('Mon April 23 2012'); 24200 * // => false 24201 */ 24202 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; 24203 24204 /** 24205 * Checks if `value` is likely a DOM element. 24206 * 24207 * @static 24208 * @memberOf _ 24209 * @since 0.1.0 24210 * @category Lang 24211 * @param {*} value The value to check. 24212 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. 24213 * @example 24214 * 24215 * _.isElement(document.body); 24216 * // => true 24217 * 24218 * _.isElement('<body>'); 24219 * // => false 24220 */ 24221 function isElement(value) { 24222 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); 24223 } 24224 24225 /** 24226 * Checks if `value` is an empty object, collection, map, or set. 24227 * 24228 * Objects are considered empty if they have no own enumerable string keyed 24229 * properties. 24230 * 24231 * Array-like values such as `arguments` objects, arrays, buffers, strings, or 24232 * jQuery-like collections are considered empty if they have a `length` of `0`. 24233 * Similarly, maps and sets are considered empty if they have a `size` of `0`. 24234 * 24235 * @static 24236 * @memberOf _ 24237 * @since 0.1.0 24238 * @category Lang 24239 * @param {*} value The value to check. 24240 * @returns {boolean} Returns `true` if `value` is empty, else `false`. 24241 * @example 24242 * 24243 * _.isEmpty(null); 24244 * // => true 24245 * 24246 * _.isEmpty(true); 24247 * // => true 24248 * 24249 * _.isEmpty(1); 24250 * // => true 24251 * 24252 * _.isEmpty([1, 2, 3]); 24253 * // => false 24254 * 24255 * _.isEmpty({ 'a': 1 }); 24256 * // => false 24257 */ 24258 function isEmpty(value) { 24259 if (value == null) { 24260 return true; 24261 } 24262 if (isArrayLike(value) && 24263 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || 24264 isBuffer(value) || isTypedArray(value) || isArguments(value))) { 24265 return !value.length; 24266 } 24267 var tag = getTag(value); 24268 if (tag == mapTag || tag == setTag) { 24269 return !value.size; 24270 } 24271 if (isPrototype(value)) { 24272 return !baseKeys(value).length; 24273 } 24274 for (var key in value) { 24275 if (hasOwnProperty.call(value, key)) { 24276 return false; 24277 } 24278 } 24279 return true; 24280 } 24281 24282 /** 24283 * Performs a deep comparison between two values to determine if they are 24284 * equivalent. 24285 * 24286 * **Note:** This method supports comparing arrays, array buffers, booleans, 24287 * date objects, error objects, maps, numbers, `Object` objects, regexes, 24288 * sets, strings, symbols, and typed arrays. `Object` objects are compared 24289 * by their own, not inherited, enumerable properties. Functions and DOM 24290 * nodes are compared by strict equality, i.e. `===`. 24291 * 24292 * @static 24293 * @memberOf _ 24294 * @since 0.1.0 24295 * @category Lang 24296 * @param {*} value The value to compare. 24297 * @param {*} other The other value to compare. 24298 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 24299 * @example 24300 * 24301 * var object = { 'a': 1 }; 24302 * var other = { 'a': 1 }; 24303 * 24304 * _.isEqual(object, other); 24305 * // => true 24306 * 24307 * object === other; 24308 * // => false 24309 */ 24310 function isEqual(value, other) { 24311 return baseIsEqual(value, other); 24312 } 24313 24314 /** 24315 * This method is like `_.isEqual` except that it accepts `customizer` which 24316 * is invoked to compare values. If `customizer` returns `undefined`, comparisons 24317 * are handled by the method instead. The `customizer` is invoked with up to 24318 * six arguments: (objValue, othValue [, index|key, object, other, stack]). 24319 * 24320 * @static 24321 * @memberOf _ 24322 * @since 4.0.0 24323 * @category Lang 24324 * @param {*} value The value to compare. 24325 * @param {*} other The other value to compare. 24326 * @param {Function} [customizer] The function to customize comparisons. 24327 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 24328 * @example 24329 * 24330 * function isGreeting(value) { 24331 * return /^h(?:i|ello)$/.test(value); 24332 * } 24333 * 24334 * function customizer(objValue, othValue) { 24335 * if (isGreeting(objValue) && isGreeting(othValue)) { 24336 * return true; 24337 * } 24338 * } 24339 * 24340 * var array = ['hello', 'goodbye']; 24341 * var other = ['hi', 'goodbye']; 24342 * 24343 * _.isEqualWith(array, other, customizer); 24344 * // => true 24345 */ 24346 function isEqualWith(value, other, customizer) { 24347 customizer = typeof customizer == 'function' ? customizer : undefined; 24348 var result = customizer ? customizer(value, other) : undefined; 24349 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; 24350 } 24351 24352 /** 24353 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, 24354 * `SyntaxError`, `TypeError`, or `URIError` object. 24355 * 24356 * @static 24357 * @memberOf _ 24358 * @since 3.0.0 24359 * @category Lang 24360 * @param {*} value The value to check. 24361 * @returns {boolean} Returns `true` if `value` is an error object, else `false`. 24362 * @example 24363 * 24364 * _.isError(new Error); 24365 * // => true 24366 * 24367 * _.isError(Error); 24368 * // => false 24369 */ 24370 function isError(value) { 24371 if (!isObjectLike(value)) { 24372 return false; 24373 } 24374 var tag = baseGetTag(value); 24375 return tag == errorTag || tag == domExcTag || 24376 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); 24377 } 24378 24379 /** 24380 * Checks if `value` is a finite primitive number. 24381 * 24382 * **Note:** This method is based on 24383 * [`Number.isFinite`](https://mdn.io/Number/isFinite). 24384 * 24385 * @static 24386 * @memberOf _ 24387 * @since 0.1.0 24388 * @category Lang 24389 * @param {*} value The value to check. 24390 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. 24391 * @example 24392 * 24393 * _.isFinite(3); 24394 * // => true 24395 * 24396 * _.isFinite(Number.MIN_VALUE); 24397 * // => true 24398 * 24399 * _.isFinite(Infinity); 24400 * // => false 24401 * 24402 * _.isFinite('3'); 24403 * // => false 24404 */ 24405 function isFinite(value) { 24406 return typeof value == 'number' && nativeIsFinite(value); 24407 } 24408 24409 /** 24410 * Checks if `value` is classified as a `Function` object. 24411 * 24412 * @static 24413 * @memberOf _ 24414 * @since 0.1.0 24415 * @category Lang 24416 * @param {*} value The value to check. 24417 * @returns {boolean} Returns `true` if `value` is a function, else `false`. 24418 * @example 24419 * 24420 * _.isFunction(_); 24421 * // => true 24422 * 24423 * _.isFunction(/abc/); 24424 * // => false 24425 */ 24426 function isFunction(value) { 24427 if (!isObject(value)) { 24428 return false; 24429 } 24430 // The use of `Object#toString` avoids issues with the `typeof` operator 24431 // in Safari 9 which returns 'object' for typed arrays and other constructors. 24432 var tag = baseGetTag(value); 24433 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; 24434 } 24435 24436 /** 24437 * Checks if `value` is an integer. 24438 * 24439 * **Note:** This method is based on 24440 * [`Number.isInteger`](https://mdn.io/Number/isInteger). 24441 * 24442 * @static 24443 * @memberOf _ 24444 * @since 4.0.0 24445 * @category Lang 24446 * @param {*} value The value to check. 24447 * @returns {boolean} Returns `true` if `value` is an integer, else `false`. 24448 * @example 24449 * 24450 * _.isInteger(3); 24451 * // => true 24452 * 24453 * _.isInteger(Number.MIN_VALUE); 24454 * // => false 24455 * 24456 * _.isInteger(Infinity); 24457 * // => false 24458 * 24459 * _.isInteger('3'); 24460 * // => false 24461 */ 24462 function isInteger(value) { 24463 return typeof value == 'number' && value == toInteger(value); 24464 } 24465 24466 /** 24467 * Checks if `value` is a valid array-like length. 24468 * 24469 * **Note:** This method is loosely based on 24470 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). 24471 * 24472 * @static 24473 * @memberOf _ 24474 * @since 4.0.0 24475 * @category Lang 24476 * @param {*} value The value to check. 24477 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. 24478 * @example 24479 * 24480 * _.isLength(3); 24481 * // => true 24482 * 24483 * _.isLength(Number.MIN_VALUE); 24484 * // => false 24485 * 24486 * _.isLength(Infinity); 24487 * // => false 24488 * 24489 * _.isLength('3'); 24490 * // => false 24491 */ 24492 function isLength(value) { 24493 return typeof value == 'number' && 24494 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; 24495 } 24496 24497 /** 24498 * Checks if `value` is the 24499 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) 24500 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) 24501 * 24502 * @static 24503 * @memberOf _ 24504 * @since 0.1.0 24505 * @category Lang 24506 * @param {*} value The value to check. 24507 * @returns {boolean} Returns `true` if `value` is an object, else `false`. 24508 * @example 24509 * 24510 * _.isObject({}); 24511 * // => true 24512 * 24513 * _.isObject([1, 2, 3]); 24514 * // => true 24515 * 24516 * _.isObject(_.noop); 24517 * // => true 24518 * 24519 * _.isObject(null); 24520 * // => false 24521 */ 24522 function isObject(value) { 24523 var type = typeof value; 24524 return value != null && (type == 'object' || type == 'function'); 24525 } 24526 24527 /** 24528 * Checks if `value` is object-like. A value is object-like if it's not `null` 24529 * and has a `typeof` result of "object". 24530 * 24531 * @static 24532 * @memberOf _ 24533 * @since 4.0.0 24534 * @category Lang 24535 * @param {*} value The value to check. 24536 * @returns {boolean} Returns `true` if `value` is object-like, else `false`. 24537 * @example 24538 * 24539 * _.isObjectLike({}); 24540 * // => true 24541 * 24542 * _.isObjectLike([1, 2, 3]); 24543 * // => true 24544 * 24545 * _.isObjectLike(_.noop); 24546 * // => false 24547 * 24548 * _.isObjectLike(null); 24549 * // => false 24550 */ 24551 function isObjectLike(value) { 24552 return value != null && typeof value == 'object'; 24553 } 24554 24555 /** 24556 * Checks if `value` is classified as a `Map` object. 24557 * 24558 * @static 24559 * @memberOf _ 24560 * @since 4.3.0 24561 * @category Lang 24562 * @param {*} value The value to check. 24563 * @returns {boolean} Returns `true` if `value` is a map, else `false`. 24564 * @example 24565 * 24566 * _.isMap(new Map); 24567 * // => true 24568 * 24569 * _.isMap(new WeakMap); 24570 * // => false 24571 */ 24572 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; 24573 24574 /** 24575 * Performs a partial deep comparison between `object` and `source` to 24576 * determine if `object` contains equivalent property values. 24577 * 24578 * **Note:** This method is equivalent to `_.matches` when `source` is 24579 * partially applied. 24580 * 24581 * Partial comparisons will match empty array and empty object `source` 24582 * values against any array or object value, respectively. See `_.isEqual` 24583 * for a list of supported value comparisons. 24584 * 24585 * @static 24586 * @memberOf _ 24587 * @since 3.0.0 24588 * @category Lang 24589 * @param {Object} object The object to inspect. 24590 * @param {Object} source The object of property values to match. 24591 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 24592 * @example 24593 * 24594 * var object = { 'a': 1, 'b': 2 }; 24595 * 24596 * _.isMatch(object, { 'b': 2 }); 24597 * // => true 24598 * 24599 * _.isMatch(object, { 'b': 1 }); 24600 * // => false 24601 */ 24602 function isMatch(object, source) { 24603 return object === source || baseIsMatch(object, source, getMatchData(source)); 24604 } 24605 24606 /** 24607 * This method is like `_.isMatch` except that it accepts `customizer` which 24608 * is invoked to compare values. If `customizer` returns `undefined`, comparisons 24609 * are handled by the method instead. The `customizer` is invoked with five 24610 * arguments: (objValue, srcValue, index|key, object, source). 24611 * 24612 * @static 24613 * @memberOf _ 24614 * @since 4.0.0 24615 * @category Lang 24616 * @param {Object} object The object to inspect. 24617 * @param {Object} source The object of property values to match. 24618 * @param {Function} [customizer] The function to customize comparisons. 24619 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 24620 * @example 24621 * 24622 * function isGreeting(value) { 24623 * return /^h(?:i|ello)$/.test(value); 24624 * } 24625 * 24626 * function customizer(objValue, srcValue) { 24627 * if (isGreeting(objValue) && isGreeting(srcValue)) { 24628 * return true; 24629 * } 24630 * } 24631 * 24632 * var object = { 'greeting': 'hello' }; 24633 * var source = { 'greeting': 'hi' }; 24634 * 24635 * _.isMatchWith(object, source, customizer); 24636 * // => true 24637 */ 24638 function isMatchWith(object, source, customizer) { 24639 customizer = typeof customizer == 'function' ? customizer : undefined; 24640 return baseIsMatch(object, source, getMatchData(source), customizer); 24641 } 24642 24643 /** 24644 * Checks if `value` is `NaN`. 24645 * 24646 * **Note:** This method is based on 24647 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as 24648 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for 24649 * `undefined` and other non-number values. 24650 * 24651 * @static 24652 * @memberOf _ 24653 * @since 0.1.0 24654 * @category Lang 24655 * @param {*} value The value to check. 24656 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. 24657 * @example 24658 * 24659 * _.isNaN(NaN); 24660 * // => true 24661 * 24662 * _.isNaN(new Number(NaN)); 24663 * // => true 24664 * 24665 * isNaN(undefined); 24666 * // => true 24667 * 24668 * _.isNaN(undefined); 24669 * // => false 24670 */ 24671 function isNaN(value) { 24672 // An `NaN` primitive is the only value that is not equal to itself. 24673 // Perform the `toStringTag` check first to avoid errors with some 24674 // ActiveX objects in IE. 24675 return isNumber(value) && value != +value; 24676 } 24677 24678 /** 24679 * Checks if `value` is a pristine native function. 24680 * 24681 * **Note:** This method can't reliably detect native functions in the presence 24682 * of the core-js package because core-js circumvents this kind of detection. 24683 * Despite multiple requests, the core-js maintainer has made it clear: any 24684 * attempt to fix the detection will be obstructed. As a result, we're left 24685 * with little choice but to throw an error. Unfortunately, this also affects 24686 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), 24687 * which rely on core-js. 24688 * 24689 * @static 24690 * @memberOf _ 24691 * @since 3.0.0 24692 * @category Lang 24693 * @param {*} value The value to check. 24694 * @returns {boolean} Returns `true` if `value` is a native function, 24695 * else `false`. 24696 * @example 24697 * 24698 * _.isNative(Array.prototype.push); 24699 * // => true 24700 * 24701 * _.isNative(_); 24702 * // => false 24703 */ 24704 function isNative(value) { 24705 if (isMaskable(value)) { 24706 throw new Error(CORE_ERROR_TEXT); 24707 } 24708 return baseIsNative(value); 24709 } 24710 24711 /** 24712 * Checks if `value` is `null`. 24713 * 24714 * @static 24715 * @memberOf _ 24716 * @since 0.1.0 24717 * @category Lang 24718 * @param {*} value The value to check. 24719 * @returns {boolean} Returns `true` if `value` is `null`, else `false`. 24720 * @example 24721 * 24722 * _.isNull(null); 24723 * // => true 24724 * 24725 * _.isNull(void 0); 24726 * // => false 24727 */ 24728 function isNull(value) { 24729 return value === null; 24730 } 24731 24732 /** 24733 * Checks if `value` is `null` or `undefined`. 24734 * 24735 * @static 24736 * @memberOf _ 24737 * @since 4.0.0 24738 * @category Lang 24739 * @param {*} value The value to check. 24740 * @returns {boolean} Returns `true` if `value` is nullish, else `false`. 24741 * @example 24742 * 24743 * _.isNil(null); 24744 * // => true 24745 * 24746 * _.isNil(void 0); 24747 * // => true 24748 * 24749 * _.isNil(NaN); 24750 * // => false 24751 */ 24752 function isNil(value) { 24753 return value == null; 24754 } 24755 24756 /** 24757 * Checks if `value` is classified as a `Number` primitive or object. 24758 * 24759 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are 24760 * classified as numbers, use the `_.isFinite` method. 24761 * 24762 * @static 24763 * @memberOf _ 24764 * @since 0.1.0 24765 * @category Lang 24766 * @param {*} value The value to check. 24767 * @returns {boolean} Returns `true` if `value` is a number, else `false`. 24768 * @example 24769 * 24770 * _.isNumber(3); 24771 * // => true 24772 * 24773 * _.isNumber(Number.MIN_VALUE); 24774 * // => true 24775 * 24776 * _.isNumber(Infinity); 24777 * // => true 24778 * 24779 * _.isNumber('3'); 24780 * // => false 24781 */ 24782 function isNumber(value) { 24783 return typeof value == 'number' || 24784 (isObjectLike(value) && baseGetTag(value) == numberTag); 24785 } 24786 24787 /** 24788 * Checks if `value` is a plain object, that is, an object created by the 24789 * `Object` constructor or one with a `[[Prototype]]` of `null`. 24790 * 24791 * @static 24792 * @memberOf _ 24793 * @since 0.8.0 24794 * @category Lang 24795 * @param {*} value The value to check. 24796 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. 24797 * @example 24798 * 24799 * function Foo() { 24800 * this.a = 1; 24801 * } 24802 * 24803 * _.isPlainObject(new Foo); 24804 * // => false 24805 * 24806 * _.isPlainObject([1, 2, 3]); 24807 * // => false 24808 * 24809 * _.isPlainObject({ 'x': 0, 'y': 0 }); 24810 * // => true 24811 * 24812 * _.isPlainObject(Object.create(null)); 24813 * // => true 24814 */ 24815 function isPlainObject(value) { 24816 if (!isObjectLike(value) || baseGetTag(value) != objectTag) { 24817 return false; 24818 } 24819 var proto = getPrototype(value); 24820 if (proto === null) { 24821 return true; 24822 } 24823 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; 24824 return typeof Ctor == 'function' && Ctor instanceof Ctor && 24825 funcToString.call(Ctor) == objectCtorString; 24826 } 24827 24828 /** 24829 * Checks if `value` is classified as a `RegExp` object. 24830 * 24831 * @static 24832 * @memberOf _ 24833 * @since 0.1.0 24834 * @category Lang 24835 * @param {*} value The value to check. 24836 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. 24837 * @example 24838 * 24839 * _.isRegExp(/abc/); 24840 * // => true 24841 * 24842 * _.isRegExp('/abc/'); 24843 * // => false 24844 */ 24845 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; 24846 24847 /** 24848 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 24849 * double precision number which isn't the result of a rounded unsafe integer. 24850 * 24851 * **Note:** This method is based on 24852 * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). 24853 * 24854 * @static 24855 * @memberOf _ 24856 * @since 4.0.0 24857 * @category Lang 24858 * @param {*} value The value to check. 24859 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. 24860 * @example 24861 * 24862 * _.isSafeInteger(3); 24863 * // => true 24864 * 24865 * _.isSafeInteger(Number.MIN_VALUE); 24866 * // => false 24867 * 24868 * _.isSafeInteger(Infinity); 24869 * // => false 24870 * 24871 * _.isSafeInteger('3'); 24872 * // => false 24873 */ 24874 function isSafeInteger(value) { 24875 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; 24876 } 24877 24878 /** 24879 * Checks if `value` is classified as a `Set` object. 24880 * 24881 * @static 24882 * @memberOf _ 24883 * @since 4.3.0 24884 * @category Lang 24885 * @param {*} value The value to check. 24886 * @returns {boolean} Returns `true` if `value` is a set, else `false`. 24887 * @example 24888 * 24889 * _.isSet(new Set); 24890 * // => true 24891 * 24892 * _.isSet(new WeakSet); 24893 * // => false 24894 */ 24895 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; 24896 24897 /** 24898 * Checks if `value` is classified as a `String` primitive or object. 24899 * 24900 * @static 24901 * @since 0.1.0 24902 * @memberOf _ 24903 * @category Lang 24904 * @param {*} value The value to check. 24905 * @returns {boolean} Returns `true` if `value` is a string, else `false`. 24906 * @example 24907 * 24908 * _.isString('abc'); 24909 * // => true 24910 * 24911 * _.isString(1); 24912 * // => false 24913 */ 24914 function isString(value) { 24915 return typeof value == 'string' || 24916 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); 24917 } 24918 24919 /** 24920 * Checks if `value` is classified as a `Symbol` primitive or object. 24921 * 24922 * @static 24923 * @memberOf _ 24924 * @since 4.0.0 24925 * @category Lang 24926 * @param {*} value The value to check. 24927 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. 24928 * @example 24929 * 24930 * _.isSymbol(Symbol.iterator); 24931 * // => true 24932 * 24933 * _.isSymbol('abc'); 24934 * // => false 24935 */ 24936 function isSymbol(value) { 24937 return typeof value == 'symbol' || 24938 (isObjectLike(value) && baseGetTag(value) == symbolTag); 24939 } 24940 24941 /** 24942 * Checks if `value` is classified as a typed array. 24943 * 24944 * @static 24945 * @memberOf _ 24946 * @since 3.0.0 24947 * @category Lang 24948 * @param {*} value The value to check. 24949 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. 24950 * @example 24951 * 24952 * _.isTypedArray(new Uint8Array); 24953 * // => true 24954 * 24955 * _.isTypedArray([]); 24956 * // => false 24957 */ 24958 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; 24959 24960 /** 24961 * Checks if `value` is `undefined`. 24962 * 24963 * @static 24964 * @since 0.1.0 24965 * @memberOf _ 24966 * @category Lang 24967 * @param {*} value The value to check. 24968 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. 24969 * @example 24970 * 24971 * _.isUndefined(void 0); 24972 * // => true 24973 * 24974 * _.isUndefined(null); 24975 * // => false 24976 */ 24977 function isUndefined(value) { 24978 return value === undefined; 24979 } 24980 24981 /** 24982 * Checks if `value` is classified as a `WeakMap` object. 24983 * 24984 * @static 24985 * @memberOf _ 24986 * @since 4.3.0 24987 * @category Lang 24988 * @param {*} value The value to check. 24989 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. 24990 * @example 24991 * 24992 * _.isWeakMap(new WeakMap); 24993 * // => true 24994 * 24995 * _.isWeakMap(new Map); 24996 * // => false 24997 */ 24998 function isWeakMap(value) { 24999 return isObjectLike(value) && getTag(value) == weakMapTag; 25000 } 25001 25002 /** 25003 * Checks if `value` is classified as a `WeakSet` object. 25004 * 25005 * @static 25006 * @memberOf _ 25007 * @since 4.3.0 25008 * @category Lang 25009 * @param {*} value The value to check. 25010 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. 25011 * @example 25012 * 25013 * _.isWeakSet(new WeakSet); 25014 * // => true 25015 * 25016 * _.isWeakSet(new Set); 25017 * // => false 25018 */ 25019 function isWeakSet(value) { 25020 return isObjectLike(value) && baseGetTag(value) == weakSetTag; 25021 } 25022 25023 /** 25024 * Checks if `value` is less than `other`. 25025 * 25026 * @static 25027 * @memberOf _ 25028 * @since 3.9.0 25029 * @category Lang 25030 * @param {*} value The value to compare. 25031 * @param {*} other The other value to compare. 25032 * @returns {boolean} Returns `true` if `value` is less than `other`, 25033 * else `false`. 25034 * @see _.gt 25035 * @example 25036 * 25037 * _.lt(1, 3); 25038 * // => true 25039 * 25040 * _.lt(3, 3); 25041 * // => false 25042 * 25043 * _.lt(3, 1); 25044 * // => false 25045 */ 25046 var lt = createRelationalOperation(baseLt); 25047 25048 /** 25049 * Checks if `value` is less than or equal to `other`. 25050 * 25051 * @static 25052 * @memberOf _ 25053 * @since 3.9.0 25054 * @category Lang 25055 * @param {*} value The value to compare. 25056 * @param {*} other The other value to compare. 25057 * @returns {boolean} Returns `true` if `value` is less than or equal to 25058 * `other`, else `false`. 25059 * @see _.gte 25060 * @example 25061 * 25062 * _.lte(1, 3); 25063 * // => true 25064 * 25065 * _.lte(3, 3); 25066 * // => true 25067 * 25068 * _.lte(3, 1); 25069 * // => false 25070 */ 25071 var lte = createRelationalOperation(function(value, other) { 25072 return value <= other; 25073 }); 25074 25075 /** 25076 * Converts `value` to an array. 25077 * 25078 * @static 25079 * @since 0.1.0 25080 * @memberOf _ 25081 * @category Lang 25082 * @param {*} value The value to convert. 25083 * @returns {Array} Returns the converted array. 25084 * @example 25085 * 25086 * _.toArray({ 'a': 1, 'b': 2 }); 25087 * // => [1, 2] 25088 * 25089 * _.toArray('abc'); 25090 * // => ['a', 'b', 'c'] 25091 * 25092 * _.toArray(1); 25093 * // => [] 25094 * 25095 * _.toArray(null); 25096 * // => [] 25097 */ 25098 function toArray(value) { 25099 if (!value) { 25100 return []; 25101 } 25102 if (isArrayLike(value)) { 25103 return isString(value) ? stringToArray(value) : copyArray(value); 25104 } 25105 if (symIterator && value[symIterator]) { 25106 return iteratorToArray(value[symIterator]()); 25107 } 25108 var tag = getTag(value), 25109 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); 25110 25111 return func(value); 25112 } 25113 25114 /** 25115 * Converts `value` to a finite number. 25116 * 25117 * @static 25118 * @memberOf _ 25119 * @since 4.12.0 25120 * @category Lang 25121 * @param {*} value The value to convert. 25122 * @returns {number} Returns the converted number. 25123 * @example 25124 * 25125 * _.toFinite(3.2); 25126 * // => 3.2 25127 * 25128 * _.toFinite(Number.MIN_VALUE); 25129 * // => 5e-324 25130 * 25131 * _.toFinite(Infinity); 25132 * // => 1.7976931348623157e+308 25133 * 25134 * _.toFinite('3.2'); 25135 * // => 3.2 25136 */ 25137 function toFinite(value) { 25138 if (!value) { 25139 return value === 0 ? value : 0; 25140 } 25141 value = toNumber(value); 25142 if (value === INFINITY || value === -INFINITY) { 25143 var sign = (value < 0 ? -1 : 1); 25144 return sign * MAX_INTEGER; 25145 } 25146 return value === value ? value : 0; 25147 } 25148 25149 /** 25150 * Converts `value` to an integer. 25151 * 25152 * **Note:** This method is loosely based on 25153 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). 25154 * 25155 * @static 25156 * @memberOf _ 25157 * @since 4.0.0 25158 * @category Lang 25159 * @param {*} value The value to convert. 25160 * @returns {number} Returns the converted integer. 25161 * @example 25162 * 25163 * _.toInteger(3.2); 25164 * // => 3 25165 * 25166 * _.toInteger(Number.MIN_VALUE); 25167 * // => 0 25168 * 25169 * _.toInteger(Infinity); 25170 * // => 1.7976931348623157e+308 25171 * 25172 * _.toInteger('3.2'); 25173 * // => 3 25174 */ 25175 function toInteger(value) { 25176 var result = toFinite(value), 25177 remainder = result % 1; 25178 25179 return result === result ? (remainder ? result - remainder : result) : 0; 25180 } 25181 25182 /** 25183 * Converts `value` to an integer suitable for use as the length of an 25184 * array-like object. 25185 * 25186 * **Note:** This method is based on 25187 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). 25188 * 25189 * @static 25190 * @memberOf _ 25191 * @since 4.0.0 25192 * @category Lang 25193 * @param {*} value The value to convert. 25194 * @returns {number} Returns the converted integer. 25195 * @example 25196 * 25197 * _.toLength(3.2); 25198 * // => 3 25199 * 25200 * _.toLength(Number.MIN_VALUE); 25201 * // => 0 25202 * 25203 * _.toLength(Infinity); 25204 * // => 4294967295 25205 * 25206 * _.toLength('3.2'); 25207 * // => 3 25208 */ 25209 function toLength(value) { 25210 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; 25211 } 25212 25213 /** 25214 * Converts `value` to a number. 25215 * 25216 * @static 25217 * @memberOf _ 25218 * @since 4.0.0 25219 * @category Lang 25220 * @param {*} value The value to process. 25221 * @returns {number} Returns the number. 25222 * @example 25223 * 25224 * _.toNumber(3.2); 25225 * // => 3.2 25226 * 25227 * _.toNumber(Number.MIN_VALUE); 25228 * // => 5e-324 25229 * 25230 * _.toNumber(Infinity); 25231 * // => Infinity 25232 * 25233 * _.toNumber('3.2'); 25234 * // => 3.2 25235 */ 25236 function toNumber(value) { 25237 if (typeof value == 'number') { 25238 return value; 25239 } 25240 if (isSymbol(value)) { 25241 return NAN; 25242 } 25243 if (isObject(value)) { 25244 var other = typeof value.valueOf == 'function' ? value.valueOf() : value; 25245 value = isObject(other) ? (other + '') : other; 25246 } 25247 if (typeof value != 'string') { 25248 return value === 0 ? value : +value; 25249 } 25250 value = baseTrim(value); 25251 var isBinary = reIsBinary.test(value); 25252 return (isBinary || reIsOctal.test(value)) 25253 ? freeParseInt(value.slice(2), isBinary ? 2 : 8) 25254 : (reIsBadHex.test(value) ? NAN : +value); 25255 } 25256 25257 /** 25258 * Converts `value` to a plain object flattening inherited enumerable string 25259 * keyed properties of `value` to own properties of the plain object. 25260 * 25261 * @static 25262 * @memberOf _ 25263 * @since 3.0.0 25264 * @category Lang 25265 * @param {*} value The value to convert. 25266 * @returns {Object} Returns the converted plain object. 25267 * @example 25268 * 25269 * function Foo() { 25270 * this.b = 2; 25271 * } 25272 * 25273 * Foo.prototype.c = 3; 25274 * 25275 * _.assign({ 'a': 1 }, new Foo); 25276 * // => { 'a': 1, 'b': 2 } 25277 * 25278 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); 25279 * // => { 'a': 1, 'b': 2, 'c': 3 } 25280 */ 25281 function toPlainObject(value) { 25282 return copyObject(value, keysIn(value)); 25283 } 25284 25285 /** 25286 * Converts `value` to a safe integer. A safe integer can be compared and 25287 * represented correctly. 25288 * 25289 * @static 25290 * @memberOf _ 25291 * @since 4.0.0 25292 * @category Lang 25293 * @param {*} value The value to convert. 25294 * @returns {number} Returns the converted integer. 25295 * @example 25296 * 25297 * _.toSafeInteger(3.2); 25298 * // => 3 25299 * 25300 * _.toSafeInteger(Number.MIN_VALUE); 25301 * // => 0 25302 * 25303 * _.toSafeInteger(Infinity); 25304 * // => 9007199254740991 25305 * 25306 * _.toSafeInteger('3.2'); 25307 * // => 3 25308 */ 25309 function toSafeInteger(value) { 25310 return value 25311 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) 25312 : (value === 0 ? value : 0); 25313 } 25314 25315 /** 25316 * Converts `value` to a string. An empty string is returned for `null` 25317 * and `undefined` values. The sign of `-0` is preserved. 25318 * 25319 * @static 25320 * @memberOf _ 25321 * @since 4.0.0 25322 * @category Lang 25323 * @param {*} value The value to convert. 25324 * @returns {string} Returns the converted string. 25325 * @example 25326 * 25327 * _.toString(null); 25328 * // => '' 25329 * 25330 * _.toString(-0); 25331 * // => '-0' 25332 * 25333 * _.toString([1, 2, 3]); 25334 * // => '1,2,3' 25335 */ 25336 function toString(value) { 25337 return value == null ? '' : baseToString(value); 25338 } 25339 25340 /*------------------------------------------------------------------------*/ 25341 25342 /** 25343 * Assigns own enumerable string keyed properties of source objects to the 25344 * destination object. Source objects are applied from left to right. 25345 * Subsequent sources overwrite property assignments of previous sources. 25346 * 25347 * **Note:** This method mutates `object` and is loosely based on 25348 * [`Object.assign`](https://mdn.io/Object/assign). 25349 * 25350 * @static 25351 * @memberOf _ 25352 * @since 0.10.0 25353 * @category Object 25354 * @param {Object} object The destination object. 25355 * @param {...Object} [sources] The source objects. 25356 * @returns {Object} Returns `object`. 25357 * @see _.assignIn 25358 * @example 25359 * 25360 * function Foo() { 25361 * this.a = 1; 25362 * } 25363 * 25364 * function Bar() { 25365 * this.c = 3; 25366 * } 25367 * 25368 * Foo.prototype.b = 2; 25369 * Bar.prototype.d = 4; 25370 * 25371 * _.assign({ 'a': 0 }, new Foo, new Bar); 25372 * // => { 'a': 1, 'c': 3 } 25373 */ 25374 var assign = createAssigner(function(object, source) { 25375 if (isPrototype(source) || isArrayLike(source)) { 25376 copyObject(source, keys(source), object); 25377 return; 25378 } 25379 for (var key in source) { 25380 if (hasOwnProperty.call(source, key)) { 25381 assignValue(object, key, source[key]); 25382 } 25383 } 25384 }); 25385 25386 /** 25387 * This method is like `_.assign` except that it iterates over own and 25388 * inherited source properties. 25389 * 25390 * **Note:** This method mutates `object`. 25391 * 25392 * @static 25393 * @memberOf _ 25394 * @since 4.0.0 25395 * @alias extend 25396 * @category Object 25397 * @param {Object} object The destination object. 25398 * @param {...Object} [sources] The source objects. 25399 * @returns {Object} Returns `object`. 25400 * @see _.assign 25401 * @example 25402 * 25403 * function Foo() { 25404 * this.a = 1; 25405 * } 25406 * 25407 * function Bar() { 25408 * this.c = 3; 25409 * } 25410 * 25411 * Foo.prototype.b = 2; 25412 * Bar.prototype.d = 4; 25413 * 25414 * _.assignIn({ 'a': 0 }, new Foo, new Bar); 25415 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } 25416 */ 25417 var assignIn = createAssigner(function(object, source) { 25418 copyObject(source, keysIn(source), object); 25419 }); 25420 25421 /** 25422 * This method is like `_.assignIn` except that it accepts `customizer` 25423 * which is invoked to produce the assigned values. If `customizer` returns 25424 * `undefined`, assignment is handled by the method instead. The `customizer` 25425 * is invoked with five arguments: (objValue, srcValue, key, object, source). 25426 * 25427 * **Note:** This method mutates `object`. 25428 * 25429 * @static 25430 * @memberOf _ 25431 * @since 4.0.0 25432 * @alias extendWith 25433 * @category Object 25434 * @param {Object} object The destination object. 25435 * @param {...Object} sources The source objects. 25436 * @param {Function} [customizer] The function to customize assigned values. 25437 * @returns {Object} Returns `object`. 25438 * @see _.assignWith 25439 * @example 25440 * 25441 * function customizer(objValue, srcValue) { 25442 * return _.isUndefined(objValue) ? srcValue : objValue; 25443 * } 25444 * 25445 * var defaults = _.partialRight(_.assignInWith, customizer); 25446 * 25447 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 25448 * // => { 'a': 1, 'b': 2 } 25449 */ 25450 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { 25451 copyObject(source, keysIn(source), object, customizer); 25452 }); 25453 25454 /** 25455 * This method is like `_.assign` except that it accepts `customizer` 25456 * which is invoked to produce the assigned values. If `customizer` returns 25457 * `undefined`, assignment is handled by the method instead. The `customizer` 25458 * is invoked with five arguments: (objValue, srcValue, key, object, source). 25459 * 25460 * **Note:** This method mutates `object`. 25461 * 25462 * @static 25463 * @memberOf _ 25464 * @since 4.0.0 25465 * @category Object 25466 * @param {Object} object The destination object. 25467 * @param {...Object} sources The source objects. 25468 * @param {Function} [customizer] The function to customize assigned values. 25469 * @returns {Object} Returns `object`. 25470 * @see _.assignInWith 25471 * @example 25472 * 25473 * function customizer(objValue, srcValue) { 25474 * return _.isUndefined(objValue) ? srcValue : objValue; 25475 * } 25476 * 25477 * var defaults = _.partialRight(_.assignWith, customizer); 25478 * 25479 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 25480 * // => { 'a': 1, 'b': 2 } 25481 */ 25482 var assignWith = createAssigner(function(object, source, srcIndex, customizer) { 25483 copyObject(source, keys(source), object, customizer); 25484 }); 25485 25486 /** 25487 * Creates an array of values corresponding to `paths` of `object`. 25488 * 25489 * @static 25490 * @memberOf _ 25491 * @since 1.0.0 25492 * @category Object 25493 * @param {Object} object The object to iterate over. 25494 * @param {...(string|string[])} [paths] The property paths to pick. 25495 * @returns {Array} Returns the picked values. 25496 * @example 25497 * 25498 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; 25499 * 25500 * _.at(object, ['a[0].b.c', 'a[1]']); 25501 * // => [3, 4] 25502 */ 25503 var at = flatRest(baseAt); 25504 25505 /** 25506 * Creates an object that inherits from the `prototype` object. If a 25507 * `properties` object is given, its own enumerable string keyed properties 25508 * are assigned to the created object. 25509 * 25510 * @static 25511 * @memberOf _ 25512 * @since 2.3.0 25513 * @category Object 25514 * @param {Object} prototype The object to inherit from. 25515 * @param {Object} [properties] The properties to assign to the object. 25516 * @returns {Object} Returns the new object. 25517 * @example 25518 * 25519 * function Shape() { 25520 * this.x = 0; 25521 * this.y = 0; 25522 * } 25523 * 25524 * function Circle() { 25525 * Shape.call(this); 25526 * } 25527 * 25528 * Circle.prototype = _.create(Shape.prototype, { 25529 * 'constructor': Circle 25530 * }); 25531 * 25532 * var circle = new Circle; 25533 * circle instanceof Circle; 25534 * // => true 25535 * 25536 * circle instanceof Shape; 25537 * // => true 25538 */ 25539 function create(prototype, properties) { 25540 var result = baseCreate(prototype); 25541 return properties == null ? result : baseAssign(result, properties); 25542 } 25543 25544 /** 25545 * Assigns own and inherited enumerable string keyed properties of source 25546 * objects to the destination object for all destination properties that 25547 * resolve to `undefined`. Source objects are applied from left to right. 25548 * Once a property is set, additional values of the same property are ignored. 25549 * 25550 * **Note:** This method mutates `object`. 25551 * 25552 * @static 25553 * @since 0.1.0 25554 * @memberOf _ 25555 * @category Object 25556 * @param {Object} object The destination object. 25557 * @param {...Object} [sources] The source objects. 25558 * @returns {Object} Returns `object`. 25559 * @see _.defaultsDeep 25560 * @example 25561 * 25562 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 25563 * // => { 'a': 1, 'b': 2 } 25564 */ 25565 var defaults = baseRest(function(object, sources) { 25566 object = Object(object); 25567 25568 var index = -1; 25569 var length = sources.length; 25570 var guard = length > 2 ? sources[2] : undefined; 25571 25572 if (guard && isIterateeCall(sources[0], sources[1], guard)) { 25573 length = 1; 25574 } 25575 25576 while (++index < length) { 25577 var source = sources[index]; 25578 var props = keysIn(source); 25579 var propsIndex = -1; 25580 var propsLength = props.length; 25581 25582 while (++propsIndex < propsLength) { 25583 var key = props[propsIndex]; 25584 var value = object[key]; 25585 25586 if (value === undefined || 25587 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { 25588 object[key] = source[key]; 25589 } 25590 } 25591 } 25592 25593 return object; 25594 }); 25595 25596 /** 25597 * This method is like `_.defaults` except that it recursively assigns 25598 * default properties. 25599 * 25600 * **Note:** This method mutates `object`. 25601 * 25602 * @static 25603 * @memberOf _ 25604 * @since 3.10.0 25605 * @category Object 25606 * @param {Object} object The destination object. 25607 * @param {...Object} [sources] The source objects. 25608 * @returns {Object} Returns `object`. 25609 * @see _.defaults 25610 * @example 25611 * 25612 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); 25613 * // => { 'a': { 'b': 2, 'c': 3 } } 25614 */ 25615 var defaultsDeep = baseRest(function(args) { 25616 args.push(undefined, customDefaultsMerge); 25617 return apply(mergeWith, undefined, args); 25618 }); 25619 25620 /** 25621 * This method is like `_.find` except that it returns the key of the first 25622 * element `predicate` returns truthy for instead of the element itself. 25623 * 25624 * @static 25625 * @memberOf _ 25626 * @since 1.1.0 25627 * @category Object 25628 * @param {Object} object The object to inspect. 25629 * @param {Function} [predicate=_.identity] The function invoked per iteration. 25630 * @returns {string|undefined} Returns the key of the matched element, 25631 * else `undefined`. 25632 * @example 25633 * 25634 * var users = { 25635 * 'barney': { 'age': 36, 'active': true }, 25636 * 'fred': { 'age': 40, 'active': false }, 25637 * 'pebbles': { 'age': 1, 'active': true } 25638 * }; 25639 * 25640 * _.findKey(users, function(o) { return o.age < 40; }); 25641 * // => 'barney' (iteration order is not guaranteed) 25642 * 25643 * // The `_.matches` iteratee shorthand. 25644 * _.findKey(users, { 'age': 1, 'active': true }); 25645 * // => 'pebbles' 25646 * 25647 * // The `_.matchesProperty` iteratee shorthand. 25648 * _.findKey(users, ['active', false]); 25649 * // => 'fred' 25650 * 25651 * // The `_.property` iteratee shorthand. 25652 * _.findKey(users, 'active'); 25653 * // => 'barney' 25654 */ 25655 function findKey(object, predicate) { 25656 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); 25657 } 25658 25659 /** 25660 * This method is like `_.findKey` except that it iterates over elements of 25661 * a collection in the opposite order. 25662 * 25663 * @static 25664 * @memberOf _ 25665 * @since 2.0.0 25666 * @category Object 25667 * @param {Object} object The object to inspect. 25668 * @param {Function} [predicate=_.identity] The function invoked per iteration. 25669 * @returns {string|undefined} Returns the key of the matched element, 25670 * else `undefined`. 25671 * @example 25672 * 25673 * var users = { 25674 * 'barney': { 'age': 36, 'active': true }, 25675 * 'fred': { 'age': 40, 'active': false }, 25676 * 'pebbles': { 'age': 1, 'active': true } 25677 * }; 25678 * 25679 * _.findLastKey(users, function(o) { return o.age < 40; }); 25680 * // => returns 'pebbles' assuming `_.findKey` returns 'barney' 25681 * 25682 * // The `_.matches` iteratee shorthand. 25683 * _.findLastKey(users, { 'age': 36, 'active': true }); 25684 * // => 'barney' 25685 * 25686 * // The `_.matchesProperty` iteratee shorthand. 25687 * _.findLastKey(users, ['active', false]); 25688 * // => 'fred' 25689 * 25690 * // The `_.property` iteratee shorthand. 25691 * _.findLastKey(users, 'active'); 25692 * // => 'pebbles' 25693 */ 25694 function findLastKey(object, predicate) { 25695 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); 25696 } 25697 25698 /** 25699 * Iterates over own and inherited enumerable string keyed properties of an 25700 * object and invokes `iteratee` for each property. The iteratee is invoked 25701 * with three arguments: (value, key, object). Iteratee functions may exit 25702 * iteration early by explicitly returning `false`. 25703 * 25704 * @static 25705 * @memberOf _ 25706 * @since 0.3.0 25707 * @category Object 25708 * @param {Object} object The object to iterate over. 25709 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 25710 * @returns {Object} Returns `object`. 25711 * @see _.forInRight 25712 * @example 25713 * 25714 * function Foo() { 25715 * this.a = 1; 25716 * this.b = 2; 25717 * } 25718 * 25719 * Foo.prototype.c = 3; 25720 * 25721 * _.forIn(new Foo, function(value, key) { 25722 * console.log(key); 25723 * }); 25724 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). 25725 */ 25726 function forIn(object, iteratee) { 25727 return object == null 25728 ? object 25729 : baseFor(object, getIteratee(iteratee, 3), keysIn); 25730 } 25731 25732 /** 25733 * This method is like `_.forIn` except that it iterates over properties of 25734 * `object` in the opposite order. 25735 * 25736 * @static 25737 * @memberOf _ 25738 * @since 2.0.0 25739 * @category Object 25740 * @param {Object} object The object to iterate over. 25741 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 25742 * @returns {Object} Returns `object`. 25743 * @see _.forIn 25744 * @example 25745 * 25746 * function Foo() { 25747 * this.a = 1; 25748 * this.b = 2; 25749 * } 25750 * 25751 * Foo.prototype.c = 3; 25752 * 25753 * _.forInRight(new Foo, function(value, key) { 25754 * console.log(key); 25755 * }); 25756 * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. 25757 */ 25758 function forInRight(object, iteratee) { 25759 return object == null 25760 ? object 25761 : baseForRight(object, getIteratee(iteratee, 3), keysIn); 25762 } 25763 25764 /** 25765 * Iterates over own enumerable string keyed properties of an object and 25766 * invokes `iteratee` for each property. The iteratee is invoked with three 25767 * arguments: (value, key, object). Iteratee functions may exit iteration 25768 * early by explicitly returning `false`. 25769 * 25770 * @static 25771 * @memberOf _ 25772 * @since 0.3.0 25773 * @category Object 25774 * @param {Object} object The object to iterate over. 25775 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 25776 * @returns {Object} Returns `object`. 25777 * @see _.forOwnRight 25778 * @example 25779 * 25780 * function Foo() { 25781 * this.a = 1; 25782 * this.b = 2; 25783 * } 25784 * 25785 * Foo.prototype.c = 3; 25786 * 25787 * _.forOwn(new Foo, function(value, key) { 25788 * console.log(key); 25789 * }); 25790 * // => Logs 'a' then 'b' (iteration order is not guaranteed). 25791 */ 25792 function forOwn(object, iteratee) { 25793 return object && baseForOwn(object, getIteratee(iteratee, 3)); 25794 } 25795 25796 /** 25797 * This method is like `_.forOwn` except that it iterates over properties of 25798 * `object` in the opposite order. 25799 * 25800 * @static 25801 * @memberOf _ 25802 * @since 2.0.0 25803 * @category Object 25804 * @param {Object} object The object to iterate over. 25805 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 25806 * @returns {Object} Returns `object`. 25807 * @see _.forOwn 25808 * @example 25809 * 25810 * function Foo() { 25811 * this.a = 1; 25812 * this.b = 2; 25813 * } 25814 * 25815 * Foo.prototype.c = 3; 25816 * 25817 * _.forOwnRight(new Foo, function(value, key) { 25818 * console.log(key); 25819 * }); 25820 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. 25821 */ 25822 function forOwnRight(object, iteratee) { 25823 return object && baseForOwnRight(object, getIteratee(iteratee, 3)); 25824 } 25825 25826 /** 25827 * Creates an array of function property names from own enumerable properties 25828 * of `object`. 25829 * 25830 * @static 25831 * @since 0.1.0 25832 * @memberOf _ 25833 * @category Object 25834 * @param {Object} object The object to inspect. 25835 * @returns {Array} Returns the function names. 25836 * @see _.functionsIn 25837 * @example 25838 * 25839 * function Foo() { 25840 * this.a = _.constant('a'); 25841 * this.b = _.constant('b'); 25842 * } 25843 * 25844 * Foo.prototype.c = _.constant('c'); 25845 * 25846 * _.functions(new Foo); 25847 * // => ['a', 'b'] 25848 */ 25849 function functions(object) { 25850 return object == null ? [] : baseFunctions(object, keys(object)); 25851 } 25852 25853 /** 25854 * Creates an array of function property names from own and inherited 25855 * enumerable properties of `object`. 25856 * 25857 * @static 25858 * @memberOf _ 25859 * @since 4.0.0 25860 * @category Object 25861 * @param {Object} object The object to inspect. 25862 * @returns {Array} Returns the function names. 25863 * @see _.functions 25864 * @example 25865 * 25866 * function Foo() { 25867 * this.a = _.constant('a'); 25868 * this.b = _.constant('b'); 25869 * } 25870 * 25871 * Foo.prototype.c = _.constant('c'); 25872 * 25873 * _.functionsIn(new Foo); 25874 * // => ['a', 'b', 'c'] 25875 */ 25876 function functionsIn(object) { 25877 return object == null ? [] : baseFunctions(object, keysIn(object)); 25878 } 25879 25880 /** 25881 * Gets the value at `path` of `object`. If the resolved value is 25882 * `undefined`, the `defaultValue` is returned in its place. 25883 * 25884 * @static 25885 * @memberOf _ 25886 * @since 3.7.0 25887 * @category Object 25888 * @param {Object} object The object to query. 25889 * @param {Array|string} path The path of the property to get. 25890 * @param {*} [defaultValue] The value returned for `undefined` resolved values. 25891 * @returns {*} Returns the resolved value. 25892 * @example 25893 * 25894 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 25895 * 25896 * _.get(object, 'a[0].b.c'); 25897 * // => 3 25898 * 25899 * _.get(object, ['a', '0', 'b', 'c']); 25900 * // => 3 25901 * 25902 * _.get(object, 'a.b.c', 'default'); 25903 * // => 'default' 25904 */ 25905 function get(object, path, defaultValue) { 25906 var result = object == null ? undefined : baseGet(object, path); 25907 return result === undefined ? defaultValue : result; 25908 } 25909 25910 /** 25911 * Checks if `path` is a direct property of `object`. 25912 * 25913 * @static 25914 * @since 0.1.0 25915 * @memberOf _ 25916 * @category Object 25917 * @param {Object} object The object to query. 25918 * @param {Array|string} path The path to check. 25919 * @returns {boolean} Returns `true` if `path` exists, else `false`. 25920 * @example 25921 * 25922 * var object = { 'a': { 'b': 2 } }; 25923 * var other = _.create({ 'a': _.create({ 'b': 2 }) }); 25924 * 25925 * _.has(object, 'a'); 25926 * // => true 25927 * 25928 * _.has(object, 'a.b'); 25929 * // => true 25930 * 25931 * _.has(object, ['a', 'b']); 25932 * // => true 25933 * 25934 * _.has(other, 'a'); 25935 * // => false 25936 */ 25937 function has(object, path) { 25938 return object != null && hasPath(object, path, baseHas); 25939 } 25940 25941 /** 25942 * Checks if `path` is a direct or inherited property of `object`. 25943 * 25944 * @static 25945 * @memberOf _ 25946 * @since 4.0.0 25947 * @category Object 25948 * @param {Object} object The object to query. 25949 * @param {Array|string} path The path to check. 25950 * @returns {boolean} Returns `true` if `path` exists, else `false`. 25951 * @example 25952 * 25953 * var object = _.create({ 'a': _.create({ 'b': 2 }) }); 25954 * 25955 * _.hasIn(object, 'a'); 25956 * // => true 25957 * 25958 * _.hasIn(object, 'a.b'); 25959 * // => true 25960 * 25961 * _.hasIn(object, ['a', 'b']); 25962 * // => true 25963 * 25964 * _.hasIn(object, 'b'); 25965 * // => false 25966 */ 25967 function hasIn(object, path) { 25968 return object != null && hasPath(object, path, baseHasIn); 25969 } 25970 25971 /** 25972 * Creates an object composed of the inverted keys and values of `object`. 25973 * If `object` contains duplicate values, subsequent values overwrite 25974 * property assignments of previous values. 25975 * 25976 * @static 25977 * @memberOf _ 25978 * @since 0.7.0 25979 * @category Object 25980 * @param {Object} object The object to invert. 25981 * @returns {Object} Returns the new inverted object. 25982 * @example 25983 * 25984 * var object = { 'a': 1, 'b': 2, 'c': 1 }; 25985 * 25986 * _.invert(object); 25987 * // => { '1': 'c', '2': 'b' } 25988 */ 25989 var invert = createInverter(function(result, value, key) { 25990 if (value != null && 25991 typeof value.toString != 'function') { 25992 value = nativeObjectToString.call(value); 25993 } 25994 25995 result[value] = key; 25996 }, constant(identity)); 25997 25998 /** 25999 * This method is like `_.invert` except that the inverted object is generated 26000 * from the results of running each element of `object` thru `iteratee`. The 26001 * corresponding inverted value of each inverted key is an array of keys 26002 * responsible for generating the inverted value. The iteratee is invoked 26003 * with one argument: (value). 26004 * 26005 * @static 26006 * @memberOf _ 26007 * @since 4.1.0 26008 * @category Object 26009 * @param {Object} object The object to invert. 26010 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 26011 * @returns {Object} Returns the new inverted object. 26012 * @example 26013 * 26014 * var object = { 'a': 1, 'b': 2, 'c': 1 }; 26015 * 26016 * _.invertBy(object); 26017 * // => { '1': ['a', 'c'], '2': ['b'] } 26018 * 26019 * _.invertBy(object, function(value) { 26020 * return 'group' + value; 26021 * }); 26022 * // => { 'group1': ['a', 'c'], 'group2': ['b'] } 26023 */ 26024 var invertBy = createInverter(function(result, value, key) { 26025 if (value != null && 26026 typeof value.toString != 'function') { 26027 value = nativeObjectToString.call(value); 26028 } 26029 26030 if (hasOwnProperty.call(result, value)) { 26031 result[value].push(key); 26032 } else { 26033 result[value] = [key]; 26034 } 26035 }, getIteratee); 26036 26037 /** 26038 * Invokes the method at `path` of `object`. 26039 * 26040 * @static 26041 * @memberOf _ 26042 * @since 4.0.0 26043 * @category Object 26044 * @param {Object} object The object to query. 26045 * @param {Array|string} path The path of the method to invoke. 26046 * @param {...*} [args] The arguments to invoke the method with. 26047 * @returns {*} Returns the result of the invoked method. 26048 * @example 26049 * 26050 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; 26051 * 26052 * _.invoke(object, 'a[0].b.c.slice', 1, 3); 26053 * // => [2, 3] 26054 */ 26055 var invoke = baseRest(baseInvoke); 26056 26057 /** 26058 * Creates an array of the own enumerable property names of `object`. 26059 * 26060 * **Note:** Non-object values are coerced to objects. See the 26061 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) 26062 * for more details. 26063 * 26064 * @static 26065 * @since 0.1.0 26066 * @memberOf _ 26067 * @category Object 26068 * @param {Object} object The object to query. 26069 * @returns {Array} Returns the array of property names. 26070 * @example 26071 * 26072 * function Foo() { 26073 * this.a = 1; 26074 * this.b = 2; 26075 * } 26076 * 26077 * Foo.prototype.c = 3; 26078 * 26079 * _.keys(new Foo); 26080 * // => ['a', 'b'] (iteration order is not guaranteed) 26081 * 26082 * _.keys('hi'); 26083 * // => ['0', '1'] 26084 */ 26085 function keys(object) { 26086 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); 26087 } 26088 26089 /** 26090 * Creates an array of the own and inherited enumerable property names of `object`. 26091 * 26092 * **Note:** Non-object values are coerced to objects. 26093 * 26094 * @static 26095 * @memberOf _ 26096 * @since 3.0.0 26097 * @category Object 26098 * @param {Object} object The object to query. 26099 * @returns {Array} Returns the array of property names. 26100 * @example 26101 * 26102 * function Foo() { 26103 * this.a = 1; 26104 * this.b = 2; 26105 * } 26106 * 26107 * Foo.prototype.c = 3; 26108 * 26109 * _.keysIn(new Foo); 26110 * // => ['a', 'b', 'c'] (iteration order is not guaranteed) 26111 */ 26112 function keysIn(object) { 26113 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); 26114 } 26115 26116 /** 26117 * The opposite of `_.mapValues`; this method creates an object with the 26118 * same values as `object` and keys generated by running each own enumerable 26119 * string keyed property of `object` thru `iteratee`. The iteratee is invoked 26120 * with three arguments: (value, key, object). 26121 * 26122 * @static 26123 * @memberOf _ 26124 * @since 3.8.0 26125 * @category Object 26126 * @param {Object} object The object to iterate over. 26127 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 26128 * @returns {Object} Returns the new mapped object. 26129 * @see _.mapValues 26130 * @example 26131 * 26132 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { 26133 * return key + value; 26134 * }); 26135 * // => { 'a1': 1, 'b2': 2 } 26136 */ 26137 function mapKeys(object, iteratee) { 26138 var result = {}; 26139 iteratee = getIteratee(iteratee, 3); 26140 26141 baseForOwn(object, function(value, key, object) { 26142 baseAssignValue(result, iteratee(value, key, object), value); 26143 }); 26144 return result; 26145 } 26146 26147 /** 26148 * Creates an object with the same keys as `object` and values generated 26149 * by running each own enumerable string keyed property of `object` thru 26150 * `iteratee`. The iteratee is invoked with three arguments: 26151 * (value, key, object). 26152 * 26153 * @static 26154 * @memberOf _ 26155 * @since 2.4.0 26156 * @category Object 26157 * @param {Object} object The object to iterate over. 26158 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 26159 * @returns {Object} Returns the new mapped object. 26160 * @see _.mapKeys 26161 * @example 26162 * 26163 * var users = { 26164 * 'fred': { 'user': 'fred', 'age': 40 }, 26165 * 'pebbles': { 'user': 'pebbles', 'age': 1 } 26166 * }; 26167 * 26168 * _.mapValues(users, function(o) { return o.age; }); 26169 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) 26170 * 26171 * // The `_.property` iteratee shorthand. 26172 * _.mapValues(users, 'age'); 26173 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) 26174 */ 26175 function mapValues(object, iteratee) { 26176 var result = {}; 26177 iteratee = getIteratee(iteratee, 3); 26178 26179 baseForOwn(object, function(value, key, object) { 26180 baseAssignValue(result, key, iteratee(value, key, object)); 26181 }); 26182 return result; 26183 } 26184 26185 /** 26186 * This method is like `_.assign` except that it recursively merges own and 26187 * inherited enumerable string keyed properties of source objects into the 26188 * destination object. Source properties that resolve to `undefined` are 26189 * skipped if a destination value exists. Array and plain object properties 26190 * are merged recursively. Other objects and value types are overridden by 26191 * assignment. Source objects are applied from left to right. Subsequent 26192 * sources overwrite property assignments of previous sources. 26193 * 26194 * **Note:** This method mutates `object`. 26195 * 26196 * @static 26197 * @memberOf _ 26198 * @since 0.5.0 26199 * @category Object 26200 * @param {Object} object The destination object. 26201 * @param {...Object} [sources] The source objects. 26202 * @returns {Object} Returns `object`. 26203 * @example 26204 * 26205 * var object = { 26206 * 'a': [{ 'b': 2 }, { 'd': 4 }] 26207 * }; 26208 * 26209 * var other = { 26210 * 'a': [{ 'c': 3 }, { 'e': 5 }] 26211 * }; 26212 * 26213 * _.merge(object, other); 26214 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } 26215 */ 26216 var merge = createAssigner(function(object, source, srcIndex) { 26217 baseMerge(object, source, srcIndex); 26218 }); 26219 26220 /** 26221 * This method is like `_.merge` except that it accepts `customizer` which 26222 * is invoked to produce the merged values of the destination and source 26223 * properties. If `customizer` returns `undefined`, merging is handled by the 26224 * method instead. The `customizer` is invoked with six arguments: 26225 * (objValue, srcValue, key, object, source, stack). 26226 * 26227 * **Note:** This method mutates `object`. 26228 * 26229 * @static 26230 * @memberOf _ 26231 * @since 4.0.0 26232 * @category Object 26233 * @param {Object} object The destination object. 26234 * @param {...Object} sources The source objects. 26235 * @param {Function} customizer The function to customize assigned values. 26236 * @returns {Object} Returns `object`. 26237 * @example 26238 * 26239 * function customizer(objValue, srcValue) { 26240 * if (_.isArray(objValue)) { 26241 * return objValue.concat(srcValue); 26242 * } 26243 * } 26244 * 26245 * var object = { 'a': [1], 'b': [2] }; 26246 * var other = { 'a': [3], 'b': [4] }; 26247 * 26248 * _.mergeWith(object, other, customizer); 26249 * // => { 'a': [1, 3], 'b': [2, 4] } 26250 */ 26251 var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { 26252 baseMerge(object, source, srcIndex, customizer); 26253 }); 26254 26255 /** 26256 * The opposite of `_.pick`; this method creates an object composed of the 26257 * own and inherited enumerable property paths of `object` that are not omitted. 26258 * 26259 * **Note:** This method is considerably slower than `_.pick`. 26260 * 26261 * @static 26262 * @since 0.1.0 26263 * @memberOf _ 26264 * @category Object 26265 * @param {Object} object The source object. 26266 * @param {...(string|string[])} [paths] The property paths to omit. 26267 * @returns {Object} Returns the new object. 26268 * @example 26269 * 26270 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 26271 * 26272 * _.omit(object, ['a', 'c']); 26273 * // => { 'b': '2' } 26274 */ 26275 var omit = flatRest(function(object, paths) { 26276 var result = {}; 26277 if (object == null) { 26278 return result; 26279 } 26280 var isDeep = false; 26281 paths = arrayMap(paths, function(path) { 26282 path = castPath(path, object); 26283 isDeep || (isDeep = path.length > 1); 26284 return path; 26285 }); 26286 copyObject(object, getAllKeysIn(object), result); 26287 if (isDeep) { 26288 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); 26289 } 26290 var length = paths.length; 26291 while (length--) { 26292 baseUnset(result, paths[length]); 26293 } 26294 return result; 26295 }); 26296 26297 /** 26298 * The opposite of `_.pickBy`; this method creates an object composed of 26299 * the own and inherited enumerable string keyed properties of `object` that 26300 * `predicate` doesn't return truthy for. The predicate is invoked with two 26301 * arguments: (value, key). 26302 * 26303 * @static 26304 * @memberOf _ 26305 * @since 4.0.0 26306 * @category Object 26307 * @param {Object} object The source object. 26308 * @param {Function} [predicate=_.identity] The function invoked per property. 26309 * @returns {Object} Returns the new object. 26310 * @example 26311 * 26312 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 26313 * 26314 * _.omitBy(object, _.isNumber); 26315 * // => { 'b': '2' } 26316 */ 26317 function omitBy(object, predicate) { 26318 return pickBy(object, negate(getIteratee(predicate))); 26319 } 26320 26321 /** 26322 * Creates an object composed of the picked `object` properties. 26323 * 26324 * @static 26325 * @since 0.1.0 26326 * @memberOf _ 26327 * @category Object 26328 * @param {Object} object The source object. 26329 * @param {...(string|string[])} [paths] The property paths to pick. 26330 * @returns {Object} Returns the new object. 26331 * @example 26332 * 26333 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 26334 * 26335 * _.pick(object, ['a', 'c']); 26336 * // => { 'a': 1, 'c': 3 } 26337 */ 26338 var pick = flatRest(function(object, paths) { 26339 return object == null ? {} : basePick(object, paths); 26340 }); 26341 26342 /** 26343 * Creates an object composed of the `object` properties `predicate` returns 26344 * truthy for. The predicate is invoked with two arguments: (value, key). 26345 * 26346 * @static 26347 * @memberOf _ 26348 * @since 4.0.0 26349 * @category Object 26350 * @param {Object} object The source object. 26351 * @param {Function} [predicate=_.identity] The function invoked per property. 26352 * @returns {Object} Returns the new object. 26353 * @example 26354 * 26355 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 26356 * 26357 * _.pickBy(object, _.isNumber); 26358 * // => { 'a': 1, 'c': 3 } 26359 */ 26360 function pickBy(object, predicate) { 26361 if (object == null) { 26362 return {}; 26363 } 26364 var props = arrayMap(getAllKeysIn(object), function(prop) { 26365 return [prop]; 26366 }); 26367 predicate = getIteratee(predicate); 26368 return basePickBy(object, props, function(value, path) { 26369 return predicate(value, path[0]); 26370 }); 26371 } 26372 26373 /** 26374 * This method is like `_.get` except that if the resolved value is a 26375 * function it's invoked with the `this` binding of its parent object and 26376 * its result is returned. 26377 * 26378 * @static 26379 * @since 0.1.0 26380 * @memberOf _ 26381 * @category Object 26382 * @param {Object} object The object to query. 26383 * @param {Array|string} path The path of the property to resolve. 26384 * @param {*} [defaultValue] The value returned for `undefined` resolved values. 26385 * @returns {*} Returns the resolved value. 26386 * @example 26387 * 26388 * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; 26389 * 26390 * _.result(object, 'a[0].b.c1'); 26391 * // => 3 26392 * 26393 * _.result(object, 'a[0].b.c2'); 26394 * // => 4 26395 * 26396 * _.result(object, 'a[0].b.c3', 'default'); 26397 * // => 'default' 26398 * 26399 * _.result(object, 'a[0].b.c3', _.constant('default')); 26400 * // => 'default' 26401 */ 26402 function result(object, path, defaultValue) { 26403 path = castPath(path, object); 26404 26405 var index = -1, 26406 length = path.length; 26407 26408 // Ensure the loop is entered when path is empty. 26409 if (!length) { 26410 length = 1; 26411 object = undefined; 26412 } 26413 while (++index < length) { 26414 var value = object == null ? undefined : object[toKey(path[index])]; 26415 if (value === undefined) { 26416 index = length; 26417 value = defaultValue; 26418 } 26419 object = isFunction(value) ? value.call(object) : value; 26420 } 26421 return object; 26422 } 26423 26424 /** 26425 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, 26426 * it's created. Arrays are created for missing index properties while objects 26427 * are created for all other missing properties. Use `_.setWith` to customize 26428 * `path` creation. 26429 * 26430 * **Note:** This method mutates `object`. 26431 * 26432 * @static 26433 * @memberOf _ 26434 * @since 3.7.0 26435 * @category Object 26436 * @param {Object} object The object to modify. 26437 * @param {Array|string} path The path of the property to set. 26438 * @param {*} value The value to set. 26439 * @returns {Object} Returns `object`. 26440 * @example 26441 * 26442 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 26443 * 26444 * _.set(object, 'a[0].b.c', 4); 26445 * console.log(object.a[0].b.c); 26446 * // => 4 26447 * 26448 * _.set(object, ['x', '0', 'y', 'z'], 5); 26449 * console.log(object.x[0].y.z); 26450 * // => 5 26451 */ 26452 function set(object, path, value) { 26453 return object == null ? object : baseSet(object, path, value); 26454 } 26455 26456 /** 26457 * This method is like `_.set` except that it accepts `customizer` which is 26458 * invoked to produce the objects of `path`. If `customizer` returns `undefined` 26459 * path creation is handled by the method instead. The `customizer` is invoked 26460 * with three arguments: (nsValue, key, nsObject). 26461 * 26462 * **Note:** This method mutates `object`. 26463 * 26464 * @static 26465 * @memberOf _ 26466 * @since 4.0.0 26467 * @category Object 26468 * @param {Object} object The object to modify. 26469 * @param {Array|string} path The path of the property to set. 26470 * @param {*} value The value to set. 26471 * @param {Function} [customizer] The function to customize assigned values. 26472 * @returns {Object} Returns `object`. 26473 * @example 26474 * 26475 * var object = {}; 26476 * 26477 * _.setWith(object, '[0][1]', 'a', Object); 26478 * // => { '0': { '1': 'a' } } 26479 */ 26480 function setWith(object, path, value, customizer) { 26481 customizer = typeof customizer == 'function' ? customizer : undefined; 26482 return object == null ? object : baseSet(object, path, value, customizer); 26483 } 26484 26485 /** 26486 * Creates an array of own enumerable string keyed-value pairs for `object` 26487 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its 26488 * entries are returned. 26489 * 26490 * @static 26491 * @memberOf _ 26492 * @since 4.0.0 26493 * @alias entries 26494 * @category Object 26495 * @param {Object} object The object to query. 26496 * @returns {Array} Returns the key-value pairs. 26497 * @example 26498 * 26499 * function Foo() { 26500 * this.a = 1; 26501 * this.b = 2; 26502 * } 26503 * 26504 * Foo.prototype.c = 3; 26505 * 26506 * _.toPairs(new Foo); 26507 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) 26508 */ 26509 var toPairs = createToPairs(keys); 26510 26511 /** 26512 * Creates an array of own and inherited enumerable string keyed-value pairs 26513 * for `object` which can be consumed by `_.fromPairs`. If `object` is a map 26514 * or set, its entries are returned. 26515 * 26516 * @static 26517 * @memberOf _ 26518 * @since 4.0.0 26519 * @alias entriesIn 26520 * @category Object 26521 * @param {Object} object The object to query. 26522 * @returns {Array} Returns the key-value pairs. 26523 * @example 26524 * 26525 * function Foo() { 26526 * this.a = 1; 26527 * this.b = 2; 26528 * } 26529 * 26530 * Foo.prototype.c = 3; 26531 * 26532 * _.toPairsIn(new Foo); 26533 * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) 26534 */ 26535 var toPairsIn = createToPairs(keysIn); 26536 26537 /** 26538 * An alternative to `_.reduce`; this method transforms `object` to a new 26539 * `accumulator` object which is the result of running each of its own 26540 * enumerable string keyed properties thru `iteratee`, with each invocation 26541 * potentially mutating the `accumulator` object. If `accumulator` is not 26542 * provided, a new object with the same `[[Prototype]]` will be used. The 26543 * iteratee is invoked with four arguments: (accumulator, value, key, object). 26544 * Iteratee functions may exit iteration early by explicitly returning `false`. 26545 * 26546 * @static 26547 * @memberOf _ 26548 * @since 1.3.0 26549 * @category Object 26550 * @param {Object} object The object to iterate over. 26551 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 26552 * @param {*} [accumulator] The custom accumulator value. 26553 * @returns {*} Returns the accumulated value. 26554 * @example 26555 * 26556 * _.transform([2, 3, 4], function(result, n) { 26557 * result.push(n *= n); 26558 * return n % 2 == 0; 26559 * }, []); 26560 * // => [4, 9] 26561 * 26562 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { 26563 * (result[value] || (result[value] = [])).push(key); 26564 * }, {}); 26565 * // => { '1': ['a', 'c'], '2': ['b'] } 26566 */ 26567 function transform(object, iteratee, accumulator) { 26568 var isArr = isArray(object), 26569 isArrLike = isArr || isBuffer(object) || isTypedArray(object); 26570 26571 iteratee = getIteratee(iteratee, 4); 26572 if (accumulator == null) { 26573 var Ctor = object && object.constructor; 26574 if (isArrLike) { 26575 accumulator = isArr ? new Ctor : []; 26576 } 26577 else if (isObject(object)) { 26578 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; 26579 } 26580 else { 26581 accumulator = {}; 26582 } 26583 } 26584 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { 26585 return iteratee(accumulator, value, index, object); 26586 }); 26587 return accumulator; 26588 } 26589 26590 /** 26591 * Removes the property at `path` of `object`. 26592 * 26593 * **Note:** This method mutates `object`. 26594 * 26595 * @static 26596 * @memberOf _ 26597 * @since 4.0.0 26598 * @category Object 26599 * @param {Object} object The object to modify. 26600 * @param {Array|string} path The path of the property to unset. 26601 * @returns {boolean} Returns `true` if the property is deleted, else `false`. 26602 * @example 26603 * 26604 * var object = { 'a': [{ 'b': { 'c': 7 } }] }; 26605 * _.unset(object, 'a[0].b.c'); 26606 * // => true 26607 * 26608 * console.log(object); 26609 * // => { 'a': [{ 'b': {} }] }; 26610 * 26611 * _.unset(object, ['a', '0', 'b', 'c']); 26612 * // => true 26613 * 26614 * console.log(object); 26615 * // => { 'a': [{ 'b': {} }] }; 26616 */ 26617 function unset(object, path) { 26618 return object == null ? true : baseUnset(object, path); 26619 } 26620 26621 /** 26622 * This method is like `_.set` except that accepts `updater` to produce the 26623 * value to set. Use `_.updateWith` to customize `path` creation. The `updater` 26624 * is invoked with one argument: (value). 26625 * 26626 * **Note:** This method mutates `object`. 26627 * 26628 * @static 26629 * @memberOf _ 26630 * @since 4.6.0 26631 * @category Object 26632 * @param {Object} object The object to modify. 26633 * @param {Array|string} path The path of the property to set. 26634 * @param {Function} updater The function to produce the updated value. 26635 * @returns {Object} Returns `object`. 26636 * @example 26637 * 26638 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 26639 * 26640 * _.update(object, 'a[0].b.c', function(n) { return n * n; }); 26641 * console.log(object.a[0].b.c); 26642 * // => 9 26643 * 26644 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); 26645 * console.log(object.x[0].y.z); 26646 * // => 0 26647 */ 26648 function update(object, path, updater) { 26649 return object == null ? object : baseUpdate(object, path, castFunction(updater)); 26650 } 26651 26652 /** 26653 * This method is like `_.update` except that it accepts `customizer` which is 26654 * invoked to produce the objects of `path`. If `customizer` returns `undefined` 26655 * path creation is handled by the method instead. The `customizer` is invoked 26656 * with three arguments: (nsValue, key, nsObject). 26657 * 26658 * **Note:** This method mutates `object`. 26659 * 26660 * @static 26661 * @memberOf _ 26662 * @since 4.6.0 26663 * @category Object 26664 * @param {Object} object The object to modify. 26665 * @param {Array|string} path The path of the property to set. 26666 * @param {Function} updater The function to produce the updated value. 26667 * @param {Function} [customizer] The function to customize assigned values. 26668 * @returns {Object} Returns `object`. 26669 * @example 26670 * 26671 * var object = {}; 26672 * 26673 * _.updateWith(object, '[0][1]', _.constant('a'), Object); 26674 * // => { '0': { '1': 'a' } } 26675 */ 26676 function updateWith(object, path, updater, customizer) { 26677 customizer = typeof customizer == 'function' ? customizer : undefined; 26678 return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); 26679 } 26680 26681 /** 26682 * Creates an array of the own enumerable string keyed property values of `object`. 26683 * 26684 * **Note:** Non-object values are coerced to objects. 26685 * 26686 * @static 26687 * @since 0.1.0 26688 * @memberOf _ 26689 * @category Object 26690 * @param {Object} object The object to query. 26691 * @returns {Array} Returns the array of property values. 26692 * @example 26693 * 26694 * function Foo() { 26695 * this.a = 1; 26696 * this.b = 2; 26697 * } 26698 * 26699 * Foo.prototype.c = 3; 26700 * 26701 * _.values(new Foo); 26702 * // => [1, 2] (iteration order is not guaranteed) 26703 * 26704 * _.values('hi'); 26705 * // => ['h', 'i'] 26706 */ 26707 function values(object) { 26708 return object == null ? [] : baseValues(object, keys(object)); 26709 } 26710 26711 /** 26712 * Creates an array of the own and inherited enumerable string keyed property 26713 * values of `object`. 26714 * 26715 * **Note:** Non-object values are coerced to objects. 26716 * 26717 * @static 26718 * @memberOf _ 26719 * @since 3.0.0 26720 * @category Object 26721 * @param {Object} object The object to query. 26722 * @returns {Array} Returns the array of property values. 26723 * @example 26724 * 26725 * function Foo() { 26726 * this.a = 1; 26727 * this.b = 2; 26728 * } 26729 * 26730 * Foo.prototype.c = 3; 26731 * 26732 * _.valuesIn(new Foo); 26733 * // => [1, 2, 3] (iteration order is not guaranteed) 26734 */ 26735 function valuesIn(object) { 26736 return object == null ? [] : baseValues(object, keysIn(object)); 26737 } 26738 26739 /*------------------------------------------------------------------------*/ 26740 26741 /** 26742 * Clamps `number` within the inclusive `lower` and `upper` bounds. 26743 * 26744 * @static 26745 * @memberOf _ 26746 * @since 4.0.0 26747 * @category Number 26748 * @param {number} number The number to clamp. 26749 * @param {number} [lower] The lower bound. 26750 * @param {number} upper The upper bound. 26751 * @returns {number} Returns the clamped number. 26752 * @example 26753 * 26754 * _.clamp(-10, -5, 5); 26755 * // => -5 26756 * 26757 * _.clamp(10, -5, 5); 26758 * // => 5 26759 */ 26760 function clamp(number, lower, upper) { 26761 if (upper === undefined) { 26762 upper = lower; 26763 lower = undefined; 26764 } 26765 if (upper !== undefined) { 26766 upper = toNumber(upper); 26767 upper = upper === upper ? upper : 0; 26768 } 26769 if (lower !== undefined) { 26770 lower = toNumber(lower); 26771 lower = lower === lower ? lower : 0; 26772 } 26773 return baseClamp(toNumber(number), lower, upper); 26774 } 26775 26776 /** 26777 * Checks if `n` is between `start` and up to, but not including, `end`. If 26778 * `end` is not specified, it's set to `start` with `start` then set to `0`. 26779 * If `start` is greater than `end` the params are swapped to support 26780 * negative ranges. 26781 * 26782 * @static 26783 * @memberOf _ 26784 * @since 3.3.0 26785 * @category Number 26786 * @param {number} number The number to check. 26787 * @param {number} [start=0] The start of the range. 26788 * @param {number} end The end of the range. 26789 * @returns {boolean} Returns `true` if `number` is in the range, else `false`. 26790 * @see _.range, _.rangeRight 26791 * @example 26792 * 26793 * _.inRange(3, 2, 4); 26794 * // => true 26795 * 26796 * _.inRange(4, 8); 26797 * // => true 26798 * 26799 * _.inRange(4, 2); 26800 * // => false 26801 * 26802 * _.inRange(2, 2); 26803 * // => false 26804 * 26805 * _.inRange(1.2, 2); 26806 * // => true 26807 * 26808 * _.inRange(5.2, 4); 26809 * // => false 26810 * 26811 * _.inRange(-3, -2, -6); 26812 * // => true 26813 */ 26814 function inRange(number, start, end) { 26815 start = toFinite(start); 26816 if (end === undefined) { 26817 end = start; 26818 start = 0; 26819 } else { 26820 end = toFinite(end); 26821 } 26822 number = toNumber(number); 26823 return baseInRange(number, start, end); 26824 } 26825 26826 /** 26827 * Produces a random number between the inclusive `lower` and `upper` bounds. 26828 * If only one argument is provided a number between `0` and the given number 26829 * is returned. If `floating` is `true`, or either `lower` or `upper` are 26830 * floats, a floating-point number is returned instead of an integer. 26831 * 26832 * **Note:** JavaScript follows the IEEE-754 standard for resolving 26833 * floating-point values which can produce unexpected results. 26834 * 26835 * @static 26836 * @memberOf _ 26837 * @since 0.7.0 26838 * @category Number 26839 * @param {number} [lower=0] The lower bound. 26840 * @param {number} [upper=1] The upper bound. 26841 * @param {boolean} [floating] Specify returning a floating-point number. 26842 * @returns {number} Returns the random number. 26843 * @example 26844 * 26845 * _.random(0, 5); 26846 * // => an integer between 0 and 5 26847 * 26848 * _.random(5); 26849 * // => also an integer between 0 and 5 26850 * 26851 * _.random(5, true); 26852 * // => a floating-point number between 0 and 5 26853 * 26854 * _.random(1.2, 5.2); 26855 * // => a floating-point number between 1.2 and 5.2 26856 */ 26857 function random(lower, upper, floating) { 26858 if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { 26859 upper = floating = undefined; 26860 } 26861 if (floating === undefined) { 26862 if (typeof upper == 'boolean') { 26863 floating = upper; 26864 upper = undefined; 26865 } 26866 else if (typeof lower == 'boolean') { 26867 floating = lower; 26868 lower = undefined; 26869 } 26870 } 26871 if (lower === undefined && upper === undefined) { 26872 lower = 0; 26873 upper = 1; 26874 } 26875 else { 26876 lower = toFinite(lower); 26877 if (upper === undefined) { 26878 upper = lower; 26879 lower = 0; 26880 } else { 26881 upper = toFinite(upper); 26882 } 26883 } 26884 if (lower > upper) { 26885 var temp = lower; 26886 lower = upper; 26887 upper = temp; 26888 } 26889 if (floating || lower % 1 || upper % 1) { 26890 var rand = nativeRandom(); 26891 return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); 26892 } 26893 return baseRandom(lower, upper); 26894 } 26895 26896 /*------------------------------------------------------------------------*/ 26897 26898 /** 26899 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). 26900 * 26901 * @static 26902 * @memberOf _ 26903 * @since 3.0.0 26904 * @category String 26905 * @param {string} [string=''] The string to convert. 26906 * @returns {string} Returns the camel cased string. 26907 * @example 26908 * 26909 * _.camelCase('Foo Bar'); 26910 * // => 'fooBar' 26911 * 26912 * _.camelCase('--foo-bar--'); 26913 * // => 'fooBar' 26914 * 26915 * _.camelCase('__FOO_BAR__'); 26916 * // => 'fooBar' 26917 */ 26918 var camelCase = createCompounder(function(result, word, index) { 26919 word = word.toLowerCase(); 26920 return result + (index ? capitalize(word) : word); 26921 }); 26922 26923 /** 26924 * Converts the first character of `string` to upper case and the remaining 26925 * to lower case. 26926 * 26927 * @static 26928 * @memberOf _ 26929 * @since 3.0.0 26930 * @category String 26931 * @param {string} [string=''] The string to capitalize. 26932 * @returns {string} Returns the capitalized string. 26933 * @example 26934 * 26935 * _.capitalize('FRED'); 26936 * // => 'Fred' 26937 */ 26938 function capitalize(string) { 26939 return upperFirst(toString(string).toLowerCase()); 26940 } 26941 26942 /** 26943 * Deburrs `string` by converting 26944 * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) 26945 * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) 26946 * letters to basic Latin letters and removing 26947 * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). 26948 * 26949 * @static 26950 * @memberOf _ 26951 * @since 3.0.0 26952 * @category String 26953 * @param {string} [string=''] The string to deburr. 26954 * @returns {string} Returns the deburred string. 26955 * @example 26956 * 26957 * _.deburr('déjà vu'); 26958 * // => 'deja vu' 26959 */ 26960 function deburr(string) { 26961 string = toString(string); 26962 return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); 26963 } 26964 26965 /** 26966 * Checks if `string` ends with the given target string. 26967 * 26968 * @static 26969 * @memberOf _ 26970 * @since 3.0.0 26971 * @category String 26972 * @param {string} [string=''] The string to inspect. 26973 * @param {string} [target] The string to search for. 26974 * @param {number} [position=string.length] The position to search up to. 26975 * @returns {boolean} Returns `true` if `string` ends with `target`, 26976 * else `false`. 26977 * @example 26978 * 26979 * _.endsWith('abc', 'c'); 26980 * // => true 26981 * 26982 * _.endsWith('abc', 'b'); 26983 * // => false 26984 * 26985 * _.endsWith('abc', 'b', 2); 26986 * // => true 26987 */ 26988 function endsWith(string, target, position) { 26989 string = toString(string); 26990 target = baseToString(target); 26991 26992 var length = string.length; 26993 position = position === undefined 26994 ? length 26995 : baseClamp(toInteger(position), 0, length); 26996 26997 var end = position; 26998 position -= target.length; 26999 return position >= 0 && string.slice(position, end) == target; 27000 } 27001 27002 /** 27003 * Converts the characters "&", "<", ">", '"', and "'" in `string` to their 27004 * corresponding HTML entities. 27005 * 27006 * **Note:** No other characters are escaped. To escape additional 27007 * characters use a third-party library like [_he_](https://mths.be/he). 27008 * 27009 * Though the ">" character is escaped for symmetry, characters like 27010 * ">" and "/" don't need escaping in HTML and have no special meaning 27011 * unless they're part of a tag or unquoted attribute value. See 27012 * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) 27013 * (under "semi-related fun fact") for more details. 27014 * 27015 * When working with HTML you should always 27016 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce 27017 * XSS vectors. 27018 * 27019 * @static 27020 * @since 0.1.0 27021 * @memberOf _ 27022 * @category String 27023 * @param {string} [string=''] The string to escape. 27024 * @returns {string} Returns the escaped string. 27025 * @example 27026 * 27027 * _.escape('fred, barney, & pebbles'); 27028 * // => 'fred, barney, & pebbles' 27029 */ 27030 function escape(string) { 27031 string = toString(string); 27032 return (string && reHasUnescapedHtml.test(string)) 27033 ? string.replace(reUnescapedHtml, escapeHtmlChar) 27034 : string; 27035 } 27036 27037 /** 27038 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", 27039 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. 27040 * 27041 * @static 27042 * @memberOf _ 27043 * @since 3.0.0 27044 * @category String 27045 * @param {string} [string=''] The string to escape. 27046 * @returns {string} Returns the escaped string. 27047 * @example 27048 * 27049 * _.escapeRegExp('[lodash](https://lodash.com/)'); 27050 * // => '\[lodash\]\(https://lodash\.com/\)' 27051 */ 27052 function escapeRegExp(string) { 27053 string = toString(string); 27054 return (string && reHasRegExpChar.test(string)) 27055 ? string.replace(reRegExpChar, '\\$&') 27056 : string; 27057 } 27058 27059 /** 27060 * Converts `string` to 27061 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). 27062 * 27063 * @static 27064 * @memberOf _ 27065 * @since 3.0.0 27066 * @category String 27067 * @param {string} [string=''] The string to convert. 27068 * @returns {string} Returns the kebab cased string. 27069 * @example 27070 * 27071 * _.kebabCase('Foo Bar'); 27072 * // => 'foo-bar' 27073 * 27074 * _.kebabCase('fooBar'); 27075 * // => 'foo-bar' 27076 * 27077 * _.kebabCase('__FOO_BAR__'); 27078 * // => 'foo-bar' 27079 */ 27080 var kebabCase = createCompounder(function(result, word, index) { 27081 return result + (index ? '-' : '') + word.toLowerCase(); 27082 }); 27083 27084 /** 27085 * Converts `string`, as space separated words, to lower case. 27086 * 27087 * @static 27088 * @memberOf _ 27089 * @since 4.0.0 27090 * @category String 27091 * @param {string} [string=''] The string to convert. 27092 * @returns {string} Returns the lower cased string. 27093 * @example 27094 * 27095 * _.lowerCase('--Foo-Bar--'); 27096 * // => 'foo bar' 27097 * 27098 * _.lowerCase('fooBar'); 27099 * // => 'foo bar' 27100 * 27101 * _.lowerCase('__FOO_BAR__'); 27102 * // => 'foo bar' 27103 */ 27104 var lowerCase = createCompounder(function(result, word, index) { 27105 return result + (index ? ' ' : '') + word.toLowerCase(); 27106 }); 27107 27108 /** 27109 * Converts the first character of `string` to lower case. 27110 * 27111 * @static 27112 * @memberOf _ 27113 * @since 4.0.0 27114 * @category String 27115 * @param {string} [string=''] The string to convert. 27116 * @returns {string} Returns the converted string. 27117 * @example 27118 * 27119 * _.lowerFirst('Fred'); 27120 * // => 'fred' 27121 * 27122 * _.lowerFirst('FRED'); 27123 * // => 'fRED' 27124 */ 27125 var lowerFirst = createCaseFirst('toLowerCase'); 27126 27127 /** 27128 * Pads `string` on the left and right sides if it's shorter than `length`. 27129 * Padding characters are truncated if they can't be evenly divided by `length`. 27130 * 27131 * @static 27132 * @memberOf _ 27133 * @since 3.0.0 27134 * @category String 27135 * @param {string} [string=''] The string to pad. 27136 * @param {number} [length=0] The padding length. 27137 * @param {string} [chars=' '] The string used as padding. 27138 * @returns {string} Returns the padded string. 27139 * @example 27140 * 27141 * _.pad('abc', 8); 27142 * // => ' abc ' 27143 * 27144 * _.pad('abc', 8, '_-'); 27145 * // => '_-abc_-_' 27146 * 27147 * _.pad('abc', 3); 27148 * // => 'abc' 27149 */ 27150 function pad(string, length, chars) { 27151 string = toString(string); 27152 length = toInteger(length); 27153 27154 var strLength = length ? stringSize(string) : 0; 27155 if (!length || strLength >= length) { 27156 return string; 27157 } 27158 var mid = (length - strLength) / 2; 27159 return ( 27160 createPadding(nativeFloor(mid), chars) + 27161 string + 27162 createPadding(nativeCeil(mid), chars) 27163 ); 27164 } 27165 27166 /** 27167 * Pads `string` on the right side if it's shorter than `length`. Padding 27168 * characters are truncated if they exceed `length`. 27169 * 27170 * @static 27171 * @memberOf _ 27172 * @since 4.0.0 27173 * @category String 27174 * @param {string} [string=''] The string to pad. 27175 * @param {number} [length=0] The padding length. 27176 * @param {string} [chars=' '] The string used as padding. 27177 * @returns {string} Returns the padded string. 27178 * @example 27179 * 27180 * _.padEnd('abc', 6); 27181 * // => 'abc ' 27182 * 27183 * _.padEnd('abc', 6, '_-'); 27184 * // => 'abc_-_' 27185 * 27186 * _.padEnd('abc', 3); 27187 * // => 'abc' 27188 */ 27189 function padEnd(string, length, chars) { 27190 string = toString(string); 27191 length = toInteger(length); 27192 27193 var strLength = length ? stringSize(string) : 0; 27194 return (length && strLength < length) 27195 ? (string + createPadding(length - strLength, chars)) 27196 : string; 27197 } 27198 27199 /** 27200 * Pads `string` on the left side if it's shorter than `length`. Padding 27201 * characters are truncated if they exceed `length`. 27202 * 27203 * @static 27204 * @memberOf _ 27205 * @since 4.0.0 27206 * @category String 27207 * @param {string} [string=''] The string to pad. 27208 * @param {number} [length=0] The padding length. 27209 * @param {string} [chars=' '] The string used as padding. 27210 * @returns {string} Returns the padded string. 27211 * @example 27212 * 27213 * _.padStart('abc', 6); 27214 * // => ' abc' 27215 * 27216 * _.padStart('abc', 6, '_-'); 27217 * // => '_-_abc' 27218 * 27219 * _.padStart('abc', 3); 27220 * // => 'abc' 27221 */ 27222 function padStart(string, length, chars) { 27223 string = toString(string); 27224 length = toInteger(length); 27225 27226 var strLength = length ? stringSize(string) : 0; 27227 return (length && strLength < length) 27228 ? (createPadding(length - strLength, chars) + string) 27229 : string; 27230 } 27231 27232 /** 27233 * Converts `string` to an integer of the specified radix. If `radix` is 27234 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a 27235 * hexadecimal, in which case a `radix` of `16` is used. 27236 * 27237 * **Note:** This method aligns with the 27238 * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. 27239 * 27240 * @static 27241 * @memberOf _ 27242 * @since 1.1.0 27243 * @category String 27244 * @param {string} string The string to convert. 27245 * @param {number} [radix=10] The radix to interpret `value` by. 27246 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27247 * @returns {number} Returns the converted integer. 27248 * @example 27249 * 27250 * _.parseInt('08'); 27251 * // => 8 27252 * 27253 * _.map(['6', '08', '10'], _.parseInt); 27254 * // => [6, 8, 10] 27255 */ 27256 function parseInt(string, radix, guard) { 27257 if (guard || radix == null) { 27258 radix = 0; 27259 } else if (radix) { 27260 radix = +radix; 27261 } 27262 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); 27263 } 27264 27265 /** 27266 * Repeats the given string `n` times. 27267 * 27268 * @static 27269 * @memberOf _ 27270 * @since 3.0.0 27271 * @category String 27272 * @param {string} [string=''] The string to repeat. 27273 * @param {number} [n=1] The number of times to repeat the string. 27274 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27275 * @returns {string} Returns the repeated string. 27276 * @example 27277 * 27278 * _.repeat('*', 3); 27279 * // => '***' 27280 * 27281 * _.repeat('abc', 2); 27282 * // => 'abcabc' 27283 * 27284 * _.repeat('abc', 0); 27285 * // => '' 27286 */ 27287 function repeat(string, n, guard) { 27288 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { 27289 n = 1; 27290 } else { 27291 n = toInteger(n); 27292 } 27293 return baseRepeat(toString(string), n); 27294 } 27295 27296 /** 27297 * Replaces matches for `pattern` in `string` with `replacement`. 27298 * 27299 * **Note:** This method is based on 27300 * [`String#replace`](https://mdn.io/String/replace). 27301 * 27302 * @static 27303 * @memberOf _ 27304 * @since 4.0.0 27305 * @category String 27306 * @param {string} [string=''] The string to modify. 27307 * @param {RegExp|string} pattern The pattern to replace. 27308 * @param {Function|string} replacement The match replacement. 27309 * @returns {string} Returns the modified string. 27310 * @example 27311 * 27312 * _.replace('Hi Fred', 'Fred', 'Barney'); 27313 * // => 'Hi Barney' 27314 */ 27315 function replace() { 27316 var args = arguments, 27317 string = toString(args[0]); 27318 27319 return args.length < 3 ? string : string.replace(args[1], args[2]); 27320 } 27321 27322 /** 27323 * Converts `string` to 27324 * [snake case](https://en.wikipedia.org/wiki/Snake_case). 27325 * 27326 * @static 27327 * @memberOf _ 27328 * @since 3.0.0 27329 * @category String 27330 * @param {string} [string=''] The string to convert. 27331 * @returns {string} Returns the snake cased string. 27332 * @example 27333 * 27334 * _.snakeCase('Foo Bar'); 27335 * // => 'foo_bar' 27336 * 27337 * _.snakeCase('fooBar'); 27338 * // => 'foo_bar' 27339 * 27340 * _.snakeCase('--FOO-BAR--'); 27341 * // => 'foo_bar' 27342 */ 27343 var snakeCase = createCompounder(function(result, word, index) { 27344 return result + (index ? '_' : '') + word.toLowerCase(); 27345 }); 27346 27347 /** 27348 * Splits `string` by `separator`. 27349 * 27350 * **Note:** This method is based on 27351 * [`String#split`](https://mdn.io/String/split). 27352 * 27353 * @static 27354 * @memberOf _ 27355 * @since 4.0.0 27356 * @category String 27357 * @param {string} [string=''] The string to split. 27358 * @param {RegExp|string} separator The separator pattern to split by. 27359 * @param {number} [limit] The length to truncate results to. 27360 * @returns {Array} Returns the string segments. 27361 * @example 27362 * 27363 * _.split('a-b-c', '-', 2); 27364 * // => ['a', 'b'] 27365 */ 27366 function split(string, separator, limit) { 27367 if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { 27368 separator = limit = undefined; 27369 } 27370 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; 27371 if (!limit) { 27372 return []; 27373 } 27374 string = toString(string); 27375 if (string && ( 27376 typeof separator == 'string' || 27377 (separator != null && !isRegExp(separator)) 27378 )) { 27379 separator = baseToString(separator); 27380 if (!separator && hasUnicode(string)) { 27381 return castSlice(stringToArray(string), 0, limit); 27382 } 27383 } 27384 return string.split(separator, limit); 27385 } 27386 27387 /** 27388 * Converts `string` to 27389 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). 27390 * 27391 * @static 27392 * @memberOf _ 27393 * @since 3.1.0 27394 * @category String 27395 * @param {string} [string=''] The string to convert. 27396 * @returns {string} Returns the start cased string. 27397 * @example 27398 * 27399 * _.startCase('--foo-bar--'); 27400 * // => 'Foo Bar' 27401 * 27402 * _.startCase('fooBar'); 27403 * // => 'Foo Bar' 27404 * 27405 * _.startCase('__FOO_BAR__'); 27406 * // => 'FOO BAR' 27407 */ 27408 var startCase = createCompounder(function(result, word, index) { 27409 return result + (index ? ' ' : '') + upperFirst(word); 27410 }); 27411 27412 /** 27413 * Checks if `string` starts with the given target string. 27414 * 27415 * @static 27416 * @memberOf _ 27417 * @since 3.0.0 27418 * @category String 27419 * @param {string} [string=''] The string to inspect. 27420 * @param {string} [target] The string to search for. 27421 * @param {number} [position=0] The position to search from. 27422 * @returns {boolean} Returns `true` if `string` starts with `target`, 27423 * else `false`. 27424 * @example 27425 * 27426 * _.startsWith('abc', 'a'); 27427 * // => true 27428 * 27429 * _.startsWith('abc', 'b'); 27430 * // => false 27431 * 27432 * _.startsWith('abc', 'b', 1); 27433 * // => true 27434 */ 27435 function startsWith(string, target, position) { 27436 string = toString(string); 27437 position = position == null 27438 ? 0 27439 : baseClamp(toInteger(position), 0, string.length); 27440 27441 target = baseToString(target); 27442 return string.slice(position, position + target.length) == target; 27443 } 27444 27445 /** 27446 * Creates a compiled template function that can interpolate data properties 27447 * in "interpolate" delimiters, HTML-escape interpolated data properties in 27448 * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data 27449 * properties may be accessed as free variables in the template. If a setting 27450 * object is given, it takes precedence over `_.templateSettings` values. 27451 * 27452 * **Note:** In the development build `_.template` utilizes 27453 * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) 27454 * for easier debugging. 27455 * 27456 * For more information on precompiling templates see 27457 * [lodash's custom builds documentation](https://lodash.com/custom-builds). 27458 * 27459 * For more information on Chrome extension sandboxes see 27460 * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). 27461 * 27462 * @static 27463 * @since 0.1.0 27464 * @memberOf _ 27465 * @category String 27466 * @param {string} [string=''] The template string. 27467 * @param {Object} [options={}] The options object. 27468 * @param {RegExp} [options.escape=_.templateSettings.escape] 27469 * The HTML "escape" delimiter. 27470 * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] 27471 * The "evaluate" delimiter. 27472 * @param {Object} [options.imports=_.templateSettings.imports] 27473 * An object to import into the template as free variables. 27474 * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] 27475 * The "interpolate" delimiter. 27476 * @param {string} [options.sourceURL='lodash.templateSources[n]'] 27477 * The sourceURL of the compiled template. 27478 * @param {string} [options.variable='obj'] 27479 * The data object variable name. 27480 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27481 * @returns {Function} Returns the compiled template function. 27482 * @example 27483 * 27484 * // Use the "interpolate" delimiter to create a compiled template. 27485 * var compiled = _.template('hello <%= user %>!'); 27486 * compiled({ 'user': 'fred' }); 27487 * // => 'hello fred!' 27488 * 27489 * // Use the HTML "escape" delimiter to escape data property values. 27490 * var compiled = _.template('<b><%- value %></b>'); 27491 * compiled({ 'value': '<script>' }); 27492 * // => '<b><script></b>' 27493 * 27494 * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. 27495 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); 27496 * compiled({ 'users': ['fred', 'barney'] }); 27497 * // => '<li>fred</li><li>barney</li>' 27498 * 27499 * // Use the internal `print` function in "evaluate" delimiters. 27500 * var compiled = _.template('<% print("hello " + user); %>!'); 27501 * compiled({ 'user': 'barney' }); 27502 * // => 'hello barney!' 27503 * 27504 * // Use the ES template literal delimiter as an "interpolate" delimiter. 27505 * // Disable support by replacing the "interpolate" delimiter. 27506 * var compiled = _.template('hello ${ user }!'); 27507 * compiled({ 'user': 'pebbles' }); 27508 * // => 'hello pebbles!' 27509 * 27510 * // Use backslashes to treat delimiters as plain text. 27511 * var compiled = _.template('<%= "\\<%- value %\\>" %>'); 27512 * compiled({ 'value': 'ignored' }); 27513 * // => '<%- value %>' 27514 * 27515 * // Use the `imports` option to import `jQuery` as `jq`. 27516 * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; 27517 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); 27518 * compiled({ 'users': ['fred', 'barney'] }); 27519 * // => '<li>fred</li><li>barney</li>' 27520 * 27521 * // Use the `sourceURL` option to specify a custom sourceURL for the template. 27522 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); 27523 * compiled(data); 27524 * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. 27525 * 27526 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. 27527 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); 27528 * compiled.source; 27529 * // => function(data) { 27530 * // var __t, __p = ''; 27531 * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; 27532 * // return __p; 27533 * // } 27534 * 27535 * // Use custom template delimiters. 27536 * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; 27537 * var compiled = _.template('hello {{ user }}!'); 27538 * compiled({ 'user': 'mustache' }); 27539 * // => 'hello mustache!' 27540 * 27541 * // Use the `source` property to inline compiled templates for meaningful 27542 * // line numbers in error messages and stack traces. 27543 * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ 27544 * var JST = {\ 27545 * "main": ' + _.template(mainText).source + '\ 27546 * };\ 27547 * '); 27548 */ 27549 function template(string, options, guard) { 27550 // Based on John Resig's `tmpl` implementation 27551 // (http://ejohn.org/blog/javascript-micro-templating/) 27552 // and Laura Doktorova's doT.js (https://github.com/olado/doT). 27553 var settings = lodash.templateSettings; 27554 27555 if (guard && isIterateeCall(string, options, guard)) { 27556 options = undefined; 27557 } 27558 string = toString(string); 27559 options = assignInWith({}, options, settings, customDefaultsAssignIn); 27560 27561 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), 27562 importsKeys = keys(imports), 27563 importsValues = baseValues(imports, importsKeys); 27564 27565 var isEscaping, 27566 isEvaluating, 27567 index = 0, 27568 interpolate = options.interpolate || reNoMatch, 27569 source = "__p += '"; 27570 27571 // Compile the regexp to match each delimiter. 27572 var reDelimiters = RegExp( 27573 (options.escape || reNoMatch).source + '|' + 27574 interpolate.source + '|' + 27575 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + 27576 (options.evaluate || reNoMatch).source + '|$' 27577 , 'g'); 27578 27579 // Use a sourceURL for easier debugging. 27580 // The sourceURL gets injected into the source that's eval-ed, so be careful 27581 // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in 27582 // and escape the comment, thus injecting code that gets evaled. 27583 var sourceURL = '//# sourceURL=' + 27584 (hasOwnProperty.call(options, 'sourceURL') 27585 ? (options.sourceURL + '').replace(/\s/g, ' ') 27586 : ('lodash.templateSources[' + (++templateCounter) + ']') 27587 ) + '\n'; 27588 27589 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { 27590 interpolateValue || (interpolateValue = esTemplateValue); 27591 27592 // Escape characters that can't be included in string literals. 27593 source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); 27594 27595 // Replace delimiters with snippets. 27596 if (escapeValue) { 27597 isEscaping = true; 27598 source += "' +\n__e(" + escapeValue + ") +\n'"; 27599 } 27600 if (evaluateValue) { 27601 isEvaluating = true; 27602 source += "';\n" + evaluateValue + ";\n__p += '"; 27603 } 27604 if (interpolateValue) { 27605 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; 27606 } 27607 index = offset + match.length; 27608 27609 // The JS engine embedded in Adobe products needs `match` returned in 27610 // order to produce the correct `offset` value. 27611 return match; 27612 }); 27613 27614 source += "';\n"; 27615 27616 // If `variable` is not specified wrap a with-statement around the generated 27617 // code to add the data object to the top of the scope chain. 27618 var variable = hasOwnProperty.call(options, 'variable') && options.variable; 27619 if (!variable) { 27620 source = 'with (obj) {\n' + source + '\n}\n'; 27621 } 27622 // Throw an error if a forbidden character was found in `variable`, to prevent 27623 // potential command injection attacks. 27624 else if (reForbiddenIdentifierChars.test(variable)) { 27625 throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); 27626 } 27627 27628 // Cleanup code by stripping empty strings. 27629 source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) 27630 .replace(reEmptyStringMiddle, '$1') 27631 .replace(reEmptyStringTrailing, '$1;'); 27632 27633 // Frame code as the function body. 27634 source = 'function(' + (variable || 'obj') + ') {\n' + 27635 (variable 27636 ? '' 27637 : 'obj || (obj = {});\n' 27638 ) + 27639 "var __t, __p = ''" + 27640 (isEscaping 27641 ? ', __e = _.escape' 27642 : '' 27643 ) + 27644 (isEvaluating 27645 ? ', __j = Array.prototype.join;\n' + 27646 "function print() { __p += __j.call(arguments, '') }\n" 27647 : ';\n' 27648 ) + 27649 source + 27650 'return __p\n}'; 27651 27652 var result = attempt(function() { 27653 return Function(importsKeys, sourceURL + 'return ' + source) 27654 .apply(undefined, importsValues); 27655 }); 27656 27657 // Provide the compiled function's source by its `toString` method or 27658 // the `source` property as a convenience for inlining compiled templates. 27659 result.source = source; 27660 if (isError(result)) { 27661 throw result; 27662 } 27663 return result; 27664 } 27665 27666 /** 27667 * Converts `string`, as a whole, to lower case just like 27668 * [String#toLowerCase](https://mdn.io/toLowerCase). 27669 * 27670 * @static 27671 * @memberOf _ 27672 * @since 4.0.0 27673 * @category String 27674 * @param {string} [string=''] The string to convert. 27675 * @returns {string} Returns the lower cased string. 27676 * @example 27677 * 27678 * _.toLower('--Foo-Bar--'); 27679 * // => '--foo-bar--' 27680 * 27681 * _.toLower('fooBar'); 27682 * // => 'foobar' 27683 * 27684 * _.toLower('__FOO_BAR__'); 27685 * // => '__foo_bar__' 27686 */ 27687 function toLower(value) { 27688 return toString(value).toLowerCase(); 27689 } 27690 27691 /** 27692 * Converts `string`, as a whole, to upper case just like 27693 * [String#toUpperCase](https://mdn.io/toUpperCase). 27694 * 27695 * @static 27696 * @memberOf _ 27697 * @since 4.0.0 27698 * @category String 27699 * @param {string} [string=''] The string to convert. 27700 * @returns {string} Returns the upper cased string. 27701 * @example 27702 * 27703 * _.toUpper('--foo-bar--'); 27704 * // => '--FOO-BAR--' 27705 * 27706 * _.toUpper('fooBar'); 27707 * // => 'FOOBAR' 27708 * 27709 * _.toUpper('__foo_bar__'); 27710 * // => '__FOO_BAR__' 27711 */ 27712 function toUpper(value) { 27713 return toString(value).toUpperCase(); 27714 } 27715 27716 /** 27717 * Removes leading and trailing whitespace or specified characters from `string`. 27718 * 27719 * @static 27720 * @memberOf _ 27721 * @since 3.0.0 27722 * @category String 27723 * @param {string} [string=''] The string to trim. 27724 * @param {string} [chars=whitespace] The characters to trim. 27725 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27726 * @returns {string} Returns the trimmed string. 27727 * @example 27728 * 27729 * _.trim(' abc '); 27730 * // => 'abc' 27731 * 27732 * _.trim('-_-abc-_-', '_-'); 27733 * // => 'abc' 27734 * 27735 * _.map([' foo ', ' bar '], _.trim); 27736 * // => ['foo', 'bar'] 27737 */ 27738 function trim(string, chars, guard) { 27739 string = toString(string); 27740 if (string && (guard || chars === undefined)) { 27741 return baseTrim(string); 27742 } 27743 if (!string || !(chars = baseToString(chars))) { 27744 return string; 27745 } 27746 var strSymbols = stringToArray(string), 27747 chrSymbols = stringToArray(chars), 27748 start = charsStartIndex(strSymbols, chrSymbols), 27749 end = charsEndIndex(strSymbols, chrSymbols) + 1; 27750 27751 return castSlice(strSymbols, start, end).join(''); 27752 } 27753 27754 /** 27755 * Removes trailing whitespace or specified characters from `string`. 27756 * 27757 * @static 27758 * @memberOf _ 27759 * @since 4.0.0 27760 * @category String 27761 * @param {string} [string=''] The string to trim. 27762 * @param {string} [chars=whitespace] The characters to trim. 27763 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27764 * @returns {string} Returns the trimmed string. 27765 * @example 27766 * 27767 * _.trimEnd(' abc '); 27768 * // => ' abc' 27769 * 27770 * _.trimEnd('-_-abc-_-', '_-'); 27771 * // => '-_-abc' 27772 */ 27773 function trimEnd(string, chars, guard) { 27774 string = toString(string); 27775 if (string && (guard || chars === undefined)) { 27776 return string.slice(0, trimmedEndIndex(string) + 1); 27777 } 27778 if (!string || !(chars = baseToString(chars))) { 27779 return string; 27780 } 27781 var strSymbols = stringToArray(string), 27782 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; 27783 27784 return castSlice(strSymbols, 0, end).join(''); 27785 } 27786 27787 /** 27788 * Removes leading whitespace or specified characters from `string`. 27789 * 27790 * @static 27791 * @memberOf _ 27792 * @since 4.0.0 27793 * @category String 27794 * @param {string} [string=''] The string to trim. 27795 * @param {string} [chars=whitespace] The characters to trim. 27796 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27797 * @returns {string} Returns the trimmed string. 27798 * @example 27799 * 27800 * _.trimStart(' abc '); 27801 * // => 'abc ' 27802 * 27803 * _.trimStart('-_-abc-_-', '_-'); 27804 * // => 'abc-_-' 27805 */ 27806 function trimStart(string, chars, guard) { 27807 string = toString(string); 27808 if (string && (guard || chars === undefined)) { 27809 return string.replace(reTrimStart, ''); 27810 } 27811 if (!string || !(chars = baseToString(chars))) { 27812 return string; 27813 } 27814 var strSymbols = stringToArray(string), 27815 start = charsStartIndex(strSymbols, stringToArray(chars)); 27816 27817 return castSlice(strSymbols, start).join(''); 27818 } 27819 27820 /** 27821 * Truncates `string` if it's longer than the given maximum string length. 27822 * The last characters of the truncated string are replaced with the omission 27823 * string which defaults to "...". 27824 * 27825 * @static 27826 * @memberOf _ 27827 * @since 4.0.0 27828 * @category String 27829 * @param {string} [string=''] The string to truncate. 27830 * @param {Object} [options={}] The options object. 27831 * @param {number} [options.length=30] The maximum string length. 27832 * @param {string} [options.omission='...'] The string to indicate text is omitted. 27833 * @param {RegExp|string} [options.separator] The separator pattern to truncate to. 27834 * @returns {string} Returns the truncated string. 27835 * @example 27836 * 27837 * _.truncate('hi-diddly-ho there, neighborino'); 27838 * // => 'hi-diddly-ho there, neighbo...' 27839 * 27840 * _.truncate('hi-diddly-ho there, neighborino', { 27841 * 'length': 24, 27842 * 'separator': ' ' 27843 * }); 27844 * // => 'hi-diddly-ho there,...' 27845 * 27846 * _.truncate('hi-diddly-ho there, neighborino', { 27847 * 'length': 24, 27848 * 'separator': /,? +/ 27849 * }); 27850 * // => 'hi-diddly-ho there...' 27851 * 27852 * _.truncate('hi-diddly-ho there, neighborino', { 27853 * 'omission': ' [...]' 27854 * }); 27855 * // => 'hi-diddly-ho there, neig [...]' 27856 */ 27857 function truncate(string, options) { 27858 var length = DEFAULT_TRUNC_LENGTH, 27859 omission = DEFAULT_TRUNC_OMISSION; 27860 27861 if (isObject(options)) { 27862 var separator = 'separator' in options ? options.separator : separator; 27863 length = 'length' in options ? toInteger(options.length) : length; 27864 omission = 'omission' in options ? baseToString(options.omission) : omission; 27865 } 27866 string = toString(string); 27867 27868 var strLength = string.length; 27869 if (hasUnicode(string)) { 27870 var strSymbols = stringToArray(string); 27871 strLength = strSymbols.length; 27872 } 27873 if (length >= strLength) { 27874 return string; 27875 } 27876 var end = length - stringSize(omission); 27877 if (end < 1) { 27878 return omission; 27879 } 27880 var result = strSymbols 27881 ? castSlice(strSymbols, 0, end).join('') 27882 : string.slice(0, end); 27883 27884 if (separator === undefined) { 27885 return result + omission; 27886 } 27887 if (strSymbols) { 27888 end += (result.length - end); 27889 } 27890 if (isRegExp(separator)) { 27891 if (string.slice(end).search(separator)) { 27892 var match, 27893 substring = result; 27894 27895 if (!separator.global) { 27896 separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); 27897 } 27898 separator.lastIndex = 0; 27899 while ((match = separator.exec(substring))) { 27900 var newEnd = match.index; 27901 } 27902 result = result.slice(0, newEnd === undefined ? end : newEnd); 27903 } 27904 } else if (string.indexOf(baseToString(separator), end) != end) { 27905 var index = result.lastIndexOf(separator); 27906 if (index > -1) { 27907 result = result.slice(0, index); 27908 } 27909 } 27910 return result + omission; 27911 } 27912 27913 /** 27914 * The inverse of `_.escape`; this method converts the HTML entities 27915 * `&`, `<`, `>`, `"`, and `'` in `string` to 27916 * their corresponding characters. 27917 * 27918 * **Note:** No other HTML entities are unescaped. To unescape additional 27919 * HTML entities use a third-party library like [_he_](https://mths.be/he). 27920 * 27921 * @static 27922 * @memberOf _ 27923 * @since 0.6.0 27924 * @category String 27925 * @param {string} [string=''] The string to unescape. 27926 * @returns {string} Returns the unescaped string. 27927 * @example 27928 * 27929 * _.unescape('fred, barney, & pebbles'); 27930 * // => 'fred, barney, & pebbles' 27931 */ 27932 function unescape(string) { 27933 string = toString(string); 27934 return (string && reHasEscapedHtml.test(string)) 27935 ? string.replace(reEscapedHtml, unescapeHtmlChar) 27936 : string; 27937 } 27938 27939 /** 27940 * Converts `string`, as space separated words, to upper case. 27941 * 27942 * @static 27943 * @memberOf _ 27944 * @since 4.0.0 27945 * @category String 27946 * @param {string} [string=''] The string to convert. 27947 * @returns {string} Returns the upper cased string. 27948 * @example 27949 * 27950 * _.upperCase('--foo-bar'); 27951 * // => 'FOO BAR' 27952 * 27953 * _.upperCase('fooBar'); 27954 * // => 'FOO BAR' 27955 * 27956 * _.upperCase('__foo_bar__'); 27957 * // => 'FOO BAR' 27958 */ 27959 var upperCase = createCompounder(function(result, word, index) { 27960 return result + (index ? ' ' : '') + word.toUpperCase(); 27961 }); 27962 27963 /** 27964 * Converts the first character of `string` to upper case. 27965 * 27966 * @static 27967 * @memberOf _ 27968 * @since 4.0.0 27969 * @category String 27970 * @param {string} [string=''] The string to convert. 27971 * @returns {string} Returns the converted string. 27972 * @example 27973 * 27974 * _.upperFirst('fred'); 27975 * // => 'Fred' 27976 * 27977 * _.upperFirst('FRED'); 27978 * // => 'FRED' 27979 */ 27980 var upperFirst = createCaseFirst('toUpperCase'); 27981 27982 /** 27983 * Splits `string` into an array of its words. 27984 * 27985 * @static 27986 * @memberOf _ 27987 * @since 3.0.0 27988 * @category String 27989 * @param {string} [string=''] The string to inspect. 27990 * @param {RegExp|string} [pattern] The pattern to match words. 27991 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 27992 * @returns {Array} Returns the words of `string`. 27993 * @example 27994 * 27995 * _.words('fred, barney, & pebbles'); 27996 * // => ['fred', 'barney', 'pebbles'] 27997 * 27998 * _.words('fred, barney, & pebbles', /[^, ]+/g); 27999 * // => ['fred', 'barney', '&', 'pebbles'] 28000 */ 28001 function words(string, pattern, guard) { 28002 string = toString(string); 28003 pattern = guard ? undefined : pattern; 28004 28005 if (pattern === undefined) { 28006 return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); 28007 } 28008 return string.match(pattern) || []; 28009 } 28010 28011 /*------------------------------------------------------------------------*/ 28012 28013 /** 28014 * Attempts to invoke `func`, returning either the result or the caught error 28015 * object. Any additional arguments are provided to `func` when it's invoked. 28016 * 28017 * @static 28018 * @memberOf _ 28019 * @since 3.0.0 28020 * @category Util 28021 * @param {Function} func The function to attempt. 28022 * @param {...*} [args] The arguments to invoke `func` with. 28023 * @returns {*} Returns the `func` result or error object. 28024 * @example 28025 * 28026 * // Avoid throwing errors for invalid selectors. 28027 * var elements = _.attempt(function(selector) { 28028 * return document.querySelectorAll(selector); 28029 * }, '>_>'); 28030 * 28031 * if (_.isError(elements)) { 28032 * elements = []; 28033 * } 28034 */ 28035 var attempt = baseRest(function(func, args) { 28036 try { 28037 return apply(func, undefined, args); 28038 } catch (e) { 28039 return isError(e) ? e : new Error(e); 28040 } 28041 }); 28042 28043 /** 28044 * Binds methods of an object to the object itself, overwriting the existing 28045 * method. 28046 * 28047 * **Note:** This method doesn't set the "length" property of bound functions. 28048 * 28049 * @static 28050 * @since 0.1.0 28051 * @memberOf _ 28052 * @category Util 28053 * @param {Object} object The object to bind and assign the bound methods to. 28054 * @param {...(string|string[])} methodNames The object method names to bind. 28055 * @returns {Object} Returns `object`. 28056 * @example 28057 * 28058 * var view = { 28059 * 'label': 'docs', 28060 * 'click': function() { 28061 * console.log('clicked ' + this.label); 28062 * } 28063 * }; 28064 * 28065 * _.bindAll(view, ['click']); 28066 * jQuery(element).on('click', view.click); 28067 * // => Logs 'clicked docs' when clicked. 28068 */ 28069 var bindAll = flatRest(function(object, methodNames) { 28070 arrayEach(methodNames, function(key) { 28071 key = toKey(key); 28072 baseAssignValue(object, key, bind(object[key], object)); 28073 }); 28074 return object; 28075 }); 28076 28077 /** 28078 * Creates a function that iterates over `pairs` and invokes the corresponding 28079 * function of the first predicate to return truthy. The predicate-function 28080 * pairs are invoked with the `this` binding and arguments of the created 28081 * function. 28082 * 28083 * @static 28084 * @memberOf _ 28085 * @since 4.0.0 28086 * @category Util 28087 * @param {Array} pairs The predicate-function pairs. 28088 * @returns {Function} Returns the new composite function. 28089 * @example 28090 * 28091 * var func = _.cond([ 28092 * [_.matches({ 'a': 1 }), _.constant('matches A')], 28093 * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], 28094 * [_.stubTrue, _.constant('no match')] 28095 * ]); 28096 * 28097 * func({ 'a': 1, 'b': 2 }); 28098 * // => 'matches A' 28099 * 28100 * func({ 'a': 0, 'b': 1 }); 28101 * // => 'matches B' 28102 * 28103 * func({ 'a': '1', 'b': '2' }); 28104 * // => 'no match' 28105 */ 28106 function cond(pairs) { 28107 var length = pairs == null ? 0 : pairs.length, 28108 toIteratee = getIteratee(); 28109 28110 pairs = !length ? [] : arrayMap(pairs, function(pair) { 28111 if (typeof pair[1] != 'function') { 28112 throw new TypeError(FUNC_ERROR_TEXT); 28113 } 28114 return [toIteratee(pair[0]), pair[1]]; 28115 }); 28116 28117 return baseRest(function(args) { 28118 var index = -1; 28119 while (++index < length) { 28120 var pair = pairs[index]; 28121 if (apply(pair[0], this, args)) { 28122 return apply(pair[1], this, args); 28123 } 28124 } 28125 }); 28126 } 28127 28128 /** 28129 * Creates a function that invokes the predicate properties of `source` with 28130 * the corresponding property values of a given object, returning `true` if 28131 * all predicates return truthy, else `false`. 28132 * 28133 * **Note:** The created function is equivalent to `_.conformsTo` with 28134 * `source` partially applied. 28135 * 28136 * @static 28137 * @memberOf _ 28138 * @since 4.0.0 28139 * @category Util 28140 * @param {Object} source The object of property predicates to conform to. 28141 * @returns {Function} Returns the new spec function. 28142 * @example 28143 * 28144 * var objects = [ 28145 * { 'a': 2, 'b': 1 }, 28146 * { 'a': 1, 'b': 2 } 28147 * ]; 28148 * 28149 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); 28150 * // => [{ 'a': 1, 'b': 2 }] 28151 */ 28152 function conforms(source) { 28153 return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); 28154 } 28155 28156 /** 28157 * Creates a function that returns `value`. 28158 * 28159 * @static 28160 * @memberOf _ 28161 * @since 2.4.0 28162 * @category Util 28163 * @param {*} value The value to return from the new function. 28164 * @returns {Function} Returns the new constant function. 28165 * @example 28166 * 28167 * var objects = _.times(2, _.constant({ 'a': 1 })); 28168 * 28169 * console.log(objects); 28170 * // => [{ 'a': 1 }, { 'a': 1 }] 28171 * 28172 * console.log(objects[0] === objects[1]); 28173 * // => true 28174 */ 28175 function constant(value) { 28176 return function() { 28177 return value; 28178 }; 28179 } 28180 28181 /** 28182 * Checks `value` to determine whether a default value should be returned in 28183 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, 28184 * or `undefined`. 28185 * 28186 * @static 28187 * @memberOf _ 28188 * @since 4.14.0 28189 * @category Util 28190 * @param {*} value The value to check. 28191 * @param {*} defaultValue The default value. 28192 * @returns {*} Returns the resolved value. 28193 * @example 28194 * 28195 * _.defaultTo(1, 10); 28196 * // => 1 28197 * 28198 * _.defaultTo(undefined, 10); 28199 * // => 10 28200 */ 28201 function defaultTo(value, defaultValue) { 28202 return (value == null || value !== value) ? defaultValue : value; 28203 } 28204 28205 /** 28206 * Creates a function that returns the result of invoking the given functions 28207 * with the `this` binding of the created function, where each successive 28208 * invocation is supplied the return value of the previous. 28209 * 28210 * @static 28211 * @memberOf _ 28212 * @since 3.0.0 28213 * @category Util 28214 * @param {...(Function|Function[])} [funcs] The functions to invoke. 28215 * @returns {Function} Returns the new composite function. 28216 * @see _.flowRight 28217 * @example 28218 * 28219 * function square(n) { 28220 * return n * n; 28221 * } 28222 * 28223 * var addSquare = _.flow([_.add, square]); 28224 * addSquare(1, 2); 28225 * // => 9 28226 */ 28227 var flow = createFlow(); 28228 28229 /** 28230 * This method is like `_.flow` except that it creates a function that 28231 * invokes the given functions from right to left. 28232 * 28233 * @static 28234 * @since 3.0.0 28235 * @memberOf _ 28236 * @category Util 28237 * @param {...(Function|Function[])} [funcs] The functions to invoke. 28238 * @returns {Function} Returns the new composite function. 28239 * @see _.flow 28240 * @example 28241 * 28242 * function square(n) { 28243 * return n * n; 28244 * } 28245 * 28246 * var addSquare = _.flowRight([square, _.add]); 28247 * addSquare(1, 2); 28248 * // => 9 28249 */ 28250 var flowRight = createFlow(true); 28251 28252 /** 28253 * This method returns the first argument it receives. 28254 * 28255 * @static 28256 * @since 0.1.0 28257 * @memberOf _ 28258 * @category Util 28259 * @param {*} value Any value. 28260 * @returns {*} Returns `value`. 28261 * @example 28262 * 28263 * var object = { 'a': 1 }; 28264 * 28265 * console.log(_.identity(object) === object); 28266 * // => true 28267 */ 28268 function identity(value) { 28269 return value; 28270 } 28271 28272 /** 28273 * Creates a function that invokes `func` with the arguments of the created 28274 * function. If `func` is a property name, the created function returns the 28275 * property value for a given element. If `func` is an array or object, the 28276 * created function returns `true` for elements that contain the equivalent 28277 * source properties, otherwise it returns `false`. 28278 * 28279 * @static 28280 * @since 4.0.0 28281 * @memberOf _ 28282 * @category Util 28283 * @param {*} [func=_.identity] The value to convert to a callback. 28284 * @returns {Function} Returns the callback. 28285 * @example 28286 * 28287 * var users = [ 28288 * { 'user': 'barney', 'age': 36, 'active': true }, 28289 * { 'user': 'fred', 'age': 40, 'active': false } 28290 * ]; 28291 * 28292 * // The `_.matches` iteratee shorthand. 28293 * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); 28294 * // => [{ 'user': 'barney', 'age': 36, 'active': true }] 28295 * 28296 * // The `_.matchesProperty` iteratee shorthand. 28297 * _.filter(users, _.iteratee(['user', 'fred'])); 28298 * // => [{ 'user': 'fred', 'age': 40 }] 28299 * 28300 * // The `_.property` iteratee shorthand. 28301 * _.map(users, _.iteratee('user')); 28302 * // => ['barney', 'fred'] 28303 * 28304 * // Create custom iteratee shorthands. 28305 * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { 28306 * return !_.isRegExp(func) ? iteratee(func) : function(string) { 28307 * return func.test(string); 28308 * }; 28309 * }); 28310 * 28311 * _.filter(['abc', 'def'], /ef/); 28312 * // => ['def'] 28313 */ 28314 function iteratee(func) { 28315 return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); 28316 } 28317 28318 /** 28319 * Creates a function that performs a partial deep comparison between a given 28320 * object and `source`, returning `true` if the given object has equivalent 28321 * property values, else `false`. 28322 * 28323 * **Note:** The created function is equivalent to `_.isMatch` with `source` 28324 * partially applied. 28325 * 28326 * Partial comparisons will match empty array and empty object `source` 28327 * values against any array or object value, respectively. See `_.isEqual` 28328 * for a list of supported value comparisons. 28329 * 28330 * **Note:** Multiple values can be checked by combining several matchers 28331 * using `_.overSome` 28332 * 28333 * @static 28334 * @memberOf _ 28335 * @since 3.0.0 28336 * @category Util 28337 * @param {Object} source The object of property values to match. 28338 * @returns {Function} Returns the new spec function. 28339 * @example 28340 * 28341 * var objects = [ 28342 * { 'a': 1, 'b': 2, 'c': 3 }, 28343 * { 'a': 4, 'b': 5, 'c': 6 } 28344 * ]; 28345 * 28346 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); 28347 * // => [{ 'a': 4, 'b': 5, 'c': 6 }] 28348 * 28349 * // Checking for several possible values 28350 * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); 28351 * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] 28352 */ 28353 function matches(source) { 28354 return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); 28355 } 28356 28357 /** 28358 * Creates a function that performs a partial deep comparison between the 28359 * value at `path` of a given object to `srcValue`, returning `true` if the 28360 * object value is equivalent, else `false`. 28361 * 28362 * **Note:** Partial comparisons will match empty array and empty object 28363 * `srcValue` values against any array or object value, respectively. See 28364 * `_.isEqual` for a list of supported value comparisons. 28365 * 28366 * **Note:** Multiple values can be checked by combining several matchers 28367 * using `_.overSome` 28368 * 28369 * @static 28370 * @memberOf _ 28371 * @since 3.2.0 28372 * @category Util 28373 * @param {Array|string} path The path of the property to get. 28374 * @param {*} srcValue The value to match. 28375 * @returns {Function} Returns the new spec function. 28376 * @example 28377 * 28378 * var objects = [ 28379 * { 'a': 1, 'b': 2, 'c': 3 }, 28380 * { 'a': 4, 'b': 5, 'c': 6 } 28381 * ]; 28382 * 28383 * _.find(objects, _.matchesProperty('a', 4)); 28384 * // => { 'a': 4, 'b': 5, 'c': 6 } 28385 * 28386 * // Checking for several possible values 28387 * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); 28388 * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] 28389 */ 28390 function matchesProperty(path, srcValue) { 28391 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); 28392 } 28393 28394 /** 28395 * Creates a function that invokes the method at `path` of a given object. 28396 * Any additional arguments are provided to the invoked method. 28397 * 28398 * @static 28399 * @memberOf _ 28400 * @since 3.7.0 28401 * @category Util 28402 * @param {Array|string} path The path of the method to invoke. 28403 * @param {...*} [args] The arguments to invoke the method with. 28404 * @returns {Function} Returns the new invoker function. 28405 * @example 28406 * 28407 * var objects = [ 28408 * { 'a': { 'b': _.constant(2) } }, 28409 * { 'a': { 'b': _.constant(1) } } 28410 * ]; 28411 * 28412 * _.map(objects, _.method('a.b')); 28413 * // => [2, 1] 28414 * 28415 * _.map(objects, _.method(['a', 'b'])); 28416 * // => [2, 1] 28417 */ 28418 var method = baseRest(function(path, args) { 28419 return function(object) { 28420 return baseInvoke(object, path, args); 28421 }; 28422 }); 28423 28424 /** 28425 * The opposite of `_.method`; this method creates a function that invokes 28426 * the method at a given path of `object`. Any additional arguments are 28427 * provided to the invoked method. 28428 * 28429 * @static 28430 * @memberOf _ 28431 * @since 3.7.0 28432 * @category Util 28433 * @param {Object} object The object to query. 28434 * @param {...*} [args] The arguments to invoke the method with. 28435 * @returns {Function} Returns the new invoker function. 28436 * @example 28437 * 28438 * var array = _.times(3, _.constant), 28439 * object = { 'a': array, 'b': array, 'c': array }; 28440 * 28441 * _.map(['a[2]', 'c[0]'], _.methodOf(object)); 28442 * // => [2, 0] 28443 * 28444 * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); 28445 * // => [2, 0] 28446 */ 28447 var methodOf = baseRest(function(object, args) { 28448 return function(path) { 28449 return baseInvoke(object, path, args); 28450 }; 28451 }); 28452 28453 /** 28454 * Adds all own enumerable string keyed function properties of a source 28455 * object to the destination object. If `object` is a function, then methods 28456 * are added to its prototype as well. 28457 * 28458 * **Note:** Use `_.runInContext` to create a pristine `lodash` function to 28459 * avoid conflicts caused by modifying the original. 28460 * 28461 * @static 28462 * @since 0.1.0 28463 * @memberOf _ 28464 * @category Util 28465 * @param {Function|Object} [object=lodash] The destination object. 28466 * @param {Object} source The object of functions to add. 28467 * @param {Object} [options={}] The options object. 28468 * @param {boolean} [options.chain=true] Specify whether mixins are chainable. 28469 * @returns {Function|Object} Returns `object`. 28470 * @example 28471 * 28472 * function vowels(string) { 28473 * return _.filter(string, function(v) { 28474 * return /[aeiou]/i.test(v); 28475 * }); 28476 * } 28477 * 28478 * _.mixin({ 'vowels': vowels }); 28479 * _.vowels('fred'); 28480 * // => ['e'] 28481 * 28482 * _('fred').vowels().value(); 28483 * // => ['e'] 28484 * 28485 * _.mixin({ 'vowels': vowels }, { 'chain': false }); 28486 * _('fred').vowels(); 28487 * // => ['e'] 28488 */ 28489 function mixin(object, source, options) { 28490 var props = keys(source), 28491 methodNames = baseFunctions(source, props); 28492 28493 if (options == null && 28494 !(isObject(source) && (methodNames.length || !props.length))) { 28495 options = source; 28496 source = object; 28497 object = this; 28498 methodNames = baseFunctions(source, keys(source)); 28499 } 28500 var chain = !(isObject(options) && 'chain' in options) || !!options.chain, 28501 isFunc = isFunction(object); 28502 28503 arrayEach(methodNames, function(methodName) { 28504 var func = source[methodName]; 28505 object[methodName] = func; 28506 if (isFunc) { 28507 object.prototype[methodName] = function() { 28508 var chainAll = this.__chain__; 28509 if (chain || chainAll) { 28510 var result = object(this.__wrapped__), 28511 actions = result.__actions__ = copyArray(this.__actions__); 28512 28513 actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); 28514 result.__chain__ = chainAll; 28515 return result; 28516 } 28517 return func.apply(object, arrayPush([this.value()], arguments)); 28518 }; 28519 } 28520 }); 28521 28522 return object; 28523 } 28524 28525 /** 28526 * Reverts the `_` variable to its previous value and returns a reference to 28527 * the `lodash` function. 28528 * 28529 * @static 28530 * @since 0.1.0 28531 * @memberOf _ 28532 * @category Util 28533 * @returns {Function} Returns the `lodash` function. 28534 * @example 28535 * 28536 * var lodash = _.noConflict(); 28537 */ 28538 function noConflict() { 28539 if (root._ === this) { 28540 root._ = oldDash; 28541 } 28542 return this; 28543 } 28544 28545 /** 28546 * This method returns `undefined`. 28547 * 28548 * @static 28549 * @memberOf _ 28550 * @since 2.3.0 28551 * @category Util 28552 * @example 28553 * 28554 * _.times(2, _.noop); 28555 * // => [undefined, undefined] 28556 */ 28557 function noop() { 28558 // No operation performed. 28559 } 28560 28561 /** 28562 * Creates a function that gets the argument at index `n`. If `n` is negative, 28563 * the nth argument from the end is returned. 28564 * 28565 * @static 28566 * @memberOf _ 28567 * @since 4.0.0 28568 * @category Util 28569 * @param {number} [n=0] The index of the argument to return. 28570 * @returns {Function} Returns the new pass-thru function. 28571 * @example 28572 * 28573 * var func = _.nthArg(1); 28574 * func('a', 'b', 'c', 'd'); 28575 * // => 'b' 28576 * 28577 * var func = _.nthArg(-2); 28578 * func('a', 'b', 'c', 'd'); 28579 * // => 'c' 28580 */ 28581 function nthArg(n) { 28582 n = toInteger(n); 28583 return baseRest(function(args) { 28584 return baseNth(args, n); 28585 }); 28586 } 28587 28588 /** 28589 * Creates a function that invokes `iteratees` with the arguments it receives 28590 * and returns their results. 28591 * 28592 * @static 28593 * @memberOf _ 28594 * @since 4.0.0 28595 * @category Util 28596 * @param {...(Function|Function[])} [iteratees=[_.identity]] 28597 * The iteratees to invoke. 28598 * @returns {Function} Returns the new function. 28599 * @example 28600 * 28601 * var func = _.over([Math.max, Math.min]); 28602 * 28603 * func(1, 2, 3, 4); 28604 * // => [4, 1] 28605 */ 28606 var over = createOver(arrayMap); 28607 28608 /** 28609 * Creates a function that checks if **all** of the `predicates` return 28610 * truthy when invoked with the arguments it receives. 28611 * 28612 * Following shorthands are possible for providing predicates. 28613 * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. 28614 * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. 28615 * 28616 * @static 28617 * @memberOf _ 28618 * @since 4.0.0 28619 * @category Util 28620 * @param {...(Function|Function[])} [predicates=[_.identity]] 28621 * The predicates to check. 28622 * @returns {Function} Returns the new function. 28623 * @example 28624 * 28625 * var func = _.overEvery([Boolean, isFinite]); 28626 * 28627 * func('1'); 28628 * // => true 28629 * 28630 * func(null); 28631 * // => false 28632 * 28633 * func(NaN); 28634 * // => false 28635 */ 28636 var overEvery = createOver(arrayEvery); 28637 28638 /** 28639 * Creates a function that checks if **any** of the `predicates` return 28640 * truthy when invoked with the arguments it receives. 28641 * 28642 * Following shorthands are possible for providing predicates. 28643 * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. 28644 * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. 28645 * 28646 * @static 28647 * @memberOf _ 28648 * @since 4.0.0 28649 * @category Util 28650 * @param {...(Function|Function[])} [predicates=[_.identity]] 28651 * The predicates to check. 28652 * @returns {Function} Returns the new function. 28653 * @example 28654 * 28655 * var func = _.overSome([Boolean, isFinite]); 28656 * 28657 * func('1'); 28658 * // => true 28659 * 28660 * func(null); 28661 * // => true 28662 * 28663 * func(NaN); 28664 * // => false 28665 * 28666 * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) 28667 * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) 28668 */ 28669 var overSome = createOver(arraySome); 28670 28671 /** 28672 * Creates a function that returns the value at `path` of a given object. 28673 * 28674 * @static 28675 * @memberOf _ 28676 * @since 2.4.0 28677 * @category Util 28678 * @param {Array|string} path The path of the property to get. 28679 * @returns {Function} Returns the new accessor function. 28680 * @example 28681 * 28682 * var objects = [ 28683 * { 'a': { 'b': 2 } }, 28684 * { 'a': { 'b': 1 } } 28685 * ]; 28686 * 28687 * _.map(objects, _.property('a.b')); 28688 * // => [2, 1] 28689 * 28690 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); 28691 * // => [1, 2] 28692 */ 28693 function property(path) { 28694 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); 28695 } 28696 28697 /** 28698 * The opposite of `_.property`; this method creates a function that returns 28699 * the value at a given path of `object`. 28700 * 28701 * @static 28702 * @memberOf _ 28703 * @since 3.0.0 28704 * @category Util 28705 * @param {Object} object The object to query. 28706 * @returns {Function} Returns the new accessor function. 28707 * @example 28708 * 28709 * var array = [0, 1, 2], 28710 * object = { 'a': array, 'b': array, 'c': array }; 28711 * 28712 * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); 28713 * // => [2, 0] 28714 * 28715 * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); 28716 * // => [2, 0] 28717 */ 28718 function propertyOf(object) { 28719 return function(path) { 28720 return object == null ? undefined : baseGet(object, path); 28721 }; 28722 } 28723 28724 /** 28725 * Creates an array of numbers (positive and/or negative) progressing from 28726 * `start` up to, but not including, `end`. A step of `-1` is used if a negative 28727 * `start` is specified without an `end` or `step`. If `end` is not specified, 28728 * it's set to `start` with `start` then set to `0`. 28729 * 28730 * **Note:** JavaScript follows the IEEE-754 standard for resolving 28731 * floating-point values which can produce unexpected results. 28732 * 28733 * @static 28734 * @since 0.1.0 28735 * @memberOf _ 28736 * @category Util 28737 * @param {number} [start=0] The start of the range. 28738 * @param {number} end The end of the range. 28739 * @param {number} [step=1] The value to increment or decrement by. 28740 * @returns {Array} Returns the range of numbers. 28741 * @see _.inRange, _.rangeRight 28742 * @example 28743 * 28744 * _.range(4); 28745 * // => [0, 1, 2, 3] 28746 * 28747 * _.range(-4); 28748 * // => [0, -1, -2, -3] 28749 * 28750 * _.range(1, 5); 28751 * // => [1, 2, 3, 4] 28752 * 28753 * _.range(0, 20, 5); 28754 * // => [0, 5, 10, 15] 28755 * 28756 * _.range(0, -4, -1); 28757 * // => [0, -1, -2, -3] 28758 * 28759 * _.range(1, 4, 0); 28760 * // => [1, 1, 1] 28761 * 28762 * _.range(0); 28763 * // => [] 28764 */ 28765 var range = createRange(); 28766 28767 /** 28768 * This method is like `_.range` except that it populates values in 28769 * descending order. 28770 * 28771 * @static 28772 * @memberOf _ 28773 * @since 4.0.0 28774 * @category Util 28775 * @param {number} [start=0] The start of the range. 28776 * @param {number} end The end of the range. 28777 * @param {number} [step=1] The value to increment or decrement by. 28778 * @returns {Array} Returns the range of numbers. 28779 * @see _.inRange, _.range 28780 * @example 28781 * 28782 * _.rangeRight(4); 28783 * // => [3, 2, 1, 0] 28784 * 28785 * _.rangeRight(-4); 28786 * // => [-3, -2, -1, 0] 28787 * 28788 * _.rangeRight(1, 5); 28789 * // => [4, 3, 2, 1] 28790 * 28791 * _.rangeRight(0, 20, 5); 28792 * // => [15, 10, 5, 0] 28793 * 28794 * _.rangeRight(0, -4, -1); 28795 * // => [-3, -2, -1, 0] 28796 * 28797 * _.rangeRight(1, 4, 0); 28798 * // => [1, 1, 1] 28799 * 28800 * _.rangeRight(0); 28801 * // => [] 28802 */ 28803 var rangeRight = createRange(true); 28804 28805 /** 28806 * This method returns a new empty array. 28807 * 28808 * @static 28809 * @memberOf _ 28810 * @since 4.13.0 28811 * @category Util 28812 * @returns {Array} Returns the new empty array. 28813 * @example 28814 * 28815 * var arrays = _.times(2, _.stubArray); 28816 * 28817 * console.log(arrays); 28818 * // => [[], []] 28819 * 28820 * console.log(arrays[0] === arrays[1]); 28821 * // => false 28822 */ 28823 function stubArray() { 28824 return []; 28825 } 28826 28827 /** 28828 * This method returns `false`. 28829 * 28830 * @static 28831 * @memberOf _ 28832 * @since 4.13.0 28833 * @category Util 28834 * @returns {boolean} Returns `false`. 28835 * @example 28836 * 28837 * _.times(2, _.stubFalse); 28838 * // => [false, false] 28839 */ 28840 function stubFalse() { 28841 return false; 28842 } 28843 28844 /** 28845 * This method returns a new empty object. 28846 * 28847 * @static 28848 * @memberOf _ 28849 * @since 4.13.0 28850 * @category Util 28851 * @returns {Object} Returns the new empty object. 28852 * @example 28853 * 28854 * var objects = _.times(2, _.stubObject); 28855 * 28856 * console.log(objects); 28857 * // => [{}, {}] 28858 * 28859 * console.log(objects[0] === objects[1]); 28860 * // => false 28861 */ 28862 function stubObject() { 28863 return {}; 28864 } 28865 28866 /** 28867 * This method returns an empty string. 28868 * 28869 * @static 28870 * @memberOf _ 28871 * @since 4.13.0 28872 * @category Util 28873 * @returns {string} Returns the empty string. 28874 * @example 28875 * 28876 * _.times(2, _.stubString); 28877 * // => ['', ''] 28878 */ 28879 function stubString() { 28880 return ''; 28881 } 28882 28883 /** 28884 * This method returns `true`. 28885 * 28886 * @static 28887 * @memberOf _ 28888 * @since 4.13.0 28889 * @category Util 28890 * @returns {boolean} Returns `true`. 28891 * @example 28892 * 28893 * _.times(2, _.stubTrue); 28894 * // => [true, true] 28895 */ 28896 function stubTrue() { 28897 return true; 28898 } 28899 28900 /** 28901 * Invokes the iteratee `n` times, returning an array of the results of 28902 * each invocation. The iteratee is invoked with one argument; (index). 28903 * 28904 * @static 28905 * @since 0.1.0 28906 * @memberOf _ 28907 * @category Util 28908 * @param {number} n The number of times to invoke `iteratee`. 28909 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 28910 * @returns {Array} Returns the array of results. 28911 * @example 28912 * 28913 * _.times(3, String); 28914 * // => ['0', '1', '2'] 28915 * 28916 * _.times(4, _.constant(0)); 28917 * // => [0, 0, 0, 0] 28918 */ 28919 function times(n, iteratee) { 28920 n = toInteger(n); 28921 if (n < 1 || n > MAX_SAFE_INTEGER) { 28922 return []; 28923 } 28924 var index = MAX_ARRAY_LENGTH, 28925 length = nativeMin(n, MAX_ARRAY_LENGTH); 28926 28927 iteratee = getIteratee(iteratee); 28928 n -= MAX_ARRAY_LENGTH; 28929 28930 var result = baseTimes(length, iteratee); 28931 while (++index < n) { 28932 iteratee(index); 28933 } 28934 return result; 28935 } 28936 28937 /** 28938 * Converts `value` to a property path array. 28939 * 28940 * @static 28941 * @memberOf _ 28942 * @since 4.0.0 28943 * @category Util 28944 * @param {*} value The value to convert. 28945 * @returns {Array} Returns the new property path array. 28946 * @example 28947 * 28948 * _.toPath('a.b.c'); 28949 * // => ['a', 'b', 'c'] 28950 * 28951 * _.toPath('a[0].b.c'); 28952 * // => ['a', '0', 'b', 'c'] 28953 */ 28954 function toPath(value) { 28955 if (isArray(value)) { 28956 return arrayMap(value, toKey); 28957 } 28958 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); 28959 } 28960 28961 /** 28962 * Generates a unique ID. If `prefix` is given, the ID is appended to it. 28963 * 28964 * @static 28965 * @since 0.1.0 28966 * @memberOf _ 28967 * @category Util 28968 * @param {string} [prefix=''] The value to prefix the ID with. 28969 * @returns {string} Returns the unique ID. 28970 * @example 28971 * 28972 * _.uniqueId('contact_'); 28973 * // => 'contact_104' 28974 * 28975 * _.uniqueId(); 28976 * // => '105' 28977 */ 28978 function uniqueId(prefix) { 28979 var id = ++idCounter; 28980 return toString(prefix) + id; 28981 } 28982 28983 /*------------------------------------------------------------------------*/ 28984 28985 /** 28986 * Adds two numbers. 28987 * 28988 * @static 28989 * @memberOf _ 28990 * @since 3.4.0 28991 * @category Math 28992 * @param {number} augend The first number in an addition. 28993 * @param {number} addend The second number in an addition. 28994 * @returns {number} Returns the total. 28995 * @example 28996 * 28997 * _.add(6, 4); 28998 * // => 10 28999 */ 29000 var add = createMathOperation(function(augend, addend) { 29001 return augend + addend; 29002 }, 0); 29003 29004 /** 29005 * Computes `number` rounded up to `precision`. 29006 * 29007 * @static 29008 * @memberOf _ 29009 * @since 3.10.0 29010 * @category Math 29011 * @param {number} number The number to round up. 29012 * @param {number} [precision=0] The precision to round up to. 29013 * @returns {number} Returns the rounded up number. 29014 * @example 29015 * 29016 * _.ceil(4.006); 29017 * // => 5 29018 * 29019 * _.ceil(6.004, 2); 29020 * // => 6.01 29021 * 29022 * _.ceil(6040, -2); 29023 * // => 6100 29024 */ 29025 var ceil = createRound('ceil'); 29026 29027 /** 29028 * Divide two numbers. 29029 * 29030 * @static 29031 * @memberOf _ 29032 * @since 4.7.0 29033 * @category Math 29034 * @param {number} dividend The first number in a division. 29035 * @param {number} divisor The second number in a division. 29036 * @returns {number} Returns the quotient. 29037 * @example 29038 * 29039 * _.divide(6, 4); 29040 * // => 1.5 29041 */ 29042 var divide = createMathOperation(function(dividend, divisor) { 29043 return dividend / divisor; 29044 }, 1); 29045 29046 /** 29047 * Computes `number` rounded down to `precision`. 29048 * 29049 * @static 29050 * @memberOf _ 29051 * @since 3.10.0 29052 * @category Math 29053 * @param {number} number The number to round down. 29054 * @param {number} [precision=0] The precision to round down to. 29055 * @returns {number} Returns the rounded down number. 29056 * @example 29057 * 29058 * _.floor(4.006); 29059 * // => 4 29060 * 29061 * _.floor(0.046, 2); 29062 * // => 0.04 29063 * 29064 * _.floor(4060, -2); 29065 * // => 4000 29066 */ 29067 var floor = createRound('floor'); 29068 29069 /** 29070 * Computes the maximum value of `array`. If `array` is empty or falsey, 29071 * `undefined` is returned. 29072 * 29073 * @static 29074 * @since 0.1.0 29075 * @memberOf _ 29076 * @category Math 29077 * @param {Array} array The array to iterate over. 29078 * @returns {*} Returns the maximum value. 29079 * @example 29080 * 29081 * _.max([4, 2, 8, 6]); 29082 * // => 8 29083 * 29084 * _.max([]); 29085 * // => undefined 29086 */ 29087 function max(array) { 29088 return (array && array.length) 29089 ? baseExtremum(array, identity, baseGt) 29090 : undefined; 29091 } 29092 29093 /** 29094 * This method is like `_.max` except that it accepts `iteratee` which is 29095 * invoked for each element in `array` to generate the criterion by which 29096 * the value is ranked. The iteratee is invoked with one argument: (value). 29097 * 29098 * @static 29099 * @memberOf _ 29100 * @since 4.0.0 29101 * @category Math 29102 * @param {Array} array The array to iterate over. 29103 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 29104 * @returns {*} Returns the maximum value. 29105 * @example 29106 * 29107 * var objects = [{ 'n': 1 }, { 'n': 2 }]; 29108 * 29109 * _.maxBy(objects, function(o) { return o.n; }); 29110 * // => { 'n': 2 } 29111 * 29112 * // The `_.property` iteratee shorthand. 29113 * _.maxBy(objects, 'n'); 29114 * // => { 'n': 2 } 29115 */ 29116 function maxBy(array, iteratee) { 29117 return (array && array.length) 29118 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) 29119 : undefined; 29120 } 29121 29122 /** 29123 * Computes the mean of the values in `array`. 29124 * 29125 * @static 29126 * @memberOf _ 29127 * @since 4.0.0 29128 * @category Math 29129 * @param {Array} array The array to iterate over. 29130 * @returns {number} Returns the mean. 29131 * @example 29132 * 29133 * _.mean([4, 2, 8, 6]); 29134 * // => 5 29135 */ 29136 function mean(array) { 29137 return baseMean(array, identity); 29138 } 29139 29140 /** 29141 * This method is like `_.mean` except that it accepts `iteratee` which is 29142 * invoked for each element in `array` to generate the value to be averaged. 29143 * The iteratee is invoked with one argument: (value). 29144 * 29145 * @static 29146 * @memberOf _ 29147 * @since 4.7.0 29148 * @category Math 29149 * @param {Array} array The array to iterate over. 29150 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 29151 * @returns {number} Returns the mean. 29152 * @example 29153 * 29154 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; 29155 * 29156 * _.meanBy(objects, function(o) { return o.n; }); 29157 * // => 5 29158 * 29159 * // The `_.property` iteratee shorthand. 29160 * _.meanBy(objects, 'n'); 29161 * // => 5 29162 */ 29163 function meanBy(array, iteratee) { 29164 return baseMean(array, getIteratee(iteratee, 2)); 29165 } 29166 29167 /** 29168 * Computes the minimum value of `array`. If `array` is empty or falsey, 29169 * `undefined` is returned. 29170 * 29171 * @static 29172 * @since 0.1.0 29173 * @memberOf _ 29174 * @category Math 29175 * @param {Array} array The array to iterate over. 29176 * @returns {*} Returns the minimum value. 29177 * @example 29178 * 29179 * _.min([4, 2, 8, 6]); 29180 * // => 2 29181 * 29182 * _.min([]); 29183 * // => undefined 29184 */ 29185 function min(array) { 29186 return (array && array.length) 29187 ? baseExtremum(array, identity, baseLt) 29188 : undefined; 29189 } 29190 29191 /** 29192 * This method is like `_.min` except that it accepts `iteratee` which is 29193 * invoked for each element in `array` to generate the criterion by which 29194 * the value is ranked. The iteratee is invoked with one argument: (value). 29195 * 29196 * @static 29197 * @memberOf _ 29198 * @since 4.0.0 29199 * @category Math 29200 * @param {Array} array The array to iterate over. 29201 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 29202 * @returns {*} Returns the minimum value. 29203 * @example 29204 * 29205 * var objects = [{ 'n': 1 }, { 'n': 2 }]; 29206 * 29207 * _.minBy(objects, function(o) { return o.n; }); 29208 * // => { 'n': 1 } 29209 * 29210 * // The `_.property` iteratee shorthand. 29211 * _.minBy(objects, 'n'); 29212 * // => { 'n': 1 } 29213 */ 29214 function minBy(array, iteratee) { 29215 return (array && array.length) 29216 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) 29217 : undefined; 29218 } 29219 29220 /** 29221 * Multiply two numbers. 29222 * 29223 * @static 29224 * @memberOf _ 29225 * @since 4.7.0 29226 * @category Math 29227 * @param {number} multiplier The first number in a multiplication. 29228 * @param {number} multiplicand The second number in a multiplication. 29229 * @returns {number} Returns the product. 29230 * @example 29231 * 29232 * _.multiply(6, 4); 29233 * // => 24 29234 */ 29235 var multiply = createMathOperation(function(multiplier, multiplicand) { 29236 return multiplier * multiplicand; 29237 }, 1); 29238 29239 /** 29240 * Computes `number` rounded to `precision`. 29241 * 29242 * @static 29243 * @memberOf _ 29244 * @since 3.10.0 29245 * @category Math 29246 * @param {number} number The number to round. 29247 * @param {number} [precision=0] The precision to round to. 29248 * @returns {number} Returns the rounded number. 29249 * @example 29250 * 29251 * _.round(4.006); 29252 * // => 4 29253 * 29254 * _.round(4.006, 2); 29255 * // => 4.01 29256 * 29257 * _.round(4060, -2); 29258 * // => 4100 29259 */ 29260 var round = createRound('round'); 29261 29262 /** 29263 * Subtract two numbers. 29264 * 29265 * @static 29266 * @memberOf _ 29267 * @since 4.0.0 29268 * @category Math 29269 * @param {number} minuend The first number in a subtraction. 29270 * @param {number} subtrahend The second number in a subtraction. 29271 * @returns {number} Returns the difference. 29272 * @example 29273 * 29274 * _.subtract(6, 4); 29275 * // => 2 29276 */ 29277 var subtract = createMathOperation(function(minuend, subtrahend) { 29278 return minuend - subtrahend; 29279 }, 0); 29280 29281 /** 29282 * Computes the sum of the values in `array`. 29283 * 29284 * @static 29285 * @memberOf _ 29286 * @since 3.4.0 29287 * @category Math 29288 * @param {Array} array The array to iterate over. 29289 * @returns {number} Returns the sum. 29290 * @example 29291 * 29292 * _.sum([4, 2, 8, 6]); 29293 * // => 20 29294 */ 29295 function sum(array) { 29296 return (array && array.length) 29297 ? baseSum(array, identity) 29298 : 0; 29299 } 29300 29301 /** 29302 * This method is like `_.sum` except that it accepts `iteratee` which is 29303 * invoked for each element in `array` to generate the value to be summed. 29304 * The iteratee is invoked with one argument: (value). 29305 * 29306 * @static 29307 * @memberOf _ 29308 * @since 4.0.0 29309 * @category Math 29310 * @param {Array} array The array to iterate over. 29311 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 29312 * @returns {number} Returns the sum. 29313 * @example 29314 * 29315 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; 29316 * 29317 * _.sumBy(objects, function(o) { return o.n; }); 29318 * // => 20 29319 * 29320 * // The `_.property` iteratee shorthand. 29321 * _.sumBy(objects, 'n'); 29322 * // => 20 29323 */ 29324 function sumBy(array, iteratee) { 29325 return (array && array.length) 29326 ? baseSum(array, getIteratee(iteratee, 2)) 29327 : 0; 29328 } 29329 29330 /*------------------------------------------------------------------------*/ 29331 29332 // Add methods that return wrapped values in chain sequences. 29333 lodash.after = after; 29334 lodash.ary = ary; 29335 lodash.assign = assign; 29336 lodash.assignIn = assignIn; 29337 lodash.assignInWith = assignInWith; 29338 lodash.assignWith = assignWith; 29339 lodash.at = at; 29340 lodash.before = before; 29341 lodash.bind = bind; 29342 lodash.bindAll = bindAll; 29343 lodash.bindKey = bindKey; 29344 lodash.castArray = castArray; 29345 lodash.chain = chain; 29346 lodash.chunk = chunk; 29347 lodash.compact = compact; 29348 lodash.concat = concat; 29349 lodash.cond = cond; 29350 lodash.conforms = conforms; 29351 lodash.constant = constant; 29352 lodash.countBy = countBy; 29353 lodash.create = create; 29354 lodash.curry = curry; 29355 lodash.curryRight = curryRight; 29356 lodash.debounce = debounce; 29357 lodash.defaults = defaults; 29358 lodash.defaultsDeep = defaultsDeep; 29359 lodash.defer = defer; 29360 lodash.delay = delay; 29361 lodash.difference = difference; 29362 lodash.differenceBy = differenceBy; 29363 lodash.differenceWith = differenceWith; 29364 lodash.drop = drop; 29365 lodash.dropRight = dropRight; 29366 lodash.dropRightWhile = dropRightWhile; 29367 lodash.dropWhile = dropWhile; 29368 lodash.fill = fill; 29369 lodash.filter = filter; 29370 lodash.flatMap = flatMap; 29371 lodash.flatMapDeep = flatMapDeep; 29372 lodash.flatMapDepth = flatMapDepth; 29373 lodash.flatten = flatten; 29374 lodash.flattenDeep = flattenDeep; 29375 lodash.flattenDepth = flattenDepth; 29376 lodash.flip = flip; 29377 lodash.flow = flow; 29378 lodash.flowRight = flowRight; 29379 lodash.fromPairs = fromPairs; 29380 lodash.functions = functions; 29381 lodash.functionsIn = functionsIn; 29382 lodash.groupBy = groupBy; 29383 lodash.initial = initial; 29384 lodash.intersection = intersection; 29385 lodash.intersectionBy = intersectionBy; 29386 lodash.intersectionWith = intersectionWith; 29387 lodash.invert = invert; 29388 lodash.invertBy = invertBy; 29389 lodash.invokeMap = invokeMap; 29390 lodash.iteratee = iteratee; 29391 lodash.keyBy = keyBy; 29392 lodash.keys = keys; 29393 lodash.keysIn = keysIn; 29394 lodash.map = map; 29395 lodash.mapKeys = mapKeys; 29396 lodash.mapValues = mapValues; 29397 lodash.matches = matches; 29398 lodash.matchesProperty = matchesProperty; 29399 lodash.memoize = memoize; 29400 lodash.merge = merge; 29401 lodash.mergeWith = mergeWith; 29402 lodash.method = method; 29403 lodash.methodOf = methodOf; 29404 lodash.mixin = mixin; 29405 lodash.negate = negate; 29406 lodash.nthArg = nthArg; 29407 lodash.omit = omit; 29408 lodash.omitBy = omitBy; 29409 lodash.once = once; 29410 lodash.orderBy = orderBy; 29411 lodash.over = over; 29412 lodash.overArgs = overArgs; 29413 lodash.overEvery = overEvery; 29414 lodash.overSome = overSome; 29415 lodash.partial = partial; 29416 lodash.partialRight = partialRight; 29417 lodash.partition = partition; 29418 lodash.pick = pick; 29419 lodash.pickBy = pickBy; 29420 lodash.property = property; 29421 lodash.propertyOf = propertyOf; 29422 lodash.pull = pull; 29423 lodash.pullAll = pullAll; 29424 lodash.pullAllBy = pullAllBy; 29425 lodash.pullAllWith = pullAllWith; 29426 lodash.pullAt = pullAt; 29427 lodash.range = range; 29428 lodash.rangeRight = rangeRight; 29429 lodash.rearg = rearg; 29430 lodash.reject = reject; 29431 lodash.remove = remove; 29432 lodash.rest = rest; 29433 lodash.reverse = reverse; 29434 lodash.sampleSize = sampleSize; 29435 lodash.set = set; 29436 lodash.setWith = setWith; 29437 lodash.shuffle = shuffle; 29438 lodash.slice = slice; 29439 lodash.sortBy = sortBy; 29440 lodash.sortedUniq = sortedUniq; 29441 lodash.sortedUniqBy = sortedUniqBy; 29442 lodash.split = split; 29443 lodash.spread = spread; 29444 lodash.tail = tail; 29445 lodash.take = take; 29446 lodash.takeRight = takeRight; 29447 lodash.takeRightWhile = takeRightWhile; 29448 lodash.takeWhile = takeWhile; 29449 lodash.tap = tap; 29450 lodash.throttle = throttle; 29451 lodash.thru = thru; 29452 lodash.toArray = toArray; 29453 lodash.toPairs = toPairs; 29454 lodash.toPairsIn = toPairsIn; 29455 lodash.toPath = toPath; 29456 lodash.toPlainObject = toPlainObject; 29457 lodash.transform = transform; 29458 lodash.unary = unary; 29459 lodash.union = union; 29460 lodash.unionBy = unionBy; 29461 lodash.unionWith = unionWith; 29462 lodash.uniq = uniq; 29463 lodash.uniqBy = uniqBy; 29464 lodash.uniqWith = uniqWith; 29465 lodash.unset = unset; 29466 lodash.unzip = unzip; 29467 lodash.unzipWith = unzipWith; 29468 lodash.update = update; 29469 lodash.updateWith = updateWith; 29470 lodash.values = values; 29471 lodash.valuesIn = valuesIn; 29472 lodash.without = without; 29473 lodash.words = words; 29474 lodash.wrap = wrap; 29475 lodash.xor = xor; 29476 lodash.xorBy = xorBy; 29477 lodash.xorWith = xorWith; 29478 lodash.zip = zip; 29479 lodash.zipObject = zipObject; 29480 lodash.zipObjectDeep = zipObjectDeep; 29481 lodash.zipWith = zipWith; 29482 29483 // Add aliases. 29484 lodash.entries = toPairs; 29485 lodash.entriesIn = toPairsIn; 29486 lodash.extend = assignIn; 29487 lodash.extendWith = assignInWith; 29488 29489 // Add methods to `lodash.prototype`. 29490 mixin(lodash, lodash); 29491 29492 /*------------------------------------------------------------------------*/ 29493 29494 // Add methods that return unwrapped values in chain sequences. 29495 lodash.add = add; 29496 lodash.attempt = attempt; 29497 lodash.camelCase = camelCase; 29498 lodash.capitalize = capitalize; 29499 lodash.ceil = ceil; 29500 lodash.clamp = clamp; 29501 lodash.clone = clone; 29502 lodash.cloneDeep = cloneDeep; 29503 lodash.cloneDeepWith = cloneDeepWith; 29504 lodash.cloneWith = cloneWith; 29505 lodash.conformsTo = conformsTo; 29506 lodash.deburr = deburr; 29507 lodash.defaultTo = defaultTo; 29508 lodash.divide = divide; 29509 lodash.endsWith = endsWith; 29510 lodash.eq = eq; 29511 lodash.escape = escape; 29512 lodash.escapeRegExp = escapeRegExp; 29513 lodash.every = every; 29514 lodash.find = find; 29515 lodash.findIndex = findIndex; 29516 lodash.findKey = findKey; 29517 lodash.findLast = findLast; 29518 lodash.findLastIndex = findLastIndex; 29519 lodash.findLastKey = findLastKey; 29520 lodash.floor = floor; 29521 lodash.forEach = forEach; 29522 lodash.forEachRight = forEachRight; 29523 lodash.forIn = forIn; 29524 lodash.forInRight = forInRight; 29525 lodash.forOwn = forOwn; 29526 lodash.forOwnRight = forOwnRight; 29527 lodash.get = get; 29528 lodash.gt = gt; 29529 lodash.gte = gte; 29530 lodash.has = has; 29531 lodash.hasIn = hasIn; 29532 lodash.head = head; 29533 lodash.identity = identity; 29534 lodash.includes = includes; 29535 lodash.indexOf = indexOf; 29536 lodash.inRange = inRange; 29537 lodash.invoke = invoke; 29538 lodash.isArguments = isArguments; 29539 lodash.isArray = isArray; 29540 lodash.isArrayBuffer = isArrayBuffer; 29541 lodash.isArrayLike = isArrayLike; 29542 lodash.isArrayLikeObject = isArrayLikeObject; 29543 lodash.isBoolean = isBoolean; 29544 lodash.isBuffer = isBuffer; 29545 lodash.isDate = isDate; 29546 lodash.isElement = isElement; 29547 lodash.isEmpty = isEmpty; 29548 lodash.isEqual = isEqual; 29549 lodash.isEqualWith = isEqualWith; 29550 lodash.isError = isError; 29551 lodash.isFinite = isFinite; 29552 lodash.isFunction = isFunction; 29553 lodash.isInteger = isInteger; 29554 lodash.isLength = isLength; 29555 lodash.isMap = isMap; 29556 lodash.isMatch = isMatch; 29557 lodash.isMatchWith = isMatchWith; 29558 lodash.isNaN = isNaN; 29559 lodash.isNative = isNative; 29560 lodash.isNil = isNil; 29561 lodash.isNull = isNull; 29562 lodash.isNumber = isNumber; 29563 lodash.isObject = isObject; 29564 lodash.isObjectLike = isObjectLike; 29565 lodash.isPlainObject = isPlainObject; 29566 lodash.isRegExp = isRegExp; 29567 lodash.isSafeInteger = isSafeInteger; 29568 lodash.isSet = isSet; 29569 lodash.isString = isString; 29570 lodash.isSymbol = isSymbol; 29571 lodash.isTypedArray = isTypedArray; 29572 lodash.isUndefined = isUndefined; 29573 lodash.isWeakMap = isWeakMap; 29574 lodash.isWeakSet = isWeakSet; 29575 lodash.join = join; 29576 lodash.kebabCase = kebabCase; 29577 lodash.last = last; 29578 lodash.lastIndexOf = lastIndexOf; 29579 lodash.lowerCase = lowerCase; 29580 lodash.lowerFirst = lowerFirst; 29581 lodash.lt = lt; 29582 lodash.lte = lte; 29583 lodash.max = max; 29584 lodash.maxBy = maxBy; 29585 lodash.mean = mean; 29586 lodash.meanBy = meanBy; 29587 lodash.min = min; 29588 lodash.minBy = minBy; 29589 lodash.stubArray = stubArray; 29590 lodash.stubFalse = stubFalse; 29591 lodash.stubObject = stubObject; 29592 lodash.stubString = stubString; 29593 lodash.stubTrue = stubTrue; 29594 lodash.multiply = multiply; 29595 lodash.nth = nth; 29596 lodash.noConflict = noConflict; 29597 lodash.noop = noop; 29598 lodash.now = now; 29599 lodash.pad = pad; 29600 lodash.padEnd = padEnd; 29601 lodash.padStart = padStart; 29602 lodash.parseInt = parseInt; 29603 lodash.random = random; 29604 lodash.reduce = reduce; 29605 lodash.reduceRight = reduceRight; 29606 lodash.repeat = repeat; 29607 lodash.replace = replace; 29608 lodash.result = result; 29609 lodash.round = round; 29610 lodash.runInContext = runInContext; 29611 lodash.sample = sample; 29612 lodash.size = size; 29613 lodash.snakeCase = snakeCase; 29614 lodash.some = some; 29615 lodash.sortedIndex = sortedIndex; 29616 lodash.sortedIndexBy = sortedIndexBy; 29617 lodash.sortedIndexOf = sortedIndexOf; 29618 lodash.sortedLastIndex = sortedLastIndex; 29619 lodash.sortedLastIndexBy = sortedLastIndexBy; 29620 lodash.sortedLastIndexOf = sortedLastIndexOf; 29621 lodash.startCase = startCase; 29622 lodash.startsWith = startsWith; 29623 lodash.subtract = subtract; 29624 lodash.sum = sum; 29625 lodash.sumBy = sumBy; 29626 lodash.template = template; 29627 lodash.times = times; 29628 lodash.toFinite = toFinite; 29629 lodash.toInteger = toInteger; 29630 lodash.toLength = toLength; 29631 lodash.toLower = toLower; 29632 lodash.toNumber = toNumber; 29633 lodash.toSafeInteger = toSafeInteger; 29634 lodash.toString = toString; 29635 lodash.toUpper = toUpper; 29636 lodash.trim = trim; 29637 lodash.trimEnd = trimEnd; 29638 lodash.trimStart = trimStart; 29639 lodash.truncate = truncate; 29640 lodash.unescape = unescape; 29641 lodash.uniqueId = uniqueId; 29642 lodash.upperCase = upperCase; 29643 lodash.upperFirst = upperFirst; 29644 29645 // Add aliases. 29646 lodash.each = forEach; 29647 lodash.eachRight = forEachRight; 29648 lodash.first = head; 29649 29650 mixin(lodash, (function() { 29651 var source = {}; 29652 baseForOwn(lodash, function(func, methodName) { 29653 if (!hasOwnProperty.call(lodash.prototype, methodName)) { 29654 source[methodName] = func; 29655 } 29656 }); 29657 return source; 29658 }()), { 'chain': false }); 29659 29660 /*------------------------------------------------------------------------*/ 29661 29662 /** 29663 * The semantic version number. 29664 * 29665 * @static 29666 * @memberOf _ 29667 * @type {string} 29668 */ 29669 lodash.VERSION = VERSION; 29670 29671 // Assign default placeholders. 29672 arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { 29673 lodash[methodName].placeholder = lodash; 29674 }); 29675 29676 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. 29677 arrayEach(['drop', 'take'], function(methodName, index) { 29678 LazyWrapper.prototype[methodName] = function(n) { 29679 n = n === undefined ? 1 : nativeMax(toInteger(n), 0); 29680 29681 var result = (this.__filtered__ && !index) 29682 ? new LazyWrapper(this) 29683 : this.clone(); 29684 29685 if (result.__filtered__) { 29686 result.__takeCount__ = nativeMin(n, result.__takeCount__); 29687 } else { 29688 result.__views__.push({ 29689 'size': nativeMin(n, MAX_ARRAY_LENGTH), 29690 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') 29691 }); 29692 } 29693 return result; 29694 }; 29695 29696 LazyWrapper.prototype[methodName + 'Right'] = function(n) { 29697 return this.reverse()[methodName](n).reverse(); 29698 }; 29699 }); 29700 29701 // Add `LazyWrapper` methods that accept an `iteratee` value. 29702 arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { 29703 var type = index + 1, 29704 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; 29705 29706 LazyWrapper.prototype[methodName] = function(iteratee) { 29707 var result = this.clone(); 29708 result.__iteratees__.push({ 29709 'iteratee': getIteratee(iteratee, 3), 29710 'type': type 29711 }); 29712 result.__filtered__ = result.__filtered__ || isFilter; 29713 return result; 29714 }; 29715 }); 29716 29717 // Add `LazyWrapper` methods for `_.head` and `_.last`. 29718 arrayEach(['head', 'last'], function(methodName, index) { 29719 var takeName = 'take' + (index ? 'Right' : ''); 29720 29721 LazyWrapper.prototype[methodName] = function() { 29722 return this[takeName](1).value()[0]; 29723 }; 29724 }); 29725 29726 // Add `LazyWrapper` methods for `_.initial` and `_.tail`. 29727 arrayEach(['initial', 'tail'], function(methodName, index) { 29728 var dropName = 'drop' + (index ? '' : 'Right'); 29729 29730 LazyWrapper.prototype[methodName] = function() { 29731 return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); 29732 }; 29733 }); 29734 29735 LazyWrapper.prototype.compact = function() { 29736 return this.filter(identity); 29737 }; 29738 29739 LazyWrapper.prototype.find = function(predicate) { 29740 return this.filter(predicate).head(); 29741 }; 29742 29743 LazyWrapper.prototype.findLast = function(predicate) { 29744 return this.reverse().find(predicate); 29745 }; 29746 29747 LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { 29748 if (typeof path == 'function') { 29749 return new LazyWrapper(this); 29750 } 29751 return this.map(function(value) { 29752 return baseInvoke(value, path, args); 29753 }); 29754 }); 29755 29756 LazyWrapper.prototype.reject = function(predicate) { 29757 return this.filter(negate(getIteratee(predicate))); 29758 }; 29759 29760 LazyWrapper.prototype.slice = function(start, end) { 29761 start = toInteger(start); 29762 29763 var result = this; 29764 if (result.__filtered__ && (start > 0 || end < 0)) { 29765 return new LazyWrapper(result); 29766 } 29767 if (start < 0) { 29768 result = result.takeRight(-start); 29769 } else if (start) { 29770 result = result.drop(start); 29771 } 29772 if (end !== undefined) { 29773 end = toInteger(end); 29774 result = end < 0 ? result.dropRight(-end) : result.take(end - start); 29775 } 29776 return result; 29777 }; 29778 29779 LazyWrapper.prototype.takeRightWhile = function(predicate) { 29780 return this.reverse().takeWhile(predicate).reverse(); 29781 }; 29782 29783 LazyWrapper.prototype.toArray = function() { 29784 return this.take(MAX_ARRAY_LENGTH); 29785 }; 29786 29787 // Add `LazyWrapper` methods to `lodash.prototype`. 29788 baseForOwn(LazyWrapper.prototype, function(func, methodName) { 29789 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), 29790 isTaker = /^(?:head|last)$/.test(methodName), 29791 lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], 29792 retUnwrapped = isTaker || /^find/.test(methodName); 29793 29794 if (!lodashFunc) { 29795 return; 29796 } 29797 lodash.prototype[methodName] = function() { 29798 var value = this.__wrapped__, 29799 args = isTaker ? [1] : arguments, 29800 isLazy = value instanceof LazyWrapper, 29801 iteratee = args[0], 29802 useLazy = isLazy || isArray(value); 29803 29804 var interceptor = function(value) { 29805 var result = lodashFunc.apply(lodash, arrayPush([value], args)); 29806 return (isTaker && chainAll) ? result[0] : result; 29807 }; 29808 29809 if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { 29810 // Avoid lazy use if the iteratee has a "length" value other than `1`. 29811 isLazy = useLazy = false; 29812 } 29813 var chainAll = this.__chain__, 29814 isHybrid = !!this.__actions__.length, 29815 isUnwrapped = retUnwrapped && !chainAll, 29816 onlyLazy = isLazy && !isHybrid; 29817 29818 if (!retUnwrapped && useLazy) { 29819 value = onlyLazy ? value : new LazyWrapper(this); 29820 var result = func.apply(value, args); 29821 result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); 29822 return new LodashWrapper(result, chainAll); 29823 } 29824 if (isUnwrapped && onlyLazy) { 29825 return func.apply(this, args); 29826 } 29827 result = this.thru(interceptor); 29828 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; 29829 }; 29830 }); 29831 29832 // Add `Array` methods to `lodash.prototype`. 29833 arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { 29834 var func = arrayProto[methodName], 29835 chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', 29836 retUnwrapped = /^(?:pop|shift)$/.test(methodName); 29837 29838 lodash.prototype[methodName] = function() { 29839 var args = arguments; 29840 if (retUnwrapped && !this.__chain__) { 29841 var value = this.value(); 29842 return func.apply(isArray(value) ? value : [], args); 29843 } 29844 return this[chainName](function(value) { 29845 return func.apply(isArray(value) ? value : [], args); 29846 }); 29847 }; 29848 }); 29849 29850 // Map minified method names to their real names. 29851 baseForOwn(LazyWrapper.prototype, function(func, methodName) { 29852 var lodashFunc = lodash[methodName]; 29853 if (lodashFunc) { 29854 var key = lodashFunc.name + ''; 29855 if (!hasOwnProperty.call(realNames, key)) { 29856 realNames[key] = []; 29857 } 29858 realNames[key].push({ 'name': methodName, 'func': lodashFunc }); 29859 } 29860 }); 29861 29862 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ 29863 'name': 'wrapper', 29864 'func': undefined 29865 }]; 29866 29867 // Add methods to `LazyWrapper`. 29868 LazyWrapper.prototype.clone = lazyClone; 29869 LazyWrapper.prototype.reverse = lazyReverse; 29870 LazyWrapper.prototype.value = lazyValue; 29871 29872 // Add chain sequence methods to the `lodash` wrapper. 29873 lodash.prototype.at = wrapperAt; 29874 lodash.prototype.chain = wrapperChain; 29875 lodash.prototype.commit = wrapperCommit; 29876 lodash.prototype.next = wrapperNext; 29877 lodash.prototype.plant = wrapperPlant; 29878 lodash.prototype.reverse = wrapperReverse; 29879 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; 29880 29881 // Add lazy aliases. 29882 lodash.prototype.first = lodash.prototype.head; 29883 29884 if (symIterator) { 29885 lodash.prototype[symIterator] = wrapperToIterator; 29886 } 29887 return lodash; 29888 }); 29889 29890 /*--------------------------------------------------------------------------*/ 29891 29892 // Export lodash. 29893 var _ = runInContext(); 29894 29895 // Some AMD build optimizers, like r.js, check for condition patterns like: 29896 if (true) { 29897 // Expose Lodash on the global object to prevent errors when Lodash is 29898 // loaded by a script tag in the presence of an AMD loader. 29899 // See http://requirejs.org/docs/errors.html#mismatch for more details. 29900 // Use `_.noConflict` to remove Lodash from the global object. 29901 root._ = _; 29902 29903 // Define as an anonymous module so, through path mapping, it can be 29904 // referenced as the "underscore" module. 29905 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { 29906 return _; 29907 }).call(exports, __webpack_require__, exports, module), 29908 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 29909 } 29910 // Check for `exports` after `define` in case a build optimizer adds it. 29911 else {} 29912}.call(this)); 29913 29914 29915/***/ }), 29916
vendor: 5,616 bytes, lines 29917-30161
29917/***/ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js": 29918/*!*******************************************************************************!*\ 29919 !*** ./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js ***! 29920 \*******************************************************************************/ 29921/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 29922 29923"use strict"; 29924 29925 29926/* eslint-env browser */ 29927/* 29928 eslint-disable 29929 no-console, 29930 func-names 29931*/ 29932 29933/** @typedef {any} TODO */ 29934 29935var normalizeUrl = __webpack_require__(/*! ./normalize-url */ "./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js"); 29936var srcByModuleId = Object.create(null); 29937var noDocument = typeof document === "undefined"; 29938var forEach = Array.prototype.forEach; 29939 29940/** 29941 * @param {function} fn 29942 * @param {number} time 29943 * @returns {(function(): void)|*} 29944 */ 29945function debounce(fn, time) { 29946 var timeout = 0; 29947 return function () { 29948 // @ts-ignore 29949 var self = this; 29950 // eslint-disable-next-line prefer-rest-params 29951 var args = arguments; 29952 var functionCall = function functionCall() { 29953 return fn.apply(self, args); 29954 }; 29955 clearTimeout(timeout); 29956 29957 // @ts-ignore 29958 timeout = setTimeout(functionCall, time); 29959 }; 29960} 29961function noop() {} 29962 29963/** 29964 * @param {TODO} moduleId 29965 * @returns {TODO} 29966 */ 29967function getCurrentScriptUrl(moduleId) { 29968 var src = srcByModuleId[moduleId]; 29969 if (!src) { 29970 if (document.currentScript) { 29971 src = ( /** @type {HTMLScriptElement} */document.currentScript).src; 29972 } else { 29973 var scripts = document.getElementsByTagName("script"); 29974 var lastScriptTag = scripts[scripts.length - 1]; 29975 if (lastScriptTag) { 29976 src = lastScriptTag.src; 29977 } 29978 } 29979 srcByModuleId[moduleId] = src; 29980 } 29981 29982 /** 29983 * @param {string} fileMap 29984 * @returns {null | string[]} 29985 */ 29986 return function (fileMap) { 29987 if (!src) { 29988 return null; 29989 } 29990 var splitResult = src.split(/([^\\/]+)\.js$/); 29991 var filename = splitResult && splitResult[1]; 29992 if (!filename) { 29993 return [src.replace(".js", ".css")]; 29994 } 29995 if (!fileMap) { 29996 return [src.replace(".js", ".css")]; 29997 } 29998 return fileMap.split(",").map(function (mapRule) { 29999 var reg = new RegExp("".concat(filename, "\\.js$"), "g"); 30000 return normalizeUrl(src.replace(reg, "".concat(mapRule.replace(/{fileName}/g, filename), ".css"))); 30001 }); 30002 }; 30003} 30004 30005/** 30006 * @param {TODO} el 30007 * @param {string} [url] 30008 */ 30009function updateCss(el, url) { 30010 if (!url) { 30011 if (!el.href) { 30012 return; 30013 } 30014 30015 // eslint-disable-next-line 30016 url = el.href.split("?")[0]; 30017 } 30018 if (!isUrlRequest( /** @type {string} */url)) { 30019 return; 30020 } 30021 if (el.isLoaded === false) { 30022 // We seem to be about to replace a css link that hasn't loaded yet. 30023 // We're probably changing the same file more than once. 30024 return; 30025 } 30026 if (!url || !(url.indexOf(".css") > -1)) { 30027 return; 30028 } 30029 30030 // eslint-disable-next-line no-param-reassign 30031 el.visited = true; 30032 var newEl = el.cloneNode(); 30033 newEl.isLoaded = false; 30034 newEl.addEventListener("load", function () { 30035 if (newEl.isLoaded) { 30036 return; 30037 } 30038 newEl.isLoaded = true; 30039 el.parentNode.removeChild(el); 30040 }); 30041 newEl.addEventListener("error", function () { 30042 if (newEl.isLoaded) { 30043 return; 30044 } 30045 newEl.isLoaded = true; 30046 el.parentNode.removeChild(el); 30047 }); 30048 newEl.href = "".concat(url, "?").concat(Date.now()); 30049 if (el.nextSibling) { 30050 el.parentNode.insertBefore(newEl, el.nextSibling); 30051 } else { 30052 el.parentNode.appendChild(newEl); 30053 } 30054} 30055 30056/** 30057 * @param {string} href 30058 * @param {TODO} src 30059 * @returns {TODO} 30060 */ 30061function getReloadUrl(href, src) { 30062 var ret; 30063 30064 // eslint-disable-next-line no-param-reassign 30065 href = normalizeUrl(href); 30066 src.some( 30067 /** 30068 * @param {string} url 30069 */ 30070 // eslint-disable-next-line array-callback-return 30071 function (url) { 30072 if (href.indexOf(src) > -1) { 30073 ret = url; 30074 } 30075 }); 30076 return ret; 30077} 30078 30079/** 30080 * @param {string} [src] 30081 * @returns {boolean} 30082 */ 30083function reloadStyle(src) { 30084 if (!src) { 30085 return false; 30086 } 30087 var elements = document.querySelectorAll("link"); 30088 var loaded = false; 30089 forEach.call(elements, function (el) { 30090 if (!el.href) { 30091 return; 30092 } 30093 var url = getReloadUrl(el.href, src); 30094 if (!isUrlRequest(url)) { 30095 return; 30096 } 30097 if (el.visited === true) { 30098 return; 30099 } 30100 if (url) { 30101 updateCss(el, url); 30102 loaded = true; 30103 } 30104 }); 30105 return loaded; 30106} 30107function reloadAll() { 30108 var elements = document.querySelectorAll("link"); 30109 forEach.call(elements, function (el) { 30110 if (el.visited === true) { 30111 return; 30112 } 30113 updateCss(el); 30114 }); 30115} 30116 30117/** 30118 * @param {string} url 30119 * @returns {boolean} 30120 */ 30121function isUrlRequest(url) { 30122 // An URL is not an request if 30123 30124 // It is not http or https 30125 if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url)) { 30126 return false; 30127 } 30128 return true; 30129} 30130 30131/** 30132 * @param {TODO} moduleId 30133 * @param {TODO} options 30134 * @returns {TODO} 30135 */ 30136module.exports = function (moduleId, options) { 30137 if (noDocument) { 30138 console.log("no window.document found, will not HMR CSS"); 30139 return noop; 30140 } 30141 var getScriptSrc = getCurrentScriptUrl(moduleId); 30142 function update() { 30143 var src = getScriptSrc(options.filename); 30144 var reloaded = reloadStyle(src); 30145 if (options.locals) { 30146 console.log("[HMR] Detected local css modules. Reload all css"); 30147 reloadAll(); 30148 return; 30149 } 30150 if (reloaded) { 30151 console.log("[HMR] css reload %s", src.join(" ")); 30152 } else { 30153 console.log("[HMR] Reload all css"); 30154 reloadAll(); 30155 } 30156 } 30157 return debounce(update, 50); 30158}; 30159 30160/***/ }), 30161
vendor: 1,296 bytes, lines 30162-30210
30162/***/ "./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js": 30163/*!************************************************************************!*\ 30164 !*** ./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js ***! 30165 \************************************************************************/ 30166/***/ ((module) => { 30167 30168"use strict"; 30169 30170 30171/* eslint-disable */ 30172 30173/** 30174 * @param {string[]} pathComponents 30175 * @returns {string} 30176 */ 30177function normalizeUrl(pathComponents) { 30178 return pathComponents.reduce(function (accumulator, item) { 30179 switch (item) { 30180 case "..": 30181 accumulator.pop(); 30182 break; 30183 case ".": 30184 break; 30185 default: 30186 accumulator.push(item); 30187 } 30188 return accumulator; 30189 }, /** @type {string[]} */[]).join("/"); 30190} 30191 30192/** 30193 * @param {string} urlString 30194 * @returns {string} 30195 */ 30196module.exports = function (urlString) { 30197 urlString = urlString.trim(); 30198 if (/^data:/i.test(urlString)) { 30199 return urlString; 30200 } 30201 var protocol = urlString.indexOf("//") !== -1 ? urlString.split("//")[0] + "//" : ""; 30202 var components = urlString.replace(new RegExp(protocol, "i"), "").split("/"); 30203 var host = components[0].toLowerCase().replace(/\.$/, ""); 30204 components[0] = ""; 30205 var path = normalizeUrl(components); 30206 return protocol + host + path; 30207}; 30208 30209/***/ }), 30210
vendor: 1,162 bytes, lines 30211-30245
30211/***/ "./node_modules/@vuepic/vue-datepicker/dist/main.css": 30212/*!***********************************************************!*\ 30213 !*** ./node_modules/@vuepic/vue-datepicker/dist/main.css ***! 30214 \***********************************************************/ 30215/***/ ((module, __webpack_exports__, __webpack_require__) => { 30216 30217"use strict"; 30218__webpack_require__.r(__webpack_exports__); 30219// extracted by mini-css-extract-plugin 30220 30221 if(true) { 30222 (function() { 30223 var localsJsonString = undefined; 30224 // 1788447581441 30225 var cssReload = __webpack_require__(/*! ../../../mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js")(module.id, {}); 30226 // only invalidate when locals change 30227 if ( 30228 module.hot.data && 30229 module.hot.data.value && 30230 module.hot.data.value !== localsJsonString 30231 ) { 30232 module.hot.invalidate(); 30233 } else { 30234 module.hot.accept(); 30235 } 30236 module.hot.dispose(function(data) { 30237 data.value = localsJsonString; 30238 cssReload(); 30239 }); 30240 })(); 30241 } 30242 30243 30244/***/ }), 30245
vendor: 1,104 bytes, lines 30246-30280
30246/***/ "./node_modules/animate.css/animate.css": 30247/*!**********************************************!*\ 30248 !*** ./node_modules/animate.css/animate.css ***! 30249 \**********************************************/ 30250/***/ ((module, __webpack_exports__, __webpack_require__) => { 30251 30252"use strict"; 30253__webpack_require__.r(__webpack_exports__); 30254// extracted by mini-css-extract-plugin 30255 30256 if(true) { 30257 (function() { 30258 var localsJsonString = undefined; 30259 // 1788447580899 30260 var cssReload = __webpack_require__(/*! ../mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js")(module.id, {}); 30261 // only invalidate when locals change 30262 if ( 30263 module.hot.data && 30264 module.hot.data.value && 30265 module.hot.data.value !== localsJsonString 30266 ) { 30267 module.hot.invalidate(); 30268 } else { 30269 module.hot.accept(); 30270 } 30271 module.hot.dispose(function(data) { 30272 data.value = localsJsonString; 30273 cssReload(); 30274 }); 30275 })(); 30276 } 30277 30278 30279/***/ }), 30280
vendor: 1,159 bytes, lines 30281-30315
30281/***/ "./node_modules/slick-carousel/slick/slick-theme.css": 30282/*!***********************************************************!*\ 30283 !*** ./node_modules/slick-carousel/slick/slick-theme.css ***! 30284 \***********************************************************/ 30285/***/ ((module, __webpack_exports__, __webpack_require__) => { 30286 30287"use strict"; 30288__webpack_require__.r(__webpack_exports__); 30289// extracted by mini-css-extract-plugin 30290 30291 if(true) { 30292 (function() { 30293 var localsJsonString = undefined; 30294 // 1788447581386 30295 var cssReload = __webpack_require__(/*! ../../mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js")(module.id, {}); 30296 // only invalidate when locals change 30297 if ( 30298 module.hot.data && 30299 module.hot.data.value && 30300 module.hot.data.value !== localsJsonString 30301 ) { 30302 module.hot.invalidate(); 30303 } else { 30304 module.hot.accept(); 30305 } 30306 module.hot.dispose(function(data) { 30307 data.value = localsJsonString; 30308 cssReload(); 30309 }); 30310 })(); 30311 } 30312 30313 30314/***/ }), 30315
vendor: 1,135 bytes, lines 30316-30350
30316/***/ "./node_modules/slick-carousel/slick/slick.css": 30317/*!*****************************************************!*\ 30318 !*** ./node_modules/slick-carousel/slick/slick.css ***! 30319 \*****************************************************/ 30320/***/ ((module, __webpack_exports__, __webpack_require__) => { 30321 30322"use strict"; 30323__webpack_require__.r(__webpack_exports__); 30324// extracted by mini-css-extract-plugin 30325 30326 if(true) { 30327 (function() { 30328 var localsJsonString = undefined; 30329 // 1788447581224 30330 var cssReload = __webpack_require__(/*! ../../mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js")(module.id, {}); 30331 // only invalidate when locals change 30332 if ( 30333 module.hot.data && 30334 module.hot.data.value && 30335 module.hot.data.value !== localsJsonString 30336 ) { 30337 module.hot.invalidate(); 30338 } else { 30339 module.hot.accept(); 30340 } 30341 module.hot.dispose(function(data) { 30342 data.value = localsJsonString; 30343 cssReload(); 30344 }); 30345 })(); 30346 } 30347 30348 30349/***/ }), 30350
vendor: 89,573 bytes, lines 30351-33370
30351/***/ "./node_modules/slick-carousel/slick/slick.js": 30352/*!****************************************************!*\ 30353 !*** ./node_modules/slick-carousel/slick/slick.js ***! 30354 \****************************************************/ 30355/***/ ((module, exports, __webpack_require__) => { 30356 30357var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* 30358 _ _ _ _ 30359 ___| (_) ___| | __ (_)___ 30360/ __| | |/ __| |/ / | / __| 30361\__ \ | | (__| < _ | \__ \ 30362|___/_|_|\___|_|\_(_)/ |___/ 30363 |__/ 30364 30365 Version: 1.8.1 30366 Author: Ken Wheeler 30367 Website: http://kenwheeler.github.io 30368 Docs: http://kenwheeler.github.io/slick 30369 Repo: http://github.com/kenwheeler/slick 30370 Issues: http://github.com/kenwheeler/slick/issues 30371 30372 */ 30373/* global window, document, define, jQuery, setInterval, clearInterval */ 30374;(function(factory) { 30375 'use strict'; 30376 if (true) { 30377 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "jquery")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 30378 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 30379 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 30380 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 30381 } else {} 30382 30383}(function($) { 30384 'use strict'; 30385 var Slick = window.Slick || {}; 30386 30387 Slick = (function() { 30388 30389 var instanceUid = 0; 30390 30391 function Slick(element, settings) { 30392 30393 var _ = this, dataSettings; 30394 30395 _.defaults = { 30396 accessibility: true, 30397 adaptiveHeight: false, 30398 appendArrows: $(element), 30399 appendDots: $(element), 30400 arrows: true, 30401 asNavFor: null, 30402 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 30403 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 30404 autoplay: false, 30405 autoplaySpeed: 3000, 30406 centerMode: false, 30407 centerPadding: '50px', 30408 cssEase: 'ease', 30409 customPaging: function(slider, i) { 30410 return $('<button type="button" />').text(i + 1); 30411 }, 30412 dots: false, 30413 dotsClass: 'slick-dots', 30414 draggable: true, 30415 easing: 'linear', 30416 edgeFriction: 0.35, 30417 fade: false, 30418 focusOnSelect: false, 30419 focusOnChange: false, 30420 infinite: true, 30421 initialSlide: 0, 30422 lazyLoad: 'ondemand', 30423 mobileFirst: false, 30424 pauseOnHover: true, 30425 pauseOnFocus: true, 30426 pauseOnDotsHover: false, 30427 respondTo: 'window', 30428 responsive: null, 30429 rows: 1, 30430 rtl: false, 30431 slide: '', 30432 slidesPerRow: 1, 30433 slidesToShow: 1, 30434 slidesToScroll: 1, 30435 speed: 500, 30436 swipe: true, 30437 swipeToSlide: false, 30438 touchMove: true, 30439 touchThreshold: 5, 30440 useCSS: true, 30441 useTransform: true, 30442 variableWidth: false, 30443 vertical: false, 30444 verticalSwiping: false, 30445 waitForAnimate: true, 30446 zIndex: 1000 30447 }; 30448 30449 _.initials = { 30450 animating: false, 30451 dragging: false, 30452 autoPlayTimer: null, 30453 currentDirection: 0, 30454 currentLeft: null, 30455 currentSlide: 0, 30456 direction: 1, 30457 $dots: null, 30458 listWidth: null, 30459 listHeight: null, 30460 loadIndex: 0, 30461 $nextArrow: null, 30462 $prevArrow: null, 30463 scrolling: false, 30464 slideCount: null, 30465 slideWidth: null, 30466 $slideTrack: null, 30467 $slides: null, 30468 sliding: false, 30469 slideOffset: 0, 30470 swipeLeft: null, 30471 swiping: false, 30472 $list: null, 30473 touchObject: {}, 30474 transformsEnabled: false, 30475 unslicked: false 30476 }; 30477 30478 $.extend(_, _.initials); 30479 30480 _.activeBreakpoint = null; 30481 _.animType = null; 30482 _.animProp = null; 30483 _.breakpoints = []; 30484 _.breakpointSettings = []; 30485 _.cssTransitions = false; 30486 _.focussed = false; 30487 _.interrupted = false; 30488 _.hidden = 'hidden'; 30489 _.paused = true; 30490 _.positionProp = null; 30491 _.respondTo = null; 30492 _.rowCount = 1; 30493 _.shouldClick = true; 30494 _.$slider = $(element); 30495 _.$slidesCache = null; 30496 _.transformType = null; 30497 _.transitionType = null; 30498 _.visibilityChange = 'visibilitychange'; 30499 _.windowWidth = 0; 30500 _.windowTimer = null; 30501 30502 dataSettings = $(element).data('slick') || {}; 30503 30504 _.options = $.extend({}, _.defaults, settings, dataSettings); 30505 30506 _.currentSlide = _.options.initialSlide; 30507 30508 _.originalSettings = _.options; 30509 30510 if (typeof document.mozHidden !== 'undefined') { 30511 _.hidden = 'mozHidden'; 30512 _.visibilityChange = 'mozvisibilitychange'; 30513 } else if (typeof document.webkitHidden !== 'undefined') { 30514 _.hidden = 'webkitHidden'; 30515 _.visibilityChange = 'webkitvisibilitychange'; 30516 } 30517 30518 _.autoPlay = $.proxy(_.autoPlay, _); 30519 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 30520 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 30521 _.changeSlide = $.proxy(_.changeSlide, _); 30522 _.clickHandler = $.proxy(_.clickHandler, _); 30523 _.selectHandler = $.proxy(_.selectHandler, _); 30524 _.setPosition = $.proxy(_.setPosition, _); 30525 _.swipeHandler = $.proxy(_.swipeHandler, _); 30526 _.dragHandler = $.proxy(_.dragHandler, _); 30527 _.keyHandler = $.proxy(_.keyHandler, _); 30528 30529 _.instanceUid = instanceUid++; 30530 30531 // A simple way to check for HTML strings 30532 // Strict HTML recognition (must start with <) 30533 // Extracted from jQuery v1.11 source 30534 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 30535 30536 30537 _.registerBreakpoints(); 30538 _.init(true); 30539 30540 } 30541 30542 return Slick; 30543 30544 }()); 30545 30546 Slick.prototype.activateADA = function() { 30547 var _ = this; 30548 30549 _.$slideTrack.find('.slick-active').attr({ 30550 'aria-hidden': 'false' 30551 }).find('a, input, button, select').attr({ 30552 'tabindex': '0' 30553 }); 30554 30555 }; 30556 30557 Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { 30558 30559 var _ = this; 30560 30561 if (typeof(index) === 'boolean') { 30562 addBefore = index; 30563 index = null; 30564 } else if (index < 0 || (index >= _.slideCount)) { 30565 return false; 30566 } 30567 30568 _.unload(); 30569 30570 if (typeof(index) === 'number') { 30571 if (index === 0 && _.$slides.length === 0) { 30572 $(markup).appendTo(_.$slideTrack); 30573 } else if (addBefore) { 30574 $(markup).insertBefore(_.$slides.eq(index)); 30575 } else { 30576 $(markup).insertAfter(_.$slides.eq(index)); 30577 } 30578 } else { 30579 if (addBefore === true) { 30580 $(markup).prependTo(_.$slideTrack); 30581 } else { 30582 $(markup).appendTo(_.$slideTrack); 30583 } 30584 } 30585 30586 _.$slides = _.$slideTrack.children(this.options.slide); 30587 30588 _.$slideTrack.children(this.options.slide).detach(); 30589 30590 _.$slideTrack.append(_.$slides); 30591 30592 _.$slides.each(function(index, element) { 30593 $(element).attr('data-slick-index', index); 30594 }); 30595 30596 _.$slidesCache = _.$slides; 30597 30598 _.reinit(); 30599 30600 }; 30601 30602 Slick.prototype.animateHeight = function() { 30603 var _ = this; 30604 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 30605 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 30606 _.$list.animate({ 30607 height: targetHeight 30608 }, _.options.speed); 30609 } 30610 }; 30611 30612 Slick.prototype.animateSlide = function(targetLeft, callback) { 30613 30614 var animProps = {}, 30615 _ = this; 30616 30617 _.animateHeight(); 30618 30619 if (_.options.rtl === true && _.options.vertical === false) { 30620 targetLeft = -targetLeft; 30621 } 30622 if (_.transformsEnabled === false) { 30623 if (_.options.vertical === false) { 30624 _.$slideTrack.animate({ 30625 left: targetLeft 30626 }, _.options.speed, _.options.easing, callback); 30627 } else { 30628 _.$slideTrack.animate({ 30629 top: targetLeft 30630 }, _.options.speed, _.options.easing, callback); 30631 } 30632 30633 } else { 30634 30635 if (_.cssTransitions === false) { 30636 if (_.options.rtl === true) { 30637 _.currentLeft = -(_.currentLeft); 30638 } 30639 $({ 30640 animStart: _.currentLeft 30641 }).animate({ 30642 animStart: targetLeft 30643 }, { 30644 duration: _.options.speed, 30645 easing: _.options.easing, 30646 step: function(now) { 30647 now = Math.ceil(now); 30648 if (_.options.vertical === false) { 30649 animProps[_.animType] = 'translate(' + 30650 now + 'px, 0px)'; 30651 _.$slideTrack.css(animProps); 30652 } else { 30653 animProps[_.animType] = 'translate(0px,' + 30654 now + 'px)'; 30655 _.$slideTrack.css(animProps); 30656 } 30657 }, 30658 complete: function() { 30659 if (callback) { 30660 callback.call(); 30661 } 30662 } 30663 }); 30664 30665 } else { 30666 30667 _.applyTransition(); 30668 targetLeft = Math.ceil(targetLeft); 30669 30670 if (_.options.vertical === false) { 30671 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 30672 } else { 30673 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 30674 } 30675 _.$slideTrack.css(animProps); 30676 30677 if (callback) { 30678 setTimeout(function() { 30679 30680 _.disableTransition(); 30681 30682 callback.call(); 30683 }, _.options.speed); 30684 } 30685 30686 } 30687 30688 } 30689 30690 }; 30691 30692 Slick.prototype.getNavTarget = function() { 30693 30694 var _ = this, 30695 asNavFor = _.options.asNavFor; 30696 30697 if ( asNavFor && asNavFor !== null ) { 30698 asNavFor = $(asNavFor).not(_.$slider); 30699 } 30700 30701 return asNavFor; 30702 30703 }; 30704 30705 Slick.prototype.asNavFor = function(index) { 30706 30707 var _ = this, 30708 asNavFor = _.getNavTarget(); 30709 30710 if ( asNavFor !== null && typeof asNavFor === 'object' ) { 30711 asNavFor.each(function() { 30712 var target = $(this).slick('getSlick'); 30713 if(!target.unslicked) { 30714 target.slideHandler(index, true); 30715 } 30716 }); 30717 } 30718 30719 }; 30720 30721 Slick.prototype.applyTransition = function(slide) { 30722 30723 var _ = this, 30724 transition = {}; 30725 30726 if (_.options.fade === false) { 30727 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 30728 } else { 30729 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 30730 } 30731 30732 if (_.options.fade === false) { 30733 _.$slideTrack.css(transition); 30734 } else { 30735 _.$slides.eq(slide).css(transition); 30736 } 30737 30738 }; 30739 30740 Slick.prototype.autoPlay = function() { 30741 30742 var _ = this; 30743 30744 _.autoPlayClear(); 30745 30746 if ( _.slideCount > _.options.slidesToShow ) { 30747 _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed ); 30748 } 30749 30750 }; 30751 30752 Slick.prototype.autoPlayClear = function() { 30753 30754 var _ = this; 30755 30756 if (_.autoPlayTimer) { 30757 clearInterval(_.autoPlayTimer); 30758 } 30759 30760 }; 30761 30762 Slick.prototype.autoPlayIterator = function() { 30763 30764 var _ = this, 30765 slideTo = _.currentSlide + _.options.slidesToScroll; 30766 30767 if ( !_.paused && !_.interrupted && !_.focussed ) { 30768 30769 if ( _.options.infinite === false ) { 30770 30771 if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) { 30772 _.direction = 0; 30773 } 30774 30775 else if ( _.direction === 0 ) { 30776 30777 slideTo = _.currentSlide - _.options.slidesToScroll; 30778 30779 if ( _.currentSlide - 1 === 0 ) { 30780 _.direction = 1; 30781 } 30782 30783 } 30784 30785 } 30786 30787 _.slideHandler( slideTo ); 30788 30789 } 30790 30791 }; 30792 30793 Slick.prototype.buildArrows = function() { 30794 30795 var _ = this; 30796 30797 if (_.options.arrows === true ) { 30798 30799 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 30800 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 30801 30802 if( _.slideCount > _.options.slidesToShow ) { 30803 30804 _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 30805 _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 30806 30807 if (_.htmlExpr.test(_.options.prevArrow)) { 30808 _.$prevArrow.prependTo(_.options.appendArrows); 30809 } 30810 30811 if (_.htmlExpr.test(_.options.nextArrow)) { 30812 _.$nextArrow.appendTo(_.options.appendArrows); 30813 } 30814 30815 if (_.options.infinite !== true) { 30816 _.$prevArrow 30817 .addClass('slick-disabled') 30818 .attr('aria-disabled', 'true'); 30819 } 30820 30821 } else { 30822 30823 _.$prevArrow.add( _.$nextArrow ) 30824 30825 .addClass('slick-hidden') 30826 .attr({ 30827 'aria-disabled': 'true', 30828 'tabindex': '-1' 30829 }); 30830 30831 } 30832 30833 } 30834 30835 }; 30836 30837 Slick.prototype.buildDots = function() { 30838 30839 var _ = this, 30840 i, dot; 30841 30842 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 30843 30844 _.$slider.addClass('slick-dotted'); 30845 30846 dot = $('<ul />').addClass(_.options.dotsClass); 30847 30848 for (i = 0; i <= _.getDotCount(); i += 1) { 30849 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 30850 } 30851 30852 _.$dots = dot.appendTo(_.options.appendDots); 30853 30854 _.$dots.find('li').first().addClass('slick-active'); 30855 30856 } 30857 30858 }; 30859 30860 Slick.prototype.buildOut = function() { 30861 30862 var _ = this; 30863 30864 _.$slides = 30865 _.$slider 30866 .children( _.options.slide + ':not(.slick-cloned)') 30867 .addClass('slick-slide'); 30868 30869 _.slideCount = _.$slides.length; 30870 30871 _.$slides.each(function(index, element) { 30872 $(element) 30873 .attr('data-slick-index', index) 30874 .data('originalStyling', $(element).attr('style') || ''); 30875 }); 30876 30877 _.$slider.addClass('slick-slider'); 30878 30879 _.$slideTrack = (_.slideCount === 0) ? 30880 $('<div class="slick-track"/>').appendTo(_.$slider) : 30881 _.$slides.wrapAll('<div class="slick-track"/>').parent(); 30882 30883 _.$list = _.$slideTrack.wrap( 30884 '<div class="slick-list"/>').parent(); 30885 _.$slideTrack.css('opacity', 0); 30886 30887 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 30888 _.options.slidesToScroll = 1; 30889 } 30890 30891 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 30892 30893 _.setupInfinite(); 30894 30895 _.buildArrows(); 30896 30897 _.buildDots(); 30898 30899 _.updateDots(); 30900 30901 30902 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 30903 30904 if (_.options.draggable === true) { 30905 _.$list.addClass('draggable'); 30906 } 30907 30908 }; 30909 30910 Slick.prototype.buildRows = function() { 30911 30912 var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; 30913 30914 newSlides = document.createDocumentFragment(); 30915 originalSlides = _.$slider.children(); 30916 30917 if(_.options.rows > 0) { 30918 30919 slidesPerSection = _.options.slidesPerRow * _.options.rows; 30920 numOfSlides = Math.ceil( 30921 originalSlides.length / slidesPerSection 30922 ); 30923 30924 for(a = 0; a < numOfSlides; a++){ 30925 var slide = document.createElement('div'); 30926 for(b = 0; b < _.options.rows; b++) { 30927 var row = document.createElement('div'); 30928 for(c = 0; c < _.options.slidesPerRow; c++) { 30929 var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); 30930 if (originalSlides.get(target)) { 30931 row.appendChild(originalSlides.get(target)); 30932 } 30933 } 30934 slide.appendChild(row); 30935 } 30936 newSlides.appendChild(slide); 30937 } 30938 30939 _.$slider.empty().append(newSlides); 30940 _.$slider.children().children().children() 30941 .css({ 30942 'width':(100 / _.options.slidesPerRow) + '%', 30943 'display': 'inline-block' 30944 }); 30945 30946 } 30947 30948 }; 30949 30950 Slick.prototype.checkResponsive = function(initial, forceUpdate) { 30951 30952 var _ = this, 30953 breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; 30954 var sliderWidth = _.$slider.width(); 30955 var windowWidth = window.innerWidth || $(window).width(); 30956 30957 if (_.respondTo === 'window') { 30958 respondToWidth = windowWidth; 30959 } else if (_.respondTo === 'slider') { 30960 respondToWidth = sliderWidth; 30961 } else if (_.respondTo === 'min') { 30962 respondToWidth = Math.min(windowWidth, sliderWidth); 30963 } 30964 30965 if ( _.options.responsive && 30966 _.options.responsive.length && 30967 _.options.responsive !== null) { 30968 30969 targetBreakpoint = null; 30970 30971 for (breakpoint in _.breakpoints) { 30972 if (_.breakpoints.hasOwnProperty(breakpoint)) { 30973 if (_.originalSettings.mobileFirst === false) { 30974 if (respondToWidth < _.breakpoints[breakpoint]) { 30975 targetBreakpoint = _.breakpoints[breakpoint]; 30976 } 30977 } else { 30978 if (respondToWidth > _.breakpoints[breakpoint]) { 30979 targetBreakpoint = _.breakpoints[breakpoint]; 30980 } 30981 } 30982 } 30983 } 30984 30985 if (targetBreakpoint !== null) { 30986 if (_.activeBreakpoint !== null) { 30987 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 30988 _.activeBreakpoint = 30989 targetBreakpoint; 30990 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 30991 _.unslick(targetBreakpoint); 30992 } else { 30993 _.options = $.extend({}, _.originalSettings, 30994 _.breakpointSettings[ 30995 targetBreakpoint]); 30996 if (initial === true) { 30997 _.currentSlide = _.options.initialSlide; 30998 } 30999 _.refresh(initial); 31000 } 31001 triggerBreakpoint = targetBreakpoint; 31002 } 31003 } else { 31004 _.activeBreakpoint = targetBreakpoint; 31005 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 31006 _.unslick(targetBreakpoint); 31007 } else { 31008 _.options = $.extend({}, _.originalSettings, 31009 _.breakpointSettings[ 31010 targetBreakpoint]); 31011 if (initial === true) { 31012 _.currentSlide = _.options.initialSlide; 31013 } 31014 _.refresh(initial); 31015 } 31016 triggerBreakpoint = targetBreakpoint; 31017 } 31018 } else { 31019 if (_.activeBreakpoint !== null) { 31020 _.activeBreakpoint = null; 31021 _.options = _.originalSettings; 31022 if (initial === true) { 31023 _.currentSlide = _.options.initialSlide; 31024 } 31025 _.refresh(initial); 31026 triggerBreakpoint = targetBreakpoint; 31027 } 31028 } 31029 31030 // only trigger breakpoints during an actual break. not on initialize. 31031 if( !initial && triggerBreakpoint !== false ) { 31032 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 31033 } 31034 } 31035 31036 }; 31037 31038 Slick.prototype.changeSlide = function(event, dontAnimate) { 31039 31040 var _ = this, 31041 $target = $(event.currentTarget), 31042 indexOffset, slideOffset, unevenOffset; 31043 31044 // If target is a link, prevent default action. 31045 if($target.is('a')) { 31046 event.preventDefault(); 31047 } 31048 31049 // If target is not the <li> element (ie: a child), find the <li>. 31050 if(!$target.is('li')) { 31051 $target = $target.closest('li'); 31052 } 31053 31054 unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0); 31055 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 31056 31057 switch (event.data.message) { 31058 31059 case 'previous': 31060 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 31061 if (_.slideCount > _.options.slidesToShow) { 31062 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 31063 } 31064 break; 31065 31066 case 'next': 31067 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 31068 if (_.slideCount > _.options.slidesToShow) { 31069 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 31070 } 31071 break; 31072 31073 case 'index': 31074 var index = event.data.index === 0 ? 0 : 31075 event.data.index || $target.index() * _.options.slidesToScroll; 31076 31077 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 31078 $target.children().trigger('focus'); 31079 break; 31080 31081 default: 31082 return; 31083 } 31084 31085 }; 31086 31087 Slick.prototype.checkNavigable = function(index) { 31088 31089 var _ = this, 31090 navigables, prevNavigable; 31091 31092 navigables = _.getNavigableIndexes(); 31093 prevNavigable = 0; 31094 if (index > navigables[navigables.length - 1]) { 31095 index = navigables[navigables.length - 1]; 31096 } else { 31097 for (var n in navigables) { 31098 if (index < navigables[n]) { 31099 index = prevNavigable; 31100 break; 31101 } 31102 prevNavigable = navigables[n]; 31103 } 31104 } 31105 31106 return index; 31107 }; 31108 31109 Slick.prototype.cleanUpEvents = function() { 31110 31111 var _ = this; 31112 31113 if (_.options.dots && _.$dots !== null) { 31114 31115 $('li', _.$dots) 31116 .off('click.slick', _.changeSlide) 31117 .off('mouseenter.slick', $.proxy(_.interrupt, _, true)) 31118 .off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 31119 31120 if (_.options.accessibility === true) { 31121 _.$dots.off('keydown.slick', _.keyHandler); 31122 } 31123 } 31124 31125 _.$slider.off('focus.slick blur.slick'); 31126 31127 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 31128 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 31129 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 31130 31131 if (_.options.accessibility === true) { 31132 _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler); 31133 _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler); 31134 } 31135 } 31136 31137 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 31138 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 31139 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); 31140 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 31141 31142 _.$list.off('click.slick', _.clickHandler); 31143 31144 $(document).off(_.visibilityChange, _.visibility); 31145 31146 _.cleanUpSlideEvents(); 31147 31148 if (_.options.accessibility === true) { 31149 _.$list.off('keydown.slick', _.keyHandler); 31150 } 31151 31152 if (_.options.focusOnSelect === true) { 31153 $(_.$slideTrack).children().off('click.slick', _.selectHandler); 31154 } 31155 31156 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 31157 31158 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 31159 31160 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 31161 31162 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 31163 31164 }; 31165 31166 Slick.prototype.cleanUpSlideEvents = function() { 31167 31168 var _ = this; 31169 31170 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 31171 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 31172 31173 }; 31174 31175 Slick.prototype.cleanUpRows = function() { 31176 31177 var _ = this, originalSlides; 31178 31179 if(_.options.rows > 0) { 31180 originalSlides = _.$slides.children().children(); 31181 originalSlides.removeAttr('style'); 31182 _.$slider.empty().append(originalSlides); 31183 } 31184 31185 }; 31186 31187 Slick.prototype.clickHandler = function(event) { 31188 31189 var _ = this; 31190 31191 if (_.shouldClick === false) { 31192 event.stopImmediatePropagation(); 31193 event.stopPropagation(); 31194 event.preventDefault(); 31195 } 31196 31197 }; 31198 31199 Slick.prototype.destroy = function(refresh) { 31200 31201 var _ = this; 31202 31203 _.autoPlayClear(); 31204 31205 _.touchObject = {}; 31206 31207 _.cleanUpEvents(); 31208 31209 $('.slick-cloned', _.$slider).detach(); 31210 31211 if (_.$dots) { 31212 _.$dots.remove(); 31213 } 31214 31215 if ( _.$prevArrow && _.$prevArrow.length ) { 31216 31217 _.$prevArrow 31218 .removeClass('slick-disabled slick-arrow slick-hidden') 31219 .removeAttr('aria-hidden aria-disabled tabindex') 31220 .css('display',''); 31221 31222 if ( _.htmlExpr.test( _.options.prevArrow )) { 31223 _.$prevArrow.remove(); 31224 } 31225 } 31226 31227 if ( _.$nextArrow && _.$nextArrow.length ) { 31228 31229 _.$nextArrow 31230 .removeClass('slick-disabled slick-arrow slick-hidden') 31231 .removeAttr('aria-hidden aria-disabled tabindex') 31232 .css('display',''); 31233 31234 if ( _.htmlExpr.test( _.options.nextArrow )) { 31235 _.$nextArrow.remove(); 31236 } 31237 } 31238 31239 31240 if (_.$slides) { 31241 31242 _.$slides 31243 .removeClass('slick-slide slick-active slick-center slick-visible slick-current') 31244 .removeAttr('aria-hidden') 31245 .removeAttr('data-slick-index') 31246 .each(function(){ 31247 $(this).attr('style', $(this).data('originalStyling')); 31248 }); 31249 31250 _.$slideTrack.children(this.options.slide).detach(); 31251 31252 _.$slideTrack.detach(); 31253 31254 _.$list.detach(); 31255 31256 _.$slider.append(_.$slides); 31257 } 31258 31259 _.cleanUpRows(); 31260 31261 _.$slider.removeClass('slick-slider'); 31262 _.$slider.removeClass('slick-initialized'); 31263 _.$slider.removeClass('slick-dotted'); 31264 31265 _.unslicked = true; 31266 31267 if(!refresh) { 31268 _.$slider.trigger('destroy', [_]); 31269 } 31270 31271 }; 31272 31273 Slick.prototype.disableTransition = function(slide) { 31274 31275 var _ = this, 31276 transition = {}; 31277 31278 transition[_.transitionType] = ''; 31279 31280 if (_.options.fade === false) { 31281 _.$slideTrack.css(transition); 31282 } else { 31283 _.$slides.eq(slide).css(transition); 31284 } 31285 31286 }; 31287 31288 Slick.prototype.fadeSlide = function(slideIndex, callback) { 31289 31290 var _ = this; 31291 31292 if (_.cssTransitions === false) { 31293 31294 _.$slides.eq(slideIndex).css({ 31295 zIndex: _.options.zIndex 31296 }); 31297 31298 _.$slides.eq(slideIndex).animate({ 31299 opacity: 1 31300 }, _.options.speed, _.options.easing, callback); 31301 31302 } else { 31303 31304 _.applyTransition(slideIndex); 31305 31306 _.$slides.eq(slideIndex).css({ 31307 opacity: 1, 31308 zIndex: _.options.zIndex 31309 }); 31310 31311 if (callback) { 31312 setTimeout(function() { 31313 31314 _.disableTransition(slideIndex); 31315 31316 callback.call(); 31317 }, _.options.speed); 31318 } 31319 31320 } 31321 31322 }; 31323 31324 Slick.prototype.fadeSlideOut = function(slideIndex) { 31325 31326 var _ = this; 31327 31328 if (_.cssTransitions === false) { 31329 31330 _.$slides.eq(slideIndex).animate({ 31331 opacity: 0, 31332 zIndex: _.options.zIndex - 2 31333 }, _.options.speed, _.options.easing); 31334 31335 } else { 31336 31337 _.applyTransition(slideIndex); 31338 31339 _.$slides.eq(slideIndex).css({ 31340 opacity: 0, 31341 zIndex: _.options.zIndex - 2 31342 }); 31343 31344 } 31345 31346 }; 31347 31348 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { 31349 31350 var _ = this; 31351 31352 if (filter !== null) { 31353 31354 _.$slidesCache = _.$slides; 31355 31356 _.unload(); 31357 31358 _.$slideTrack.children(this.options.slide).detach(); 31359 31360 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 31361 31362 _.reinit(); 31363 31364 } 31365 31366 }; 31367 31368 Slick.prototype.focusHandler = function() { 31369 31370 var _ = this; 31371 31372 _.$slider 31373 .off('focus.slick blur.slick') 31374 .on('focus.slick blur.slick', '*', function(event) { 31375 31376 event.stopImmediatePropagation(); 31377 var $sf = $(this); 31378 31379 setTimeout(function() { 31380 31381 if( _.options.pauseOnFocus ) { 31382 _.focussed = $sf.is(':focus'); 31383 _.autoPlay(); 31384 } 31385 31386 }, 0); 31387 31388 }); 31389 }; 31390 31391 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { 31392 31393 var _ = this; 31394 return _.currentSlide; 31395 31396 }; 31397 31398 Slick.prototype.getDotCount = function() { 31399 31400 var _ = this; 31401 31402 var breakPoint = 0; 31403 var counter = 0; 31404 var pagerQty = 0; 31405 31406 if (_.options.infinite === true) { 31407 if (_.slideCount <= _.options.slidesToShow) { 31408 ++pagerQty; 31409 } else { 31410 while (breakPoint < _.slideCount) { 31411 ++pagerQty; 31412 breakPoint = counter + _.options.slidesToScroll; 31413 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 31414 } 31415 } 31416 } else if (_.options.centerMode === true) { 31417 pagerQty = _.slideCount; 31418 } else if(!_.options.asNavFor) { 31419 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 31420 }else { 31421 while (breakPoint < _.slideCount) { 31422 ++pagerQty; 31423 breakPoint = counter + _.options.slidesToScroll; 31424 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 31425 } 31426 } 31427 31428 return pagerQty - 1; 31429 31430 }; 31431 31432 Slick.prototype.getLeft = function(slideIndex) { 31433 31434 var _ = this, 31435 targetLeft, 31436 verticalHeight, 31437 verticalOffset = 0, 31438 targetSlide, 31439 coef; 31440 31441 _.slideOffset = 0; 31442 verticalHeight = _.$slides.first().outerHeight(true); 31443 31444 if (_.options.infinite === true) { 31445 if (_.slideCount > _.options.slidesToShow) { 31446 _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1; 31447 coef = -1 31448 31449 if (_.options.vertical === true && _.options.centerMode === true) { 31450 if (_.options.slidesToShow === 2) { 31451 coef = -1.5; 31452 } else if (_.options.slidesToShow === 1) { 31453 coef = -2 31454 } 31455 } 31456 verticalOffset = (verticalHeight * _.options.slidesToShow) * coef; 31457 } 31458 if (_.slideCount % _.options.slidesToScroll !== 0) { 31459 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 31460 if (slideIndex > _.slideCount) { 31461 _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1; 31462 verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; 31463 } else { 31464 _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1; 31465 verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1; 31466 } 31467 } 31468 } 31469 } else { 31470 if (slideIndex + _.options.slidesToShow > _.slideCount) { 31471 _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; 31472 verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; 31473 } 31474 } 31475 31476 if (_.slideCount <= _.options.slidesToShow) { 31477 _.slideOffset = 0; 31478 verticalOffset = 0; 31479 } 31480 31481 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 31482 _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2); 31483 } else if (_.options.centerMode === true && _.options.infinite === true) { 31484 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 31485 } else if (_.options.centerMode === true) { 31486 _.slideOffset = 0; 31487 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 31488 } 31489 31490 if (_.options.vertical === false) { 31491 targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset; 31492 } else { 31493 targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset; 31494 } 31495 31496 if (_.options.variableWidth === true) { 31497 31498 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 31499 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 31500 } else { 31501 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 31502 } 31503 31504 if (_.options.rtl === true) { 31505 if (targetSlide[0]) { 31506 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 31507 } else { 31508 targetLeft = 0; 31509 } 31510 } else { 31511 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 31512 } 31513 31514 if (_.options.centerMode === true) { 31515 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 31516 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 31517 } else { 31518 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 31519 } 31520 31521 if (_.options.rtl === true) { 31522 if (targetSlide[0]) { 31523 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 31524 } else { 31525 targetLeft = 0; 31526 } 31527 } else { 31528 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 31529 } 31530 31531 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 31532 } 31533 } 31534 31535 return targetLeft; 31536 31537 }; 31538 31539 Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) { 31540 31541 var _ = this; 31542 31543 return _.options[option]; 31544 31545 }; 31546 31547 Slick.prototype.getNavigableIndexes = function() { 31548 31549 var _ = this, 31550 breakPoint = 0, 31551 counter = 0, 31552 indexes = [], 31553 max; 31554 31555 if (_.options.infinite === false) { 31556 max = _.slideCount; 31557 } else { 31558 breakPoint = _.options.slidesToScroll * -1; 31559 counter = _.options.slidesToScroll * -1; 31560 max = _.slideCount * 2; 31561 } 31562 31563 while (breakPoint < max) { 31564 indexes.push(breakPoint); 31565 breakPoint = counter + _.options.slidesToScroll; 31566 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 31567 } 31568 31569 return indexes; 31570 31571 }; 31572 31573 Slick.prototype.getSlick = function() { 31574 31575 return this; 31576 31577 }; 31578 31579 Slick.prototype.getSlideCount = function() { 31580 31581 var _ = this, 31582 slidesTraversed, swipedSlide, centerOffset; 31583 31584 centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0; 31585 31586 if (_.options.swipeToSlide === true) { 31587 _.$slideTrack.find('.slick-slide').each(function(index, slide) { 31588 if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) { 31589 swipedSlide = slide; 31590 return false; 31591 } 31592 }); 31593 31594 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 31595 31596 return slidesTraversed; 31597 31598 } else { 31599 return _.options.slidesToScroll; 31600 } 31601 31602 }; 31603 31604 Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) { 31605 31606 var _ = this; 31607 31608 _.changeSlide({ 31609 data: { 31610 message: 'index', 31611 index: parseInt(slide) 31612 } 31613 }, dontAnimate); 31614 31615 }; 31616 31617 Slick.prototype.init = function(creation) { 31618 31619 var _ = this; 31620 31621 if (!$(_.$slider).hasClass('slick-initialized')) { 31622 31623 $(_.$slider).addClass('slick-initialized'); 31624 31625 _.buildRows(); 31626 _.buildOut(); 31627 _.setProps(); 31628 _.startLoad(); 31629 _.loadSlider(); 31630 _.initializeEvents(); 31631 _.updateArrows(); 31632 _.updateDots(); 31633 _.checkResponsive(true); 31634 _.focusHandler(); 31635 31636 } 31637 31638 if (creation) { 31639 _.$slider.trigger('init', [_]); 31640 } 31641 31642 if (_.options.accessibility === true) { 31643 _.initADA(); 31644 } 31645 31646 if ( _.options.autoplay ) { 31647 31648 _.paused = false; 31649 _.autoPlay(); 31650 31651 } 31652 31653 }; 31654 31655 Slick.prototype.initADA = function() { 31656 var _ = this, 31657 numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow), 31658 tabControlIndexes = _.getNavigableIndexes().filter(function(val) { 31659 return (val >= 0) && (val < _.slideCount); 31660 }); 31661 31662 _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 31663 'aria-hidden': 'true', 31664 'tabindex': '-1' 31665 }).find('a, input, button, select').attr({ 31666 'tabindex': '-1' 31667 }); 31668 31669 if (_.$dots !== null) { 31670 _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) { 31671 var slideControlIndex = tabControlIndexes.indexOf(i); 31672 31673 $(this).attr({ 31674 'role': 'tabpanel', 31675 'id': 'slick-slide' + _.instanceUid + i, 31676 'tabindex': -1 31677 }); 31678 31679 if (slideControlIndex !== -1) { 31680 var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex 31681 if ($('#' + ariaButtonControl).length) { 31682 $(this).attr({ 31683 'aria-describedby': ariaButtonControl 31684 }); 31685 } 31686 } 31687 }); 31688 31689 _.$dots.attr('role', 'tablist').find('li').each(function(i) { 31690 var mappedSlideIndex = tabControlIndexes[i]; 31691 31692 $(this).attr({ 31693 'role': 'presentation' 31694 }); 31695 31696 $(this).find('button').first().attr({ 31697 'role': 'tab', 31698 'id': 'slick-slide-control' + _.instanceUid + i, 31699 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex, 31700 'aria-label': (i + 1) + ' of ' + numDotGroups, 31701 'aria-selected': null, 31702 'tabindex': '-1' 31703 }); 31704 31705 }).eq(_.currentSlide).find('button').attr({ 31706 'aria-selected': 'true', 31707 'tabindex': '0' 31708 }).end(); 31709 } 31710 31711 for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) { 31712 if (_.options.focusOnChange) { 31713 _.$slides.eq(i).attr({'tabindex': '0'}); 31714 } else { 31715 _.$slides.eq(i).removeAttr('tabindex'); 31716 } 31717 } 31718 31719 _.activateADA(); 31720 31721 }; 31722 31723 Slick.prototype.initArrowEvents = function() { 31724 31725 var _ = this; 31726 31727 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 31728 _.$prevArrow 31729 .off('click.slick') 31730 .on('click.slick', { 31731 message: 'previous' 31732 }, _.changeSlide); 31733 _.$nextArrow 31734 .off('click.slick') 31735 .on('click.slick', { 31736 message: 'next' 31737 }, _.changeSlide); 31738 31739 if (_.options.accessibility === true) { 31740 _.$prevArrow.on('keydown.slick', _.keyHandler); 31741 _.$nextArrow.on('keydown.slick', _.keyHandler); 31742 } 31743 } 31744 31745 }; 31746 31747 Slick.prototype.initDotEvents = function() { 31748 31749 var _ = this; 31750 31751 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 31752 $('li', _.$dots).on('click.slick', { 31753 message: 'index' 31754 }, _.changeSlide); 31755 31756 if (_.options.accessibility === true) { 31757 _.$dots.on('keydown.slick', _.keyHandler); 31758 } 31759 } 31760 31761 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 31762 31763 $('li', _.$dots) 31764 .on('mouseenter.slick', $.proxy(_.interrupt, _, true)) 31765 .on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 31766 31767 } 31768 31769 }; 31770 31771 Slick.prototype.initSlideEvents = function() { 31772 31773 var _ = this; 31774 31775 if ( _.options.pauseOnHover ) { 31776 31777 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); 31778 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 31779 31780 } 31781 31782 }; 31783 31784 Slick.prototype.initializeEvents = function() { 31785 31786 var _ = this; 31787 31788 _.initArrowEvents(); 31789 31790 _.initDotEvents(); 31791 _.initSlideEvents(); 31792 31793 _.$list.on('touchstart.slick mousedown.slick', { 31794 action: 'start' 31795 }, _.swipeHandler); 31796 _.$list.on('touchmove.slick mousemove.slick', { 31797 action: 'move' 31798 }, _.swipeHandler); 31799 _.$list.on('touchend.slick mouseup.slick', { 31800 action: 'end' 31801 }, _.swipeHandler); 31802 _.$list.on('touchcancel.slick mouseleave.slick', { 31803 action: 'end' 31804 }, _.swipeHandler); 31805 31806 _.$list.on('click.slick', _.clickHandler); 31807 31808 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 31809 31810 if (_.options.accessibility === true) { 31811 _.$list.on('keydown.slick', _.keyHandler); 31812 } 31813 31814 if (_.options.focusOnSelect === true) { 31815 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 31816 } 31817 31818 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 31819 31820 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 31821 31822 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 31823 31824 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 31825 $(_.setPosition); 31826 31827 }; 31828 31829 Slick.prototype.initUI = function() { 31830 31831 var _ = this; 31832 31833 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 31834 31835 _.$prevArrow.show(); 31836 _.$nextArrow.show(); 31837 31838 } 31839 31840 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 31841 31842 _.$dots.show(); 31843 31844 } 31845 31846 }; 31847 31848 Slick.prototype.keyHandler = function(event) { 31849 31850 var _ = this; 31851 //Dont slide if the cursor is inside the form fields and arrow keys are pressed 31852 if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { 31853 if (event.keyCode === 37 && _.options.accessibility === true) { 31854 _.changeSlide({ 31855 data: { 31856 message: _.options.rtl === true ? 'next' : 'previous' 31857 } 31858 }); 31859 } else if (event.keyCode === 39 && _.options.accessibility === true) { 31860 _.changeSlide({ 31861 data: { 31862 message: _.options.rtl === true ? 'previous' : 'next' 31863 } 31864 }); 31865 } 31866 } 31867 31868 }; 31869 31870 Slick.prototype.lazyLoad = function() { 31871 31872 var _ = this, 31873 loadRange, cloneRange, rangeStart, rangeEnd; 31874 31875 function loadImages(imagesScope) { 31876 31877 $('img[data-lazy]', imagesScope).each(function() { 31878 31879 var image = $(this), 31880 imageSource = $(this).attr('data-lazy'), 31881 imageSrcSet = $(this).attr('data-srcset'), 31882 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 31883 imageToLoad = document.createElement('img'); 31884 31885 imageToLoad.onload = function() { 31886 31887 image 31888 .animate({ opacity: 0 }, 100, function() { 31889 31890 if (imageSrcSet) { 31891 image 31892 .attr('srcset', imageSrcSet ); 31893 31894 if (imageSizes) { 31895 image 31896 .attr('sizes', imageSizes ); 31897 } 31898 } 31899 31900 image 31901 .attr('src', imageSource) 31902 .animate({ opacity: 1 }, 200, function() { 31903 image 31904 .removeAttr('data-lazy data-srcset data-sizes') 31905 .removeClass('slick-loading'); 31906 }); 31907 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 31908 }); 31909 31910 }; 31911 31912 imageToLoad.onerror = function() { 31913 31914 image 31915 .removeAttr( 'data-lazy' ) 31916 .removeClass( 'slick-loading' ) 31917 .addClass( 'slick-lazyload-error' ); 31918 31919 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 31920 31921 }; 31922 31923 imageToLoad.src = imageSource; 31924 31925 }); 31926 31927 } 31928 31929 if (_.options.centerMode === true) { 31930 if (_.options.infinite === true) { 31931 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 31932 rangeEnd = rangeStart + _.options.slidesToShow + 2; 31933 } else { 31934 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 31935 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 31936 } 31937 } else { 31938 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 31939 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 31940 if (_.options.fade === true) { 31941 if (rangeStart > 0) rangeStart--; 31942 if (rangeEnd <= _.slideCount) rangeEnd++; 31943 } 31944 } 31945 31946 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 31947 31948 if (_.options.lazyLoad === 'anticipated') { 31949 var prevSlide = rangeStart - 1, 31950 nextSlide = rangeEnd, 31951 $slides = _.$slider.find('.slick-slide'); 31952 31953 for (var i = 0; i < _.options.slidesToScroll; i++) { 31954 if (prevSlide < 0) prevSlide = _.slideCount - 1; 31955 loadRange = loadRange.add($slides.eq(prevSlide)); 31956 loadRange = loadRange.add($slides.eq(nextSlide)); 31957 prevSlide--; 31958 nextSlide++; 31959 } 31960 } 31961 31962 loadImages(loadRange); 31963 31964 if (_.slideCount <= _.options.slidesToShow) { 31965 cloneRange = _.$slider.find('.slick-slide'); 31966 loadImages(cloneRange); 31967 } else 31968 if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 31969 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 31970 loadImages(cloneRange); 31971 } else if (_.currentSlide === 0) { 31972 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 31973 loadImages(cloneRange); 31974 } 31975 31976 }; 31977 31978 Slick.prototype.loadSlider = function() { 31979 31980 var _ = this; 31981 31982 _.setPosition(); 31983 31984 _.$slideTrack.css({ 31985 opacity: 1 31986 }); 31987 31988 _.$slider.removeClass('slick-loading'); 31989 31990 _.initUI(); 31991 31992 if (_.options.lazyLoad === 'progressive') { 31993 _.progressiveLazyLoad(); 31994 } 31995 31996 }; 31997 31998 Slick.prototype.next = Slick.prototype.slickNext = function() { 31999 32000 var _ = this; 32001 32002 _.changeSlide({ 32003 data: { 32004 message: 'next' 32005 } 32006 }); 32007 32008 }; 32009 32010 Slick.prototype.orientationChange = function() { 32011 32012 var _ = this; 32013 32014 _.checkResponsive(); 32015 _.setPosition(); 32016 32017 }; 32018 32019 Slick.prototype.pause = Slick.prototype.slickPause = function() { 32020 32021 var _ = this; 32022 32023 _.autoPlayClear(); 32024 _.paused = true; 32025 32026 }; 32027 32028 Slick.prototype.play = Slick.prototype.slickPlay = function() { 32029 32030 var _ = this; 32031 32032 _.autoPlay(); 32033 _.options.autoplay = true; 32034 _.paused = false; 32035 _.focussed = false; 32036 _.interrupted = false; 32037 32038 }; 32039 32040 Slick.prototype.postSlide = function(index) { 32041 32042 var _ = this; 32043 32044 if( !_.unslicked ) { 32045 32046 _.$slider.trigger('afterChange', [_, index]); 32047 32048 _.animating = false; 32049 32050 if (_.slideCount > _.options.slidesToShow) { 32051 _.setPosition(); 32052 } 32053 32054 _.swipeLeft = null; 32055 32056 if ( _.options.autoplay ) { 32057 _.autoPlay(); 32058 } 32059 32060 if (_.options.accessibility === true) { 32061 _.initADA(); 32062 32063 if (_.options.focusOnChange) { 32064 var $currentSlide = $(_.$slides.get(_.currentSlide)); 32065 $currentSlide.attr('tabindex', 0).focus(); 32066 } 32067 } 32068 32069 } 32070 32071 }; 32072 32073 Slick.prototype.prev = Slick.prototype.slickPrev = function() { 32074 32075 var _ = this; 32076 32077 _.changeSlide({ 32078 data: { 32079 message: 'previous' 32080 } 32081 }); 32082 32083 }; 32084 32085 Slick.prototype.preventDefault = function(event) { 32086 32087 event.preventDefault(); 32088 32089 }; 32090 32091 Slick.prototype.progressiveLazyLoad = function( tryCount ) { 32092 32093 tryCount = tryCount || 1; 32094 32095 var _ = this, 32096 $imgsToLoad = $( 'img[data-lazy]', _.$slider ), 32097 image, 32098 imageSource, 32099 imageSrcSet, 32100 imageSizes, 32101 imageToLoad; 32102 32103 if ( $imgsToLoad.length ) { 32104 32105 image = $imgsToLoad.first(); 32106 imageSource = image.attr('data-lazy'); 32107 imageSrcSet = image.attr('data-srcset'); 32108 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 32109 imageToLoad = document.createElement('img'); 32110 32111 imageToLoad.onload = function() { 32112 32113 if (imageSrcSet) { 32114 image 32115 .attr('srcset', imageSrcSet ); 32116 32117 if (imageSizes) { 32118 image 32119 .attr('sizes', imageSizes ); 32120 } 32121 } 32122 32123 image 32124 .attr( 'src', imageSource ) 32125 .removeAttr('data-lazy data-srcset data-sizes') 32126 .removeClass('slick-loading'); 32127 32128 if ( _.options.adaptiveHeight === true ) { 32129 _.setPosition(); 32130 } 32131 32132 _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]); 32133 _.progressiveLazyLoad(); 32134 32135 }; 32136 32137 imageToLoad.onerror = function() { 32138 32139 if ( tryCount < 3 ) { 32140 32141 /** 32142 * try to load the image 3 times, 32143 * leave a slight delay so we don't get 32144 * servers blocking the request. 32145 */ 32146 setTimeout( function() { 32147 _.progressiveLazyLoad( tryCount + 1 ); 32148 }, 500 ); 32149 32150 } else { 32151 32152 image 32153 .removeAttr( 'data-lazy' ) 32154 .removeClass( 'slick-loading' ) 32155 .addClass( 'slick-lazyload-error' ); 32156 32157 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 32158 32159 _.progressiveLazyLoad(); 32160 32161 } 32162 32163 }; 32164 32165 imageToLoad.src = imageSource; 32166 32167 } else { 32168 32169 _.$slider.trigger('allImagesLoaded', [ _ ]); 32170 32171 } 32172 32173 }; 32174 32175 Slick.prototype.refresh = function( initializing ) { 32176 32177 var _ = this, currentSlide, lastVisibleIndex; 32178 32179 lastVisibleIndex = _.slideCount - _.options.slidesToShow; 32180 32181 // in non-infinite sliders, we don't want to go past the 32182 // last visible index. 32183 if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) { 32184 _.currentSlide = lastVisibleIndex; 32185 } 32186 32187 // if less slides than to show, go to start. 32188 if ( _.slideCount <= _.options.slidesToShow ) { 32189 _.currentSlide = 0; 32190 32191 } 32192 32193 currentSlide = _.currentSlide; 32194 32195 _.destroy(true); 32196 32197 $.extend(_, _.initials, { currentSlide: currentSlide }); 32198 32199 _.init(); 32200 32201 if( !initializing ) { 32202 32203 _.changeSlide({ 32204 data: { 32205 message: 'index', 32206 index: currentSlide 32207 } 32208 }, false); 32209 32210 } 32211 32212 }; 32213 32214 Slick.prototype.registerBreakpoints = function() { 32215 32216 var _ = this, breakpoint, currentBreakpoint, l, 32217 responsiveSettings = _.options.responsive || null; 32218 32219 if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) { 32220 32221 _.respondTo = _.options.respondTo || 'window'; 32222 32223 for ( breakpoint in responsiveSettings ) { 32224 32225 l = _.breakpoints.length-1; 32226 32227 if (responsiveSettings.hasOwnProperty(breakpoint)) { 32228 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; 32229 32230 // loop through the breakpoints and cut out any existing 32231 // ones with the same breakpoint number, we don't want dupes. 32232 while( l >= 0 ) { 32233 if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) { 32234 _.breakpoints.splice(l,1); 32235 } 32236 l--; 32237 } 32238 32239 _.breakpoints.push(currentBreakpoint); 32240 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 32241 32242 } 32243 32244 } 32245 32246 _.breakpoints.sort(function(a, b) { 32247 return ( _.options.mobileFirst ) ? a-b : b-a; 32248 }); 32249 32250 } 32251 32252 }; 32253 32254 Slick.prototype.reinit = function() { 32255 32256 var _ = this; 32257 32258 _.$slides = 32259 _.$slideTrack 32260 .children(_.options.slide) 32261 .addClass('slick-slide'); 32262 32263 _.slideCount = _.$slides.length; 32264 32265 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 32266 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 32267 } 32268 32269 if (_.slideCount <= _.options.slidesToShow) { 32270 _.currentSlide = 0; 32271 } 32272 32273 _.registerBreakpoints(); 32274 32275 _.setProps(); 32276 _.setupInfinite(); 32277 _.buildArrows(); 32278 _.updateArrows(); 32279 _.initArrowEvents(); 32280 _.buildDots(); 32281 _.updateDots(); 32282 _.initDotEvents(); 32283 _.cleanUpSlideEvents(); 32284 _.initSlideEvents(); 32285 32286 _.checkResponsive(false, true); 32287 32288 if (_.options.focusOnSelect === true) { 32289 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 32290 } 32291 32292 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 32293 32294 _.setPosition(); 32295 _.focusHandler(); 32296 32297 _.paused = !_.options.autoplay; 32298 _.autoPlay(); 32299 32300 _.$slider.trigger('reInit', [_]); 32301 32302 }; 32303 32304 Slick.prototype.resize = function() { 32305 32306 var _ = this; 32307 32308 if ($(window).width() !== _.windowWidth) { 32309 clearTimeout(_.windowDelay); 32310 _.windowDelay = window.setTimeout(function() { 32311 _.windowWidth = $(window).width(); 32312 _.checkResponsive(); 32313 if( !_.unslicked ) { _.setPosition(); } 32314 }, 50); 32315 } 32316 }; 32317 32318 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { 32319 32320 var _ = this; 32321 32322 if (typeof(index) === 'boolean') { 32323 removeBefore = index; 32324 index = removeBefore === true ? 0 : _.slideCount - 1; 32325 } else { 32326 index = removeBefore === true ? --index : index; 32327 } 32328 32329 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 32330 return false; 32331 } 32332 32333 _.unload(); 32334 32335 if (removeAll === true) { 32336 _.$slideTrack.children().remove(); 32337 } else { 32338 _.$slideTrack.children(this.options.slide).eq(index).remove(); 32339 } 32340 32341 _.$slides = _.$slideTrack.children(this.options.slide); 32342 32343 _.$slideTrack.children(this.options.slide).detach(); 32344 32345 _.$slideTrack.append(_.$slides); 32346 32347 _.$slidesCache = _.$slides; 32348 32349 _.reinit(); 32350 32351 }; 32352 32353 Slick.prototype.setCSS = function(position) { 32354 32355 var _ = this, 32356 positionProps = {}, 32357 x, y; 32358 32359 if (_.options.rtl === true) { 32360 position = -position; 32361 } 32362 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 32363 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 32364 32365 positionProps[_.positionProp] = position; 32366 32367 if (_.transformsEnabled === false) { 32368 _.$slideTrack.css(positionProps); 32369 } else { 32370 positionProps = {}; 32371 if (_.cssTransitions === false) { 32372 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 32373 _.$slideTrack.css(positionProps); 32374 } else { 32375 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 32376 _.$slideTrack.css(positionProps); 32377 } 32378 } 32379 32380 }; 32381 32382 Slick.prototype.setDimensions = function() { 32383 32384 var _ = this; 32385 32386 if (_.options.vertical === false) { 32387 if (_.options.centerMode === true) { 32388 _.$list.css({ 32389 padding: ('0px ' + _.options.centerPadding) 32390 }); 32391 } 32392 } else { 32393 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 32394 if (_.options.centerMode === true) { 32395 _.$list.css({ 32396 padding: (_.options.centerPadding + ' 0px') 32397 }); 32398 } 32399 } 32400 32401 _.listWidth = _.$list.width(); 32402 _.listHeight = _.$list.height(); 32403 32404 32405 if (_.options.vertical === false && _.options.variableWidth === false) { 32406 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 32407 _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); 32408 32409 } else if (_.options.variableWidth === true) { 32410 _.$slideTrack.width(5000 * _.slideCount); 32411 } else { 32412 _.slideWidth = Math.ceil(_.listWidth); 32413 _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); 32414 } 32415 32416 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 32417 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 32418 32419 }; 32420 32421 Slick.prototype.setFade = function() { 32422 32423 var _ = this, 32424 targetLeft; 32425 32426 _.$slides.each(function(index, element) { 32427 targetLeft = (_.slideWidth * index) * -1; 32428 if (_.options.rtl === true) { 32429 $(element).css({ 32430 position: 'relative', 32431 right: targetLeft, 32432 top: 0, 32433 zIndex: _.options.zIndex - 2, 32434 opacity: 0 32435 }); 32436 } else { 32437 $(element).css({ 32438 position: 'relative', 32439 left: targetLeft, 32440 top: 0, 32441 zIndex: _.options.zIndex - 2, 32442 opacity: 0 32443 }); 32444 } 32445 }); 32446 32447 _.$slides.eq(_.currentSlide).css({ 32448 zIndex: _.options.zIndex - 1, 32449 opacity: 1 32450 }); 32451 32452 }; 32453 32454 Slick.prototype.setHeight = function() { 32455 32456 var _ = this; 32457 32458 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 32459 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 32460 _.$list.css('height', targetHeight); 32461 } 32462 32463 }; 32464 32465 Slick.prototype.setOption = 32466 Slick.prototype.slickSetOption = function() { 32467 32468 /** 32469 * accepts arguments in format of: 32470 * 32471 * - for changing a single option's value: 32472 * .slick("setOption", option, value, refresh ) 32473 * 32474 * - for changing a set of responsive options: 32475 * .slick("setOption", 'responsive', [{}, ...], refresh ) 32476 * 32477 * - for updating multiple values at once (not responsive) 32478 * .slick("setOption", { 'option': value, ... }, refresh ) 32479 */ 32480 32481 var _ = this, l, item, option, value, refresh = false, type; 32482 32483 if( $.type( arguments[0] ) === 'object' ) { 32484 32485 option = arguments[0]; 32486 refresh = arguments[1]; 32487 type = 'multiple'; 32488 32489 } else if ( $.type( arguments[0] ) === 'string' ) { 32490 32491 option = arguments[0]; 32492 value = arguments[1]; 32493 refresh = arguments[2]; 32494 32495 if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) { 32496 32497 type = 'responsive'; 32498 32499 } else if ( typeof arguments[1] !== 'undefined' ) { 32500 32501 type = 'single'; 32502 32503 } 32504 32505 } 32506 32507 if ( type === 'single' ) { 32508 32509 _.options[option] = value; 32510 32511 32512 } else if ( type === 'multiple' ) { 32513 32514 $.each( option , function( opt, val ) { 32515 32516 _.options[opt] = val; 32517 32518 }); 32519 32520 32521 } else if ( type === 'responsive' ) { 32522 32523 for ( item in value ) { 32524 32525 if( $.type( _.options.responsive ) !== 'array' ) { 32526 32527 _.options.responsive = [ value[item] ]; 32528 32529 } else { 32530 32531 l = _.options.responsive.length-1; 32532 32533 // loop through the responsive object and splice out duplicates. 32534 while( l >= 0 ) { 32535 32536 if( _.options.responsive[l].breakpoint === value[item].breakpoint ) { 32537 32538 _.options.responsive.splice(l,1); 32539 32540 } 32541 32542 l--; 32543 32544 } 32545 32546 _.options.responsive.push( value[item] ); 32547 32548 } 32549 32550 } 32551 32552 } 32553 32554 if ( refresh ) { 32555 32556 _.unload(); 32557 _.reinit(); 32558 32559 } 32560 32561 }; 32562 32563 Slick.prototype.setPosition = function() { 32564 32565 var _ = this; 32566 32567 _.setDimensions(); 32568 32569 _.setHeight(); 32570 32571 if (_.options.fade === false) { 32572 _.setCSS(_.getLeft(_.currentSlide)); 32573 } else { 32574 _.setFade(); 32575 } 32576 32577 _.$slider.trigger('setPosition', [_]); 32578 32579 }; 32580 32581 Slick.prototype.setProps = function() { 32582 32583 var _ = this, 32584 bodyStyle = document.body.style; 32585 32586 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 32587 32588 if (_.positionProp === 'top') { 32589 _.$slider.addClass('slick-vertical'); 32590 } else { 32591 _.$slider.removeClass('slick-vertical'); 32592 } 32593 32594 if (bodyStyle.WebkitTransition !== undefined || 32595 bodyStyle.MozTransition !== undefined || 32596 bodyStyle.msTransition !== undefined) { 32597 if (_.options.useCSS === true) { 32598 _.cssTransitions = true; 32599 } 32600 } 32601 32602 if ( _.options.fade ) { 32603 if ( typeof _.options.zIndex === 'number' ) { 32604 if( _.options.zIndex < 3 ) { 32605 _.options.zIndex = 3; 32606 } 32607 } else { 32608 _.options.zIndex = _.defaults.zIndex; 32609 } 32610 } 32611 32612 if (bodyStyle.OTransform !== undefined) { 32613 _.animType = 'OTransform'; 32614 _.transformType = '-o-transform'; 32615 _.transitionType = 'OTransition'; 32616 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 32617 } 32618 if (bodyStyle.MozTransform !== undefined) { 32619 _.animType = 'MozTransform'; 32620 _.transformType = '-moz-transform'; 32621 _.transitionType = 'MozTransition'; 32622 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 32623 } 32624 if (bodyStyle.webkitTransform !== undefined) { 32625 _.animType = 'webkitTransform'; 32626 _.transformType = '-webkit-transform'; 32627 _.transitionType = 'webkitTransition'; 32628 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 32629 } 32630 if (bodyStyle.msTransform !== undefined) { 32631 _.animType = 'msTransform'; 32632 _.transformType = '-ms-transform'; 32633 _.transitionType = 'msTransition'; 32634 if (bodyStyle.msTransform === undefined) _.animType = false; 32635 } 32636 if (bodyStyle.transform !== undefined && _.animType !== false) { 32637 _.animType = 'transform'; 32638 _.transformType = 'transform'; 32639 _.transitionType = 'transition'; 32640 } 32641 _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); 32642 }; 32643 32644 32645 Slick.prototype.setSlideClasses = function(index) { 32646 32647 var _ = this, 32648 centerOffset, allSlides, indexOffset, remainder; 32649 32650 allSlides = _.$slider 32651 .find('.slick-slide') 32652 .removeClass('slick-active slick-center slick-current') 32653 .attr('aria-hidden', 'true'); 32654 32655 _.$slides 32656 .eq(index) 32657 .addClass('slick-current'); 32658 32659 if (_.options.centerMode === true) { 32660 32661 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 32662 32663 centerOffset = Math.floor(_.options.slidesToShow / 2); 32664 32665 if (_.options.infinite === true) { 32666 32667 if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) { 32668 _.$slides 32669 .slice(index - centerOffset + evenCoef, index + centerOffset + 1) 32670 .addClass('slick-active') 32671 .attr('aria-hidden', 'false'); 32672 32673 } else { 32674 32675 indexOffset = _.options.slidesToShow + index; 32676 allSlides 32677 .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2) 32678 .addClass('slick-active') 32679 .attr('aria-hidden', 'false'); 32680 32681 } 32682 32683 if (index === 0) { 32684 32685 allSlides 32686 .eq(allSlides.length - 1 - _.options.slidesToShow) 32687 .addClass('slick-center'); 32688 32689 } else if (index === _.slideCount - 1) { 32690 32691 allSlides 32692 .eq(_.options.slidesToShow) 32693 .addClass('slick-center'); 32694 32695 } 32696 32697 } 32698 32699 _.$slides 32700 .eq(index) 32701 .addClass('slick-center'); 32702 32703 } else { 32704 32705 if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) { 32706 32707 _.$slides 32708 .slice(index, index + _.options.slidesToShow) 32709 .addClass('slick-active') 32710 .attr('aria-hidden', 'false'); 32711 32712 } else if (allSlides.length <= _.options.slidesToShow) { 32713 32714 allSlides 32715 .addClass('slick-active') 32716 .attr('aria-hidden', 'false'); 32717 32718 } else { 32719 32720 remainder = _.slideCount % _.options.slidesToShow; 32721 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 32722 32723 if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { 32724 32725 allSlides 32726 .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) 32727 .addClass('slick-active') 32728 .attr('aria-hidden', 'false'); 32729 32730 } else { 32731 32732 allSlides 32733 .slice(indexOffset, indexOffset + _.options.slidesToShow) 32734 .addClass('slick-active') 32735 .attr('aria-hidden', 'false'); 32736 32737 } 32738 32739 } 32740 32741 } 32742 32743 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 32744 _.lazyLoad(); 32745 } 32746 }; 32747 32748 Slick.prototype.setupInfinite = function() { 32749 32750 var _ = this, 32751 i, slideIndex, infiniteCount; 32752 32753 if (_.options.fade === true) { 32754 _.options.centerMode = false; 32755 } 32756 32757 if (_.options.infinite === true && _.options.fade === false) { 32758 32759 slideIndex = null; 32760 32761 if (_.slideCount > _.options.slidesToShow) { 32762 32763 if (_.options.centerMode === true) { 32764 infiniteCount = _.options.slidesToShow + 1; 32765 } else { 32766 infiniteCount = _.options.slidesToShow; 32767 } 32768 32769 for (i = _.slideCount; i > (_.slideCount - 32770 infiniteCount); i -= 1) { 32771 slideIndex = i - 1; 32772 $(_.$slides[slideIndex]).clone(true).attr('id', '') 32773 .attr('data-slick-index', slideIndex - _.slideCount) 32774 .prependTo(_.$slideTrack).addClass('slick-cloned'); 32775 } 32776 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 32777 slideIndex = i; 32778 $(_.$slides[slideIndex]).clone(true).attr('id', '') 32779 .attr('data-slick-index', slideIndex + _.slideCount) 32780 .appendTo(_.$slideTrack).addClass('slick-cloned'); 32781 } 32782 _.$slideTrack.find('.slick-cloned').find('[id]').each(function() { 32783 $(this).attr('id', ''); 32784 }); 32785 32786 } 32787 32788 } 32789 32790 }; 32791 32792 Slick.prototype.interrupt = function( toggle ) { 32793 32794 var _ = this; 32795 32796 if( !toggle ) { 32797 _.autoPlay(); 32798 } 32799 _.interrupted = toggle; 32800 32801 }; 32802 32803 Slick.prototype.selectHandler = function(event) { 32804 32805 var _ = this; 32806 32807 var targetElement = 32808 $(event.target).is('.slick-slide') ? 32809 $(event.target) : 32810 $(event.target).parents('.slick-slide'); 32811 32812 var index = parseInt(targetElement.attr('data-slick-index')); 32813 32814 if (!index) index = 0; 32815 32816 if (_.slideCount <= _.options.slidesToShow) { 32817 32818 _.slideHandler(index, false, true); 32819 return; 32820 32821 } 32822 32823 _.slideHandler(index); 32824 32825 }; 32826 32827 Slick.prototype.slideHandler = function(index, sync, dontAnimate) { 32828 32829 var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, 32830 _ = this, navTarget; 32831 32832 sync = sync || false; 32833 32834 if (_.animating === true && _.options.waitForAnimate === true) { 32835 return; 32836 } 32837 32838 if (_.options.fade === true && _.currentSlide === index) { 32839 return; 32840 } 32841 32842 if (sync === false) { 32843 _.asNavFor(index); 32844 } 32845 32846 targetSlide = index; 32847 targetLeft = _.getLeft(targetSlide); 32848 slideLeft = _.getLeft(_.currentSlide); 32849 32850 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 32851 32852 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 32853 if (_.options.fade === false) { 32854 targetSlide = _.currentSlide; 32855 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 32856 _.animateSlide(slideLeft, function() { 32857 _.postSlide(targetSlide); 32858 }); 32859 } else { 32860 _.postSlide(targetSlide); 32861 } 32862 } 32863 return; 32864 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) { 32865 if (_.options.fade === false) { 32866 targetSlide = _.currentSlide; 32867 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 32868 _.animateSlide(slideLeft, function() { 32869 _.postSlide(targetSlide); 32870 }); 32871 } else { 32872 _.postSlide(targetSlide); 32873 } 32874 } 32875 return; 32876 } 32877 32878 if ( _.options.autoplay ) { 32879 clearInterval(_.autoPlayTimer); 32880 } 32881 32882 if (targetSlide < 0) { 32883 if (_.slideCount % _.options.slidesToScroll !== 0) { 32884 animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll); 32885 } else { 32886 animSlide = _.slideCount + targetSlide; 32887 } 32888 } else if (targetSlide >= _.slideCount) { 32889 if (_.slideCount % _.options.slidesToScroll !== 0) { 32890 animSlide = 0; 32891 } else { 32892 animSlide = targetSlide - _.slideCount; 32893 } 32894 } else { 32895 animSlide = targetSlide; 32896 } 32897 32898 _.animating = true; 32899 32900 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 32901 32902 oldSlide = _.currentSlide; 32903 _.currentSlide = animSlide; 32904 32905 _.setSlideClasses(_.currentSlide); 32906 32907 if ( _.options.asNavFor ) { 32908 32909 navTarget = _.getNavTarget(); 32910 navTarget = navTarget.slick('getSlick'); 32911 32912 if ( navTarget.slideCount <= navTarget.options.slidesToShow ) { 32913 navTarget.setSlideClasses(_.currentSlide); 32914 } 32915 32916 } 32917 32918 _.updateDots(); 32919 _.updateArrows(); 32920 32921 if (_.options.fade === true) { 32922 if (dontAnimate !== true) { 32923 32924 _.fadeSlideOut(oldSlide); 32925 32926 _.fadeSlide(animSlide, function() { 32927 _.postSlide(animSlide); 32928 }); 32929 32930 } else { 32931 _.postSlide(animSlide); 32932 } 32933 _.animateHeight(); 32934 return; 32935 } 32936 32937 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 32938 _.animateSlide(targetLeft, function() { 32939 _.postSlide(animSlide); 32940 }); 32941 } else { 32942 _.postSlide(animSlide); 32943 } 32944 32945 }; 32946 32947 Slick.prototype.startLoad = function() { 32948 32949 var _ = this; 32950 32951 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 32952 32953 _.$prevArrow.hide(); 32954 _.$nextArrow.hide(); 32955 32956 } 32957 32958 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 32959 32960 _.$dots.hide(); 32961 32962 } 32963 32964 _.$slider.addClass('slick-loading'); 32965 32966 }; 32967 32968 Slick.prototype.swipeDirection = function() { 32969 32970 var xDist, yDist, r, swipeAngle, _ = this; 32971 32972 xDist = _.touchObject.startX - _.touchObject.curX; 32973 yDist = _.touchObject.startY - _.touchObject.curY; 32974 r = Math.atan2(yDist, xDist); 32975 32976 swipeAngle = Math.round(r * 180 / Math.PI); 32977 if (swipeAngle < 0) { 32978 swipeAngle = 360 - Math.abs(swipeAngle); 32979 } 32980 32981 if ((swipeAngle <= 45) && (swipeAngle >= 0)) { 32982 return (_.options.rtl === false ? 'left' : 'right'); 32983 } 32984 if ((swipeAngle <= 360) && (swipeAngle >= 315)) { 32985 return (_.options.rtl === false ? 'left' : 'right'); 32986 } 32987 if ((swipeAngle >= 135) && (swipeAngle <= 225)) { 32988 return (_.options.rtl === false ? 'right' : 'left'); 32989 } 32990 if (_.options.verticalSwiping === true) { 32991 if ((swipeAngle >= 35) && (swipeAngle <= 135)) { 32992 return 'down'; 32993 } else { 32994 return 'up'; 32995 } 32996 } 32997 32998 return 'vertical'; 32999 33000 }; 33001 33002 Slick.prototype.swipeEnd = function(event) { 33003 33004 var _ = this, 33005 slideCount, 33006 direction; 33007 33008 _.dragging = false; 33009 _.swiping = false; 33010 33011 if (_.scrolling) { 33012 _.scrolling = false; 33013 return false; 33014 } 33015 33016 _.interrupted = false; 33017 _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true; 33018 33019 if ( _.touchObject.curX === undefined ) { 33020 return false; 33021 } 33022 33023 if ( _.touchObject.edgeHit === true ) { 33024 _.$slider.trigger('edge', [_, _.swipeDirection() ]); 33025 } 33026 33027 if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) { 33028 33029 direction = _.swipeDirection(); 33030 33031 switch ( direction ) { 33032 33033 case 'left': 33034 case 'down': 33035 33036 slideCount = 33037 _.options.swipeToSlide ? 33038 _.checkNavigable( _.currentSlide + _.getSlideCount() ) : 33039 _.currentSlide + _.getSlideCount(); 33040 33041 _.currentDirection = 0; 33042 33043 break; 33044 33045 case 'right': 33046 case 'up': 33047 33048 slideCount = 33049 _.options.swipeToSlide ? 33050 _.checkNavigable( _.currentSlide - _.getSlideCount() ) : 33051 _.currentSlide - _.getSlideCount(); 33052 33053 _.currentDirection = 1; 33054 33055 break; 33056 33057 default: 33058 33059 33060 } 33061 33062 if( direction != 'vertical' ) { 33063 33064 _.slideHandler( slideCount ); 33065 _.touchObject = {}; 33066 _.$slider.trigger('swipe', [_, direction ]); 33067 33068 } 33069 33070 } else { 33071 33072 if ( _.touchObject.startX !== _.touchObject.curX ) { 33073 33074 _.slideHandler( _.currentSlide ); 33075 _.touchObject = {}; 33076 33077 } 33078 33079 } 33080 33081 }; 33082 33083 Slick.prototype.swipeHandler = function(event) { 33084 33085 var _ = this; 33086 33087 if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) { 33088 return; 33089 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 33090 return; 33091 } 33092 33093 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? 33094 event.originalEvent.touches.length : 1; 33095 33096 _.touchObject.minSwipe = _.listWidth / _.options 33097 .touchThreshold; 33098 33099 if (_.options.verticalSwiping === true) { 33100 _.touchObject.minSwipe = _.listHeight / _.options 33101 .touchThreshold; 33102 } 33103 33104 switch (event.data.action) { 33105 33106 case 'start': 33107 _.swipeStart(event); 33108 break; 33109 33110 case 'move': 33111 _.swipeMove(event); 33112 break; 33113 33114 case 'end': 33115 _.swipeEnd(event); 33116 break; 33117 33118 } 33119 33120 }; 33121 33122 Slick.prototype.swipeMove = function(event) { 33123 33124 var _ = this, 33125 edgeWasHit = false, 33126 curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength; 33127 33128 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 33129 33130 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 33131 return false; 33132 } 33133 33134 curLeft = _.getLeft(_.currentSlide); 33135 33136 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 33137 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 33138 33139 _.touchObject.swipeLength = Math.round(Math.sqrt( 33140 Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 33141 33142 verticalSwipeLength = Math.round(Math.sqrt( 33143 Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 33144 33145 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 33146 _.scrolling = true; 33147 return false; 33148 } 33149 33150 if (_.options.verticalSwiping === true) { 33151 _.touchObject.swipeLength = verticalSwipeLength; 33152 } 33153 33154 swipeDirection = _.swipeDirection(); 33155 33156 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 33157 _.swiping = true; 33158 event.preventDefault(); 33159 } 33160 33161 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 33162 if (_.options.verticalSwiping === true) { 33163 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 33164 } 33165 33166 33167 swipeLength = _.touchObject.swipeLength; 33168 33169 _.touchObject.edgeHit = false; 33170 33171 if (_.options.infinite === false) { 33172 if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) { 33173 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 33174 _.touchObject.edgeHit = true; 33175 } 33176 } 33177 33178 if (_.options.vertical === false) { 33179 _.swipeLeft = curLeft + swipeLength * positionOffset; 33180 } else { 33181 _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; 33182 } 33183 if (_.options.verticalSwiping === true) { 33184 _.swipeLeft = curLeft + swipeLength * positionOffset; 33185 } 33186 33187 if (_.options.fade === true || _.options.touchMove === false) { 33188 return false; 33189 } 33190 33191 if (_.animating === true) { 33192 _.swipeLeft = null; 33193 return false; 33194 } 33195 33196 _.setCSS(_.swipeLeft); 33197 33198 }; 33199 33200 Slick.prototype.swipeStart = function(event) { 33201 33202 var _ = this, 33203 touches; 33204 33205 _.interrupted = true; 33206 33207 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 33208 _.touchObject = {}; 33209 return false; 33210 } 33211 33212 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 33213 touches = event.originalEvent.touches[0]; 33214 } 33215 33216 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 33217 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 33218 33219 _.dragging = true; 33220 33221 }; 33222 33223 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() { 33224 33225 var _ = this; 33226 33227 if (_.$slidesCache !== null) { 33228 33229 _.unload(); 33230 33231 _.$slideTrack.children(this.options.slide).detach(); 33232 33233 _.$slidesCache.appendTo(_.$slideTrack); 33234 33235 _.reinit(); 33236 33237 } 33238 33239 }; 33240 33241 Slick.prototype.unload = function() { 33242 33243 var _ = this; 33244 33245 $('.slick-cloned', _.$slider).remove(); 33246 33247 if (_.$dots) { 33248 _.$dots.remove(); 33249 } 33250 33251 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 33252 _.$prevArrow.remove(); 33253 } 33254 33255 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 33256 _.$nextArrow.remove(); 33257 } 33258 33259 _.$slides 33260 .removeClass('slick-slide slick-active slick-visible slick-current') 33261 .attr('aria-hidden', 'true') 33262 .css('width', ''); 33263 33264 }; 33265 33266 Slick.prototype.unslick = function(fromBreakpoint) { 33267 33268 var _ = this; 33269 _.$slider.trigger('unslick', [_, fromBreakpoint]); 33270 _.destroy(); 33271 33272 }; 33273 33274 Slick.prototype.updateArrows = function() { 33275 33276 var _ = this, 33277 centerOffset; 33278 33279 centerOffset = Math.floor(_.options.slidesToShow / 2); 33280 33281 if ( _.options.arrows === true && 33282 _.slideCount > _.options.slidesToShow && 33283 !_.options.infinite ) { 33284 33285 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 33286 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 33287 33288 if (_.currentSlide === 0) { 33289 33290 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 33291 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 33292 33293 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 33294 33295 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 33296 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 33297 33298 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 33299 33300 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 33301 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 33302 33303 } 33304 33305 } 33306 33307 }; 33308 33309 Slick.prototype.updateDots = function() { 33310 33311 var _ = this; 33312 33313 if (_.$dots !== null) { 33314 33315 _.$dots 33316 .find('li') 33317 .removeClass('slick-active') 33318 .end(); 33319 33320 _.$dots 33321 .find('li') 33322 .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) 33323 .addClass('slick-active'); 33324 33325 } 33326 33327 }; 33328 33329 Slick.prototype.visibility = function() { 33330 33331 var _ = this; 33332 33333 if ( _.options.autoplay ) { 33334 33335 if ( document[_.hidden] ) { 33336 33337 _.interrupted = true; 33338 33339 } else { 33340 33341 _.interrupted = false; 33342 33343 } 33344 33345 } 33346 33347 }; 33348 33349 $.fn.slick = function() { 33350 var _ = this, 33351 opt = arguments[0], 33352 args = Array.prototype.slice.call(arguments, 1), 33353 l = _.length, 33354 i, 33355 ret; 33356 for (i = 0; i < l; i++) { 33357 if (typeof opt == 'object' || typeof opt == 'undefined') 33358 _[i].slick = new Slick(_[i], opt); 33359 else 33360 ret = _[i].slick[opt].apply(_[i].slick, args); 33361 if (typeof ret != 'undefined') return ret; 33362 } 33363 return _; 33364 }; 33365 33366})); 33367 33368 33369/***/ }), 33370
vendor: 630 bytes, lines 33371-33392
33371/***/ "./node_modules/vue-loader/dist/exportHelper.js": 33372/*!******************************************************!*\ 33373 !*** ./node_modules/vue-loader/dist/exportHelper.js ***! 33374 \******************************************************/ 33375/***/ ((__unused_webpack_module, exports) => { 33376 33377"use strict"; 33378 33379Object.defineProperty(exports, "__esModule", ({ value: true })); 33380// runtime helper for setting properties on components 33381// in a tree-shakable way 33382exports["default"] = (sfc, props) => { 33383 const target = sfc.__vccOpts || sfc; 33384 for (const [key, val] of props) { 33385 target[key] = val; 33386 } 33387 return target; 33388}; 33389 33390 33391/***/ }), 33392
vendor: 21,199 bytes, lines 33393-33593
33393/***/ "./node_modules/vue/dist/vue.runtime.esm-bundler.js": 33394/*!**********************************************************!*\ 33395 !*** ./node_modules/vue/dist/vue.runtime.esm-bundler.js ***! 33396 \**********************************************************/ 33397/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 33398 33399"use strict"; 33400__webpack_require__.r(__webpack_exports__); 33401/* harmony export */ __webpack_require__.d(__webpack_exports__, { 33402/* harmony export */ BaseTransition: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.BaseTransition), 33403/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators), 33404/* harmony export */ Comment: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Comment), 33405/* harmony export */ DeprecationTypes: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.DeprecationTypes), 33406/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.EffectScope), 33407/* harmony export */ ErrorCodes: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ErrorCodes), 33408/* harmony export */ ErrorTypeStrings: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ErrorTypeStrings), 33409/* harmony export */ Fragment: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Fragment), 33410/* harmony export */ KeepAlive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.KeepAlive), 33411/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect), 33412/* harmony export */ Static: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Static), 33413/* harmony export */ Suspense: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Suspense), 33414/* harmony export */ Teleport: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Teleport), 33415/* harmony export */ Text: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Text), 33416/* harmony export */ TrackOpTypes: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.TrackOpTypes), 33417/* harmony export */ Transition: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Transition), 33418/* harmony export */ TransitionGroup: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup), 33419/* harmony export */ TriggerOpTypes: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.TriggerOpTypes), 33420/* harmony export */ VueElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.VueElement), 33421/* harmony export */ assertNumber: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.assertNumber), 33422/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling), 33423/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling), 33424/* harmony export */ camelize: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.camelize), 33425/* harmony export */ capitalize: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.capitalize), 33426/* harmony export */ cloneVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.cloneVNode), 33427/* harmony export */ compatUtils: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.compatUtils), 33428/* harmony export */ compile: () => (/* binding */ compile), 33429/* harmony export */ computed: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.computed), 33430/* harmony export */ createApp: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createApp), 33431/* harmony export */ createBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createBlock), 33432/* harmony export */ createCommentVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode), 33433/* harmony export */ createElementBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementBlock), 33434/* harmony export */ createElementVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementVNode), 33435/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer), 33436/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy), 33437/* harmony export */ createRenderer: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createRenderer), 33438/* harmony export */ createSSRApp: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSSRApp), 33439/* harmony export */ createSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSlots), 33440/* harmony export */ createStaticVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode), 33441/* harmony export */ createTextVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createTextVNode), 33442/* harmony export */ createVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createVNode), 33443/* harmony export */ customRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.customRef), 33444/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent), 33445/* harmony export */ defineComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineComponent), 33446/* harmony export */ defineCustomElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement), 33447/* harmony export */ defineEmits: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineEmits), 33448/* harmony export */ defineExpose: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineExpose), 33449/* harmony export */ defineModel: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineModel), 33450/* harmony export */ defineOptions: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineOptions), 33451/* harmony export */ defineProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineProps), 33452/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement), 33453/* harmony export */ defineSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineSlots), 33454/* harmony export */ devtools: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.devtools), 33455/* harmony export */ effect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effect), 33456/* harmony export */ effectScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effectScope), 33457/* harmony export */ getCurrentInstance: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance), 33458/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope), 33459/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren), 33460/* harmony export */ guardReactiveProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps), 33461/* harmony export */ h: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.h), 33462/* harmony export */ handleError: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.handleError), 33463/* harmony export */ hasInjectionContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext), 33464/* harmony export */ hydrate: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate), 33465/* harmony export */ initCustomFormatter: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter), 33466/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR), 33467/* harmony export */ inject: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.inject), 33468/* harmony export */ isMemoSame: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isMemoSame), 33469/* harmony export */ isProxy: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isProxy), 33470/* harmony export */ isReactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReactive), 33471/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReadonly), 33472/* harmony export */ isRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRef), 33473/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly), 33474/* harmony export */ isShallow: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isShallow), 33475/* harmony export */ isVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isVNode), 33476/* harmony export */ markRaw: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.markRaw), 33477/* harmony export */ mergeDefaults: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults), 33478/* harmony export */ mergeModels: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeModels), 33479/* harmony export */ mergeProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeProps), 33480/* harmony export */ nextTick: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.nextTick), 33481/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeClass), 33482/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeProps), 33483/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle), 33484/* harmony export */ onActivated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onActivated), 33485/* harmony export */ onBeforeMount: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount), 33486/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount), 33487/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate), 33488/* harmony export */ onDeactivated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onDeactivated), 33489/* harmony export */ onErrorCaptured: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured), 33490/* harmony export */ onMounted: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onMounted), 33491/* harmony export */ onRenderTracked: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked), 33492/* harmony export */ onRenderTriggered: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered), 33493/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose), 33494/* harmony export */ onServerPrefetch: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch), 33495/* harmony export */ onUnmounted: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUnmounted), 33496/* harmony export */ onUpdated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUpdated), 33497/* harmony export */ openBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.openBlock), 33498/* harmony export */ popScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.popScopeId), 33499/* harmony export */ provide: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.provide), 33500/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.proxyRefs), 33501/* harmony export */ pushScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.pushScopeId), 33502/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb), 33503/* harmony export */ reactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.reactive), 33504/* harmony export */ readonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.readonly), 33505/* harmony export */ ref: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ref), 33506/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler), 33507/* harmony export */ render: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.render), 33508/* harmony export */ renderList: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderList), 33509/* harmony export */ renderSlot: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderSlot), 33510/* harmony export */ resolveComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveComponent), 33511/* harmony export */ resolveDirective: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDirective), 33512/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent), 33513/* harmony export */ resolveFilter: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveFilter), 33514/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks), 33515/* harmony export */ setBlockTracking: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking), 33516/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook), 33517/* harmony export */ setTransitionHooks: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks), 33518/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReactive), 33519/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly), 33520/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowRef), 33521/* harmony export */ ssrContextKey: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey), 33522/* harmony export */ ssrUtils: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrUtils), 33523/* harmony export */ stop: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.stop), 33524/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toDisplayString), 33525/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey), 33526/* harmony export */ toHandlers: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlers), 33527/* harmony export */ toRaw: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRaw), 33528/* harmony export */ toRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRef), 33529/* harmony export */ toRefs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRefs), 33530/* harmony export */ toValue: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toValue), 33531/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs), 33532/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.triggerRef), 33533/* harmony export */ unref: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.unref), 33534/* harmony export */ useAttrs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useAttrs), 33535/* harmony export */ useCssModule: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssModule), 33536/* harmony export */ useCssVars: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssVars), 33537/* harmony export */ useModel: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useModel), 33538/* harmony export */ useSSRContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSSRContext), 33539/* harmony export */ useSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSlots), 33540/* harmony export */ useTransitionState: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useTransitionState), 33541/* harmony export */ vModelCheckbox: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox), 33542/* harmony export */ vModelDynamic: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic), 33543/* harmony export */ vModelRadio: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelRadio), 33544/* harmony export */ vModelSelect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelSelect), 33545/* harmony export */ vModelText: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelText), 33546/* harmony export */ vShow: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vShow), 33547/* harmony export */ version: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.version), 33548/* harmony export */ warn: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.warn), 33549/* harmony export */ watch: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watch), 33550/* harmony export */ watchEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchEffect), 33551/* harmony export */ watchPostEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect), 33552/* harmony export */ watchSyncEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect), 33553/* harmony export */ withAsyncContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext), 33554/* harmony export */ withCtx: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withCtx), 33555/* harmony export */ withDefaults: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDefaults), 33556/* harmony export */ withDirectives: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDirectives), 33557/* harmony export */ withKeys: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withKeys), 33558/* harmony export */ withMemo: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withMemo), 33559/* harmony export */ withModifiers: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withModifiers), 33560/* harmony export */ withScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withScopeId) 33561/* harmony export */ }); 33562/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js"); 33563/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js"); 33564/** 33565* vue v3.4.37 33566* (c) 2018-present Yuxi (Evan) You and Vue contributors 33567* @license MIT 33568**/ 33569 33570 33571 33572function initDev() { 33573 { 33574 (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.initCustomFormatter)(); 33575 } 33576} 33577 33578if (true) { 33579 initDev(); 33580} 33581const compile = () => { 33582 if (true) { 33583 (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.warn)( 33584 `Runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) 33585 ); 33586 } 33587}; 33588 33589 33590 33591 33592/***/ }), 33593
vendor: 17,306 bytes, lines 33594-33991
33594/***/ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js": 33595/*!***************************************************************************!*\ 33596 !*** ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js ***! 33597 \***************************************************************************/ 33598/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 33599 33600"use strict"; 33601__webpack_require__.r(__webpack_exports__); 33602/* harmony export */ __webpack_require__.d(__webpack_exports__, { 33603/* harmony export */ "default": () => (/* binding */ WebSocketClient) 33604/* harmony export */ }); 33605/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js"); 33606function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 33607function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } 33608function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 33609function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 33610function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 33611 33612var WebSocketClient = /*#__PURE__*/function () { 33613 /** 33614 * @param {string} url 33615 */ 33616 function WebSocketClient(url) { 33617 _classCallCheck(this, WebSocketClient); 33618 this.client = new WebSocket(url); 33619 this.client.onerror = function (error) { 33620 _utils_log_js__WEBPACK_IMPORTED_MODULE_0__.log.error(error); 33621 }; 33622 } 33623 33624 /** 33625 * @param {(...args: any[]) => void} f 33626 */ 33627 return _createClass(WebSocketClient, [{ 33628 key: "onOpen", 33629 value: function onOpen(f) { 33630 this.client.onopen = f; 33631 } 33632 33633 /** 33634 * @param {(...args: any[]) => void} f 33635 */ 33636 }, { 33637 key: "onClose", 33638 value: function onClose(f) { 33639 this.client.onclose = f; 33640 } 33641 33642 // call f with the message string as the first argument 33643 /** 33644 * @param {(...args: any[]) => void} f 33645 */ 33646 }, { 33647 key: "onMessage", 33648 value: function onMessage(f) { 33649 this.client.onmessage = function (e) { 33650 f(e.data); 33651 }; 33652 } 33653 }]); 33654}(); 33655 33656 33657/***/ }), 33658 33659/***/ "./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=localhost&port=8080&pathname=%2Fws&logging=warn&progress=true&overlay=false&reconnect=10&hot=true&live-reload=true": 33660/*!****************************************************************************************************************************************************************************************************!*\ 33661 !*** ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=localhost&port=8080&pathname=%2Fws&logging=warn&progress=true&overlay=false&reconnect=10&hot=true&live-reload=true ***! 33662 \****************************************************************************************************************************************************************************************************/ 33663/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 33664 33665"use strict"; 33666var __resourceQuery = "?protocol=ws%3A&hostname=localhost&port=8080&pathname=%2Fws&logging=warn&progress=true&overlay=false&reconnect=10&hot=true&live-reload=true"; 33667__webpack_require__.r(__webpack_exports__); 33668/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/log.js */ "./node_modules/webpack/hot/log.js"); 33669/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__); 33670/* harmony import */ var _utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/stripAnsi.js */ "./node_modules/webpack-dev-server/client/utils/stripAnsi.js"); 33671/* harmony import */ var _utils_parseURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/parseURL.js */ "./node_modules/webpack-dev-server/client/utils/parseURL.js"); 33672/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./socket.js */ "./node_modules/webpack-dev-server/client/socket.js"); 33673/* harmony import */ var _overlay_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./overlay.js */ "./node_modules/webpack-dev-server/client/overlay.js"); 33674/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js"); 33675/* harmony import */ var _utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/sendMessage.js */ "./node_modules/webpack-dev-server/client/utils/sendMessage.js"); 33676/* harmony import */ var _utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/reloadApp.js */ "./node_modules/webpack-dev-server/client/utils/reloadApp.js"); 33677/* harmony import */ var _utils_createSocketURL_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/createSocketURL.js */ "./node_modules/webpack-dev-server/client/utils/createSocketURL.js"); 33678function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 33679function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 33680function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 33681function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 33682function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 33683/* global __resourceQuery, __webpack_hash__ */ 33684/// <reference types="webpack/module" /> 33685 33686 33687 33688 33689 33690 33691 33692 33693 33694 33695/** 33696 * @typedef {Object} OverlayOptions 33697 * @property {boolean | (error: Error) => boolean} [warnings] 33698 * @property {boolean | (error: Error) => boolean} [errors] 33699 * @property {boolean | (error: Error) => boolean} [runtimeErrors] 33700 * @property {string} [trustedTypesPolicyName] 33701 */ 33702 33703/** 33704 * @typedef {Object} Options 33705 * @property {boolean} hot 33706 * @property {boolean} liveReload 33707 * @property {boolean} progress 33708 * @property {boolean | OverlayOptions} overlay 33709 * @property {string} [logging] 33710 * @property {number} [reconnect] 33711 */ 33712 33713/** 33714 * @typedef {Object} Status 33715 * @property {boolean} isUnloading 33716 * @property {string} currentHash 33717 * @property {string} [previousHash] 33718 */ 33719 33720/** 33721 * @param {boolean | { warnings?: boolean | string; errors?: boolean | string; runtimeErrors?: boolean | string; }} overlayOptions 33722 */ 33723var decodeOverlayOptions = function decodeOverlayOptions(overlayOptions) { 33724 if (typeof overlayOptions === "object") { 33725 ["warnings", "errors", "runtimeErrors"].forEach(function (property) { 33726 if (typeof overlayOptions[property] === "string") { 33727 var overlayFilterFunctionString = decodeURIComponent(overlayOptions[property]); 33728 33729 // eslint-disable-next-line no-new-func 33730 var overlayFilterFunction = new Function("message", "var callback = ".concat(overlayFilterFunctionString, "\n return callback(message)")); 33731 overlayOptions[property] = overlayFilterFunction; 33732 } 33733 }); 33734 } 33735}; 33736 33737/** 33738 * @type {Status} 33739 */ 33740var status = { 33741 isUnloading: false, 33742 // eslint-disable-next-line camelcase 33743 currentHash: __webpack_require__.h() 33744}; 33745 33746/** @type {Options} */ 33747var options = { 33748 hot: false, 33749 liveReload: false, 33750 progress: false, 33751 overlay: false 33752}; 33753var parsedResourceQuery = (0,_utils_parseURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])(__resourceQuery); 33754var enabledFeatures = { 33755 "Hot Module Replacement": false, 33756 "Live Reloading": false, 33757 Progress: false, 33758 Overlay: false 33759}; 33760if (parsedResourceQuery.hot === "true") { 33761 options.hot = true; 33762 enabledFeatures["Hot Module Replacement"] = true; 33763} 33764if (parsedResourceQuery["live-reload"] === "true") { 33765 options.liveReload = true; 33766 enabledFeatures["Live Reloading"] = true; 33767} 33768if (parsedResourceQuery.progress === "true") { 33769 options.progress = true; 33770 enabledFeatures.Progress = true; 33771} 33772if (parsedResourceQuery.overlay) { 33773 try { 33774 options.overlay = JSON.parse(parsedResourceQuery.overlay); 33775 } catch (e) { 33776 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error("Error parsing overlay options from resource query:", e); 33777 } 33778 33779 // Fill in default "true" params for partially-specified objects. 33780 if (typeof options.overlay === "object") { 33781 options.overlay = _objectSpread({ 33782 errors: true, 33783 warnings: true, 33784 runtimeErrors: true 33785 }, options.overlay); 33786 decodeOverlayOptions(options.overlay); 33787 } 33788 enabledFeatures.Overlay = true; 33789} 33790if (parsedResourceQuery.logging) { 33791 options.logging = parsedResourceQuery.logging; 33792} 33793if (typeof parsedResourceQuery.reconnect !== "undefined") { 33794 options.reconnect = Number(parsedResourceQuery.reconnect); 33795} 33796 33797/** 33798 * @param {string} level 33799 */ 33800function setAllLogLevel(level) { 33801 // This is needed because the HMR logger operate separately from dev server logger 33802 webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default().setLogLevel(level === "verbose" || level === "log" ? "info" : level); 33803 (0,_utils_log_js__WEBPACK_IMPORTED_MODULE_5__.setLogLevel)(level); 33804} 33805if (options.logging) { 33806 setAllLogLevel(options.logging); 33807} 33808(0,_utils_log_js__WEBPACK_IMPORTED_MODULE_5__.logEnabledFeatures)(enabledFeatures); 33809self.addEventListener("beforeunload", function () { 33810 status.isUnloading = true; 33811}); 33812var overlay = typeof window !== "undefined" ? (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.createOverlay)(typeof options.overlay === "object" ? { 33813 trustedTypesPolicyName: options.overlay.trustedTypesPolicyName, 33814 catchRuntimeError: options.overlay.runtimeErrors 33815} : { 33816 trustedTypesPolicyName: false, 33817 catchRuntimeError: options.overlay 33818}) : { 33819 send: function send() {} 33820}; 33821var onSocketMessage = { 33822 hot: function hot() { 33823 if (parsedResourceQuery.hot === "false") { 33824 return; 33825 } 33826 options.hot = true; 33827 }, 33828 liveReload: function liveReload() { 33829 if (parsedResourceQuery["live-reload"] === "false") { 33830 return; 33831 } 33832 options.liveReload = true; 33833 }, 33834 invalid: function invalid() { 33835 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("App updated. Recompiling..."); 33836 33837 // Fixes #1042. overlay doesn't clear if errors are fixed but warnings remain. 33838 if (options.overlay) { 33839 overlay.send({ 33840 type: "DISMISS" 33841 }); 33842 } 33843 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Invalid"); 33844 }, 33845 /** 33846 * @param {string} hash 33847 */ 33848 hash: function hash(_hash) { 33849 status.previousHash = status.currentHash; 33850 status.currentHash = _hash; 33851 }, 33852 logging: setAllLogLevel, 33853 /** 33854 * @param {boolean} value 33855 */ 33856 overlay: function overlay(value) { 33857 if (typeof document === "undefined") { 33858 return; 33859 } 33860 options.overlay = value; 33861 decodeOverlayOptions(options.overlay); 33862 }, 33863 /** 33864 * @param {number} value 33865 */ 33866 reconnect: function reconnect(value) { 33867 if (parsedResourceQuery.reconnect === "false") { 33868 return; 33869 } 33870 options.reconnect = value; 33871 }, 33872 /** 33873 * @param {boolean} value 33874 */ 33875 progress: function progress(value) { 33876 options.progress = value; 33877 }, 33878 /** 33879 * @param {{ pluginName?: string, percent: number, msg: string }} data 33880 */ 33881 "progress-update": function progressUpdate(data) { 33882 if (options.progress) { 33883 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("".concat(data.pluginName ? "[".concat(data.pluginName, "] ") : "").concat(data.percent, "% - ").concat(data.msg, ".")); 33884 } 33885 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Progress", data); 33886 }, 33887 "still-ok": function stillOk() { 33888 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("Nothing changed."); 33889 if (options.overlay) { 33890 overlay.send({ 33891 type: "DISMISS" 33892 }); 33893 } 33894 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("StillOk"); 33895 }, 33896 ok: function ok() { 33897 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Ok"); 33898 if (options.overlay) { 33899 overlay.send({ 33900 type: "DISMISS" 33901 }); 33902 } 33903 (0,_utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__["default"])(options, status); 33904 }, 33905 /** 33906 * @param {string} file 33907 */ 33908 "static-changed": function staticChanged(file) { 33909 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading...")); 33910 self.location.reload(); 33911 }, 33912 /** 33913 * @param {Error[]} warnings 33914 * @param {any} params 33915 */ 33916 warnings: function warnings(_warnings, params) { 33917 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.warn("Warnings while compiling."); 33918 var printableWarnings = _warnings.map(function (error) { 33919 var _formatProblem = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.formatProblem)("warning", error), 33920 header = _formatProblem.header, 33921 body = _formatProblem.body; 33922 return "".concat(header, "\n").concat((0,_utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__["default"])(body)); 33923 }); 33924 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Warnings", printableWarnings); 33925 for (var i = 0; i < printableWarnings.length; i++) { 33926 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.warn(printableWarnings[i]); 33927 } 33928 var overlayWarningsSetting = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.warnings; 33929 if (overlayWarningsSetting) { 33930 var warningsToDisplay = typeof overlayWarningsSetting === "function" ? _warnings.filter(overlayWarningsSetting) : _warnings; 33931 if (warningsToDisplay.length) { 33932 overlay.send({ 33933 type: "BUILD_ERROR", 33934 level: "warning", 33935 messages: _warnings 33936 }); 33937 } 33938 } 33939 if (params && params.preventReloading) { 33940 return; 33941 } 33942 (0,_utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__["default"])(options, status); 33943 }, 33944 /** 33945 * @param {Error[]} errors 33946 */ 33947 errors: function errors(_errors) { 33948 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error("Errors while compiling. Reload prevented."); 33949 var printableErrors = _errors.map(function (error) { 33950 var _formatProblem2 = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.formatProblem)("error", error), 33951 header = _formatProblem2.header, 33952 body = _formatProblem2.body; 33953 return "".concat(header, "\n").concat((0,_utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__["default"])(body)); 33954 }); 33955 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Errors", printableErrors); 33956 for (var i = 0; i < printableErrors.length; i++) { 33957 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error(printableErrors[i]); 33958 } 33959 var overlayErrorsSettings = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.errors; 33960 if (overlayErrorsSettings) { 33961 var errorsToDisplay = typeof overlayErrorsSettings === "function" ? _errors.filter(overlayErrorsSettings) : _errors; 33962 if (errorsToDisplay.length) { 33963 overlay.send({ 33964 type: "BUILD_ERROR", 33965 level: "error", 33966 messages: _errors 33967 }); 33968 } 33969 } 33970 }, 33971 /** 33972 * @param {Error} error 33973 */ 33974 error: function error(_error) { 33975 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error(_error); 33976 }, 33977 close: function close() { 33978 _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("Disconnected!"); 33979 if (options.overlay) { 33980 overlay.send({ 33981 type: "DISMISS" 33982 }); 33983 } 33984 (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Close"); 33985 } 33986}; 33987var socketURL = (0,_utils_createSocketURL_js__WEBPACK_IMPORTED_MODULE_8__["default"])(parsedResourceQuery); 33988(0,_socket_js__WEBPACK_IMPORTED_MODULE_3__["default"])(socketURL, onSocketMessage, options.reconnect); 33989 33990/***/ }), 33991
vendor: 462 bytes, lines 33992-34001
33992/***/ "./node_modules/webpack-dev-server/client/modules/logger/index.js": 33993/*!************************************************************************!*\ 33994 !*** ./node_modules/webpack-dev-server/client/modules/logger/index.js ***! 33995 \************************************************************************/ 33996/***/ ((__unused_webpack_module, exports) => { 33997 33998/******/ (function() { // webpackBootstrap 33999/******/ "use strict"; 34000/******/ var __webpack_modules__ = ({ 34001
34002/***/ "./client-src/modules/logger/tapable.js": 34003/*!**********************************************!*\ 34004 !*** ./client-src/modules/logger/tapable.js ***! 34005 \**********************************************/ 34006/***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_372__) { 34007 34008__nested_webpack_require_372__.r(__nested_webpack_exports__); 34009/* harmony export */ __nested_webpack_require_372__.d(__nested_webpack_exports__, { 34010/* harmony export */ SyncBailHook: function() { return /* binding */ SyncBailHook; } 34011/* harmony export */ }); 34012function SyncBailHook() { 34013 return { 34014 call: function call() {} 34015 }; 34016} 34017 34018/** 34019 * Client stub for tapable SyncBailHook 34020 */ 34021// eslint-disable-next-line import/prefer-default-export 34022 34023 34024/***/ }), 34025
vendor: 10,360 bytes, lines 34026-34316
34026/***/ "./node_modules/webpack/lib/logging/Logger.js": 34027/*!****************************************************!*\ 34028 !*** ./node_modules/webpack/lib/logging/Logger.js ***! 34029 \****************************************************/ 34030/***/ (function(__unused_webpack_module, exports) { 34031 34032/* 34033 MIT License http://www.opensource.org/licenses/mit-license.php 34034 Author Tobias Koppers @sokra 34035*/ 34036 34037 34038 34039function _toConsumableArray(arr) { 34040 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); 34041} 34042function _nonIterableSpread() { 34043 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 34044} 34045function _unsupportedIterableToArray(o, minLen) { 34046 if (!o) return; 34047 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 34048 var n = Object.prototype.toString.call(o).slice(8, -1); 34049 if (n === "Object" && o.constructor) n = o.constructor.name; 34050 if (n === "Map" || n === "Set") return Array.from(o); 34051 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 34052} 34053function _iterableToArray(iter) { 34054 if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter); 34055} 34056function _arrayWithoutHoles(arr) { 34057 if (Array.isArray(arr)) return _arrayLikeToArray(arr); 34058} 34059function _arrayLikeToArray(arr, len) { 34060 if (len == null || len > arr.length) len = arr.length; 34061 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; 34062 return arr2; 34063} 34064function _classCallCheck(instance, Constructor) { 34065 if (!(instance instanceof Constructor)) { 34066 throw new TypeError("Cannot call a class as a function"); 34067 } 34068} 34069function _defineProperties(target, props) { 34070 for (var i = 0; i < props.length; i++) { 34071 var descriptor = props[i]; 34072 descriptor.enumerable = descriptor.enumerable || false; 34073 descriptor.configurable = true; 34074 if ("value" in descriptor) descriptor.writable = true; 34075 Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); 34076 } 34077} 34078function _createClass(Constructor, protoProps, staticProps) { 34079 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 34080 if (staticProps) _defineProperties(Constructor, staticProps); 34081 Object.defineProperty(Constructor, "prototype", { 34082 writable: false 34083 }); 34084 return Constructor; 34085} 34086function _toPropertyKey(t) { 34087 var i = _toPrimitive(t, "string"); 34088 return "symbol" == typeof i ? i : i + ""; 34089} 34090function _toPrimitive(t, r) { 34091 if ("object" != typeof t || !t) return t; 34092 var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive]; 34093 if (void 0 !== e) { 34094 var i = e.call(t, r || "default"); 34095 if ("object" != typeof i) return i; 34096 throw new TypeError("@@toPrimitive must return a primitive value."); 34097 } 34098 return ("string" === r ? String : Number)(t); 34099} 34100var LogType = Object.freeze({ 34101 error: ( /** @type {"error"} */"error"), 34102 // message, c style arguments 34103 warn: ( /** @type {"warn"} */"warn"), 34104 // message, c style arguments 34105 info: ( /** @type {"info"} */"info"), 34106 // message, c style arguments 34107 log: ( /** @type {"log"} */"log"), 34108 // message, c style arguments 34109 debug: ( /** @type {"debug"} */"debug"), 34110 // message, c style arguments 34111 34112 trace: ( /** @type {"trace"} */"trace"), 34113 // no arguments 34114 34115 group: ( /** @type {"group"} */"group"), 34116 // [label] 34117 groupCollapsed: ( /** @type {"groupCollapsed"} */"groupCollapsed"), 34118 // [label] 34119 groupEnd: ( /** @type {"groupEnd"} */"groupEnd"), 34120 // [label] 34121 34122 profile: ( /** @type {"profile"} */"profile"), 34123 // [profileName] 34124 profileEnd: ( /** @type {"profileEnd"} */"profileEnd"), 34125 // [profileName] 34126 34127 time: ( /** @type {"time"} */"time"), 34128 // name, time as [seconds, nanoseconds] 34129 34130 clear: ( /** @type {"clear"} */"clear"), 34131 // no arguments 34132 status: ( /** @type {"status"} */"status") // message, arguments 34133}); 34134exports.LogType = LogType; 34135 34136/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */ 34137 34138var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method"); 34139var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times"); 34140var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times"); 34141var WebpackLogger = /*#__PURE__*/function () { 34142 /** 34143 * @param {function(LogTypeEnum, any[]=): void} log log function 34144 * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger 34145 */ 34146 function WebpackLogger(log, getChildLogger) { 34147 _classCallCheck(this, WebpackLogger); 34148 this[LOG_SYMBOL] = log; 34149 this.getChildLogger = getChildLogger; 34150 } 34151 return _createClass(WebpackLogger, [{ 34152 key: "error", 34153 value: function error() { 34154 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 34155 args[_key] = arguments[_key]; 34156 } 34157 this[LOG_SYMBOL](LogType.error, args); 34158 } 34159 }, { 34160 key: "warn", 34161 value: function warn() { 34162 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 34163 args[_key2] = arguments[_key2]; 34164 } 34165 this[LOG_SYMBOL](LogType.warn, args); 34166 } 34167 }, { 34168 key: "info", 34169 value: function info() { 34170 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { 34171 args[_key3] = arguments[_key3]; 34172 } 34173 this[LOG_SYMBOL](LogType.info, args); 34174 } 34175 }, { 34176 key: "log", 34177 value: function log() { 34178 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { 34179 args[_key4] = arguments[_key4]; 34180 } 34181 this[LOG_SYMBOL](LogType.log, args); 34182 } 34183 }, { 34184 key: "debug", 34185 value: function debug() { 34186 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { 34187 args[_key5] = arguments[_key5]; 34188 } 34189 this[LOG_SYMBOL](LogType.debug, args); 34190 } 34191 }, { 34192 key: "assert", 34193 value: function assert(assertion) { 34194 if (!assertion) { 34195 for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) { 34196 args[_key6 - 1] = arguments[_key6]; 34197 } 34198 this[LOG_SYMBOL](LogType.error, args); 34199 } 34200 } 34201 }, { 34202 key: "trace", 34203 value: function trace() { 34204 this[LOG_SYMBOL](LogType.trace, ["Trace"]); 34205 } 34206 }, { 34207 key: "clear", 34208 value: function clear() { 34209 this[LOG_SYMBOL](LogType.clear); 34210 } 34211 }, { 34212 key: "status", 34213 value: function status() { 34214 for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { 34215 args[_key7] = arguments[_key7]; 34216 } 34217 this[LOG_SYMBOL](LogType.status, args); 34218 } 34219 }, { 34220 key: "group", 34221 value: function group() { 34222 for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { 34223 args[_key8] = arguments[_key8]; 34224 } 34225 this[LOG_SYMBOL](LogType.group, args); 34226 } 34227 }, { 34228 key: "groupCollapsed", 34229 value: function groupCollapsed() { 34230 for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { 34231 args[_key9] = arguments[_key9]; 34232 } 34233 this[LOG_SYMBOL](LogType.groupCollapsed, args); 34234 } 34235 }, { 34236 key: "groupEnd", 34237 value: function groupEnd() { 34238 for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { 34239 args[_key10] = arguments[_key10]; 34240 } 34241 this[LOG_SYMBOL](LogType.groupEnd, args); 34242 } 34243 }, { 34244 key: "profile", 34245 value: function profile(label) { 34246 this[LOG_SYMBOL](LogType.profile, [label]); 34247 } 34248 }, { 34249 key: "profileEnd", 34250 value: function profileEnd(label) { 34251 this[LOG_SYMBOL](LogType.profileEnd, [label]); 34252 } 34253 }, { 34254 key: "time", 34255 value: function time(label) { 34256 this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map(); 34257 this[TIMERS_SYMBOL].set(label, process.hrtime()); 34258 } 34259 }, { 34260 key: "timeLog", 34261 value: function timeLog(label) { 34262 var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); 34263 if (!prev) { 34264 throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()")); 34265 } 34266 var time = process.hrtime(prev); 34267 this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time))); 34268 } 34269 }, { 34270 key: "timeEnd", 34271 value: function timeEnd(label) { 34272 var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); 34273 if (!prev) { 34274 throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()")); 34275 } 34276 var time = process.hrtime(prev); 34277 this[TIMERS_SYMBOL].delete(label); 34278 this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time))); 34279 } 34280 }, { 34281 key: "timeAggregate", 34282 value: function timeAggregate(label) { 34283 var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); 34284 if (!prev) { 34285 throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()")); 34286 } 34287 var time = process.hrtime(prev); 34288 this[TIMERS_SYMBOL].delete(label); 34289 this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map(); 34290 var current = this[TIMERS_AGGREGATES_SYMBOL].get(label); 34291 if (current !== undefined) { 34292 if (time[1] + current[1] > 1e9) { 34293 time[0] += current[0] + 1; 34294 time[1] = time[1] - 1e9 + current[1]; 34295 } else { 34296 time[0] += current[0]; 34297 time[1] += current[1]; 34298 } 34299 } 34300 this[TIMERS_AGGREGATES_SYMBOL].set(label, time); 34301 } 34302 }, { 34303 key: "timeAggregateEnd", 34304 value: function timeAggregateEnd(label) { 34305 if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return; 34306 var time = this[TIMERS_AGGREGATES_SYMBOL].get(label); 34307 if (time === undefined) return; 34308 this[TIMERS_AGGREGATES_SYMBOL].delete(label); 34309 this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time))); 34310 } 34311 }]); 34312}(); 34313exports.Logger = WebpackLogger; 34314 34315/***/ }), 34316
vendor: 8,944 bytes, lines 34317-34570
34317/***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js": 34318/*!*****************************************************************!*\ 34319 !*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***! 34320 \*****************************************************************/ 34321/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_11499__) { 34322 34323/* 34324 MIT License http://www.opensource.org/licenses/mit-license.php 34325 Author Tobias Koppers @sokra 34326*/ 34327 34328 34329 34330function _toConsumableArray(arr) { 34331 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); 34332} 34333function _nonIterableSpread() { 34334 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 34335} 34336function _unsupportedIterableToArray(o, minLen) { 34337 if (!o) return; 34338 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 34339 var n = Object.prototype.toString.call(o).slice(8, -1); 34340 if (n === "Object" && o.constructor) n = o.constructor.name; 34341 if (n === "Map" || n === "Set") return Array.from(o); 34342 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 34343} 34344function _iterableToArray(iter) { 34345 if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter); 34346} 34347function _arrayWithoutHoles(arr) { 34348 if (Array.isArray(arr)) return _arrayLikeToArray(arr); 34349} 34350function _arrayLikeToArray(arr, len) { 34351 if (len == null || len > arr.length) len = arr.length; 34352 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; 34353 return arr2; 34354} 34355var _require = __nested_webpack_require_11499__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"), 34356 LogType = _require.LogType; 34357 34358/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */ 34359/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */ 34360/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */ 34361 34362/** @typedef {function(string): boolean} FilterFunction */ 34363 34364/** 34365 * @typedef {Object} LoggerConsole 34366 * @property {function(): void} clear 34367 * @property {function(): void} trace 34368 * @property {(...args: any[]) => void} info 34369 * @property {(...args: any[]) => void} log 34370 * @property {(...args: any[]) => void} warn 34371 * @property {(...args: any[]) => void} error 34372 * @property {(...args: any[]) => void=} debug 34373 * @property {(...args: any[]) => void=} group 34374 * @property {(...args: any[]) => void=} groupCollapsed 34375 * @property {(...args: any[]) => void=} groupEnd 34376 * @property {(...args: any[]) => void=} status 34377 * @property {(...args: any[]) => void=} profile 34378 * @property {(...args: any[]) => void=} profileEnd 34379 * @property {(...args: any[]) => void=} logTime 34380 */ 34381 34382/** 34383 * @typedef {Object} LoggerOptions 34384 * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel 34385 * @property {FilterTypes|boolean} debug filter for debug logging 34386 * @property {LoggerConsole} console the console to log to 34387 */ 34388 34389/** 34390 * @param {FilterItemTypes} item an input item 34391 * @returns {FilterFunction} filter function 34392 */ 34393var filterToFunction = function filterToFunction(item) { 34394 if (typeof item === "string") { 34395 var regExp = new RegExp("[\\\\/]".concat(item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)")); 34396 return function (ident) { 34397 return regExp.test(ident); 34398 }; 34399 } 34400 if (item && typeof item === "object" && typeof item.test === "function") { 34401 return function (ident) { 34402 return item.test(ident); 34403 }; 34404 } 34405 if (typeof item === "function") { 34406 return item; 34407 } 34408 if (typeof item === "boolean") { 34409 return function () { 34410 return item; 34411 }; 34412 } 34413}; 34414 34415/** 34416 * @enum {number} 34417 */ 34418var LogLevel = { 34419 none: 6, 34420 false: 6, 34421 error: 5, 34422 warn: 4, 34423 info: 3, 34424 log: 2, 34425 true: 2, 34426 verbose: 1 34427}; 34428 34429/** 34430 * @param {LoggerOptions} options options object 34431 * @returns {function(string, LogTypeEnum, any[]): void} logging function 34432 */ 34433module.exports = function (_ref) { 34434 var _ref$level = _ref.level, 34435 level = _ref$level === void 0 ? "info" : _ref$level, 34436 _ref$debug = _ref.debug, 34437 debug = _ref$debug === void 0 ? false : _ref$debug, 34438 console = _ref.console; 34439 var debugFilters = typeof debug === "boolean" ? [function () { 34440 return debug; 34441 }] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction); 34442 /** @type {number} */ 34443 var loglevel = LogLevel["".concat(level)] || 0; 34444 34445 /** 34446 * @param {string} name name of the logger 34447 * @param {LogTypeEnum} type type of the log entry 34448 * @param {any[]} args arguments of the log entry 34449 * @returns {void} 34450 */ 34451 var logger = function logger(name, type, args) { 34452 var labeledArgs = function labeledArgs() { 34453 if (Array.isArray(args)) { 34454 if (args.length > 0 && typeof args[0] === "string") { 34455 return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1))); 34456 } else { 34457 return ["[".concat(name, "]")].concat(_toConsumableArray(args)); 34458 } 34459 } else { 34460 return []; 34461 } 34462 }; 34463 var debug = debugFilters.some(function (f) { 34464 return f(name); 34465 }); 34466 switch (type) { 34467 case LogType.debug: 34468 if (!debug) return; 34469 if (typeof console.debug === "function") { 34470 console.debug.apply(console, _toConsumableArray(labeledArgs())); 34471 } else { 34472 console.log.apply(console, _toConsumableArray(labeledArgs())); 34473 } 34474 break; 34475 case LogType.log: 34476 if (!debug && loglevel > LogLevel.log) return; 34477 console.log.apply(console, _toConsumableArray(labeledArgs())); 34478 break; 34479 case LogType.info: 34480 if (!debug && loglevel > LogLevel.info) return; 34481 console.info.apply(console, _toConsumableArray(labeledArgs())); 34482 break; 34483 case LogType.warn: 34484 if (!debug && loglevel > LogLevel.warn) return; 34485 console.warn.apply(console, _toConsumableArray(labeledArgs())); 34486 break; 34487 case LogType.error: 34488 if (!debug && loglevel > LogLevel.error) return; 34489 console.error.apply(console, _toConsumableArray(labeledArgs())); 34490 break; 34491 case LogType.trace: 34492 if (!debug) return; 34493 console.trace(); 34494 break; 34495 case LogType.groupCollapsed: 34496 if (!debug && loglevel > LogLevel.log) return; 34497 if (!debug && loglevel > LogLevel.verbose) { 34498 if (typeof console.groupCollapsed === "function") { 34499 console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs())); 34500 } else { 34501 console.log.apply(console, _toConsumableArray(labeledArgs())); 34502 } 34503 break; 34504 } 34505 // falls through 34506 case LogType.group: 34507 if (!debug && loglevel > LogLevel.log) return; 34508 if (typeof console.group === "function") { 34509 console.group.apply(console, _toConsumableArray(labeledArgs())); 34510 } else { 34511 console.log.apply(console, _toConsumableArray(labeledArgs())); 34512 } 34513 break; 34514 case LogType.groupEnd: 34515 if (!debug && loglevel > LogLevel.log) return; 34516 if (typeof console.groupEnd === "function") { 34517 console.groupEnd(); 34518 } 34519 break; 34520 case LogType.time: 34521 { 34522 if (!debug && loglevel > LogLevel.log) return; 34523 var ms = args[1] * 1000 + args[2] / 1000000; 34524 var msg = "[".concat(name, "] ").concat(args[0], ": ").concat(ms, " ms"); 34525 if (typeof console.logTime === "function") { 34526 console.logTime(msg); 34527 } else { 34528 console.log(msg); 34529 } 34530 break; 34531 } 34532 case LogType.profile: 34533 if (typeof console.profile === "function") { 34534 console.profile.apply(console, _toConsumableArray(labeledArgs())); 34535 } 34536 break; 34537 case LogType.profileEnd: 34538 if (typeof console.profileEnd === "function") { 34539 console.profileEnd.apply(console, _toConsumableArray(labeledArgs())); 34540 } 34541 break; 34542 case LogType.clear: 34543 if (!debug && loglevel > LogLevel.log) return; 34544 if (typeof console.clear === "function") { 34545 console.clear(); 34546 } 34547 break; 34548 case LogType.status: 34549 if (!debug && loglevel > LogLevel.info) return; 34550 if (typeof console.status === "function") { 34551 if (args.length === 0) { 34552 console.status(); 34553 } else { 34554 console.status.apply(console, _toConsumableArray(labeledArgs())); 34555 } 34556 } else { 34557 if (args.length !== 0) { 34558 console.info.apply(console, _toConsumableArray(labeledArgs())); 34559 } 34560 } 34561 break; 34562 default: 34563 throw new Error("Unexpected LogType ".concat(type)); 34564 } 34565 }; 34566 return logger; 34567}; 34568 34569/***/ }), 34570
vendor: 5,804 bytes, lines 34571-34716
34571/***/ "./node_modules/webpack/lib/logging/runtime.js": 34572/*!*****************************************************!*\ 34573 !*** ./node_modules/webpack/lib/logging/runtime.js ***! 34574 \*****************************************************/ 34575/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_20369__) { 34576 34577/* 34578 MIT License http://www.opensource.org/licenses/mit-license.php 34579 Author Tobias Koppers @sokra 34580*/ 34581 34582 34583 34584function _extends() { 34585 _extends = Object.assign ? Object.assign.bind() : function (target) { 34586 for (var i = 1; i < arguments.length; i++) { 34587 var source = arguments[i]; 34588 for (var key in source) { 34589 if (Object.prototype.hasOwnProperty.call(source, key)) { 34590 target[key] = source[key]; 34591 } 34592 } 34593 } 34594 return target; 34595 }; 34596 return _extends.apply(this, arguments); 34597} 34598var _require = __nested_webpack_require_20369__(/*! tapable */ "./client-src/modules/logger/tapable.js"), 34599 SyncBailHook = _require.SyncBailHook; 34600var _require2 = __nested_webpack_require_20369__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"), 34601 Logger = _require2.Logger; 34602var createConsoleLogger = __nested_webpack_require_20369__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js"); 34603 34604/** @type {createConsoleLogger.LoggerOptions} */ 34605var currentDefaultLoggerOptions = { 34606 level: "info", 34607 debug: false, 34608 console: console 34609}; 34610var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions); 34611 34612/** 34613 * @param {string} name name of the logger 34614 * @returns {Logger} a logger 34615 */ 34616exports.getLogger = function (name) { 34617 return new Logger(function (type, args) { 34618 if (exports.hooks.log.call(name, type, args) === undefined) { 34619 currentDefaultLogger(name, type, args); 34620 } 34621 }, function (childName) { 34622 return exports.getLogger("".concat(name, "/").concat(childName)); 34623 }); 34624}; 34625 34626/** 34627 * @param {createConsoleLogger.LoggerOptions} options new options, merge with old options 34628 * @returns {void} 34629 */ 34630exports.configureDefaultLogger = function (options) { 34631 _extends(currentDefaultLoggerOptions, options); 34632 currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions); 34633}; 34634exports.hooks = { 34635 log: new SyncBailHook(["origin", "type", "args"]) 34636}; 34637 34638/***/ }) 34639 34640/******/ }); 34641/************************************************************************/ 34642/******/ // The module cache 34643/******/ var __webpack_module_cache__ = {}; 34644/******/ 34645/******/ // The require function 34646/******/ function __nested_webpack_require_22508__(moduleId) { 34647/******/ // Check if module is in cache 34648/******/ var cachedModule = __webpack_module_cache__[moduleId]; 34649/******/ if (cachedModule !== undefined) { 34650/******/ return cachedModule.exports; 34651/******/ } 34652/******/ // Create a new module (and put it into the cache) 34653/******/ var module = __webpack_module_cache__[moduleId] = { 34654/******/ // no module.id needed 34655/******/ // no module.loaded needed 34656/******/ exports: {} 34657/******/ }; 34658/******/ 34659/******/ // Execute the module function 34660/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_22508__); 34661/******/ 34662/******/ // Return the exports of the module 34663/******/ return module.exports; 34664/******/ } 34665/******/ 34666/************************************************************************/ 34667/******/ /* webpack/runtime/define property getters */ 34668/******/ !function() { 34669/******/ // define getter functions for harmony exports 34670/******/ __nested_webpack_require_22508__.d = function(exports, definition) { 34671/******/ for(var key in definition) { 34672/******/ if(__nested_webpack_require_22508__.o(definition, key) && !__nested_webpack_require_22508__.o(exports, key)) { 34673/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 34674/******/ } 34675/******/ } 34676/******/ }; 34677/******/ }(); 34678/******/ 34679/******/ /* webpack/runtime/hasOwnProperty shorthand */ 34680/******/ !function() { 34681/******/ __nested_webpack_require_22508__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 34682/******/ }(); 34683/******/ 34684/******/ /* webpack/runtime/make namespace object */ 34685/******/ !function() { 34686/******/ // define __esModule on exports 34687/******/ __nested_webpack_require_22508__.r = function(exports) { 34688/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 34689/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 34690/******/ } 34691/******/ Object.defineProperty(exports, '__esModule', { value: true }); 34692/******/ }; 34693/******/ }(); 34694/******/ 34695/************************************************************************/ 34696var __nested_webpack_exports__ = {}; 34697// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 34698!function() { 34699/*!********************************************!*\ 34700 !*** ./client-src/modules/logger/index.js ***! 34701 \********************************************/ 34702__nested_webpack_require_22508__.r(__nested_webpack_exports__); 34703/* harmony export */ __nested_webpack_require_22508__.d(__nested_webpack_exports__, { 34704/* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; } 34705/* harmony export */ }); 34706/* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_22508__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js"); 34707 34708}(); 34709var __webpack_export_target__ = exports; 34710for(var i in __nested_webpack_exports__) __webpack_export_target__[i] = __nested_webpack_exports__[i]; 34711if(__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); 34712/******/ })() 34713; 34714 34715/***/ }), 34716
vendor: 13,413 bytes, lines 34717-35006
34717/***/ "./node_modules/webpack-dev-server/client/overlay.js": 34718/*!***********************************************************!*\ 34719 !*** ./node_modules/webpack-dev-server/client/overlay.js ***! 34720 \***********************************************************/ 34721/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 34722 34723"use strict"; 34724__webpack_require__.r(__webpack_exports__); 34725/* harmony export */ __webpack_require__.d(__webpack_exports__, { 34726/* harmony export */ createOverlay: () => (/* binding */ createOverlay), 34727/* harmony export */ formatProblem: () => (/* binding */ formatProblem) 34728/* harmony export */ }); 34729/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ansi-html-community */ "./node_modules/ansi-html-community/index.js"); 34730/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ansi_html_community__WEBPACK_IMPORTED_MODULE_0__); 34731/* harmony import */ var html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! html-entities */ "./node_modules/html-entities/lib/index.js"); 34732/* harmony import */ var html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(html_entities__WEBPACK_IMPORTED_MODULE_4__); 34733/* harmony import */ var _overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./overlay/runtime-error.js */ "./node_modules/webpack-dev-server/client/overlay/runtime-error.js"); 34734/* harmony import */ var _overlay_state_machine_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./overlay/state-machine.js */ "./node_modules/webpack-dev-server/client/overlay/state-machine.js"); 34735/* harmony import */ var _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./overlay/styles.js */ "./node_modules/webpack-dev-server/client/overlay/styles.js"); 34736function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 34737function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 34738function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 34739function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 34740function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 34741// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app) 34742// They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware). 34743 34744 34745 34746 34747 34748 34749var colors = { 34750 reset: ["transparent", "transparent"], 34751 black: "181818", 34752 red: "E36049", 34753 green: "B3CB74", 34754 yellow: "FFD080", 34755 blue: "7CAFC2", 34756 magenta: "7FACCA", 34757 cyan: "C3C2EF", 34758 lightgrey: "EBE7E3", 34759 darkgrey: "6D7891" 34760}; 34761ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default().setColors(colors); 34762 34763/** 34764 * @param {string} type 34765 * @param {string | { file?: string, moduleName?: string, loc?: string, message?: string; stack?: string[] }} item 34766 * @returns {{ header: string, body: string }} 34767 */ 34768function formatProblem(type, item) { 34769 var header = type === "warning" ? "WARNING" : "ERROR"; 34770 var body = ""; 34771 if (typeof item === "string") { 34772 body += item; 34773 } else { 34774 var file = item.file || ""; 34775 // eslint-disable-next-line no-nested-ternary 34776 var moduleName = item.moduleName ? item.moduleName.indexOf("!") !== -1 ? "".concat(item.moduleName.replace(/^(\s|\S)*!/, ""), " (").concat(item.moduleName, ")") : "".concat(item.moduleName) : ""; 34777 var loc = item.loc; 34778 header += "".concat(moduleName || file ? " in ".concat(moduleName ? "".concat(moduleName).concat(file ? " (".concat(file, ")") : "") : file).concat(loc ? " ".concat(loc) : "") : ""); 34779 body += item.message || ""; 34780 } 34781 if (Array.isArray(item.stack)) { 34782 item.stack.forEach(function (stack) { 34783 if (typeof stack === "string") { 34784 body += "\r\n".concat(stack); 34785 } 34786 }); 34787 } 34788 return { 34789 header: header, 34790 body: body 34791 }; 34792} 34793 34794/** 34795 * @typedef {Object} CreateOverlayOptions 34796 * @property {string | null} trustedTypesPolicyName 34797 * @property {boolean | (error: Error) => void} [catchRuntimeError] 34798 */ 34799 34800/** 34801 * 34802 * @param {CreateOverlayOptions} options 34803 */ 34804var createOverlay = function createOverlay(options) { 34805 /** @type {HTMLIFrameElement | null | undefined} */ 34806 var iframeContainerElement; 34807 /** @type {HTMLDivElement | null | undefined} */ 34808 var containerElement; 34809 /** @type {HTMLDivElement | null | undefined} */ 34810 var headerElement; 34811 /** @type {Array<(element: HTMLDivElement) => void>} */ 34812 var onLoadQueue = []; 34813 /** @type {TrustedTypePolicy | undefined} */ 34814 var overlayTrustedTypesPolicy; 34815 34816 /** 34817 * 34818 * @param {HTMLElement} element 34819 * @param {CSSStyleDeclaration} style 34820 */ 34821 function applyStyle(element, style) { 34822 Object.keys(style).forEach(function (prop) { 34823 element.style[prop] = style[prop]; 34824 }); 34825 } 34826 34827 /** 34828 * @param {string | null} trustedTypesPolicyName 34829 */ 34830 function createContainer(trustedTypesPolicyName) { 34831 // Enable Trusted Types if they are available in the current browser. 34832 if (window.trustedTypes) { 34833 overlayTrustedTypesPolicy = window.trustedTypes.createPolicy(trustedTypesPolicyName || "webpack-dev-server#overlay", { 34834 createHTML: function createHTML(value) { 34835 return value; 34836 } 34837 }); 34838 } 34839 iframeContainerElement = document.createElement("iframe"); 34840 iframeContainerElement.id = "webpack-dev-server-client-overlay"; 34841 iframeContainerElement.src = "about:blank"; 34842 applyStyle(iframeContainerElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.iframeStyle); 34843 iframeContainerElement.onload = function () { 34844 var contentElement = /** @type {Document} */ 34845 ( /** @type {HTMLIFrameElement} */ 34846 iframeContainerElement.contentDocument).createElement("div"); 34847 containerElement = /** @type {Document} */ 34848 ( /** @type {HTMLIFrameElement} */ 34849 iframeContainerElement.contentDocument).createElement("div"); 34850 contentElement.id = "webpack-dev-server-client-overlay-div"; 34851 applyStyle(contentElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.containerStyle); 34852 headerElement = document.createElement("div"); 34853 headerElement.innerText = "Compiled with problems:"; 34854 applyStyle(headerElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.headerStyle); 34855 var closeButtonElement = document.createElement("button"); 34856 applyStyle(closeButtonElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.dismissButtonStyle); 34857 closeButtonElement.innerText = "Ã"; 34858 closeButtonElement.ariaLabel = "Dismiss"; 34859 closeButtonElement.addEventListener("click", function () { 34860 // eslint-disable-next-line no-use-before-define 34861 overlayService.send({ 34862 type: "DISMISS" 34863 }); 34864 }); 34865 contentElement.appendChild(headerElement); 34866 contentElement.appendChild(closeButtonElement); 34867 contentElement.appendChild(containerElement); 34868 34869 /** @type {Document} */ 34870 ( /** @type {HTMLIFrameElement} */ 34871 iframeContainerElement.contentDocument).body.appendChild(contentElement); 34872 onLoadQueue.forEach(function (onLoad) { 34873 onLoad( /** @type {HTMLDivElement} */contentElement); 34874 }); 34875 onLoadQueue = []; 34876 34877 /** @type {HTMLIFrameElement} */ 34878 iframeContainerElement.onload = null; 34879 }; 34880 document.body.appendChild(iframeContainerElement); 34881 } 34882 34883 /** 34884 * @param {(element: HTMLDivElement) => void} callback 34885 * @param {string | null} trustedTypesPolicyName 34886 */ 34887 function ensureOverlayExists(callback, trustedTypesPolicyName) { 34888 if (containerElement) { 34889 containerElement.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML("") : ""; 34890 // Everything is ready, call the callback right away. 34891 callback(containerElement); 34892 return; 34893 } 34894 onLoadQueue.push(callback); 34895 if (iframeContainerElement) { 34896 return; 34897 } 34898 createContainer(trustedTypesPolicyName); 34899 } 34900 34901 // Successful compilation. 34902 function hide() { 34903 if (!iframeContainerElement) { 34904 return; 34905 } 34906 34907 // Clean up and reset internal state. 34908 document.body.removeChild(iframeContainerElement); 34909 iframeContainerElement = null; 34910 containerElement = null; 34911 } 34912 34913 // Compilation with errors (e.g. syntax error or missing modules). 34914 /** 34915 * @param {string} type 34916 * @param {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages 34917 * @param {string | null} trustedTypesPolicyName 34918 * @param {'build' | 'runtime'} messageSource 34919 */ 34920 function show(type, messages, trustedTypesPolicyName, messageSource) { 34921 ensureOverlayExists(function () { 34922 headerElement.innerText = messageSource === "runtime" ? "Uncaught runtime errors:" : "Compiled with problems:"; 34923 messages.forEach(function (message) { 34924 var entryElement = document.createElement("div"); 34925 var msgStyle = type === "warning" ? _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgStyles.warning : _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgStyles.error; 34926 applyStyle(entryElement, _objectSpread(_objectSpread({}, msgStyle), {}, { 34927 padding: "1rem 1rem 1.5rem 1rem" 34928 })); 34929 var typeElement = document.createElement("div"); 34930 var _formatProblem = formatProblem(type, message), 34931 header = _formatProblem.header, 34932 body = _formatProblem.body; 34933 typeElement.innerText = header; 34934 applyStyle(typeElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgTypeStyle); 34935 if (message.moduleIdentifier) { 34936 applyStyle(typeElement, { 34937 cursor: "pointer" 34938 }); 34939 // element.dataset not supported in IE 34940 typeElement.setAttribute("data-can-open", true); 34941 typeElement.addEventListener("click", function () { 34942 fetch("/webpack-dev-server/open-editor?fileName=".concat(message.moduleIdentifier)); 34943 }); 34944 } 34945 34946 // Make it look similar to our terminal. 34947 var text = ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default()((0,html_entities__WEBPACK_IMPORTED_MODULE_4__.encode)(body)); 34948 var messageTextNode = document.createElement("div"); 34949 applyStyle(messageTextNode, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgTextStyle); 34950 messageTextNode.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML(text) : text; 34951 entryElement.appendChild(typeElement); 34952 entryElement.appendChild(messageTextNode); 34953 34954 /** @type {HTMLDivElement} */ 34955 containerElement.appendChild(entryElement); 34956 }); 34957 }, trustedTypesPolicyName); 34958 } 34959 var overlayService = (0,_overlay_state_machine_js__WEBPACK_IMPORTED_MODULE_2__["default"])({ 34960 showOverlay: function showOverlay(_ref) { 34961 var _ref$level = _ref.level, 34962 level = _ref$level === void 0 ? "error" : _ref$level, 34963 messages = _ref.messages, 34964 messageSource = _ref.messageSource; 34965 return show(level, messages, options.trustedTypesPolicyName, messageSource); 34966 }, 34967 hideOverlay: hide 34968 }); 34969 if (options.catchRuntimeError) { 34970 /** 34971 * @param {Error | undefined} error 34972 * @param {string} fallbackMessage 34973 */ 34974 var handleError = function handleError(error, fallbackMessage) { 34975 var errorObject = error instanceof Error ? error : new Error(error || fallbackMessage); 34976 var shouldDisplay = typeof options.catchRuntimeError === "function" ? options.catchRuntimeError(errorObject) : true; 34977 if (shouldDisplay) { 34978 overlayService.send({ 34979 type: "RUNTIME_ERROR", 34980 messages: [{ 34981 message: errorObject.message, 34982 stack: (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.parseErrorToStacks)(errorObject) 34983 }] 34984 }); 34985 } 34986 }; 34987 (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.listenToRuntimeError)(function (errorEvent) { 34988 // error property may be empty in older browser like IE 34989 var error = errorEvent.error, 34990 message = errorEvent.message; 34991 if (!error && !message) { 34992 return; 34993 } 34994 handleError(error, message); 34995 }); 34996 (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.listenToUnhandledRejection)(function (promiseRejectionEvent) { 34997 var reason = promiseRejectionEvent.reason; 34998 handleError(reason, "Unknown promise rejection reason"); 34999 }); 35000 } 35001 return overlayService; 35002}; 35003 35004 35005/***/ }), 35006
vendor: 4,245 bytes, lines 35007-35084
35007/***/ "./node_modules/webpack-dev-server/client/overlay/fsm.js": 35008/*!***************************************************************!*\ 35009 !*** ./node_modules/webpack-dev-server/client/overlay/fsm.js ***! 35010 \***************************************************************/ 35011/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35012 35013"use strict"; 35014__webpack_require__.r(__webpack_exports__); 35015/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35016/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35017/* harmony export */ }); 35018function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } 35019function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } 35020function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 35021function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } 35022function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 35023/** 35024 * @typedef {Object} StateDefinitions 35025 * @property {{[event: string]: { target: string; actions?: Array<string> }}} [on] 35026 */ 35027 35028/** 35029 * @typedef {Object} Options 35030 * @property {{[state: string]: StateDefinitions}} states 35031 * @property {object} context; 35032 * @property {string} initial 35033 */ 35034 35035/** 35036 * @typedef {Object} Implementation 35037 * @property {{[actionName: string]: (ctx: object, event: any) => object}} actions 35038 */ 35039 35040/** 35041 * A simplified `createMachine` from `@xstate/fsm` with the following differences: 35042 * 35043 * - the returned machine is technically a "service". No `interpret(machine).start()` is needed. 35044 * - the state definition only support `on` and target must be declared with { target: 'nextState', actions: [] } explicitly. 35045 * - event passed to `send` must be an object with `type` property. 35046 * - actions implementation will be [assign action](https://xstate.js.org/docs/guides/context.html#assign-action) if you return any value. 35047 * Do not return anything if you just want to invoke side effect. 35048 * 35049 * The goal of this custom function is to avoid installing the entire `'xstate/fsm'` package, while enabling modeling using 35050 * state machine. You can copy the first parameter into the editor at https://stately.ai/viz to visualize the state machine. 35051 * 35052 * @param {Options} options 35053 * @param {Implementation} implementation 35054 */ 35055function createMachine(_ref, _ref2) { 35056 var states = _ref.states, 35057 context = _ref.context, 35058 initial = _ref.initial; 35059 var actions = _ref2.actions; 35060 var currentState = initial; 35061 var currentContext = context; 35062 return { 35063 send: function send(event) { 35064 var currentStateOn = states[currentState].on; 35065 var transitionConfig = currentStateOn && currentStateOn[event.type]; 35066 if (transitionConfig) { 35067 currentState = transitionConfig.target; 35068 if (transitionConfig.actions) { 35069 transitionConfig.actions.forEach(function (actName) { 35070 var actionImpl = actions[actName]; 35071 var nextContextValue = actionImpl && actionImpl(currentContext, event); 35072 if (nextContextValue) { 35073 currentContext = _objectSpread(_objectSpread({}, currentContext), nextContextValue); 35074 } 35075 }); 35076 } 35077 } 35078 } 35079 }; 35080} 35081/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createMachine); 35082 35083/***/ }), 35084
vendor: 1,871 bytes, lines 35085-35147
35085/***/ "./node_modules/webpack-dev-server/client/overlay/runtime-error.js": 35086/*!*************************************************************************!*\ 35087 !*** ./node_modules/webpack-dev-server/client/overlay/runtime-error.js ***! 35088 \*************************************************************************/ 35089/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35090 35091"use strict"; 35092__webpack_require__.r(__webpack_exports__); 35093/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35094/* harmony export */ listenToRuntimeError: () => (/* binding */ listenToRuntimeError), 35095/* harmony export */ listenToUnhandledRejection: () => (/* binding */ listenToUnhandledRejection), 35096/* harmony export */ parseErrorToStacks: () => (/* binding */ parseErrorToStacks) 35097/* harmony export */ }); 35098/** 35099 * 35100 * @param {Error} error 35101 */ 35102function parseErrorToStacks(error) { 35103 if (!error || !(error instanceof Error)) { 35104 throw new Error("parseErrorToStacks expects Error object"); 35105 } 35106 if (typeof error.stack === "string") { 35107 return error.stack.split("\n").filter(function (stack) { 35108 return stack !== "Error: ".concat(error.message); 35109 }); 35110 } 35111} 35112 35113/** 35114 * @callback ErrorCallback 35115 * @param {ErrorEvent} error 35116 * @returns {void} 35117 */ 35118 35119/** 35120 * @param {ErrorCallback} callback 35121 */ 35122function listenToRuntimeError(callback) { 35123 window.addEventListener("error", callback); 35124 return function cleanup() { 35125 window.removeEventListener("error", callback); 35126 }; 35127} 35128 35129/** 35130 * @callback UnhandledRejectionCallback 35131 * @param {PromiseRejectionEvent} rejectionEvent 35132 * @returns {void} 35133 */ 35134 35135/** 35136 * @param {UnhandledRejectionCallback} callback 35137 */ 35138function listenToUnhandledRejection(callback) { 35139 window.addEventListener("unhandledrejection", callback); 35140 return function cleanup() { 35141 window.removeEventListener("unhandledrejection", callback); 35142 }; 35143} 35144 35145 35146/***/ }), 35147
vendor: 3,620 bytes, lines 35148-35262
35148/***/ "./node_modules/webpack-dev-server/client/overlay/state-machine.js": 35149/*!*************************************************************************!*\ 35150 !*** ./node_modules/webpack-dev-server/client/overlay/state-machine.js ***! 35151 \*************************************************************************/ 35152/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35153 35154"use strict"; 35155__webpack_require__.r(__webpack_exports__); 35156/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35157/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35158/* harmony export */ }); 35159/* harmony import */ var _fsm_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fsm.js */ "./node_modules/webpack-dev-server/client/overlay/fsm.js"); 35160 35161 35162/** 35163 * @typedef {Object} ShowOverlayData 35164 * @property {'warning' | 'error'} level 35165 * @property {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages 35166 * @property {'build' | 'runtime'} messageSource 35167 */ 35168 35169/** 35170 * @typedef {Object} CreateOverlayMachineOptions 35171 * @property {(data: ShowOverlayData) => void} showOverlay 35172 * @property {() => void} hideOverlay 35173 */ 35174 35175/** 35176 * @param {CreateOverlayMachineOptions} options 35177 */ 35178var createOverlayMachine = function createOverlayMachine(options) { 35179 var hideOverlay = options.hideOverlay, 35180 showOverlay = options.showOverlay; 35181 var overlayMachine = (0,_fsm_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ 35182 initial: "hidden", 35183 context: { 35184 level: "error", 35185 messages: [], 35186 messageSource: "build" 35187 }, 35188 states: { 35189 hidden: { 35190 on: { 35191 BUILD_ERROR: { 35192 target: "displayBuildError", 35193 actions: ["setMessages", "showOverlay"] 35194 }, 35195 RUNTIME_ERROR: { 35196 target: "displayRuntimeError", 35197 actions: ["setMessages", "showOverlay"] 35198 } 35199 } 35200 }, 35201 displayBuildError: { 35202 on: { 35203 DISMISS: { 35204 target: "hidden", 35205 actions: ["dismissMessages", "hideOverlay"] 35206 }, 35207 BUILD_ERROR: { 35208 target: "displayBuildError", 35209 actions: ["appendMessages", "showOverlay"] 35210 } 35211 } 35212 }, 35213 displayRuntimeError: { 35214 on: { 35215 DISMISS: { 35216 target: "hidden", 35217 actions: ["dismissMessages", "hideOverlay"] 35218 }, 35219 RUNTIME_ERROR: { 35220 target: "displayRuntimeError", 35221 actions: ["appendMessages", "showOverlay"] 35222 }, 35223 BUILD_ERROR: { 35224 target: "displayBuildError", 35225 actions: ["setMessages", "showOverlay"] 35226 } 35227 } 35228 } 35229 } 35230 }, { 35231 actions: { 35232 dismissMessages: function dismissMessages() { 35233 return { 35234 messages: [], 35235 level: "error", 35236 messageSource: "build" 35237 }; 35238 }, 35239 appendMessages: function appendMessages(context, event) { 35240 return { 35241 messages: context.messages.concat(event.messages), 35242 level: event.level || context.level, 35243 messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build" 35244 }; 35245 }, 35246 setMessages: function setMessages(context, event) { 35247 return { 35248 messages: event.messages, 35249 level: event.level || context.level, 35250 messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build" 35251 }; 35252 }, 35253 hideOverlay: hideOverlay, 35254 showOverlay: showOverlay 35255 } 35256 }); 35257 return overlayMachine; 35258}; 35259/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createOverlayMachine); 35260 35261/***/ }), 35262
vendor: 2,446 bytes, lines 35263-35356
35263/***/ "./node_modules/webpack-dev-server/client/overlay/styles.js": 35264/*!******************************************************************!*\ 35265 !*** ./node_modules/webpack-dev-server/client/overlay/styles.js ***! 35266 \******************************************************************/ 35267/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35268 35269"use strict"; 35270__webpack_require__.r(__webpack_exports__); 35271/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35272/* harmony export */ containerStyle: () => (/* binding */ containerStyle), 35273/* harmony export */ dismissButtonStyle: () => (/* binding */ dismissButtonStyle), 35274/* harmony export */ headerStyle: () => (/* binding */ headerStyle), 35275/* harmony export */ iframeStyle: () => (/* binding */ iframeStyle), 35276/* harmony export */ msgStyles: () => (/* binding */ msgStyles), 35277/* harmony export */ msgTextStyle: () => (/* binding */ msgTextStyle), 35278/* harmony export */ msgTypeStyle: () => (/* binding */ msgTypeStyle) 35279/* harmony export */ }); 35280// styles are inspired by `react-error-overlay` 35281 35282var msgStyles = { 35283 error: { 35284 backgroundColor: "rgba(206, 17, 38, 0.1)", 35285 color: "#fccfcf" 35286 }, 35287 warning: { 35288 backgroundColor: "rgba(251, 245, 180, 0.1)", 35289 color: "#fbf5b4" 35290 } 35291}; 35292var iframeStyle = { 35293 position: "fixed", 35294 top: 0, 35295 left: 0, 35296 right: 0, 35297 bottom: 0, 35298 width: "100vw", 35299 height: "100vh", 35300 border: "none", 35301 "z-index": 9999999999 35302}; 35303var containerStyle = { 35304 position: "fixed", 35305 boxSizing: "border-box", 35306 left: 0, 35307 top: 0, 35308 right: 0, 35309 bottom: 0, 35310 width: "100vw", 35311 height: "100vh", 35312 fontSize: "large", 35313 padding: "2rem 2rem 4rem 2rem", 35314 lineHeight: "1.2", 35315 whiteSpace: "pre-wrap", 35316 overflow: "auto", 35317 backgroundColor: "rgba(0, 0, 0, 0.9)", 35318 color: "white" 35319}; 35320var headerStyle = { 35321 color: "#e83b46", 35322 fontSize: "2em", 35323 whiteSpace: "pre-wrap", 35324 fontFamily: "sans-serif", 35325 margin: "0 2rem 2rem 0", 35326 flex: "0 0 auto", 35327 maxHeight: "50%", 35328 overflow: "auto" 35329}; 35330var dismissButtonStyle = { 35331 color: "#ffffff", 35332 lineHeight: "1rem", 35333 fontSize: "1.5rem", 35334 padding: "1rem", 35335 cursor: "pointer", 35336 position: "absolute", 35337 right: 0, 35338 top: 0, 35339 backgroundColor: "transparent", 35340 border: "none" 35341}; 35342var msgTypeStyle = { 35343 color: "#e83b46", 35344 fontSize: "1.2em", 35345 marginBottom: "1rem", 35346 fontFamily: "sans-serif" 35347}; 35348var msgTextStyle = { 35349 lineHeight: "1.5", 35350 fontSize: "1rem", 35351 fontFamily: "Menlo, Consolas, monospace" 35352}; 35353 35354 35355/***/ }), 35356
vendor: 3,315 bytes, lines 35357-35440
35357/***/ "./node_modules/webpack-dev-server/client/socket.js": 35358/*!**********************************************************!*\ 35359 !*** ./node_modules/webpack-dev-server/client/socket.js ***! 35360 \**********************************************************/ 35361/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35362 35363"use strict"; 35364__webpack_require__.r(__webpack_exports__); 35365/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35366/* harmony export */ client: () => (/* binding */ client), 35367/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35368/* harmony export */ }); 35369/* harmony import */ var _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js"); 35370/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js"); 35371/* provided dependency */ var __webpack_dev_server_client__ = __webpack_require__(/*! ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js"); 35372/* global __webpack_dev_server_client__ */ 35373 35374 35375 35376 35377// this WebsocketClient is here as a default fallback, in case the client is not injected 35378/* eslint-disable camelcase */ 35379var Client = 35380// eslint-disable-next-line no-nested-ternary 35381typeof __webpack_dev_server_client__ !== "undefined" ? typeof __webpack_dev_server_client__.default !== "undefined" ? __webpack_dev_server_client__.default : __webpack_dev_server_client__ : _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__["default"]; 35382/* eslint-enable camelcase */ 35383 35384var retries = 0; 35385var maxRetries = 10; 35386 35387// Initialized client is exported so external consumers can utilize the same instance 35388// It is mutable to enforce singleton 35389// eslint-disable-next-line import/no-mutable-exports 35390var client = null; 35391 35392/** 35393 * @param {string} url 35394 * @param {{ [handler: string]: (data?: any, params?: any) => any }} handlers 35395 * @param {number} [reconnect] 35396 */ 35397var socket = function initSocket(url, handlers, reconnect) { 35398 client = new Client(url); 35399 client.onOpen(function () { 35400 retries = 0; 35401 if (typeof reconnect !== "undefined") { 35402 maxRetries = reconnect; 35403 } 35404 }); 35405 client.onClose(function () { 35406 if (retries === 0) { 35407 handlers.close(); 35408 } 35409 35410 // Try to reconnect. 35411 client = null; 35412 35413 // After 10 retries stop trying, to prevent logspam. 35414 if (retries < maxRetries) { 35415 // Exponentially increase timeout to reconnect. 35416 // Respectfully copied from the package `got`. 35417 // eslint-disable-next-line no-restricted-properties 35418 var retryInMs = 1000 * Math.pow(2, retries) + Math.random() * 100; 35419 retries += 1; 35420 _utils_log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("Trying to reconnect..."); 35421 setTimeout(function () { 35422 socket(url, handlers, reconnect); 35423 }, retryInMs); 35424 } 35425 }); 35426 client.onMessage( 35427 /** 35428 * @param {any} data 35429 */ 35430 function (data) { 35431 var message = JSON.parse(data); 35432 if (handlers[message.type]) { 35433 handlers[message.type](message.data, message.params); 35434 } 35435 }); 35436}; 35437/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (socket); 35438 35439/***/ }), 35440
vendor: 5,046 bytes, lines 35441-35575
35441/***/ "./node_modules/webpack-dev-server/client/utils/createSocketURL.js": 35442/*!*************************************************************************!*\ 35443 !*** ./node_modules/webpack-dev-server/client/utils/createSocketURL.js ***! 35444 \*************************************************************************/ 35445/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35446 35447"use strict"; 35448__webpack_require__.r(__webpack_exports__); 35449/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35450/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35451/* harmony export */ }); 35452/** 35453 * @param {{ protocol?: string, auth?: string, hostname?: string, port?: string, pathname?: string, search?: string, hash?: string, slashes?: boolean }} objURL 35454 * @returns {string} 35455 */ 35456function format(objURL) { 35457 var protocol = objURL.protocol || ""; 35458 if (protocol && protocol.substr(-1) !== ":") { 35459 protocol += ":"; 35460 } 35461 var auth = objURL.auth || ""; 35462 if (auth) { 35463 auth = encodeURIComponent(auth); 35464 auth = auth.replace(/%3A/i, ":"); 35465 auth += "@"; 35466 } 35467 var host = ""; 35468 if (objURL.hostname) { 35469 host = auth + (objURL.hostname.indexOf(":") === -1 ? objURL.hostname : "[".concat(objURL.hostname, "]")); 35470 if (objURL.port) { 35471 host += ":".concat(objURL.port); 35472 } 35473 } 35474 var pathname = objURL.pathname || ""; 35475 if (objURL.slashes) { 35476 host = "//".concat(host || ""); 35477 if (pathname && pathname.charAt(0) !== "/") { 35478 pathname = "/".concat(pathname); 35479 } 35480 } else if (!host) { 35481 host = ""; 35482 } 35483 var search = objURL.search || ""; 35484 if (search && search.charAt(0) !== "?") { 35485 search = "?".concat(search); 35486 } 35487 var hash = objURL.hash || ""; 35488 if (hash && hash.charAt(0) !== "#") { 35489 hash = "#".concat(hash); 35490 } 35491 pathname = pathname.replace(/[?#]/g, 35492 /** 35493 * @param {string} match 35494 * @returns {string} 35495 */ 35496 function (match) { 35497 return encodeURIComponent(match); 35498 }); 35499 search = search.replace("#", "%23"); 35500 return "".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash); 35501} 35502 35503/** 35504 * @param {URL & { fromCurrentScript?: boolean }} parsedURL 35505 * @returns {string} 35506 */ 35507function createSocketURL(parsedURL) { 35508 var hostname = parsedURL.hostname; 35509 35510 // Node.js module parses it as `::` 35511 // `new URL(urlString, [baseURLString])` parses it as '[::]' 35512 var isInAddrAny = hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]"; 35513 35514 // why do we need this check? 35515 // hostname n/a for file protocol (example, when using electron, ionic) 35516 // see: https://github.com/webpack/webpack-dev-server/pull/384 35517 if (isInAddrAny && self.location.hostname && self.location.protocol.indexOf("http") === 0) { 35518 hostname = self.location.hostname; 35519 } 35520 var socketURLProtocol = parsedURL.protocol || self.location.protocol; 35521 35522 // When https is used in the app, secure web sockets are always necessary because the browser doesn't accept non-secure web sockets. 35523 if (socketURLProtocol === "auto:" || hostname && isInAddrAny && self.location.protocol === "https:") { 35524 socketURLProtocol = self.location.protocol; 35525 } 35526 socketURLProtocol = socketURLProtocol.replace(/^(?:http|.+-extension|file)/i, "ws"); 35527 var socketURLAuth = ""; 35528 35529 // `new URL(urlString, [baseURLstring])` doesn't have `auth` property 35530 // Parse authentication credentials in case we need them 35531 if (parsedURL.username) { 35532 socketURLAuth = parsedURL.username; 35533 35534 // Since HTTP basic authentication does not allow empty username, 35535 // we only include password if the username is not empty. 35536 if (parsedURL.password) { 35537 // Result: <username>:<password> 35538 socketURLAuth = socketURLAuth.concat(":", parsedURL.password); 35539 } 35540 } 35541 35542 // In case the host is a raw IPv6 address, it can be enclosed in 35543 // the brackets as the brackets are needed in the final URL string. 35544 // Need to remove those as url.format blindly adds its own set of brackets 35545 // if the host string contains colons. That would lead to non-working 35546 // double brackets (e.g. [[::]]) host 35547 // 35548 // All of these web socket url params are optionally passed in through resourceQuery, 35549 // so we need to fall back to the default if they are not provided 35550 var socketURLHostname = (hostname || self.location.hostname || "localhost").replace(/^\[(.*)\]$/, "$1"); 35551 var socketURLPort = parsedURL.port; 35552 if (!socketURLPort || socketURLPort === "0") { 35553 socketURLPort = self.location.port; 35554 } 35555 35556 // If path is provided it'll be passed in via the resourceQuery as a 35557 // query param so it has to be parsed out of the querystring in order for the 35558 // client to open the socket to the correct location. 35559 var socketURLPathname = "/ws"; 35560 if (parsedURL.pathname && !parsedURL.fromCurrentScript) { 35561 socketURLPathname = parsedURL.pathname; 35562 } 35563 return format({ 35564 protocol: socketURLProtocol, 35565 auth: socketURLAuth, 35566 hostname: socketURLHostname, 35567 port: socketURLPort, 35568 pathname: socketURLPathname, 35569 slashes: true 35570 }); 35571} 35572/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createSocketURL); 35573 35574/***/ }), 35575
vendor: 1,570 bytes, lines 35576-35613
35576/***/ "./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js": 35577/*!********************************************************************************!*\ 35578 !*** ./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js ***! 35579 \********************************************************************************/ 35580/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35581 35582"use strict"; 35583__webpack_require__.r(__webpack_exports__); 35584/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35585/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35586/* harmony export */ }); 35587/** 35588 * @returns {string} 35589 */ 35590function getCurrentScriptSource() { 35591 // `document.currentScript` is the most accurate way to find the current script, 35592 // but is not supported in all browsers. 35593 if (document.currentScript) { 35594 return document.currentScript.getAttribute("src"); 35595 } 35596 35597 // Fallback to getting all scripts running in the document. 35598 var scriptElements = document.scripts || []; 35599 var scriptElementsWithSrc = Array.prototype.filter.call(scriptElements, function (element) { 35600 return element.getAttribute("src"); 35601 }); 35602 if (scriptElementsWithSrc.length > 0) { 35603 var currentScript = scriptElementsWithSrc[scriptElementsWithSrc.length - 1]; 35604 return currentScript.getAttribute("src"); 35605 } 35606 35607 // Fail as there was no script to use. 35608 throw new Error("[webpack-dev-server] Failed to get current script source."); 35609} 35610/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getCurrentScriptSource); 35611 35612/***/ }), 35613
vendor: 2,291 bytes, lines 35614-35666
35614/***/ "./node_modules/webpack-dev-server/client/utils/log.js": 35615/*!*************************************************************!*\ 35616 !*** ./node_modules/webpack-dev-server/client/utils/log.js ***! 35617 \*************************************************************/ 35618/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35619 35620"use strict"; 35621__webpack_require__.r(__webpack_exports__); 35622/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35623/* harmony export */ log: () => (/* binding */ log), 35624/* harmony export */ logEnabledFeatures: () => (/* binding */ logEnabledFeatures), 35625/* harmony export */ setLogLevel: () => (/* binding */ setLogLevel) 35626/* harmony export */ }); 35627/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger/index.js */ "./node_modules/webpack-dev-server/client/modules/logger/index.js"); 35628/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__); 35629 35630var name = "webpack-dev-server"; 35631// default level is set on the client side, so it does not need 35632// to be set by the CLI or API 35633var defaultLevel = "info"; 35634 35635// options new options, merge with old options 35636/** 35637 * @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level 35638 * @returns {void} 35639 */ 35640function setLogLevel(level) { 35641 _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().configureDefaultLogger({ 35642 level: level 35643 }); 35644} 35645setLogLevel(defaultLevel); 35646var log = _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().getLogger(name); 35647var logEnabledFeatures = function logEnabledFeatures(features) { 35648 var enabledFeatures = Object.keys(features); 35649 if (!features || enabledFeatures.length === 0) { 35650 return; 35651 } 35652 var logString = "Server started:"; 35653 35654 // Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled. 35655 for (var i = 0; i < enabledFeatures.length; i++) { 35656 var key = enabledFeatures[i]; 35657 logString += " ".concat(key, " ").concat(features[key] ? "enabled" : "disabled", ","); 35658 } 35659 // replace last comma with a period 35660 logString = logString.slice(0, -1).concat("."); 35661 log.info(logString); 35662}; 35663 35664 35665/***/ }), 35666
vendor: 2,125 bytes, lines 35667-35717
35667/***/ "./node_modules/webpack-dev-server/client/utils/parseURL.js": 35668/*!******************************************************************!*\ 35669 !*** ./node_modules/webpack-dev-server/client/utils/parseURL.js ***! 35670 \******************************************************************/ 35671/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35672 35673"use strict"; 35674__webpack_require__.r(__webpack_exports__); 35675/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35676/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35677/* harmony export */ }); 35678/* harmony import */ var _getCurrentScriptSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getCurrentScriptSource.js */ "./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js"); 35679 35680 35681/** 35682 * @param {string} resourceQuery 35683 * @returns {{ [key: string]: string | boolean }} 35684 */ 35685function parseURL(resourceQuery) { 35686 /** @type {{ [key: string]: string }} */ 35687 var options = {}; 35688 if (typeof resourceQuery === "string" && resourceQuery !== "") { 35689 var searchParams = resourceQuery.slice(1).split("&"); 35690 for (var i = 0; i < searchParams.length; i++) { 35691 var pair = searchParams[i].split("="); 35692 options[pair[0]] = decodeURIComponent(pair[1]); 35693 } 35694 } else { 35695 // Else, get the url from the <script> this file was called with. 35696 var scriptSource = (0,_getCurrentScriptSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])(); 35697 var scriptSourceURL; 35698 try { 35699 // The placeholder `baseURL` with `window.location.href`, 35700 // is to allow parsing of path-relative or protocol-relative URLs, 35701 // and will have no effect if `scriptSource` is a fully valid URL. 35702 scriptSourceURL = new URL(scriptSource, self.location.href); 35703 } catch (error) { 35704 // URL parsing failed, do nothing. 35705 // We will still proceed to see if we can recover using `resourceQuery` 35706 } 35707 if (scriptSourceURL) { 35708 options = scriptSourceURL; 35709 options.fromCurrentScript = true; 35710 } 35711 } 35712 return options; 35713} 35714/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parseURL); 35715 35716/***/ }), 35717
vendor: 3,283 bytes, lines 35718-35797
35718/***/ "./node_modules/webpack-dev-server/client/utils/reloadApp.js": 35719/*!*******************************************************************!*\ 35720 !*** ./node_modules/webpack-dev-server/client/utils/reloadApp.js ***! 35721 \*******************************************************************/ 35722/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35723 35724"use strict"; 35725__webpack_require__.r(__webpack_exports__); 35726/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35727/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35728/* harmony export */ }); 35729/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/emitter.js */ "./node_modules/webpack/hot/emitter.js"); 35730/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__); 35731/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./log.js */ "./node_modules/webpack-dev-server/client/utils/log.js"); 35732 35733 35734 35735/** @typedef {import("../index").Options} Options 35736/** @typedef {import("../index").Status} Status 35737 35738/** 35739 * @param {Options} options 35740 * @param {Status} status 35741 */ 35742function reloadApp(_ref, status) { 35743 var hot = _ref.hot, 35744 liveReload = _ref.liveReload; 35745 if (status.isUnloading) { 35746 return; 35747 } 35748 var currentHash = status.currentHash, 35749 previousHash = status.previousHash; 35750 var isInitial = currentHash.indexOf( /** @type {string} */previousHash) >= 0; 35751 if (isInitial) { 35752 return; 35753 } 35754 35755 /** 35756 * @param {Window} rootWindow 35757 * @param {number} intervalId 35758 */ 35759 function applyReload(rootWindow, intervalId) { 35760 clearInterval(intervalId); 35761 _log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("App updated. Reloading..."); 35762 rootWindow.location.reload(); 35763 } 35764 var search = self.location.search.toLowerCase(); 35765 var allowToHot = search.indexOf("webpack-dev-server-hot=false") === -1; 35766 var allowToLiveReload = search.indexOf("webpack-dev-server-live-reload=false") === -1; 35767 if (hot && allowToHot) { 35768 _log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("App hot update..."); 35769 webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default().emit("webpackHotUpdate", status.currentHash); 35770 if (typeof self !== "undefined" && self.window) { 35771 // broadcast update to window 35772 self.postMessage("webpackHotUpdate".concat(status.currentHash), "*"); 35773 } 35774 } 35775 // allow refreshing the page only if liveReload isn't disabled 35776 else if (liveReload && allowToLiveReload) { 35777 var rootWindow = self; 35778 35779 // use parent window for reload (in case we're in an iframe with no valid src) 35780 var intervalId = self.setInterval(function () { 35781 if (rootWindow.location.protocol !== "about:") { 35782 // reload immediately if protocol is valid 35783 applyReload(rootWindow, intervalId); 35784 } else { 35785 rootWindow = rootWindow.parent; 35786 if (rootWindow.parent === rootWindow) { 35787 // if parent equals current window we've reached the root which would continue forever, so trigger a reload anyways 35788 applyReload(rootWindow, intervalId); 35789 } 35790 } 35791 }); 35792 } 35793} 35794/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reloadApp); 35795 35796/***/ }), 35797
vendor: 1,093 bytes, lines 35798-35827
35798/***/ "./node_modules/webpack-dev-server/client/utils/sendMessage.js": 35799/*!*********************************************************************!*\ 35800 !*** ./node_modules/webpack-dev-server/client/utils/sendMessage.js ***! 35801 \*********************************************************************/ 35802/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35803 35804"use strict"; 35805__webpack_require__.r(__webpack_exports__); 35806/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35807/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35808/* harmony export */ }); 35809/* global __resourceQuery WorkerGlobalScope */ 35810 35811// Send messages to the outside, so plugins can consume it. 35812/** 35813 * @param {string} type 35814 * @param {any} [data] 35815 */ 35816function sendMsg(type, data) { 35817 if (typeof self !== "undefined" && (typeof WorkerGlobalScope === "undefined" || !(self instanceof WorkerGlobalScope))) { 35818 self.postMessage({ 35819 type: "webpack".concat(type), 35820 data: data 35821 }, "*"); 35822 } 35823} 35824/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sendMsg); 35825 35826/***/ }), 35827
vendor: 1,340 bytes, lines 35828-35859
35828/***/ "./node_modules/webpack-dev-server/client/utils/stripAnsi.js": 35829/*!*******************************************************************!*\ 35830 !*** ./node_modules/webpack-dev-server/client/utils/stripAnsi.js ***! 35831 \*******************************************************************/ 35832/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 35833 35834"use strict"; 35835__webpack_require__.r(__webpack_exports__); 35836/* harmony export */ __webpack_require__.d(__webpack_exports__, { 35837/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 35838/* harmony export */ }); 35839var ansiRegex = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"), "g"); 35840 35841/** 35842 * 35843 * Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. 35844 * Adapted from code originally released by Sindre Sorhus 35845 * Licensed the MIT License 35846 * 35847 * @param {string} string 35848 * @return {string} 35849 */ 35850function stripAnsi(string) { 35851 if (typeof string !== "string") { 35852 throw new TypeError("Expected a `string`, got `".concat(typeof string, "`")); 35853 } 35854 return string.replace(ansiRegex, ""); 35855} 35856/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stripAnsi); 35857 35858/***/ }), 35859
vendor: 2,391 bytes, lines 35860-35942
35860/***/ "./node_modules/webpack/hot/dev-server.js": 35861/*!************************************************!*\ 35862 !*** ./node_modules/webpack/hot/dev-server.js ***! 35863 \************************************************/ 35864/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 35865 35866/* 35867 MIT License http://www.opensource.org/licenses/mit-license.php 35868 Author Tobias Koppers @sokra 35869*/ 35870/* globals __webpack_hash__ */ 35871if (true) { 35872 /** @type {undefined|string} */ 35873 var lastHash; 35874 var upToDate = function upToDate() { 35875 return /** @type {string} */ (lastHash).indexOf(__webpack_require__.h()) >= 0; 35876 }; 35877 var log = __webpack_require__(/*! ./log */ "./node_modules/webpack/hot/log.js"); 35878 var check = function check() { 35879 module.hot 35880 .check(true) 35881 .then(function (updatedModules) { 35882 if (!updatedModules) { 35883 log( 35884 "warning", 35885 "[HMR] Cannot find update. " + 35886 (typeof window !== "undefined" 35887 ? "Need to do a full reload!" 35888 : "Please reload manually!") 35889 ); 35890 log( 35891 "warning", 35892 "[HMR] (Probably because of restarting the webpack-dev-server)" 35893 ); 35894 if (typeof window !== "undefined") { 35895 window.location.reload(); 35896 } 35897 return; 35898 } 35899 35900 if (!upToDate()) { 35901 check(); 35902 } 35903 35904 __webpack_require__(/*! ./log-apply-result */ "./node_modules/webpack/hot/log-apply-result.js")(updatedModules, updatedModules); 35905 35906 if (upToDate()) { 35907 log("info", "[HMR] App is up to date."); 35908 } 35909 }) 35910 .catch(function (err) { 35911 var status = module.hot.status(); 35912 if (["abort", "fail"].indexOf(status) >= 0) { 35913 log( 35914 "warning", 35915 "[HMR] Cannot apply update. " + 35916 (typeof window !== "undefined" 35917 ? "Need to do a full reload!" 35918 : "Please reload manually!") 35919 ); 35920 log("warning", "[HMR] " + log.formatError(err)); 35921 if (typeof window !== "undefined") { 35922 window.location.reload(); 35923 } 35924 } else { 35925 log("warning", "[HMR] Update failed: " + log.formatError(err)); 35926 } 35927 }); 35928 }; 35929 var hotEmitter = __webpack_require__(/*! ./emitter */ "./node_modules/webpack/hot/emitter.js"); 35930 hotEmitter.on("webpackHotUpdate", function (currentHash) { 35931 lastHash = currentHash; 35932 if (!upToDate() && module.hot.status() === "idle") { 35933 log("info", "[HMR] Checking for updates on the server..."); 35934 check(); 35935 } 35936 }); 35937 log("info", "[HMR] Waiting for update signal from WDS..."); 35938} else {} 35939 35940 35941/***/ }), 35942
vendor: 407 bytes, lines 35943-35954
35943/***/ "./node_modules/webpack/hot/emitter.js": 35944/*!*********************************************!*\ 35945 !*** ./node_modules/webpack/hot/emitter.js ***! 35946 \*********************************************/ 35947/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 35948 35949var EventEmitter = __webpack_require__(/*! events */ "./node_modules/events/events.js"); 35950module.exports = new EventEmitter(); 35951 35952 35953/***/ }), 35954
vendor: 1,832 bytes, lines 35955-36013
35955/***/ "./node_modules/webpack/hot/log-apply-result.js": 35956/*!******************************************************!*\ 35957 !*** ./node_modules/webpack/hot/log-apply-result.js ***! 35958 \******************************************************/ 35959/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 35960 35961/* 35962 MIT License http://www.opensource.org/licenses/mit-license.php 35963 Author Tobias Koppers @sokra 35964*/ 35965 35966/** 35967 * @param {(string | number)[]} updatedModules updated modules 35968 * @param {(string | number)[] | null} renewedModules renewed modules 35969 */ 35970module.exports = function (updatedModules, renewedModules) { 35971 var unacceptedModules = updatedModules.filter(function (moduleId) { 35972 return renewedModules && renewedModules.indexOf(moduleId) < 0; 35973 }); 35974 var log = __webpack_require__(/*! ./log */ "./node_modules/webpack/hot/log.js"); 35975 35976 if (unacceptedModules.length > 0) { 35977 log( 35978 "warning", 35979 "[HMR] The following modules couldn't be hot updated: (They would need a full reload!)" 35980 ); 35981 unacceptedModules.forEach(function (moduleId) { 35982 log("warning", "[HMR] - " + moduleId); 35983 }); 35984 } 35985 35986 if (!renewedModules || renewedModules.length === 0) { 35987 log("info", "[HMR] Nothing hot updated."); 35988 } else { 35989 log("info", "[HMR] Updated modules:"); 35990 renewedModules.forEach(function (moduleId) { 35991 if (typeof moduleId === "string" && moduleId.indexOf("!") !== -1) { 35992 var parts = moduleId.split("!"); 35993 log.groupCollapsed("info", "[HMR] - " + parts.pop()); 35994 log("info", "[HMR] - " + moduleId); 35995 log.groupEnd("info"); 35996 } else { 35997 log("info", "[HMR] - " + moduleId); 35998 } 35999 }); 36000 var numberIds = renewedModules.every(function (moduleId) { 36001 return typeof moduleId === "number"; 36002 }); 36003 if (numberIds) 36004 log( 36005 "info", 36006 '[HMR] Consider using the optimization.moduleIds: "named" for module names.' 36007 ); 36008 } 36009}; 36010 36011 36012/***/ }), 36013
vendor: 1,999 bytes, lines 36014-36102
36014/***/ "./node_modules/webpack/hot/log.js": 36015/*!*****************************************!*\ 36016 !*** ./node_modules/webpack/hot/log.js ***! 36017 \*****************************************/ 36018/***/ ((module) => { 36019 36020/** @typedef {"info" | "warning" | "error"} LogLevel */ 36021 36022/** @type {LogLevel} */ 36023var logLevel = "info"; 36024 36025function dummy() {} 36026 36027/** 36028 * @param {LogLevel} level log level 36029 * @returns {boolean} true, if should log 36030 */ 36031function shouldLog(level) { 36032 var shouldLog = 36033 (logLevel === "info" && level === "info") || 36034 (["info", "warning"].indexOf(logLevel) >= 0 && level === "warning") || 36035 (["info", "warning", "error"].indexOf(logLevel) >= 0 && level === "error"); 36036 return shouldLog; 36037} 36038 36039/** 36040 * @param {(msg?: string) => void} logFn log function 36041 * @returns {(level: LogLevel, msg?: string) => void} function that logs when log level is sufficient 36042 */ 36043function logGroup(logFn) { 36044 return function (level, msg) { 36045 if (shouldLog(level)) { 36046 logFn(msg); 36047 } 36048 }; 36049} 36050 36051/** 36052 * @param {LogLevel} level log level 36053 * @param {string|Error} msg message 36054 */ 36055module.exports = function (level, msg) { 36056 if (shouldLog(level)) { 36057 if (level === "info") { 36058 console.log(msg); 36059 } else if (level === "warning") { 36060 console.warn(msg); 36061 } else if (level === "error") { 36062 console.error(msg); 36063 } 36064 } 36065}; 36066 36067var group = console.group || dummy; 36068var groupCollapsed = console.groupCollapsed || dummy; 36069var groupEnd = console.groupEnd || dummy; 36070 36071module.exports.group = logGroup(group); 36072 36073module.exports.groupCollapsed = logGroup(groupCollapsed); 36074 36075module.exports.groupEnd = logGroup(groupEnd); 36076 36077/** 36078 * @param {LogLevel} level log level 36079 */ 36080module.exports.setLogLevel = function (level) { 36081 logLevel = level; 36082}; 36083 36084/** 36085 * @param {Error} err error 36086 * @returns {string} formatted error 36087 */ 36088module.exports.formatError = function (err) { 36089 var message = err.message; 36090 var stack = err.stack; 36091 if (!stack) { 36092 return message; 36093 } else if (stack.indexOf(message) < 0) { 36094 return message + "\n" + stack; 36095 } else { 36096 return stack; 36097 } 36098}; 36099 36100 36101/***/ }), 36102
vendor: 277,665 bytes, lines 36103-41181
36103/***/ "./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js": 36104/*!********************************************************************!*\ 36105 !*** ./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js ***! 36106 \********************************************************************/ 36107/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 36108 36109"use strict"; 36110__webpack_require__.r(__webpack_exports__); 36111/* harmony export */ __webpack_require__.d(__webpack_exports__, { 36112/* harmony export */ "default": () => (/* binding */ Vn) 36113/* harmony export */ }); 36114/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); 36115/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/format.mjs"); 36116/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.mjs"); 36117/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isValid.mjs"); 36118/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isDate.mjs"); 36119/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/set.mjs"); 36120/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/startOfMonth.mjs"); 36121/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setHours.mjs"); 36122/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setMinutes.mjs"); 36123/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setSeconds.mjs"); 36124/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setMilliseconds.mjs"); 36125/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isBefore.mjs"); 36126/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isEqual.mjs"); 36127/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isAfter.mjs"); 36128/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getHours.mjs"); 36129/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getMinutes.mjs"); 36130/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getSeconds.mjs"); 36131/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getYear.mjs"); 36132/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getMonth.mjs"); 36133/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/eachDayOfInterval.mjs"); 36134/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/addMonths.mjs"); 36135/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/startOfWeek.mjs"); 36136/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/endOfWeek.mjs"); 36137/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setMonth.mjs"); 36138/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/setYear.mjs"); 36139/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/subMonths.mjs"); 36140/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/addHours.mjs"); 36141/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/addYears.mjs"); 36142/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/subYears.mjs"); 36143/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/endOfYear.mjs"); 36144/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/startOfYear.mjs"); 36145/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/differenceInYears.mjs"); 36146/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/add.mjs"); 36147/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/sub.mjs"); 36148/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getWeek.mjs"); 36149/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getISOWeek.mjs"); 36150/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/addDays.mjs"); 36151/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isSameQuarter.mjs"); 36152/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getQuarter.mjs"); 36153/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/eachQuarterOfInterval.mjs"); 36154/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/startOfQuarter.mjs"); 36155/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/endOfQuarter.mjs"); 36156/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getDay.mjs"); 36157/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/differenceInCalendarDays.mjs"); 36158 36159 36160function Et() { 36161 const e = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs)(); 36162 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36163 "svg", 36164 { 36165 xmlns: "http://www.w3.org/2000/svg", 36166 viewBox: "0 0 32 32", 36167 fill: "currentColor", 36168 "aria-hidden": "true", 36169 class: "dp__icon", 36170 role: "img", 36171 ...e 36172 }, 36173 [ 36174 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36175 d: "M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z" 36176 }), 36177 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36178 d: "M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" 36179 }), 36180 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36181 d: "M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" 36182 }), 36183 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36184 d: "M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z" 36185 }) 36186 ] 36187 ); 36188} 36189Et.compatConfig = { 36190 MODE: 3 36191}; 36192function Mn() { 36193 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36194 "svg", 36195 { 36196 xmlns: "http://www.w3.org/2000/svg", 36197 viewBox: "0 0 32 32", 36198 fill: "currentColor", 36199 "aria-hidden": "true", 36200 class: "dp__icon", 36201 role: "img" 36202 }, 36203 [ 36204 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36205 d: "M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z" 36206 }), 36207 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36208 d: "M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z" 36209 }) 36210 ] 36211 ); 36212} 36213Mn.compatConfig = { 36214 MODE: 3 36215}; 36216function za() { 36217 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36218 "svg", 36219 { 36220 xmlns: "http://www.w3.org/2000/svg", 36221 viewBox: "0 0 32 32", 36222 fill: "currentColor", 36223 "aria-hidden": "true", 36224 class: "dp__icon", 36225 role: "img" 36226 }, 36227 [ 36228 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36229 d: "M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z" 36230 }) 36231 ] 36232 ); 36233} 36234za.compatConfig = { 36235 MODE: 3 36236}; 36237function Ha() { 36238 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36239 "svg", 36240 { 36241 xmlns: "http://www.w3.org/2000/svg", 36242 viewBox: "0 0 32 32", 36243 fill: "currentColor", 36244 "aria-hidden": "true", 36245 class: "dp__icon", 36246 role: "img" 36247 }, 36248 [ 36249 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36250 d: "M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z" 36251 }) 36252 ] 36253 ); 36254} 36255Ha.compatConfig = { 36256 MODE: 3 36257}; 36258function Ua() { 36259 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36260 "svg", 36261 { 36262 xmlns: "http://www.w3.org/2000/svg", 36263 viewBox: "0 0 32 32", 36264 fill: "currentColor", 36265 "aria-hidden": "true", 36266 class: "dp__icon", 36267 role: "img" 36268 }, 36269 [ 36270 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36271 d: "M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z" 36272 }), 36273 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36274 d: "M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" 36275 }) 36276 ] 36277 ); 36278} 36279Ua.compatConfig = { 36280 MODE: 3 36281}; 36282function Va() { 36283 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36284 "svg", 36285 { 36286 xmlns: "http://www.w3.org/2000/svg", 36287 viewBox: "0 0 32 32", 36288 fill: "currentColor", 36289 "aria-hidden": "true", 36290 class: "dp__icon", 36291 role: "img" 36292 }, 36293 [ 36294 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36295 d: "M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z" 36296 }) 36297 ] 36298 ); 36299} 36300Va.compatConfig = { 36301 MODE: 3 36302}; 36303function Wa() { 36304 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)( 36305 "svg", 36306 { 36307 xmlns: "http://www.w3.org/2000/svg", 36308 viewBox: "0 0 32 32", 36309 fill: "currentColor", 36310 "aria-hidden": "true", 36311 class: "dp__icon", 36312 role: "img" 36313 }, 36314 [ 36315 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 36316 d: "M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z" 36317 }) 36318 ] 36319 ); 36320} 36321Wa.compatConfig = { 36322 MODE: 3 36323}; 36324const qe = (e, t) => t ? new Date(e.toLocaleString("en-US", { timeZone: t })) : new Date(e), ja = (e, t, l) => { 36325 const a = Na(e, t, l); 36326 return a || K(); 36327}, fl = (e, t, l) => { 36328 const a = t.dateInTz ? qe(new Date(e), t.dateInTz) : K(e); 36329 return l ? Ge(a, !0) : a; 36330}, Na = (e, t, l) => { 36331 if (!e) return null; 36332 const a = l ? Ge(K(e), !0) : K(e); 36333 return t ? t.exactMatch ? fl(e, t, l) : qe(a, t.timezone) : a; 36334}, vl = (e) => { 36335 if (!e) return 0; 36336 const t = /* @__PURE__ */ new Date(), l = new Date(t.toLocaleString("en-US", { timeZone: "UTC" })), a = new Date(t.toLocaleString("en-US", { timeZone: e })), n = a.getTimezoneOffset() / 60; 36337 return (+l - +a) / (1e3 * 60 * 60) - n; 36338}; 36339var nt = /* @__PURE__ */ ((e) => (e.month = "month", e.year = "year", e))(nt || {}), Mt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(Mt || {}), Tt = /* @__PURE__ */ ((e) => (e.header = "header", e.calendar = "calendar", e.timePicker = "timePicker", e))(Tt || {}), He = /* @__PURE__ */ ((e) => (e.month = "month", e.year = "year", e.calendar = "calendar", e.time = "time", e.minutes = "minutes", e.hours = "hours", e.seconds = "seconds", e))(He || {}); 36340const ml = ["timestamp", "date", "iso"]; 36341var je = /* @__PURE__ */ ((e) => (e.up = "up", e.down = "down", e.left = "left", e.right = "right", e))(je || {}), Pe = /* @__PURE__ */ ((e) => (e.arrowUp = "ArrowUp", e.arrowDown = "ArrowDown", e.arrowLeft = "ArrowLeft", e.arrowRight = "ArrowRight", e.enter = "Enter", e.space = " ", e.esc = "Escape", e.tab = "Tab", e.home = "Home", e.end = "End", e.pageUp = "PageUp", e.pageDown = "PageDown", e))(Pe || {}); 36342function ln(e) { 36343 return (t) => new Intl.DateTimeFormat(e, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0, 2); 36344} 36345function pl(e) { 36346 return (t) => (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(qe(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`), "UTC"), "EEEEEE", { locale: e }); 36347} 36348const yl = (e, t, l) => { 36349 const a = [1, 2, 3, 4, 5, 6, 7]; 36350 let n; 36351 if (e !== null) 36352 try { 36353 n = a.map(pl(e)); 36354 } catch { 36355 n = a.map(ln(t)); 36356 } 36357 else 36358 n = a.map(ln(t)); 36359 const i = n.slice(0, l), c = n.slice(l + 1, n.length); 36360 return [n[l]].concat(...c).concat(...i); 36361}, Ka = (e, t, l) => { 36362 const a = []; 36363 for (let n = +e[0]; n <= +e[1]; n++) 36364 a.push({ value: +n, text: Sn(n, t) }); 36365 return l ? a.reverse() : a; 36366}, $n = (e, t, l) => { 36367 const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((i) => { 36368 const c = i < 10 ? `0${i}` : i; 36369 return /* @__PURE__ */ new Date(`2017-${c}-01T00:00:00+00:00`); 36370 }); 36371 if (e !== null) 36372 try { 36373 const i = l === "long" ? "LLLL" : "LLL"; 36374 return a.map((c, w) => { 36375 const f = (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(qe(c, "UTC"), i, { locale: e }); 36376 return { 36377 text: f.charAt(0).toUpperCase() + f.substring(1), 36378 value: w 36379 }; 36380 }); 36381 } catch { 36382 } 36383 const n = new Intl.DateTimeFormat(t, { month: l, timeZone: "UTC" }); 36384 return a.map((i, c) => { 36385 const w = n.format(i); 36386 return { 36387 text: w.charAt(0).toUpperCase() + w.substring(1), 36388 value: c 36389 }; 36390 }); 36391}, gl = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e], Ie = (e) => { 36392 const t = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(e); 36393 return t != null && t.$el ? t == null ? void 0 : t.$el : t; 36394}, hl = (e) => ({ type: "dot", ...e ?? {} }), An = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, Ga = { 36395 prop: (e) => `"${e}" prop must be enabled!`, 36396 dateArr: (e) => `You need to use array as "model-value" binding in order to support "${e}"` 36397}, Ye = (e) => e, rn = (e) => e === 0 ? e : !e || isNaN(+e) ? null : +e, on = (e) => e === null, Tn = (e) => { 36398 if (e) 36399 return [...e.querySelectorAll("input, button, select, textarea, a[href]")][0]; 36400}, bl = (e) => { 36401 const t = [], l = (a) => a.filter((n) => n); 36402 for (let a = 0; a < e.length; a += 3) { 36403 const n = [e[a], e[a + 1], e[a + 2]]; 36404 t.push(l(n)); 36405 } 36406 return t; 36407}, Gt = (e, t, l) => { 36408 const a = l != null, n = t != null; 36409 if (!a && !n) return !1; 36410 const i = +l, c = +t; 36411 return a && n ? +e > i || +e < c : a ? +e > i : n ? +e < c : !1; 36412}, Yt = (e, t) => bl(e).map((l) => l.map((a) => { 36413 const { active: n, disabled: i, isBetween: c, highlighted: w } = t(a); 36414 return { 36415 ...a, 36416 active: n, 36417 disabled: i, 36418 className: { 36419 dp__overlay_cell_active: n, 36420 dp__overlay_cell: !n, 36421 dp__overlay_cell_disabled: i, 36422 dp__overlay_cell_pad: !0, 36423 dp__overlay_cell_active_disabled: i && n, 36424 dp__cell_in_between: c, 36425 "dp--highlighted": w 36426 } 36427 }; 36428})), yt = (e, t, l = !1) => { 36429 e && t.allowStopPropagation && (l && e.stopImmediatePropagation(), e.stopPropagation()); 36430}, kl = () => [ 36431 "a[href]", 36432 "area[href]", 36433 "input:not([disabled]):not([type='hidden'])", 36434 "select:not([disabled])", 36435 "textarea:not([disabled])", 36436 "button:not([disabled])", 36437 "[tabindex]:not([tabindex='-1'])", 36438 "[data-datepicker-instance]" 36439].join(", "); 36440function wl(e, t) { 36441 let l = [...document.querySelectorAll(kl())]; 36442 l = l.filter((n) => !e.contains(n) || n.hasAttribute("data-datepicker-instance")); 36443 const a = l.indexOf(e); 36444 if (a >= 0 && (t ? a - 1 >= 0 : a + 1 <= l.length)) 36445 return l[a + (t ? -1 : 1)]; 36446} 36447const Ea = (e, t) => e == null ? void 0 : e.querySelector(`[data-dp-element="${t}"]`), Sn = (e, t) => new Intl.NumberFormat(t, { useGrouping: !1, style: "decimal" }).format(e), Qa = (e) => (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(e, "dd-MM-yyyy"), $a = (e) => Array.isArray(e), sa = (e, t) => t.get(Qa(e)), Dl = (e, t) => e ? t ? t instanceof Map ? !!sa(e, t) : t(K(e)) : !1 : !0, Ke = (e, t, l = !1, a) => { 36448 if (e.key === Pe.enter || e.key === Pe.space) 36449 return l && e.preventDefault(), t(); 36450 if (a) return a(e); 36451}, sn = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].some( 36452 (e) => navigator.userAgent.includes(e) 36453) || navigator.userAgent.includes("Mac") && "ontouchend" in document, un = (e, t, l, a, n, i) => { 36454 const c = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.parse)(e, t.slice(0, e.length), /* @__PURE__ */ new Date(), { locale: i }); 36455 return (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.isValid)(c) && (0,date_fns__WEBPACK_IMPORTED_MODULE_4__.isDate)(c) ? a || n ? c : (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(c, { 36456 hours: +l.hours, 36457 minutes: +(l == null ? void 0 : l.minutes), 36458 seconds: +(l == null ? void 0 : l.seconds), 36459 milliseconds: 0 36460 }) : null; 36461}, Ml = (e, t, l, a, n, i) => { 36462 const c = Array.isArray(l) ? l[0] : l; 36463 if (typeof t == "string") 36464 return un(e, t, c, a, n, i); 36465 if (Array.isArray(t)) { 36466 let w = null; 36467 for (const f of t) 36468 if (w = un(e, f, c, a, n, i), w) 36469 break; 36470 return w; 36471 } 36472 return typeof t == "function" ? t(e) : null; 36473}, K = (e) => e ? new Date(e) : /* @__PURE__ */ new Date(), $l = (e, t, l) => { 36474 if (t) { 36475 const n = (e.getMonth() + 1).toString().padStart(2, "0"), i = e.getDate().toString().padStart(2, "0"), c = e.getHours().toString().padStart(2, "0"), w = e.getMinutes().toString().padStart(2, "0"), f = l ? e.getSeconds().toString().padStart(2, "0") : "00"; 36476 return `${e.getFullYear()}-${n}-${i}T${c}:${w}:${f}.000Z`; 36477 } 36478 const a = Date.UTC( 36479 e.getUTCFullYear(), 36480 e.getUTCMonth(), 36481 e.getUTCDate(), 36482 e.getUTCHours(), 36483 e.getUTCMinutes(), 36484 e.getUTCSeconds() 36485 ); 36486 return new Date(a).toISOString(); 36487}, Ge = (e, t) => { 36488 const l = K(JSON.parse(JSON.stringify(e))), a = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(l, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }); 36489 return t ? (0,date_fns__WEBPACK_IMPORTED_MODULE_6__.startOfMonth)(a) : a; 36490}, gt = (e, t, l, a) => { 36491 let n = e ? K(e) : K(); 36492 return (t || t === 0) && (n = (0,date_fns__WEBPACK_IMPORTED_MODULE_7__.setHours)(n, +t)), (l || l === 0) && (n = (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.setMinutes)(n, +l)), (a || a === 0) && (n = (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.setSeconds)(n, +a)), (0,date_fns__WEBPACK_IMPORTED_MODULE_10__.setMilliseconds)(n, 0); 36493}, Oe = (e, t) => !e || !t ? !1 : (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.isBefore)(Ge(e), Ge(t)), Me = (e, t) => !e || !t ? !1 : (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)(Ge(e), Ge(t)), Be = (e, t) => !e || !t ? !1 : (0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(Ge(e), Ge(t)), da = (e, t, l) => e != null && e[0] && (e != null && e[1]) ? Be(l, e[0]) && Oe(l, e[1]) : e != null && e[0] && t ? Be(l, e[0]) && Oe(l, t) || Oe(l, e[0]) && Be(l, t) : !1, lt = (e) => { 36494 const t = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(new Date(e), { date: 1 }); 36495 return Ge(t); 36496}, Aa = (e, t, l) => t && (l || l === 0) ? Object.fromEntries( 36497 ["hours", "minutes", "seconds"].map((a) => a === t ? [a, l] : [a, isNaN(+e[a]) ? void 0 : +e[a]]) 36498) : { 36499 hours: isNaN(+e.hours) ? void 0 : +e.hours, 36500 minutes: isNaN(+e.minutes) ? void 0 : +e.minutes, 36501 seconds: isNaN(+e.seconds) ? void 0 : +e.seconds 36502}, St = (e) => ({ 36503 hours: (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(e), 36504 minutes: (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(e), 36505 seconds: (0,date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds)(e) 36506}), Pn = (e, t) => { 36507 if (t) { 36508 const l = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(t)); 36509 if (l > e) return 12; 36510 if (l === e) return (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(K(t)); 36511 } 36512}, Rn = (e, t) => { 36513 if (t) { 36514 const l = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(t)); 36515 return l < e ? -1 : l === e ? (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(K(t)) : void 0; 36516 } 36517}, It = (e) => { 36518 if (e) return (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e)); 36519}, Cn = (e, t) => { 36520 const l = Be(e, t) ? t : e, a = Be(t, e) ? t : e; 36521 return (0,date_fns__WEBPACK_IMPORTED_MODULE_19__.eachDayOfInterval)({ start: l, end: a }); 36522}, Al = (e) => { 36523 const t = (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(e, 1); 36524 return { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(t), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(t) }; 36525}, it = (e, t) => { 36526 const l = (0,date_fns__WEBPACK_IMPORTED_MODULE_21__.startOfWeek)(e, { weekStartsOn: +t }), a = (0,date_fns__WEBPACK_IMPORTED_MODULE_22__.endOfWeek)(e, { weekStartsOn: +t }); 36527 return [l, a]; 36528}, On = (e, t) => { 36529 const l = { 36530 hours: (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(K()), 36531 minutes: (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(K()), 36532 seconds: t ? (0,date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds)(K()) : 0 36533 }; 36534 return Object.assign(l, e); 36535}, pt = (e, t, l) => [(0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(e), { date: 1 }), (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: t, year: l, date: 1 })], dt = (e, t, l) => { 36536 let a = e ? K(e) : K(); 36537 return (t || t === 0) && (a = (0,date_fns__WEBPACK_IMPORTED_MODULE_23__.setMonth)(a, t)), l && (a = (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(a, l)), a; 36538}, _n = (e, t, l, a, n) => { 36539 if (!a || n && !t || !n && !l) return !1; 36540 const i = n ? (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(e, 1) : (0,date_fns__WEBPACK_IMPORTED_MODULE_25__.subMonths)(e, 1), c = [(0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(i), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(i)]; 36541 return n ? !Sl(...c, t) : !Tl(...c, l); 36542}, Tl = (e, t, l) => Oe(...pt(l, e, t)) || Me(...pt(l, e, t)), Sl = (e, t, l) => Be(...pt(l, e, t)) || Me(...pt(l, e, t)), Bn = (e, t, l, a, n, i, c) => { 36543 if (typeof t == "function" && !c) return t(e); 36544 const w = l ? { locale: l } : void 0; 36545 return Array.isArray(e) ? `${(0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(e[0], i, w)}${n && !e[1] ? "" : a}${e[1] ? (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(e[1], i, w) : ""}` : (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(e, i, w); 36546}, Rt = (e) => { 36547 if (e) return null; 36548 throw new Error(Ga.prop("partial-range")); 36549}, ta = (e, t) => { 36550 if (t) return e(); 36551 throw new Error(Ga.prop("range")); 36552}, Fa = (e) => Array.isArray(e) ? (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.isValid)(e[0]) && (e[1] ? (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.isValid)(e[1]) : !0) : e ? (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.isValid)(e) : !1, Pl = (e, t) => (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(t ?? K(), { 36553 hours: +e.hours || 0, 36554 minutes: +e.minutes || 0, 36555 seconds: +e.seconds || 0 36556}), Ta = (e, t, l, a) => { 36557 if (!e) return !0; 36558 if (a) { 36559 const n = l === "max" ? (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.isBefore)(e, t) : (0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(e, t), i = { seconds: 0, milliseconds: 0 }; 36560 return n || (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(e, i), (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(t, i)); 36561 } 36562 return l === "max" ? e.getTime() <= t.getTime() : e.getTime() >= t.getTime(); 36563}, Sa = (e, t, l) => e ? Pl(e, t) : K(l ?? t), dn = (e, t, l, a, n) => { 36564 if (Array.isArray(a)) { 36565 const c = Sa(e, a[0], t), w = Sa(e, a[1], t); 36566 return Ta(a[0], c, l, !!t) && Ta(a[1], w, l, !!t) && n; 36567 } 36568 const i = Sa(e, a, t); 36569 return Ta(a, i, l, !!t) && n; 36570}, Pa = (e) => (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), St(e)), Rl = (e, t) => e instanceof Map ? Array.from(e.values()).filter((l) => (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(l)) === t).map((l) => (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(l)) : [], Yn = (e, t, l) => typeof e == "function" ? e({ month: t, year: l }) : !!e.months.find((a) => a.month === t && a.year === l), qa = (e, t) => typeof e == "function" ? e(t) : e.years.includes(t), In = (e) => (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(e, "yyyy-MM-dd"), Ht = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ 36571 menuFocused: !1, 36572 shiftKeyInMenu: !1 36573}), Nn = () => { 36574 const e = (a) => { 36575 Ht.menuFocused = a; 36576 }, t = (a) => { 36577 Ht.shiftKeyInMenu !== a && (Ht.shiftKeyInMenu = a); 36578 }; 36579 return { 36580 control: (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ shiftKeyInMenu: Ht.shiftKeyInMenu, menuFocused: Ht.menuFocused })), 36581 setMenuFocused: e, 36582 setShiftKey: t 36583 }; 36584}, Se = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ 36585 monthYear: [], 36586 calendar: [], 36587 time: [], 36588 actionRow: [], 36589 selectionGrid: [], 36590 timePicker: { 36591 0: [], 36592 1: [] 36593 }, 36594 monthPicker: [] 36595}), Ra = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), aa = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), Ca = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), Oa = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), _a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), ze = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(0), _e = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(0), bt = () => { 36596 const e = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => aa.value ? [...Se.selectionGrid, Se.actionRow].filter((v) => v.length) : Ca.value ? [ 36597 ...Se.timePicker[0], 36598 ...Se.timePicker[1], 36599 _a.value ? [] : [Ra.value], 36600 Se.actionRow 36601 ].filter((v) => v.length) : Oa.value ? [...Se.monthPicker, Se.actionRow] : [Se.monthYear, ...Se.calendar, Se.time, Se.actionRow].filter((v) => v.length)), t = (v) => { 36602 ze.value = v ? ze.value + 1 : ze.value - 1; 36603 let O = null; 36604 e.value[_e.value] && (O = e.value[_e.value][ze.value]), !O && e.value[_e.value + (v ? 1 : -1)] ? (_e.value = _e.value + (v ? 1 : -1), ze.value = v ? 0 : e.value[_e.value].length - 1) : O || (ze.value = v ? ze.value - 1 : ze.value + 1); 36605 }, l = (v) => { 36606 if (_e.value === 0 && !v || _e.value === e.value.length && v) return; 36607 _e.value = v ? _e.value + 1 : _e.value - 1, e.value[_e.value] ? e.value[_e.value] && !e.value[_e.value][ze.value] && ze.value !== 0 && (ze.value = e.value[_e.value].length - 1) : _e.value = v ? _e.value - 1 : _e.value + 1; 36608 }, a = (v) => { 36609 let O = null; 36610 e.value[_e.value] && (O = e.value[_e.value][ze.value]), O ? O.focus({ preventScroll: !aa.value }) : ze.value = v ? ze.value - 1 : ze.value + 1; 36611 }, n = () => { 36612 t(!0), a(!0); 36613 }, i = () => { 36614 t(!1), a(!1); 36615 }, c = () => { 36616 l(!1), a(!0); 36617 }, w = () => { 36618 l(!0), a(!0); 36619 }, f = (v, O) => { 36620 Se[O] = v; 36621 }, F = (v, O) => { 36622 Se[O] = v; 36623 }, p = () => { 36624 ze.value = 0, _e.value = 0; 36625 }; 36626 return { 36627 buildMatrix: f, 36628 buildMultiLevelMatrix: F, 36629 setTimePickerBackRef: (v) => { 36630 Ra.value = v; 36631 }, 36632 setSelectionGrid: (v) => { 36633 aa.value = v, p(), v || (Se.selectionGrid = []); 36634 }, 36635 setTimePicker: (v, O = !1) => { 36636 Ca.value = v, _a.value = O, p(), v || (Se.timePicker[0] = [], Se.timePicker[1] = []); 36637 }, 36638 setTimePickerElements: (v, O = 0) => { 36639 Se.timePicker[O] = v; 36640 }, 36641 arrowRight: n, 36642 arrowLeft: i, 36643 arrowUp: c, 36644 arrowDown: w, 36645 clearArrowNav: () => { 36646 Se.monthYear = [], Se.calendar = [], Se.time = [], Se.actionRow = [], Se.selectionGrid = [], Se.timePicker[0] = [], Se.timePicker[1] = [], aa.value = !1, Ca.value = !1, _a.value = !1, Oa.value = !1, p(), Ra.value = null; 36647 }, 36648 setMonthPicker: (v) => { 36649 Oa.value = v, p(); 36650 }, 36651 refSets: Se 36652 // exposed for testing 36653 }; 36654}, cn = (e) => ({ 36655 menuAppearTop: "dp-menu-appear-top", 36656 menuAppearBottom: "dp-menu-appear-bottom", 36657 open: "dp-slide-down", 36658 close: "dp-slide-up", 36659 next: "calendar-next", 36660 previous: "calendar-prev", 36661 vNext: "dp-slide-up", 36662 vPrevious: "dp-slide-down", 36663 ...e ?? {} 36664}), Cl = (e) => ({ 36665 toggleOverlay: "Toggle overlay", 36666 menu: "Datepicker menu", 36667 input: "Datepicker input", 36668 openTimePicker: "Open time picker", 36669 closeTimePicker: "Close time Picker", 36670 incrementValue: (t) => `Increment ${t}`, 36671 decrementValue: (t) => `Decrement ${t}`, 36672 openTpOverlay: (t) => `Open ${t} overlay`, 36673 amPmButton: "Switch AM/PM mode", 36674 openYearsOverlay: "Open years overlay", 36675 openMonthsOverlay: "Open months overlay", 36676 nextMonth: "Next month", 36677 prevMonth: "Previous month", 36678 nextYear: "Next year", 36679 prevYear: "Previous year", 36680 day: void 0, 36681 weekDay: void 0, 36682 clearInput: "Clear value", 36683 calendarIcon: "Calendar icon", 36684 timePicker: "Time picker", 36685 monthPicker: (t) => `Month picker${t ? " overlay" : ""}`, 36686 yearPicker: (t) => `Year picker${t ? " overlay" : ""}`, 36687 timeOverlay: (t) => `${t} overlay`, 36688 ...e ?? {} 36689}), fn = (e) => e ? typeof e == "boolean" ? e ? 2 : 0 : +e >= 2 ? +e : 2 : 0, Ol = (e) => { 36690 const t = typeof e == "object" && e, l = { 36691 static: !0, 36692 solo: !1 36693 }; 36694 if (!e) return { ...l, count: fn(!1) }; 36695 const a = t ? e : {}, n = t ? a.count ?? !0 : e, i = fn(n); 36696 return Object.assign(l, a, { count: i }); 36697}, _l = (e, t, l) => e || (typeof l == "string" ? l : t), Bl = (e) => typeof e == "boolean" ? e ? cn({}) : !1 : cn(e), Yl = (e) => { 36698 const t = { 36699 enterSubmit: !0, 36700 tabSubmit: !0, 36701 openMenu: "open", 36702 selectOnFocus: !1, 36703 rangeSeparator: " - " 36704 }; 36705 return typeof e == "object" ? { ...t, ...e ?? {}, enabled: !0 } : { ...t, enabled: e }; 36706}, Il = (e) => ({ 36707 months: [], 36708 years: [], 36709 times: { hours: [], minutes: [], seconds: [] }, 36710 ...e ?? {} 36711}), Nl = (e) => ({ 36712 showSelect: !0, 36713 showCancel: !0, 36714 showNow: !1, 36715 showPreview: !0, 36716 ...e ?? {} 36717}), El = (e) => { 36718 const t = { input: !1 }; 36719 return typeof e == "object" ? { ...t, ...e ?? {}, enabled: !0 } : { 36720 enabled: e, 36721 ...t 36722 }; 36723}, Fl = (e) => ({ ...{ 36724 allowStopPropagation: !0, 36725 closeOnScroll: !1, 36726 modeHeight: 255, 36727 allowPreventDefault: !1, 36728 closeOnClearValue: !0, 36729 closeOnAutoApply: !0, 36730 noSwipe: !1, 36731 keepActionRow: !1, 36732 onClickOutside: void 0, 36733 tabOutClosesMenu: !0, 36734 arrowLeft: void 0, 36735 keepViewOnOffsetClick: !1, 36736 timeArrowHoldThreshold: 0, 36737 shadowDom: !1 36738}, ...e ?? {} }), Ll = (e) => { 36739 const t = { 36740 dates: Array.isArray(e) ? e.map((l) => K(l)) : [], 36741 years: [], 36742 months: [], 36743 quarters: [], 36744 weeks: [], 36745 weekdays: [], 36746 options: { highlightDisabled: !1 } 36747 }; 36748 return typeof e == "function" ? e : { ...t, ...e ?? {} }; 36749}, zl = (e) => typeof e == "object" ? { 36750 type: (e == null ? void 0 : e.type) ?? "local", 36751 hideOnOffsetDates: (e == null ? void 0 : e.hideOnOffsetDates) ?? !1 36752} : { 36753 type: e, 36754 hideOnOffsetDates: !1 36755}, Hl = (e) => { 36756 const t = { 36757 noDisabledRange: !1, 36758 showLastInRange: !0, 36759 minMaxRawRange: !1, 36760 partialRange: !0, 36761 disableTimeRangeValidation: !1, 36762 maxRange: void 0, 36763 minRange: void 0, 36764 autoRange: void 0, 36765 fixedStart: !1, 36766 fixedEnd: !1 36767 }; 36768 return typeof e == "object" ? { enabled: !0, ...t, ...e } : { 36769 enabled: e, 36770 ...t 36771 }; 36772}, Ul = (e) => e ? typeof e == "string" ? { 36773 timezone: e, 36774 exactMatch: !1, 36775 dateInTz: void 0, 36776 emitTimezone: void 0, 36777 convertModel: !0 36778} : { 36779 timezone: e.timezone, 36780 exactMatch: e.exactMatch ?? !1, 36781 dateInTz: e.dateInTz ?? void 0, 36782 emitTimezone: e.emitTimezone ?? void 0, 36783 convertModel: e.convertModel ?? !0 36784} : { timezone: void 0, exactMatch: !1, emitTimezone: void 0 }, Ba = (e, t, l) => new Map( 36785 e.map((a) => { 36786 const n = ja(a, t, l); 36787 return [Qa(n), n]; 36788 }) 36789), Vl = (e, t) => e.length ? new Map( 36790 e.map((l) => { 36791 const a = ja(l.date, t); 36792 return [Qa(a), l]; 36793 }) 36794) : null, Wl = (e) => { 36795 var t; 36796 return { 36797 minDate: Na(e.minDate, e.timezone, e.isSpecific), 36798 maxDate: Na(e.maxDate, e.timezone, e.isSpecific), 36799 disabledDates: $a(e.disabledDates) ? Ba(e.disabledDates, e.timezone, e.isSpecific) : e.disabledDates, 36800 allowedDates: $a(e.allowedDates) ? Ba(e.allowedDates, e.timezone, e.isSpecific) : null, 36801 highlight: typeof e.highlight == "object" && $a((t = e.highlight) == null ? void 0 : t.dates) ? Ba(e.highlight.dates, e.timezone) : e.highlight, 36802 markers: Vl(e.markers, e.timezone) 36803 }; 36804}, jl = (e) => typeof e == "boolean" ? { enabled: e, dragSelect: !0, limit: null } : { 36805 enabled: !!e, 36806 limit: e.limit ? +e.limit : null, 36807 dragSelect: e.dragSelect ?? !0 36808}, Kl = (e) => ({ 36809 ...Object.fromEntries( 36810 Object.keys(e).map((l) => { 36811 const a = l, n = e[a], i = typeof e[a] == "string" ? { [n]: !0 } : Object.fromEntries(n.map((c) => [c, !0])); 36812 return [l, i]; 36813 }) 36814 ) 36815}), Ce = (e) => { 36816 const t = () => { 36817 const oe = e.enableSeconds ? ":ss" : "", Z = e.enableMinutes ? ":mm" : ""; 36818 return e.is24 ? `HH${Z}${oe}` : `hh${Z}${oe} aa`; 36819 }, l = () => { 36820 var oe; 36821 return e.format ? e.format : e.monthPicker ? "MM/yyyy" : e.timePicker ? t() : e.weekPicker ? `${((oe = H.value) == null ? void 0 : oe.type) === "iso" ? "RR" : "ww"}-yyyy` : e.yearPicker ? "yyyy" : e.quarterPicker ? "QQQ/yyyy" : e.enableTimePicker ? `MM/dd/yyyy, ${t()}` : "MM/dd/yyyy"; 36822 }, a = (oe) => On(oe, e.enableSeconds), n = () => G.value.enabled ? e.startTime && Array.isArray(e.startTime) ? [a(e.startTime[0]), a(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? a(e.startTime) : null, i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Ol(e.multiCalendars)), c = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n()), w = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Cl(e.ariaLabels)), f = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Il(e.filters)), F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Bl(e.transitions)), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Nl(e.actionRow)), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 36823 () => _l(e.previewFormat, e.format, l()) 36824 ), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Yl(e.textInput)), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => El(e.inline)), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Fl(e.config)), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Ll(e.highlight)), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => zl(e.weekNumbers)), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Ul(e.timezone)), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => jl(e.multiDates)), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 36825 () => Wl({ 36826 minDate: e.minDate, 36827 maxDate: e.maxDate, 36828 disabledDates: e.disabledDates, 36829 allowedDates: e.allowedDates, 36830 highlight: N.value, 36831 markers: e.markers, 36832 timezone: v.value, 36833 isSpecific: e.monthPicker || e.yearPicker || e.quarterPicker 36834 }) 36835 ), G = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Hl(e.range)), ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Kl(e.ui)); 36836 return { 36837 defaultedTransitions: F, 36838 defaultedMultiCalendars: i, 36839 defaultedStartTime: c, 36840 defaultedAriaLabels: w, 36841 defaultedFilters: f, 36842 defaultedActionRow: p, 36843 defaultedPreviewFormat: _, 36844 defaultedTextInput: k, 36845 defaultedInline: R, 36846 defaultedConfig: z, 36847 defaultedHighlight: N, 36848 defaultedWeekNumbers: H, 36849 defaultedRange: G, 36850 propDates: S, 36851 defaultedTz: v, 36852 defaultedMultiDates: O, 36853 defaultedUI: ae, 36854 getDefaultPattern: l, 36855 getDefaultStartTime: n 36856 }; 36857}, Gl = (e, t, l) => { 36858 const a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), { defaultedTextInput: n, defaultedRange: i, defaultedTz: c, defaultedMultiDates: w, getDefaultPattern: f } = Ce(t), F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(""), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRef)(t, "format"), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRef)(t, "formatLocale"); 36859 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 36860 a, 36861 () => { 36862 typeof t.onInternalModelChange == "function" && e("internal-model-change", a.value, b(!0)); 36863 }, 36864 { deep: !0 } 36865 ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(i, (s, le) => { 36866 s.enabled !== le.enabled && (a.value = null); 36867 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(p, () => { 36868 Q(); 36869 }); 36870 const k = (s) => c.value.timezone && c.value.convertModel ? qe(s, c.value.timezone) : s, R = (s) => { 36871 if (c.value.timezone && c.value.convertModel) { 36872 const le = vl(c.value.timezone); 36873 return (0,date_fns__WEBPACK_IMPORTED_MODULE_26__.addHours)(s, le); 36874 } 36875 return s; 36876 }, z = (s, le, pe = !1) => Bn( 36877 s, 36878 t.format, 36879 t.formatLocale, 36880 n.value.rangeSeparator, 36881 t.modelAuto, 36882 le ?? f(), 36883 pe 36884 ), N = (s) => s ? t.modelType ? ne(s) : { 36885 hours: (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(s), 36886 minutes: (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(s), 36887 seconds: t.enableSeconds ? (0,date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds)(s) : 0 36888 } : null, H = (s) => t.modelType ? ne(s) : { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(s), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(s) }, v = (s) => Array.isArray(s) ? w.value.enabled ? s.map((le) => O(le, (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(K(), le))) : ta( 36889 () => [ 36890 (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(K(), s[0]), 36891 s[1] ? (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(K(), s[1]) : Rt(i.value.partialRange) 36892 ], 36893 i.value.enabled 36894 ) : (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(K(), +s), O = (s, le) => (typeof s == "string" || typeof s == "number") && t.modelType ? A(s) : le, S = (s) => Array.isArray(s) ? [ 36895 O( 36896 s[0], 36897 gt(null, +s[0].hours, +s[0].minutes, s[0].seconds) 36898 ), 36899 O( 36900 s[1], 36901 gt(null, +s[1].hours, +s[1].minutes, s[1].seconds) 36902 ) 36903 ] : O(s, gt(null, s.hours, s.minutes, s.seconds)), G = (s) => { 36904 const le = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { date: 1 }); 36905 return Array.isArray(s) ? w.value.enabled ? s.map((pe) => O(pe, dt(le, +pe.month, +pe.year))) : ta( 36906 () => [ 36907 O(s[0], dt(le, +s[0].month, +s[0].year)), 36908 O( 36909 s[1], 36910 s[1] ? dt(le, +s[1].month, +s[1].year) : Rt(i.value.partialRange) 36911 ) 36912 ], 36913 i.value.enabled 36914 ) : O(s, dt(le, +s.month, +s.year)); 36915 }, ae = (s) => { 36916 if (Array.isArray(s)) 36917 return s.map((le) => A(le)); 36918 throw new Error(Ga.dateArr("multi-dates")); 36919 }, oe = (s) => { 36920 if (Array.isArray(s) && i.value.enabled) { 36921 const le = s[0], pe = s[1]; 36922 return [ 36923 K(Array.isArray(le) ? le[0] : null), 36924 K(Array.isArray(pe) ? pe[0] : null) 36925 ]; 36926 } 36927 return K(s[0]); 36928 }, Z = (s) => t.modelAuto ? Array.isArray(s) ? [A(s[0]), A(s[1])] : t.autoApply ? [A(s)] : [A(s), null] : Array.isArray(s) ? ta( 36929 () => s[1] ? [ 36930 A(s[0]), 36931 s[1] ? A(s[1]) : Rt(i.value.partialRange) 36932 ] : [A(s[0])], 36933 i.value.enabled 36934 ) : A(s), P = () => { 36935 Array.isArray(a.value) && i.value.enabled && a.value.length === 1 && a.value.push(Rt(i.value.partialRange)); 36936 }, x = () => { 36937 const s = a.value; 36938 return [ 36939 ne(s[0]), 36940 s[1] ? ne(s[1]) : Rt(i.value.partialRange) 36941 ]; 36942 }, Y = () => a.value[1] ? x() : ne(Ye(a.value[0])), q = () => (a.value || []).map((s) => ne(s)), ie = (s = !1) => (s || P(), t.modelAuto ? Y() : w.value.enabled ? q() : Array.isArray(a.value) ? ta(() => x(), i.value.enabled) : ne(Ye(a.value))), fe = (s) => !s || Array.isArray(s) && !s.length ? null : t.timePicker ? S(Ye(s)) : t.monthPicker ? G(Ye(s)) : t.yearPicker ? v(Ye(s)) : w.value.enabled ? ae(Ye(s)) : t.weekPicker ? oe(Ye(s)) : Z(Ye(s)), h = (s) => { 36943 const le = fe(s); 36944 Fa(Ye(le)) ? (a.value = Ye(le), Q()) : (a.value = null, F.value = ""); 36945 }, U = () => { 36946 const s = (le) => (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(le, n.value.format); 36947 return `${s(a.value[0])} ${n.value.rangeSeparator} ${a.value[1] ? s(a.value[1]) : ""}`; 36948 }, ee = () => l.value && a.value ? Array.isArray(a.value) ? U() : (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(a.value, n.value.format) : z(a.value), y = () => a.value ? w.value.enabled ? a.value.map((s) => z(s)).join("; ") : n.value.enabled && typeof n.value.format == "string" ? ee() : z(a.value) : "", Q = () => { 36949 !t.format || typeof t.format == "string" || n.value.enabled && typeof n.value.format == "string" ? F.value = y() : F.value = t.format(a.value); 36950 }, A = (s) => { 36951 if (t.utc) { 36952 const le = new Date(s); 36953 return t.utc === "preserve" ? new Date(le.getTime() + le.getTimezoneOffset() * 6e4) : le; 36954 } 36955 return t.modelType ? ml.includes(t.modelType) ? k(new Date(s)) : t.modelType === "format" && (typeof t.format == "string" || !t.format) ? k( 36956 (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.parse)(s, f(), /* @__PURE__ */ new Date(), { locale: _.value }) 36957 ) : k( 36958 (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.parse)(s, t.modelType, /* @__PURE__ */ new Date(), { locale: _.value }) 36959 ) : k(new Date(s)); 36960 }, ne = (s) => s ? t.utc ? $l(s, t.utc === "preserve", t.enableSeconds) : t.modelType ? t.modelType === "timestamp" ? +R(s) : t.modelType === "iso" ? R(s).toISOString() : t.modelType === "format" && (typeof t.format == "string" || !t.format) ? z(R(s)) : z(R(s), t.modelType, !0) : R(s) : "", de = (s, le = !1, pe = !1) => { 36961 if (pe) return s; 36962 if (e("update:model-value", s), c.value.emitTimezone && le) { 36963 const $ = Array.isArray(s) ? s.map((ge) => qe(Ye(ge), c.value.emitTimezone)) : qe(Ye(s), c.value.emitTimezone); 36964 e("update:model-timezone-value", $); 36965 } 36966 }, d = (s) => Array.isArray(a.value) ? w.value.enabled ? a.value.map((le) => s(le)) : [ 36967 s(a.value[0]), 36968 a.value[1] ? s(a.value[1]) : Rt(i.value.partialRange) 36969 ] : s(Ye(a.value)), m = () => { 36970 if (Array.isArray(a.value)) { 36971 const s = it(a.value[0], t.weekStart), le = a.value[1] ? it(a.value[1], t.weekStart) : []; 36972 return [s.map((pe) => K(pe)), le.map((pe) => K(pe))]; 36973 } 36974 return it(a.value, t.weekStart).map((s) => K(s)); 36975 }, L = (s, le) => de(Ye(d(s)), !1, le), u = (s) => { 36976 const le = m(); 36977 return s ? le : e("update:model-value", m()); 36978 }, b = (s = !1) => (s || Q(), t.monthPicker ? L(H, s) : t.timePicker ? L(N, s) : t.yearPicker ? L(date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear, s) : t.weekPicker ? u(s) : de(ie(s), !0, s)); 36979 return { 36980 inputValue: F, 36981 internalModelValue: a, 36982 checkBeforeEmit: () => a.value ? i.value.enabled ? i.value.partialRange ? a.value.length >= 1 : a.value.length === 2 : !!a.value : !1, 36983 parseExternalModelValue: h, 36984 formatInputValue: Q, 36985 emitModelValue: b 36986 }; 36987}, Ql = (e, t) => { 36988 const { defaultedFilters: l, propDates: a } = Ce(e), { validateMonthYearInRange: n } = kt(e), i = (p, _) => { 36989 let k = p; 36990 return l.value.months.includes((0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(k)) ? (k = _ ? (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(p, 1) : (0,date_fns__WEBPACK_IMPORTED_MODULE_25__.subMonths)(p, 1), i(k, _)) : k; 36991 }, c = (p, _) => { 36992 let k = p; 36993 return l.value.years.includes((0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(k)) ? (k = _ ? (0,date_fns__WEBPACK_IMPORTED_MODULE_27__.addYears)(p, 1) : (0,date_fns__WEBPACK_IMPORTED_MODULE_28__.subYears)(p, 1), c(k, _)) : k; 36994 }, w = (p, _ = !1) => { 36995 const k = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: e.month, year: e.year }); 36996 let R = p ? (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(k, 1) : (0,date_fns__WEBPACK_IMPORTED_MODULE_25__.subMonths)(k, 1); 36997 e.disableYearSelect && (R = (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(R, e.year)); 36998 let z = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(R), N = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(R); 36999 l.value.months.includes(z) && (R = i(R, p), z = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(R), N = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(R)), l.value.years.includes(N) && (R = c(R, p), N = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(R)), n(z, N, p, e.preventMinMaxNavigation) && f(z, N, _); 37000 }, f = (p, _, k) => { 37001 t("update-month-year", { month: p, year: _, fromNav: k }); 37002 }, F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (p) => _n( 37003 (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: e.month, year: e.year }), 37004 a.value.maxDate, 37005 a.value.minDate, 37006 e.preventMinMaxNavigation, 37007 p 37008 )); 37009 return { handleMonthYearChange: w, isDisabled: F, updateMonthYear: f }; 37010}, ca = { 37011 multiCalendars: { type: [Boolean, Number, String, Object], default: void 0 }, 37012 modelValue: { type: [String, Date, Array, Object, Number], default: null }, 37013 modelType: { type: String, default: null }, 37014 position: { type: String, default: "center" }, 37015 dark: { type: Boolean, default: !1 }, 37016 format: { 37017 type: [String, Function], 37018 default: () => null 37019 }, 37020 autoPosition: { type: Boolean, default: !0 }, 37021 altPosition: { type: Function, default: null }, 37022 transitions: { type: [Boolean, Object], default: !0 }, 37023 formatLocale: { type: Object, default: null }, 37024 utc: { type: [Boolean, String], default: !1 }, 37025 ariaLabels: { type: Object, default: () => ({}) }, 37026 offset: { type: [Number, String], default: 10 }, 37027 hideNavigation: { type: Array, default: () => [] }, 37028 timezone: { type: [String, Object], default: null }, 37029 vertical: { type: Boolean, default: !1 }, 37030 disableMonthYearSelect: { type: Boolean, default: !1 }, 37031 disableYearSelect: { type: Boolean, default: !1 }, 37032 dayClass: { 37033 type: Function, 37034 default: null 37035 }, 37036 yearRange: { type: Array, default: () => [1900, 2100] }, 37037 enableTimePicker: { type: Boolean, default: !0 }, 37038 autoApply: { type: Boolean, default: !1 }, 37039 disabledDates: { type: [Array, Function], default: () => [] }, 37040 monthNameFormat: { type: String, default: "short" }, 37041 startDate: { type: [Date, String], default: null }, 37042 startTime: { type: [Object, Array], default: null }, 37043 hideOffsetDates: { type: Boolean, default: !1 }, 37044 noToday: { type: Boolean, default: !1 }, 37045 disabledWeekDays: { type: Array, default: () => [] }, 37046 allowedDates: { type: Array, default: null }, 37047 nowButtonLabel: { type: String, default: "Now" }, 37048 markers: { type: Array, default: () => [] }, 37049 escClose: { type: Boolean, default: !0 }, 37050 spaceConfirm: { type: Boolean, default: !0 }, 37051 monthChangeOnArrows: { type: Boolean, default: !0 }, 37052 presetDates: { type: Array, default: () => [] }, 37053 flow: { type: Array, default: () => [] }, 37054 partialFlow: { type: Boolean, default: !1 }, 37055 preventMinMaxNavigation: { type: Boolean, default: !1 }, 37056 reverseYears: { type: Boolean, default: !1 }, 37057 weekPicker: { type: Boolean, default: !1 }, 37058 filters: { type: Object, default: () => ({}) }, 37059 arrowNavigation: { type: Boolean, default: !1 }, 37060 highlight: { 37061 type: [Function, Object], 37062 default: null 37063 }, 37064 teleport: { type: [Boolean, String, Object], default: null }, 37065 teleportCenter: { type: Boolean, default: !1 }, 37066 locale: { type: String, default: "en-Us" }, 37067 weekNumName: { type: String, default: "W" }, 37068 weekStart: { type: [Number, String], default: 1 }, 37069 weekNumbers: { 37070 type: [String, Function, Object], 37071 default: null 37072 }, 37073 monthChangeOnScroll: { type: [Boolean, String], default: !0 }, 37074 dayNames: { 37075 type: [Function, Array], 37076 default: null 37077 }, 37078 monthPicker: { type: Boolean, default: !1 }, 37079 customProps: { type: Object, default: null }, 37080 yearPicker: { type: Boolean, default: !1 }, 37081 modelAuto: { type: Boolean, default: !1 }, 37082 selectText: { type: String, default: "Select" }, 37083 cancelText: { type: String, default: "Cancel" }, 37084 previewFormat: { 37085 type: [String, Function], 37086 default: () => "" 37087 }, 37088 multiDates: { type: [Object, Boolean], default: !1 }, 37089 ignoreTimeValidation: { type: Boolean, default: !1 }, 37090 minDate: { type: [Date, String], default: null }, 37091 maxDate: { type: [Date, String], default: null }, 37092 minTime: { type: Object, default: null }, 37093 maxTime: { type: Object, default: null }, 37094 name: { type: String, default: null }, 37095 placeholder: { type: String, default: "" }, 37096 hideInputIcon: { type: Boolean, default: !1 }, 37097 clearable: { type: Boolean, default: !0 }, 37098 state: { type: Boolean, default: null }, 37099 required: { type: Boolean, default: !1 }, 37100 autocomplete: { type: String, default: "off" }, 37101 timePicker: { type: Boolean, default: !1 }, 37102 enableSeconds: { type: Boolean, default: !1 }, 37103 is24: { type: Boolean, default: !0 }, 37104 noHoursOverlay: { type: Boolean, default: !1 }, 37105 noMinutesOverlay: { type: Boolean, default: !1 }, 37106 noSecondsOverlay: { type: Boolean, default: !1 }, 37107 hoursGridIncrement: { type: [String, Number], default: 1 }, 37108 minutesGridIncrement: { type: [String, Number], default: 5 }, 37109 secondsGridIncrement: { type: [String, Number], default: 5 }, 37110 hoursIncrement: { type: [Number, String], default: 1 }, 37111 minutesIncrement: { type: [Number, String], default: 1 }, 37112 secondsIncrement: { type: [Number, String], default: 1 }, 37113 range: { type: [Boolean, Object], default: !1 }, 37114 uid: { type: String, default: null }, 37115 disabled: { type: Boolean, default: !1 }, 37116 readonly: { type: Boolean, default: !1 }, 37117 inline: { type: [Boolean, Object], default: !1 }, 37118 textInput: { type: [Boolean, Object], default: !1 }, 37119 sixWeeks: { type: [Boolean, String], default: !1 }, 37120 actionRow: { type: Object, default: () => ({}) }, 37121 focusStartDate: { type: Boolean, default: !1 }, 37122 disabledTimes: { type: [Function, Array], default: void 0 }, 37123 timePickerInline: { type: Boolean, default: !1 }, 37124 calendar: { type: Function, default: null }, 37125 config: { type: Object, default: void 0 }, 37126 quarterPicker: { type: Boolean, default: !1 }, 37127 yearFirst: { type: Boolean, default: !1 }, 37128 loading: { type: Boolean, default: !1 }, 37129 onInternalModelChange: { type: [Function, Object], default: null }, 37130 enableMinutes: { type: Boolean, default: !0 }, 37131 ui: { type: Object, default: () => ({}) } 37132}, rt = { 37133 ...ca, 37134 shadow: { type: Boolean, default: !1 }, 37135 flowStep: { type: Number, default: 0 }, 37136 internalModelValue: { type: [Date, Array], default: null }, 37137 noOverlayFocus: { type: Boolean, default: !1 }, 37138 collapse: { type: Boolean, default: !1 }, 37139 menuWrapRef: { type: Object, default: null }, 37140 getInputRect: { type: Function, default: () => ({}) }, 37141 isTextInputDate: { type: Boolean, default: !1 } 37142}, ql = ["title"], Xl = ["disabled"], Jl = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37143 compatConfig: { 37144 MODE: 3 37145 }, 37146 __name: "ActionRow", 37147 props: { 37148 menuMount: { type: Boolean, default: !1 }, 37149 calendarWidth: { type: Number, default: 0 }, 37150 ...rt 37151 }, 37152 emits: ["close-picker", "select-date", "select-now", "invalid-select"], 37153 setup(e, { emit: t }) { 37154 const l = t, a = e, { 37155 defaultedActionRow: n, 37156 defaultedPreviewFormat: i, 37157 defaultedMultiCalendars: c, 37158 defaultedTextInput: w, 37159 defaultedInline: f, 37160 defaultedRange: F, 37161 defaultedMultiDates: p 37162 } = Ce(a), { isTimeValid: _, isMonthValid: k } = kt(a), { buildMatrix: R } = bt(), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({}), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); 37163 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37164 a.arrowNavigation && R([Ie(z), Ie(N)], "actionRow"), G(), window.addEventListener("resize", G); 37165 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => { 37166 window.removeEventListener("resize", G); 37167 }); 37168 const G = () => { 37169 H.value = !1, setTimeout(() => { 37170 var ee, y; 37171 const h = (ee = O.value) == null ? void 0 : ee.getBoundingClientRect(), U = (y = S.value) == null ? void 0 : y.getBoundingClientRect(); 37172 h && U && (v.value.maxWidth = `${U.width - h.width - 20}px`), H.value = !0; 37173 }, 0); 37174 }, ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => F.value.enabled && !F.value.partialRange && a.internalModelValue ? a.internalModelValue.length === 2 : !0), oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37175 () => !_.value(a.internalModelValue) || !k.value(a.internalModelValue) || !ae.value 37176 ), Z = () => { 37177 const h = i.value; 37178 return a.timePicker || a.monthPicker, h(Ye(a.internalModelValue)); 37179 }, P = () => { 37180 const h = a.internalModelValue; 37181 return c.value.count > 0 ? `${x(h[0])} - ${x(h[1])}` : [x(h[0]), x(h[1])]; 37182 }, x = (h) => Bn( 37183 h, 37184 i.value, 37185 a.formatLocale, 37186 w.value.rangeSeparator, 37187 a.modelAuto, 37188 i.value 37189 ), Y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => !a.internalModelValue || !a.menuMount ? "" : typeof i.value == "string" ? Array.isArray(a.internalModelValue) ? a.internalModelValue.length === 2 && a.internalModelValue[1] ? P() : p.value.enabled ? a.internalModelValue.map((h) => `${x(h)}`) : a.modelAuto ? `${x(a.internalModelValue[0])}` : `${x(a.internalModelValue[0])} -` : x(a.internalModelValue) : Z()), q = () => p.value.enabled ? "; " : " - ", ie = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37190 () => Array.isArray(Y.value) ? Y.value.join(q()) : Y.value 37191 ), fe = () => { 37192 _.value(a.internalModelValue) && k.value(a.internalModelValue) && ae.value ? l("select-date") : l("invalid-select"); 37193 }; 37194 return (h, U) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37195 ref_key: "actionRowRef", 37196 ref: S, 37197 class: "dp__action_row" 37198 }, [ 37199 h.$slots["action-row"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(h.$slots, "action-row", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ key: 0 }, { 37200 internalModelValue: h.internalModelValue, 37201 disabled: oe.value, 37202 selectDate: () => h.$emit("select-date"), 37203 closePicker: () => h.$emit("close-picker") 37204 }))) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 37205 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(n).showPreview ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37206 key: 0, 37207 class: "dp__selection_preview", 37208 title: ie.value, 37209 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(v.value) 37210 }, [ 37211 h.$slots["action-preview"] && H.value ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(h.$slots, "action-preview", { 37212 key: 0, 37213 value: h.internalModelValue 37214 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37215 !h.$slots["action-preview"] && H.value ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 37216 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(ie.value), 1) 37217 ], 64)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 37218 ], 12, ql)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37219 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 37220 ref_key: "actionBtnContainer", 37221 ref: O, 37222 class: "dp__action_buttons", 37223 "data-dp-element": "action-row" 37224 }, [ 37225 h.$slots["action-buttons"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(h.$slots, "action-buttons", { 37226 key: 0, 37227 value: h.internalModelValue 37228 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37229 h.$slots["action-buttons"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 37230 !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f).enabled && (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(n).showCancel ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 37231 key: 0, 37232 ref_key: "cancelButtonRef", 37233 ref: z, 37234 type: "button", 37235 class: "dp__action_button dp__action_cancel", 37236 onClick: U[0] || (U[0] = (ee) => h.$emit("close-picker")), 37237 onKeydown: U[1] || (U[1] = (ee) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(ee, () => h.$emit("close-picker"))) 37238 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(h.cancelText), 545)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37239 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(n).showNow ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 37240 key: 1, 37241 type: "button", 37242 class: "dp__action_button dp__action_cancel", 37243 onClick: U[2] || (U[2] = (ee) => h.$emit("select-now")), 37244 onKeydown: U[3] || (U[3] = (ee) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(ee, () => h.$emit("select-now"))) 37245 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(h.nowButtonLabel), 33)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37246 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(n).showSelect ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 37247 key: 2, 37248 ref_key: "selectButtonRef", 37249 ref: N, 37250 type: "button", 37251 class: "dp__action_button dp__action_select", 37252 disabled: oe.value, 37253 "data-test": "select-button", 37254 onKeydown: U[4] || (U[4] = (ee) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(ee, () => fe())), 37255 onClick: fe 37256 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(h.selectText), 41, Xl)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 37257 ], 64)) 37258 ], 512) 37259 ], 64)) 37260 ], 512)); 37261 } 37262}), Zl = ["role", "aria-label", "tabindex"], xl = { class: "dp__selection_grid_header" }, er = ["aria-selected", "aria-disabled", "data-test", "onClick", "onKeydown", "onMouseover"], tr = ["aria-label"], qt = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37263 __name: "SelectionOverlay", 37264 props: { 37265 items: {}, 37266 type: {}, 37267 isLast: { type: Boolean }, 37268 arrowNavigation: { type: Boolean }, 37269 skipButtonRef: { type: Boolean }, 37270 headerRefs: {}, 37271 hideNavigation: {}, 37272 escClose: { type: Boolean }, 37273 useRelative: { type: Boolean }, 37274 height: {}, 37275 textInput: { type: [Boolean, Object] }, 37276 config: {}, 37277 noOverlayFocus: { type: Boolean }, 37278 focusValue: {}, 37279 menuWrapRef: {}, 37280 ariaLabels: {}, 37281 overlayLabel: {} 37282 }, 37283 emits: ["selected", "toggle", "reset-flow", "hover-value"], 37284 setup(e, { expose: t, emit: l }) { 37285 const { setSelectionGrid: a, buildMultiLevelMatrix: n, setMonthPicker: i } = bt(), c = l, w = e, { defaultedAriaLabels: f, defaultedTextInput: F, defaultedConfig: p } = Ce( 37286 w 37287 ), { hideNavigationButtons: _ } = ma(), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(0), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); 37288 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate)(() => { 37289 R.value = null; 37290 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37291 (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => q()), w.noOverlayFocus || ae(), G(!0); 37292 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => G(!1)); 37293 const G = (d) => { 37294 var m; 37295 w.arrowNavigation && ((m = w.headerRefs) != null && m.length ? i(d) : a(d)); 37296 }, ae = () => { 37297 var m; 37298 const d = Ie(z); 37299 d && (F.value.enabled || (R.value ? (m = R.value) == null || m.focus({ preventScroll: !0 }) : d.focus({ preventScroll: !0 })), k.value = d.clientHeight < d.scrollHeight); 37300 }, oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37301 () => ({ 37302 dp__overlay: !0, 37303 "dp--overlay-absolute": !w.useRelative, 37304 "dp--overlay-relative": w.useRelative 37305 }) 37306 ), Z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37307 () => w.useRelative ? { height: `${w.height}px`, width: "var(--dp-menu-min-width)" } : void 0 37308 ), P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ 37309 dp__overlay_col: !0 37310 })), x = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37311 () => ({ 37312 dp__btn: !0, 37313 dp__button: !0, 37314 dp__overlay_action: !0, 37315 dp__over_action_scroll: k.value, 37316 dp__button_bottom: w.isLast 37317 }) 37318 ), Y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 37319 var d, m; 37320 return { 37321 dp__overlay_container: !0, 37322 dp__container_flex: ((d = w.items) == null ? void 0 : d.length) <= 6, 37323 dp__container_block: ((m = w.items) == null ? void 0 : m.length) > 6 37324 }; 37325 }); 37326 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 37327 () => w.items, 37328 () => q(!1), 37329 { deep: !0 } 37330 ); 37331 const q = (d = !0) => { 37332 (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 37333 const m = Ie(R), L = Ie(z), u = Ie(v), b = Ie(S), I = u ? u.getBoundingClientRect().height : 0; 37334 L && (L.getBoundingClientRect().height ? O.value = L.getBoundingClientRect().height - I : O.value = p.value.modeHeight - I), m && b && d && (b.scrollTop = m.offsetTop - b.offsetTop - (O.value / 2 - m.getBoundingClientRect().height) - I); 37335 }); 37336 }, ie = (d) => { 37337 d.disabled || c("selected", d.value); 37338 }, fe = () => { 37339 c("toggle"), c("reset-flow"); 37340 }, h = () => { 37341 w.escClose && fe(); 37342 }, U = (d, m, L, u) => { 37343 d && ((m.active || m.value === w.focusValue) && (R.value = d), w.arrowNavigation && (Array.isArray(N.value[L]) ? N.value[L][u] = d : N.value[L] = [d], ee())); 37344 }, ee = () => { 37345 var m, L; 37346 const d = (m = w.headerRefs) != null && m.length ? [w.headerRefs].concat(N.value) : N.value.concat([w.skipButtonRef ? [] : [v.value]]); 37347 n(Ye(d), (L = w.headerRefs) != null && L.length ? "monthPicker" : "selectionGrid"); 37348 }, y = (d) => { 37349 w.arrowNavigation || yt(d, p.value, !0); 37350 }, Q = (d) => { 37351 H.value = d, c("hover-value", d); 37352 }, A = () => { 37353 if (fe(), !w.isLast) { 37354 const d = Ea(w.menuWrapRef ?? null, "action-row"); 37355 if (d) { 37356 const m = Tn(d); 37357 m == null || m.focus(); 37358 } 37359 } 37360 }, ne = (d) => { 37361 switch (d.key) { 37362 case Pe.esc: 37363 return h(); 37364 case Pe.arrowLeft: 37365 return y(d); 37366 case Pe.arrowRight: 37367 return y(d); 37368 case Pe.arrowUp: 37369 return y(d); 37370 case Pe.arrowDown: 37371 return y(d); 37372 default: 37373 return; 37374 } 37375 }, de = (d) => { 37376 if (d.key === Pe.enter) return fe(); 37377 if (d.key === Pe.tab) return A(); 37378 }; 37379 return t({ focusGrid: ae }), (d, m) => { 37380 var L; 37381 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37382 ref_key: "gridWrapRef", 37383 ref: z, 37384 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(oe.value), 37385 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(Z.value), 37386 role: d.useRelative ? void 0 : "dialog", 37387 "aria-label": d.overlayLabel, 37388 tabindex: d.useRelative ? void 0 : "0", 37389 onKeydown: ne, 37390 onClick: m[0] || (m[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(() => { 37391 }, ["prevent"])) 37392 }, [ 37393 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 37394 ref_key: "containerRef", 37395 ref: S, 37396 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(Y.value), 37397 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({ "--dp-overlay-height": `${O.value}px` }), 37398 role: "grid" 37399 }, [ 37400 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", xl, [ 37401 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "header") 37402 ]), 37403 d.$slots.overlay ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "overlay", { key: 0 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(d.items, (u, b) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37404 key: b, 37405 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__overlay_row", { dp__flex_row: d.items.length >= 3 }]), 37406 role: "row" 37407 }, [ 37408 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(u, (I, s) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37409 key: I.value, 37410 ref_for: !0, 37411 ref: (le) => U(le, I, b, s), 37412 role: "gridcell", 37413 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(P.value), 37414 "aria-selected": I.active || void 0, 37415 "aria-disabled": I.disabled || void 0, 37416 tabindex: "0", 37417 "data-test": I.text, 37418 onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((le) => ie(I), ["prevent"]), 37419 onKeydown: (le) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(le, () => ie(I), !0), 37420 onMouseover: (le) => Q(I.value) 37421 }, [ 37422 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 37423 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(I.className) 37424 }, [ 37425 d.$slots.item ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "item", { 37426 key: 0, 37427 item: I 37428 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37429 d.$slots.item ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 37430 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(I.text), 1) 37431 ], 64)) 37432 ], 2) 37433 ], 42, er))), 128)) 37434 ], 2))), 128)) 37435 ], 6), 37436 d.$slots["button-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 37437 key: 0, 37438 ref_key: "toggleButton", 37439 ref: v, 37440 type: "button", 37441 "aria-label": (L = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : L.toggleOverlay, 37442 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(x.value), 37443 tabindex: "0", 37444 onClick: fe, 37445 onKeydown: de 37446 }, [ 37447 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "button-icon") 37448 ], 42, tr)), [ 37449 [vue__WEBPACK_IMPORTED_MODULE_0__.vShow, !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_)(d.hideNavigation, d.type)] 37450 ]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 37451 ], 46, Zl); 37452 }; 37453 } 37454}), fa = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37455 __name: "InstanceWrap", 37456 props: { 37457 multiCalendars: {}, 37458 stretch: { type: Boolean }, 37459 collapse: { type: Boolean } 37460 }, 37461 setup(e) { 37462 const t = e, l = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 37463 () => t.multiCalendars > 0 ? [...Array(t.multiCalendars).keys()] : [0] 37464 ), a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ 37465 dp__instance_calendar: t.multiCalendars > 0 37466 })); 37467 return (n, i) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37468 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 37469 dp__menu_inner: !n.stretch, 37470 "dp--menu--inner-stretched": n.stretch, 37471 dp__flex_display: n.multiCalendars > 0, 37472 "dp--flex-display-collapsed": n.collapse 37473 }) 37474 }, [ 37475 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(l.value, (c, w) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 37476 key: c, 37477 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(a.value) 37478 }, [ 37479 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(n.$slots, "default", { 37480 instance: c, 37481 index: w 37482 }) 37483 ], 2))), 128)) 37484 ], 2)); 37485 } 37486}), ar = ["data-dp-element", "aria-label", "aria-disabled"], Ut = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37487 compatConfig: { 37488 MODE: 3 37489 }, 37490 __name: "ArrowBtn", 37491 props: { 37492 ariaLabel: {}, 37493 elName: {}, 37494 disabled: { type: Boolean } 37495 }, 37496 emits: ["activate", "set-ref"], 37497 setup(e, { emit: t }) { 37498 const l = t, a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); 37499 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => l("set-ref", a)), (n, i) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 37500 ref_key: "elRef", 37501 ref: a, 37502 type: "button", 37503 "data-dp-element": n.elName, 37504 class: "dp__btn dp--arrow-btn-nav", 37505 tabindex: "0", 37506 "aria-label": n.ariaLabel, 37507 "aria-disabled": n.disabled || void 0, 37508 onClick: i[0] || (i[0] = (c) => n.$emit("activate")), 37509 onKeydown: i[1] || (i[1] = (c) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(c, () => n.$emit("activate"), !0)) 37510 }, [ 37511 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { 37512 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__inner_nav", { dp__inner_nav_disabled: n.disabled }]) 37513 }, [ 37514 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(n.$slots, "default") 37515 ], 2) 37516 ], 40, ar)); 37517 } 37518}), nr = ["aria-label", "data-test"], En = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37519 __name: "YearModePicker", 37520 props: { 37521 ...rt, 37522 showYearPicker: { type: Boolean, default: !1 }, 37523 items: { type: Array, default: () => [] }, 37524 instance: { type: Number, default: 0 }, 37525 year: { type: Number, default: 0 }, 37526 isDisabled: { type: Function, default: () => !1 } 37527 }, 37528 emits: ["toggle-year-picker", "year-select", "handle-year"], 37529 setup(e, { emit: t }) { 37530 const l = t, a = e, { showRightIcon: n, showLeftIcon: i } = ma(), { defaultedConfig: c, defaultedMultiCalendars: w, defaultedAriaLabels: f, defaultedTransitions: F, defaultedUI: p } = Ce(a), { showTransition: _, transitionName: k } = Xt(F), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), z = (v = !1, O) => { 37531 R.value = !R.value, l("toggle-year-picker", { flow: v, show: O }); 37532 }, N = (v) => { 37533 R.value = !1, l("year-select", v); 37534 }, H = (v = !1) => { 37535 l("handle-year", v); 37536 }; 37537 return (v, O) => { 37538 var S, G, ae, oe, Z; 37539 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [ 37540 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 37541 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp--year-mode-picker", { "dp--hidden-el": R.value }]) 37542 }, [ 37543 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(i)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), e.instance) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Ut, { 37544 key: 0, 37545 ref: "mpPrevIconRef", 37546 "aria-label": (S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : S.prevYear, 37547 disabled: e.isDisabled(!1), 37548 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)((G = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p)) == null ? void 0 : G.navBtnPrev), 37549 onActivate: O[0] || (O[0] = (P) => H(!1)) 37550 }, { 37551 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 37552 v.$slots["arrow-left"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(v.$slots, "arrow-left", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37553 v.$slots["arrow-left"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(za), { key: 1 })) 37554 ]), 37555 _: 3 37556 }, 8, ["aria-label", "disabled", "class"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37557 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 37558 ref: "mpYearButtonRef", 37559 class: "dp__btn dp--year-select", 37560 type: "button", 37561 "aria-label": `${e.year}-${(ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : ae.openYearsOverlay}`, 37562 "data-test": `year-mode-btn-${e.instance}`, 37563 onClick: O[1] || (O[1] = () => z(!1)), 37564 onKeydown: O[2] || (O[2] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withKeys)(() => z(!1), ["enter"])) 37565 }, [ 37566 v.$slots.year ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(v.$slots, "year", { 37567 key: 0, 37568 year: e.year 37569 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37570 v.$slots.year ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 37571 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(e.year), 1) 37572 ], 64)) 37573 ], 40, nr), 37574 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(n)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), e.instance) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Ut, { 37575 key: 1, 37576 ref: "mpNextIconRef", 37577 "aria-label": (oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : oe.nextYear, 37578 disabled: e.isDisabled(!0), 37579 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)((Z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p)) == null ? void 0 : Z.navBtnNext), 37580 onActivate: O[3] || (O[3] = (P) => H(!0)) 37581 }, { 37582 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 37583 v.$slots["arrow-right"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(v.$slots, "arrow-right", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37584 v.$slots["arrow-right"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ha), { key: 1 })) 37585 ]), 37586 _: 3 37587 }, 8, ["aria-label", "disabled", "class"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 37588 ], 2), 37589 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 37590 name: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)(e.showYearPicker), 37591 css: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_) 37592 }, { 37593 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => { 37594 var P, x; 37595 return [ 37596 e.showYearPicker ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(qt, { 37597 key: 0, 37598 items: e.items, 37599 "text-input": v.textInput, 37600 "esc-close": v.escClose, 37601 config: v.config, 37602 "is-last": v.autoApply && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c).keepActionRow, 37603 "hide-navigation": v.hideNavigation, 37604 "aria-labels": v.ariaLabels, 37605 "overlay-label": (x = (P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : P.yearPicker) == null ? void 0 : x.call(P, !0), 37606 type: "year", 37607 onToggle: z, 37608 onSelected: O[4] || (O[4] = (Y) => N(Y)) 37609 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ 37610 "button-icon": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 37611 v.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(v.$slots, "calendar-icon", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37612 v.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Et), { key: 1 })) 37613 ]), 37614 _: 2 37615 }, [ 37616 v.$slots["year-overlay-value"] ? { 37617 name: "item", 37618 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ item: Y }) => [ 37619 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(v.$slots, "year-overlay-value", { 37620 text: Y.text, 37621 value: Y.value 37622 }) 37623 ]), 37624 key: "0" 37625 } : void 0 37626 ]), 1032, ["items", "text-input", "esc-close", "config", "is-last", "hide-navigation", "aria-labels", "overlay-label"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 37627 ]; 37628 }), 37629 _: 3 37630 }, 8, ["name", "css"]) 37631 ], 64); 37632 }; 37633 } 37634}), Xa = (e, t, l) => { 37635 if (t.value && Array.isArray(t.value)) 37636 if (t.value.some((a) => Me(e, a))) { 37637 const a = t.value.filter((n) => !Me(n, e)); 37638 t.value = a.length ? a : null; 37639 } else (l && +l > t.value.length || !l) && t.value.push(e); 37640 else 37641 t.value = [e]; 37642}, Ja = (e, t, l) => { 37643 let a = e.value ? e.value.slice() : []; 37644 return a.length === 2 && a[1] !== null && (a = []), a.length ? Oe(t, a[0]) ? (a.unshift(t), l("range-start", a[0]), l("range-start", a[1])) : (a[1] = t, l("range-end", t)) : (a = [t], l("range-start", t)), a; 37645}, va = (e, t, l, a) => { 37646 e && (e[0] && e[1] && l && t("auto-apply"), e[0] && !e[1] && a && l && t("auto-apply")); 37647}, Fn = (e) => { 37648 Array.isArray(e.value) && e.value.length <= 2 && e.range ? e.modelValue.value = e.value.map((t) => qe(K(t), e.timezone)) : Array.isArray(e.value) || (e.modelValue.value = qe(K(e.value), e.timezone)); 37649}, Ln = (e, t, l, a) => Array.isArray(t.value) && (t.value.length === 2 || t.value.length === 1 && a.value.partialRange) ? a.value.fixedStart && (Be(e, t.value[0]) || Me(e, t.value[0])) ? [t.value[0], e] : a.value.fixedEnd && (Oe(e, t.value[1]) || Me(e, t.value[1])) ? [e, t.value[1]] : (l("invalid-fixed-range", e), t.value) : [], zn = ({ 37650 multiCalendars: e, 37651 range: t, 37652 highlight: l, 37653 propDates: a, 37654 calendars: n, 37655 modelValue: i, 37656 props: c, 37657 filters: w, 37658 year: f, 37659 month: F, 37660 emit: p 37661}) => { 37662 const _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Ka(c.yearRange, c.locale, c.reverseYears)), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([!1]), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (Y, q) => { 37663 const ie = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(lt(/* @__PURE__ */ new Date()), { 37664 month: F.value(Y), 37665 year: f.value(Y) 37666 }), fe = q ? (0,date_fns__WEBPACK_IMPORTED_MODULE_29__.endOfYear)(ie) : (0,date_fns__WEBPACK_IMPORTED_MODULE_30__.startOfYear)(ie); 37667 return _n( 37668 fe, 37669 a.value.maxDate, 37670 a.value.minDate, 37671 c.preventMinMaxNavigation, 37672 q 37673 ); 37674 }), z = () => Array.isArray(i.value) && e.value.solo && i.value[1], N = () => { 37675 for (let Y = 0; Y < e.value.count; Y++) 37676 if (Y === 0) 37677 n.value[Y] = n.value[0]; 37678 else if (Y === e.value.count - 1 && z()) 37679 n.value[Y] = { 37680 month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(i.value[1]), 37681 year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(i.value[1]) 37682 }; 37683 else { 37684 const q = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), n.value[Y - 1]); 37685 n.value[Y] = { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(q), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)((0,date_fns__WEBPACK_IMPORTED_MODULE_27__.addYears)(q, 1)) }; 37686 } 37687 }, H = (Y) => { 37688 if (!Y) return N(); 37689 const q = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), n.value[Y]); 37690 return n.value[0].year = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)((0,date_fns__WEBPACK_IMPORTED_MODULE_28__.subYears)(q, e.value.count - 1)), N(); 37691 }, v = (Y, q) => { 37692 const ie = (0,date_fns__WEBPACK_IMPORTED_MODULE_31__.differenceInYears)(q, Y); 37693 return t.value.showLastInRange && ie > 1 ? q : Y; 37694 }, O = (Y) => c.focusStartDate || e.value.solo ? Y[0] : Y[1] ? v(Y[0], Y[1]) : Y[0], S = () => { 37695 if (i.value) { 37696 const Y = Array.isArray(i.value) ? O(i.value) : i.value; 37697 n.value[0] = { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(Y), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(Y) }; 37698 } 37699 }, G = () => { 37700 S(), e.value.count && N(); 37701 }; 37702 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(i, (Y, q) => { 37703 c.isTextInputDate && JSON.stringify(Y ?? {}) !== JSON.stringify(q ?? {}) && G(); 37704 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37705 G(); 37706 }); 37707 const ae = (Y, q) => { 37708 n.value[q].year = Y, p("update-month-year", { instance: q, year: Y, month: n.value[q].month }), e.value.count && !e.value.solo && H(q); 37709 }, oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (Y) => Yt(_.value, (q) => { 37710 var U; 37711 const ie = f.value(Y) === q.value, fe = Gt( 37712 q.value, 37713 It(a.value.minDate), 37714 It(a.value.maxDate) 37715 ) || ((U = w.value.years) == null ? void 0 : U.includes(f.value(Y))), h = qa(l.value, q.value); 37716 return { active: ie, disabled: fe, highlighted: h }; 37717 })), Z = (Y, q) => { 37718 ae(Y, q), x(q); 37719 }, P = (Y, q = !1) => { 37720 if (!R.value(Y, q)) { 37721 const ie = q ? f.value(Y) + 1 : f.value(Y) - 1; 37722 ae(ie, Y); 37723 } 37724 }, x = (Y, q = !1, ie) => { 37725 q || p("reset-flow"), ie !== void 0 ? k.value[Y] = ie : k.value[Y] = !k.value[Y], k.value[Y] ? p("overlay-toggle", { open: !0, overlay: He.year }) : (p("overlay-closed"), p("overlay-toggle", { open: !1, overlay: He.year })); 37726 }; 37727 return { 37728 isDisabled: R, 37729 groupedYears: oe, 37730 showYearPicker: k, 37731 selectYear: ae, 37732 toggleYearPicker: x, 37733 handleYearSelect: Z, 37734 handleYear: P 37735 }; 37736}, lr = (e, t) => { 37737 const { 37738 defaultedMultiCalendars: l, 37739 defaultedAriaLabels: a, 37740 defaultedTransitions: n, 37741 defaultedConfig: i, 37742 defaultedRange: c, 37743 defaultedHighlight: w, 37744 propDates: f, 37745 defaultedTz: F, 37746 defaultedFilters: p, 37747 defaultedMultiDates: _ 37748 } = Ce(e), k = () => { 37749 e.isTextInputDate && G((0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e.startDate)), 0); 37750 }, { modelValue: R, year: z, month: N, calendars: H } = Jt(e, t, k), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => $n(e.formatLocale, e.locale, e.monthNameFormat)), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), { checkMinMaxRange: S } = kt(e), { 37751 selectYear: G, 37752 groupedYears: ae, 37753 showYearPicker: oe, 37754 toggleYearPicker: Z, 37755 handleYearSelect: P, 37756 handleYear: x, 37757 isDisabled: Y 37758 } = zn({ 37759 modelValue: R, 37760 multiCalendars: l, 37761 range: c, 37762 highlight: w, 37763 calendars: H, 37764 year: z, 37765 propDates: f, 37766 month: N, 37767 filters: p, 37768 props: e, 37769 emit: t 37770 }); 37771 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37772 e.startDate && (R.value && e.focusStartDate || !R.value) && G((0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e.startDate)), 0); 37773 }); 37774 const q = (b) => b ? { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(b), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(b) } : { month: null, year: null }, ie = () => R.value ? Array.isArray(R.value) ? R.value.map((b) => q(b)) : q(R.value) : q(), fe = (b, I) => { 37775 const s = H.value[b], le = ie(); 37776 return Array.isArray(le) ? le.some((pe) => pe.year === (s == null ? void 0 : s.year) && pe.month === I) : (s == null ? void 0 : s.year) === le.year && I === le.month; 37777 }, h = (b, I, s) => { 37778 var pe, $; 37779 const le = ie(); 37780 return Array.isArray(le) ? z.value(I) === ((pe = le[s]) == null ? void 0 : pe.year) && b === (($ = le[s]) == null ? void 0 : $.month) : !1; 37781 }, U = (b, I) => { 37782 if (c.value.enabled) { 37783 const s = ie(); 37784 if (Array.isArray(R.value) && Array.isArray(s)) { 37785 const le = h(b, I, 0) || h(b, I, 1), pe = dt(lt(K()), b, z.value(I)); 37786 return da(R.value, O.value, pe) && !le; 37787 } 37788 return !1; 37789 } 37790 return !1; 37791 }, ee = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (b) => Yt(v.value, (I) => { 37792 var ge; 37793 const s = fe(b, I.value), le = Gt( 37794 I.value, 37795 Pn(z.value(b), f.value.minDate), 37796 Rn(z.value(b), f.value.maxDate) 37797 ) || Rl(f.value.disabledDates, z.value(b)).includes(I.value) || ((ge = p.value.months) == null ? void 0 : ge.includes(I.value)), pe = U(I.value, b), $ = Yn(w.value, I.value, z.value(b)); 37798 return { active: s, disabled: le, isBetween: pe, highlighted: $ }; 37799 })), y = (b, I) => dt(lt(K()), b, z.value(I)), Q = (b, I) => { 37800 const s = R.value ? R.value : lt(/* @__PURE__ */ new Date()); 37801 R.value = dt(s, b, z.value(I)), t("auto-apply"), t("update-flow-step"); 37802 }, A = (b, I) => { 37803 const s = y(b, I); 37804 c.value.fixedEnd || c.value.fixedStart ? R.value = Ln(s, R, t, c) : R.value ? S(s, R.value) && (R.value = Ja(R, y(b, I), t)) : R.value = [y(b, I)], (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 37805 va(R.value, t, e.autoApply, e.modelAuto); 37806 }); 37807 }, ne = (b, I) => { 37808 Xa(y(b, I), R, _.value.limit), t("auto-apply", !0); 37809 }, de = (b, I) => (H.value[I].month = b, m(I, H.value[I].year, b), _.value.enabled ? ne(b, I) : c.value.enabled ? A(b, I) : Q(b, I)), d = (b, I) => { 37810 G(b, I), m(I, b, null); 37811 }, m = (b, I, s) => { 37812 let le = s; 37813 if (!le && le !== 0) { 37814 const pe = ie(); 37815 le = Array.isArray(pe) ? pe[b].month : pe.month; 37816 } 37817 t("update-month-year", { instance: b, year: I, month: le }); 37818 }; 37819 return { 37820 groupedMonths: ee, 37821 groupedYears: ae, 37822 year: z, 37823 isDisabled: Y, 37824 defaultedMultiCalendars: l, 37825 defaultedAriaLabels: a, 37826 defaultedTransitions: n, 37827 defaultedConfig: i, 37828 showYearPicker: oe, 37829 modelValue: R, 37830 presetDate: (b, I) => { 37831 Fn({ 37832 value: b, 37833 modelValue: R, 37834 range: c.value.enabled, 37835 timezone: I ? void 0 : F.value.timezone 37836 }), t("auto-apply"); 37837 }, 37838 setHoverDate: (b, I) => { 37839 O.value = y(b, I); 37840 }, 37841 selectMonth: de, 37842 selectYear: d, 37843 toggleYearPicker: Z, 37844 handleYearSelect: P, 37845 handleYear: x, 37846 getModelMonthYear: ie 37847 }; 37848}, rr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37849 compatConfig: { 37850 MODE: 3 37851 }, 37852 __name: "MonthPicker", 37853 props: { 37854 ...rt 37855 }, 37856 emits: [ 37857 "update:internal-model-value", 37858 "overlay-closed", 37859 "reset-flow", 37860 "range-start", 37861 "range-end", 37862 "auto-apply", 37863 "update-month-year", 37864 "update-flow-step", 37865 "mount", 37866 "invalid-fixed-range", 37867 "overlay-toggle" 37868 ], 37869 setup(e, { expose: t, emit: l }) { 37870 const a = l, n = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), i = Je(n, "yearMode"), c = e; 37871 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37872 c.shadow || a("mount", null); 37873 }); 37874 const { 37875 groupedMonths: w, 37876 groupedYears: f, 37877 year: F, 37878 isDisabled: p, 37879 defaultedMultiCalendars: _, 37880 defaultedConfig: k, 37881 showYearPicker: R, 37882 modelValue: z, 37883 presetDate: N, 37884 setHoverDate: H, 37885 selectMonth: v, 37886 selectYear: O, 37887 toggleYearPicker: S, 37888 handleYearSelect: G, 37889 handleYear: ae, 37890 getModelMonthYear: oe 37891 } = lr(c, a); 37892 return t({ getSidebarProps: () => ({ 37893 modelValue: z, 37894 year: F, 37895 getModelMonthYear: oe, 37896 selectMonth: v, 37897 selectYear: O, 37898 handleYear: ae 37899 }), presetDate: N, toggleYearPicker: (P) => S(0, P) }), (P, x) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(fa, { 37900 "multi-calendars": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_).count, 37901 collapse: P.collapse, 37902 stretch: "" 37903 }, { 37904 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ instance: Y }) => [ 37905 P.$slots["top-extra"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(P.$slots, "top-extra", { 37906 key: 0, 37907 value: P.internalModelValue 37908 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 37909 P.$slots["month-year"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(P.$slots, "month-year", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ key: 1 }, { 37910 year: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F), 37911 months: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)(Y), 37912 years: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)(Y), 37913 selectMonth: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v), 37914 selectYear: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(O), 37915 instance: Y 37916 }))) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(qt, { 37917 key: 2, 37918 items: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)(Y), 37919 "arrow-navigation": P.arrowNavigation, 37920 "is-last": P.autoApply && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).keepActionRow, 37921 "esc-close": P.escClose, 37922 height: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).modeHeight, 37923 config: P.config, 37924 "no-overlay-focus": !!(P.noOverlayFocus || P.textInput), 37925 "use-relative": "", 37926 type: "month", 37927 onSelected: (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(q, Y), 37928 onHoverValue: (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(q, Y) 37929 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ 37930 header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 37931 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(En, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)(P.$props, { 37932 items: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)(Y), 37933 instance: Y, 37934 "show-year-picker": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(R)[Y], 37935 year: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F)(Y), 37936 "is-disabled": (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p)(Y, q), 37937 onHandleYear: (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ae)(Y, q), 37938 onYearSelect: (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(G)(q, Y), 37939 onToggleYearPicker: (q) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(S)(Y, q == null ? void 0 : q.flow, q == null ? void 0 : q.show) 37940 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 37941 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(i), (q, ie) => ({ 37942 name: q, 37943 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((fe) => [ 37944 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(P.$slots, q, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(fe))) 37945 ]) 37946 })) 37947 ]), 1040, ["items", "instance", "show-year-picker", "year", "is-disabled", "onHandleYear", "onYearSelect", "onToggleYearPicker"]) 37948 ]), 37949 _: 2 37950 }, [ 37951 P.$slots["month-overlay-value"] ? { 37952 name: "item", 37953 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ item: q }) => [ 37954 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(P.$slots, "month-overlay-value", { 37955 text: q.text, 37956 value: q.value 37957 }) 37958 ]), 37959 key: "0" 37960 } : void 0 37961 ]), 1032, ["items", "arrow-navigation", "is-last", "esc-close", "height", "config", "no-overlay-focus", "onSelected", "onHoverValue"])) 37962 ]), 37963 _: 3 37964 }, 8, ["multi-calendars", "collapse"])); 37965 } 37966}), or = (e, t) => { 37967 const l = () => { 37968 e.isTextInputDate && (p.value = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e.startDate))); 37969 }, { modelValue: a } = Jt(e, t, l), n = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), { defaultedHighlight: i, defaultedMultiDates: c, defaultedFilters: w, defaultedRange: f, propDates: F } = Ce(e), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(); 37970 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 37971 e.startDate && (a.value && e.focusStartDate || !a.value) && (p.value = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e.startDate))); 37972 }); 37973 const _ = (v) => Array.isArray(a.value) ? a.value.some((O) => (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(O) === v) : a.value ? (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(a.value) === v : !1, k = (v) => f.value.enabled && Array.isArray(a.value) ? da(a.value, n.value, z(v)) : !1, R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Yt(Ka(e.yearRange, e.locale, e.reverseYears), (v) => { 37974 const O = _(v.value), S = Gt( 37975 v.value, 37976 It(F.value.minDate), 37977 It(F.value.maxDate) 37978 ) || w.value.years.includes(v.value), G = k(v.value) && !O, ae = qa(i.value, v.value); 37979 return { active: O, disabled: S, isBetween: G, highlighted: ae }; 37980 })), z = (v) => (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(lt((0,date_fns__WEBPACK_IMPORTED_MODULE_30__.startOfYear)(/* @__PURE__ */ new Date())), v); 37981 return { 37982 groupedYears: R, 37983 modelValue: a, 37984 focusYear: p, 37985 setHoverValue: (v) => { 37986 n.value = (0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(lt(/* @__PURE__ */ new Date()), v); 37987 }, 37988 selectYear: (v) => { 37989 var O; 37990 if (t("update-month-year", { instance: 0, year: v }), c.value.enabled) 37991 return a.value ? Array.isArray(a.value) && (((O = a.value) == null ? void 0 : O.map((G) => (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(G))).includes(v) ? a.value = a.value.filter((G) => (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(G) !== v) : a.value.push((0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(Ge(K()), v))) : a.value = [(0,date_fns__WEBPACK_IMPORTED_MODULE_24__.setYear)(Ge((0,date_fns__WEBPACK_IMPORTED_MODULE_30__.startOfYear)(K())), v)], t("auto-apply", !0); 37992 f.value.enabled ? (a.value = Ja(a, z(v), t), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 37993 va(a.value, t, e.autoApply, e.modelAuto); 37994 })) : (a.value = z(v), t("auto-apply")); 37995 } 37996 }; 37997}, sr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 37998 compatConfig: { 37999 MODE: 3 38000 }, 38001 __name: "YearPicker", 38002 props: { 38003 ...rt 38004 }, 38005 emits: [ 38006 "update:internal-model-value", 38007 "reset-flow", 38008 "range-start", 38009 "range-end", 38010 "auto-apply", 38011 "update-month-year" 38012 ], 38013 setup(e, { expose: t, emit: l }) { 38014 const a = l, n = e, { groupedYears: i, modelValue: c, focusYear: w, selectYear: f, setHoverValue: F } = or(n, a), { defaultedConfig: p } = Ce(n); 38015 return t({ getSidebarProps: () => ({ 38016 modelValue: c, 38017 selectYear: f 38018 }) }), (k, R) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [ 38019 k.$slots["top-extra"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(k.$slots, "top-extra", { 38020 key: 0, 38021 value: k.internalModelValue 38022 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38023 k.$slots["month-year"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(k.$slots, "month-year", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ key: 1 }, { 38024 years: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(i), 38025 selectYear: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f) 38026 }))) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(qt, { 38027 key: 2, 38028 items: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(i), 38029 "is-last": k.autoApply && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).keepActionRow, 38030 height: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).modeHeight, 38031 config: k.config, 38032 "no-overlay-focus": !!(k.noOverlayFocus || k.textInput), 38033 "focus-value": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), 38034 type: "year", 38035 "use-relative": "", 38036 onSelected: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f), 38037 onHoverValue: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F) 38038 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 38039 k.$slots["year-overlay-value"] ? { 38040 name: "item", 38041 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ item: z }) => [ 38042 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(k.$slots, "year-overlay-value", { 38043 text: z.text, 38044 value: z.value 38045 }) 38046 ]), 38047 key: "0" 38048 } : void 0 38049 ]), 1032, ["items", "is-last", "height", "config", "no-overlay-focus", "focus-value", "onSelected", "onHoverValue"])) 38050 ])); 38051 } 38052}), ur = { 38053 key: 0, 38054 class: "dp__time_input" 38055}, ir = ["data-test", "aria-label", "onKeydown", "onClick", "onMousedown"], dr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_l" }, null, -1), cr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_r" }, null, -1), fr = ["aria-label", "disabled", "data-test", "onKeydown", "onClick"], vr = ["data-test", "aria-label", "onKeydown", "onClick", "onMousedown"], mr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_l" }, null, -1), pr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_r" }, null, -1), yr = { key: 0 }, gr = ["aria-label"], hr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 38056 compatConfig: { 38057 MODE: 3 38058 }, 38059 __name: "TimeInput", 38060 props: { 38061 hours: { type: Number, default: 0 }, 38062 minutes: { type: Number, default: 0 }, 38063 seconds: { type: Number, default: 0 }, 38064 closeTimePickerBtn: { type: Object, default: null }, 38065 order: { type: Number, default: 0 }, 38066 disabledTimesConfig: { type: Function, default: null }, 38067 validateTime: { type: Function, default: () => !1 }, 38068 ...rt 38069 }, 38070 emits: [ 38071 "set-hours", 38072 "set-minutes", 38073 "update:hours", 38074 "update:minutes", 38075 "update:seconds", 38076 "reset-flow", 38077 "mounted", 38078 "overlay-closed", 38079 "overlay-opened", 38080 "am-pm-change" 38081 ], 38082 setup(e, { expose: t, emit: l }) { 38083 const a = l, n = e, { setTimePickerElements: i, setTimePickerBackRef: c } = bt(), { defaultedAriaLabels: w, defaultedTransitions: f, defaultedFilters: F, defaultedConfig: p, defaultedRange: _ } = Ce(n), { transitionName: k, showTransition: R } = Xt(f), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ 38084 hours: !1, 38085 minutes: !1, 38086 seconds: !1 38087 }), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)("AM"), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1); 38088 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 38089 a("mounted"); 38090 }); 38091 const G = (r) => (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(/* @__PURE__ */ new Date(), { 38092 hours: r.hours, 38093 minutes: r.minutes, 38094 seconds: n.enableSeconds ? r.seconds : 0, 38095 milliseconds: 0 38096 }), ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 38097 () => (r) => y(r, n[r]) || Z(r, n[r]) 38098 ), oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ hours: n.hours, minutes: n.minutes, seconds: n.seconds })), Z = (r, B) => _.value.enabled && !_.value.disableTimeRangeValidation ? !n.validateTime(r, B) : !1, P = (r, B) => { 38099 if (_.value.enabled && !_.value.disableTimeRangeValidation) { 38100 const C = B ? +n[`${r}Increment`] : -+n[`${r}Increment`], V = n[r] + C; 38101 return !n.validateTime(r, V); 38102 } 38103 return !1; 38104 }, x = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (r) => !d(+n[r] + +n[`${r}Increment`], r) || P(r, !0)), Y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (r) => !d(+n[r] - +n[`${r}Increment`], r) || P(r, !1)), q = (r, B) => (0,date_fns__WEBPACK_IMPORTED_MODULE_32__.add)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), r), B), ie = (r, B) => (0,date_fns__WEBPACK_IMPORTED_MODULE_33__.sub)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), r), B), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 38105 () => ({ 38106 dp__time_col: !0, 38107 dp__time_col_block: !n.timePickerInline, 38108 dp__time_col_reg_block: !n.enableSeconds && n.is24 && !n.timePickerInline, 38109 dp__time_col_reg_inline: !n.enableSeconds && n.is24 && n.timePickerInline, 38110 dp__time_col_reg_with_button: !n.enableSeconds && !n.is24, 38111 dp__time_col_sec: n.enableSeconds && n.is24, 38112 dp__time_col_sec_with_button: n.enableSeconds && !n.is24 38113 }) 38114 ), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 38115 const r = [{ type: "hours" }]; 38116 return n.enableMinutes && r.push({ type: "", separator: !0 }, { 38117 type: "minutes" 38118 }), n.enableSeconds && r.push({ type: "", separator: !0 }, { 38119 type: "seconds" 38120 }), r; 38121 }), U = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => h.value.filter((r) => !r.separator)), ee = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (r) => { 38122 if (r === "hours") { 38123 const B = s(+n.hours); 38124 return { text: B < 10 ? `0${B}` : `${B}`, value: B }; 38125 } 38126 return { text: n[r] < 10 ? `0${n[r]}` : `${n[r]}`, value: n[r] }; 38127 }), y = (r, B) => { 38128 var V; 38129 if (!n.disabledTimesConfig) return !1; 38130 const C = n.disabledTimesConfig(n.order, r === "hours" ? B : void 0); 38131 return C[r] ? !!((V = C[r]) != null && V.includes(B)) : !0; 38132 }, Q = (r, B) => B !== "hours" || N.value === "AM" ? r : r + 12, A = (r) => { 38133 const B = n.is24 ? 24 : 12, C = r === "hours" ? B : 60, V = +n[`${r}GridIncrement`], se = r === "hours" && !n.is24 ? V : 0, M = []; 38134 for (let E = se; E < C; E += V) 38135 M.push({ value: n.is24 ? E : Q(E, r), text: E < 10 ? `0${E}` : `${E}` }); 38136 return r === "hours" && !n.is24 && M.unshift({ value: N.value === "PM" ? 12 : 0, text: "12" }), Yt(M, (E) => ({ active: !1, disabled: F.value.times[r].includes(E.value) || !d(E.value, r) || y(r, E.value) || Z(r, E.value) })); 38137 }, ne = (r) => r >= 0 ? r : 59, de = (r) => r >= 0 ? r : 23, d = (r, B) => { 38138 const C = n.minTime ? G(Aa(n.minTime)) : null, V = n.maxTime ? G(Aa(n.maxTime)) : null, se = G( 38139 Aa( 38140 oe.value, 38141 B, 38142 B === "minutes" || B === "seconds" ? ne(r) : de(r) 38143 ) 38144 ); 38145 return C && V ? ((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.isBefore)(se, V) || (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)(se, V)) && ((0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(se, C) || (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)(se, C)) : C ? (0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(se, C) || (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)(se, C) : V ? (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.isBefore)(se, V) || (0,date_fns__WEBPACK_IMPORTED_MODULE_12__.isEqual)(se, V) : !0; 38146 }, m = (r) => n[`no${r[0].toUpperCase() + r.slice(1)}Overlay`], L = (r) => { 38147 m(r) || (z[r] = !z[r], z[r] ? (S.value = !0, a("overlay-opened", r)) : (S.value = !1, a("overlay-closed", r))); 38148 }, u = (r) => r === "hours" ? date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours : r === "minutes" ? date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes : date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds, b = () => { 38149 O.value && clearTimeout(O.value); 38150 }, I = (r, B = !0, C) => { 38151 const V = B ? q : ie, se = B ? +n[`${r}Increment`] : -+n[`${r}Increment`]; 38152 d(+n[r] + se, r) && a( 38153 `update:${r}`, 38154 u(r)(V({ [r]: +n[r] }, { [r]: +n[`${r}Increment`] })) 38155 ), !(C != null && C.keyboard) && p.value.timeArrowHoldThreshold && (O.value = setTimeout(() => { 38156 I(r, B); 38157 }, p.value.timeArrowHoldThreshold)); 38158 }, s = (r) => n.is24 ? r : (r >= 12 ? N.value = "PM" : N.value = "AM", gl(r)), le = () => { 38159 N.value === "PM" ? (N.value = "AM", a("update:hours", n.hours - 12)) : (N.value = "PM", a("update:hours", n.hours + 12)), a("am-pm-change", N.value); 38160 }, pe = (r) => { 38161 z[r] = !0; 38162 }, $ = (r, B, C) => { 38163 if (r && n.arrowNavigation) { 38164 Array.isArray(v.value[B]) ? v.value[B][C] = r : v.value[B] = [r]; 38165 const V = v.value.reduce( 38166 (se, M) => M.map((E, ce) => [...se[ce] || [], M[ce]]), 38167 [] 38168 ); 38169 c(n.closeTimePickerBtn), H.value && (V[1] = V[1].concat(H.value)), i(V, n.order); 38170 } 38171 }, ge = (r, B) => (L(r), a(`update:${r}`, B)); 38172 return t({ openChildCmp: pe }), (r, B) => { 38173 var C; 38174 return r.disabled ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", ur, [ 38175 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(h.value, (V, se) => { 38176 var M, E, ce; 38177 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 38178 key: se, 38179 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(fe.value) 38180 }, [ 38181 V.separator ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 0 }, [ 38182 S.value ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 0 }, [ 38183 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(":") 38184 ], 64)) 38185 ], 64)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38186 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 38187 ref_for: !0, 38188 ref: (he) => $(he, se, 0), 38189 type: "button", 38190 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 38191 dp__btn: !0, 38192 dp__inc_dec_button: !r.timePickerInline, 38193 dp__inc_dec_button_inline: r.timePickerInline, 38194 dp__tp_inline_btn_top: r.timePickerInline, 38195 dp__inc_dec_button_disabled: x.value(V.type), 38196 "dp--hidden-el": S.value 38197 }), 38198 "data-test": `${V.type}-time-inc-btn-${n.order}`, 38199 "aria-label": (M = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)) == null ? void 0 : M.incrementValue(V.type), 38200 tabindex: "0", 38201 onKeydown: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(he, () => I(V.type, !0, { keyboard: !0 }), !0), 38202 onClick: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).timeArrowHoldThreshold ? void 0 : I(V.type, !0), 38203 onMousedown: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).timeArrowHoldThreshold ? I(V.type, !0) : void 0, 38204 onMouseup: b 38205 }, [ 38206 n.timePickerInline ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38207 r.$slots["tp-inline-arrow-up"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "tp-inline-arrow-up", { key: 0 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38208 dr, 38209 cr 38210 ], 64)) 38211 ], 64)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 0 }, [ 38212 r.$slots["arrow-up"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "arrow-up", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38213 r.$slots["arrow-up"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Va), { key: 1 })) 38214 ], 64)) 38215 ], 42, ir), 38216 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 38217 ref_for: !0, 38218 ref: (he) => $(he, se, 1), 38219 type: "button", 38220 "aria-label": `${ee.value(V.type).text}-${(E = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)) == null ? void 0 : E.openTpOverlay(V.type)}`, 38221 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 38222 dp__time_display: !0, 38223 dp__time_display_block: !r.timePickerInline, 38224 dp__time_display_inline: r.timePickerInline, 38225 "dp--time-invalid": ae.value(V.type), 38226 "dp--time-overlay-btn": !ae.value(V.type), 38227 "dp--hidden-el": S.value 38228 }), 38229 disabled: m(V.type), 38230 tabindex: "0", 38231 "data-test": `${V.type}-toggle-overlay-btn-${n.order}`, 38232 onKeydown: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(he, () => L(V.type), !0), 38233 onClick: (he) => L(V.type) 38234 }, [ 38235 r.$slots[V.type] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, V.type, { 38236 key: 0, 38237 text: ee.value(V.type).text, 38238 value: ee.value(V.type).value 38239 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38240 r.$slots[V.type] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38241 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(ee.value(V.type).text), 1) 38242 ], 64)) 38243 ], 42, fr), 38244 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 38245 ref_for: !0, 38246 ref: (he) => $(he, se, 2), 38247 type: "button", 38248 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 38249 dp__btn: !0, 38250 dp__inc_dec_button: !r.timePickerInline, 38251 dp__inc_dec_button_inline: r.timePickerInline, 38252 dp__tp_inline_btn_bottom: r.timePickerInline, 38253 dp__inc_dec_button_disabled: Y.value(V.type), 38254 "dp--hidden-el": S.value 38255 }), 38256 "data-test": `${V.type}-time-dec-btn-${n.order}`, 38257 "aria-label": (ce = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)) == null ? void 0 : ce.decrementValue(V.type), 38258 tabindex: "0", 38259 onKeydown: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(he, () => I(V.type, !1, { keyboard: !0 }), !0), 38260 onClick: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).timeArrowHoldThreshold ? void 0 : I(V.type, !1), 38261 onMousedown: (he) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).timeArrowHoldThreshold ? I(V.type, !1) : void 0, 38262 onMouseup: b 38263 }, [ 38264 n.timePickerInline ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38265 r.$slots["tp-inline-arrow-down"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "tp-inline-arrow-down", { key: 0 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38266 mr, 38267 pr 38268 ], 64)) 38269 ], 64)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 0 }, [ 38270 r.$slots["arrow-down"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "arrow-down", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38271 r.$slots["arrow-down"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Wa), { key: 1 })) 38272 ], 64)) 38273 ], 42, vr) 38274 ], 64)) 38275 ], 2); 38276 }), 128)), 38277 r.is24 ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", yr, [ 38278 r.$slots["am-pm-button"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "am-pm-button", { 38279 key: 0, 38280 toggle: le, 38281 value: N.value 38282 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38283 r.$slots["am-pm-button"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 38284 key: 1, 38285 ref_key: "amPmButton", 38286 ref: H, 38287 type: "button", 38288 class: "dp__pm_am_button", 38289 role: "button", 38290 "aria-label": (C = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)) == null ? void 0 : C.amPmButton, 38291 tabindex: "0", 38292 onClick: le, 38293 onKeydown: B[0] || (B[0] = (V) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(V, () => le(), !0)) 38294 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(N.value), 41, gr)) 38295 ])), 38296 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(U.value, (V, se) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 38297 key: se, 38298 name: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)(z[V.type]), 38299 css: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(R) 38300 }, { 38301 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => { 38302 var M, E; 38303 return [ 38304 z[V.type] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(qt, { 38305 key: 0, 38306 items: A(V.type), 38307 "is-last": r.autoApply && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p).keepActionRow, 38308 "esc-close": r.escClose, 38309 type: V.type, 38310 "text-input": r.textInput, 38311 config: r.config, 38312 "arrow-navigation": r.arrowNavigation, 38313 "aria-labels": r.ariaLabels, 38314 "overlay-label": (E = (M = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)).timeOverlay) == null ? void 0 : E.call(M, V.type), 38315 onSelected: (ce) => ge(V.type, ce), 38316 onToggle: (ce) => L(V.type), 38317 onResetFlow: B[1] || (B[1] = (ce) => r.$emit("reset-flow")) 38318 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ 38319 "button-icon": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38320 r.$slots["clock-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "clock-icon", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38321 r.$slots["clock-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(r.timePickerInline ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Et) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ua)), { key: 1 })) 38322 ]), 38323 _: 2 38324 }, [ 38325 r.$slots[`${V.type}-overlay-value`] ? { 38326 name: "item", 38327 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ item: ce }) => [ 38328 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, `${V.type}-overlay-value`, { 38329 text: ce.text, 38330 value: ce.value 38331 }) 38332 ]), 38333 key: "0" 38334 } : void 0, 38335 r.$slots[`${V.type}-overlay-header`] ? { 38336 name: "header", 38337 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38338 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, `${V.type}-overlay-header`, { 38339 toggle: () => L(V.type) 38340 }) 38341 ]), 38342 key: "1" 38343 } : void 0 38344 ]), 1032, ["items", "is-last", "esc-close", "type", "text-input", "config", "arrow-navigation", "aria-labels", "overlay-label", "onSelected", "onToggle"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 38345 ]; 38346 }), 38347 _: 2 38348 }, 1032, ["name", "css"]))), 128)) 38349 ])); 38350 }; 38351 } 38352}), br = { class: "dp--tp-wrap" }, kr = ["aria-label", "tabindex"], wr = ["role", "aria-label", "tabindex"], Dr = ["aria-label"], Hn = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 38353 compatConfig: { 38354 MODE: 3 38355 }, 38356 __name: "TimePicker", 38357 props: { 38358 hours: { type: [Number, Array], default: 0 }, 38359 minutes: { type: [Number, Array], default: 0 }, 38360 seconds: { type: [Number, Array], default: 0 }, 38361 disabledTimesConfig: { type: Function, default: null }, 38362 validateTime: { 38363 type: Function, 38364 default: () => !1 38365 }, 38366 ...rt 38367 }, 38368 emits: [ 38369 "update:hours", 38370 "update:minutes", 38371 "update:seconds", 38372 "mount", 38373 "reset-flow", 38374 "overlay-opened", 38375 "overlay-closed", 38376 "am-pm-change" 38377 ], 38378 setup(e, { expose: t, emit: l }) { 38379 const a = l, n = e, { buildMatrix: i, setTimePicker: c } = bt(), w = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), { defaultedTransitions: f, defaultedAriaLabels: F, defaultedTextInput: p, defaultedConfig: _, defaultedRange: k } = Ce(n), { transitionName: R, showTransition: z } = Xt(f), { hideNavigationButtons: N } = ma(), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), G = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1); 38380 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 38381 a("mount"), !n.timePicker && n.arrowNavigation ? i([Ie(H.value)], "time") : c(!0, n.timePicker); 38382 }); 38383 const ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => k.value.enabled && n.modelAuto ? An(n.internalModelValue) : !0), oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), Z = (A) => ({ 38384 hours: Array.isArray(n.hours) ? n.hours[A] : n.hours, 38385 minutes: Array.isArray(n.minutes) ? n.minutes[A] : n.minutes, 38386 seconds: Array.isArray(n.seconds) ? n.seconds[A] : n.seconds 38387 }), P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 38388 const A = []; 38389 if (k.value.enabled) 38390 for (let ne = 0; ne < 2; ne++) 38391 A.push(Z(ne)); 38392 else 38393 A.push(Z(0)); 38394 return A; 38395 }), x = (A, ne = !1, de = "") => { 38396 ne || a("reset-flow"), oe.value = A, a(A ? "overlay-opened" : "overlay-closed", He.time), n.arrowNavigation && c(A), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 38397 de !== "" && O.value[0] && O.value[0].openChildCmp(de); 38398 }); 38399 }, Y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ 38400 dp__btn: !0, 38401 dp__button: !0, 38402 dp__button_bottom: n.autoApply && !_.value.keepActionRow 38403 })), q = Je(w, "timePicker"), ie = (A, ne, de) => k.value.enabled ? ne === 0 ? [A, P.value[1][de]] : [P.value[0][de], A] : A, fe = (A) => { 38404 a("update:hours", A); 38405 }, h = (A) => { 38406 a("update:minutes", A); 38407 }, U = (A) => { 38408 a("update:seconds", A); 38409 }, ee = () => { 38410 if (S.value && !p.value.enabled && !n.noOverlayFocus) { 38411 const A = Tn(S.value); 38412 A && A.focus({ preventScroll: !0 }); 38413 } 38414 }, y = (A) => { 38415 G.value = !1, a("overlay-closed", A); 38416 }, Q = (A) => { 38417 G.value = !0, a("overlay-opened", A); 38418 }; 38419 return t({ toggleTimePicker: x }), (A, ne) => { 38420 var de; 38421 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", br, [ 38422 !A.timePicker && !A.timePickerInline ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 38423 key: 0, 38424 ref_key: "openTimePickerBtn", 38425 ref: H, 38426 type: "button", 38427 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ ...Y.value, "dp--hidden-el": oe.value }), 38428 "aria-label": (de = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F)) == null ? void 0 : de.openTimePicker, 38429 tabindex: A.noOverlayFocus ? void 0 : 0, 38430 "data-test": "open-time-picker-btn", 38431 onKeydown: ne[0] || (ne[0] = (d) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(d, () => x(!0))), 38432 onClick: ne[1] || (ne[1] = (d) => x(!0)) 38433 }, [ 38434 A.$slots["clock-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(A.$slots, "clock-icon", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38435 A.$slots["clock-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ua), { key: 1 })) 38436 ], 42, kr)), [ 38437 [vue__WEBPACK_IMPORTED_MODULE_0__.vShow, !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(N)(A.hideNavigation, "time")] 38438 ]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38439 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 38440 name: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(R)(oe.value), 38441 css: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(z) && !A.timePickerInline 38442 }, { 38443 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => { 38444 var d, m; 38445 return [ 38446 oe.value || A.timePicker || A.timePickerInline ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 38447 key: 0, 38448 ref_key: "overlayRef", 38449 ref: S, 38450 role: A.timePickerInline ? void 0 : "dialog", 38451 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 38452 dp__overlay: !A.timePickerInline, 38453 "dp--overlay-absolute": !n.timePicker && !A.timePickerInline, 38454 "dp--overlay-relative": n.timePicker 38455 }), 38456 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(A.timePicker ? { height: `${(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_).modeHeight}px` } : void 0), 38457 "aria-label": (d = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F)) == null ? void 0 : d.timePicker, 38458 tabindex: A.timePickerInline ? void 0 : 0 38459 }, [ 38460 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 38461 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)( 38462 A.timePickerInline ? "dp__time_picker_inline_container" : "dp__overlay_container dp__container_flex dp__time_picker_overlay_container" 38463 ), 38464 style: { display: "flex" } 38465 }, [ 38466 A.$slots["time-picker-overlay"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(A.$slots, "time-picker-overlay", { 38467 key: 0, 38468 hours: e.hours, 38469 minutes: e.minutes, 38470 seconds: e.seconds, 38471 setHours: fe, 38472 setMinutes: h, 38473 setSeconds: U 38474 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38475 A.$slots["time-picker-overlay"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 38476 key: 1, 38477 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(A.timePickerInline ? "dp__flex" : "dp__overlay_row dp__flex_row") 38478 }, [ 38479 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(P.value, (L, u) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(hr, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 38480 key: u, 38481 ref_for: !0 38482 }, { 38483 ...A.$props, 38484 order: u, 38485 hours: L.hours, 38486 minutes: L.minutes, 38487 seconds: L.seconds, 38488 closeTimePickerBtn: v.value, 38489 disabledTimesConfig: e.disabledTimesConfig, 38490 disabled: u === 0 ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).fixedStart : (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).fixedEnd 38491 }, { 38492 ref_for: !0, 38493 ref_key: "timeInputRefs", 38494 ref: O, 38495 "validate-time": (b, I) => e.validateTime(b, ie(I, u, b)), 38496 "onUpdate:hours": (b) => fe(ie(b, u, "hours")), 38497 "onUpdate:minutes": (b) => h(ie(b, u, "minutes")), 38498 "onUpdate:seconds": (b) => U(ie(b, u, "seconds")), 38499 onMounted: ee, 38500 onOverlayClosed: y, 38501 onOverlayOpened: Q, 38502 onAmPmChange: ne[2] || (ne[2] = (b) => A.$emit("am-pm-change", b)) 38503 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 38504 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(q), (b, I) => ({ 38505 name: b, 38506 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((s) => [ 38507 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(A.$slots, b, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ ref_for: !0 }, s)) 38508 ]) 38509 })) 38510 ]), 1040, ["validate-time", "onUpdate:hours", "onUpdate:minutes", "onUpdate:seconds"])), [ 38511 [vue__WEBPACK_IMPORTED_MODULE_0__.vShow, u === 0 ? !0 : ae.value] 38512 ])), 128)) 38513 ], 2)), 38514 !A.timePicker && !A.timePickerInline ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 38515 key: 2, 38516 ref_key: "closeTimePickerBtn", 38517 ref: v, 38518 type: "button", 38519 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ ...Y.value, "dp--hidden-el": G.value }), 38520 "aria-label": (m = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F)) == null ? void 0 : m.closeTimePicker, 38521 tabindex: "0", 38522 onKeydown: ne[3] || (ne[3] = (L) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(L, () => x(!1))), 38523 onClick: ne[4] || (ne[4] = (L) => x(!1)) 38524 }, [ 38525 A.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(A.$slots, "calendar-icon", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38526 A.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Et), { key: 1 })) 38527 ], 42, Dr)), [ 38528 [vue__WEBPACK_IMPORTED_MODULE_0__.vShow, !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(N)(A.hideNavigation, "time")] 38529 ]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 38530 ], 2) 38531 ], 14, wr)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 38532 ]; 38533 }), 38534 _: 3 38535 }, 8, ["name", "css"]) 38536 ]); 38537 }; 38538 } 38539}), Un = (e, t, l, a) => { 38540 const { defaultedRange: n } = Ce(e), i = (S, G) => Array.isArray(t[S]) ? t[S][G] : t[S], c = (S) => e.enableSeconds ? Array.isArray(t.seconds) ? t.seconds[S] : t.seconds : 0, w = (S, G) => S ? G !== void 0 ? gt(S, i("hours", G), i("minutes", G), c(G)) : gt(S, t.hours, t.minutes, c()) : (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.setSeconds)(K(), c(G)), f = (S, G) => { 38541 t[S] = G; 38542 }, F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => e.modelAuto && n.value.enabled ? Array.isArray(l.value) ? l.value.length > 1 : !1 : n.value.enabled), p = (S, G) => { 38543 const ae = Object.fromEntries( 38544 Object.keys(t).map((oe) => oe === S ? [oe, G] : [oe, t[oe]].slice()) 38545 ); 38546 if (F.value && !n.value.disableTimeRangeValidation) { 38547 const oe = (P) => l.value ? gt( 38548 l.value[P], 38549 ae.hours[P], 38550 ae.minutes[P], 38551 ae.seconds[P] 38552 ) : null, Z = (P) => (0,date_fns__WEBPACK_IMPORTED_MODULE_10__.setMilliseconds)(l.value[P], 0); 38553 return !(Me(oe(0), oe(1)) && ((0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(oe(0), Z(1)) || (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.isBefore)(oe(1), Z(0)))); 38554 } 38555 return !0; 38556 }, _ = (S, G) => { 38557 p(S, G) && (f(S, G), a && a()); 38558 }, k = (S) => { 38559 _("hours", S); 38560 }, R = (S) => { 38561 _("minutes", S); 38562 }, z = (S) => { 38563 _("seconds", S); 38564 }, N = (S, G, ae, oe) => { 38565 G && k(S), !G && !ae && R(S), ae && z(S), l.value && oe(l.value); 38566 }, H = (S) => { 38567 if (S) { 38568 const G = Array.isArray(S), ae = G ? [+S[0].hours, +S[1].hours] : +S.hours, oe = G ? [+S[0].minutes, +S[1].minutes] : +S.minutes, Z = G ? [+S[0].seconds, +S[1].seconds] : +S.seconds; 38569 f("hours", ae), f("minutes", oe), e.enableSeconds && f("seconds", Z); 38570 } 38571 }, v = (S, G) => { 38572 const ae = { 38573 hours: Array.isArray(t.hours) ? t.hours[S] : t.hours, 38574 disabledArr: [] 38575 }; 38576 return (G || G === 0) && (ae.hours = G), Array.isArray(e.disabledTimes) && (ae.disabledArr = n.value.enabled && Array.isArray(e.disabledTimes[S]) ? e.disabledTimes[S] : e.disabledTimes), ae; 38577 }, O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (S, G) => { 38578 var ae; 38579 if (Array.isArray(e.disabledTimes)) { 38580 const { disabledArr: oe, hours: Z } = v(S, G), P = oe.filter((x) => +x.hours === Z); 38581 return ((ae = P[0]) == null ? void 0 : ae.minutes) === "*" ? { hours: [Z], minutes: void 0, seconds: void 0 } : { 38582 hours: [], 38583 minutes: (P == null ? void 0 : P.map((x) => +x.minutes)) ?? [], 38584 seconds: (P == null ? void 0 : P.map((x) => x.seconds ? +x.seconds : void 0)) ?? [] 38585 }; 38586 } 38587 return { hours: [], minutes: [], seconds: [] }; 38588 }); 38589 return { 38590 setTime: f, 38591 updateHours: k, 38592 updateMinutes: R, 38593 updateSeconds: z, 38594 getSetDateTime: w, 38595 updateTimeValues: N, 38596 getSecondsValue: c, 38597 assignStartTime: H, 38598 validateTime: p, 38599 disabledTimesConfig: O 38600 }; 38601}, Mr = (e, t) => { 38602 const l = () => { 38603 e.isTextInputDate && G(); 38604 }, { modelValue: a, time: n } = Jt(e, t, l), { defaultedStartTime: i, defaultedRange: c, defaultedTz: w } = Ce(e), { updateTimeValues: f, getSetDateTime: F, setTime: p, assignStartTime: _, disabledTimesConfig: k, validateTime: R } = Un(e, n, a, z); 38605 function z() { 38606 t("update-flow-step"); 38607 } 38608 const N = (Z) => { 38609 const { hours: P, minutes: x, seconds: Y } = Z; 38610 return { hours: +P, minutes: +x, seconds: Y ? +Y : 0 }; 38611 }, H = () => { 38612 if (e.startTime) { 38613 if (Array.isArray(e.startTime)) { 38614 const P = N(e.startTime[0]), x = N(e.startTime[1]); 38615 return [(0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), P), (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), x)]; 38616 } 38617 const Z = N(e.startTime); 38618 return (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), Z); 38619 } 38620 return c.value.enabled ? [null, null] : null; 38621 }, v = () => { 38622 if (c.value.enabled) { 38623 const [Z, P] = H(); 38624 a.value = [ 38625 qe(F(Z, 0), w.value.timezone), 38626 qe(F(P, 1), w.value.timezone) 38627 ]; 38628 } else 38629 a.value = qe(F(H()), w.value.timezone); 38630 }, O = (Z) => Array.isArray(Z) ? [St(K(Z[0])), St(K(Z[1]))] : [St(Z ?? K())], S = (Z, P, x) => { 38631 p("hours", Z), p("minutes", P), p("seconds", e.enableSeconds ? x : 0); 38632 }, G = () => { 38633 const [Z, P] = O(a.value); 38634 return c.value.enabled ? S( 38635 [Z.hours, P.hours], 38636 [Z.minutes, P.minutes], 38637 [Z.seconds, P.seconds] 38638 ) : S(Z.hours, Z.minutes, Z.seconds); 38639 }; 38640 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 38641 if (!e.shadow) 38642 return _(i.value), a.value ? G() : v(); 38643 }); 38644 const ae = () => { 38645 Array.isArray(a.value) ? a.value = a.value.map((Z, P) => Z && F(Z, P)) : a.value = F(a.value), t("time-update"); 38646 }; 38647 return { 38648 modelValue: a, 38649 time: n, 38650 disabledTimesConfig: k, 38651 updateTime: (Z, P = !0, x = !1) => { 38652 f(Z, P, x, ae); 38653 }, 38654 validateTime: R 38655 }; 38656}, $r = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 38657 compatConfig: { 38658 MODE: 3 38659 }, 38660 __name: "TimePickerSolo", 38661 props: { 38662 ...rt 38663 }, 38664 emits: [ 38665 "update:internal-model-value", 38666 "time-update", 38667 "am-pm-change", 38668 "mount", 38669 "reset-flow", 38670 "update-flow-step", 38671 "overlay-toggle" 38672 ], 38673 setup(e, { expose: t, emit: l }) { 38674 const a = l, n = e, i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), c = Je(i, "timePicker"), w = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), { time: f, modelValue: F, disabledTimesConfig: p, updateTime: _, validateTime: k } = Mr(n, a); 38675 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 38676 n.shadow || a("mount", null); 38677 }), t({ getSidebarProps: () => ({ 38678 modelValue: F, 38679 time: f, 38680 updateTime: _ 38681 }), toggleTimePicker: (N, H = !1, v = "") => { 38682 var O; 38683 (O = w.value) == null || O.toggleTimePicker(N, H, v); 38684 } }), (N, H) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(fa, { 38685 "multi-calendars": 0, 38686 stretch: "" 38687 }, { 38688 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38689 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(Hn, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 38690 ref_key: "tpRef", 38691 ref: w 38692 }, N.$props, { 38693 hours: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f).hours, 38694 minutes: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f).minutes, 38695 seconds: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f).seconds, 38696 "internal-model-value": N.internalModelValue, 38697 "disabled-times-config": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p), 38698 "validate-time": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k), 38699 "onUpdate:hours": H[0] || (H[0] = (v) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_)(v)), 38700 "onUpdate:minutes": H[1] || (H[1] = (v) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_)(v, !1)), 38701 "onUpdate:seconds": H[2] || (H[2] = (v) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_)(v, !1, !0)), 38702 onAmPmChange: H[3] || (H[3] = (v) => N.$emit("am-pm-change", v)), 38703 onResetFlow: H[4] || (H[4] = (v) => N.$emit("reset-flow")), 38704 onOverlayClosed: H[5] || (H[5] = (v) => N.$emit("overlay-toggle", { open: !1, overlay: v })), 38705 onOverlayOpened: H[6] || (H[6] = (v) => N.$emit("overlay-toggle", { open: !0, overlay: v })) 38706 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 38707 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c), (v, O) => ({ 38708 name: v, 38709 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((S) => [ 38710 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(N.$slots, v, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(S))) 38711 ]) 38712 })) 38713 ]), 1040, ["hours", "minutes", "seconds", "internal-model-value", "disabled-times-config", "validate-time"]) 38714 ]), 38715 _: 3 38716 })); 38717 } 38718}), Ar = { class: "dp--header-wrap" }, Tr = { 38719 key: 0, 38720 class: "dp__month_year_wrap" 38721}, Sr = { key: 0 }, Pr = { class: "dp__month_year_wrap" }, Rr = ["data-dp-element", "aria-label", "data-test", "onClick", "onKeydown"], Cr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 38722 compatConfig: { 38723 MODE: 3 38724 }, 38725 __name: "DpHeader", 38726 props: { 38727 month: { type: Number, default: 0 }, 38728 year: { type: Number, default: 0 }, 38729 instance: { type: Number, default: 0 }, 38730 years: { type: Array, default: () => [] }, 38731 months: { type: Array, default: () => [] }, 38732 ...rt 38733 }, 38734 emits: ["update-month-year", "mount", "reset-flow", "overlay-closed", "overlay-opened"], 38735 setup(e, { expose: t, emit: l }) { 38736 const a = l, n = e, { 38737 defaultedTransitions: i, 38738 defaultedAriaLabels: c, 38739 defaultedMultiCalendars: w, 38740 defaultedFilters: f, 38741 defaultedConfig: F, 38742 defaultedHighlight: p, 38743 propDates: _, 38744 defaultedUI: k 38745 } = Ce(n), { transitionName: R, showTransition: z } = Xt(i), { buildMatrix: N } = bt(), { handleMonthYearChange: H, isDisabled: v, updateMonthYear: O } = Ql(n, a), { showLeftIcon: S, showRightIcon: G } = ma(), ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), Z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([null, null, null, null]); 38746 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 38747 a("mount"); 38748 }); 38749 const x = (m) => ({ 38750 get: () => n[m], 38751 set: (L) => { 38752 const u = m === nt.month ? nt.year : nt.month; 38753 a("update-month-year", { [m]: L, [u]: n[u] }), m === nt.month ? y(!0) : Q(!0); 38754 } 38755 }), Y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(x(nt.month)), q = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(x(nt.year)), ie = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (m) => ({ 38756 month: n.month, 38757 year: n.year, 38758 items: m === nt.month ? n.months : n.years, 38759 instance: n.instance, 38760 updateMonthYear: O, 38761 toggle: m === nt.month ? y : Q 38762 })), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 38763 const m = n.months.find((L) => L.value === n.month); 38764 return m || { text: "", value: 0 }; 38765 }), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Yt(n.months, (m) => { 38766 const L = n.month === m.value, u = Gt( 38767 m.value, 38768 Pn(n.year, _.value.minDate), 38769 Rn(n.year, _.value.maxDate) 38770 ) || f.value.months.includes(m.value), b = Yn(p.value, m.value, n.year); 38771 return { active: L, disabled: u, highlighted: b }; 38772 })), U = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Yt(n.years, (m) => { 38773 const L = n.year === m.value, u = Gt( 38774 m.value, 38775 It(_.value.minDate), 38776 It(_.value.maxDate) 38777 ) || f.value.years.includes(m.value), b = qa(p.value, m.value); 38778 return { active: L, disabled: u, highlighted: b }; 38779 })), ee = (m, L, u) => { 38780 u !== void 0 ? m.value = u : m.value = !m.value, m.value ? (Z.value = !0, a("overlay-opened", L)) : (Z.value = !1, a("overlay-closed", L)); 38781 }, y = (m = !1, L) => { 38782 A(m), ee(ae, He.month, L); 38783 }, Q = (m = !1, L) => { 38784 A(m), ee(oe, He.year, L); 38785 }, A = (m) => { 38786 m || a("reset-flow"); 38787 }, ne = (m, L) => { 38788 n.arrowNavigation && (P.value[L] = Ie(m), N(P.value, "monthYear")); 38789 }, de = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 38790 var m, L, u, b, I, s; 38791 return [ 38792 { 38793 type: nt.month, 38794 index: 1, 38795 toggle: y, 38796 modelValue: Y.value, 38797 updateModelValue: (le) => Y.value = le, 38798 text: fe.value.text, 38799 showSelectionGrid: ae.value, 38800 items: h.value, 38801 ariaLabel: (m = c.value) == null ? void 0 : m.openMonthsOverlay, 38802 overlayLabel: ((u = (L = c.value).monthPicker) == null ? void 0 : u.call(L, !0)) ?? void 0 38803 }, 38804 { 38805 type: nt.year, 38806 index: 2, 38807 toggle: Q, 38808 modelValue: q.value, 38809 updateModelValue: (le) => q.value = le, 38810 text: Sn(n.year, n.locale), 38811 showSelectionGrid: oe.value, 38812 items: U.value, 38813 ariaLabel: (b = c.value) == null ? void 0 : b.openYearsOverlay, 38814 overlayLabel: ((s = (I = c.value).yearPicker) == null ? void 0 : s.call(I, !0)) ?? void 0 38815 } 38816 ]; 38817 }), d = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.disableYearSelect ? [de.value[0]] : n.yearFirst ? [...de.value].reverse() : de.value); 38818 return t({ 38819 toggleMonthPicker: y, 38820 toggleYearPicker: Q, 38821 handleMonthYearChange: H 38822 }), (m, L) => { 38823 var u, b, I, s, le, pe; 38824 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Ar, [ 38825 m.$slots["month-year"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Tr, [ 38826 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, "month-year", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)({ month: e.month, year: e.year, months: e.months, years: e.years, updateMonthYear: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(O), handleMonthYearChange: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H), instance: e.instance }))) 38827 ])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38828 m.$slots["top-extra"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Sr, [ 38829 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, "top-extra", { value: m.internalModelValue }) 38830 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38831 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", Pr, [ 38832 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(S)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), e.instance) && !m.vertical ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Ut, { 38833 key: 0, 38834 "aria-label": (u = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)) == null ? void 0 : u.prevMonth, 38835 disabled: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(!1), 38836 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)((b = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)) == null ? void 0 : b.navBtnPrev), 38837 "el-name": "action-prev", 38838 onActivate: L[0] || (L[0] = ($) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(!1, !0)), 38839 onSetRef: L[1] || (L[1] = ($) => ne($, 0)) 38840 }, { 38841 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38842 m.$slots["arrow-left"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, "arrow-left", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38843 m.$slots["arrow-left"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(za), { key: 1 })) 38844 ]), 38845 _: 3 38846 }, 8, ["aria-label", "disabled", "class"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38847 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 38848 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__month_year_wrap", { 38849 dp__year_disable_select: m.disableYearSelect 38850 }]) 38851 }, [ 38852 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(d.value, ($, ge) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { 38853 key: $.type 38854 }, [ 38855 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 38856 ref_for: !0, 38857 ref: (r) => ne(r, ge + 1), 38858 type: "button", 38859 "data-dp-element": `overlay-${$.type}`, 38860 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__btn dp__month_year_select", { "dp--hidden-el": Z.value }]), 38861 "aria-label": `${$.text}-${$.ariaLabel}`, 38862 "data-test": `${$.type}-toggle-overlay-${e.instance}`, 38863 onClick: $.toggle, 38864 onKeydown: (r) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(r, () => $.toggle(), !0) 38865 }, [ 38866 m.$slots[$.type] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, $.type, { 38867 key: 0, 38868 text: $.text, 38869 value: n[$.type] 38870 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38871 m.$slots[$.type] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 38872 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($.text), 1) 38873 ], 64)) 38874 ], 42, Rr), 38875 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 38876 name: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(R)($.showSelectionGrid), 38877 css: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(z) 38878 }, { 38879 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38880 $.showSelectionGrid ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(qt, { 38881 key: 0, 38882 items: $.items, 38883 "arrow-navigation": m.arrowNavigation, 38884 "hide-navigation": m.hideNavigation, 38885 "is-last": m.autoApply && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F).keepActionRow, 38886 "skip-button-ref": !1, 38887 config: m.config, 38888 type: $.type, 38889 "header-refs": [], 38890 "esc-close": m.escClose, 38891 "menu-wrap-ref": m.menuWrapRef, 38892 "text-input": m.textInput, 38893 "aria-labels": m.ariaLabels, 38894 "overlay-label": $.overlayLabel, 38895 onSelected: $.updateModelValue, 38896 onToggle: $.toggle 38897 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ 38898 "button-icon": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38899 m.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, "calendar-icon", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38900 m.$slots["calendar-icon"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Et), { key: 1 })) 38901 ]), 38902 _: 2 38903 }, [ 38904 m.$slots[`${$.type}-overlay-value`] ? { 38905 name: "item", 38906 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ item: r }) => [ 38907 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, `${$.type}-overlay-value`, { 38908 text: r.text, 38909 value: r.value 38910 }) 38911 ]), 38912 key: "0" 38913 } : void 0, 38914 m.$slots[`${$.type}-overlay`] ? { 38915 name: "overlay", 38916 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38917 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, `${$.type}-overlay`, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ ref_for: !0 }, ie.value($.type))) 38918 ]), 38919 key: "1" 38920 } : void 0, 38921 m.$slots[`${$.type}-overlay-header`] ? { 38922 name: "header", 38923 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38924 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, `${$.type}-overlay-header`, { 38925 toggle: $.toggle 38926 }) 38927 ]), 38928 key: "2" 38929 } : void 0 38930 ]), 1032, ["items", "arrow-navigation", "hide-navigation", "is-last", "config", "type", "esc-close", "menu-wrap-ref", "text-input", "aria-labels", "overlay-label", "onSelected", "onToggle"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 38931 ]), 38932 _: 2 38933 }, 1032, ["name", "css"]) 38934 ], 64))), 128)) 38935 ], 2), 38936 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(S)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), e.instance) && m.vertical ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Ut, { 38937 key: 1, 38938 "aria-label": (I = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)) == null ? void 0 : I.prevMonth, 38939 "el-name": "action-prev", 38940 disabled: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(!1), 38941 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)((s = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)) == null ? void 0 : s.navBtnPrev), 38942 onActivate: L[2] || (L[2] = ($) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(!1, !0)) 38943 }, { 38944 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38945 m.$slots["arrow-up"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, "arrow-up", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38946 m.$slots["arrow-up"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Va), { key: 1 })) 38947 ]), 38948 _: 3 38949 }, 8, ["aria-label", "disabled", "class"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38950 (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(G)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w), e.instance) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Ut, { 38951 key: 2, 38952 ref: "rightIcon", 38953 "el-name": "action-next", 38954 disabled: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(!0), 38955 "aria-label": (le = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)) == null ? void 0 : le.nextMonth, 38956 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)((pe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)) == null ? void 0 : pe.navBtnNext), 38957 onActivate: L[3] || (L[3] = ($) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(!0, !0)), 38958 onSetRef: L[4] || (L[4] = ($) => ne($, m.disableYearSelect ? 2 : 3)) 38959 }, { 38960 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 38961 m.$slots[m.vertical ? "arrow-down" : "arrow-right"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(m.$slots, m.vertical ? "arrow-down" : "arrow-right", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 38962 m.$slots[m.vertical ? "arrow-down" : "arrow-right"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(m.vertical ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Wa) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ha)), { key: 1 })) 38963 ]), 38964 _: 3 38965 }, 8, ["disabled", "aria-label", "class"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 38966 ]) 38967 ], 64)) 38968 ]); 38969 }; 38970 } 38971}), Or = { 38972 class: "dp__calendar_header", 38973 role: "row" 38974}, _r = { 38975 key: 0, 38976 class: "dp__calendar_header_item", 38977 role: "gridcell" 38978}, Br = ["aria-label"], Yr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { class: "dp__calendar_header_separator" }, null, -1), Ir = { 38979 key: 0, 38980 class: "dp__calendar_item dp__week_num", 38981 role: "gridcell" 38982}, Nr = { class: "dp__cell_inner" }, Er = ["id", "aria-pressed", "aria-disabled", "aria-label", "data-test", "onClick", "onTouchend", "onKeydown", "onMouseenter", "onMouseleave", "onMousedown"], Fr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 38983 compatConfig: { 38984 MODE: 3 38985 }, 38986 __name: "DpCalendar", 38987 props: { 38988 mappedDates: { type: Array, default: () => [] }, 38989 instance: { type: Number, default: 0 }, 38990 month: { type: Number, default: 0 }, 38991 year: { type: Number, default: 0 }, 38992 ...rt 38993 }, 38994 emits: [ 38995 "select-date", 38996 "set-hover-date", 38997 "handle-scroll", 38998 "mount", 38999 "handle-swipe", 39000 "handle-space", 39001 "tooltip-open", 39002 "tooltip-close" 39003 ], 39004 setup(e, { expose: t, emit: l }) { 39005 const a = l, n = e, { buildMultiLevelMatrix: i } = bt(), { 39006 defaultedTransitions: c, 39007 defaultedConfig: w, 39008 defaultedAriaLabels: f, 39009 defaultedMultiCalendars: F, 39010 defaultedWeekNumbers: p, 39011 defaultedMultiDates: _, 39012 defaultedUI: k 39013 } = Ce(n), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({ 39014 bottom: "", 39015 left: "", 39016 transform: "" 39017 }), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!0), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(""), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({ startX: 0, endX: 0, startY: 0, endY: 0 }), G = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({ left: "50%" }), oe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), Z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.calendar ? n.calendar(n.mappedDates) : n.mappedDates), P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.dayNames ? Array.isArray(n.dayNames) ? n.dayNames : n.dayNames(n.locale, +n.weekStart) : yl(n.formatLocale, n.locale, +n.weekStart)); 39018 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 39019 a("mount", { cmp: "calendar", refs: N }), w.value.noSwipe || H.value && (H.value.addEventListener("touchstart", ne, { passive: !1 }), H.value.addEventListener("touchend", de, { passive: !1 }), H.value.addEventListener("touchmove", d, { passive: !1 })), n.monthChangeOnScroll && H.value && H.value.addEventListener("wheel", u, { passive: !1 }); 39020 }); 39021 const x = ($) => $ ? n.vertical ? "vNext" : "next" : n.vertical ? "vPrevious" : "previous", Y = ($, ge) => { 39022 if (n.transitions) { 39023 const r = Ge(dt(K(), n.month, n.year)); 39024 O.value = Be(Ge(dt(K(), $, ge)), r) ? c.value[x(!0)] : c.value[x(!1)], v.value = !1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 39025 v.value = !0; 39026 }); 39027 } 39028 }, q = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 39029 () => ({ 39030 ...k.value.calendar ?? {} 39031 }) 39032 ), ie = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ($) => { 39033 const ge = hl($); 39034 return { 39035 dp__marker_dot: ge.type === "dot", 39036 dp__marker_line: ge.type === "line" 39037 }; 39038 }), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ($) => Me($, R.value)), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ 39039 dp__calendar: !0, 39040 dp__calendar_next: F.value.count > 0 && n.instance !== 0 39041 })), U = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ($) => n.hideOffsetDates ? $.current : !0), ee = async ($, ge) => { 39042 const { width: r, height: B } = $.getBoundingClientRect(); 39043 R.value = ge.value; 39044 let C = { left: `${r / 2}px` }, V = -50; 39045 if (await (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(), G.value[0]) { 39046 const { left: se, width: M } = G.value[0].getBoundingClientRect(); 39047 se < 0 && (C = { left: "0" }, V = 0, ae.value.left = `${r / 2}px`), window.innerWidth < se + M && (C = { right: "0" }, V = 0, ae.value.left = `${M - r / 2}px`); 39048 } 39049 z.value = { 39050 bottom: `${B}px`, 39051 ...C, 39052 transform: `translateX(${V}%)` 39053 }; 39054 }, y = async ($, ge, r) => { 39055 var C, V, se; 39056 const B = Ie(N.value[ge][r]); 39057 B && ((C = $.marker) != null && C.customPosition && ((se = (V = $.marker) == null ? void 0 : V.tooltip) != null && se.length) ? z.value = $.marker.customPosition(B) : await ee(B, $), a("tooltip-open", $.marker)); 39058 }, Q = async ($, ge, r) => { 39059 var B, C; 39060 if (oe.value && _.value.enabled && _.value.dragSelect) 39061 return a("select-date", $); 39062 a("set-hover-date", $), (C = (B = $.marker) == null ? void 0 : B.tooltip) != null && C.length && await y($, ge, r); 39063 }, A = ($) => { 39064 R.value && (R.value = null, z.value = JSON.parse(JSON.stringify({ bottom: "", left: "", transform: "" })), a("tooltip-close", $.marker)); 39065 }, ne = ($) => { 39066 S.value.startX = $.changedTouches[0].screenX, S.value.startY = $.changedTouches[0].screenY; 39067 }, de = ($) => { 39068 S.value.endX = $.changedTouches[0].screenX, S.value.endY = $.changedTouches[0].screenY, m(); 39069 }, d = ($) => { 39070 n.vertical && !n.inline && $.preventDefault(); 39071 }, m = () => { 39072 const $ = n.vertical ? "Y" : "X"; 39073 Math.abs(S.value[`start${$}`] - S.value[`end${$}`]) > 10 && a("handle-swipe", S.value[`start${$}`] > S.value[`end${$}`] ? "right" : "left"); 39074 }, L = ($, ge, r) => { 39075 $ && (Array.isArray(N.value[ge]) ? N.value[ge][r] = $ : N.value[ge] = [$]), n.arrowNavigation && i(N.value, "calendar"); 39076 }, u = ($) => { 39077 n.monthChangeOnScroll && ($.preventDefault(), a("handle-scroll", $)); 39078 }, b = ($) => p.value.type === "local" ? (0,date_fns__WEBPACK_IMPORTED_MODULE_34__.getWeek)($.value, { weekStartsOn: +n.weekStart }) : p.value.type === "iso" ? (0,date_fns__WEBPACK_IMPORTED_MODULE_35__.getISOWeek)($.value) : typeof p.value.type == "function" ? p.value.type($.value) : "", I = ($) => { 39079 const ge = $[0]; 39080 return p.value.hideOnOffsetDates ? $.some((r) => r.current) ? b(ge) : "" : b(ge); 39081 }, s = ($, ge, r = !0) => { 39082 r && sn() || !r && !sn() || _.value.enabled || (yt($, w.value), a("select-date", ge)); 39083 }, le = ($) => { 39084 yt($, w.value); 39085 }, pe = ($) => { 39086 _.value.enabled && _.value.dragSelect ? (oe.value = !0, a("select-date", $)) : _.value.enabled && a("select-date", $); 39087 }; 39088 return t({ triggerTransition: Y }), ($, ge) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39089 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(h.value) 39090 }, [ 39091 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 39092 ref_key: "calendarWrapRef", 39093 ref: H, 39094 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(q.value), 39095 role: "grid" 39096 }, [ 39097 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", Or, [ 39098 $.weekNumbers ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _r, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($.weekNumName), 1)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39099 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(P.value, (r, B) => { 39100 var C, V; 39101 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39102 key: B, 39103 class: "dp__calendar_header_item", 39104 role: "gridcell", 39105 "data-test": "calendar-header", 39106 "aria-label": (V = (C = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : C.weekDay) == null ? void 0 : V.call(C, B) 39107 }, [ 39108 $.$slots["calendar-header"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)($.$slots, "calendar-header", { 39109 key: 0, 39110 day: r, 39111 index: B 39112 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39113 $.$slots["calendar-header"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 39114 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(r), 1) 39115 ], 64)) 39116 ], 8, Br); 39117 }), 128)) 39118 ]), 39119 Yr, 39120 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 39121 name: O.value, 39122 css: !!$.transitions 39123 }, { 39124 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 39125 v.value ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39126 key: 0, 39127 class: "dp__calendar", 39128 role: "rowgroup", 39129 onMouseleave: ge[1] || (ge[1] = (r) => oe.value = !1) 39130 }, [ 39131 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(Z.value, (r, B) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39132 key: B, 39133 class: "dp__calendar_row", 39134 role: "row" 39135 }, [ 39136 $.weekNumbers ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Ir, [ 39137 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", Nr, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(I(r.days)), 1) 39138 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39139 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(r.days, (C, V) => { 39140 var se, M, E; 39141 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39142 id: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(In)(C.value), 39143 ref_for: !0, 39144 ref: (ce) => L(ce, B, V), 39145 key: V + B, 39146 role: "gridcell", 39147 class: "dp__calendar_item", 39148 "aria-pressed": (C.classData.dp__active_date || C.classData.dp__range_start || C.classData.dp__range_start) ?? void 0, 39149 "aria-disabled": C.classData.dp__cell_disabled || void 0, 39150 "aria-label": (M = (se = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f)) == null ? void 0 : se.day) == null ? void 0 : M.call(se, C), 39151 tabindex: "0", 39152 "data-test": C.value, 39153 onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((ce) => s(ce, C), ["prevent"]), 39154 onTouchend: (ce) => s(ce, C, !1), 39155 onKeydown: (ce) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(ce, () => $.$emit("select-date", C)), 39156 onMouseenter: (ce) => Q(C, B, V), 39157 onMouseleave: (ce) => A(C), 39158 onMousedown: (ce) => pe(C), 39159 onMouseup: ge[0] || (ge[0] = (ce) => oe.value = !1) 39160 }, [ 39161 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 39162 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__cell_inner", C.classData]) 39163 }, [ 39164 $.$slots.day && U.value(C) ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)($.$slots, "day", { 39165 key: 0, 39166 day: +C.text, 39167 date: C.value 39168 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39169 $.$slots.day ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 39170 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(C.text), 1) 39171 ], 64)), 39172 C.marker && U.value(C) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 2 }, [ 39173 $.$slots.marker ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)($.$slots, "marker", { 39174 key: 0, 39175 marker: C.marker, 39176 day: +C.text, 39177 date: C.value 39178 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39179 key: 1, 39180 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(ie.value(C.marker)), 39181 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(C.marker.color ? { backgroundColor: C.marker.color } : {}) 39182 }, null, 6)) 39183 ], 64)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39184 fe.value(C.value) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39185 key: 3, 39186 ref_for: !0, 39187 ref_key: "activeTooltip", 39188 ref: G, 39189 class: "dp__marker_tooltip", 39190 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(z.value) 39191 }, [ 39192 (E = C.marker) != null && E.tooltip ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39193 key: 0, 39194 class: "dp__tooltip_content", 39195 onClick: le 39196 }, [ 39197 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(C.marker.tooltip, (ce, he) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 39198 key: he, 39199 class: "dp__tooltip_text" 39200 }, [ 39201 $.$slots["marker-tooltip"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)($.$slots, "marker-tooltip", { 39202 key: 0, 39203 tooltip: ce, 39204 day: C.value 39205 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39206 $.$slots["marker-tooltip"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 39207 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 39208 class: "dp__tooltip_mark", 39209 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(ce.color ? { backgroundColor: ce.color } : {}) 39210 }, null, 4), 39211 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(ce.text), 1) 39212 ], 64)) 39213 ]))), 128)), 39214 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 39215 class: "dp__arrow_bottom_tp", 39216 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(ae.value) 39217 }, null, 4) 39218 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 39219 ], 4)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 39220 ], 2) 39221 ], 40, Er); 39222 }), 128)) 39223 ]))), 128)) 39224 ], 32)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 39225 ]), 39226 _: 3 39227 }, 8, ["name", "css"]) 39228 ], 2) 39229 ], 2)); 39230 } 39231}), vn = (e) => Array.isArray(e), Lr = (e, t, l, a) => { 39232 const n = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(/* @__PURE__ */ new Date()), c = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), w = () => ne(e.isTextInputDate), { modelValue: f, calendars: F, time: p, today: _ } = Jt(e, t, w), { 39233 defaultedMultiCalendars: k, 39234 defaultedStartTime: R, 39235 defaultedRange: z, 39236 defaultedConfig: N, 39237 defaultedTz: H, 39238 propDates: v, 39239 defaultedMultiDates: O 39240 } = Ce(e), { validateMonthYearInRange: S, isDisabled: G, isDateRangeAllowed: ae, checkMinMaxRange: oe } = kt(e), { updateTimeValues: Z, getSetDateTime: P, setTime: x, assignStartTime: Y, validateTime: q, disabledTimesConfig: ie } = Un(e, p, f, a), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 39241 () => (D) => F.value[D] ? F.value[D].month : 0 39242 ), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 39243 () => (D) => F.value[D] ? F.value[D].year : 0 39244 ), U = (D) => !N.value.keepViewOnOffsetClick || D ? !0 : !c.value, ee = (D, g, W, re = !1) => { 39245 var Ae, Fe; 39246 U(re) && (F.value[D] || (F.value[D] = { month: 0, year: 0 }), F.value[D].month = on(g) ? (Ae = F.value[D]) == null ? void 0 : Ae.month : g, F.value[D].year = on(W) ? (Fe = F.value[D]) == null ? void 0 : Fe.year : W); 39247 }, y = () => { 39248 e.autoApply && t("select-date"); 39249 }; 39250 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 39251 e.shadow || (f.value || ($(), R.value && Y(R.value)), ne(!0), e.focusStartDate && e.startDate && $()); 39252 }); 39253 const Q = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 39254 var D; 39255 return (D = e.flow) != null && D.length && !e.partialFlow ? e.flowStep === e.flow.length : !0; 39256 }), A = () => { 39257 e.autoApply && Q.value && t("auto-apply", e.partialFlow ? e.flowStep !== e.flow.length : !1); 39258 }, ne = (D = !1) => { 39259 if (f.value) 39260 return Array.isArray(f.value) ? (n.value = f.value, I(D)) : m(f.value, D); 39261 if (k.value.count && D && !e.startDate) 39262 return d(K(), D); 39263 }, de = () => Array.isArray(f.value) && z.value.enabled ? (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(f.value[0]) === (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(f.value[1] ?? f.value[0]) : !1, d = (D = /* @__PURE__ */ new Date(), g = !1) => { 39264 if ((!k.value.count || !k.value.static || g) && ee(0, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(D), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(D)), k.value.count && (!k.value.solo || !f.value || de())) 39265 for (let W = 1; W < k.value.count; W++) { 39266 const re = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: fe.value(W - 1), year: h.value(W - 1) }), Ae = (0,date_fns__WEBPACK_IMPORTED_MODULE_32__.add)(re, { months: 1 }); 39267 F.value[W] = { month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(Ae), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(Ae) }; 39268 } 39269 }, m = (D, g) => { 39270 d(D), x("hours", (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(D)), x("minutes", (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(D)), x("seconds", (0,date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds)(D)), k.value.count && g && pe(); 39271 }, L = (D) => { 39272 if (k.value.count) { 39273 if (k.value.solo) return 0; 39274 const g = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(D[0]), W = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(D[1]); 39275 return Math.abs(W - g) < k.value.count ? 0 : 1; 39276 } 39277 return 1; 39278 }, u = (D, g) => { 39279 D[1] && z.value.showLastInRange ? d(D[L(D)], g) : d(D[0], g); 39280 const W = (re, Ae) => [ 39281 re(D[0]), 39282 D[1] ? re(D[1]) : p[Ae][1] 39283 ]; 39284 x("hours", W(date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours, "hours")), x("minutes", W(date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes, "minutes")), x("seconds", W(date_fns__WEBPACK_IMPORTED_MODULE_16__.getSeconds, "seconds")); 39285 }, b = (D, g) => { 39286 if ((z.value.enabled || e.weekPicker) && !O.value.enabled) 39287 return u(D, g); 39288 if (O.value.enabled && g) { 39289 const W = D[D.length - 1]; 39290 return m(W, g); 39291 } 39292 }, I = (D) => { 39293 const g = f.value; 39294 b(g, D), k.value.count && k.value.solo && pe(); 39295 }, s = (D, g) => { 39296 const W = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: fe.value(g), year: h.value(g) }), re = D < 0 ? (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(W, 1) : (0,date_fns__WEBPACK_IMPORTED_MODULE_25__.subMonths)(W, 1); 39297 S((0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(re), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(re), D < 0, e.preventMinMaxNavigation) && (ee(g, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(re), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(re)), t("update-month-year", { instance: g, month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(re), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(re) }), k.value.count && !k.value.solo && le(g), l()); 39298 }, le = (D) => { 39299 for (let g = D - 1; g >= 0; g--) { 39300 const W = (0,date_fns__WEBPACK_IMPORTED_MODULE_25__.subMonths)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: fe.value(g + 1), year: h.value(g + 1) }), 1); 39301 ee(g, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(W), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(W)); 39302 } 39303 for (let g = D + 1; g <= k.value.count - 1; g++) { 39304 const W = (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(), { month: fe.value(g - 1), year: h.value(g - 1) }), 1); 39305 ee(g, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(W), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(W)); 39306 } 39307 }, pe = () => { 39308 if (Array.isArray(f.value) && f.value.length === 2) { 39309 const D = K( 39310 K(f.value[1] ? f.value[1] : (0,date_fns__WEBPACK_IMPORTED_MODULE_20__.addMonths)(f.value[0], 1)) 39311 ), [g, W] = [(0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(f.value[0]), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(f.value[0])], [re, Ae] = [(0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(f.value[1]), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(f.value[1])]; 39312 (g !== re || g === re && W !== Ae) && k.value.solo && ee(1, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(D), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(D)); 39313 } else f.value && !Array.isArray(f.value) && (ee(0, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(f.value), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(f.value)), d(K())); 39314 }, $ = () => { 39315 e.startDate && (ee(0, (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(K(e.startDate)), (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(e.startDate))), k.value.count && le(0)); 39316 }, ge = (D, g) => { 39317 if (e.monthChangeOnScroll) { 39318 const W = (/* @__PURE__ */ new Date()).getTime() - i.value.getTime(), re = Math.abs(D.deltaY); 39319 let Ae = 500; 39320 re > 1 && (Ae = 100), re > 100 && (Ae = 0), W > Ae && (i.value = /* @__PURE__ */ new Date(), s(e.monthChangeOnScroll !== "inverse" ? -D.deltaY : D.deltaY, g)); 39321 } 39322 }, r = (D, g, W = !1) => { 39323 e.monthChangeOnArrows && e.vertical === W && B(D, g); 39324 }, B = (D, g) => { 39325 s(D === "right" ? -1 : 1, g); 39326 }, C = (D) => { 39327 if (v.value.markers) 39328 return sa(D.value, v.value.markers); 39329 }, V = (D, g) => { 39330 switch (e.sixWeeks === !0 ? "append" : e.sixWeeks) { 39331 case "prepend": 39332 return [!0, !1]; 39333 case "center": 39334 return [D == 0, !0]; 39335 case "fair": 39336 return [D == 0 || g > D, !0]; 39337 case "append": 39338 return [!1, !1]; 39339 default: 39340 return [!1, !1]; 39341 } 39342 }, se = (D, g, W, re) => { 39343 if (e.sixWeeks && D.length < 6) { 39344 const Ae = 6 - D.length, Fe = (g.getDay() + 7 - re) % 7, xt = 6 - (W.getDay() + 7 - re) % 7, [zt, Da] = V(Fe, xt); 39345 for (let Dt = 1; Dt <= Ae; Dt++) 39346 if (Da ? !!(Dt % 2) == zt : zt) { 39347 const ea = D[0].days[0], Ma = M((0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(ea.value, -7), (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(g)); 39348 D.unshift({ days: Ma }); 39349 } else { 39350 const ea = D[D.length - 1], Ma = ea.days[ea.days.length - 1], Wn = M((0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(Ma.value, 1), (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(g)); 39351 D.push({ days: Wn }); 39352 } 39353 } 39354 return D; 39355 }, M = (D, g) => { 39356 const W = K(D), re = []; 39357 for (let Ae = 0; Ae < 7; Ae++) { 39358 const Fe = (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(W, Ae), wt = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(Fe) !== g; 39359 re.push({ 39360 text: e.hideOffsetDates && wt ? "" : Fe.getDate(), 39361 value: Fe, 39362 current: !wt, 39363 classData: {} 39364 }); 39365 } 39366 return re; 39367 }, E = (D, g) => { 39368 const W = [], re = new Date(g, D), Ae = new Date(g, D + 1, 0), Fe = e.weekStart, wt = (0,date_fns__WEBPACK_IMPORTED_MODULE_21__.startOfWeek)(re, { weekStartsOn: Fe }), xt = (zt) => { 39369 const Da = M(zt, D); 39370 if (W.push({ days: Da }), !W[W.length - 1].days.some( 39371 (Dt) => Me(Ge(Dt.value), Ge(Ae)) 39372 )) { 39373 const Dt = (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(zt, 7); 39374 xt(Dt); 39375 } 39376 }; 39377 return xt(wt), se(W, re, Ae, Fe); 39378 }, ce = (D) => { 39379 const g = gt(K(D.value), p.hours, p.minutes, Xe()); 39380 t("date-update", g), O.value.enabled ? Xa(g, f, O.value.limit) : f.value = g, a(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 39381 A(); 39382 }); 39383 }, he = (D) => z.value.noDisabledRange ? Cn(n.value[0], D).some((W) => G(W)) : !1, et = () => { 39384 n.value = f.value ? f.value.slice() : [], n.value.length === 2 && !(z.value.fixedStart || z.value.fixedEnd) && (n.value = []); 39385 }, ve = (D, g) => { 39386 const W = [ 39387 K(D.value), 39388 (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(K(D.value), +z.value.autoRange) 39389 ]; 39390 ae(W) ? (g && vt(D.value), n.value = W) : t("invalid-date", D.value); 39391 }, vt = (D) => { 39392 const g = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(K(D)), W = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(K(D)); 39393 if (ee(0, g, W), k.value.count > 0) 39394 for (let re = 1; re < k.value.count; re++) { 39395 const Ae = Al( 39396 (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(K(D), { year: h.value(re - 1), month: fe.value(re - 1) }) 39397 ); 39398 ee(re, Ae.month, Ae.year); 39399 } 39400 }, ot = (D) => { 39401 if (he(D.value) || !oe(D.value, f.value, z.value.fixedStart ? 0 : 1)) 39402 return t("invalid-date", D.value); 39403 n.value = Ln(K(D.value), f, t, z); 39404 }, Ft = (D, g) => { 39405 if (et(), z.value.autoRange) return ve(D, g); 39406 if (z.value.fixedStart || z.value.fixedEnd) return ot(D); 39407 n.value[0] ? oe(K(D.value), f.value) && !he(D.value) ? Oe(K(D.value), K(n.value[0])) ? (n.value.unshift(K(D.value)), t("range-end", n.value[0])) : (n.value[1] = K(D.value), t("range-end", n.value[1])) : (e.autoApply && t("auto-apply-invalid", D.value), t("invalid-date", D.value)) : (n.value[0] = K(D.value), t("range-start", n.value[0])); 39408 }, Xe = (D = !0) => e.enableSeconds ? Array.isArray(p.seconds) ? D ? p.seconds[0] : p.seconds[1] : p.seconds : 0, Lt = (D) => { 39409 n.value[D] = gt( 39410 n.value[D], 39411 p.hours[D], 39412 p.minutes[D], 39413 Xe(D !== 1) 39414 ); 39415 }, pa = () => { 39416 var D, g; 39417 n.value[0] && n.value[1] && +((D = n.value) == null ? void 0 : D[0]) > +((g = n.value) == null ? void 0 : g[1]) && (n.value.reverse(), t("range-start", n.value[0]), t("range-end", n.value[1])); 39418 }, Zt = () => { 39419 n.value.length && (n.value[0] && !n.value[1] ? Lt(0) : (Lt(0), Lt(1), a()), pa(), f.value = n.value.slice(), va(n.value, t, e.autoApply, e.modelAuto)); 39420 }, ya = (D, g = !1) => { 39421 if (G(D.value) || !D.current && e.hideOffsetDates) return t("invalid-date", D.value); 39422 if (c.value = JSON.parse(JSON.stringify(D)), !z.value.enabled) return ce(D); 39423 vn(p.hours) && vn(p.minutes) && !O.value.enabled && (Ft(D, g), Zt()); 39424 }, ga = (D, g) => { 39425 var re; 39426 ee(D, g.month, g.year, !0), k.value.count && !k.value.solo && le(D), t("update-month-year", { instance: D, month: g.month, year: g.year }), l(k.value.solo ? D : void 0); 39427 const W = (re = e.flow) != null && re.length ? e.flow[e.flowStep] : void 0; 39428 !g.fromNav && (W === He.month || W === He.year) && a(); 39429 }, ha = (D, g) => { 39430 Fn({ 39431 value: D, 39432 modelValue: f, 39433 range: z.value.enabled, 39434 timezone: g ? void 0 : H.value.timezone 39435 }), y(), e.multiCalendars && (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => ne(!0)); 39436 }, ba = () => { 39437 const D = ja(K(), H.value); 39438 z.value.enabled ? f.value && Array.isArray(f.value) && f.value[0] ? f.value = Oe(D, f.value[0]) ? [D, f.value[0]] : [f.value[0], D] : f.value = [D] : f.value = D, y(); 39439 }, ka = () => { 39440 if (Array.isArray(f.value)) 39441 if (O.value.enabled) { 39442 const D = wa(); 39443 f.value[f.value.length - 1] = P(D); 39444 } else 39445 f.value = f.value.map((D, g) => D && P(D, g)); 39446 else 39447 f.value = P(f.value); 39448 t("time-update"); 39449 }, wa = () => Array.isArray(f.value) && f.value.length ? f.value[f.value.length - 1] : null; 39450 return { 39451 calendars: F, 39452 modelValue: f, 39453 month: fe, 39454 year: h, 39455 time: p, 39456 disabledTimesConfig: ie, 39457 today: _, 39458 validateTime: q, 39459 getCalendarDays: E, 39460 getMarker: C, 39461 handleScroll: ge, 39462 handleSwipe: B, 39463 handleArrow: r, 39464 selectDate: ya, 39465 updateMonthYear: ga, 39466 presetDate: ha, 39467 selectCurrentDate: ba, 39468 updateTime: (D, g = !0, W = !1) => { 39469 Z(D, g, W, ka); 39470 }, 39471 assignMonthAndYear: d 39472 }; 39473}, zr = { key: 0 }, Hr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 39474 __name: "DatePicker", 39475 props: { 39476 ...rt 39477 }, 39478 emits: [ 39479 "tooltip-open", 39480 "tooltip-close", 39481 "mount", 39482 "update:internal-model-value", 39483 "update-flow-step", 39484 "reset-flow", 39485 "auto-apply", 39486 "focus-menu", 39487 "select-date", 39488 "range-start", 39489 "range-end", 39490 "invalid-fixed-range", 39491 "time-update", 39492 "am-pm-change", 39493 "time-picker-open", 39494 "time-picker-close", 39495 "recalculate-position", 39496 "update-month-year", 39497 "auto-apply-invalid", 39498 "date-update", 39499 "invalid-date", 39500 "overlay-toggle" 39501 ], 39502 setup(e, { expose: t, emit: l }) { 39503 const a = l, n = e, { 39504 calendars: i, 39505 month: c, 39506 year: w, 39507 modelValue: f, 39508 time: F, 39509 disabledTimesConfig: p, 39510 today: _, 39511 validateTime: k, 39512 getCalendarDays: R, 39513 getMarker: z, 39514 handleArrow: N, 39515 handleScroll: H, 39516 handleSwipe: v, 39517 selectDate: O, 39518 updateMonthYear: S, 39519 presetDate: G, 39520 selectCurrentDate: ae, 39521 updateTime: oe, 39522 assignMonthAndYear: Z 39523 } = Lr(n, a, de, d), P = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), { setHoverDate: x, getDayClassData: Y, clearHoverDate: q } = lo(f, n), { defaultedMultiCalendars: ie } = Ce(n), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]), U = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), ee = Je(P, "calendar"), y = Je(P, "monthYear"), Q = Je(P, "timePicker"), A = (r) => { 39524 n.shadow || a("mount", r); 39525 }; 39526 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 39527 i, 39528 () => { 39529 n.shadow || setTimeout(() => { 39530 a("recalculate-position"); 39531 }, 0); 39532 }, 39533 { deep: !0 } 39534 ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 39535 ie, 39536 (r, B) => { 39537 r.count - B.count > 0 && Z(); 39538 }, 39539 { deep: !0 } 39540 ); 39541 const ne = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (r) => R(c.value(r), w.value(r)).map((B) => ({ 39542 ...B, 39543 days: B.days.map((C) => (C.marker = z(C), C.classData = Y(C), C)) 39544 }))); 39545 function de(r) { 39546 var B; 39547 r || r === 0 ? (B = h.value[r]) == null || B.triggerTransition(c.value(r), w.value(r)) : h.value.forEach((C, V) => C.triggerTransition(c.value(V), w.value(V))); 39548 } 39549 function d() { 39550 a("update-flow-step"); 39551 } 39552 const m = (r, B = !1) => { 39553 O(r, B), n.spaceConfirm && a("select-date"); 39554 }, L = (r, B, C = 0) => { 39555 var V; 39556 (V = fe.value[C]) == null || V.toggleMonthPicker(r, B); 39557 }, u = (r, B, C = 0) => { 39558 var V; 39559 (V = fe.value[C]) == null || V.toggleYearPicker(r, B); 39560 }, b = (r, B, C) => { 39561 var V; 39562 (V = U.value) == null || V.toggleTimePicker(r, B, C); 39563 }, I = (r, B) => { 39564 var C; 39565 if (!n.range) { 39566 const V = f.value ? f.value : _, se = B ? new Date(B) : V, M = r ? (0,date_fns__WEBPACK_IMPORTED_MODULE_21__.startOfWeek)(se, { weekStartsOn: 1 }) : (0,date_fns__WEBPACK_IMPORTED_MODULE_22__.endOfWeek)(se, { weekStartsOn: 1 }); 39567 O({ 39568 value: M, 39569 current: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(se) === c.value(0), 39570 text: "", 39571 classData: {} 39572 }), (C = document.getElementById(In(M))) == null || C.focus(); 39573 } 39574 }, s = (r) => { 39575 var B; 39576 (B = fe.value[0]) == null || B.handleMonthYearChange(r, !0); 39577 }, le = (r) => { 39578 S(0, { month: c.value(0), year: w.value(0) + (r ? 1 : -1), fromNav: !0 }); 39579 }, pe = (r, B) => { 39580 r === He.time && a(`time-picker-${B ? "open" : "close"}`), a("overlay-toggle", { open: B, overlay: r }); 39581 }, $ = (r) => { 39582 a("overlay-toggle", { open: !1, overlay: r }), a("focus-menu"); 39583 }; 39584 return t({ 39585 clearHoverDate: q, 39586 presetDate: G, 39587 selectCurrentDate: ae, 39588 toggleMonthPicker: L, 39589 toggleYearPicker: u, 39590 toggleTimePicker: b, 39591 handleArrow: N, 39592 updateMonthYear: S, 39593 getSidebarProps: () => ({ 39594 modelValue: f, 39595 month: c, 39596 year: w, 39597 time: F, 39598 updateTime: oe, 39599 updateMonthYear: S, 39600 selectDate: O, 39601 presetDate: G 39602 }), 39603 changeMonth: s, 39604 changeYear: le, 39605 selectWeekDate: I 39606 }), (r, B) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [ 39607 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(fa, { 39608 "multi-calendars": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ie).count, 39609 collapse: r.collapse 39610 }, { 39611 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ instance: C, index: V }) => [ 39612 r.disableMonthYearSelect ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Cr, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 39613 key: 0, 39614 ref: (se) => { 39615 se && (fe.value[V] = se); 39616 }, 39617 months: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)($n)(r.formatLocale, r.locale, r.monthNameFormat), 39618 years: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ka)(r.yearRange, r.locale, r.reverseYears), 39619 month: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)(C), 39620 year: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)(C), 39621 instance: C 39622 }, r.$props, { 39623 onMount: B[0] || (B[0] = (se) => A((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Tt).header)), 39624 onResetFlow: B[1] || (B[1] = (se) => r.$emit("reset-flow")), 39625 onUpdateMonthYear: (se) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(S)(C, se), 39626 onOverlayClosed: $, 39627 onOverlayOpened: B[2] || (B[2] = (se) => r.$emit("overlay-toggle", { open: !0, overlay: se })) 39628 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 39629 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(y), (se, M) => ({ 39630 name: se, 39631 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((E) => [ 39632 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, se, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(E))) 39633 ]) 39634 })) 39635 ]), 1040, ["months", "years", "month", "year", "instance", "onUpdateMonthYear"])), 39636 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(Fr, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 39637 ref: (se) => { 39638 se && (h.value[V] = se); 39639 }, 39640 "mapped-dates": ne.value(C), 39641 month: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)(C), 39642 year: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w)(C), 39643 instance: C 39644 }, r.$props, { 39645 onSelectDate: (se) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(O)(se, C !== 1), 39646 onHandleSpace: (se) => m(se, C !== 1), 39647 onSetHoverDate: B[3] || (B[3] = (se) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(x)(se)), 39648 onHandleScroll: (se) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(se, C), 39649 onHandleSwipe: (se) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(se, C), 39650 onMount: B[4] || (B[4] = (se) => A((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Tt).calendar)), 39651 onResetFlow: B[5] || (B[5] = (se) => r.$emit("reset-flow")), 39652 onTooltipOpen: B[6] || (B[6] = (se) => r.$emit("tooltip-open", se)), 39653 onTooltipClose: B[7] || (B[7] = (se) => r.$emit("tooltip-close", se)) 39654 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 39655 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ee), (se, M) => ({ 39656 name: se, 39657 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((E) => [ 39658 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, se, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)({ ...E }))) 39659 ]) 39660 })) 39661 ]), 1040, ["mapped-dates", "month", "year", "instance", "onSelectDate", "onHandleSpace", "onHandleScroll", "onHandleSwipe"]) 39662 ]), 39663 _: 3 39664 }, 8, ["multi-calendars", "collapse"]), 39665 r.enableTimePicker ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", zr, [ 39666 r.$slots["time-picker"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "time-picker", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ key: 0 }, { time: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F), updateTime: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(oe) }))) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Hn, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 39667 key: 1, 39668 ref_key: "timePickerRef", 39669 ref: U 39670 }, r.$props, { 39671 hours: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F).hours, 39672 minutes: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F).minutes, 39673 seconds: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F).seconds, 39674 "internal-model-value": r.internalModelValue, 39675 "disabled-times-config": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p), 39676 "validate-time": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k), 39677 onMount: B[8] || (B[8] = (C) => A((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Tt).timePicker)), 39678 "onUpdate:hours": B[9] || (B[9] = (C) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(oe)(C)), 39679 "onUpdate:minutes": B[10] || (B[10] = (C) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(oe)(C, !1)), 39680 "onUpdate:seconds": B[11] || (B[11] = (C) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(oe)(C, !1, !0)), 39681 onResetFlow: B[12] || (B[12] = (C) => r.$emit("reset-flow")), 39682 onOverlayClosed: B[13] || (B[13] = (C) => pe(C, !1)), 39683 onOverlayOpened: B[14] || (B[14] = (C) => pe(C, !0)), 39684 onAmPmChange: B[15] || (B[15] = (C) => r.$emit("am-pm-change", C)) 39685 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 39686 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Q), (C, V) => ({ 39687 name: C, 39688 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((se) => [ 39689 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, C, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(se))) 39690 ]) 39691 })) 39692 ]), 1040, ["hours", "minutes", "seconds", "internal-model-value", "disabled-times-config", "validate-time"])) 39693 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 39694 ], 64)); 39695 } 39696}), Ur = (e, t) => { 39697 const l = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), { 39698 defaultedMultiCalendars: a, 39699 defaultedConfig: n, 39700 defaultedHighlight: i, 39701 defaultedRange: c, 39702 propDates: w, 39703 defaultedFilters: f, 39704 defaultedMultiDates: F 39705 } = Ce(e), { modelValue: p, year: _, month: k, calendars: R } = Jt(e, t), { isDisabled: z } = kt(e), { selectYear: N, groupedYears: H, showYearPicker: v, isDisabled: O, toggleYearPicker: S, handleYearSelect: G, handleYear: ae } = zn({ 39706 modelValue: p, 39707 multiCalendars: a, 39708 range: c, 39709 highlight: i, 39710 calendars: R, 39711 propDates: w, 39712 month: k, 39713 year: _, 39714 filters: f, 39715 props: e, 39716 emit: t 39717 }), oe = (y, Q) => [y, Q].map((A) => (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.format)(A, "MMMM", { locale: e.formatLocale })).join("-"), Z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (y) => p.value ? Array.isArray(p.value) ? p.value.some((Q) => (0,date_fns__WEBPACK_IMPORTED_MODULE_37__.isSameQuarter)(y, Q)) : (0,date_fns__WEBPACK_IMPORTED_MODULE_37__.isSameQuarter)(p.value, y) : !1), P = (y) => { 39718 if (c.value.enabled) { 39719 if (Array.isArray(p.value)) { 39720 const Q = Me(y, p.value[0]) || Me(y, p.value[1]); 39721 return da(p.value, l.value, y) && !Q; 39722 } 39723 return !1; 39724 } 39725 return !1; 39726 }, x = (y, Q) => y.quarter === (0,date_fns__WEBPACK_IMPORTED_MODULE_38__.getQuarter)(Q) && y.year === (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(Q), Y = (y) => typeof i.value == "function" ? i.value({ quarter: (0,date_fns__WEBPACK_IMPORTED_MODULE_38__.getQuarter)(y), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(y) }) : !!i.value.quarters.find((Q) => x(Q, y)), q = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (y) => { 39727 const Q = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.set)(/* @__PURE__ */ new Date(), { year: _.value(y) }); 39728 return (0,date_fns__WEBPACK_IMPORTED_MODULE_39__.eachQuarterOfInterval)({ 39729 start: (0,date_fns__WEBPACK_IMPORTED_MODULE_30__.startOfYear)(Q), 39730 end: (0,date_fns__WEBPACK_IMPORTED_MODULE_29__.endOfYear)(Q) 39731 }).map((A) => { 39732 const ne = (0,date_fns__WEBPACK_IMPORTED_MODULE_40__.startOfQuarter)(A), de = (0,date_fns__WEBPACK_IMPORTED_MODULE_41__.endOfQuarter)(A), d = z(A), m = P(ne), L = Y(ne); 39733 return { 39734 text: oe(ne, de), 39735 value: ne, 39736 active: Z.value(ne), 39737 highlighted: L, 39738 disabled: d, 39739 isBetween: m 39740 }; 39741 }); 39742 }), ie = (y) => { 39743 Xa(y, p, F.value.limit), t("auto-apply", !0); 39744 }, fe = (y) => { 39745 p.value = Ja(p, y, t), va(p.value, t, e.autoApply, e.modelAuto); 39746 }, h = (y) => { 39747 p.value = y, t("auto-apply"); 39748 }; 39749 return { 39750 defaultedConfig: n, 39751 defaultedMultiCalendars: a, 39752 groupedYears: H, 39753 year: _, 39754 isDisabled: O, 39755 quarters: q, 39756 showYearPicker: v, 39757 modelValue: p, 39758 setHoverDate: (y) => { 39759 l.value = y; 39760 }, 39761 selectYear: N, 39762 selectQuarter: (y, Q, A) => { 39763 if (!A) 39764 return R.value[Q].month = (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)((0,date_fns__WEBPACK_IMPORTED_MODULE_41__.endOfQuarter)(y)), F.value.enabled ? ie(y) : c.value.enabled ? fe(y) : h(y); 39765 }, 39766 toggleYearPicker: S, 39767 handleYearSelect: G, 39768 handleYear: ae 39769 }; 39770}, Vr = { class: "dp--quarter-items" }, Wr = ["data-test", "disabled", "onClick", "onMouseover"], jr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 39771 compatConfig: { 39772 MODE: 3 39773 }, 39774 __name: "QuarterPicker", 39775 props: { 39776 ...rt 39777 }, 39778 emits: [ 39779 "update:internal-model-value", 39780 "reset-flow", 39781 "overlay-closed", 39782 "auto-apply", 39783 "range-start", 39784 "range-end", 39785 "overlay-toggle", 39786 "update-month-year" 39787 ], 39788 setup(e, { expose: t, emit: l }) { 39789 const a = l, n = e, i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), c = Je(i, "yearMode"), { 39790 defaultedMultiCalendars: w, 39791 defaultedConfig: f, 39792 groupedYears: F, 39793 year: p, 39794 isDisabled: _, 39795 quarters: k, 39796 modelValue: R, 39797 showYearPicker: z, 39798 setHoverDate: N, 39799 selectQuarter: H, 39800 toggleYearPicker: v, 39801 handleYearSelect: O, 39802 handleYear: S 39803 } = Ur(n, a); 39804 return t({ getSidebarProps: () => ({ 39805 modelValue: R, 39806 year: p, 39807 selectQuarter: H, 39808 handleYearSelect: O, 39809 handleYear: S 39810 }) }), (ae, oe) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(fa, { 39811 "multi-calendars": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).count, 39812 collapse: ae.collapse, 39813 stretch: "" 39814 }, { 39815 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(({ instance: Z }) => [ 39816 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 39817 class: "dp-quarter-picker-wrap", 39818 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({ minHeight: `${(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(f).modeHeight}px` }) 39819 }, [ 39820 ae.$slots["top-extra"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(ae.$slots, "top-extra", { 39821 key: 0, 39822 value: ae.internalModelValue 39823 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 39824 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [ 39825 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(En, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)(ae.$props, { 39826 items: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(F)(Z), 39827 instance: Z, 39828 "show-year-picker": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(z)[Z], 39829 year: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(p)(Z), 39830 "is-disabled": (P) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(_)(Z, P), 39831 onHandleYear: (P) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(S)(Z, P), 39832 onYearSelect: (P) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(O)(P, Z), 39833 onToggleYearPicker: (P) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(v)(Z, P == null ? void 0 : P.flow, P == null ? void 0 : P.show) 39834 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 39835 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c), (P, x) => ({ 39836 name: P, 39837 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((Y) => [ 39838 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(ae.$slots, P, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(Y))) 39839 ]) 39840 })) 39841 ]), 1040, ["items", "instance", "show-year-picker", "year", "is-disabled", "onHandleYear", "onYearSelect", "onToggleYearPicker"]) 39842 ]), 39843 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", Vr, [ 39844 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k)(Z), (P, x) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { key: x }, [ 39845 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 39846 type: "button", 39847 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp--qr-btn", { 39848 "dp--qr-btn-active": P.active, 39849 "dp--qr-btn-between": P.isBetween, 39850 "dp--qr-btn-disabled": P.disabled, 39851 "dp--highlighted": P.highlighted 39852 }]), 39853 "data-test": P.value, 39854 disabled: P.disabled, 39855 onClick: (Y) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(H)(P.value, Z, P.disabled), 39856 onMouseover: (Y) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(N)(P.value) 39857 }, [ 39858 ae.$slots.quarter ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(ae.$slots, "quarter", { 39859 key: 0, 39860 value: P.value, 39861 text: P.text 39862 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, [ 39863 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(P.text), 1) 39864 ], 64)) 39865 ], 42, Wr) 39866 ]))), 128)) 39867 ]) 39868 ], 4) 39869 ]), 39870 _: 3 39871 }, 8, ["multi-calendars", "collapse"])); 39872 } 39873}), Kr = ["id", "tabindex", "role", "aria-label"], Gr = { 39874 key: 0, 39875 class: "dp--menu-load-container" 39876}, Qr = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", { class: "dp--menu-loader" }, null, -1), qr = [ 39877 Qr 39878], Xr = { 39879 key: 1, 39880 class: "dp--menu-header" 39881}, Jr = { 39882 key: 0, 39883 class: "dp__sidebar_left" 39884}, Zr = ["data-test", "onClick", "onKeydown"], xr = { 39885 key: 2, 39886 class: "dp__sidebar_right" 39887}, eo = { 39888 key: 3, 39889 class: "dp__action_extra" 39890}, mn = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 39891 compatConfig: { 39892 MODE: 3 39893 }, 39894 __name: "DatepickerMenu", 39895 props: { 39896 ...ca, 39897 shadow: { type: Boolean, default: !1 }, 39898 openOnTop: { type: Boolean, default: !1 }, 39899 internalModelValue: { type: [Date, Array], default: null }, 39900 noOverlayFocus: { type: Boolean, default: !1 }, 39901 collapse: { type: Boolean, default: !1 }, 39902 getInputRect: { type: Function, default: () => ({}) }, 39903 isTextInputDate: { type: Boolean, default: !1 } 39904 }, 39905 emits: [ 39906 "close-picker", 39907 "select-date", 39908 "auto-apply", 39909 "time-update", 39910 "flow-step", 39911 "update-month-year", 39912 "invalid-select", 39913 "update:internal-model-value", 39914 "recalculate-position", 39915 "invalid-fixed-range", 39916 "tooltip-open", 39917 "tooltip-close", 39918 "time-picker-open", 39919 "time-picker-close", 39920 "am-pm-change", 39921 "range-start", 39922 "range-end", 39923 "auto-apply-invalid", 39924 "date-update", 39925 "invalid-date", 39926 "overlay-toggle" 39927 ], 39928 setup(e, { expose: t, emit: l }) { 39929 const a = l, n = e, i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), c = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 39930 const { openOnTop: M, ...E } = n; 39931 return { 39932 ...E, 39933 flowStep: x.value, 39934 collapse: n.collapse, 39935 noOverlayFocus: n.noOverlayFocus, 39936 menuWrapRef: i.value 39937 }; 39938 }), { setMenuFocused: w, setShiftKey: f, control: F } = Nn(), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), { defaultedTextInput: _, defaultedInline: k, defaultedConfig: R, defaultedUI: z } = Ce(n), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(0), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); 39939 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 39940 if (!n.shadow) { 39941 O.value = !0, G(), window.addEventListener("resize", G); 39942 const M = Ie(i); 39943 if (M && !_.value.enabled && !k.value.enabled && (w(!0), ee()), M) { 39944 const E = (ce) => { 39945 R.value.allowPreventDefault && ce.preventDefault(), yt(ce, R.value, !0); 39946 }; 39947 M.addEventListener("pointerdown", E), M.addEventListener("mousedown", E); 39948 } 39949 } 39950 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => { 39951 window.removeEventListener("resize", G); 39952 }); 39953 const G = () => { 39954 const M = Ie(v); 39955 M && (H.value = M.getBoundingClientRect().width); 39956 }, { arrowRight: ae, arrowLeft: oe, arrowDown: Z, arrowUp: P } = bt(), { flowStep: x, updateFlowStep: Y, childMount: q, resetFlow: ie, handleFlow: fe } = ro(n, a, S), h = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.monthPicker ? rr : n.yearPicker ? sr : n.timePicker ? $r : n.quarterPicker ? jr : Hr), U = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 39957 var ce; 39958 if (R.value.arrowLeft) return R.value.arrowLeft; 39959 const M = (ce = i.value) == null ? void 0 : ce.getBoundingClientRect(), E = n.getInputRect(); 39960 return (E == null ? void 0 : E.width) < (H == null ? void 0 : H.value) && (E == null ? void 0 : E.left) <= ((M == null ? void 0 : M.left) ?? 0) ? `${(E == null ? void 0 : E.width) / 2}px` : (E == null ? void 0 : E.right) >= ((M == null ? void 0 : M.right) ?? 0) && (E == null ? void 0 : E.width) < (H == null ? void 0 : H.value) ? `${(H == null ? void 0 : H.value) - (E == null ? void 0 : E.width) / 2}px` : "50%"; 39961 }), ee = () => { 39962 const M = Ie(i); 39963 M && M.focus({ preventScroll: !0 }); 39964 }, y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 39965 var M; 39966 return ((M = S.value) == null ? void 0 : M.getSidebarProps()) || {}; 39967 }), Q = () => { 39968 n.openOnTop && a("recalculate-position"); 39969 }, A = Je(p, "action"), ne = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.monthPicker || n.yearPicker ? Je(p, "monthYear") : n.timePicker ? Je(p, "timePicker") : Je(p, "shared")), de = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.openOnTop ? "dp__arrow_bottom" : "dp__arrow_top"), d = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ 39970 dp__menu_disabled: n.disabled, 39971 dp__menu_readonly: n.readonly, 39972 "dp-menu-loading": n.loading 39973 })), m = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 39974 () => ({ 39975 dp__menu: !0, 39976 dp__menu_index: !k.value.enabled, 39977 dp__relative: k.value.enabled, 39978 ...z.value.menu ?? {} 39979 }) 39980 ), L = (M) => { 39981 yt(M, R.value, !0); 39982 }, u = () => { 39983 n.escClose && a("close-picker"); 39984 }, b = (M) => { 39985 if (n.arrowNavigation) { 39986 if (M === je.up) return P(); 39987 if (M === je.down) return Z(); 39988 if (M === je.left) return oe(); 39989 if (M === je.right) return ae(); 39990 } else M === je.left || M === je.up ? $("handleArrow", je.left, 0, M === je.up) : $("handleArrow", je.right, 0, M === je.down); 39991 }, I = (M) => { 39992 f(M.shiftKey), !n.disableMonthYearSelect && M.code === Pe.tab && M.target.classList.contains("dp__menu") && F.value.shiftKeyInMenu && (M.preventDefault(), yt(M, R.value, !0), a("close-picker")); 39993 }, s = () => { 39994 ee(), a("time-picker-close"); 39995 }, le = (M) => { 39996 var E, ce, he; 39997 (E = S.value) == null || E.toggleTimePicker(!1, !1), (ce = S.value) == null || ce.toggleMonthPicker(!1, !1, M), (he = S.value) == null || he.toggleYearPicker(!1, !1, M); 39998 }, pe = (M, E = 0) => { 39999 var ce, he, et; 40000 return M === "month" ? (ce = S.value) == null ? void 0 : ce.toggleMonthPicker(!1, !0, E) : M === "year" ? (he = S.value) == null ? void 0 : he.toggleYearPicker(!1, !0, E) : M === "time" ? (et = S.value) == null ? void 0 : et.toggleTimePicker(!0, !1) : le(E); 40001 }, $ = (M, ...E) => { 40002 var ce, he; 40003 (ce = S.value) != null && ce[M] && ((he = S.value) == null || he[M](...E)); 40004 }, ge = () => { 40005 $("selectCurrentDate"); 40006 }, r = (M, E) => { 40007 $("presetDate", M, E); 40008 }, B = () => { 40009 $("clearHoverDate"); 40010 }, C = (M, E) => { 40011 $("updateMonthYear", M, E); 40012 }, V = (M, E) => { 40013 M.preventDefault(), b(E); 40014 }, se = (M) => { 40015 var E, ce, he; 40016 if (I(M), M.key === Pe.home || M.key === Pe.end) 40017 return $( 40018 "selectWeekDate", 40019 M.key === Pe.home, 40020 M.target.getAttribute("id") 40021 ); 40022 switch ((M.key === Pe.pageUp || M.key === Pe.pageDown) && (M.shiftKey ? ($("changeYear", M.key === Pe.pageUp), (E = Ea(i.value, "overlay-year")) == null || E.focus()) : ($("changeMonth", M.key === Pe.pageUp), (ce = Ea(i.value, M.key === Pe.pageUp ? "action-prev" : "action-next")) == null || ce.focus()), M.target.getAttribute("id") && ((he = i.value) == null || he.focus({ preventScroll: !0 }))), M.key) { 40023 case Pe.esc: 40024 return u(); 40025 case Pe.arrowLeft: 40026 return V(M, je.left); 40027 case Pe.arrowRight: 40028 return V(M, je.right); 40029 case Pe.arrowUp: 40030 return V(M, je.up); 40031 case Pe.arrowDown: 40032 return V(M, je.down); 40033 default: 40034 return; 40035 } 40036 }; 40037 return t({ 40038 updateMonthYear: C, 40039 switchView: pe, 40040 handleFlow: fe 40041 }), (M, E) => { 40042 var ce, he, et; 40043 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 40044 id: M.uid ? `dp-menu-${M.uid}` : void 0, 40045 ref_key: "dpMenuRef", 40046 ref: i, 40047 tabindex: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).enabled ? void 0 : "0", 40048 role: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).enabled ? void 0 : "dialog", 40049 "aria-label": (ce = M.ariaLabels) == null ? void 0 : ce.menu, 40050 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(m.value), 40051 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({ "--dp-arrow-left": U.value }), 40052 onMouseleave: B, 40053 onClick: L, 40054 onKeydown: se 40055 }, [ 40056 (M.disabled || M.readonly) && (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).enabled || M.loading ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 40057 key: 0, 40058 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(d.value) 40059 }, [ 40060 M.loading ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Gr, qr)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40061 ], 2)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40062 M.$slots["menu-header"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Xr, [ 40063 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, "menu-header") 40064 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40065 !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(k).enabled && !M.teleportCenter ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 40066 key: 2, 40067 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(de.value) 40068 }, null, 2)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40069 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 40070 ref_key: "innerMenuRef", 40071 ref: v, 40072 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ 40073 dp__menu_content_wrapper: ((he = M.presetDates) == null ? void 0 : he.length) || !!M.$slots["left-sidebar"] || !!M.$slots["right-sidebar"], 40074 "dp--menu-content-wrapper-collapsed": e.collapse && (((et = M.presetDates) == null ? void 0 : et.length) || !!M.$slots["left-sidebar"] || !!M.$slots["right-sidebar"]) 40075 }), 40076 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({ "--dp-menu-width": `${H.value}px` }) 40077 }, [ 40078 M.$slots["left-sidebar"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Jr, [ 40079 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, "left-sidebar", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(y.value))) 40080 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40081 M.presetDates.length ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 40082 key: 1, 40083 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ "dp--preset-dates-collapsed": e.collapse, "dp--preset-dates": !0 }) 40084 }, [ 40085 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(M.presetDates, (ve, vt) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: vt }, [ 40086 ve.slot ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, ve.slot, { 40087 key: 0, 40088 presetDate: r, 40089 label: ve.label, 40090 value: ve.value 40091 }) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 40092 key: 1, 40093 type: "button", 40094 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(ve.style || {}), 40095 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["dp__btn dp--preset-range", { "dp--preset-range-collapsed": e.collapse }]), 40096 "data-test": ve.testId ?? void 0, 40097 onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((ot) => r(ve.value, ve.noTz), ["prevent"]), 40098 onKeydown: (ot) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(ot, () => r(ve.value, ve.noTz), !0) 40099 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(ve.label), 47, Zr)) 40100 ], 64))), 128)) 40101 ], 2)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40102 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 40103 ref_key: "calendarWrapperRef", 40104 ref: N, 40105 class: "dp__instance_calendar", 40106 role: "document" 40107 }, [ 40108 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(h.value), (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 40109 ref_key: "dynCmpRef", 40110 ref: S 40111 }, c.value, { 40112 "flow-step": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(x), 40113 onMount: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(q), 40114 onUpdateFlowStep: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Y), 40115 onResetFlow: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ie), 40116 onFocusMenu: ee, 40117 onSelectDate: E[0] || (E[0] = (ve) => M.$emit("select-date")), 40118 onDateUpdate: E[1] || (E[1] = (ve) => M.$emit("date-update", ve)), 40119 onTooltipOpen: E[2] || (E[2] = (ve) => M.$emit("tooltip-open", ve)), 40120 onTooltipClose: E[3] || (E[3] = (ve) => M.$emit("tooltip-close", ve)), 40121 onAutoApply: E[4] || (E[4] = (ve) => M.$emit("auto-apply", ve)), 40122 onRangeStart: E[5] || (E[5] = (ve) => M.$emit("range-start", ve)), 40123 onRangeEnd: E[6] || (E[6] = (ve) => M.$emit("range-end", ve)), 40124 onInvalidFixedRange: E[7] || (E[7] = (ve) => M.$emit("invalid-fixed-range", ve)), 40125 onTimeUpdate: E[8] || (E[8] = (ve) => M.$emit("time-update")), 40126 onAmPmChange: E[9] || (E[9] = (ve) => M.$emit("am-pm-change", ve)), 40127 onTimePickerOpen: E[10] || (E[10] = (ve) => M.$emit("time-picker-open", ve)), 40128 onTimePickerClose: s, 40129 onRecalculatePosition: Q, 40130 onUpdateMonthYear: E[11] || (E[11] = (ve) => M.$emit("update-month-year", ve)), 40131 onAutoApplyInvalid: E[12] || (E[12] = (ve) => M.$emit("auto-apply-invalid", ve)), 40132 onInvalidDate: E[13] || (E[13] = (ve) => M.$emit("invalid-date", ve)), 40133 onOverlayToggle: E[14] || (E[14] = (ve) => M.$emit("overlay-toggle", ve)), 40134 "onUpdate:internalModelValue": E[15] || (E[15] = (ve) => M.$emit("update:internal-model-value", ve)) 40135 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 40136 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(ne.value, (ve, vt) => ({ 40137 name: ve, 40138 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((ot) => [ 40139 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, ve, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)({ ...ot }))) 40140 ]) 40141 })) 40142 ]), 1040, ["flow-step", "onMount", "onUpdateFlowStep", "onResetFlow"])) 40143 ], 512), 40144 M.$slots["right-sidebar"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", xr, [ 40145 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, "right-sidebar", (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(y.value))) 40146 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40147 M.$slots["action-extra"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", eo, [ 40148 M.$slots["action-extra"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, "action-extra", { 40149 key: 0, 40150 selectCurrentDate: ge 40151 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40152 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40153 ], 6), 40154 !M.autoApply || (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(R).keepActionRow ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(Jl, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 40155 key: 3, 40156 "menu-mount": O.value 40157 }, c.value, { 40158 "calendar-width": H.value, 40159 onClosePicker: E[16] || (E[16] = (ve) => M.$emit("close-picker")), 40160 onSelectDate: E[17] || (E[17] = (ve) => M.$emit("select-date")), 40161 onInvalidSelect: E[18] || (E[18] = (ve) => M.$emit("invalid-select")), 40162 onSelectNow: ge 40163 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 40164 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(A), (ve, vt) => ({ 40165 name: ve, 40166 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((ot) => [ 40167 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(M.$slots, ve, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)({ ...ot }))) 40168 ]) 40169 })) 40170 ]), 1040, ["menu-mount", "calendar-width"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40171 ], 46, Kr); 40172 }; 40173 } 40174}); 40175var Ct = /* @__PURE__ */ ((e) => (e.center = "center", e.left = "left", e.right = "right", e))(Ct || {}); 40176const to = ({ 40177 menuRef: e, 40178 menuRefInner: t, 40179 inputRef: l, 40180 pickerWrapperRef: a, 40181 inline: n, 40182 emit: i, 40183 props: c, 40184 slots: w 40185}) => { 40186 const { defaultedConfig: f } = Ce(c), F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({}), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)({ 40187 top: "0", 40188 left: "0" 40189 }), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRef)(c, "teleportCenter"); 40190 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(R, () => { 40191 _.value = JSON.parse(JSON.stringify({})), ae(); 40192 }); 40193 const z = (y) => { 40194 if (c.teleport) { 40195 const Q = y.getBoundingClientRect(); 40196 return { 40197 left: Q.left + window.scrollX, 40198 top: Q.top + window.scrollY 40199 }; 40200 } 40201 return { top: 0, left: 0 }; 40202 }, N = (y, Q) => { 40203 _.value.left = `${y + Q - F.value.width}px`; 40204 }, H = (y) => { 40205 _.value.left = `${y}px`; 40206 }, v = (y, Q) => { 40207 c.position === Ct.left && H(y), c.position === Ct.right && N(y, Q), c.position === Ct.center && (_.value.left = `${y + Q / 2 - F.value.width / 2}px`); 40208 }, O = (y) => { 40209 const { width: Q, height: A } = y.getBoundingClientRect(), { top: ne, left: de } = c.altPosition ? c.altPosition(y) : z(y); 40210 return { top: +ne, left: +de, width: Q, height: A }; 40211 }, S = () => { 40212 _.value.left = "50%", _.value.top = "50%", _.value.transform = "translate(-50%, -50%)", _.value.position = "fixed", delete _.value.opacity; 40213 }, G = () => { 40214 const y = Ie(l), { top: Q, left: A, transform: ne } = c.altPosition(y); 40215 _.value = { top: `${Q}px`, left: `${A}px`, transform: ne ?? "" }; 40216 }, ae = (y = !0) => { 40217 var Q; 40218 if (!n.value.enabled) { 40219 if (R.value) return S(); 40220 if (c.altPosition !== null) return G(); 40221 if (y) { 40222 const A = c.teleport ? (Q = t.value) == null ? void 0 : Q.$el : e.value; 40223 A && (F.value = A.getBoundingClientRect()), i("recalculate-position"); 40224 } 40225 return ie(); 40226 } 40227 }, oe = ({ inputEl: y, left: Q, width: A }) => { 40228 window.screen.width > 768 && !p.value && v(Q, A), x(y); 40229 }, Z = (y) => { 40230 const { top: Q, left: A, height: ne, width: de } = O(y); 40231 _.value.top = `${ne + Q + +c.offset}px`, k.value = !1, p.value || (_.value.left = `${A + de / 2 - F.value.width / 2}px`), oe({ inputEl: y, left: A, width: de }); 40232 }, P = (y) => { 40233 const { top: Q, left: A, width: ne } = O(y); 40234 _.value.top = `${Q - +c.offset - F.value.height}px`, k.value = !0, oe({ inputEl: y, left: A, width: ne }); 40235 }, x = (y) => { 40236 if (c.autoPosition) { 40237 const { left: Q, width: A } = O(y), { left: ne, right: de } = F.value; 40238 if (!p.value) { 40239 if (Math.abs(ne) !== Math.abs(de)) { 40240 if (ne <= 0) 40241 return p.value = !0, H(Q); 40242 if (de >= document.documentElement.clientWidth) 40243 return p.value = !0, N(Q, A); 40244 } 40245 return v(Q, A); 40246 } 40247 } 40248 }, Y = () => { 40249 const y = Ie(l); 40250 if (y) { 40251 const { height: Q } = F.value, { top: A, height: ne } = y.getBoundingClientRect(), d = window.innerHeight - A - ne, m = A; 40252 return Q <= d ? Mt.bottom : Q > d && Q <= m ? Mt.top : d >= m ? Mt.bottom : Mt.top; 40253 } 40254 return Mt.bottom; 40255 }, q = (y) => Y() === Mt.bottom ? Z(y) : P(y), ie = () => { 40256 const y = Ie(l); 40257 if (y) 40258 return c.autoPosition ? q(y) : Z(y); 40259 }, fe = function(y) { 40260 if (y) { 40261 const Q = y.scrollHeight > y.clientHeight, ne = window.getComputedStyle(y).overflowY.indexOf("hidden") !== -1; 40262 return Q && !ne; 40263 } 40264 return !0; 40265 }, h = function(y) { 40266 return !y || y === document.body || y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? window : fe(y) ? y : h( 40267 y.assignedSlot && f.value.shadowDom ? y.assignedSlot.parentNode : y.parentNode 40268 ); 40269 }, U = (y) => { 40270 if (y) 40271 switch (c.position) { 40272 case Ct.left: 40273 return { left: 0, transform: "translateX(0)" }; 40274 case Ct.right: 40275 return { left: `${y.width}px`, transform: "translateX(-100%)" }; 40276 default: 40277 return { left: `${y.width / 2}px`, transform: "translateX(-50%)" }; 40278 } 40279 return {}; 40280 }; 40281 return { 40282 openOnTop: k, 40283 menuStyle: _, 40284 xCorrect: p, 40285 setMenuPosition: ae, 40286 getScrollableParent: h, 40287 shadowRender: (y, Q) => { 40288 var u, b, I; 40289 const A = document.createElement("div"), ne = (u = Ie(l)) == null ? void 0 : u.getBoundingClientRect(); 40290 A.setAttribute("id", "dp--temp-container"); 40291 const de = (b = a.value) != null && b.clientWidth ? a.value : document.body; 40292 de.append(A); 40293 const d = U(ne), m = f.value.shadowDom ? Object.keys(w).filter( 40294 (s) => ["right-sidebar", "left-sidebar", "top-extra", "action-extra"].includes(s) 40295 ) : Object.keys(w), L = (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)( 40296 y, 40297 { 40298 ...Q, 40299 shadow: !0, 40300 style: { opacity: 0, position: "absolute", ...d } 40301 }, 40302 Object.fromEntries(m.map((s) => [s, w[s]])) 40303 ); 40304 (0,vue__WEBPACK_IMPORTED_MODULE_0__.render)(L, A), F.value = (I = L.el) == null ? void 0 : I.getBoundingClientRect(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.render)(null, A), de.removeChild(A); 40305 } 40306 }; 40307}, mt = [ 40308 { name: "clock-icon", use: ["time", "calendar", "shared"] }, 40309 { name: "arrow-left", use: ["month-year", "calendar", "shared", "year-mode"] }, 40310 { name: "arrow-right", use: ["month-year", "calendar", "shared", "year-mode"] }, 40311 { name: "arrow-up", use: ["time", "calendar", "month-year", "shared"] }, 40312 { name: "arrow-down", use: ["time", "calendar", "month-year", "shared"] }, 40313 { name: "calendar-icon", use: ["month-year", "time", "calendar", "shared", "year-mode"] }, 40314 { name: "day", use: ["calendar", "shared"] }, 40315 { name: "month-overlay-value", use: ["calendar", "month-year", "shared"] }, 40316 { name: "year-overlay-value", use: ["calendar", "month-year", "shared", "year-mode"] }, 40317 { name: "year-overlay", use: ["month-year", "shared"] }, 40318 { name: "month-overlay", use: ["month-year", "shared"] }, 40319 { name: "month-overlay-header", use: ["month-year", "shared"] }, 40320 { name: "year-overlay-header", use: ["month-year", "shared"] }, 40321 { name: "hours-overlay-value", use: ["calendar", "time", "shared"] }, 40322 { name: "hours-overlay-header", use: ["calendar", "time", "shared"] }, 40323 { name: "minutes-overlay-value", use: ["calendar", "time", "shared"] }, 40324 { name: "minutes-overlay-header", use: ["calendar", "time", "shared"] }, 40325 { name: "seconds-overlay-value", use: ["calendar", "time", "shared"] }, 40326 { name: "seconds-overlay-header", use: ["calendar", "time", "shared"] }, 40327 { name: "hours", use: ["calendar", "time", "shared"] }, 40328 { name: "minutes", use: ["calendar", "time", "shared"] }, 40329 { name: "month", use: ["calendar", "month-year", "shared"] }, 40330 { name: "year", use: ["calendar", "month-year", "shared", "year-mode"] }, 40331 { name: "action-buttons", use: ["action"] }, 40332 { name: "action-preview", use: ["action"] }, 40333 { name: "calendar-header", use: ["calendar", "shared"] }, 40334 { name: "marker-tooltip", use: ["calendar", "shared"] }, 40335 { name: "action-extra", use: ["menu"] }, 40336 { name: "time-picker-overlay", use: ["calendar", "time", "shared"] }, 40337 { name: "am-pm-button", use: ["calendar", "time", "shared"] }, 40338 { name: "left-sidebar", use: ["menu"] }, 40339 { name: "right-sidebar", use: ["menu"] }, 40340 { name: "month-year", use: ["month-year", "shared"] }, 40341 { name: "time-picker", use: ["menu", "shared"] }, 40342 { name: "action-row", use: ["action"] }, 40343 { name: "marker", use: ["calendar", "shared"] }, 40344 { name: "quarter", use: ["shared"] }, 40345 { name: "top-extra", use: ["shared", "month-year"] }, 40346 { name: "tp-inline-arrow-up", use: ["shared", "time"] }, 40347 { name: "tp-inline-arrow-down", use: ["shared", "time"] }, 40348 { name: "menu-header", use: ["menu"] } 40349], ao = [{ name: "trigger" }, { name: "input-icon" }, { name: "clear-icon" }, { name: "dp-input" }], no = { 40350 all: () => mt, 40351 monthYear: () => mt.filter((e) => e.use.includes("month-year")), 40352 input: () => ao, 40353 timePicker: () => mt.filter((e) => e.use.includes("time")), 40354 action: () => mt.filter((e) => e.use.includes("action")), 40355 calendar: () => mt.filter((e) => e.use.includes("calendar")), 40356 menu: () => mt.filter((e) => e.use.includes("menu")), 40357 shared: () => mt.filter((e) => e.use.includes("shared")), 40358 yearMode: () => mt.filter((e) => e.use.includes("year-mode")) 40359}, Je = (e, t, l) => { 40360 const a = []; 40361 return no[t]().forEach((n) => { 40362 e[n.name] && a.push(n.name); 40363 }), l != null && l.length && l.forEach((n) => { 40364 n.slot && a.push(n.slot); 40365 }), a; 40366}, Xt = (e) => { 40367 const t = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (a) => e.value ? a ? e.value.open : e.value.close : ""), l = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (a) => e.value ? a ? e.value.menuAppearTop : e.value.menuAppearBottom : ""); 40368 return { transitionName: t, showTransition: !!e.value, menuTransition: l }; 40369}, Jt = (e, t, l) => { 40370 const { defaultedRange: a, defaultedTz: n } = Ce(e), i = K(qe(K(), n.value.timezone)), c = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([{ month: (0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(i), year: (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(i) }]), w = (k) => { 40371 const R = { 40372 hours: (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(i), 40373 minutes: (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(i), 40374 seconds: 0 40375 }; 40376 return a.value.enabled ? [R[k], R[k]] : R[k]; 40377 }, f = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ 40378 hours: w("hours"), 40379 minutes: w("minutes"), 40380 seconds: w("seconds") 40381 }); 40382 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 40383 a, 40384 (k, R) => { 40385 k.enabled !== R.enabled && (f.hours = w("hours"), f.minutes = w("minutes"), f.seconds = w("seconds")); 40386 }, 40387 { deep: !0 } 40388 ); 40389 const F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)({ 40390 get: () => e.internalModelValue, 40391 set: (k) => { 40392 !e.readonly && !e.disabled && t("update:internal-model-value", k); 40393 } 40394 }), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 40395 () => (k) => c.value[k] ? c.value[k].month : 0 40396 ), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 40397 () => (k) => c.value[k] ? c.value[k].year : 0 40398 ); 40399 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 40400 F, 40401 (k, R) => { 40402 l && JSON.stringify(k ?? {}) !== JSON.stringify(R ?? {}) && l(); 40403 }, 40404 { deep: !0 } 40405 ), { 40406 calendars: c, 40407 time: f, 40408 modelValue: F, 40409 month: p, 40410 year: _, 40411 today: i 40412 }; 40413}, lo = (e, t) => { 40414 const { 40415 defaultedMultiCalendars: l, 40416 defaultedMultiDates: a, 40417 defaultedUI: n, 40418 defaultedHighlight: i, 40419 defaultedTz: c, 40420 propDates: w, 40421 defaultedRange: f 40422 } = Ce(t), { isDisabled: F } = kt(t), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(qe(/* @__PURE__ */ new Date(), c.value.timezone)), k = (u) => { 40423 !u.current && t.hideOffsetDates || (p.value = u.value); 40424 }, R = () => { 40425 p.value = null; 40426 }, z = (u) => Array.isArray(e.value) && f.value.enabled && e.value[0] && p.value ? u ? Be(p.value, e.value[0]) : Oe(p.value, e.value[0]) : !0, N = (u, b) => { 40427 const I = () => e.value ? b ? e.value[0] || null : e.value[1] : null, s = e.value && Array.isArray(e.value) ? I() : null; 40428 return Me(K(u.value), s); 40429 }, H = (u) => { 40430 const b = Array.isArray(e.value) ? e.value[0] : null; 40431 return u ? !Oe(p.value ?? null, b) : !0; 40432 }, v = (u, b = !0) => (f.value.enabled || t.weekPicker) && Array.isArray(e.value) && e.value.length === 2 ? t.hideOffsetDates && !u.current ? !1 : Me(K(u.value), e.value[b ? 0 : 1]) : f.value.enabled ? N(u, b) && H(b) || Me(u.value, Array.isArray(e.value) ? e.value[0] : null) && z(b) : !1, O = (u, b) => { 40433 if (Array.isArray(e.value) && e.value[0] && e.value.length === 1) { 40434 const I = Me(u.value, p.value); 40435 return b ? Be(e.value[0], u.value) && I : Oe(e.value[0], u.value) && I; 40436 } 40437 return !1; 40438 }, S = (u) => !e.value || t.hideOffsetDates && !u.current ? !1 : f.value.enabled ? t.modelAuto && Array.isArray(e.value) ? Me(u.value, e.value[0] ? e.value[0] : _.value) : !1 : a.value.enabled && Array.isArray(e.value) ? e.value.some((b) => Me(b, u.value)) : Me(u.value, e.value ? e.value : _.value), G = (u) => { 40439 if (f.value.autoRange || t.weekPicker) { 40440 if (p.value) { 40441 if (t.hideOffsetDates && !u.current) return !1; 40442 const b = (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(p.value, +f.value.autoRange), I = it(K(p.value), t.weekStart); 40443 return t.weekPicker ? Me(I[1], K(u.value)) : Me(b, K(u.value)); 40444 } 40445 return !1; 40446 } 40447 return !1; 40448 }, ae = (u) => { 40449 if (f.value.autoRange || t.weekPicker) { 40450 if (p.value) { 40451 const b = (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.addDays)(p.value, +f.value.autoRange); 40452 if (t.hideOffsetDates && !u.current) return !1; 40453 const I = it(K(p.value), t.weekStart); 40454 return t.weekPicker ? Be(u.value, I[0]) && Oe(u.value, I[1]) : Be(u.value, p.value) && Oe(u.value, b); 40455 } 40456 return !1; 40457 } 40458 return !1; 40459 }, oe = (u) => { 40460 if (f.value.autoRange || t.weekPicker) { 40461 if (p.value) { 40462 if (t.hideOffsetDates && !u.current) return !1; 40463 const b = it(K(p.value), t.weekStart); 40464 return t.weekPicker ? Me(b[0], u.value) : Me(p.value, u.value); 40465 } 40466 return !1; 40467 } 40468 return !1; 40469 }, Z = (u) => da(e.value, p.value, u.value), P = () => t.modelAuto && Array.isArray(t.internalModelValue) ? !!t.internalModelValue[0] : !1, x = () => t.modelAuto ? An(t.internalModelValue) : !0, Y = (u) => { 40470 if (t.weekPicker) return !1; 40471 const b = f.value.enabled ? !v(u) && !v(u, !1) : !0; 40472 return !F(u.value) && !S(u) && !(!u.current && t.hideOffsetDates) && b; 40473 }, q = (u) => f.value.enabled ? t.modelAuto ? P() && S(u) : !1 : S(u), ie = (u) => i.value ? Dl(u.value, w.value.highlight) : !1, fe = (u) => { 40474 const b = F(u.value); 40475 return b && (typeof i.value == "function" ? !i.value(u.value, b) : !i.value.options.highlightDisabled); 40476 }, h = (u) => { 40477 var b; 40478 return typeof i.value == "function" ? i.value(u.value) : (b = i.value.weekdays) == null ? void 0 : b.includes(u.value.getDay()); 40479 }, U = (u) => (f.value.enabled || t.weekPicker) && (!(l.value.count > 0) || u.current) && x() && !(!u.current && t.hideOffsetDates) && !S(u) ? Z(u) : !1, ee = (u) => { 40480 const { isRangeStart: b, isRangeEnd: I } = ne(u), s = f.value.enabled ? b || I : !1; 40481 return { 40482 dp__cell_offset: !u.current, 40483 dp__pointer: !t.disabled && !(!u.current && t.hideOffsetDates) && !F(u.value), 40484 dp__cell_disabled: F(u.value), 40485 dp__cell_highlight: !fe(u) && (ie(u) || h(u)) && !q(u) && !s && !oe(u) && !(U(u) && t.weekPicker) && !I, 40486 dp__cell_highlight_active: !fe(u) && (ie(u) || h(u)) && q(u), 40487 dp__today: !t.noToday && Me(u.value, _.value) && u.current, 40488 "dp--past": Oe(u.value, _.value), 40489 "dp--future": Be(u.value, _.value) 40490 }; 40491 }, y = (u) => ({ 40492 dp__active_date: q(u), 40493 dp__date_hover: Y(u) 40494 }), Q = (u) => { 40495 if (e.value && !Array.isArray(e.value)) { 40496 const b = it(e.value, t.weekStart); 40497 return { 40498 ...d(u), 40499 dp__range_start: Me(b[0], u.value), 40500 dp__range_end: Me(b[1], u.value), 40501 dp__range_between_week: Be(u.value, b[0]) && Oe(u.value, b[1]) 40502 }; 40503 } 40504 return { 40505 ...d(u) 40506 }; 40507 }, A = (u) => { 40508 if (e.value && Array.isArray(e.value)) { 40509 const b = it(e.value[0], t.weekStart), I = e.value[1] ? it(e.value[1], t.weekStart) : []; 40510 return { 40511 ...d(u), 40512 dp__range_start: Me(b[0], u.value) || Me(I[0], u.value), 40513 dp__range_end: Me(b[1], u.value) || Me(I[1], u.value), 40514 dp__range_between_week: Be(u.value, b[0]) && Oe(u.value, b[1]) || Be(u.value, I[0]) && Oe(u.value, I[1]), 40515 dp__range_between: Be(u.value, b[1]) && Oe(u.value, I[0]) 40516 }; 40517 } 40518 return { 40519 ...d(u) 40520 }; 40521 }, ne = (u) => { 40522 const b = l.value.count > 0 ? u.current && v(u) && x() : v(u) && x(), I = l.value.count > 0 ? u.current && v(u, !1) && x() : v(u, !1) && x(); 40523 return { isRangeStart: b, isRangeEnd: I }; 40524 }, de = (u) => { 40525 const { isRangeStart: b, isRangeEnd: I } = ne(u); 40526 return { 40527 dp__range_start: b, 40528 dp__range_end: I, 40529 dp__range_between: U(u), 40530 dp__date_hover: Me(u.value, p.value) && !b && !I && !t.weekPicker, 40531 dp__date_hover_start: O(u, !0), 40532 dp__date_hover_end: O(u, !1) 40533 }; 40534 }, d = (u) => ({ 40535 ...de(u), 40536 dp__cell_auto_range: ae(u), 40537 dp__cell_auto_range_start: oe(u), 40538 dp__cell_auto_range_end: G(u) 40539 }), m = (u) => f.value.enabled ? f.value.autoRange ? d(u) : t.modelAuto ? { ...y(u), ...de(u) } : t.weekPicker ? A(u) : de(u) : t.weekPicker ? Q(u) : y(u); 40540 return { 40541 setHoverDate: k, 40542 clearHoverDate: R, 40543 getDayClassData: (u) => t.hideOffsetDates && !u.current ? {} : { 40544 ...ee(u), 40545 ...m(u), 40546 [t.dayClass ? t.dayClass(u.value, t.internalModelValue) : ""]: !0, 40547 ...n.value.calendarCell ?? {} 40548 } 40549 }; 40550}, kt = (e) => { 40551 const { defaultedFilters: t, defaultedRange: l, propDates: a, defaultedMultiDates: n } = Ce(e), i = (h) => a.value.disabledDates ? typeof a.value.disabledDates == "function" ? a.value.disabledDates(K(h)) : !!sa(h, a.value.disabledDates) : !1, c = (h) => a.value.maxDate ? e.yearPicker ? (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(h) > (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(a.value.maxDate) : Be(h, a.value.maxDate) : !1, w = (h) => a.value.minDate ? e.yearPicker ? (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(h) < (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(a.value.minDate) : Oe(h, a.value.minDate) : !1, f = (h) => { 40552 const U = c(h), ee = w(h), y = i(h), A = t.value.months.map((L) => +L).includes((0,date_fns__WEBPACK_IMPORTED_MODULE_18__.getMonth)(h)), ne = e.disabledWeekDays.length ? e.disabledWeekDays.some((L) => +L === (0,date_fns__WEBPACK_IMPORTED_MODULE_42__.getDay)(h)) : !1, de = R(h), d = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(h), m = d < +e.yearRange[0] || d > +e.yearRange[1]; 40553 return !(U || ee || y || A || m || ne || de); 40554 }, F = (h, U) => Oe(...pt(a.value.minDate, h, U)) || Me(...pt(a.value.minDate, h, U)), p = (h, U) => Be(...pt(a.value.maxDate, h, U)) || Me(...pt(a.value.maxDate, h, U)), _ = (h, U, ee) => { 40555 let y = !1; 40556 return a.value.maxDate && ee && p(h, U) && (y = !0), a.value.minDate && !ee && F(h, U) && (y = !0), y; 40557 }, k = (h, U, ee, y) => { 40558 let Q = !1; 40559 return y && (a.value.minDate || a.value.maxDate) ? a.value.minDate && a.value.maxDate ? Q = _(h, U, ee) : (a.value.minDate && F(h, U) || a.value.maxDate && p(h, U)) && (Q = !0) : Q = !0, Q; 40560 }, R = (h) => Array.isArray(a.value.allowedDates) && !a.value.allowedDates.length ? !0 : a.value.allowedDates ? !sa(h, a.value.allowedDates) : !1, z = (h) => !f(h), N = (h) => l.value.noDisabledRange ? !(0,date_fns__WEBPACK_IMPORTED_MODULE_19__.eachDayOfInterval)({ start: h[0], end: h[1] }).some((ee) => z(ee)) : !0, H = (h) => { 40561 if (h) { 40562 const U = (0,date_fns__WEBPACK_IMPORTED_MODULE_17__.getYear)(h); 40563 return U >= +e.yearRange[0] && U <= e.yearRange[1]; 40564 } 40565 return !0; 40566 }, v = (h, U) => !!(Array.isArray(h) && h[U] && (l.value.maxRange || l.value.minRange) && H(h[U])), O = (h, U, ee = 0) => { 40567 if (v(U, ee) && H(h)) { 40568 const y = (0,date_fns__WEBPACK_IMPORTED_MODULE_43__.differenceInCalendarDays)(h, U[ee]), Q = Cn(U[ee], h), A = Q.length === 1 ? 0 : Q.filter((de) => z(de)).length, ne = Math.abs(y) - (l.value.minMaxRawRange ? 0 : A); 40569 if (l.value.minRange && l.value.maxRange) 40570 return ne >= +l.value.minRange && ne <= +l.value.maxRange; 40571 if (l.value.minRange) return ne >= +l.value.minRange; 40572 if (l.value.maxRange) return ne <= +l.value.maxRange; 40573 } 40574 return !0; 40575 }, S = () => !e.enableTimePicker || e.monthPicker || e.yearPicker || e.ignoreTimeValidation, G = (h) => Array.isArray(h) ? [h[0] ? Pa(h[0]) : null, h[1] ? Pa(h[1]) : null] : Pa(h), ae = (h, U, ee) => h.find( 40576 (y) => +y.hours === (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(U) && y.minutes === "*" ? !0 : +y.minutes === (0,date_fns__WEBPACK_IMPORTED_MODULE_15__.getMinutes)(U) && +y.hours === (0,date_fns__WEBPACK_IMPORTED_MODULE_14__.getHours)(U) 40577 ) && ee, oe = (h, U, ee) => { 40578 const [y, Q] = h, [A, ne] = U; 40579 return !ae(y, A, ee) && !ae(Q, ne, ee) && ee; 40580 }, Z = (h, U) => { 40581 const ee = Array.isArray(U) ? U : [U]; 40582 return Array.isArray(e.disabledTimes) ? Array.isArray(e.disabledTimes[0]) ? oe(e.disabledTimes, ee, h) : !ee.some((y) => ae(e.disabledTimes, y, h)) : h; 40583 }, P = (h, U) => { 40584 const ee = Array.isArray(U) ? [St(U[0]), U[1] ? St(U[1]) : void 0] : St(U), y = !e.disabledTimes(ee); 40585 return h && y; 40586 }, x = (h, U) => e.disabledTimes ? Array.isArray(e.disabledTimes) ? Z(U, h) : P(U, h) : U, Y = (h) => { 40587 let U = !0; 40588 if (!h || S()) return !0; 40589 const ee = !a.value.minDate && !a.value.maxDate ? G(h) : h; 40590 return (e.maxTime || a.value.maxDate) && (U = dn( 40591 e.maxTime, 40592 a.value.maxDate, 40593 "max", 40594 Ye(ee), 40595 U 40596 )), (e.minTime || a.value.minDate) && (U = dn( 40597 e.minTime, 40598 a.value.minDate, 40599 "min", 40600 Ye(ee), 40601 U 40602 )), x(h, U); 40603 }, q = (h) => { 40604 if (!e.monthPicker) return !0; 40605 let U = !0; 40606 const ee = K(lt(h)); 40607 if (a.value.minDate && a.value.maxDate) { 40608 const y = K(lt(a.value.minDate)), Q = K(lt(a.value.maxDate)); 40609 return Be(ee, y) && Oe(ee, Q) || Me(ee, y) || Me(ee, Q); 40610 } 40611 if (a.value.minDate) { 40612 const y = K(lt(a.value.minDate)); 40613 U = Be(ee, y) || Me(ee, y); 40614 } 40615 if (a.value.maxDate) { 40616 const y = K(lt(a.value.maxDate)); 40617 U = Oe(ee, y) || Me(ee, y); 40618 } 40619 return U; 40620 }, ie = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (h) => !e.enableTimePicker || e.ignoreTimeValidation ? !0 : Y(h)), fe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (h) => e.monthPicker ? Array.isArray(h) && (l.value.enabled || n.value.enabled) ? !h.filter((ee) => !q(ee)).length : q(h) : !0); 40621 return { 40622 isDisabled: z, 40623 validateDate: f, 40624 validateMonthYearInRange: k, 40625 isDateRangeAllowed: N, 40626 checkMinMaxRange: O, 40627 isValidTime: Y, 40628 isTimeValid: ie, 40629 isMonthValid: fe 40630 }; 40631}, ma = () => { 40632 const e = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (a, n) => a == null ? void 0 : a.includes(n)), t = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (a, n) => a.count ? a.solo ? !0 : n === 0 : !0), l = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => (a, n) => a.count ? a.solo ? !0 : n === a.count - 1 : !0); 40633 return { hideNavigationButtons: e, showLeftIcon: t, showRightIcon: l }; 40634}, ro = (e, t, l) => { 40635 const a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(0), n = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({ 40636 [Tt.timePicker]: !e.enableTimePicker || e.timePicker || e.monthPicker, 40637 [Tt.calendar]: !1, 40638 [Tt.header]: !1 40639 }), i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => e.monthPicker || e.timePicker), c = (_) => { 40640 var k; 40641 if ((k = e.flow) != null && k.length) { 40642 if (!_ && i.value) return p(); 40643 n[_] = !0, Object.keys(n).filter((R) => !n[R]).length || p(); 40644 } 40645 }, w = () => { 40646 var _, k; 40647 (_ = e.flow) != null && _.length && a.value !== -1 && (a.value += 1, t("flow-step", a.value), p()), ((k = e.flow) == null ? void 0 : k.length) === a.value && (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => f()); 40648 }, f = () => { 40649 a.value = -1; 40650 }, F = (_, k, ...R) => { 40651 var z, N; 40652 e.flow[a.value] === _ && l.value && ((N = (z = l.value)[k]) == null || N.call(z, ...R)); 40653 }, p = (_ = 0) => { 40654 _ && (a.value += _), F(He.month, "toggleMonthPicker", !0), F(He.year, "toggleYearPicker", !0), F(He.calendar, "toggleTimePicker", !1, !0), F(He.time, "toggleTimePicker", !0, !0); 40655 const k = e.flow[a.value]; 40656 (k === He.hours || k === He.minutes || k === He.seconds) && F(k, "toggleTimePicker", !0, !0, k); 40657 }; 40658 return { childMount: c, updateFlowStep: w, resetFlow: f, handleFlow: p, flowStep: a }; 40659}, oo = { 40660 key: 1, 40661 class: "dp__input_wrap" 40662}, so = ["id", "name", "inputmode", "placeholder", "disabled", "readonly", "required", "value", "autocomplete", "aria-disabled", "aria-invalid"], uo = { 40663 key: 2, 40664 class: "dp--clear-btn" 40665}, io = ["aria-label"], co = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 40666 compatConfig: { 40667 MODE: 3 40668 }, 40669 __name: "DatepickerInput", 40670 props: { 40671 isMenuOpen: { type: Boolean, default: !1 }, 40672 inputValue: { type: String, default: "" }, 40673 ...ca 40674 }, 40675 emits: [ 40676 "clear", 40677 "open", 40678 "update:input-value", 40679 "set-input-date", 40680 "close", 40681 "select-date", 40682 "set-empty-date", 40683 "toggle", 40684 "focus-prev", 40685 "focus", 40686 "blur", 40687 "real-blur", 40688 "text-input" 40689 ], 40690 setup(e, { expose: t, emit: l }) { 40691 const a = l, n = e, { 40692 defaultedTextInput: i, 40693 defaultedAriaLabels: c, 40694 defaultedInline: w, 40695 defaultedConfig: f, 40696 defaultedRange: F, 40697 defaultedMultiDates: p, 40698 defaultedUI: _, 40699 getDefaultPattern: k, 40700 getDefaultStartTime: R 40701 } = Ce(n), { checkMinMaxRange: z } = kt(n), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), S = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), G = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 40702 () => ({ 40703 dp__pointer: !n.disabled && !n.readonly && !i.value.enabled, 40704 dp__disabled: n.disabled, 40705 dp__input_readonly: !i.value.enabled, 40706 dp__input: !0, 40707 dp__input_icon_pad: !n.hideInputIcon, 40708 dp__input_valid: typeof n.state == "boolean" ? n.state : !1, 40709 dp__input_invalid: typeof n.state == "boolean" ? !n.state : !1, 40710 dp__input_focus: v.value || n.isMenuOpen, 40711 dp__input_reg: !i.value.enabled, 40712 ..._.value.input ?? {} 40713 }) 40714 ), oe = () => { 40715 a("set-input-date", null), n.clearable && n.autoApply && (a("set-empty-date"), N.value = null); 40716 }, Z = (d) => { 40717 const m = R(); 40718 return Ml( 40719 d, 40720 i.value.format ?? k(), 40721 m ?? On({}, n.enableSeconds), 40722 n.inputValue, 40723 S.value, 40724 n.formatLocale 40725 ); 40726 }, P = (d) => { 40727 const { rangeSeparator: m } = i.value, [L, u] = d.split(`${m}`); 40728 if (L) { 40729 const b = Z(L.trim()), I = u ? Z(u.trim()) : null; 40730 if ((0,date_fns__WEBPACK_IMPORTED_MODULE_13__.isAfter)(b, I)) return; 40731 const s = b && I ? [b, I] : [b]; 40732 z(I, s, 0) && (N.value = b ? s : null); 40733 } 40734 }, x = () => { 40735 S.value = !0; 40736 }, Y = (d) => { 40737 if (F.value.enabled) 40738 P(d); 40739 else if (p.value.enabled) { 40740 const m = d.split(";"); 40741 N.value = m.map((L) => Z(L.trim())).filter((L) => L); 40742 } else 40743 N.value = Z(d); 40744 }, q = (d) => { 40745 var L; 40746 const m = typeof d == "string" ? d : (L = d.target) == null ? void 0 : L.value; 40747 m !== "" ? (i.value.openMenu && !n.isMenuOpen && a("open"), Y(m), a("set-input-date", N.value)) : oe(), S.value = !1, a("update:input-value", m), a("text-input", d, N.value); 40748 }, ie = (d) => { 40749 i.value.enabled ? (Y(d.target.value), i.value.enterSubmit && Fa(N.value) && n.inputValue !== "" ? (a("set-input-date", N.value, !0), N.value = null) : i.value.enterSubmit && n.inputValue === "" && (N.value = null, a("clear"))) : U(d); 40750 }, fe = (d, m) => { 40751 var L; 40752 G.value && m && !O.value && (d.preventDefault(), O.value = !0, (L = G.value) == null || L.focus()), i.value.enabled && i.value.tabSubmit && Y(d.target.value), i.value.tabSubmit && Fa(N.value) && n.inputValue !== "" ? (a("set-input-date", N.value, !0, !0), N.value = null) : i.value.tabSubmit && n.inputValue === "" && (N.value = null, a("clear", !0)); 40753 }, h = () => { 40754 v.value = !0, a("focus"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 40755 var d; 40756 i.value.enabled && i.value.selectOnFocus && ((d = H.value) == null || d.select()); 40757 }); 40758 }, U = (d) => { 40759 if (d.preventDefault(), yt(d, f.value, !0), i.value.enabled && i.value.openMenu && !w.value.input) { 40760 if (i.value.openMenu === "open" && !n.isMenuOpen) return a("open"); 40761 if (i.value.openMenu === "toggle") return a("toggle"); 40762 } else i.value.enabled || a("toggle"); 40763 }, ee = () => { 40764 a("real-blur"), v.value = !1, (!n.isMenuOpen || w.value.enabled && w.value.input) && a("blur"), n.autoApply && i.value.enabled && N.value && !n.isMenuOpen && (a("set-input-date", N.value), a("select-date"), N.value = null); 40765 }, y = (d) => { 40766 yt(d, f.value, !0), a("clear"); 40767 }, Q = (d, m) => { 40768 if (d.key === "Tab" && fe(d, m), d.key === "Enter" && ie(d), !i.value.enabled) { 40769 if (d.code === "Tab") return; 40770 d.preventDefault(); 40771 } 40772 }, A = () => { 40773 var d; 40774 (d = H.value) == null || d.focus({ preventScroll: !0 }); 40775 }, ne = (d) => { 40776 N.value = d; 40777 }, de = (d) => { 40778 d.key === Pe.tab && (O.value = !1, fe(d)); 40779 }; 40780 return t({ 40781 focusInput: A, 40782 setParsedDate: ne 40783 }), (d, m) => { 40784 var L, u; 40785 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { onClick: U }, [ 40786 d.$slots.trigger && !d.$slots["dp-input"] && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).enabled ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "trigger", { key: 0 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40787 !d.$slots.trigger && (!(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).enabled || (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).input) ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", oo, [ 40788 d.$slots["dp-input"] && !d.$slots.trigger && (!(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).enabled || (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).enabled && (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(w).input) ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "dp-input", { 40789 key: 0, 40790 value: e.inputValue, 40791 isMenuOpen: e.isMenuOpen, 40792 onInput: q, 40793 onEnter: ie, 40794 onTab: fe, 40795 onClear: y, 40796 onBlur: ee, 40797 onKeypress: Q, 40798 onPaste: x, 40799 onFocus: h, 40800 openMenu: () => d.$emit("open"), 40801 closeMenu: () => d.$emit("close"), 40802 toggleMenu: () => d.$emit("toggle") 40803 }) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40804 d.$slots["dp-input"] ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("input", { 40805 key: 1, 40806 id: d.uid ? `dp-input-${d.uid}` : void 0, 40807 ref_key: "inputRef", 40808 ref: H, 40809 "data-test": "dp-input", 40810 name: d.name, 40811 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(ae.value), 40812 inputmode: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(i).enabled ? "text" : "none", 40813 placeholder: d.placeholder, 40814 disabled: d.disabled, 40815 readonly: d.readonly, 40816 required: d.required, 40817 value: e.inputValue, 40818 autocomplete: d.autocomplete, 40819 "aria-disabled": d.disabled || void 0, 40820 "aria-invalid": d.state === !1 ? !0 : void 0, 40821 onInput: q, 40822 onBlur: ee, 40823 onFocus: h, 40824 onKeypress: Q, 40825 onKeydown: m[0] || (m[0] = (b) => Q(b, !0)), 40826 onPaste: x 40827 }, null, 42, so)), 40828 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 40829 onClick: m[3] || (m[3] = (b) => a("toggle")) 40830 }, [ 40831 d.$slots["input-icon"] && !d.hideInputIcon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", { 40832 key: 0, 40833 class: "dp__input_icon", 40834 onClick: m[1] || (m[1] = (b) => a("toggle")) 40835 }, [ 40836 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "input-icon") 40837 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40838 !d.$slots["input-icon"] && !d.hideInputIcon && !d.$slots["dp-input"] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Et), { 40839 key: 1, 40840 "aria-label": (L = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)) == null ? void 0 : L.calendarIcon, 40841 class: "dp__input_icon dp__input_icons", 40842 onClick: m[2] || (m[2] = (b) => a("toggle")) 40843 }, null, 8, ["aria-label"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40844 ]), 40845 d.$slots["clear-icon"] && e.inputValue && d.clearable && !d.disabled && !d.readonly ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", uo, [ 40846 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(d.$slots, "clear-icon", { clear: y }) 40847 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 40848 d.clearable && !d.$slots["clear-icon"] && e.inputValue && !d.disabled && !d.readonly ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 40849 key: 3, 40850 ref_key: "clearBtnRef", 40851 ref: G, 40852 "aria-label": (u = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(c)) == null ? void 0 : u.clearInput, 40853 class: "dp--clear-btn", 40854 type: "button", 40855 onBlur: m[4] || (m[4] = (b) => O.value = !1), 40856 onKeydown: m[5] || (m[5] = (b) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Ke)(b, () => y(b), !0, de)), 40857 onClick: m[6] || (m[6] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)((b) => y(b), ["prevent"])) 40858 }, [ 40859 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Mn), { 40860 class: "dp__input_icons", 40861 "data-test": "clear-icon" 40862 }) 40863 ], 40, io)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40864 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 40865 ]); 40866 }; 40867 } 40868}), fo = typeof window < "u" ? window : void 0, Ya = () => { 40869}, vo = (e) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope)() ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose)(e), !0) : !1, mo = (e, t, l, a) => { 40870 if (!e) return Ya; 40871 let n = Ya; 40872 const i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 40873 () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(e), 40874 (w) => { 40875 n(), w && (w.addEventListener(t, l, a), n = () => { 40876 w.removeEventListener(t, l, a), n = Ya; 40877 }); 40878 }, 40879 { immediate: !0, flush: "post" } 40880 ), c = () => { 40881 i(), n(); 40882 }; 40883 return vo(c), c; 40884}, po = (e, t, l, a = {}) => { 40885 const { window: n = fo, event: i = "pointerdown" } = a; 40886 return n ? mo(n, i, (w) => { 40887 const f = Ie(e), F = Ie(t); 40888 !f || !F || f === w.target || w.composedPath().includes(f) || w.composedPath().includes(F) || l(w); 40889 }, { passive: !0 }) : void 0; 40890}, yo = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 40891 compatConfig: { 40892 MODE: 3 40893 }, 40894 __name: "VueDatePicker", 40895 props: { 40896 ...ca 40897 }, 40898 emits: [ 40899 "update:model-value", 40900 "update:model-timezone-value", 40901 "text-submit", 40902 "closed", 40903 "cleared", 40904 "open", 40905 "focus", 40906 "blur", 40907 "internal-model-change", 40908 "recalculate-position", 40909 "flow-step", 40910 "update-month-year", 40911 "invalid-select", 40912 "invalid-fixed-range", 40913 "tooltip-open", 40914 "tooltip-close", 40915 "time-picker-open", 40916 "time-picker-close", 40917 "am-pm-change", 40918 "range-start", 40919 "range-end", 40920 "date-update", 40921 "invalid-date", 40922 "overlay-toggle", 40923 "text-input" 40924 ], 40925 setup(e, { expose: t, emit: l }) { 40926 const a = l, n = e, i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useSlots)(), c = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), w = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRef)(n, "modelValue"), f = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRef)(n, "timezone"), F = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), p = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), _ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), R = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), z = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), N = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), H = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), v = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), { setMenuFocused: O, setShiftKey: S } = Nn(), { clearArrowNav: G } = bt(), { validateDate: ae, isValidTime: oe } = kt(n), { 40927 defaultedTransitions: Z, 40928 defaultedTextInput: P, 40929 defaultedInline: x, 40930 defaultedConfig: Y, 40931 defaultedRange: q, 40932 defaultedMultiDates: ie 40933 } = Ce(n), { menuTransition: fe, showTransition: h } = Xt(Z); 40934 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 40935 u(n.modelValue), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 40936 if (!x.value.enabled) { 40937 const g = de(R.value); 40938 g == null || g.addEventListener("scroll", C), window == null || window.addEventListener("resize", V); 40939 } 40940 }), x.value.enabled && (c.value = !0), window == null || window.addEventListener("keyup", se), window == null || window.addEventListener("keydown", M); 40941 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => { 40942 if (!x.value.enabled) { 40943 const g = de(R.value); 40944 g == null || g.removeEventListener("scroll", C), window == null || window.removeEventListener("resize", V); 40945 } 40946 window == null || window.removeEventListener("keyup", se), window == null || window.removeEventListener("keydown", M); 40947 }); 40948 const U = Je(i, "all", n.presetDates), ee = Je(i, "input"); 40949 (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 40950 [w, f], 40951 () => { 40952 u(w.value); 40953 }, 40954 { deep: !0 } 40955 ); 40956 const { openOnTop: y, menuStyle: Q, xCorrect: A, setMenuPosition: ne, getScrollableParent: de, shadowRender: d } = to({ 40957 menuRef: F, 40958 menuRefInner: p, 40959 inputRef: _, 40960 pickerWrapperRef: R, 40961 inline: x, 40962 emit: a, 40963 props: n, 40964 slots: i 40965 }), { 40966 inputValue: m, 40967 internalModelValue: L, 40968 parseExternalModelValue: u, 40969 emitModelValue: b, 40970 formatInputValue: I, 40971 checkBeforeEmit: s 40972 } = Gl(a, n, k), le = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)( 40973 () => ({ 40974 dp__main: !0, 40975 dp__theme_dark: n.dark, 40976 dp__theme_light: !n.dark, 40977 dp__flex_display: x.value.enabled, 40978 "dp--flex-display-collapsed": H.value, 40979 dp__flex_display_with_input: x.value.input 40980 }) 40981 ), pe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.dark ? "dp__theme_dark" : "dp__theme_light"), $ = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => n.teleport ? { 40982 to: typeof n.teleport == "boolean" ? "body" : n.teleport, 40983 disabled: !n.teleport || x.value.enabled 40984 } : {}), ge = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({ class: "dp__outer_menu_wrap" })), r = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => x.value.enabled && (n.timePicker || n.monthPicker || n.yearPicker || n.quarterPicker)), B = () => { 40985 var g, W; 40986 return (W = (g = _.value) == null ? void 0 : g.$el) == null ? void 0 : W.getBoundingClientRect(); 40987 }, C = () => { 40988 c.value && (Y.value.closeOnScroll ? Xe() : ne()); 40989 }, V = () => { 40990 var W; 40991 c.value && ne(); 40992 const g = (W = p.value) == null ? void 0 : W.$el.getBoundingClientRect().width; 40993 H.value = document.body.offsetWidth <= g; 40994 }, se = (g) => { 40995 g.key === "Tab" && !x.value.enabled && !n.teleport && Y.value.tabOutClosesMenu && (R.value.contains(document.activeElement) || Xe()), N.value = g.shiftKey; 40996 }, M = (g) => { 40997 N.value = g.shiftKey; 40998 }, E = () => { 40999 !n.disabled && !n.readonly && (d(mn, n), ne(!1), c.value = !0, c.value && a("open"), c.value || Ft(), u(n.modelValue)); 41000 }, ce = () => { 41001 var g; 41002 m.value = "", Ft(), (g = _.value) == null || g.setParsedDate(null), a("update:model-value", null), a("update:model-timezone-value", null), a("cleared"), Y.value.closeOnClearValue && Xe(); 41003 }, he = () => { 41004 const g = L.value; 41005 return !g || !Array.isArray(g) && ae(g) ? !0 : Array.isArray(g) ? ie.value.enabled || g.length === 2 && ae(g[0]) && ae(g[1]) ? !0 : q.value.partialRange && !n.timePicker ? ae(g[0]) : !1 : !1; 41006 }, et = () => { 41007 s() && he() ? (b(), Xe()) : a("invalid-select", L.value); 41008 }, ve = (g) => { 41009 vt(), b(), Y.value.closeOnAutoApply && !g && Xe(); 41010 }, vt = () => { 41011 _.value && P.value.enabled && _.value.setParsedDate(L.value); 41012 }, ot = (g = !1) => { 41013 n.autoApply && oe(L.value) && he() && (q.value.enabled && Array.isArray(L.value) ? (q.value.partialRange || L.value.length === 2) && ve(g) : ve(g)); 41014 }, Ft = () => { 41015 P.value.enabled || (L.value = null); 41016 }, Xe = () => { 41017 x.value.enabled || (c.value && (c.value = !1, A.value = !1, O(!1), S(!1), G(), a("closed"), m.value && u(w.value)), Ft(), a("blur")); 41018 }, Lt = (g, W, re = !1) => { 41019 if (!g) { 41020 L.value = null; 41021 return; 41022 } 41023 const Ae = Array.isArray(g) ? !g.some((wt) => !ae(wt)) : ae(g), Fe = oe(g); 41024 Ae && Fe && (v.value = !0, L.value = g, W && (z.value = re, et(), a("text-submit")), (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)().then(() => { 41025 v.value = !1; 41026 })); 41027 }, pa = () => { 41028 n.autoApply && oe(L.value) && b(), vt(); 41029 }, Zt = () => c.value ? Xe() : E(), ya = (g) => { 41030 L.value = g; 41031 }, ga = () => { 41032 P.value.enabled && (k.value = !0, I()), a("focus"); 41033 }, ha = () => { 41034 if (P.value.enabled && (k.value = !1, u(n.modelValue), z.value)) { 41035 const g = wl(R.value, N.value); 41036 g == null || g.focus(); 41037 } 41038 a("blur"); 41039 }, ba = (g) => { 41040 p.value && p.value.updateMonthYear(0, { 41041 month: rn(g.month), 41042 year: rn(g.year) 41043 }); 41044 }, ka = (g) => { 41045 u(g ?? n.modelValue); 41046 }, wa = (g, W) => { 41047 var re; 41048 (re = p.value) == null || re.switchView(g, W); 41049 }, Za = (g) => Y.value.onClickOutside ? Y.value.onClickOutside(g) : Xe(), D = (g = 0) => { 41050 var W; 41051 (W = p.value) == null || W.handleFlow(g); 41052 }; 41053 return po(F, _, () => Za(he)), t({ 41054 closeMenu: Xe, 41055 selectDate: et, 41056 clearValue: ce, 41057 openMenu: E, 41058 onScroll: C, 41059 formatInputValue: I, 41060 // exposed for testing purposes 41061 updateInternalModelValue: ya, 41062 // modify internal modelValue 41063 setMonthYear: ba, 41064 parseModel: ka, 41065 switchView: wa, 41066 toggleMenu: Zt, 41067 handleFlow: D, 41068 dpWrapMenuRef: F 41069 }), (g, W) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 41070 ref_key: "pickerWrapperRef", 41071 ref: R, 41072 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(le.value), 41073 "data-datepicker-instance": "" 41074 }, [ 41075 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(co, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 41076 ref_key: "inputRef", 41077 ref: _, 41078 "input-value": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(m), 41079 "onUpdate:inputValue": W[0] || (W[0] = (re) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.isRef)(m) ? m.value = re : null), 41080 "is-menu-open": c.value 41081 }, g.$props, { 41082 onClear: ce, 41083 onOpen: E, 41084 onSetInputDate: Lt, 41085 onSetEmptyDate: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(b), 41086 onSelectDate: et, 41087 onToggle: Zt, 41088 onClose: Xe, 41089 onFocus: ga, 41090 onBlur: ha, 41091 onRealBlur: W[1] || (W[1] = (re) => k.value = !1), 41092 onTextInput: W[2] || (W[2] = (re) => g.$emit("text-input", re)) 41093 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 41094 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ee), (re, Ae) => ({ 41095 name: re, 41096 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((Fe) => [ 41097 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(g.$slots, re, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)(Fe))) 41098 ]) 41099 })) 41100 ]), 1040, ["input-value", "is-menu-open", "onSetEmptyDate"]), 41101 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)(g.teleport ? vue__WEBPACK_IMPORTED_MODULE_0__.Teleport : "div"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)($.value)), { 41102 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 41103 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, { 41104 name: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(fe)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(y)), 41105 css: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(h) && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(x).enabled 41106 }, { 41107 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 41108 c.value ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 41109 key: 0, 41110 ref_key: "dpWrapMenuRef", 41111 ref: F 41112 }, ge.value, { 41113 class: { "dp--menu-wrapper": !(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(x).enabled }, 41114 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(x).enabled ? void 0 : (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(Q) 41115 }), [ 41116 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(mn, (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ 41117 ref_key: "dpMenuRef", 41118 ref: p 41119 }, g.$props, { 41120 "internal-model-value": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(L), 41121 "onUpdate:internalModelValue": W[3] || (W[3] = (re) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.isRef)(L) ? L.value = re : null), 41122 class: { [pe.value]: !0, "dp--menu-wrapper": g.teleport }, 41123 "open-on-top": (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(y), 41124 "no-overlay-focus": r.value, 41125 collapse: H.value, 41126 "get-input-rect": B, 41127 "is-text-input-date": v.value, 41128 onClosePicker: Xe, 41129 onSelectDate: et, 41130 onAutoApply: ot, 41131 onTimeUpdate: pa, 41132 onFlowStep: W[4] || (W[4] = (re) => g.$emit("flow-step", re)), 41133 onUpdateMonthYear: W[5] || (W[5] = (re) => g.$emit("update-month-year", re)), 41134 onInvalidSelect: W[6] || (W[6] = (re) => g.$emit("invalid-select", (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(L))), 41135 onAutoApplyInvalid: W[7] || (W[7] = (re) => g.$emit("invalid-select", re)), 41136 onInvalidFixedRange: W[8] || (W[8] = (re) => g.$emit("invalid-fixed-range", re)), 41137 onRecalculatePosition: (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(ne), 41138 onTooltipOpen: W[9] || (W[9] = (re) => g.$emit("tooltip-open", re)), 41139 onTooltipClose: W[10] || (W[10] = (re) => g.$emit("tooltip-close", re)), 41140 onTimePickerOpen: W[11] || (W[11] = (re) => g.$emit("time-picker-open", re)), 41141 onTimePickerClose: W[12] || (W[12] = (re) => g.$emit("time-picker-close", re)), 41142 onAmPmChange: W[13] || (W[13] = (re) => g.$emit("am-pm-change", re)), 41143 onRangeStart: W[14] || (W[14] = (re) => g.$emit("range-start", re)), 41144 onRangeEnd: W[15] || (W[15] = (re) => g.$emit("range-end", re)), 41145 onDateUpdate: W[16] || (W[16] = (re) => g.$emit("date-update", re)), 41146 onInvalidDate: W[17] || (W[17] = (re) => g.$emit("invalid-date", re)), 41147 onOverlayToggle: W[18] || (W[18] = (re) => g.$emit("overlay-toggle", re)) 41148 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({ _: 2 }, [ 41149 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(U), (re, Ae) => ({ 41150 name: re, 41151 fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)((Fe) => [ 41152 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(g.$slots, re, (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps)({ ...Fe }))) 41153 ]) 41154 })) 41155 ]), 1040, ["internal-model-value", "class", "open-on-top", "no-overlay-focus", "collapse", "is-text-input-date", "onRecalculatePosition"]) 41156 ], 16)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 41157 ]), 41158 _: 3 41159 }, 8, ["name", "css"]) 41160 ]), 41161 _: 3 41162 }, 16)) 41163 ], 2)); 41164 } 41165}), Vn = /* @__PURE__ */ (() => { 41166 const e = yo; 41167 return e.install = (t) => { 41168 t.component("Vue3DatePicker", e); 41169 }, e; 41170})(), go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 41171 __proto__: null, 41172 default: Vn 41173}, Symbol.toStringTag, { value: "Module" })); 41174Object.entries(go).forEach(([e, t]) => { 41175 e !== "default" && (Vn[e] = t); 41176}); 41177 41178 41179 41180/***/ }), 41181
vendor: 275,396 bytes, lines 41182-48970
41182/***/ "./node_modules/@vueuse/core/index.mjs": 41183/*!*********************************************!*\ 41184 !*** ./node_modules/@vueuse/core/index.mjs ***! 41185 \*********************************************/ 41186/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 41187 41188"use strict"; 41189__webpack_require__.r(__webpack_exports__); 41190/* harmony export */ __webpack_require__.d(__webpack_exports__, { 41191/* harmony export */ DefaultMagicKeysAliasMap: () => (/* binding */ DefaultMagicKeysAliasMap), 41192/* harmony export */ StorageSerializers: () => (/* binding */ StorageSerializers), 41193/* harmony export */ TransitionPresets: () => (/* binding */ TransitionPresets), 41194/* harmony export */ assert: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.assert), 41195/* harmony export */ asyncComputed: () => (/* binding */ computedAsync), 41196/* harmony export */ autoResetRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.autoResetRef), 41197/* harmony export */ breakpointsAntDesign: () => (/* binding */ breakpointsAntDesign), 41198/* harmony export */ breakpointsBootstrapV5: () => (/* binding */ breakpointsBootstrapV5), 41199/* harmony export */ breakpointsMasterCss: () => (/* binding */ breakpointsMasterCss), 41200/* harmony export */ breakpointsPrimeFlex: () => (/* binding */ breakpointsPrimeFlex), 41201/* harmony export */ breakpointsQuasar: () => (/* binding */ breakpointsQuasar), 41202/* harmony export */ breakpointsSematic: () => (/* binding */ breakpointsSematic), 41203/* harmony export */ breakpointsTailwind: () => (/* binding */ breakpointsTailwind), 41204/* harmony export */ breakpointsVuetify: () => (/* binding */ breakpointsVuetify), 41205/* harmony export */ breakpointsVuetifyV2: () => (/* binding */ breakpointsVuetifyV2), 41206/* harmony export */ breakpointsVuetifyV3: () => (/* binding */ breakpointsVuetifyV3), 41207/* harmony export */ bypassFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.bypassFilter), 41208/* harmony export */ camelize: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.camelize), 41209/* harmony export */ clamp: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.clamp), 41210/* harmony export */ cloneFnJSON: () => (/* binding */ cloneFnJSON), 41211/* harmony export */ computedAsync: () => (/* binding */ computedAsync), 41212/* harmony export */ computedEager: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.computedEager), 41213/* harmony export */ computedInject: () => (/* binding */ computedInject), 41214/* harmony export */ computedWithControl: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.computedWithControl), 41215/* harmony export */ containsProp: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.containsProp), 41216/* harmony export */ controlledComputed: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.controlledComputed), 41217/* harmony export */ controlledRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.controlledRef), 41218/* harmony export */ createEventHook: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook), 41219/* harmony export */ createFetch: () => (/* binding */ createFetch), 41220/* harmony export */ createFilterWrapper: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createFilterWrapper), 41221/* harmony export */ createGlobalState: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createGlobalState), 41222/* harmony export */ createInjectionState: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createInjectionState), 41223/* harmony export */ createReactiveFn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createReactiveFn), 41224/* harmony export */ createReusableTemplate: () => (/* binding */ createReusableTemplate), 41225/* harmony export */ createSharedComposable: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createSharedComposable), 41226/* harmony export */ createSingletonPromise: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createSingletonPromise), 41227/* harmony export */ createTemplatePromise: () => (/* binding */ createTemplatePromise), 41228/* harmony export */ createUnrefFn: () => (/* binding */ createUnrefFn), 41229/* harmony export */ customStorageEventName: () => (/* binding */ customStorageEventName), 41230/* harmony export */ debounceFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.debounceFilter), 41231/* harmony export */ debouncedRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.debouncedRef), 41232/* harmony export */ debouncedWatch: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.debouncedWatch), 41233/* harmony export */ defaultDocument: () => (/* binding */ defaultDocument), 41234/* harmony export */ defaultLocation: () => (/* binding */ defaultLocation), 41235/* harmony export */ defaultNavigator: () => (/* binding */ defaultNavigator), 41236/* harmony export */ defaultWindow: () => (/* binding */ defaultWindow), 41237/* harmony export */ directiveHooks: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.directiveHooks), 41238/* harmony export */ eagerComputed: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.eagerComputed), 41239/* harmony export */ executeTransition: () => (/* binding */ executeTransition), 41240/* harmony export */ extendRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.extendRef), 41241/* harmony export */ formatDate: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.formatDate), 41242/* harmony export */ formatTimeAgo: () => (/* binding */ formatTimeAgo), 41243/* harmony export */ get: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.get), 41244/* harmony export */ getLifeCycleTarget: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.getLifeCycleTarget), 41245/* harmony export */ getSSRHandler: () => (/* binding */ getSSRHandler), 41246/* harmony export */ hasOwn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn), 41247/* harmony export */ hyphenate: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.hyphenate), 41248/* harmony export */ identity: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.identity), 41249/* harmony export */ ignorableWatch: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.ignorableWatch), 41250/* harmony export */ increaseWithUnit: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.increaseWithUnit), 41251/* harmony export */ injectLocal: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.injectLocal), 41252/* harmony export */ invoke: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.invoke), 41253/* harmony export */ isClient: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient), 41254/* harmony export */ isDef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isDef), 41255/* harmony export */ isDefined: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isDefined), 41256/* harmony export */ isIOS: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isIOS), 41257/* harmony export */ isObject: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isObject), 41258/* harmony export */ isWorker: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isWorker), 41259/* harmony export */ makeDestructurable: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.makeDestructurable), 41260/* harmony export */ mapGamepadToXbox360Controller: () => (/* binding */ mapGamepadToXbox360Controller), 41261/* harmony export */ noop: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop), 41262/* harmony export */ normalizeDate: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.normalizeDate), 41263/* harmony export */ notNullish: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.notNullish), 41264/* harmony export */ now: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.now), 41265/* harmony export */ objectEntries: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectEntries), 41266/* harmony export */ objectOmit: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectOmit), 41267/* harmony export */ objectPick: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectPick), 41268/* harmony export */ onClickOutside: () => (/* binding */ onClickOutside), 41269/* harmony export */ onKeyDown: () => (/* binding */ onKeyDown), 41270/* harmony export */ onKeyPressed: () => (/* binding */ onKeyPressed), 41271/* harmony export */ onKeyStroke: () => (/* binding */ onKeyStroke), 41272/* harmony export */ onKeyUp: () => (/* binding */ onKeyUp), 41273/* harmony export */ onLongPress: () => (/* binding */ onLongPress), 41274/* harmony export */ onStartTyping: () => (/* binding */ onStartTyping), 41275/* harmony export */ pausableFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.pausableFilter), 41276/* harmony export */ pausableWatch: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.pausableWatch), 41277/* harmony export */ promiseTimeout: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.promiseTimeout), 41278/* harmony export */ provideLocal: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.provideLocal), 41279/* harmony export */ rand: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.rand), 41280/* harmony export */ reactify: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.reactify), 41281/* harmony export */ reactifyObject: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.reactifyObject), 41282/* harmony export */ reactiveComputed: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.reactiveComputed), 41283/* harmony export */ reactiveOmit: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.reactiveOmit), 41284/* harmony export */ reactivePick: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.reactivePick), 41285/* harmony export */ refAutoReset: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.refAutoReset), 41286/* harmony export */ refDebounced: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.refDebounced), 41287/* harmony export */ refDefault: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.refDefault), 41288/* harmony export */ refThrottled: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.refThrottled), 41289/* harmony export */ refWithControl: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.refWithControl), 41290/* harmony export */ resolveRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.resolveRef), 41291/* harmony export */ resolveUnref: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.resolveUnref), 41292/* harmony export */ set: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.set), 41293/* harmony export */ setSSRHandler: () => (/* binding */ setSSRHandler), 41294/* harmony export */ syncRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.syncRef), 41295/* harmony export */ syncRefs: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.syncRefs), 41296/* harmony export */ templateRef: () => (/* binding */ templateRef), 41297/* harmony export */ throttleFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.throttleFilter), 41298/* harmony export */ throttledRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.throttledRef), 41299/* harmony export */ throttledWatch: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.throttledWatch), 41300/* harmony export */ timestamp: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp), 41301/* harmony export */ toReactive: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toReactive), 41302/* harmony export */ toRef: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef), 41303/* harmony export */ toRefs: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRefs), 41304/* harmony export */ toValue: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue), 41305/* harmony export */ tryOnBeforeMount: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnBeforeMount), 41306/* harmony export */ tryOnBeforeUnmount: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnBeforeUnmount), 41307/* harmony export */ tryOnMounted: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted), 41308/* harmony export */ tryOnScopeDispose: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose), 41309/* harmony export */ tryOnUnmounted: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnUnmounted), 41310/* harmony export */ unrefElement: () => (/* binding */ unrefElement), 41311/* harmony export */ until: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.until), 41312/* harmony export */ useActiveElement: () => (/* binding */ useActiveElement), 41313/* harmony export */ useAnimate: () => (/* binding */ useAnimate), 41314/* harmony export */ useArrayDifference: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayDifference), 41315/* harmony export */ useArrayEvery: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayEvery), 41316/* harmony export */ useArrayFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayFilter), 41317/* harmony export */ useArrayFind: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayFind), 41318/* harmony export */ useArrayFindIndex: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayFindIndex), 41319/* harmony export */ useArrayFindLast: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayFindLast), 41320/* harmony export */ useArrayIncludes: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayIncludes), 41321/* harmony export */ useArrayJoin: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayJoin), 41322/* harmony export */ useArrayMap: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayMap), 41323/* harmony export */ useArrayReduce: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayReduce), 41324/* harmony export */ useArraySome: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArraySome), 41325/* harmony export */ useArrayUnique: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useArrayUnique), 41326/* harmony export */ useAsyncQueue: () => (/* binding */ useAsyncQueue), 41327/* harmony export */ useAsyncState: () => (/* binding */ useAsyncState), 41328/* harmony export */ useBase64: () => (/* binding */ useBase64), 41329/* harmony export */ useBattery: () => (/* binding */ useBattery), 41330/* harmony export */ useBluetooth: () => (/* binding */ useBluetooth), 41331/* harmony export */ useBreakpoints: () => (/* binding */ useBreakpoints), 41332/* harmony export */ useBroadcastChannel: () => (/* binding */ useBroadcastChannel), 41333/* harmony export */ useBrowserLocation: () => (/* binding */ useBrowserLocation), 41334/* harmony export */ useCached: () => (/* binding */ useCached), 41335/* harmony export */ useClipboard: () => (/* binding */ useClipboard), 41336/* harmony export */ useClipboardItems: () => (/* binding */ useClipboardItems), 41337/* harmony export */ useCloned: () => (/* binding */ useCloned), 41338/* harmony export */ useColorMode: () => (/* binding */ useColorMode), 41339/* harmony export */ useConfirmDialog: () => (/* binding */ useConfirmDialog), 41340/* harmony export */ useCounter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useCounter), 41341/* harmony export */ useCssVar: () => (/* binding */ useCssVar), 41342/* harmony export */ useCurrentElement: () => (/* binding */ useCurrentElement), 41343/* harmony export */ useCycleList: () => (/* binding */ useCycleList), 41344/* harmony export */ useDark: () => (/* binding */ useDark), 41345/* harmony export */ useDateFormat: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useDateFormat), 41346/* harmony export */ useDebounce: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useDebounce), 41347/* harmony export */ useDebounceFn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useDebounceFn), 41348/* harmony export */ useDebouncedRefHistory: () => (/* binding */ useDebouncedRefHistory), 41349/* harmony export */ useDeviceMotion: () => (/* binding */ useDeviceMotion), 41350/* harmony export */ useDeviceOrientation: () => (/* binding */ useDeviceOrientation), 41351/* harmony export */ useDevicePixelRatio: () => (/* binding */ useDevicePixelRatio), 41352/* harmony export */ useDevicesList: () => (/* binding */ useDevicesList), 41353/* harmony export */ useDisplayMedia: () => (/* binding */ useDisplayMedia), 41354/* harmony export */ useDocumentVisibility: () => (/* binding */ useDocumentVisibility), 41355/* harmony export */ useDraggable: () => (/* binding */ useDraggable), 41356/* harmony export */ useDropZone: () => (/* binding */ useDropZone), 41357/* harmony export */ useElementBounding: () => (/* binding */ useElementBounding), 41358/* harmony export */ useElementByPoint: () => (/* binding */ useElementByPoint), 41359/* harmony export */ useElementHover: () => (/* binding */ useElementHover), 41360/* harmony export */ useElementSize: () => (/* binding */ useElementSize), 41361/* harmony export */ useElementVisibility: () => (/* binding */ useElementVisibility), 41362/* harmony export */ useEventBus: () => (/* binding */ useEventBus), 41363/* harmony export */ useEventListener: () => (/* binding */ useEventListener), 41364/* harmony export */ useEventSource: () => (/* binding */ useEventSource), 41365/* harmony export */ useEyeDropper: () => (/* binding */ useEyeDropper), 41366/* harmony export */ useFavicon: () => (/* binding */ useFavicon), 41367/* harmony export */ useFetch: () => (/* binding */ useFetch), 41368/* harmony export */ useFileDialog: () => (/* binding */ useFileDialog), 41369/* harmony export */ useFileSystemAccess: () => (/* binding */ useFileSystemAccess), 41370/* harmony export */ useFocus: () => (/* binding */ useFocus), 41371/* harmony export */ useFocusWithin: () => (/* binding */ useFocusWithin), 41372/* harmony export */ useFps: () => (/* binding */ useFps), 41373/* harmony export */ useFullscreen: () => (/* binding */ useFullscreen), 41374/* harmony export */ useGamepad: () => (/* binding */ useGamepad), 41375/* harmony export */ useGeolocation: () => (/* binding */ useGeolocation), 41376/* harmony export */ useIdle: () => (/* binding */ useIdle), 41377/* harmony export */ useImage: () => (/* binding */ useImage), 41378/* harmony export */ useInfiniteScroll: () => (/* binding */ useInfiniteScroll), 41379/* harmony export */ useIntersectionObserver: () => (/* binding */ useIntersectionObserver), 41380/* harmony export */ useInterval: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useInterval), 41381/* harmony export */ useIntervalFn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn), 41382/* harmony export */ useKeyModifier: () => (/* binding */ useKeyModifier), 41383/* harmony export */ useLastChanged: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useLastChanged), 41384/* harmony export */ useLocalStorage: () => (/* binding */ useLocalStorage), 41385/* harmony export */ useMagicKeys: () => (/* binding */ useMagicKeys), 41386/* harmony export */ useManualRefHistory: () => (/* binding */ useManualRefHistory), 41387/* harmony export */ useMediaControls: () => (/* binding */ useMediaControls), 41388/* harmony export */ useMediaQuery: () => (/* binding */ useMediaQuery), 41389/* harmony export */ useMemoize: () => (/* binding */ useMemoize), 41390/* harmony export */ useMemory: () => (/* binding */ useMemory), 41391/* harmony export */ useMounted: () => (/* binding */ useMounted), 41392/* harmony export */ useMouse: () => (/* binding */ useMouse), 41393/* harmony export */ useMouseInElement: () => (/* binding */ useMouseInElement), 41394/* harmony export */ useMousePressed: () => (/* binding */ useMousePressed), 41395/* harmony export */ useMutationObserver: () => (/* binding */ useMutationObserver), 41396/* harmony export */ useNavigatorLanguage: () => (/* binding */ useNavigatorLanguage), 41397/* harmony export */ useNetwork: () => (/* binding */ useNetwork), 41398/* harmony export */ useNow: () => (/* binding */ useNow), 41399/* harmony export */ useObjectUrl: () => (/* binding */ useObjectUrl), 41400/* harmony export */ useOffsetPagination: () => (/* binding */ useOffsetPagination), 41401/* harmony export */ useOnline: () => (/* binding */ useOnline), 41402/* harmony export */ usePageLeave: () => (/* binding */ usePageLeave), 41403/* harmony export */ useParallax: () => (/* binding */ useParallax), 41404/* harmony export */ useParentElement: () => (/* binding */ useParentElement), 41405/* harmony export */ usePerformanceObserver: () => (/* binding */ usePerformanceObserver), 41406/* harmony export */ usePermission: () => (/* binding */ usePermission), 41407/* harmony export */ usePointer: () => (/* binding */ usePointer), 41408/* harmony export */ usePointerLock: () => (/* binding */ usePointerLock), 41409/* harmony export */ usePointerSwipe: () => (/* binding */ usePointerSwipe), 41410/* harmony export */ usePreferredColorScheme: () => (/* binding */ usePreferredColorScheme), 41411/* harmony export */ usePreferredContrast: () => (/* binding */ usePreferredContrast), 41412/* harmony export */ usePreferredDark: () => (/* binding */ usePreferredDark), 41413/* harmony export */ usePreferredLanguages: () => (/* binding */ usePreferredLanguages), 41414/* harmony export */ usePreferredReducedMotion: () => (/* binding */ usePreferredReducedMotion), 41415/* harmony export */ usePrevious: () => (/* binding */ usePrevious), 41416/* harmony export */ useRafFn: () => (/* binding */ useRafFn), 41417/* harmony export */ useRefHistory: () => (/* binding */ useRefHistory), 41418/* harmony export */ useResizeObserver: () => (/* binding */ useResizeObserver), 41419/* harmony export */ useScreenOrientation: () => (/* binding */ useScreenOrientation), 41420/* harmony export */ useScreenSafeArea: () => (/* binding */ useScreenSafeArea), 41421/* harmony export */ useScriptTag: () => (/* binding */ useScriptTag), 41422/* harmony export */ useScroll: () => (/* binding */ useScroll), 41423/* harmony export */ useScrollLock: () => (/* binding */ useScrollLock), 41424/* harmony export */ useSessionStorage: () => (/* binding */ useSessionStorage), 41425/* harmony export */ useShare: () => (/* binding */ useShare), 41426/* harmony export */ useSorted: () => (/* binding */ useSorted), 41427/* harmony export */ useSpeechRecognition: () => (/* binding */ useSpeechRecognition), 41428/* harmony export */ useSpeechSynthesis: () => (/* binding */ useSpeechSynthesis), 41429/* harmony export */ useStepper: () => (/* binding */ useStepper), 41430/* harmony export */ useStorage: () => (/* binding */ useStorage), 41431/* harmony export */ useStorageAsync: () => (/* binding */ useStorageAsync), 41432/* harmony export */ useStyleTag: () => (/* binding */ useStyleTag), 41433/* harmony export */ useSupported: () => (/* binding */ useSupported), 41434/* harmony export */ useSwipe: () => (/* binding */ useSwipe), 41435/* harmony export */ useTemplateRefsList: () => (/* binding */ useTemplateRefsList), 41436/* harmony export */ useTextDirection: () => (/* binding */ useTextDirection), 41437/* harmony export */ useTextSelection: () => (/* binding */ useTextSelection), 41438/* harmony export */ useTextareaAutosize: () => (/* binding */ useTextareaAutosize), 41439/* harmony export */ useThrottle: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useThrottle), 41440/* harmony export */ useThrottleFn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useThrottleFn), 41441/* harmony export */ useThrottledRefHistory: () => (/* binding */ useThrottledRefHistory), 41442/* harmony export */ useTimeAgo: () => (/* binding */ useTimeAgo), 41443/* harmony export */ useTimeout: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeout), 41444/* harmony export */ useTimeoutFn: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeoutFn), 41445/* harmony export */ useTimeoutPoll: () => (/* binding */ useTimeoutPoll), 41446/* harmony export */ useTimestamp: () => (/* binding */ useTimestamp), 41447/* harmony export */ useTitle: () => (/* binding */ useTitle), 41448/* harmony export */ useToNumber: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useToNumber), 41449/* harmony export */ useToString: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useToString), 41450/* harmony export */ useToggle: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useToggle), 41451/* harmony export */ useTransition: () => (/* binding */ useTransition), 41452/* harmony export */ useUrlSearchParams: () => (/* binding */ useUrlSearchParams), 41453/* harmony export */ useUserMedia: () => (/* binding */ useUserMedia), 41454/* harmony export */ useVModel: () => (/* binding */ useVModel), 41455/* harmony export */ useVModels: () => (/* binding */ useVModels), 41456/* harmony export */ useVibrate: () => (/* binding */ useVibrate), 41457/* harmony export */ useVirtualList: () => (/* binding */ useVirtualList), 41458/* harmony export */ useWakeLock: () => (/* binding */ useWakeLock), 41459/* harmony export */ useWebNotification: () => (/* binding */ useWebNotification), 41460/* harmony export */ useWebSocket: () => (/* binding */ useWebSocket), 41461/* harmony export */ useWebWorker: () => (/* binding */ useWebWorker), 41462/* harmony export */ useWebWorkerFn: () => (/* binding */ useWebWorkerFn), 41463/* harmony export */ useWindowFocus: () => (/* binding */ useWindowFocus), 41464/* harmony export */ useWindowScroll: () => (/* binding */ useWindowScroll), 41465/* harmony export */ useWindowSize: () => (/* binding */ useWindowSize), 41466/* harmony export */ watchArray: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchArray), 41467/* harmony export */ watchAtMost: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchAtMost), 41468/* harmony export */ watchDebounced: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchDebounced), 41469/* harmony export */ watchDeep: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchDeep), 41470/* harmony export */ watchIgnorable: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchIgnorable), 41471/* harmony export */ watchImmediate: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchImmediate), 41472/* harmony export */ watchOnce: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchOnce), 41473/* harmony export */ watchPausable: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchPausable), 41474/* harmony export */ watchThrottled: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchThrottled), 41475/* harmony export */ watchTriggerable: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchTriggerable), 41476/* harmony export */ watchWithFilter: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchWithFilter), 41477/* harmony export */ whenever: () => (/* reexport safe */ _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.whenever) 41478/* harmony export */ }); 41479/* harmony import */ var _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vueuse/shared */ "./node_modules/@vueuse/shared/index.mjs"); 41480/* harmony import */ var vue_demi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-demi */ "./node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs"); 41481 41482 41483 41484 41485function computedAsync(evaluationCallback, initialState, optionsOrRef) { 41486 let options; 41487 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(optionsOrRef)) { 41488 options = { 41489 evaluating: optionsOrRef 41490 }; 41491 } else { 41492 options = optionsOrRef || {}; 41493 } 41494 const { 41495 lazy = false, 41496 evaluating = void 0, 41497 shallow = true, 41498 onError = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop 41499 } = options; 41500 const started = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(!lazy); 41501 const current = shallow ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(initialState) : (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialState); 41502 let counter = 0; 41503 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watchEffect)(async (onInvalidate) => { 41504 if (!started.value) 41505 return; 41506 counter++; 41507 const counterAtBeginning = counter; 41508 let hasFinished = false; 41509 if (evaluating) { 41510 Promise.resolve().then(() => { 41511 evaluating.value = true; 41512 }); 41513 } 41514 try { 41515 const result = await evaluationCallback((cancelCallback) => { 41516 onInvalidate(() => { 41517 if (evaluating) 41518 evaluating.value = false; 41519 if (!hasFinished) 41520 cancelCallback(); 41521 }); 41522 }); 41523 if (counterAtBeginning === counter) 41524 current.value = result; 41525 } catch (e) { 41526 onError(e); 41527 } finally { 41528 if (evaluating && counterAtBeginning === counter) 41529 evaluating.value = false; 41530 hasFinished = true; 41531 } 41532 }); 41533 if (lazy) { 41534 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 41535 started.value = true; 41536 return current.value; 41537 }); 41538 } else { 41539 return current; 41540 } 41541} 41542 41543function computedInject(key, options, defaultSource, treatDefaultAsFactory) { 41544 let source = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.inject)(key); 41545 if (defaultSource) 41546 source = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.inject)(key, defaultSource); 41547 if (treatDefaultAsFactory) 41548 source = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.inject)(key, defaultSource, treatDefaultAsFactory); 41549 if (typeof options === "function") { 41550 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)((ctx) => options(source, ctx)); 41551 } else { 41552 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 41553 get: (ctx) => options.get(source, ctx), 41554 set: options.set 41555 }); 41556 } 41557} 41558 41559function createReusableTemplate(options = {}) { 41560 if (!vue_demi__WEBPACK_IMPORTED_MODULE_1__.isVue3 && !vue_demi__WEBPACK_IMPORTED_MODULE_1__.version.startsWith("2.7.")) { 41561 if (true) 41562 throw new Error("[VueUse] createReusableTemplate only works in Vue 2.7 or above."); 41563 return; 41564 } 41565 const { 41566 inheritAttrs = true 41567 } = options; 41568 const render = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); 41569 const define = /* #__PURE__ */ (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.defineComponent)({ 41570 setup(_, { slots }) { 41571 return () => { 41572 render.value = slots.default; 41573 }; 41574 } 41575 }); 41576 const reuse = /* #__PURE__ */ (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.defineComponent)({ 41577 inheritAttrs, 41578 setup(_, { attrs, slots }) { 41579 return () => { 41580 var _a; 41581 if (!render.value && "development" !== "production") 41582 throw new Error("[VueUse] Failed to find the definition of reusable template"); 41583 const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots }); 41584 return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode; 41585 }; 41586 } 41587 }); 41588 return (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.makeDestructurable)( 41589 { define, reuse }, 41590 [define, reuse] 41591 ); 41592} 41593function keysToCamelKebabCase(obj) { 41594 const newObj = {}; 41595 for (const key in obj) 41596 newObj[(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(key)] = obj[key]; 41597 return newObj; 41598} 41599 41600function createTemplatePromise(options = {}) { 41601 if (!vue_demi__WEBPACK_IMPORTED_MODULE_1__.isVue3) { 41602 if (true) 41603 throw new Error("[VueUse] createTemplatePromise only works in Vue 3 or above."); 41604 return; 41605 } 41606 let index = 0; 41607 const instances = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 41608 function create(...args) { 41609 const props = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowReactive)({ 41610 key: index++, 41611 args, 41612 promise: void 0, 41613 resolve: () => { 41614 }, 41615 reject: () => { 41616 }, 41617 isResolving: false, 41618 options 41619 }); 41620 instances.value.push(props); 41621 props.promise = new Promise((_resolve, _reject) => { 41622 props.resolve = (v) => { 41623 props.isResolving = true; 41624 return _resolve(v); 41625 }; 41626 props.reject = _reject; 41627 }).finally(() => { 41628 props.promise = void 0; 41629 const index2 = instances.value.indexOf(props); 41630 if (index2 !== -1) 41631 instances.value.splice(index2, 1); 41632 }); 41633 return props.promise; 41634 } 41635 function start(...args) { 41636 if (options.singleton && instances.value.length > 0) 41637 return instances.value[0].promise; 41638 return create(...args); 41639 } 41640 const component = /* #__PURE__ */ (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.defineComponent)((_, { slots }) => { 41641 const renderList = () => instances.value.map((props) => { 41642 var _a; 41643 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.h)(vue_demi__WEBPACK_IMPORTED_MODULE_1__.Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props)); 41644 }); 41645 if (options.transition) 41646 return () => (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.h)(vue_demi__WEBPACK_IMPORTED_MODULE_1__.TransitionGroup, options.transition, renderList); 41647 return renderList; 41648 }); 41649 component.start = start; 41650 return component; 41651} 41652 41653function createUnrefFn(fn) { 41654 return function(...args) { 41655 return fn.apply(this, args.map((i) => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(i))); 41656 }; 41657} 41658 41659function unrefElement(elRef) { 41660 var _a; 41661 const plain = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(elRef); 41662 return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; 41663} 41664 41665const defaultWindow = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient ? window : void 0; 41666const defaultDocument = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient ? window.document : void 0; 41667const defaultNavigator = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient ? window.navigator : void 0; 41668const defaultLocation = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient ? window.location : void 0; 41669 41670function useEventListener(...args) { 41671 let target; 41672 let events; 41673 let listeners; 41674 let options; 41675 if (typeof args[0] === "string" || Array.isArray(args[0])) { 41676 [events, listeners, options] = args; 41677 target = defaultWindow; 41678 } else { 41679 [target, events, listeners, options] = args; 41680 } 41681 if (!target) 41682 return _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 41683 if (!Array.isArray(events)) 41684 events = [events]; 41685 if (!Array.isArray(listeners)) 41686 listeners = [listeners]; 41687 const cleanups = []; 41688 const cleanup = () => { 41689 cleanups.forEach((fn) => fn()); 41690 cleanups.length = 0; 41691 }; 41692 const register = (el, event, listener, options2) => { 41693 el.addEventListener(event, listener, options2); 41694 return () => el.removeEventListener(event, listener, options2); 41695 }; 41696 const stopWatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 41697 () => [unrefElement(target), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options)], 41698 ([el, options2]) => { 41699 cleanup(); 41700 if (!el) 41701 return; 41702 const optionsClone = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(options2) ? { ...options2 } : options2; 41703 cleanups.push( 41704 ...events.flatMap((event) => { 41705 return listeners.map((listener) => register(el, event, listener, optionsClone)); 41706 }) 41707 ); 41708 }, 41709 { immediate: true, flush: "post" } 41710 ); 41711 const stop = () => { 41712 stopWatch(); 41713 cleanup(); 41714 }; 41715 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(stop); 41716 return stop; 41717} 41718 41719let _iOSWorkaround = false; 41720function onClickOutside(target, handler, options = {}) { 41721 const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options; 41722 if (!window) 41723 return _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 41724 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isIOS && !_iOSWorkaround) { 41725 _iOSWorkaround = true; 41726 Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop)); 41727 window.document.documentElement.addEventListener("click", _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop); 41728 } 41729 let shouldListen = true; 41730 const shouldIgnore = (event) => { 41731 return ignore.some((target2) => { 41732 if (typeof target2 === "string") { 41733 return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el)); 41734 } else { 41735 const el = unrefElement(target2); 41736 return el && (event.target === el || event.composedPath().includes(el)); 41737 } 41738 }); 41739 }; 41740 const listener = (event) => { 41741 const el = unrefElement(target); 41742 if (!el || el === event.target || event.composedPath().includes(el)) 41743 return; 41744 if (event.detail === 0) 41745 shouldListen = !shouldIgnore(event); 41746 if (!shouldListen) { 41747 shouldListen = true; 41748 return; 41749 } 41750 handler(event); 41751 }; 41752 const cleanup = [ 41753 useEventListener(window, "click", listener, { passive: true, capture }), 41754 useEventListener(window, "pointerdown", (e) => { 41755 const el = unrefElement(target); 41756 shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el)); 41757 }, { passive: true }), 41758 detectIframe && useEventListener(window, "blur", (event) => { 41759 setTimeout(() => { 41760 var _a; 41761 const el = unrefElement(target); 41762 if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement))) { 41763 handler(event); 41764 } 41765 }, 0); 41766 }) 41767 ].filter(Boolean); 41768 const stop = () => cleanup.forEach((fn) => fn()); 41769 return stop; 41770} 41771 41772function createKeyPredicate(keyFilter) { 41773 if (typeof keyFilter === "function") 41774 return keyFilter; 41775 else if (typeof keyFilter === "string") 41776 return (event) => event.key === keyFilter; 41777 else if (Array.isArray(keyFilter)) 41778 return (event) => keyFilter.includes(event.key); 41779 return () => true; 41780} 41781function onKeyStroke(...args) { 41782 let key; 41783 let handler; 41784 let options = {}; 41785 if (args.length === 3) { 41786 key = args[0]; 41787 handler = args[1]; 41788 options = args[2]; 41789 } else if (args.length === 2) { 41790 if (typeof args[1] === "object") { 41791 key = true; 41792 handler = args[0]; 41793 options = args[1]; 41794 } else { 41795 key = args[0]; 41796 handler = args[1]; 41797 } 41798 } else { 41799 key = true; 41800 handler = args[0]; 41801 } 41802 const { 41803 target = defaultWindow, 41804 eventName = "keydown", 41805 passive = false, 41806 dedupe = false 41807 } = options; 41808 const predicate = createKeyPredicate(key); 41809 const listener = (e) => { 41810 if (e.repeat && (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(dedupe)) 41811 return; 41812 if (predicate(e)) 41813 handler(e); 41814 }; 41815 return useEventListener(target, eventName, listener, passive); 41816} 41817function onKeyDown(key, handler, options = {}) { 41818 return onKeyStroke(key, handler, { ...options, eventName: "keydown" }); 41819} 41820function onKeyPressed(key, handler, options = {}) { 41821 return onKeyStroke(key, handler, { ...options, eventName: "keypress" }); 41822} 41823function onKeyUp(key, handler, options = {}) { 41824 return onKeyStroke(key, handler, { ...options, eventName: "keyup" }); 41825} 41826 41827const DEFAULT_DELAY = 500; 41828const DEFAULT_THRESHOLD = 10; 41829function onLongPress(target, handler, options) { 41830 var _a, _b; 41831 const elementRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => unrefElement(target)); 41832 let timeout; 41833 let posStart; 41834 let startTimestamp; 41835 let hasLongPressed = false; 41836 function clear() { 41837 if (timeout) { 41838 clearTimeout(timeout); 41839 timeout = void 0; 41840 } 41841 posStart = void 0; 41842 startTimestamp = void 0; 41843 hasLongPressed = false; 41844 } 41845 function onRelease(ev) { 41846 var _a2, _b2, _c; 41847 const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed]; 41848 clear(); 41849 if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) 41850 return; 41851 if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) 41852 return; 41853 if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) 41854 ev.preventDefault(); 41855 if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) 41856 ev.stopPropagation(); 41857 const dx = ev.x - _posStart.x; 41858 const dy = ev.y - _posStart.y; 41859 const distance = Math.sqrt(dx * dx + dy * dy); 41860 options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed); 41861 } 41862 function onDown(ev) { 41863 var _a2, _b2, _c, _d; 41864 if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) 41865 return; 41866 clear(); 41867 if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) 41868 ev.preventDefault(); 41869 if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) 41870 ev.stopPropagation(); 41871 posStart = { 41872 x: ev.x, 41873 y: ev.y 41874 }; 41875 startTimestamp = ev.timeStamp; 41876 timeout = setTimeout( 41877 () => { 41878 hasLongPressed = true; 41879 handler(ev); 41880 }, 41881 (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY 41882 ); 41883 } 41884 function onMove(ev) { 41885 var _a2, _b2, _c, _d; 41886 if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) 41887 return; 41888 if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false) 41889 return; 41890 if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) 41891 ev.preventDefault(); 41892 if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) 41893 ev.stopPropagation(); 41894 const dx = ev.x - posStart.x; 41895 const dy = ev.y - posStart.y; 41896 const distance = Math.sqrt(dx * dx + dy * dy); 41897 if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD)) 41898 clear(); 41899 } 41900 const listenerOptions = { 41901 capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture, 41902 once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once 41903 }; 41904 const cleanup = [ 41905 useEventListener(elementRef, "pointerdown", onDown, listenerOptions), 41906 useEventListener(elementRef, "pointermove", onMove, listenerOptions), 41907 useEventListener(elementRef, ["pointerup", "pointerleave"], onRelease, listenerOptions) 41908 ]; 41909 const stop = () => cleanup.forEach((fn) => fn()); 41910 return stop; 41911} 41912 41913function isFocusedElementEditable() { 41914 const { activeElement, body } = document; 41915 if (!activeElement) 41916 return false; 41917 if (activeElement === body) 41918 return false; 41919 switch (activeElement.tagName) { 41920 case "INPUT": 41921 case "TEXTAREA": 41922 return true; 41923 } 41924 return activeElement.hasAttribute("contenteditable"); 41925} 41926function isTypedCharValid({ 41927 keyCode, 41928 metaKey, 41929 ctrlKey, 41930 altKey 41931}) { 41932 if (metaKey || ctrlKey || altKey) 41933 return false; 41934 if (keyCode >= 48 && keyCode <= 57) 41935 return true; 41936 if (keyCode >= 65 && keyCode <= 90) 41937 return true; 41938 if (keyCode >= 97 && keyCode <= 122) 41939 return true; 41940 return false; 41941} 41942function onStartTyping(callback, options = {}) { 41943 const { document: document2 = defaultDocument } = options; 41944 const keydown = (event) => { 41945 !isFocusedElementEditable() && isTypedCharValid(event) && callback(event); 41946 }; 41947 if (document2) 41948 useEventListener(document2, "keydown", keydown, { passive: true }); 41949} 41950 41951function templateRef(key, initialValue = null) { 41952 const instance = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.getCurrentInstance)(); 41953 let _trigger = () => { 41954 }; 41955 const element = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.customRef)((track, trigger) => { 41956 _trigger = trigger; 41957 return { 41958 get() { 41959 var _a, _b; 41960 track(); 41961 return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue; 41962 }, 41963 set() { 41964 } 41965 }; 41966 }); 41967 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(_trigger); 41968 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.onUpdated)(_trigger); 41969 return element; 41970} 41971 41972function useMounted() { 41973 const isMounted = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 41974 const instance = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.getCurrentInstance)(); 41975 if (instance) { 41976 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.onMounted)(() => { 41977 isMounted.value = true; 41978 }, vue_demi__WEBPACK_IMPORTED_MODULE_1__.isVue2 ? void 0 : instance); 41979 } 41980 return isMounted; 41981} 41982 41983function useSupported(callback) { 41984 const isMounted = useMounted(); 41985 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 41986 isMounted.value; 41987 return Boolean(callback()); 41988 }); 41989} 41990 41991function useMutationObserver(target, callback, options = {}) { 41992 const { window = defaultWindow, ...mutationOptions } = options; 41993 let observer; 41994 const isSupported = useSupported(() => window && "MutationObserver" in window); 41995 const cleanup = () => { 41996 if (observer) { 41997 observer.disconnect(); 41998 observer = void 0; 41999 } 42000 }; 42001 const targets = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 42002 const value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 42003 const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.notNullish); 42004 return new Set(items); 42005 }); 42006 const stopWatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 42007 () => targets.value, 42008 (targets2) => { 42009 cleanup(); 42010 if (isSupported.value && targets2.size) { 42011 observer = new MutationObserver(callback); 42012 targets2.forEach((el) => observer.observe(el, mutationOptions)); 42013 } 42014 }, 42015 { immediate: true, flush: "post" } 42016 ); 42017 const takeRecords = () => { 42018 return observer == null ? void 0 : observer.takeRecords(); 42019 }; 42020 const stop = () => { 42021 cleanup(); 42022 stopWatch(); 42023 }; 42024 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(stop); 42025 return { 42026 isSupported, 42027 stop, 42028 takeRecords 42029 }; 42030} 42031 42032function useActiveElement(options = {}) { 42033 var _a; 42034 const { 42035 window = defaultWindow, 42036 deep = true, 42037 triggerOnRemoval = false 42038 } = options; 42039 const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document; 42040 const getDeepActiveElement = () => { 42041 var _a2; 42042 let element = document == null ? void 0 : document.activeElement; 42043 if (deep) { 42044 while (element == null ? void 0 : element.shadowRoot) 42045 element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement; 42046 } 42047 return element; 42048 }; 42049 const activeElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42050 const trigger = () => { 42051 activeElement.value = getDeepActiveElement(); 42052 }; 42053 if (window) { 42054 useEventListener(window, "blur", (event) => { 42055 if (event.relatedTarget !== null) 42056 return; 42057 trigger(); 42058 }, true); 42059 useEventListener(window, "focus", trigger, true); 42060 } 42061 if (triggerOnRemoval) { 42062 useMutationObserver(document, (mutations) => { 42063 mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => { 42064 if (node === activeElement.value) 42065 trigger(); 42066 }); 42067 }, { 42068 childList: true, 42069 subtree: true 42070 }); 42071 } 42072 trigger(); 42073 return activeElement; 42074} 42075 42076function useRafFn(fn, options = {}) { 42077 const { 42078 immediate = true, 42079 fpsLimit = void 0, 42080 window = defaultWindow 42081 } = options; 42082 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42083 const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null; 42084 let previousFrameTimestamp = 0; 42085 let rafId = null; 42086 function loop(timestamp) { 42087 if (!isActive.value || !window) 42088 return; 42089 if (!previousFrameTimestamp) 42090 previousFrameTimestamp = timestamp; 42091 const delta = timestamp - previousFrameTimestamp; 42092 if (intervalLimit && delta < intervalLimit) { 42093 rafId = window.requestAnimationFrame(loop); 42094 return; 42095 } 42096 previousFrameTimestamp = timestamp; 42097 fn({ delta, timestamp }); 42098 rafId = window.requestAnimationFrame(loop); 42099 } 42100 function resume() { 42101 if (!isActive.value && window) { 42102 isActive.value = true; 42103 previousFrameTimestamp = 0; 42104 rafId = window.requestAnimationFrame(loop); 42105 } 42106 } 42107 function pause() { 42108 isActive.value = false; 42109 if (rafId != null && window) { 42110 window.cancelAnimationFrame(rafId); 42111 rafId = null; 42112 } 42113 } 42114 if (immediate) 42115 resume(); 42116 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(pause); 42117 return { 42118 isActive: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(isActive), 42119 pause, 42120 resume 42121 }; 42122} 42123 42124function useAnimate(target, keyframes, options) { 42125 let config; 42126 let animateOptions; 42127 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(options)) { 42128 config = options; 42129 animateOptions = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectOmit)(options, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"]); 42130 } else { 42131 config = { duration: options }; 42132 animateOptions = options; 42133 } 42134 const { 42135 window = defaultWindow, 42136 immediate = true, 42137 commitStyles, 42138 persist, 42139 playbackRate: _playbackRate = 1, 42140 onReady, 42141 onError = (e) => { 42142 console.error(e); 42143 } 42144 } = config; 42145 const isSupported = useSupported(() => window && HTMLElement && "animate" in HTMLElement.prototype); 42146 const animate = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(void 0); 42147 const store = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowReactive)({ 42148 startTime: null, 42149 currentTime: null, 42150 timeline: null, 42151 playbackRate: _playbackRate, 42152 pending: false, 42153 playState: immediate ? "idle" : "paused", 42154 replaceState: "active" 42155 }); 42156 const pending = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => store.pending); 42157 const playState = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => store.playState); 42158 const replaceState = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => store.replaceState); 42159 const startTime = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 42160 get() { 42161 return store.startTime; 42162 }, 42163 set(value) { 42164 store.startTime = value; 42165 if (animate.value) 42166 animate.value.startTime = value; 42167 } 42168 }); 42169 const currentTime = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 42170 get() { 42171 return store.currentTime; 42172 }, 42173 set(value) { 42174 store.currentTime = value; 42175 if (animate.value) { 42176 animate.value.currentTime = value; 42177 syncResume(); 42178 } 42179 } 42180 }); 42181 const timeline = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 42182 get() { 42183 return store.timeline; 42184 }, 42185 set(value) { 42186 store.timeline = value; 42187 if (animate.value) 42188 animate.value.timeline = value; 42189 } 42190 }); 42191 const playbackRate = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 42192 get() { 42193 return store.playbackRate; 42194 }, 42195 set(value) { 42196 store.playbackRate = value; 42197 if (animate.value) 42198 animate.value.playbackRate = value; 42199 } 42200 }); 42201 const play = () => { 42202 if (animate.value) { 42203 try { 42204 animate.value.play(); 42205 syncResume(); 42206 } catch (e) { 42207 syncPause(); 42208 onError(e); 42209 } 42210 } else { 42211 update(); 42212 } 42213 }; 42214 const pause = () => { 42215 var _a; 42216 try { 42217 (_a = animate.value) == null ? void 0 : _a.pause(); 42218 syncPause(); 42219 } catch (e) { 42220 onError(e); 42221 } 42222 }; 42223 const reverse = () => { 42224 var _a; 42225 !animate.value && update(); 42226 try { 42227 (_a = animate.value) == null ? void 0 : _a.reverse(); 42228 syncResume(); 42229 } catch (e) { 42230 syncPause(); 42231 onError(e); 42232 } 42233 }; 42234 const finish = () => { 42235 var _a; 42236 try { 42237 (_a = animate.value) == null ? void 0 : _a.finish(); 42238 syncPause(); 42239 } catch (e) { 42240 onError(e); 42241 } 42242 }; 42243 const cancel = () => { 42244 var _a; 42245 try { 42246 (_a = animate.value) == null ? void 0 : _a.cancel(); 42247 syncPause(); 42248 } catch (e) { 42249 onError(e); 42250 } 42251 }; 42252 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => unrefElement(target), (el) => { 42253 el && update(); 42254 }); 42255 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => keyframes, (value) => { 42256 !animate.value && update(); 42257 if (!unrefElement(target) && animate.value) { 42258 animate.value.effect = new KeyframeEffect( 42259 unrefElement(target), 42260 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(value), 42261 animateOptions 42262 ); 42263 } 42264 }, { deep: true }); 42265 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 42266 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => update(true)); 42267 }); 42268 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(cancel); 42269 function update(init) { 42270 const el = unrefElement(target); 42271 if (!isSupported.value || !el) 42272 return; 42273 if (!animate.value) 42274 animate.value = el.animate((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(keyframes), animateOptions); 42275 if (persist) 42276 animate.value.persist(); 42277 if (_playbackRate !== 1) 42278 animate.value.playbackRate = _playbackRate; 42279 if (init && !immediate) 42280 animate.value.pause(); 42281 else 42282 syncResume(); 42283 onReady == null ? void 0 : onReady(animate.value); 42284 } 42285 useEventListener(animate, ["cancel", "finish", "remove"], syncPause); 42286 useEventListener(animate, "finish", () => { 42287 var _a; 42288 if (commitStyles) 42289 (_a = animate.value) == null ? void 0 : _a.commitStyles(); 42290 }); 42291 const { resume: resumeRef, pause: pauseRef } = useRafFn(() => { 42292 if (!animate.value) 42293 return; 42294 store.pending = animate.value.pending; 42295 store.playState = animate.value.playState; 42296 store.replaceState = animate.value.replaceState; 42297 store.startTime = animate.value.startTime; 42298 store.currentTime = animate.value.currentTime; 42299 store.timeline = animate.value.timeline; 42300 store.playbackRate = animate.value.playbackRate; 42301 }, { immediate: false }); 42302 function syncResume() { 42303 if (isSupported.value) 42304 resumeRef(); 42305 } 42306 function syncPause() { 42307 if (isSupported.value && window) 42308 window.requestAnimationFrame(pauseRef); 42309 } 42310 return { 42311 isSupported, 42312 animate, 42313 // actions 42314 play, 42315 pause, 42316 reverse, 42317 finish, 42318 cancel, 42319 // state 42320 pending, 42321 playState, 42322 replaceState, 42323 startTime, 42324 currentTime, 42325 timeline, 42326 playbackRate 42327 }; 42328} 42329 42330function useAsyncQueue(tasks, options) { 42331 const { 42332 interrupt = true, 42333 onError = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 42334 onFinished = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 42335 signal 42336 } = options || {}; 42337 const promiseState = { 42338 aborted: "aborted", 42339 fulfilled: "fulfilled", 42340 pending: "pending", 42341 rejected: "rejected" 42342 }; 42343 const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null })); 42344 const result = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(initialResult); 42345 const activeIndex = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(-1); 42346 if (!tasks || tasks.length === 0) { 42347 onFinished(); 42348 return { 42349 activeIndex, 42350 result 42351 }; 42352 } 42353 function updateResult(state, res) { 42354 activeIndex.value++; 42355 result[activeIndex.value].data = res; 42356 result[activeIndex.value].state = state; 42357 } 42358 tasks.reduce((prev, curr) => { 42359 return prev.then((prevRes) => { 42360 var _a; 42361 if (signal == null ? void 0 : signal.aborted) { 42362 updateResult(promiseState.aborted, new Error("aborted")); 42363 return; 42364 } 42365 if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) { 42366 onFinished(); 42367 return; 42368 } 42369 const done = curr(prevRes).then((currentRes) => { 42370 updateResult(promiseState.fulfilled, currentRes); 42371 activeIndex.value === tasks.length - 1 && onFinished(); 42372 return currentRes; 42373 }); 42374 if (!signal) 42375 return done; 42376 return Promise.race([done, whenAborted(signal)]); 42377 }).catch((e) => { 42378 if (signal == null ? void 0 : signal.aborted) { 42379 updateResult(promiseState.aborted, e); 42380 return e; 42381 } 42382 updateResult(promiseState.rejected, e); 42383 onError(); 42384 return e; 42385 }); 42386 }, Promise.resolve()); 42387 return { 42388 activeIndex, 42389 result 42390 }; 42391} 42392function whenAborted(signal) { 42393 return new Promise((resolve, reject) => { 42394 const error = new Error("aborted"); 42395 if (signal.aborted) 42396 reject(error); 42397 else 42398 signal.addEventListener("abort", () => reject(error), { once: true }); 42399 }); 42400} 42401 42402function useAsyncState(promise, initialState, options) { 42403 const { 42404 immediate = true, 42405 delay = 0, 42406 onError = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 42407 onSuccess = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 42408 resetOnExecute = true, 42409 shallow = true, 42410 throwError 42411 } = options != null ? options : {}; 42412 const state = shallow ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(initialState) : (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialState); 42413 const isReady = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42414 const isLoading = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42415 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(void 0); 42416 async function execute(delay2 = 0, ...args) { 42417 if (resetOnExecute) 42418 state.value = initialState; 42419 error.value = void 0; 42420 isReady.value = false; 42421 isLoading.value = true; 42422 if (delay2 > 0) 42423 await (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.promiseTimeout)(delay2); 42424 const _promise = typeof promise === "function" ? promise(...args) : promise; 42425 try { 42426 const data = await _promise; 42427 state.value = data; 42428 isReady.value = true; 42429 onSuccess(data); 42430 } catch (e) { 42431 error.value = e; 42432 onError(e); 42433 if (throwError) 42434 throw e; 42435 } finally { 42436 isLoading.value = false; 42437 } 42438 return state.value; 42439 } 42440 if (immediate) 42441 execute(delay); 42442 const shell = { 42443 state, 42444 isReady, 42445 isLoading, 42446 error, 42447 execute 42448 }; 42449 function waitUntilIsLoaded() { 42450 return new Promise((resolve, reject) => { 42451 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.until)(isLoading).toBe(false).then(() => resolve(shell)).catch(reject); 42452 }); 42453 } 42454 return { 42455 ...shell, 42456 then(onFulfilled, onRejected) { 42457 return waitUntilIsLoaded().then(onFulfilled, onRejected); 42458 } 42459 }; 42460} 42461 42462const defaults = { 42463 array: (v) => JSON.stringify(v), 42464 object: (v) => JSON.stringify(v), 42465 set: (v) => JSON.stringify(Array.from(v)), 42466 map: (v) => JSON.stringify(Object.fromEntries(v)), 42467 null: () => "" 42468}; 42469function getDefaultSerialization(target) { 42470 if (!target) 42471 return defaults.null; 42472 if (target instanceof Map) 42473 return defaults.map; 42474 else if (target instanceof Set) 42475 return defaults.set; 42476 else if (Array.isArray(target)) 42477 return defaults.array; 42478 else 42479 return defaults.object; 42480} 42481 42482function useBase64(target, options) { 42483 const base64 = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 42484 const promise = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42485 function execute() { 42486 if (!_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) 42487 return; 42488 promise.value = new Promise((resolve, reject) => { 42489 try { 42490 const _target = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 42491 if (_target == null) { 42492 resolve(""); 42493 } else if (typeof _target === "string") { 42494 resolve(blobToBase64(new Blob([_target], { type: "text/plain" }))); 42495 } else if (_target instanceof Blob) { 42496 resolve(blobToBase64(_target)); 42497 } else if (_target instanceof ArrayBuffer) { 42498 resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target)))); 42499 } else if (_target instanceof HTMLCanvasElement) { 42500 resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); 42501 } else if (_target instanceof HTMLImageElement) { 42502 const img = _target.cloneNode(false); 42503 img.crossOrigin = "Anonymous"; 42504 imgLoaded(img).then(() => { 42505 const canvas = document.createElement("canvas"); 42506 const ctx = canvas.getContext("2d"); 42507 canvas.width = img.width; 42508 canvas.height = img.height; 42509 ctx.drawImage(img, 0, 0, canvas.width, canvas.height); 42510 resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); 42511 }).catch(reject); 42512 } else if (typeof _target === "object") { 42513 const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target); 42514 const serialized = _serializeFn(_target); 42515 return resolve(blobToBase64(new Blob([serialized], { type: "application/json" }))); 42516 } else { 42517 reject(new Error("target is unsupported types")); 42518 } 42519 } catch (error) { 42520 reject(error); 42521 } 42522 }); 42523 promise.value.then((res) => base64.value = res); 42524 return promise.value; 42525 } 42526 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(target) || typeof target === "function") 42527 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(target, execute, { immediate: true }); 42528 else 42529 execute(); 42530 return { 42531 base64, 42532 promise, 42533 execute 42534 }; 42535} 42536function imgLoaded(img) { 42537 return new Promise((resolve, reject) => { 42538 if (!img.complete) { 42539 img.onload = () => { 42540 resolve(); 42541 }; 42542 img.onerror = reject; 42543 } else { 42544 resolve(); 42545 } 42546 }); 42547} 42548function blobToBase64(blob) { 42549 return new Promise((resolve, reject) => { 42550 const fr = new FileReader(); 42551 fr.onload = (e) => { 42552 resolve(e.target.result); 42553 }; 42554 fr.onerror = reject; 42555 fr.readAsDataURL(blob); 42556 }); 42557} 42558 42559function useBattery(options = {}) { 42560 const { navigator = defaultNavigator } = options; 42561 const events = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"]; 42562 const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function"); 42563 const charging = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42564 const chargingTime = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 42565 const dischargingTime = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 42566 const level = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(1); 42567 let battery; 42568 function updateBatteryInfo() { 42569 charging.value = this.charging; 42570 chargingTime.value = this.chargingTime || 0; 42571 dischargingTime.value = this.dischargingTime || 0; 42572 level.value = this.level; 42573 } 42574 if (isSupported.value) { 42575 navigator.getBattery().then((_battery) => { 42576 battery = _battery; 42577 updateBatteryInfo.call(battery); 42578 useEventListener(battery, events, updateBatteryInfo, { passive: true }); 42579 }); 42580 } 42581 return { 42582 isSupported, 42583 charging, 42584 chargingTime, 42585 dischargingTime, 42586 level 42587 }; 42588} 42589 42590function useBluetooth(options) { 42591 let { 42592 acceptAllDevices = false 42593 } = options || {}; 42594 const { 42595 filters = void 0, 42596 optionalServices = void 0, 42597 navigator = defaultNavigator 42598 } = options || {}; 42599 const isSupported = useSupported(() => navigator && "bluetooth" in navigator); 42600 const device = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(void 0); 42601 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 42602 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(device, () => { 42603 connectToBluetoothGATTServer(); 42604 }); 42605 async function requestDevice() { 42606 if (!isSupported.value) 42607 return; 42608 error.value = null; 42609 if (filters && filters.length > 0) 42610 acceptAllDevices = false; 42611 try { 42612 device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({ 42613 acceptAllDevices, 42614 filters, 42615 optionalServices 42616 })); 42617 } catch (err) { 42618 error.value = err; 42619 } 42620 } 42621 const server = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42622 const isConnected = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 42623 var _a; 42624 return ((_a = server.value) == null ? void 0 : _a.connected) || false; 42625 }); 42626 async function connectToBluetoothGATTServer() { 42627 error.value = null; 42628 if (device.value && device.value.gatt) { 42629 device.value.addEventListener("gattserverdisconnected", () => { 42630 }); 42631 try { 42632 server.value = await device.value.gatt.connect(); 42633 } catch (err) { 42634 error.value = err; 42635 } 42636 } 42637 } 42638 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 42639 var _a; 42640 if (device.value) 42641 (_a = device.value.gatt) == null ? void 0 : _a.connect(); 42642 }); 42643 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 42644 var _a; 42645 if (device.value) 42646 (_a = device.value.gatt) == null ? void 0 : _a.disconnect(); 42647 }); 42648 return { 42649 isSupported, 42650 isConnected, 42651 // Device: 42652 device, 42653 requestDevice, 42654 // Server: 42655 server, 42656 // Errors: 42657 error 42658 }; 42659} 42660 42661function useMediaQuery(query, options = {}) { 42662 const { window = defaultWindow } = options; 42663 const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function"); 42664 let mediaQuery; 42665 const matches = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42666 const handler = (event) => { 42667 matches.value = event.matches; 42668 }; 42669 const cleanup = () => { 42670 if (!mediaQuery) 42671 return; 42672 if ("removeEventListener" in mediaQuery) 42673 mediaQuery.removeEventListener("change", handler); 42674 else 42675 mediaQuery.removeListener(handler); 42676 }; 42677 const stopWatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watchEffect)(() => { 42678 if (!isSupported.value) 42679 return; 42680 cleanup(); 42681 mediaQuery = window.matchMedia((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(query)); 42682 if ("addEventListener" in mediaQuery) 42683 mediaQuery.addEventListener("change", handler); 42684 else 42685 mediaQuery.addListener(handler); 42686 matches.value = mediaQuery.matches; 42687 }); 42688 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 42689 stopWatch(); 42690 cleanup(); 42691 mediaQuery = void 0; 42692 }); 42693 return matches; 42694} 42695 42696const breakpointsTailwind = { 42697 "sm": 640, 42698 "md": 768, 42699 "lg": 1024, 42700 "xl": 1280, 42701 "2xl": 1536 42702}; 42703const breakpointsBootstrapV5 = { 42704 xs: 0, 42705 sm: 576, 42706 md: 768, 42707 lg: 992, 42708 xl: 1200, 42709 xxl: 1400 42710}; 42711const breakpointsVuetifyV2 = { 42712 xs: 0, 42713 sm: 600, 42714 md: 960, 42715 lg: 1264, 42716 xl: 1904 42717}; 42718const breakpointsVuetifyV3 = { 42719 xs: 0, 42720 sm: 600, 42721 md: 960, 42722 lg: 1280, 42723 xl: 1920, 42724 xxl: 2560 42725}; 42726const breakpointsVuetify = breakpointsVuetifyV2; 42727const breakpointsAntDesign = { 42728 xs: 480, 42729 sm: 576, 42730 md: 768, 42731 lg: 992, 42732 xl: 1200, 42733 xxl: 1600 42734}; 42735const breakpointsQuasar = { 42736 xs: 0, 42737 sm: 600, 42738 md: 1024, 42739 lg: 1440, 42740 xl: 1920 42741}; 42742const breakpointsSematic = { 42743 mobileS: 320, 42744 mobileM: 375, 42745 mobileL: 425, 42746 tablet: 768, 42747 laptop: 1024, 42748 laptopL: 1440, 42749 desktop4K: 2560 42750}; 42751const breakpointsMasterCss = { 42752 "3xs": 360, 42753 "2xs": 480, 42754 "xs": 600, 42755 "sm": 768, 42756 "md": 1024, 42757 "lg": 1280, 42758 "xl": 1440, 42759 "2xl": 1600, 42760 "3xl": 1920, 42761 "4xl": 2560 42762}; 42763const breakpointsPrimeFlex = { 42764 sm: 576, 42765 md: 768, 42766 lg: 992, 42767 xl: 1200 42768}; 42769 42770function useBreakpoints(breakpoints, options = {}) { 42771 function getValue(k, delta) { 42772 let v = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(breakpoints[(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(k)]); 42773 if (delta != null) 42774 v = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.increaseWithUnit)(v, delta); 42775 if (typeof v === "number") 42776 v = `${v}px`; 42777 return v; 42778 } 42779 const { window = defaultWindow, strategy = "min-width" } = options; 42780 function match(query) { 42781 if (!window) 42782 return false; 42783 return window.matchMedia(query).matches; 42784 } 42785 const greaterOrEqual = (k) => { 42786 return useMediaQuery(() => `(min-width: ${getValue(k)})`, options); 42787 }; 42788 const smallerOrEqual = (k) => { 42789 return useMediaQuery(() => `(max-width: ${getValue(k)})`, options); 42790 }; 42791 const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => { 42792 Object.defineProperty(shortcuts, k, { 42793 get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k), 42794 enumerable: true, 42795 configurable: true 42796 }); 42797 return shortcuts; 42798 }, {}); 42799 function current() { 42800 const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]); 42801 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => points.filter(([, v]) => v.value).map(([k]) => k)); 42802 } 42803 return Object.assign(shortcutMethods, { 42804 greaterOrEqual, 42805 smallerOrEqual, 42806 greater(k) { 42807 return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options); 42808 }, 42809 smaller(k) { 42810 return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options); 42811 }, 42812 between(a, b) { 42813 return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options); 42814 }, 42815 isGreater(k) { 42816 return match(`(min-width: ${getValue(k, 0.1)})`); 42817 }, 42818 isGreaterOrEqual(k) { 42819 return match(`(min-width: ${getValue(k)})`); 42820 }, 42821 isSmaller(k) { 42822 return match(`(max-width: ${getValue(k, -0.1)})`); 42823 }, 42824 isSmallerOrEqual(k) { 42825 return match(`(max-width: ${getValue(k)})`); 42826 }, 42827 isInBetween(a, b) { 42828 return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`); 42829 }, 42830 current, 42831 active() { 42832 const bps = current(); 42833 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => bps.value.length === 0 ? "" : bps.value.at(-1)); 42834 } 42835 }); 42836} 42837 42838function useBroadcastChannel(options) { 42839 const { 42840 name, 42841 window = defaultWindow 42842 } = options; 42843 const isSupported = useSupported(() => window && "BroadcastChannel" in window); 42844 const isClosed = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42845 const channel = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42846 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42847 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 42848 const post = (data2) => { 42849 if (channel.value) 42850 channel.value.postMessage(data2); 42851 }; 42852 const close = () => { 42853 if (channel.value) 42854 channel.value.close(); 42855 isClosed.value = true; 42856 }; 42857 if (isSupported.value) { 42858 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 42859 error.value = null; 42860 channel.value = new BroadcastChannel(name); 42861 channel.value.addEventListener("message", (e) => { 42862 data.value = e.data; 42863 }, { passive: true }); 42864 channel.value.addEventListener("messageerror", (e) => { 42865 error.value = e; 42866 }, { passive: true }); 42867 channel.value.addEventListener("close", () => { 42868 isClosed.value = true; 42869 }); 42870 }); 42871 } 42872 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 42873 close(); 42874 }); 42875 return { 42876 isSupported, 42877 channel, 42878 data, 42879 post, 42880 close, 42881 error, 42882 isClosed 42883 }; 42884} 42885 42886const WRITABLE_PROPERTIES = [ 42887 "hash", 42888 "host", 42889 "hostname", 42890 "href", 42891 "pathname", 42892 "port", 42893 "protocol", 42894 "search" 42895]; 42896function useBrowserLocation(options = {}) { 42897 const { window = defaultWindow } = options; 42898 const refs = Object.fromEntries( 42899 WRITABLE_PROPERTIES.map((key) => [key, (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)()]) 42900 ); 42901 for (const [key, ref2] of (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectEntries)(refs)) { 42902 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(ref2, (value) => { 42903 if (!(window == null ? void 0 : window.location) || window.location[key] === value) 42904 return; 42905 window.location[key] = value; 42906 }); 42907 } 42908 const buildState = (trigger) => { 42909 var _a; 42910 const { state: state2, length } = (window == null ? void 0 : window.history) || {}; 42911 const { origin } = (window == null ? void 0 : window.location) || {}; 42912 for (const key of WRITABLE_PROPERTIES) 42913 refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key]; 42914 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ 42915 trigger, 42916 state: state2, 42917 length, 42918 origin, 42919 ...refs 42920 }); 42921 }; 42922 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(buildState("load")); 42923 if (window) { 42924 useEventListener(window, "popstate", () => state.value = buildState("popstate"), { passive: true }); 42925 useEventListener(window, "hashchange", () => state.value = buildState("hashchange"), { passive: true }); 42926 } 42927 return state; 42928} 42929 42930function useCached(refValue, comparator = (a, b) => a === b, watchOptions) { 42931 const cachedValue = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(refValue.value); 42932 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => refValue.value, (value) => { 42933 if (!comparator(value, cachedValue.value)) 42934 cachedValue.value = value; 42935 }, watchOptions); 42936 return cachedValue; 42937} 42938 42939function usePermission(permissionDesc, options = {}) { 42940 const { 42941 controls = false, 42942 navigator = defaultNavigator 42943 } = options; 42944 const isSupported = useSupported(() => navigator && "permissions" in navigator); 42945 let permissionStatus; 42946 const desc = typeof permissionDesc === "string" ? { name: permissionDesc } : permissionDesc; 42947 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 42948 const onChange = () => { 42949 if (permissionStatus) 42950 state.value = permissionStatus.state; 42951 }; 42952 const query = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createSingletonPromise)(async () => { 42953 if (!isSupported.value) 42954 return; 42955 if (!permissionStatus) { 42956 try { 42957 permissionStatus = await navigator.permissions.query(desc); 42958 useEventListener(permissionStatus, "change", onChange); 42959 onChange(); 42960 } catch (e) { 42961 state.value = "prompt"; 42962 } 42963 } 42964 return permissionStatus; 42965 }); 42966 query(); 42967 if (controls) { 42968 return { 42969 state, 42970 isSupported, 42971 query 42972 }; 42973 } else { 42974 return state; 42975 } 42976} 42977 42978function useClipboard(options = {}) { 42979 const { 42980 navigator = defaultNavigator, 42981 read = false, 42982 source, 42983 copiedDuring = 1500, 42984 legacy = false 42985 } = options; 42986 const isClipboardApiSupported = useSupported(() => navigator && "clipboard" in navigator); 42987 const permissionRead = usePermission("clipboard-read"); 42988 const permissionWrite = usePermission("clipboard-write"); 42989 const isSupported = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => isClipboardApiSupported.value || legacy); 42990 const text = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 42991 const copied = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 42992 const timeout = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeoutFn)(() => copied.value = false, copiedDuring); 42993 function updateText() { 42994 if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) { 42995 navigator.clipboard.readText().then((value) => { 42996 text.value = value; 42997 }); 42998 } else { 42999 text.value = legacyRead(); 43000 } 43001 } 43002 if (isSupported.value && read) 43003 useEventListener(["copy", "cut"], updateText); 43004 async function copy(value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)) { 43005 if (isSupported.value && value != null) { 43006 if (isClipboardApiSupported.value && isAllowed(permissionWrite.value)) 43007 await navigator.clipboard.writeText(value); 43008 else 43009 legacyCopy(value); 43010 text.value = value; 43011 copied.value = true; 43012 timeout.start(); 43013 } 43014 } 43015 function legacyCopy(value) { 43016 const ta = document.createElement("textarea"); 43017 ta.value = value != null ? value : ""; 43018 ta.style.position = "absolute"; 43019 ta.style.opacity = "0"; 43020 document.body.appendChild(ta); 43021 ta.select(); 43022 document.execCommand("copy"); 43023 ta.remove(); 43024 } 43025 function legacyRead() { 43026 var _a, _b, _c; 43027 return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : ""; 43028 } 43029 function isAllowed(status) { 43030 return status === "granted" || status === "prompt"; 43031 } 43032 return { 43033 isSupported, 43034 text, 43035 copied, 43036 copy 43037 }; 43038} 43039 43040function useClipboardItems(options = {}) { 43041 const { 43042 navigator = defaultNavigator, 43043 read = false, 43044 source, 43045 copiedDuring = 1500 43046 } = options; 43047 const isSupported = useSupported(() => navigator && "clipboard" in navigator); 43048 const content = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 43049 const copied = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 43050 const timeout = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeoutFn)(() => copied.value = false, copiedDuring); 43051 function updateContent() { 43052 if (isSupported.value) { 43053 navigator.clipboard.read().then((items) => { 43054 content.value = items; 43055 }); 43056 } 43057 } 43058 if (isSupported.value && read) 43059 useEventListener(["copy", "cut"], updateContent); 43060 async function copy(value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)) { 43061 if (isSupported.value && value != null) { 43062 await navigator.clipboard.write(value); 43063 content.value = value; 43064 copied.value = true; 43065 timeout.start(); 43066 } 43067 } 43068 return { 43069 isSupported, 43070 content, 43071 copied, 43072 copy 43073 }; 43074} 43075 43076function cloneFnJSON(source) { 43077 return JSON.parse(JSON.stringify(source)); 43078} 43079function useCloned(source, options = {}) { 43080 const cloned = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({}); 43081 const { 43082 manual, 43083 clone = cloneFnJSON, 43084 // watch options 43085 deep = true, 43086 immediate = true 43087 } = options; 43088 function sync() { 43089 cloned.value = clone((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)); 43090 } 43091 if (!manual && ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(source) || typeof source === "function")) { 43092 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(source, sync, { 43093 ...options, 43094 deep, 43095 immediate 43096 }); 43097 } else { 43098 sync(); 43099 } 43100 return { cloned, sync }; 43101} 43102 43103const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; 43104const globalKey = "__vueuse_ssr_handlers__"; 43105const handlers = /* @__PURE__ */ getHandlers(); 43106function getHandlers() { 43107 if (!(globalKey in _global)) 43108 _global[globalKey] = _global[globalKey] || {}; 43109 return _global[globalKey]; 43110} 43111function getSSRHandler(key, fallback) { 43112 return handlers[key] || fallback; 43113} 43114function setSSRHandler(key, fn) { 43115 handlers[key] = fn; 43116} 43117 43118function guessSerializerType(rawInit) { 43119 return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any"; 43120} 43121 43122const StorageSerializers = { 43123 boolean: { 43124 read: (v) => v === "true", 43125 write: (v) => String(v) 43126 }, 43127 object: { 43128 read: (v) => JSON.parse(v), 43129 write: (v) => JSON.stringify(v) 43130 }, 43131 number: { 43132 read: (v) => Number.parseFloat(v), 43133 write: (v) => String(v) 43134 }, 43135 any: { 43136 read: (v) => v, 43137 write: (v) => String(v) 43138 }, 43139 string: { 43140 read: (v) => v, 43141 write: (v) => String(v) 43142 }, 43143 map: { 43144 read: (v) => new Map(JSON.parse(v)), 43145 write: (v) => JSON.stringify(Array.from(v.entries())) 43146 }, 43147 set: { 43148 read: (v) => new Set(JSON.parse(v)), 43149 write: (v) => JSON.stringify(Array.from(v)) 43150 }, 43151 date: { 43152 read: (v) => new Date(v), 43153 write: (v) => v.toISOString() 43154 } 43155}; 43156const customStorageEventName = "vueuse-storage"; 43157function useStorage(key, defaults, storage, options = {}) { 43158 var _a; 43159 const { 43160 flush = "pre", 43161 deep = true, 43162 listenToStorageChanges = true, 43163 writeDefaults = true, 43164 mergeDefaults = false, 43165 shallow, 43166 window = defaultWindow, 43167 eventFilter, 43168 onError = (e) => { 43169 console.error(e); 43170 }, 43171 initOnMounted 43172 } = options; 43173 const data = (shallow ? vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef : vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(typeof defaults === "function" ? defaults() : defaults); 43174 if (!storage) { 43175 try { 43176 storage = getSSRHandler("getDefaultStorage", () => { 43177 var _a2; 43178 return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; 43179 })(); 43180 } catch (e) { 43181 onError(e); 43182 } 43183 } 43184 if (!storage) 43185 return data; 43186 const rawInit = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(defaults); 43187 const type = guessSerializerType(rawInit); 43188 const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; 43189 const { pause: pauseWatch, resume: resumeWatch } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.pausableWatch)( 43190 data, 43191 () => write(data.value), 43192 { flush, deep, eventFilter } 43193 ); 43194 if (window && listenToStorageChanges) { 43195 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 43196 useEventListener(window, "storage", update); 43197 useEventListener(window, customStorageEventName, updateFromCustomEvent); 43198 if (initOnMounted) 43199 update(); 43200 }); 43201 } 43202 if (!initOnMounted) 43203 update(); 43204 function dispatchWriteEvent(oldValue, newValue) { 43205 if (window) { 43206 window.dispatchEvent(new CustomEvent(customStorageEventName, { 43207 detail: { 43208 key, 43209 oldValue, 43210 newValue, 43211 storageArea: storage 43212 } 43213 })); 43214 } 43215 } 43216 function write(v) { 43217 try { 43218 const oldValue = storage.getItem(key); 43219 if (v == null) { 43220 dispatchWriteEvent(oldValue, null); 43221 storage.removeItem(key); 43222 } else { 43223 const serialized = serializer.write(v); 43224 if (oldValue !== serialized) { 43225 storage.setItem(key, serialized); 43226 dispatchWriteEvent(oldValue, serialized); 43227 } 43228 } 43229 } catch (e) { 43230 onError(e); 43231 } 43232 } 43233 function read(event) { 43234 const rawValue = event ? event.newValue : storage.getItem(key); 43235 if (rawValue == null) { 43236 if (writeDefaults && rawInit != null) 43237 storage.setItem(key, serializer.write(rawInit)); 43238 return rawInit; 43239 } else if (!event && mergeDefaults) { 43240 const value = serializer.read(rawValue); 43241 if (typeof mergeDefaults === "function") 43242 return mergeDefaults(value, rawInit); 43243 else if (type === "object" && !Array.isArray(value)) 43244 return { ...rawInit, ...value }; 43245 return value; 43246 } else if (typeof rawValue !== "string") { 43247 return rawValue; 43248 } else { 43249 return serializer.read(rawValue); 43250 } 43251 } 43252 function update(event) { 43253 if (event && event.storageArea !== storage) 43254 return; 43255 if (event && event.key == null) { 43256 data.value = rawInit; 43257 return; 43258 } 43259 if (event && event.key !== key) 43260 return; 43261 pauseWatch(); 43262 try { 43263 if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value)) 43264 data.value = read(event); 43265 } catch (e) { 43266 onError(e); 43267 } finally { 43268 if (event) 43269 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.nextTick)(resumeWatch); 43270 else 43271 resumeWatch(); 43272 } 43273 } 43274 function updateFromCustomEvent(event) { 43275 update(event.detail); 43276 } 43277 return data; 43278} 43279 43280function usePreferredDark(options) { 43281 return useMediaQuery("(prefers-color-scheme: dark)", options); 43282} 43283 43284function useColorMode(options = {}) { 43285 const { 43286 selector = "html", 43287 attribute = "class", 43288 initialValue = "auto", 43289 window = defaultWindow, 43290 storage, 43291 storageKey = "vueuse-color-scheme", 43292 listenToStorageChanges = true, 43293 storageRef, 43294 emitAuto, 43295 disableTransition = true 43296 } = options; 43297 const modes = { 43298 auto: "", 43299 light: "light", 43300 dark: "dark", 43301 ...options.modes || {} 43302 }; 43303 const preferredDark = usePreferredDark({ window }); 43304 const system = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => preferredDark.value ? "dark" : "light"); 43305 const store = storageRef || (storageKey == null ? (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges })); 43306 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => store.value === "auto" ? system.value : store.value); 43307 const updateHTMLAttrs = getSSRHandler( 43308 "updateHTMLAttrs", 43309 (selector2, attribute2, value) => { 43310 const el = typeof selector2 === "string" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2); 43311 if (!el) 43312 return; 43313 let style; 43314 if (disableTransition) { 43315 style = window.document.createElement("style"); 43316 const styleString = "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"; 43317 style.appendChild(document.createTextNode(styleString)); 43318 window.document.head.appendChild(style); 43319 } 43320 if (attribute2 === "class") { 43321 const current = value.split(/\s/g); 43322 Object.values(modes).flatMap((i) => (i || "").split(/\s/g)).filter(Boolean).forEach((v) => { 43323 if (current.includes(v)) 43324 el.classList.add(v); 43325 else 43326 el.classList.remove(v); 43327 }); 43328 } else { 43329 el.setAttribute(attribute2, value); 43330 } 43331 if (disableTransition) { 43332 window.getComputedStyle(style).opacity; 43333 document.head.removeChild(style); 43334 } 43335 } 43336 ); 43337 function defaultOnChanged(mode) { 43338 var _a; 43339 updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode); 43340 } 43341 function onChanged(mode) { 43342 if (options.onChanged) 43343 options.onChanged(mode, defaultOnChanged); 43344 else 43345 defaultOnChanged(mode); 43346 } 43347 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(state, onChanged, { flush: "post", immediate: true }); 43348 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => onChanged(state.value)); 43349 const auto = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 43350 get() { 43351 return emitAuto ? store.value : state.value; 43352 }, 43353 set(v) { 43354 store.value = v; 43355 } 43356 }); 43357 try { 43358 return Object.assign(auto, { store, system, state }); 43359 } catch (e) { 43360 return auto; 43361 } 43362} 43363 43364function useConfirmDialog(revealed = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false)) { 43365 const confirmHook = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 43366 const cancelHook = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 43367 const revealHook = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 43368 let _resolve = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 43369 const reveal = (data) => { 43370 revealHook.trigger(data); 43371 revealed.value = true; 43372 return new Promise((resolve) => { 43373 _resolve = resolve; 43374 }); 43375 }; 43376 const confirm = (data) => { 43377 revealed.value = false; 43378 confirmHook.trigger(data); 43379 _resolve({ data, isCanceled: false }); 43380 }; 43381 const cancel = (data) => { 43382 revealed.value = false; 43383 cancelHook.trigger(data); 43384 _resolve({ data, isCanceled: true }); 43385 }; 43386 return { 43387 isRevealed: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => revealed.value), 43388 reveal, 43389 confirm, 43390 cancel, 43391 onReveal: revealHook.on, 43392 onConfirm: confirmHook.on, 43393 onCancel: cancelHook.on 43394 }; 43395} 43396 43397function useCssVar(prop, target, options = {}) { 43398 const { window = defaultWindow, initialValue = "", observe = false } = options; 43399 const variable = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue); 43400 const elRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 43401 var _a; 43402 return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement); 43403 }); 43404 function updateCssVar() { 43405 var _a; 43406 const key = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(prop); 43407 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(elRef); 43408 if (el && window) { 43409 const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim(); 43410 variable.value = value || initialValue; 43411 } 43412 } 43413 if (observe) { 43414 useMutationObserver(elRef, updateCssVar, { 43415 attributeFilter: ["style", "class"], 43416 window 43417 }); 43418 } 43419 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 43420 [elRef, () => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(prop)], 43421 updateCssVar, 43422 { immediate: true } 43423 ); 43424 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 43425 variable, 43426 (val) => { 43427 var _a; 43428 if ((_a = elRef.value) == null ? void 0 : _a.style) 43429 elRef.value.style.setProperty((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(prop), val); 43430 } 43431 ); 43432 return variable; 43433} 43434 43435function useCurrentElement(rootComponent) { 43436 const vm = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.getCurrentInstance)(); 43437 const currentElement = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.computedWithControl)( 43438 () => null, 43439 () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el 43440 ); 43441 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.onUpdated)(currentElement.trigger); 43442 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.onMounted)(currentElement.trigger); 43443 return currentElement; 43444} 43445 43446function useCycleList(list, options) { 43447 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(getInitialValue()); 43448 const listRef = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(list); 43449 const index = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 43450 get() { 43451 var _a; 43452 const targetList = listRef.value; 43453 let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value); 43454 if (index2 < 0) 43455 index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0; 43456 return index2; 43457 }, 43458 set(v) { 43459 set(v); 43460 } 43461 }); 43462 function set(i) { 43463 const targetList = listRef.value; 43464 const length = targetList.length; 43465 const index2 = (i % length + length) % length; 43466 const value = targetList[index2]; 43467 state.value = value; 43468 return value; 43469 } 43470 function shift(delta = 1) { 43471 return set(index.value + delta); 43472 } 43473 function next(n = 1) { 43474 return shift(n); 43475 } 43476 function prev(n = 1) { 43477 return shift(-n); 43478 } 43479 function getInitialValue() { 43480 var _a, _b; 43481 return (_b = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)((_a = options == null ? void 0 : options.initialValue) != null ? _a : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(list)[0])) != null ? _b : void 0; 43482 } 43483 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(listRef, () => set(index.value)); 43484 return { 43485 state, 43486 index, 43487 next, 43488 prev, 43489 go: set 43490 }; 43491} 43492 43493function useDark(options = {}) { 43494 const { 43495 valueDark = "dark", 43496 valueLight = "", 43497 window = defaultWindow 43498 } = options; 43499 const mode = useColorMode({ 43500 ...options, 43501 onChanged: (mode2, defaultHandler) => { 43502 var _a; 43503 if (options.onChanged) 43504 (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === "dark", defaultHandler, mode2); 43505 else 43506 defaultHandler(mode2); 43507 }, 43508 modes: { 43509 dark: valueDark, 43510 light: valueLight 43511 } 43512 }); 43513 const system = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 43514 if (mode.system) { 43515 return mode.system.value; 43516 } else { 43517 const preferredDark = usePreferredDark({ window }); 43518 return preferredDark.value ? "dark" : "light"; 43519 } 43520 }); 43521 const isDark = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 43522 get() { 43523 return mode.value === "dark"; 43524 }, 43525 set(v) { 43526 const modeVal = v ? "dark" : "light"; 43527 if (system.value === modeVal) 43528 mode.value = "auto"; 43529 else 43530 mode.value = modeVal; 43531 } 43532 }); 43533 return isDark; 43534} 43535 43536function fnBypass(v) { 43537 return v; 43538} 43539function fnSetSource(source, value) { 43540 return source.value = value; 43541} 43542function defaultDump(clone) { 43543 return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; 43544} 43545function defaultParse(clone) { 43546 return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; 43547} 43548function useManualRefHistory(source, options = {}) { 43549 const { 43550 clone = false, 43551 dump = defaultDump(clone), 43552 parse = defaultParse(clone), 43553 setSource = fnSetSource 43554 } = options; 43555 function _createHistoryRecord() { 43556 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.markRaw)({ 43557 snapshot: dump(source.value), 43558 timestamp: (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp)() 43559 }); 43560 } 43561 const last = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(_createHistoryRecord()); 43562 const undoStack = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 43563 const redoStack = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 43564 const _setSource = (record) => { 43565 setSource(source, parse(record.snapshot)); 43566 last.value = record; 43567 }; 43568 const commit = () => { 43569 undoStack.value.unshift(last.value); 43570 last.value = _createHistoryRecord(); 43571 if (options.capacity && undoStack.value.length > options.capacity) 43572 undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY); 43573 if (redoStack.value.length) 43574 redoStack.value.splice(0, redoStack.value.length); 43575 }; 43576 const clear = () => { 43577 undoStack.value.splice(0, undoStack.value.length); 43578 redoStack.value.splice(0, redoStack.value.length); 43579 }; 43580 const undo = () => { 43581 const state = undoStack.value.shift(); 43582 if (state) { 43583 redoStack.value.unshift(last.value); 43584 _setSource(state); 43585 } 43586 }; 43587 const redo = () => { 43588 const state = redoStack.value.shift(); 43589 if (state) { 43590 undoStack.value.unshift(last.value); 43591 _setSource(state); 43592 } 43593 }; 43594 const reset = () => { 43595 _setSource(last.value); 43596 }; 43597 const history = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => [last.value, ...undoStack.value]); 43598 const canUndo = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => undoStack.value.length > 0); 43599 const canRedo = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => redoStack.value.length > 0); 43600 return { 43601 source, 43602 undoStack, 43603 redoStack, 43604 last, 43605 history, 43606 canUndo, 43607 canRedo, 43608 clear, 43609 commit, 43610 reset, 43611 undo, 43612 redo 43613 }; 43614} 43615 43616function useRefHistory(source, options = {}) { 43617 const { 43618 deep = false, 43619 flush = "pre", 43620 eventFilter 43621 } = options; 43622 const { 43623 eventFilter: composedFilter, 43624 pause, 43625 resume: resumeTracking, 43626 isActive: isTracking 43627 } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.pausableFilter)(eventFilter); 43628 const { 43629 ignoreUpdates, 43630 ignorePrevAsyncUpdates, 43631 stop 43632 } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchIgnorable)( 43633 source, 43634 commit, 43635 { deep, flush, eventFilter: composedFilter } 43636 ); 43637 function setSource(source2, value) { 43638 ignorePrevAsyncUpdates(); 43639 ignoreUpdates(() => { 43640 source2.value = value; 43641 }); 43642 } 43643 const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource }); 43644 const { clear, commit: manualCommit } = manualHistory; 43645 function commit() { 43646 ignorePrevAsyncUpdates(); 43647 manualCommit(); 43648 } 43649 function resume(commitNow) { 43650 resumeTracking(); 43651 if (commitNow) 43652 commit(); 43653 } 43654 function batch(fn) { 43655 let canceled = false; 43656 const cancel = () => canceled = true; 43657 ignoreUpdates(() => { 43658 fn(cancel); 43659 }); 43660 if (!canceled) 43661 commit(); 43662 } 43663 function dispose() { 43664 stop(); 43665 clear(); 43666 } 43667 return { 43668 ...manualHistory, 43669 isTracking, 43670 pause, 43671 resume, 43672 commit, 43673 batch, 43674 dispose 43675 }; 43676} 43677 43678function useDebouncedRefHistory(source, options = {}) { 43679 const filter = options.debounce ? (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.debounceFilter)(options.debounce) : void 0; 43680 const history = useRefHistory(source, { ...options, eventFilter: filter }); 43681 return { 43682 ...history 43683 }; 43684} 43685 43686function useDeviceMotion(options = {}) { 43687 const { 43688 window = defaultWindow, 43689 eventFilter = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.bypassFilter 43690 } = options; 43691 const acceleration = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({ x: null, y: null, z: null }); 43692 const rotationRate = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({ alpha: null, beta: null, gamma: null }); 43693 const interval = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 43694 const accelerationIncludingGravity = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({ 43695 x: null, 43696 y: null, 43697 z: null 43698 }); 43699 if (window) { 43700 const onDeviceMotion = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createFilterWrapper)( 43701 eventFilter, 43702 (event) => { 43703 acceleration.value = event.acceleration; 43704 accelerationIncludingGravity.value = event.accelerationIncludingGravity; 43705 rotationRate.value = event.rotationRate; 43706 interval.value = event.interval; 43707 } 43708 ); 43709 useEventListener(window, "devicemotion", onDeviceMotion); 43710 } 43711 return { 43712 acceleration, 43713 accelerationIncludingGravity, 43714 rotationRate, 43715 interval 43716 }; 43717} 43718 43719function useDeviceOrientation(options = {}) { 43720 const { window = defaultWindow } = options; 43721 const isSupported = useSupported(() => window && "DeviceOrientationEvent" in window); 43722 const isAbsolute = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 43723 const alpha = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 43724 const beta = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 43725 const gamma = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 43726 if (window && isSupported.value) { 43727 useEventListener(window, "deviceorientation", (event) => { 43728 isAbsolute.value = event.absolute; 43729 alpha.value = event.alpha; 43730 beta.value = event.beta; 43731 gamma.value = event.gamma; 43732 }); 43733 } 43734 return { 43735 isSupported, 43736 isAbsolute, 43737 alpha, 43738 beta, 43739 gamma 43740 }; 43741} 43742 43743function useDevicePixelRatio(options = {}) { 43744 const { 43745 window = defaultWindow 43746 } = options; 43747 const pixelRatio = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(1); 43748 if (window) { 43749 let observe2 = function() { 43750 pixelRatio.value = window.devicePixelRatio; 43751 cleanup2(); 43752 media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`); 43753 media.addEventListener("change", observe2, { once: true }); 43754 }, cleanup2 = function() { 43755 media == null ? void 0 : media.removeEventListener("change", observe2); 43756 }; 43757 let media; 43758 observe2(); 43759 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(cleanup2); 43760 } 43761 return { pixelRatio }; 43762} 43763 43764function useDevicesList(options = {}) { 43765 const { 43766 navigator = defaultNavigator, 43767 requestPermissions = false, 43768 constraints = { audio: true, video: true }, 43769 onUpdated 43770 } = options; 43771 const devices = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 43772 const videoInputs = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => devices.value.filter((i) => i.kind === "videoinput")); 43773 const audioInputs = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => devices.value.filter((i) => i.kind === "audioinput")); 43774 const audioOutputs = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => devices.value.filter((i) => i.kind === "audiooutput")); 43775 const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices); 43776 const permissionGranted = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 43777 let stream; 43778 async function update() { 43779 if (!isSupported.value) 43780 return; 43781 devices.value = await navigator.mediaDevices.enumerateDevices(); 43782 onUpdated == null ? void 0 : onUpdated(devices.value); 43783 if (stream) { 43784 stream.getTracks().forEach((t) => t.stop()); 43785 stream = null; 43786 } 43787 } 43788 async function ensurePermissions() { 43789 if (!isSupported.value) 43790 return false; 43791 if (permissionGranted.value) 43792 return true; 43793 const { state, query } = usePermission("camera", { controls: true }); 43794 await query(); 43795 if (state.value !== "granted") { 43796 stream = await navigator.mediaDevices.getUserMedia(constraints); 43797 update(); 43798 permissionGranted.value = true; 43799 } else { 43800 permissionGranted.value = true; 43801 } 43802 return permissionGranted.value; 43803 } 43804 if (isSupported.value) { 43805 if (requestPermissions) 43806 ensurePermissions(); 43807 useEventListener(navigator.mediaDevices, "devicechange", update); 43808 update(); 43809 } 43810 return { 43811 devices, 43812 ensurePermissions, 43813 permissionGranted, 43814 videoInputs, 43815 audioInputs, 43816 audioOutputs, 43817 isSupported 43818 }; 43819} 43820 43821function useDisplayMedia(options = {}) { 43822 var _a; 43823 const enabled = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)((_a = options.enabled) != null ? _a : false); 43824 const video = options.video; 43825 const audio = options.audio; 43826 const { navigator = defaultNavigator } = options; 43827 const isSupported = useSupported(() => { 43828 var _a2; 43829 return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia; 43830 }); 43831 const constraint = { audio, video }; 43832 const stream = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); 43833 async function _start() { 43834 var _a2; 43835 if (!isSupported.value || stream.value) 43836 return; 43837 stream.value = await navigator.mediaDevices.getDisplayMedia(constraint); 43838 (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener("ended", stop)); 43839 return stream.value; 43840 } 43841 async function _stop() { 43842 var _a2; 43843 (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); 43844 stream.value = void 0; 43845 } 43846 function stop() { 43847 _stop(); 43848 enabled.value = false; 43849 } 43850 async function start() { 43851 await _start(); 43852 if (stream.value) 43853 enabled.value = true; 43854 return stream.value; 43855 } 43856 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 43857 enabled, 43858 (v) => { 43859 if (v) 43860 _start(); 43861 else 43862 _stop(); 43863 }, 43864 { immediate: true } 43865 ); 43866 return { 43867 isSupported, 43868 stream, 43869 start, 43870 stop, 43871 enabled 43872 }; 43873} 43874 43875function useDocumentVisibility(options = {}) { 43876 const { document = defaultDocument } = options; 43877 if (!document) 43878 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("visible"); 43879 const visibility = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(document.visibilityState); 43880 useEventListener(document, "visibilitychange", () => { 43881 visibility.value = document.visibilityState; 43882 }); 43883 return visibility; 43884} 43885 43886function useDraggable(target, options = {}) { 43887 var _a, _b; 43888 const { 43889 pointerTypes, 43890 preventDefault, 43891 stopPropagation, 43892 exact, 43893 onMove, 43894 onEnd, 43895 onStart, 43896 initialValue, 43897 axis = "both", 43898 draggingElement = defaultWindow, 43899 containerElement, 43900 handle: draggingHandle = target 43901 } = options; 43902 const position = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)( 43903 (_a = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(initialValue)) != null ? _a : { x: 0, y: 0 } 43904 ); 43905 const pressedDelta = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 43906 const filterEvent = (e) => { 43907 if (pointerTypes) 43908 return pointerTypes.includes(e.pointerType); 43909 return true; 43910 }; 43911 const handleEvent = (e) => { 43912 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(preventDefault)) 43913 e.preventDefault(); 43914 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(stopPropagation)) 43915 e.stopPropagation(); 43916 }; 43917 const start = (e) => { 43918 var _a2; 43919 if (e.button !== 0) 43920 return; 43921 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled) || !filterEvent(e)) 43922 return; 43923 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(exact) && e.target !== (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target)) 43924 return; 43925 const container = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(containerElement); 43926 const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container); 43927 const targetRect = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).getBoundingClientRect(); 43928 const pos = { 43929 x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left), 43930 y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top) 43931 }; 43932 if ((onStart == null ? void 0 : onStart(pos, e)) === false) 43933 return; 43934 pressedDelta.value = pos; 43935 handleEvent(e); 43936 }; 43937 const move = (e) => { 43938 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled) || !filterEvent(e)) 43939 return; 43940 if (!pressedDelta.value) 43941 return; 43942 const container = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(containerElement); 43943 const targetRect = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).getBoundingClientRect(); 43944 let { x, y } = position.value; 43945 if (axis === "x" || axis === "both") { 43946 x = e.clientX - pressedDelta.value.x; 43947 if (container) 43948 x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width); 43949 } 43950 if (axis === "y" || axis === "both") { 43951 y = e.clientY - pressedDelta.value.y; 43952 if (container) 43953 y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height); 43954 } 43955 position.value = { 43956 x, 43957 y 43958 }; 43959 onMove == null ? void 0 : onMove(position.value, e); 43960 handleEvent(e); 43961 }; 43962 const end = (e) => { 43963 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled) || !filterEvent(e)) 43964 return; 43965 if (!pressedDelta.value) 43966 return; 43967 pressedDelta.value = void 0; 43968 onEnd == null ? void 0 : onEnd(position.value, e); 43969 handleEvent(e); 43970 }; 43971 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) { 43972 const config = { capture: (_b = options.capture) != null ? _b : true }; 43973 useEventListener(draggingHandle, "pointerdown", start, config); 43974 useEventListener(draggingElement, "pointermove", move, config); 43975 useEventListener(draggingElement, "pointerup", end, config); 43976 } 43977 return { 43978 ...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRefs)(position), 43979 position, 43980 isDragging: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => !!pressedDelta.value), 43981 style: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)( 43982 () => `left:${position.value.x}px;top:${position.value.y}px;` 43983 ) 43984 }; 43985} 43986 43987function useDropZone(target, options = {}) { 43988 const isOverDropZone = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 43989 const files = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 43990 let counter = 0; 43991 let isDataTypeIncluded = true; 43992 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) { 43993 const _options = typeof options === "function" ? { onDrop: options } : options; 43994 const getFiles = (event) => { 43995 var _a, _b; 43996 const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []); 43997 return files.value = list.length === 0 ? null : list; 43998 }; 43999 useEventListener(target, "dragenter", (event) => { 44000 var _a, _b; 44001 const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === "file" ? i.type : null).filter(_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.notNullish); 44002 if (_options.dataTypes && event.dataTransfer) { 44003 const dataTypes = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.unref)(_options.dataTypes); 44004 isDataTypeIncluded = typeof dataTypes === "function" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true; 44005 if (!isDataTypeIncluded) 44006 return; 44007 } 44008 event.preventDefault(); 44009 counter += 1; 44010 isOverDropZone.value = true; 44011 (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event); 44012 }); 44013 useEventListener(target, "dragover", (event) => { 44014 var _a; 44015 if (!isDataTypeIncluded) 44016 return; 44017 event.preventDefault(); 44018 (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event); 44019 }); 44020 useEventListener(target, "dragleave", (event) => { 44021 var _a; 44022 if (!isDataTypeIncluded) 44023 return; 44024 event.preventDefault(); 44025 counter -= 1; 44026 if (counter === 0) 44027 isOverDropZone.value = false; 44028 (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event); 44029 }); 44030 useEventListener(target, "drop", (event) => { 44031 var _a; 44032 event.preventDefault(); 44033 counter = 0; 44034 isOverDropZone.value = false; 44035 (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event); 44036 }); 44037 } 44038 return { 44039 files, 44040 isOverDropZone 44041 }; 44042} 44043 44044function useResizeObserver(target, callback, options = {}) { 44045 const { window = defaultWindow, ...observerOptions } = options; 44046 let observer; 44047 const isSupported = useSupported(() => window && "ResizeObserver" in window); 44048 const cleanup = () => { 44049 if (observer) { 44050 observer.disconnect(); 44051 observer = void 0; 44052 } 44053 }; 44054 const targets = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]); 44055 const stopWatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44056 targets, 44057 (els) => { 44058 cleanup(); 44059 if (isSupported.value && window) { 44060 observer = new ResizeObserver(callback); 44061 for (const _el of els) 44062 _el && observer.observe(_el, observerOptions); 44063 } 44064 }, 44065 { immediate: true, flush: "post" } 44066 ); 44067 const stop = () => { 44068 cleanup(); 44069 stopWatch(); 44070 }; 44071 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(stop); 44072 return { 44073 isSupported, 44074 stop 44075 }; 44076} 44077 44078function useElementBounding(target, options = {}) { 44079 const { 44080 reset = true, 44081 windowResize = true, 44082 windowScroll = true, 44083 immediate = true 44084 } = options; 44085 const height = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44086 const bottom = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44087 const left = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44088 const right = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44089 const top = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44090 const width = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44091 const x = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44092 const y = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 44093 function update() { 44094 const el = unrefElement(target); 44095 if (!el) { 44096 if (reset) { 44097 height.value = 0; 44098 bottom.value = 0; 44099 left.value = 0; 44100 right.value = 0; 44101 top.value = 0; 44102 width.value = 0; 44103 x.value = 0; 44104 y.value = 0; 44105 } 44106 return; 44107 } 44108 const rect = el.getBoundingClientRect(); 44109 height.value = rect.height; 44110 bottom.value = rect.bottom; 44111 left.value = rect.left; 44112 right.value = rect.right; 44113 top.value = rect.top; 44114 width.value = rect.width; 44115 x.value = rect.x; 44116 y.value = rect.y; 44117 } 44118 useResizeObserver(target, update); 44119 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => unrefElement(target), (ele) => !ele && update()); 44120 useMutationObserver(target, update, { 44121 attributeFilter: ["style", "class"] 44122 }); 44123 if (windowScroll) 44124 useEventListener("scroll", update, { capture: true, passive: true }); 44125 if (windowResize) 44126 useEventListener("resize", update, { passive: true }); 44127 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 44128 if (immediate) 44129 update(); 44130 }); 44131 return { 44132 height, 44133 bottom, 44134 left, 44135 right, 44136 top, 44137 width, 44138 x, 44139 y, 44140 update 44141 }; 44142} 44143 44144function useElementByPoint(options) { 44145 const { 44146 x, 44147 y, 44148 document = defaultDocument, 44149 multiple, 44150 interval = "requestAnimationFrame", 44151 immediate = true 44152 } = options; 44153 const isSupported = useSupported(() => { 44154 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(multiple)) 44155 return document && "elementsFromPoint" in document; 44156 return document && "elementFromPoint" in document; 44157 }); 44158 const element = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44159 const cb = () => { 44160 var _a, _b; 44161 element.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(x), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(x), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(y))) != null ? _b : null; 44162 }; 44163 const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)(cb, interval, { immediate }); 44164 return { 44165 isSupported, 44166 element, 44167 ...controls 44168 }; 44169} 44170 44171function useElementHover(el, options = {}) { 44172 const { 44173 delayEnter = 0, 44174 delayLeave = 0, 44175 window = defaultWindow 44176 } = options; 44177 const isHovered = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44178 let timer; 44179 const toggle = (entering) => { 44180 const delay = entering ? delayEnter : delayLeave; 44181 if (timer) { 44182 clearTimeout(timer); 44183 timer = void 0; 44184 } 44185 if (delay) 44186 timer = setTimeout(() => isHovered.value = entering, delay); 44187 else 44188 isHovered.value = entering; 44189 }; 44190 if (!window) 44191 return isHovered; 44192 useEventListener(el, "mouseenter", () => toggle(true), { passive: true }); 44193 useEventListener(el, "mouseleave", () => toggle(false), { passive: true }); 44194 return isHovered; 44195} 44196 44197function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) { 44198 const { window = defaultWindow, box = "content-box" } = options; 44199 const isSVG = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44200 var _a, _b; 44201 return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg"); 44202 }); 44203 const width = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialSize.width); 44204 const height = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialSize.height); 44205 const { stop: stop1 } = useResizeObserver( 44206 target, 44207 ([entry]) => { 44208 const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize; 44209 if (window && isSVG.value) { 44210 const $elem = unrefElement(target); 44211 if ($elem) { 44212 const rect = $elem.getBoundingClientRect(); 44213 width.value = rect.width; 44214 height.value = rect.height; 44215 } 44216 } else { 44217 if (boxSize) { 44218 const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize]; 44219 width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0); 44220 height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0); 44221 } else { 44222 width.value = entry.contentRect.width; 44223 height.value = entry.contentRect.height; 44224 } 44225 } 44226 }, 44227 options 44228 ); 44229 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 44230 const ele = unrefElement(target); 44231 if (ele) { 44232 width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width; 44233 height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height; 44234 } 44235 }); 44236 const stop2 = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44237 () => unrefElement(target), 44238 (ele) => { 44239 width.value = ele ? initialSize.width : 0; 44240 height.value = ele ? initialSize.height : 0; 44241 } 44242 ); 44243 function stop() { 44244 stop1(); 44245 stop2(); 44246 } 44247 return { 44248 width, 44249 height, 44250 stop 44251 }; 44252} 44253 44254function useIntersectionObserver(target, callback, options = {}) { 44255 const { 44256 root, 44257 rootMargin = "0px", 44258 threshold = 0.1, 44259 window = defaultWindow, 44260 immediate = true 44261 } = options; 44262 const isSupported = useSupported(() => window && "IntersectionObserver" in window); 44263 const targets = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44264 const _target = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 44265 return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.notNullish); 44266 }); 44267 let cleanup = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 44268 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(immediate); 44269 const stopWatch = isSupported.value ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44270 () => [targets.value, unrefElement(root), isActive.value], 44271 ([targets2, root2]) => { 44272 cleanup(); 44273 if (!isActive.value) 44274 return; 44275 if (!targets2.length) 44276 return; 44277 const observer = new IntersectionObserver( 44278 callback, 44279 { 44280 root: unrefElement(root2), 44281 rootMargin, 44282 threshold 44283 } 44284 ); 44285 targets2.forEach((el) => el && observer.observe(el)); 44286 cleanup = () => { 44287 observer.disconnect(); 44288 cleanup = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 44289 }; 44290 }, 44291 { immediate, flush: "post" } 44292 ) : _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop; 44293 const stop = () => { 44294 cleanup(); 44295 stopWatch(); 44296 isActive.value = false; 44297 }; 44298 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(stop); 44299 return { 44300 isSupported, 44301 isActive, 44302 pause() { 44303 cleanup(); 44304 isActive.value = false; 44305 }, 44306 resume() { 44307 isActive.value = true; 44308 }, 44309 stop 44310 }; 44311} 44312 44313function useElementVisibility(element, options = {}) { 44314 const { window = defaultWindow, scrollTarget, threshold = 0 } = options; 44315 const elementIsVisible = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44316 useIntersectionObserver( 44317 element, 44318 (intersectionObserverEntries) => { 44319 let isIntersecting = elementIsVisible.value; 44320 let latestTime = 0; 44321 for (const entry of intersectionObserverEntries) { 44322 if (entry.time >= latestTime) { 44323 latestTime = entry.time; 44324 isIntersecting = entry.isIntersecting; 44325 } 44326 } 44327 elementIsVisible.value = isIntersecting; 44328 }, 44329 { 44330 root: scrollTarget, 44331 window, 44332 threshold 44333 } 44334 ); 44335 return elementIsVisible; 44336} 44337 44338const events = /* @__PURE__ */ new Map(); 44339 44340function useEventBus(key) { 44341 const scope = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.getCurrentScope)(); 44342 function on(listener) { 44343 var _a; 44344 const listeners = events.get(key) || /* @__PURE__ */ new Set(); 44345 listeners.add(listener); 44346 events.set(key, listeners); 44347 const _off = () => off(listener); 44348 (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off); 44349 return _off; 44350 } 44351 function once(listener) { 44352 function _listener(...args) { 44353 off(_listener); 44354 listener(...args); 44355 } 44356 return on(_listener); 44357 } 44358 function off(listener) { 44359 const listeners = events.get(key); 44360 if (!listeners) 44361 return; 44362 listeners.delete(listener); 44363 if (!listeners.size) 44364 reset(); 44365 } 44366 function reset() { 44367 events.delete(key); 44368 } 44369 function emit(event, payload) { 44370 var _a; 44371 (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload)); 44372 } 44373 return { on, once, off, emit, reset }; 44374} 44375 44376function resolveNestedOptions$1(options) { 44377 if (options === true) 44378 return {}; 44379 return options; 44380} 44381function useEventSource(url, events = [], options = {}) { 44382 const event = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44383 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44384 const status = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("CONNECTING"); 44385 const eventSource = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44386 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 44387 const urlRef = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(url); 44388 const lastEventId = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 44389 let explicitlyClosed = false; 44390 let retried = 0; 44391 const { 44392 withCredentials = false, 44393 immediate = true 44394 } = options; 44395 const close = () => { 44396 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient && eventSource.value) { 44397 eventSource.value.close(); 44398 eventSource.value = null; 44399 status.value = "CLOSED"; 44400 explicitlyClosed = true; 44401 } 44402 }; 44403 const _init = () => { 44404 if (explicitlyClosed || typeof urlRef.value === "undefined") 44405 return; 44406 const es = new EventSource(urlRef.value, { withCredentials }); 44407 status.value = "CONNECTING"; 44408 eventSource.value = es; 44409 es.onopen = () => { 44410 status.value = "OPEN"; 44411 error.value = null; 44412 }; 44413 es.onerror = (e) => { 44414 status.value = "CLOSED"; 44415 error.value = e; 44416 if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) { 44417 es.close(); 44418 const { 44419 retries = -1, 44420 delay = 1e3, 44421 onFailed 44422 } = resolveNestedOptions$1(options.autoReconnect); 44423 retried += 1; 44424 if (typeof retries === "number" && (retries < 0 || retried < retries)) 44425 setTimeout(_init, delay); 44426 else if (typeof retries === "function" && retries()) 44427 setTimeout(_init, delay); 44428 else 44429 onFailed == null ? void 0 : onFailed(); 44430 } 44431 }; 44432 es.onmessage = (e) => { 44433 event.value = null; 44434 data.value = e.data; 44435 lastEventId.value = e.lastEventId; 44436 }; 44437 for (const event_name of events) { 44438 useEventListener(es, event_name, (e) => { 44439 event.value = event_name; 44440 data.value = e.data || null; 44441 }); 44442 } 44443 }; 44444 const open = () => { 44445 if (!_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) 44446 return; 44447 close(); 44448 explicitlyClosed = false; 44449 retried = 0; 44450 _init(); 44451 }; 44452 if (immediate) 44453 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(urlRef, open, { immediate: true }); 44454 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(close); 44455 return { 44456 eventSource, 44457 event, 44458 data, 44459 status, 44460 error, 44461 open, 44462 close, 44463 lastEventId 44464 }; 44465} 44466 44467function useEyeDropper(options = {}) { 44468 const { initialValue = "" } = options; 44469 const isSupported = useSupported(() => typeof window !== "undefined" && "EyeDropper" in window); 44470 const sRGBHex = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue); 44471 async function open(openOptions) { 44472 if (!isSupported.value) 44473 return; 44474 const eyeDropper = new window.EyeDropper(); 44475 const result = await eyeDropper.open(openOptions); 44476 sRGBHex.value = result.sRGBHex; 44477 return result; 44478 } 44479 return { isSupported, sRGBHex, open }; 44480} 44481 44482function useFavicon(newIcon = null, options = {}) { 44483 const { 44484 baseUrl = "", 44485 rel = "icon", 44486 document = defaultDocument 44487 } = options; 44488 const favicon = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(newIcon); 44489 const applyIcon = (icon) => { 44490 const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*="${rel}"]`); 44491 if (!elements || elements.length === 0) { 44492 const link = document == null ? void 0 : document.createElement("link"); 44493 if (link) { 44494 link.rel = rel; 44495 link.href = `${baseUrl}${icon}`; 44496 link.type = `image/${icon.split(".").pop()}`; 44497 document == null ? void 0 : document.head.append(link); 44498 } 44499 return; 44500 } 44501 elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`); 44502 }; 44503 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44504 favicon, 44505 (i, o) => { 44506 if (typeof i === "string" && i !== o) 44507 applyIcon(i); 44508 }, 44509 { immediate: true } 44510 ); 44511 return favicon; 44512} 44513 44514const payloadMapping = { 44515 json: "application/json", 44516 text: "text/plain" 44517}; 44518function isFetchOptions(obj) { 44519 return obj && (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.containsProp)(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch", "updateDataOnError"); 44520} 44521const reAbsolute = /^(?:[a-z][a-z\d+\-.]*:)?\/\//i; 44522function isAbsoluteURL(url) { 44523 return reAbsolute.test(url); 44524} 44525function headersToObject(headers) { 44526 if (typeof Headers !== "undefined" && headers instanceof Headers) 44527 return Object.fromEntries(headers.entries()); 44528 return headers; 44529} 44530function combineCallbacks(combination, ...callbacks) { 44531 if (combination === "overwrite") { 44532 return async (ctx) => { 44533 const callback = callbacks[callbacks.length - 1]; 44534 if (callback) 44535 return { ...ctx, ...await callback(ctx) }; 44536 return ctx; 44537 }; 44538 } else { 44539 return async (ctx) => { 44540 for (const callback of callbacks) { 44541 if (callback) 44542 ctx = { ...ctx, ...await callback(ctx) }; 44543 } 44544 return ctx; 44545 }; 44546 } 44547} 44548function createFetch(config = {}) { 44549 const _combination = config.combination || "chain"; 44550 const _options = config.options || {}; 44551 const _fetchOptions = config.fetchOptions || {}; 44552 function useFactoryFetch(url, ...args) { 44553 const computedUrl = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44554 const baseUrl = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(config.baseUrl); 44555 const targetUrl = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(url); 44556 return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl; 44557 }); 44558 let options = _options; 44559 let fetchOptions = _fetchOptions; 44560 if (args.length > 0) { 44561 if (isFetchOptions(args[0])) { 44562 options = { 44563 ...options, 44564 ...args[0], 44565 beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch), 44566 afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch), 44567 onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError) 44568 }; 44569 } else { 44570 fetchOptions = { 44571 ...fetchOptions, 44572 ...args[0], 44573 headers: { 44574 ...headersToObject(fetchOptions.headers) || {}, 44575 ...headersToObject(args[0].headers) || {} 44576 } 44577 }; 44578 } 44579 } 44580 if (args.length > 1 && isFetchOptions(args[1])) { 44581 options = { 44582 ...options, 44583 ...args[1], 44584 beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch), 44585 afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch), 44586 onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError) 44587 }; 44588 } 44589 return useFetch(computedUrl, fetchOptions, options); 44590 } 44591 return useFactoryFetch; 44592} 44593function useFetch(url, ...args) { 44594 var _a; 44595 const supportsAbort = typeof AbortController === "function"; 44596 let fetchOptions = {}; 44597 let options = { 44598 immediate: true, 44599 refetch: false, 44600 timeout: 0, 44601 updateDataOnError: false 44602 }; 44603 const config = { 44604 method: "GET", 44605 type: "text", 44606 payload: void 0 44607 }; 44608 if (args.length > 0) { 44609 if (isFetchOptions(args[0])) 44610 options = { ...options, ...args[0] }; 44611 else 44612 fetchOptions = args[0]; 44613 } 44614 if (args.length > 1) { 44615 if (isFetchOptions(args[1])) 44616 options = { ...options, ...args[1] }; 44617 } 44618 const { 44619 fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch, 44620 initialData, 44621 timeout 44622 } = options; 44623 const responseEvent = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 44624 const errorEvent = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 44625 const finallyEvent = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 44626 const isFinished = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44627 const isFetching = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44628 const aborted = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44629 const statusCode = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44630 const response = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 44631 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 44632 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(initialData || null); 44633 const canAbort = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => supportsAbort && isFetching.value); 44634 let controller; 44635 let timer; 44636 const abort = () => { 44637 if (supportsAbort) { 44638 controller == null ? void 0 : controller.abort(); 44639 controller = new AbortController(); 44640 controller.signal.onabort = () => aborted.value = true; 44641 fetchOptions = { 44642 ...fetchOptions, 44643 signal: controller.signal 44644 }; 44645 } 44646 }; 44647 const loading = (isLoading) => { 44648 isFetching.value = isLoading; 44649 isFinished.value = !isLoading; 44650 }; 44651 if (timeout) 44652 timer = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeoutFn)(abort, timeout, { immediate: false }); 44653 let executeCounter = 0; 44654 const execute = async (throwOnFailed = false) => { 44655 var _a2, _b; 44656 abort(); 44657 loading(true); 44658 error.value = null; 44659 statusCode.value = null; 44660 aborted.value = false; 44661 executeCounter += 1; 44662 const currentExecuteCounter = executeCounter; 44663 const defaultFetchOptions = { 44664 method: config.method, 44665 headers: {} 44666 }; 44667 if (config.payload) { 44668 const headers = headersToObject(defaultFetchOptions.headers); 44669 const payload = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(config.payload); 44670 if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData)) 44671 config.payloadType = "json"; 44672 if (config.payloadType) 44673 headers["Content-Type"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType; 44674 defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(payload) : payload; 44675 } 44676 let isCanceled = false; 44677 const context = { 44678 url: (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(url), 44679 options: { 44680 ...defaultFetchOptions, 44681 ...fetchOptions 44682 }, 44683 cancel: () => { 44684 isCanceled = true; 44685 } 44686 }; 44687 if (options.beforeFetch) 44688 Object.assign(context, await options.beforeFetch(context)); 44689 if (isCanceled || !fetch) { 44690 loading(false); 44691 return Promise.resolve(null); 44692 } 44693 let responseData = null; 44694 if (timer) 44695 timer.start(); 44696 return fetch( 44697 context.url, 44698 { 44699 ...defaultFetchOptions, 44700 ...context.options, 44701 headers: { 44702 ...headersToObject(defaultFetchOptions.headers), 44703 ...headersToObject((_b = context.options) == null ? void 0 : _b.headers) 44704 } 44705 } 44706 ).then(async (fetchResponse) => { 44707 response.value = fetchResponse; 44708 statusCode.value = fetchResponse.status; 44709 responseData = await fetchResponse.clone()[config.type](); 44710 if (!fetchResponse.ok) { 44711 data.value = initialData || null; 44712 throw new Error(fetchResponse.statusText); 44713 } 44714 if (options.afterFetch) { 44715 ({ data: responseData } = await options.afterFetch({ 44716 data: responseData, 44717 response: fetchResponse 44718 })); 44719 } 44720 data.value = responseData; 44721 responseEvent.trigger(fetchResponse); 44722 return fetchResponse; 44723 }).catch(async (fetchError) => { 44724 let errorData = fetchError.message || fetchError.name; 44725 if (options.onFetchError) { 44726 ({ error: errorData, data: responseData } = await options.onFetchError({ 44727 data: responseData, 44728 error: fetchError, 44729 response: response.value 44730 })); 44731 } 44732 error.value = errorData; 44733 if (options.updateDataOnError) 44734 data.value = responseData; 44735 errorEvent.trigger(fetchError); 44736 if (throwOnFailed) 44737 throw fetchError; 44738 return null; 44739 }).finally(() => { 44740 if (currentExecuteCounter === executeCounter) 44741 loading(false); 44742 if (timer) 44743 timer.stop(); 44744 finallyEvent.trigger(null); 44745 }); 44746 }; 44747 const refetch = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(options.refetch); 44748 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44749 [ 44750 refetch, 44751 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(url) 44752 ], 44753 ([refetch2]) => refetch2 && execute(), 44754 { deep: true } 44755 ); 44756 const shell = { 44757 isFinished: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(isFinished), 44758 isFetching: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(isFetching), 44759 statusCode, 44760 response, 44761 error, 44762 data, 44763 canAbort, 44764 aborted, 44765 abort, 44766 execute, 44767 onFetchResponse: responseEvent.on, 44768 onFetchError: errorEvent.on, 44769 onFetchFinally: finallyEvent.on, 44770 // method 44771 get: setMethod("GET"), 44772 put: setMethod("PUT"), 44773 post: setMethod("POST"), 44774 delete: setMethod("DELETE"), 44775 patch: setMethod("PATCH"), 44776 head: setMethod("HEAD"), 44777 options: setMethod("OPTIONS"), 44778 // type 44779 json: setType("json"), 44780 text: setType("text"), 44781 blob: setType("blob"), 44782 arrayBuffer: setType("arrayBuffer"), 44783 formData: setType("formData") 44784 }; 44785 function setMethod(method) { 44786 return (payload, payloadType) => { 44787 if (!isFetching.value) { 44788 config.method = method; 44789 config.payload = payload; 44790 config.payloadType = payloadType; 44791 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(config.payload)) { 44792 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 44793 [ 44794 refetch, 44795 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(config.payload) 44796 ], 44797 ([refetch2]) => refetch2 && execute(), 44798 { deep: true } 44799 ); 44800 } 44801 return { 44802 ...shell, 44803 then(onFulfilled, onRejected) { 44804 return waitUntilFinished().then(onFulfilled, onRejected); 44805 } 44806 }; 44807 } 44808 return void 0; 44809 }; 44810 } 44811 function waitUntilFinished() { 44812 return new Promise((resolve, reject) => { 44813 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.until)(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2)); 44814 }); 44815 } 44816 function setType(type) { 44817 return () => { 44818 if (!isFetching.value) { 44819 config.type = type; 44820 return { 44821 ...shell, 44822 then(onFulfilled, onRejected) { 44823 return waitUntilFinished().then(onFulfilled, onRejected); 44824 } 44825 }; 44826 } 44827 return void 0; 44828 }; 44829 } 44830 if (options.immediate) 44831 Promise.resolve().then(() => execute()); 44832 return { 44833 ...shell, 44834 then(onFulfilled, onRejected) { 44835 return waitUntilFinished().then(onFulfilled, onRejected); 44836 } 44837 }; 44838} 44839function joinPaths(start, end) { 44840 if (!start.endsWith("/") && !end.startsWith("/")) 44841 return `${start}/${end}`; 44842 return `${start}${end}`; 44843} 44844 44845const DEFAULT_OPTIONS = { 44846 multiple: true, 44847 accept: "*", 44848 reset: false, 44849 directory: false 44850}; 44851function useFileDialog(options = {}) { 44852 const { 44853 document = defaultDocument 44854 } = options; 44855 const files = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 44856 const { on: onChange, trigger } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 44857 let input; 44858 if (document) { 44859 input = document.createElement("input"); 44860 input.type = "file"; 44861 input.onchange = (event) => { 44862 const result = event.target; 44863 files.value = result.files; 44864 trigger(files.value); 44865 }; 44866 } 44867 const reset = () => { 44868 files.value = null; 44869 if (input && input.value) { 44870 input.value = ""; 44871 trigger(null); 44872 } 44873 }; 44874 const open = (localOptions) => { 44875 if (!input) 44876 return; 44877 const _options = { 44878 ...DEFAULT_OPTIONS, 44879 ...options, 44880 ...localOptions 44881 }; 44882 input.multiple = _options.multiple; 44883 input.accept = _options.accept; 44884 input.webkitdirectory = _options.directory; 44885 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(_options, "capture")) 44886 input.capture = _options.capture; 44887 if (_options.reset) 44888 reset(); 44889 input.click(); 44890 }; 44891 return { 44892 files: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(files), 44893 open, 44894 reset, 44895 onChange 44896 }; 44897} 44898 44899function useFileSystemAccess(options = {}) { 44900 const { 44901 window: _window = defaultWindow, 44902 dataType = "Text" 44903 } = options; 44904 const window = _window; 44905 const isSupported = useSupported(() => window && "showSaveFilePicker" in window && "showOpenFilePicker" in window); 44906 const fileHandle = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 44907 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 44908 const file = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 44909 const fileName = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44910 var _a, _b; 44911 return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : ""; 44912 }); 44913 const fileMIME = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44914 var _a, _b; 44915 return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : ""; 44916 }); 44917 const fileSize = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44918 var _a, _b; 44919 return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0; 44920 }); 44921 const fileLastModified = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 44922 var _a, _b; 44923 return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0; 44924 }); 44925 async function open(_options = {}) { 44926 if (!isSupported.value) 44927 return; 44928 const [handle] = await window.showOpenFilePicker({ ...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options), ..._options }); 44929 fileHandle.value = handle; 44930 await updateData(); 44931 } 44932 async function create(_options = {}) { 44933 if (!isSupported.value) 44934 return; 44935 fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options }); 44936 data.value = void 0; 44937 await updateData(); 44938 } 44939 async function save(_options = {}) { 44940 if (!isSupported.value) 44941 return; 44942 if (!fileHandle.value) 44943 return saveAs(_options); 44944 if (data.value) { 44945 const writableStream = await fileHandle.value.createWritable(); 44946 await writableStream.write(data.value); 44947 await writableStream.close(); 44948 } 44949 await updateFile(); 44950 } 44951 async function saveAs(_options = {}) { 44952 if (!isSupported.value) 44953 return; 44954 fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options }); 44955 if (data.value) { 44956 const writableStream = await fileHandle.value.createWritable(); 44957 await writableStream.write(data.value); 44958 await writableStream.close(); 44959 } 44960 await updateFile(); 44961 } 44962 async function updateFile() { 44963 var _a; 44964 file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile()); 44965 } 44966 async function updateData() { 44967 var _a, _b; 44968 await updateFile(); 44969 const type = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(dataType); 44970 if (type === "Text") 44971 data.value = await ((_a = file.value) == null ? void 0 : _a.text()); 44972 else if (type === "ArrayBuffer") 44973 data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer()); 44974 else if (type === "Blob") 44975 data.value = file.value; 44976 } 44977 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(dataType), updateData); 44978 return { 44979 isSupported, 44980 data, 44981 file, 44982 fileName, 44983 fileMIME, 44984 fileSize, 44985 fileLastModified, 44986 open, 44987 create, 44988 save, 44989 saveAs, 44990 updateData 44991 }; 44992} 44993 44994function useFocus(target, options = {}) { 44995 const { initialValue = false, focusVisible = false, preventScroll = false } = options; 44996 const innerFocused = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 44997 const targetElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => unrefElement(target)); 44998 useEventListener(targetElement, "focus", (event) => { 44999 var _a, _b; 45000 if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, ":focus-visible"))) 45001 innerFocused.value = true; 45002 }); 45003 useEventListener(targetElement, "blur", () => innerFocused.value = false); 45004 const focused = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 45005 get: () => innerFocused.value, 45006 set(value) { 45007 var _a, _b; 45008 if (!value && innerFocused.value) 45009 (_a = targetElement.value) == null ? void 0 : _a.blur(); 45010 else if (value && !innerFocused.value) 45011 (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll }); 45012 } 45013 }); 45014 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 45015 targetElement, 45016 () => { 45017 focused.value = initialValue; 45018 }, 45019 { immediate: true, flush: "post" } 45020 ); 45021 return { focused }; 45022} 45023 45024function useFocusWithin(target, options = {}) { 45025 const activeElement = useActiveElement(options); 45026 const targetElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => unrefElement(target)); 45027 const focused = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false); 45028 return { focused }; 45029} 45030 45031function useFps(options) { 45032 var _a; 45033 const fps = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 45034 if (typeof performance === "undefined") 45035 return fps; 45036 const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10; 45037 let last = performance.now(); 45038 let ticks = 0; 45039 useRafFn(() => { 45040 ticks += 1; 45041 if (ticks >= every) { 45042 const now = performance.now(); 45043 const diff = now - last; 45044 fps.value = Math.round(1e3 / (diff / ticks)); 45045 last = now; 45046 ticks = 0; 45047 } 45048 }); 45049 return fps; 45050} 45051 45052const eventHandlers = [ 45053 "fullscreenchange", 45054 "webkitfullscreenchange", 45055 "webkitendfullscreen", 45056 "mozfullscreenchange", 45057 "MSFullscreenChange" 45058]; 45059function useFullscreen(target, options = {}) { 45060 const { 45061 document = defaultDocument, 45062 autoExit = false 45063 } = options; 45064 const targetRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45065 var _a; 45066 return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector("html"); 45067 }); 45068 const isFullscreen = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45069 const requestMethod = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45070 return [ 45071 "requestFullscreen", 45072 "webkitRequestFullscreen", 45073 "webkitEnterFullscreen", 45074 "webkitEnterFullScreen", 45075 "webkitRequestFullScreen", 45076 "mozRequestFullScreen", 45077 "msRequestFullscreen" 45078 ].find((m) => document && m in document || targetRef.value && m in targetRef.value); 45079 }); 45080 const exitMethod = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45081 return [ 45082 "exitFullscreen", 45083 "webkitExitFullscreen", 45084 "webkitExitFullScreen", 45085 "webkitCancelFullScreen", 45086 "mozCancelFullScreen", 45087 "msExitFullscreen" 45088 ].find((m) => document && m in document || targetRef.value && m in targetRef.value); 45089 }); 45090 const fullscreenEnabled = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45091 return [ 45092 "fullScreen", 45093 "webkitIsFullScreen", 45094 "webkitDisplayingFullscreen", 45095 "mozFullScreen", 45096 "msFullscreenElement" 45097 ].find((m) => document && m in document || targetRef.value && m in targetRef.value); 45098 }); 45099 const fullscreenElementMethod = [ 45100 "fullscreenElement", 45101 "webkitFullscreenElement", 45102 "mozFullScreenElement", 45103 "msFullscreenElement" 45104 ].find((m) => document && m in document); 45105 const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0); 45106 const isCurrentElementFullScreen = () => { 45107 if (fullscreenElementMethod) 45108 return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value; 45109 return false; 45110 }; 45111 const isElementFullScreen = () => { 45112 if (fullscreenEnabled.value) { 45113 if (document && document[fullscreenEnabled.value] != null) { 45114 return document[fullscreenEnabled.value]; 45115 } else { 45116 const target2 = targetRef.value; 45117 if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) { 45118 return Boolean(target2[fullscreenEnabled.value]); 45119 } 45120 } 45121 } 45122 return false; 45123 }; 45124 async function exit() { 45125 if (!isSupported.value || !isFullscreen.value) 45126 return; 45127 if (exitMethod.value) { 45128 if ((document == null ? void 0 : document[exitMethod.value]) != null) { 45129 await document[exitMethod.value](); 45130 } else { 45131 const target2 = targetRef.value; 45132 if ((target2 == null ? void 0 : target2[exitMethod.value]) != null) 45133 await target2[exitMethod.value](); 45134 } 45135 } 45136 isFullscreen.value = false; 45137 } 45138 async function enter() { 45139 if (!isSupported.value || isFullscreen.value) 45140 return; 45141 if (isElementFullScreen()) 45142 await exit(); 45143 const target2 = targetRef.value; 45144 if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) { 45145 await target2[requestMethod.value](); 45146 isFullscreen.value = true; 45147 } 45148 } 45149 async function toggle() { 45150 await (isFullscreen.value ? exit() : enter()); 45151 } 45152 const handlerCallback = () => { 45153 const isElementFullScreenValue = isElementFullScreen(); 45154 if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) 45155 isFullscreen.value = isElementFullScreenValue; 45156 }; 45157 useEventListener(document, eventHandlers, handlerCallback, false); 45158 useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false); 45159 if (autoExit) 45160 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(exit); 45161 return { 45162 isSupported, 45163 isFullscreen, 45164 enter, 45165 exit, 45166 toggle 45167 }; 45168} 45169 45170function mapGamepadToXbox360Controller(gamepad) { 45171 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45172 if (gamepad.value) { 45173 return { 45174 buttons: { 45175 a: gamepad.value.buttons[0], 45176 b: gamepad.value.buttons[1], 45177 x: gamepad.value.buttons[2], 45178 y: gamepad.value.buttons[3] 45179 }, 45180 bumper: { 45181 left: gamepad.value.buttons[4], 45182 right: gamepad.value.buttons[5] 45183 }, 45184 triggers: { 45185 left: gamepad.value.buttons[6], 45186 right: gamepad.value.buttons[7] 45187 }, 45188 stick: { 45189 left: { 45190 horizontal: gamepad.value.axes[0], 45191 vertical: gamepad.value.axes[1], 45192 button: gamepad.value.buttons[10] 45193 }, 45194 right: { 45195 horizontal: gamepad.value.axes[2], 45196 vertical: gamepad.value.axes[3], 45197 button: gamepad.value.buttons[11] 45198 } 45199 }, 45200 dpad: { 45201 up: gamepad.value.buttons[12], 45202 down: gamepad.value.buttons[13], 45203 left: gamepad.value.buttons[14], 45204 right: gamepad.value.buttons[15] 45205 }, 45206 back: gamepad.value.buttons[8], 45207 start: gamepad.value.buttons[9] 45208 }; 45209 } 45210 return null; 45211 }); 45212} 45213function useGamepad(options = {}) { 45214 const { 45215 navigator = defaultNavigator 45216 } = options; 45217 const isSupported = useSupported(() => navigator && "getGamepads" in navigator); 45218 const gamepads = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 45219 const onConnectedHook = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 45220 const onDisconnectedHook = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 45221 const stateFromGamepad = (gamepad) => { 45222 const hapticActuators = []; 45223 const vibrationActuator = "vibrationActuator" in gamepad ? gamepad.vibrationActuator : null; 45224 if (vibrationActuator) 45225 hapticActuators.push(vibrationActuator); 45226 if (gamepad.hapticActuators) 45227 hapticActuators.push(...gamepad.hapticActuators); 45228 return { 45229 id: gamepad.id, 45230 index: gamepad.index, 45231 connected: gamepad.connected, 45232 mapping: gamepad.mapping, 45233 timestamp: gamepad.timestamp, 45234 vibrationActuator: gamepad.vibrationActuator, 45235 hapticActuators, 45236 axes: gamepad.axes.map((axes) => axes), 45237 buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value })) 45238 }; 45239 }; 45240 const updateGamepadState = () => { 45241 const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; 45242 for (const gamepad of _gamepads) { 45243 if (gamepad && gamepads.value[gamepad.index]) 45244 gamepads.value[gamepad.index] = stateFromGamepad(gamepad); 45245 } 45246 }; 45247 const { isActive, pause, resume } = useRafFn(updateGamepadState); 45248 const onGamepadConnected = (gamepad) => { 45249 if (!gamepads.value.some(({ index }) => index === gamepad.index)) { 45250 gamepads.value.push(stateFromGamepad(gamepad)); 45251 onConnectedHook.trigger(gamepad.index); 45252 } 45253 resume(); 45254 }; 45255 const onGamepadDisconnected = (gamepad) => { 45256 gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index); 45257 onDisconnectedHook.trigger(gamepad.index); 45258 }; 45259 useEventListener("gamepadconnected", (e) => onGamepadConnected(e.gamepad)); 45260 useEventListener("gamepaddisconnected", (e) => onGamepadDisconnected(e.gamepad)); 45261 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 45262 const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; 45263 for (const gamepad of _gamepads) { 45264 if (gamepad && gamepads.value[gamepad.index]) 45265 onGamepadConnected(gamepad); 45266 } 45267 }); 45268 pause(); 45269 return { 45270 isSupported, 45271 onConnected: onConnectedHook.on, 45272 onDisconnected: onDisconnectedHook.on, 45273 gamepads, 45274 pause, 45275 resume, 45276 isActive 45277 }; 45278} 45279 45280function useGeolocation(options = {}) { 45281 const { 45282 enableHighAccuracy = true, 45283 maximumAge = 3e4, 45284 timeout = 27e3, 45285 navigator = defaultNavigator, 45286 immediate = true 45287 } = options; 45288 const isSupported = useSupported(() => navigator && "geolocation" in navigator); 45289 const locatedAt = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 45290 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); 45291 const coords = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({ 45292 accuracy: 0, 45293 latitude: Number.POSITIVE_INFINITY, 45294 longitude: Number.POSITIVE_INFINITY, 45295 altitude: null, 45296 altitudeAccuracy: null, 45297 heading: null, 45298 speed: null 45299 }); 45300 function updatePosition(position) { 45301 locatedAt.value = position.timestamp; 45302 coords.value = position.coords; 45303 error.value = null; 45304 } 45305 let watcher; 45306 function resume() { 45307 if (isSupported.value) { 45308 watcher = navigator.geolocation.watchPosition( 45309 updatePosition, 45310 (err) => error.value = err, 45311 { 45312 enableHighAccuracy, 45313 maximumAge, 45314 timeout 45315 } 45316 ); 45317 } 45318 } 45319 if (immediate) 45320 resume(); 45321 function pause() { 45322 if (watcher && navigator) 45323 navigator.geolocation.clearWatch(watcher); 45324 } 45325 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 45326 pause(); 45327 }); 45328 return { 45329 isSupported, 45330 coords, 45331 locatedAt, 45332 error, 45333 resume, 45334 pause 45335 }; 45336} 45337 45338const defaultEvents$1 = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"]; 45339const oneMinute = 6e4; 45340function useIdle(timeout = oneMinute, options = {}) { 45341 const { 45342 initialState = false, 45343 listenForVisibilityChange = true, 45344 events = defaultEvents$1, 45345 window = defaultWindow, 45346 eventFilter = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.throttleFilter)(50) 45347 } = options; 45348 const idle = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialState); 45349 const lastActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp)()); 45350 let timer; 45351 const reset = () => { 45352 idle.value = false; 45353 clearTimeout(timer); 45354 timer = setTimeout(() => idle.value = true, timeout); 45355 }; 45356 const onEvent = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createFilterWrapper)( 45357 eventFilter, 45358 () => { 45359 lastActive.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp)(); 45360 reset(); 45361 } 45362 ); 45363 if (window) { 45364 const document = window.document; 45365 for (const event of events) 45366 useEventListener(window, event, onEvent, { passive: true }); 45367 if (listenForVisibilityChange) { 45368 useEventListener(document, "visibilitychange", () => { 45369 if (!document.hidden) 45370 onEvent(); 45371 }); 45372 } 45373 reset(); 45374 } 45375 return { 45376 idle, 45377 lastActive, 45378 reset 45379 }; 45380} 45381 45382async function loadImage(options) { 45383 return new Promise((resolve, reject) => { 45384 const img = new Image(); 45385 const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options; 45386 img.src = src; 45387 if (srcset) 45388 img.srcset = srcset; 45389 if (sizes) 45390 img.sizes = sizes; 45391 if (clazz) 45392 img.className = clazz; 45393 if (loading) 45394 img.loading = loading; 45395 if (crossorigin) 45396 img.crossOrigin = crossorigin; 45397 if (referrerPolicy) 45398 img.referrerPolicy = referrerPolicy; 45399 img.onload = () => resolve(img); 45400 img.onerror = reject; 45401 }); 45402} 45403function useImage(options, asyncStateOptions = {}) { 45404 const state = useAsyncState( 45405 () => loadImage((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options)), 45406 void 0, 45407 { 45408 resetOnExecute: true, 45409 ...asyncStateOptions 45410 } 45411 ); 45412 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 45413 () => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options), 45414 () => state.execute(asyncStateOptions.delay), 45415 { deep: true } 45416 ); 45417 return state; 45418} 45419 45420const ARRIVED_STATE_THRESHOLD_PIXELS = 1; 45421function useScroll(element, options = {}) { 45422 const { 45423 throttle = 0, 45424 idle = 200, 45425 onStop = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 45426 onScroll = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 45427 offset = { 45428 left: 0, 45429 right: 0, 45430 top: 0, 45431 bottom: 0 45432 }, 45433 eventListenerOptions = { 45434 capture: false, 45435 passive: true 45436 }, 45437 behavior = "auto", 45438 window = defaultWindow, 45439 onError = (e) => { 45440 console.error(e); 45441 } 45442 } = options; 45443 const internalX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 45444 const internalY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 45445 const x = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 45446 get() { 45447 return internalX.value; 45448 }, 45449 set(x2) { 45450 scrollTo(x2, void 0); 45451 } 45452 }); 45453 const y = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 45454 get() { 45455 return internalY.value; 45456 }, 45457 set(y2) { 45458 scrollTo(void 0, y2); 45459 } 45460 }); 45461 function scrollTo(_x, _y) { 45462 var _a, _b, _c, _d; 45463 if (!window) 45464 return; 45465 const _element = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element); 45466 if (!_element) 45467 return; 45468 (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({ 45469 top: (_a = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(_y)) != null ? _a : y.value, 45470 left: (_b = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(_x)) != null ? _b : x.value, 45471 behavior: (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(behavior) 45472 }); 45473 const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element; 45474 if (x != null) 45475 internalX.value = scrollContainer.scrollLeft; 45476 if (y != null) 45477 internalY.value = scrollContainer.scrollTop; 45478 } 45479 const isScrolling = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45480 const arrivedState = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ 45481 left: true, 45482 right: false, 45483 top: true, 45484 bottom: false 45485 }); 45486 const directions = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ 45487 left: false, 45488 right: false, 45489 top: false, 45490 bottom: false 45491 }); 45492 const onScrollEnd = (e) => { 45493 if (!isScrolling.value) 45494 return; 45495 isScrolling.value = false; 45496 directions.left = false; 45497 directions.right = false; 45498 directions.top = false; 45499 directions.bottom = false; 45500 onStop(e); 45501 }; 45502 const onScrollEndDebounced = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useDebounceFn)(onScrollEnd, throttle + idle); 45503 const setArrivedState = (target) => { 45504 var _a; 45505 if (!window) 45506 return; 45507 const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target); 45508 const { display, flexDirection } = getComputedStyle(el); 45509 const scrollLeft = el.scrollLeft; 45510 directions.left = scrollLeft < internalX.value; 45511 directions.right = scrollLeft > internalX.value; 45512 const left = Math.abs(scrollLeft) <= (offset.left || 0); 45513 const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; 45514 if (display === "flex" && flexDirection === "row-reverse") { 45515 arrivedState.left = right; 45516 arrivedState.right = left; 45517 } else { 45518 arrivedState.left = left; 45519 arrivedState.right = right; 45520 } 45521 internalX.value = scrollLeft; 45522 let scrollTop = el.scrollTop; 45523 if (target === window.document && !scrollTop) 45524 scrollTop = window.document.body.scrollTop; 45525 directions.top = scrollTop < internalY.value; 45526 directions.bottom = scrollTop > internalY.value; 45527 const top = Math.abs(scrollTop) <= (offset.top || 0); 45528 const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; 45529 if (display === "flex" && flexDirection === "column-reverse") { 45530 arrivedState.top = bottom; 45531 arrivedState.bottom = top; 45532 } else { 45533 arrivedState.top = top; 45534 arrivedState.bottom = bottom; 45535 } 45536 internalY.value = scrollTop; 45537 }; 45538 const onScrollHandler = (e) => { 45539 var _a; 45540 if (!window) 45541 return; 45542 const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target; 45543 setArrivedState(eventTarget); 45544 isScrolling.value = true; 45545 onScrollEndDebounced(e); 45546 onScroll(e); 45547 }; 45548 useEventListener( 45549 element, 45550 "scroll", 45551 throttle ? (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useThrottleFn)(onScrollHandler, throttle, true, false) : onScrollHandler, 45552 eventListenerOptions 45553 ); 45554 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 45555 try { 45556 const _element = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element); 45557 if (!_element) 45558 return; 45559 setArrivedState(_element); 45560 } catch (e) { 45561 onError(e); 45562 } 45563 }); 45564 useEventListener( 45565 element, 45566 "scrollend", 45567 onScrollEnd, 45568 eventListenerOptions 45569 ); 45570 return { 45571 x, 45572 y, 45573 isScrolling, 45574 arrivedState, 45575 directions, 45576 measure() { 45577 const _element = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element); 45578 if (window && _element) 45579 setArrivedState(_element); 45580 } 45581 }; 45582} 45583 45584function resolveElement(el) { 45585 if (typeof Window !== "undefined" && el instanceof Window) 45586 return el.document.documentElement; 45587 if (typeof Document !== "undefined" && el instanceof Document) 45588 return el.documentElement; 45589 return el; 45590} 45591 45592function useInfiniteScroll(element, onLoadMore, options = {}) { 45593 var _a; 45594 const { 45595 direction = "bottom", 45596 interval = 100, 45597 canLoadMore = () => true 45598 } = options; 45599 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(useScroll( 45600 element, 45601 { 45602 ...options, 45603 offset: { 45604 [direction]: (_a = options.distance) != null ? _a : 0, 45605 ...options.offset 45606 } 45607 } 45608 )); 45609 const promise = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 45610 const isLoading = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => !!promise.value); 45611 const observedElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 45612 return resolveElement((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element)); 45613 }); 45614 const isElementVisible = useElementVisibility(observedElement); 45615 function checkAndLoad() { 45616 state.measure(); 45617 if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value)) 45618 return; 45619 const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value; 45620 const isNarrower = direction === "bottom" || direction === "top" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth; 45621 if (state.arrivedState[direction] || isNarrower) { 45622 if (!promise.value) { 45623 promise.value = Promise.all([ 45624 onLoadMore(state), 45625 new Promise((resolve) => setTimeout(resolve, interval)) 45626 ]).finally(() => { 45627 promise.value = null; 45628 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => checkAndLoad()); 45629 }); 45630 } 45631 } 45632 } 45633 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 45634 () => [state.arrivedState[direction], isElementVisible.value], 45635 checkAndLoad, 45636 { immediate: true } 45637 ); 45638 return { 45639 isLoading 45640 }; 45641} 45642 45643const defaultEvents = ["mousedown", "mouseup", "keydown", "keyup"]; 45644function useKeyModifier(modifier, options = {}) { 45645 const { 45646 events = defaultEvents, 45647 document = defaultDocument, 45648 initial = null 45649 } = options; 45650 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initial); 45651 if (document) { 45652 events.forEach((listenerEvent) => { 45653 useEventListener(document, listenerEvent, (evt) => { 45654 if (typeof evt.getModifierState === "function") 45655 state.value = evt.getModifierState(modifier); 45656 }); 45657 }); 45658 } 45659 return state; 45660} 45661 45662function useLocalStorage(key, initialValue, options = {}) { 45663 const { window = defaultWindow } = options; 45664 return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options); 45665} 45666 45667const DefaultMagicKeysAliasMap = { 45668 ctrl: "control", 45669 command: "meta", 45670 cmd: "meta", 45671 option: "alt", 45672 up: "arrowup", 45673 down: "arrowdown", 45674 left: "arrowleft", 45675 right: "arrowright" 45676}; 45677 45678function useMagicKeys(options = {}) { 45679 const { 45680 reactive: useReactive = false, 45681 target = defaultWindow, 45682 aliasMap = DefaultMagicKeysAliasMap, 45683 passive = true, 45684 onEventFired = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop 45685 } = options; 45686 const current = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(/* @__PURE__ */ new Set()); 45687 const obj = { 45688 toJSON() { 45689 return {}; 45690 }, 45691 current 45692 }; 45693 const refs = useReactive ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(obj) : obj; 45694 const metaDeps = /* @__PURE__ */ new Set(); 45695 const usedKeys = /* @__PURE__ */ new Set(); 45696 function setRefs(key, value) { 45697 if (key in refs) { 45698 if (useReactive) 45699 refs[key] = value; 45700 else 45701 refs[key].value = value; 45702 } 45703 } 45704 function reset() { 45705 current.clear(); 45706 for (const key of usedKeys) 45707 setRefs(key, false); 45708 } 45709 function updateRefs(e, value) { 45710 var _a, _b; 45711 const key = (_a = e.key) == null ? void 0 : _a.toLowerCase(); 45712 const code = (_b = e.code) == null ? void 0 : _b.toLowerCase(); 45713 const values = [code, key].filter(Boolean); 45714 if (key) { 45715 if (value) 45716 current.add(key); 45717 else 45718 current.delete(key); 45719 } 45720 for (const key2 of values) { 45721 usedKeys.add(key2); 45722 setRefs(key2, value); 45723 } 45724 if (key === "meta" && !value) { 45725 metaDeps.forEach((key2) => { 45726 current.delete(key2); 45727 setRefs(key2, false); 45728 }); 45729 metaDeps.clear(); 45730 } else if (typeof e.getModifierState === "function" && e.getModifierState("Meta") && value) { 45731 [...current, ...values].forEach((key2) => metaDeps.add(key2)); 45732 } 45733 } 45734 useEventListener(target, "keydown", (e) => { 45735 updateRefs(e, true); 45736 return onEventFired(e); 45737 }, { passive }); 45738 useEventListener(target, "keyup", (e) => { 45739 updateRefs(e, false); 45740 return onEventFired(e); 45741 }, { passive }); 45742 useEventListener("blur", reset, { passive: true }); 45743 useEventListener("focus", reset, { passive: true }); 45744 const proxy = new Proxy( 45745 refs, 45746 { 45747 get(target2, prop, rec) { 45748 if (typeof prop !== "string") 45749 return Reflect.get(target2, prop, rec); 45750 prop = prop.toLowerCase(); 45751 if (prop in aliasMap) 45752 prop = aliasMap[prop]; 45753 if (!(prop in refs)) { 45754 if (/[+_-]/.test(prop)) { 45755 const keys = prop.split(/[+_-]/g).map((i) => i.trim()); 45756 refs[prop] = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => keys.every((key) => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(proxy[key]))); 45757 } else { 45758 refs[prop] = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45759 } 45760 } 45761 const r = Reflect.get(target2, prop, rec); 45762 return useReactive ? (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(r) : r; 45763 } 45764 } 45765 ); 45766 return proxy; 45767} 45768 45769function usingElRef(source, cb) { 45770 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)) 45771 cb((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)); 45772} 45773function timeRangeToArray(timeRanges) { 45774 let ranges = []; 45775 for (let i = 0; i < timeRanges.length; ++i) 45776 ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]]; 45777 return ranges; 45778} 45779function tracksToArray(tracks) { 45780 return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType })); 45781} 45782const defaultOptions = { 45783 src: "", 45784 tracks: [] 45785}; 45786function useMediaControls(target, options = {}) { 45787 target = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(target); 45788 options = { 45789 ...defaultOptions, 45790 ...options 45791 }; 45792 const { 45793 document = defaultDocument 45794 } = options; 45795 const currentTime = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 45796 const duration = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 45797 const seeking = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45798 const volume = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(1); 45799 const waiting = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45800 const ended = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45801 const playing = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45802 const rate = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(1); 45803 const stalled = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45804 const buffered = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 45805 const tracks = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 45806 const selectedTrack = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(-1); 45807 const isPictureInPicture = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45808 const muted = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 45809 const supportsPictureInPicture = document && "pictureInPictureEnabled" in document; 45810 const sourceErrorEvent = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 45811 const disableTrack = (track) => { 45812 usingElRef(target, (el) => { 45813 if (track) { 45814 const id = typeof track === "number" ? track : track.id; 45815 el.textTracks[id].mode = "disabled"; 45816 } else { 45817 for (let i = 0; i < el.textTracks.length; ++i) 45818 el.textTracks[i].mode = "disabled"; 45819 } 45820 selectedTrack.value = -1; 45821 }); 45822 }; 45823 const enableTrack = (track, disableTracks = true) => { 45824 usingElRef(target, (el) => { 45825 const id = typeof track === "number" ? track : track.id; 45826 if (disableTracks) 45827 disableTrack(); 45828 el.textTracks[id].mode = "showing"; 45829 selectedTrack.value = id; 45830 }); 45831 }; 45832 const togglePictureInPicture = () => { 45833 return new Promise((resolve, reject) => { 45834 usingElRef(target, async (el) => { 45835 if (supportsPictureInPicture) { 45836 if (!isPictureInPicture.value) { 45837 el.requestPictureInPicture().then(resolve).catch(reject); 45838 } else { 45839 document.exitPictureInPicture().then(resolve).catch(reject); 45840 } 45841 } 45842 }); 45843 }); 45844 }; 45845 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watchEffect)(() => { 45846 if (!document) 45847 return; 45848 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45849 if (!el) 45850 return; 45851 const src = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.src); 45852 let sources = []; 45853 if (!src) 45854 return; 45855 if (typeof src === "string") 45856 sources = [{ src }]; 45857 else if (Array.isArray(src)) 45858 sources = src; 45859 else if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(src)) 45860 sources = [src]; 45861 el.querySelectorAll("source").forEach((e) => { 45862 e.removeEventListener("error", sourceErrorEvent.trigger); 45863 e.remove(); 45864 }); 45865 sources.forEach(({ src: src2, type }) => { 45866 const source = document.createElement("source"); 45867 source.setAttribute("src", src2); 45868 source.setAttribute("type", type || ""); 45869 source.addEventListener("error", sourceErrorEvent.trigger); 45870 el.appendChild(source); 45871 }); 45872 el.load(); 45873 }); 45874 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 45875 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45876 if (!el) 45877 return; 45878 el.querySelectorAll("source").forEach((e) => e.removeEventListener("error", sourceErrorEvent.trigger)); 45879 }); 45880 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([target, volume], () => { 45881 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45882 if (!el) 45883 return; 45884 el.volume = volume.value; 45885 }); 45886 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([target, muted], () => { 45887 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45888 if (!el) 45889 return; 45890 el.muted = muted.value; 45891 }); 45892 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([target, rate], () => { 45893 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45894 if (!el) 45895 return; 45896 el.playbackRate = rate.value; 45897 }); 45898 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watchEffect)(() => { 45899 if (!document) 45900 return; 45901 const textTracks = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.tracks); 45902 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45903 if (!textTracks || !textTracks.length || !el) 45904 return; 45905 el.querySelectorAll("track").forEach((e) => e.remove()); 45906 textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => { 45907 const track = document.createElement("track"); 45908 track.default = isDefault || false; 45909 track.kind = kind; 45910 track.label = label; 45911 track.src = src; 45912 track.srclang = srcLang; 45913 if (track.default) 45914 selectedTrack.value = i; 45915 el.appendChild(track); 45916 }); 45917 }); 45918 const { ignoreUpdates: ignoreCurrentTimeUpdates } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchIgnorable)(currentTime, (time) => { 45919 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45920 if (!el) 45921 return; 45922 el.currentTime = time; 45923 }); 45924 const { ignoreUpdates: ignorePlayingUpdates } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchIgnorable)(playing, (isPlaying) => { 45925 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45926 if (!el) 45927 return; 45928 isPlaying ? el.play() : el.pause(); 45929 }); 45930 useEventListener(target, "timeupdate", () => ignoreCurrentTimeUpdates(() => currentTime.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).currentTime)); 45931 useEventListener(target, "durationchange", () => duration.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).duration); 45932 useEventListener(target, "progress", () => buffered.value = timeRangeToArray((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).buffered)); 45933 useEventListener(target, "seeking", () => seeking.value = true); 45934 useEventListener(target, "seeked", () => seeking.value = false); 45935 useEventListener(target, ["waiting", "loadstart"], () => { 45936 waiting.value = true; 45937 ignorePlayingUpdates(() => playing.value = false); 45938 }); 45939 useEventListener(target, "loadeddata", () => waiting.value = false); 45940 useEventListener(target, "playing", () => { 45941 waiting.value = false; 45942 ended.value = false; 45943 ignorePlayingUpdates(() => playing.value = true); 45944 }); 45945 useEventListener(target, "ratechange", () => rate.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target).playbackRate); 45946 useEventListener(target, "stalled", () => stalled.value = true); 45947 useEventListener(target, "ended", () => ended.value = true); 45948 useEventListener(target, "pause", () => ignorePlayingUpdates(() => playing.value = false)); 45949 useEventListener(target, "play", () => ignorePlayingUpdates(() => playing.value = true)); 45950 useEventListener(target, "enterpictureinpicture", () => isPictureInPicture.value = true); 45951 useEventListener(target, "leavepictureinpicture", () => isPictureInPicture.value = false); 45952 useEventListener(target, "volumechange", () => { 45953 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45954 if (!el) 45955 return; 45956 volume.value = el.volume; 45957 muted.value = el.muted; 45958 }); 45959 const listeners = []; 45960 const stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([target], () => { 45961 const el = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(target); 45962 if (!el) 45963 return; 45964 stop(); 45965 listeners[0] = useEventListener(el.textTracks, "addtrack", () => tracks.value = tracksToArray(el.textTracks)); 45966 listeners[1] = useEventListener(el.textTracks, "removetrack", () => tracks.value = tracksToArray(el.textTracks)); 45967 listeners[2] = useEventListener(el.textTracks, "change", () => tracks.value = tracksToArray(el.textTracks)); 45968 }); 45969 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => listeners.forEach((listener) => listener())); 45970 return { 45971 currentTime, 45972 duration, 45973 waiting, 45974 seeking, 45975 ended, 45976 stalled, 45977 buffered, 45978 playing, 45979 rate, 45980 // Volume 45981 volume, 45982 muted, 45983 // Tracks 45984 tracks, 45985 selectedTrack, 45986 enableTrack, 45987 disableTrack, 45988 // Picture in Picture 45989 supportsPictureInPicture, 45990 togglePictureInPicture, 45991 isPictureInPicture, 45992 // Events 45993 onSourceError: sourceErrorEvent.on 45994 }; 45995} 45996 45997function getMapVue2Compat() { 45998 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowReactive)({}); 45999 return { 46000 get: (key) => data[key], 46001 set: (key, value) => (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.set)(data, key, value), 46002 has: (key) => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(data, key), 46003 delete: (key) => (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.del)(data, key), 46004 clear: () => { 46005 Object.keys(data).forEach((key) => { 46006 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.del)(data, key); 46007 }); 46008 } 46009 }; 46010} 46011function useMemoize(resolver, options) { 46012 const initCache = () => { 46013 if (options == null ? void 0 : options.cache) 46014 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowReactive)(options.cache); 46015 if (vue_demi__WEBPACK_IMPORTED_MODULE_1__.isVue2) 46016 return getMapVue2Compat(); 46017 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowReactive)(/* @__PURE__ */ new Map()); 46018 }; 46019 const cache = initCache(); 46020 const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args); 46021 const _loadData = (key, ...args) => { 46022 cache.set(key, resolver(...args)); 46023 return cache.get(key); 46024 }; 46025 const loadData = (...args) => _loadData(generateKey(...args), ...args); 46026 const deleteData = (...args) => { 46027 cache.delete(generateKey(...args)); 46028 }; 46029 const clearData = () => { 46030 cache.clear(); 46031 }; 46032 const memoized = (...args) => { 46033 const key = generateKey(...args); 46034 if (cache.has(key)) 46035 return cache.get(key); 46036 return _loadData(key, ...args); 46037 }; 46038 memoized.load = loadData; 46039 memoized.delete = deleteData; 46040 memoized.clear = clearData; 46041 memoized.generateKey = generateKey; 46042 memoized.cache = cache; 46043 return memoized; 46044} 46045 46046function useMemory(options = {}) { 46047 const memory = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 46048 const isSupported = useSupported(() => typeof performance !== "undefined" && "memory" in performance); 46049 if (isSupported.value) { 46050 const { interval = 1e3 } = options; 46051 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)(() => { 46052 memory.value = performance.memory; 46053 }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback }); 46054 } 46055 return { isSupported, memory }; 46056} 46057 46058const UseMouseBuiltinExtractors = { 46059 page: (event) => [event.pageX, event.pageY], 46060 client: (event) => [event.clientX, event.clientY], 46061 screen: (event) => [event.screenX, event.screenY], 46062 movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY] 46063}; 46064function useMouse(options = {}) { 46065 const { 46066 type = "page", 46067 touch = true, 46068 resetOnTouchEnds = false, 46069 initialValue = { x: 0, y: 0 }, 46070 window = defaultWindow, 46071 target = window, 46072 scroll = true, 46073 eventFilter 46074 } = options; 46075 let _prevMouseEvent = null; 46076 const x = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue.x); 46077 const y = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue.y); 46078 const sourceType = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 46079 const extractor = typeof type === "function" ? type : UseMouseBuiltinExtractors[type]; 46080 const mouseHandler = (event) => { 46081 const result = extractor(event); 46082 _prevMouseEvent = event; 46083 if (result) { 46084 [x.value, y.value] = result; 46085 sourceType.value = "mouse"; 46086 } 46087 }; 46088 const touchHandler = (event) => { 46089 if (event.touches.length > 0) { 46090 const result = extractor(event.touches[0]); 46091 if (result) { 46092 [x.value, y.value] = result; 46093 sourceType.value = "touch"; 46094 } 46095 } 46096 }; 46097 const scrollHandler = () => { 46098 if (!_prevMouseEvent || !window) 46099 return; 46100 const pos = extractor(_prevMouseEvent); 46101 if (_prevMouseEvent instanceof MouseEvent && pos) { 46102 x.value = pos[0] + window.scrollX; 46103 y.value = pos[1] + window.scrollY; 46104 } 46105 }; 46106 const reset = () => { 46107 x.value = initialValue.x; 46108 y.value = initialValue.y; 46109 }; 46110 const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event); 46111 const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event); 46112 const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler(); 46113 if (target) { 46114 const listenerOptions = { passive: true }; 46115 useEventListener(target, ["mousemove", "dragover"], mouseHandlerWrapper, listenerOptions); 46116 if (touch && type !== "movement") { 46117 useEventListener(target, ["touchstart", "touchmove"], touchHandlerWrapper, listenerOptions); 46118 if (resetOnTouchEnds) 46119 useEventListener(target, "touchend", reset, listenerOptions); 46120 } 46121 if (scroll && type === "page") 46122 useEventListener(window, "scroll", scrollHandlerWrapper, { passive: true }); 46123 } 46124 return { 46125 x, 46126 y, 46127 sourceType 46128 }; 46129} 46130 46131function useMouseInElement(target, options = {}) { 46132 const { 46133 handleOutside = true, 46134 window = defaultWindow 46135 } = options; 46136 const type = options.type || "page"; 46137 const { x, y, sourceType } = useMouse(options); 46138 const targetRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(target != null ? target : window == null ? void 0 : window.document.body); 46139 const elementX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46140 const elementY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46141 const elementPositionX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46142 const elementPositionY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46143 const elementHeight = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46144 const elementWidth = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0); 46145 const isOutside = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(true); 46146 let stop = () => { 46147 }; 46148 if (window) { 46149 stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 46150 [targetRef, x, y], 46151 () => { 46152 const el = unrefElement(targetRef); 46153 if (!el) 46154 return; 46155 const { 46156 left, 46157 top, 46158 width, 46159 height 46160 } = el.getBoundingClientRect(); 46161 elementPositionX.value = left + (type === "page" ? window.pageXOffset : 0); 46162 elementPositionY.value = top + (type === "page" ? window.pageYOffset : 0); 46163 elementHeight.value = height; 46164 elementWidth.value = width; 46165 const elX = x.value - elementPositionX.value; 46166 const elY = y.value - elementPositionY.value; 46167 isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height; 46168 if (handleOutside || !isOutside.value) { 46169 elementX.value = elX; 46170 elementY.value = elY; 46171 } 46172 }, 46173 { immediate: true } 46174 ); 46175 useEventListener(document, "mouseleave", () => { 46176 isOutside.value = true; 46177 }); 46178 } 46179 return { 46180 x, 46181 y, 46182 sourceType, 46183 elementX, 46184 elementY, 46185 elementPositionX, 46186 elementPositionY, 46187 elementHeight, 46188 elementWidth, 46189 isOutside, 46190 stop 46191 }; 46192} 46193 46194function useMousePressed(options = {}) { 46195 const { 46196 touch = true, 46197 drag = true, 46198 capture = false, 46199 initialValue = false, 46200 window = defaultWindow 46201 } = options; 46202 const pressed = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue); 46203 const sourceType = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 46204 if (!window) { 46205 return { 46206 pressed, 46207 sourceType 46208 }; 46209 } 46210 const onPressed = (srcType) => () => { 46211 pressed.value = true; 46212 sourceType.value = srcType; 46213 }; 46214 const onReleased = () => { 46215 pressed.value = false; 46216 sourceType.value = null; 46217 }; 46218 const target = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => unrefElement(options.target) || window); 46219 useEventListener(target, "mousedown", onPressed("mouse"), { passive: true, capture }); 46220 useEventListener(window, "mouseleave", onReleased, { passive: true, capture }); 46221 useEventListener(window, "mouseup", onReleased, { passive: true, capture }); 46222 if (drag) { 46223 useEventListener(target, "dragstart", onPressed("mouse"), { passive: true, capture }); 46224 useEventListener(window, "drop", onReleased, { passive: true, capture }); 46225 useEventListener(window, "dragend", onReleased, { passive: true, capture }); 46226 } 46227 if (touch) { 46228 useEventListener(target, "touchstart", onPressed("touch"), { passive: true, capture }); 46229 useEventListener(window, "touchend", onReleased, { passive: true, capture }); 46230 useEventListener(window, "touchcancel", onReleased, { passive: true, capture }); 46231 } 46232 return { 46233 pressed, 46234 sourceType 46235 }; 46236} 46237 46238function useNavigatorLanguage(options = {}) { 46239 const { window = defaultWindow } = options; 46240 const navigator = window == null ? void 0 : window.navigator; 46241 const isSupported = useSupported(() => navigator && "language" in navigator); 46242 const language = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(navigator == null ? void 0 : navigator.language); 46243 useEventListener(window, "languagechange", () => { 46244 if (navigator) 46245 language.value = navigator.language; 46246 }); 46247 return { 46248 isSupported, 46249 language 46250 }; 46251} 46252 46253function useNetwork(options = {}) { 46254 const { window = defaultWindow } = options; 46255 const navigator = window == null ? void 0 : window.navigator; 46256 const isSupported = useSupported(() => navigator && "connection" in navigator); 46257 const isOnline = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(true); 46258 const saveData = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 46259 const offlineAt = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46260 const onlineAt = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46261 const downlink = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46262 const downlinkMax = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46263 const rtt = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46264 const effectiveType = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(void 0); 46265 const type = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("unknown"); 46266 const connection = isSupported.value && navigator.connection; 46267 function updateNetworkInformation() { 46268 if (!navigator) 46269 return; 46270 isOnline.value = navigator.onLine; 46271 offlineAt.value = isOnline.value ? void 0 : Date.now(); 46272 onlineAt.value = isOnline.value ? Date.now() : void 0; 46273 if (connection) { 46274 downlink.value = connection.downlink; 46275 downlinkMax.value = connection.downlinkMax; 46276 effectiveType.value = connection.effectiveType; 46277 rtt.value = connection.rtt; 46278 saveData.value = connection.saveData; 46279 type.value = connection.type; 46280 } 46281 } 46282 if (window) { 46283 useEventListener(window, "offline", () => { 46284 isOnline.value = false; 46285 offlineAt.value = Date.now(); 46286 }); 46287 useEventListener(window, "online", () => { 46288 isOnline.value = true; 46289 onlineAt.value = Date.now(); 46290 }); 46291 } 46292 if (connection) 46293 useEventListener(connection, "change", updateNetworkInformation, false); 46294 updateNetworkInformation(); 46295 return { 46296 isSupported, 46297 isOnline, 46298 saveData, 46299 offlineAt, 46300 onlineAt, 46301 downlink, 46302 downlinkMax, 46303 effectiveType, 46304 rtt, 46305 type 46306 }; 46307} 46308 46309function useNow(options = {}) { 46310 const { 46311 controls: exposeControls = false, 46312 interval = "requestAnimationFrame" 46313 } = options; 46314 const now = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(/* @__PURE__ */ new Date()); 46315 const update = () => now.value = /* @__PURE__ */ new Date(); 46316 const controls = interval === "requestAnimationFrame" ? useRafFn(update, { immediate: true }) : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)(update, interval, { immediate: true }); 46317 if (exposeControls) { 46318 return { 46319 now, 46320 ...controls 46321 }; 46322 } else { 46323 return now; 46324 } 46325} 46326 46327function useObjectUrl(object) { 46328 const url = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 46329 const release = () => { 46330 if (url.value) 46331 URL.revokeObjectURL(url.value); 46332 url.value = void 0; 46333 }; 46334 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 46335 () => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(object), 46336 (newObject) => { 46337 release(); 46338 if (newObject) 46339 url.value = URL.createObjectURL(newObject); 46340 }, 46341 { immediate: true } 46342 ); 46343 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(release); 46344 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(url); 46345} 46346 46347function useClamp(value, min, max) { 46348 if (typeof value === "function" || (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isReadonly)(value)) 46349 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.clamp)((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(value), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(min), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(max))); 46350 const _value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(value); 46351 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 46352 get() { 46353 return _value.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.clamp)(_value.value, (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(min), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(max)); 46354 }, 46355 set(value2) { 46356 _value.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.clamp)(value2, (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(min), (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(max)); 46357 } 46358 }); 46359} 46360 46361function useOffsetPagination(options) { 46362 const { 46363 total = Number.POSITIVE_INFINITY, 46364 pageSize = 10, 46365 page = 1, 46366 onPageChange = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 46367 onPageSizeChange = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, 46368 onPageCountChange = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop 46369 } = options; 46370 const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY); 46371 const pageCount = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => Math.max( 46372 1, 46373 Math.ceil((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(total) / (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(currentPageSize)) 46374 )); 46375 const currentPage = useClamp(page, 1, pageCount); 46376 const isFirstPage = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => currentPage.value === 1); 46377 const isLastPage = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => currentPage.value === pageCount.value); 46378 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(page)) { 46379 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.syncRef)(page, currentPage, { 46380 direction: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isReadonly)(page) ? "ltr" : "both" 46381 }); 46382 } 46383 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(pageSize)) { 46384 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.syncRef)(pageSize, currentPageSize, { 46385 direction: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isReadonly)(pageSize) ? "ltr" : "both" 46386 }); 46387 } 46388 function prev() { 46389 currentPage.value--; 46390 } 46391 function next() { 46392 currentPage.value++; 46393 } 46394 const returnValue = { 46395 currentPage, 46396 currentPageSize, 46397 pageCount, 46398 isFirstPage, 46399 isLastPage, 46400 prev, 46401 next 46402 }; 46403 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(currentPage, () => { 46404 onPageChange((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(returnValue)); 46405 }); 46406 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(currentPageSize, () => { 46407 onPageSizeChange((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(returnValue)); 46408 }); 46409 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(pageCount, () => { 46410 onPageCountChange((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(returnValue)); 46411 }); 46412 return returnValue; 46413} 46414 46415function useOnline(options = {}) { 46416 const { isOnline } = useNetwork(options); 46417 return isOnline; 46418} 46419 46420function usePageLeave(options = {}) { 46421 const { window = defaultWindow } = options; 46422 const isLeft = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 46423 const handler = (event) => { 46424 if (!window) 46425 return; 46426 event = event || window.event; 46427 const from = event.relatedTarget || event.toElement; 46428 isLeft.value = !from; 46429 }; 46430 if (window) { 46431 useEventListener(window, "mouseout", handler, { passive: true }); 46432 useEventListener(window.document, "mouseleave", handler, { passive: true }); 46433 useEventListener(window.document, "mouseenter", handler, { passive: true }); 46434 } 46435 return isLeft; 46436} 46437 46438function useScreenOrientation(options = {}) { 46439 const { 46440 window = defaultWindow 46441 } = options; 46442 const isSupported = useSupported(() => window && "screen" in window && "orientation" in window.screen); 46443 const screenOrientation = isSupported.value ? window.screen.orientation : {}; 46444 const orientation = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(screenOrientation.type); 46445 const angle = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(screenOrientation.angle || 0); 46446 if (isSupported.value) { 46447 useEventListener(window, "orientationchange", () => { 46448 orientation.value = screenOrientation.type; 46449 angle.value = screenOrientation.angle; 46450 }); 46451 } 46452 const lockOrientation = (type) => { 46453 if (isSupported.value && typeof screenOrientation.lock === "function") 46454 return screenOrientation.lock(type); 46455 return Promise.reject(new Error("Not supported")); 46456 }; 46457 const unlockOrientation = () => { 46458 if (isSupported.value && typeof screenOrientation.unlock === "function") 46459 screenOrientation.unlock(); 46460 }; 46461 return { 46462 isSupported, 46463 orientation, 46464 angle, 46465 lockOrientation, 46466 unlockOrientation 46467 }; 46468} 46469 46470function useParallax(target, options = {}) { 46471 const { 46472 deviceOrientationTiltAdjust = (i) => i, 46473 deviceOrientationRollAdjust = (i) => i, 46474 mouseTiltAdjust = (i) => i, 46475 mouseRollAdjust = (i) => i, 46476 window = defaultWindow 46477 } = options; 46478 const orientation = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(useDeviceOrientation({ window })); 46479 const screenOrientation = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(useScreenOrientation({ window })); 46480 const { 46481 elementX: x, 46482 elementY: y, 46483 elementWidth: width, 46484 elementHeight: height 46485 } = useMouseInElement(target, { handleOutside: false, window }); 46486 const source = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46487 if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) { 46488 return "deviceOrientation"; 46489 } 46490 return "mouse"; 46491 }); 46492 const roll = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46493 if (source.value === "deviceOrientation") { 46494 let value; 46495 switch (screenOrientation.orientation) { 46496 case "landscape-primary": 46497 value = orientation.gamma / 90; 46498 break; 46499 case "landscape-secondary": 46500 value = -orientation.gamma / 90; 46501 break; 46502 case "portrait-primary": 46503 value = -orientation.beta / 90; 46504 break; 46505 case "portrait-secondary": 46506 value = orientation.beta / 90; 46507 break; 46508 default: 46509 value = -orientation.beta / 90; 46510 } 46511 return deviceOrientationRollAdjust(value); 46512 } else { 46513 const value = -(y.value - height.value / 2) / height.value; 46514 return mouseRollAdjust(value); 46515 } 46516 }); 46517 const tilt = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46518 if (source.value === "deviceOrientation") { 46519 let value; 46520 switch (screenOrientation.orientation) { 46521 case "landscape-primary": 46522 value = orientation.beta / 90; 46523 break; 46524 case "landscape-secondary": 46525 value = -orientation.beta / 90; 46526 break; 46527 case "portrait-primary": 46528 value = orientation.gamma / 90; 46529 break; 46530 case "portrait-secondary": 46531 value = -orientation.gamma / 90; 46532 break; 46533 default: 46534 value = orientation.gamma / 90; 46535 } 46536 return deviceOrientationTiltAdjust(value); 46537 } else { 46538 const value = (x.value - width.value / 2) / width.value; 46539 return mouseTiltAdjust(value); 46540 } 46541 }); 46542 return { roll, tilt, source }; 46543} 46544 46545function useParentElement(element = useCurrentElement()) { 46546 const parentElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); 46547 const update = () => { 46548 const el = unrefElement(element); 46549 if (el) 46550 parentElement.value = el.parentElement; 46551 }; 46552 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(update); 46553 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element), update); 46554 return parentElement; 46555} 46556 46557function usePerformanceObserver(options, callback) { 46558 const { 46559 window = defaultWindow, 46560 immediate = true, 46561 ...performanceOptions 46562 } = options; 46563 const isSupported = useSupported(() => window && "PerformanceObserver" in window); 46564 let observer; 46565 const stop = () => { 46566 observer == null ? void 0 : observer.disconnect(); 46567 }; 46568 const start = () => { 46569 if (isSupported.value) { 46570 stop(); 46571 observer = new PerformanceObserver(callback); 46572 observer.observe(performanceOptions); 46573 } 46574 }; 46575 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(stop); 46576 if (immediate) 46577 start(); 46578 return { 46579 isSupported, 46580 start, 46581 stop 46582 }; 46583} 46584 46585const defaultState = { 46586 x: 0, 46587 y: 0, 46588 pointerId: 0, 46589 pressure: 0, 46590 tiltX: 0, 46591 tiltY: 0, 46592 width: 0, 46593 height: 0, 46594 twist: 0, 46595 pointerType: null 46596}; 46597const keys = /* @__PURE__ */ Object.keys(defaultState); 46598function usePointer(options = {}) { 46599 const { 46600 target = defaultWindow 46601 } = options; 46602 const isInside = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 46603 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(options.initialValue || {}); 46604 Object.assign(state.value, defaultState, state.value); 46605 const handler = (event) => { 46606 isInside.value = true; 46607 if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) 46608 return; 46609 state.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.objectPick)(event, keys, false); 46610 }; 46611 if (target) { 46612 const listenerOptions = { passive: true }; 46613 useEventListener(target, ["pointerdown", "pointermove", "pointerup"], handler, listenerOptions); 46614 useEventListener(target, "pointerleave", () => isInside.value = false, listenerOptions); 46615 } 46616 return { 46617 ...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRefs)(state), 46618 isInside 46619 }; 46620} 46621 46622function usePointerLock(target, options = {}) { 46623 const { document = defaultDocument } = options; 46624 const isSupported = useSupported(() => document && "pointerLockElement" in document); 46625 const element = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 46626 const triggerElement = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 46627 let targetElement; 46628 if (isSupported.value) { 46629 useEventListener(document, "pointerlockchange", () => { 46630 var _a; 46631 const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value; 46632 if (targetElement && currentElement === targetElement) { 46633 element.value = document.pointerLockElement; 46634 if (!element.value) 46635 targetElement = triggerElement.value = null; 46636 } 46637 }); 46638 useEventListener(document, "pointerlockerror", () => { 46639 var _a; 46640 const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value; 46641 if (targetElement && currentElement === targetElement) { 46642 const action = document.pointerLockElement ? "release" : "acquire"; 46643 throw new Error(`Failed to ${action} pointer lock.`); 46644 } 46645 }); 46646 } 46647 async function lock(e) { 46648 var _a; 46649 if (!isSupported.value) 46650 throw new Error("Pointer Lock API is not supported by your browser."); 46651 triggerElement.value = e instanceof Event ? e.currentTarget : null; 46652 targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e); 46653 if (!targetElement) 46654 throw new Error("Target element undefined."); 46655 targetElement.requestPointerLock(); 46656 return await (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.until)(element).toBe(targetElement); 46657 } 46658 async function unlock() { 46659 if (!element.value) 46660 return false; 46661 document.exitPointerLock(); 46662 await (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.until)(element).toBeNull(); 46663 return true; 46664 } 46665 return { 46666 isSupported, 46667 element, 46668 triggerElement, 46669 lock, 46670 unlock 46671 }; 46672} 46673 46674function usePointerSwipe(target, options = {}) { 46675 const targetRef = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(target); 46676 const { 46677 threshold = 50, 46678 onSwipe, 46679 onSwipeEnd, 46680 onSwipeStart, 46681 disableTextSelect = false 46682 } = options; 46683 const posStart = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ x: 0, y: 0 }); 46684 const updatePosStart = (x, y) => { 46685 posStart.x = x; 46686 posStart.y = y; 46687 }; 46688 const posEnd = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ x: 0, y: 0 }); 46689 const updatePosEnd = (x, y) => { 46690 posEnd.x = x; 46691 posEnd.y = y; 46692 }; 46693 const distanceX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => posStart.x - posEnd.x); 46694 const distanceY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => posStart.y - posEnd.y); 46695 const { max, abs } = Math; 46696 const isThresholdExceeded = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold); 46697 const isSwiping = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 46698 const isPointerDown = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 46699 const direction = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46700 if (!isThresholdExceeded.value) 46701 return "none"; 46702 if (abs(distanceX.value) > abs(distanceY.value)) { 46703 return distanceX.value > 0 ? "left" : "right"; 46704 } else { 46705 return distanceY.value > 0 ? "up" : "down"; 46706 } 46707 }); 46708 const eventIsAllowed = (e) => { 46709 var _a, _b, _c; 46710 const isReleasingButton = e.buttons === 0; 46711 const isPrimaryButton = e.buttons === 1; 46712 return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true; 46713 }; 46714 const stops = [ 46715 useEventListener(target, "pointerdown", (e) => { 46716 if (!eventIsAllowed(e)) 46717 return; 46718 isPointerDown.value = true; 46719 const eventTarget = e.target; 46720 eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId); 46721 const { clientX: x, clientY: y } = e; 46722 updatePosStart(x, y); 46723 updatePosEnd(x, y); 46724 onSwipeStart == null ? void 0 : onSwipeStart(e); 46725 }), 46726 useEventListener(target, "pointermove", (e) => { 46727 if (!eventIsAllowed(e)) 46728 return; 46729 if (!isPointerDown.value) 46730 return; 46731 const { clientX: x, clientY: y } = e; 46732 updatePosEnd(x, y); 46733 if (!isSwiping.value && isThresholdExceeded.value) 46734 isSwiping.value = true; 46735 if (isSwiping.value) 46736 onSwipe == null ? void 0 : onSwipe(e); 46737 }), 46738 useEventListener(target, "pointerup", (e) => { 46739 if (!eventIsAllowed(e)) 46740 return; 46741 if (isSwiping.value) 46742 onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); 46743 isPointerDown.value = false; 46744 isSwiping.value = false; 46745 }) 46746 ]; 46747 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => { 46748 var _a, _b, _c, _d, _e, _f, _g, _h; 46749 (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty("touch-action", "none"); 46750 if (disableTextSelect) { 46751 (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty("-webkit-user-select", "none"); 46752 (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty("-ms-user-select", "none"); 46753 (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty("user-select", "none"); 46754 } 46755 }); 46756 const stop = () => stops.forEach((s) => s()); 46757 return { 46758 isSwiping: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(isSwiping), 46759 direction: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(direction), 46760 posStart: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(posStart), 46761 posEnd: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(posEnd), 46762 distanceX, 46763 distanceY, 46764 stop 46765 }; 46766} 46767 46768function usePreferredColorScheme(options) { 46769 const isLight = useMediaQuery("(prefers-color-scheme: light)", options); 46770 const isDark = useMediaQuery("(prefers-color-scheme: dark)", options); 46771 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46772 if (isDark.value) 46773 return "dark"; 46774 if (isLight.value) 46775 return "light"; 46776 return "no-preference"; 46777 }); 46778} 46779 46780function usePreferredContrast(options) { 46781 const isMore = useMediaQuery("(prefers-contrast: more)", options); 46782 const isLess = useMediaQuery("(prefers-contrast: less)", options); 46783 const isCustom = useMediaQuery("(prefers-contrast: custom)", options); 46784 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46785 if (isMore.value) 46786 return "more"; 46787 if (isLess.value) 46788 return "less"; 46789 if (isCustom.value) 46790 return "custom"; 46791 return "no-preference"; 46792 }); 46793} 46794 46795function usePreferredLanguages(options = {}) { 46796 const { window = defaultWindow } = options; 46797 if (!window) 46798 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(["en"]); 46799 const navigator = window.navigator; 46800 const value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(navigator.languages); 46801 useEventListener(window, "languagechange", () => { 46802 value.value = navigator.languages; 46803 }); 46804 return value; 46805} 46806 46807function usePreferredReducedMotion(options) { 46808 const isReduced = useMediaQuery("(prefers-reduced-motion: reduce)", options); 46809 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 46810 if (isReduced.value) 46811 return "reduce"; 46812 return "no-preference"; 46813 }); 46814} 46815 46816function usePrevious(value, initialValue) { 46817 const previous = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(initialValue); 46818 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 46819 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(value), 46820 (_, oldValue) => { 46821 previous.value = oldValue; 46822 }, 46823 { flush: "sync" } 46824 ); 46825 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(previous); 46826} 46827 46828const topVarName = "--vueuse-safe-area-top"; 46829const rightVarName = "--vueuse-safe-area-right"; 46830const bottomVarName = "--vueuse-safe-area-bottom"; 46831const leftVarName = "--vueuse-safe-area-left"; 46832function useScreenSafeArea() { 46833 const top = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 46834 const right = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 46835 const bottom = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 46836 const left = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 46837 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) { 46838 const topCssVar = useCssVar(topVarName); 46839 const rightCssVar = useCssVar(rightVarName); 46840 const bottomCssVar = useCssVar(bottomVarName); 46841 const leftCssVar = useCssVar(leftVarName); 46842 topCssVar.value = "env(safe-area-inset-top, 0px)"; 46843 rightCssVar.value = "env(safe-area-inset-right, 0px)"; 46844 bottomCssVar.value = "env(safe-area-inset-bottom, 0px)"; 46845 leftCssVar.value = "env(safe-area-inset-left, 0px)"; 46846 update(); 46847 useEventListener("resize", (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useDebounceFn)(update)); 46848 } 46849 function update() { 46850 top.value = getValue(topVarName); 46851 right.value = getValue(rightVarName); 46852 bottom.value = getValue(bottomVarName); 46853 left.value = getValue(leftVarName); 46854 } 46855 return { 46856 top, 46857 right, 46858 bottom, 46859 left, 46860 update 46861 }; 46862} 46863function getValue(position) { 46864 return getComputedStyle(document.documentElement).getPropertyValue(position); 46865} 46866 46867function useScriptTag(src, onLoaded = _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, options = {}) { 46868 const { 46869 immediate = true, 46870 manual = false, 46871 type = "text/javascript", 46872 async = true, 46873 crossOrigin, 46874 referrerPolicy, 46875 noModule, 46876 defer, 46877 document = defaultDocument, 46878 attrs = {} 46879 } = options; 46880 const scriptTag = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 46881 let _promise = null; 46882 const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => { 46883 const resolveWithElement = (el2) => { 46884 scriptTag.value = el2; 46885 resolve(el2); 46886 return el2; 46887 }; 46888 if (!document) { 46889 resolve(false); 46890 return; 46891 } 46892 let shouldAppend = false; 46893 let el = document.querySelector(`script[src="${(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(src)}"]`); 46894 if (!el) { 46895 el = document.createElement("script"); 46896 el.type = type; 46897 el.async = async; 46898 el.src = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(src); 46899 if (defer) 46900 el.defer = defer; 46901 if (crossOrigin) 46902 el.crossOrigin = crossOrigin; 46903 if (noModule) 46904 el.noModule = noModule; 46905 if (referrerPolicy) 46906 el.referrerPolicy = referrerPolicy; 46907 Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value)); 46908 shouldAppend = true; 46909 } else if (el.hasAttribute("data-loaded")) { 46910 resolveWithElement(el); 46911 } 46912 el.addEventListener("error", (event) => reject(event)); 46913 el.addEventListener("abort", (event) => reject(event)); 46914 el.addEventListener("load", () => { 46915 el.setAttribute("data-loaded", "true"); 46916 onLoaded(el); 46917 resolveWithElement(el); 46918 }); 46919 if (shouldAppend) 46920 el = document.head.appendChild(el); 46921 if (!waitForScriptLoad) 46922 resolveWithElement(el); 46923 }); 46924 const load = (waitForScriptLoad = true) => { 46925 if (!_promise) 46926 _promise = loadScript(waitForScriptLoad); 46927 return _promise; 46928 }; 46929 const unload = () => { 46930 if (!document) 46931 return; 46932 _promise = null; 46933 if (scriptTag.value) 46934 scriptTag.value = null; 46935 const el = document.querySelector(`script[src="${(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(src)}"]`); 46936 if (el) 46937 document.head.removeChild(el); 46938 }; 46939 if (immediate && !manual) 46940 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(load); 46941 if (!manual) 46942 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnUnmounted)(unload); 46943 return { scriptTag, load, unload }; 46944} 46945 46946function checkOverflowScroll(ele) { 46947 const style = window.getComputedStyle(ele); 46948 if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientWidth < ele.scrollWidth || style.overflowY === "auto" && ele.clientHeight < ele.scrollHeight) { 46949 return true; 46950 } else { 46951 const parent = ele.parentNode; 46952 if (!parent || parent.tagName === "BODY") 46953 return false; 46954 return checkOverflowScroll(parent); 46955 } 46956} 46957function preventDefault(rawEvent) { 46958 const e = rawEvent || window.event; 46959 const _target = e.target; 46960 if (checkOverflowScroll(_target)) 46961 return false; 46962 if (e.touches.length > 1) 46963 return true; 46964 if (e.preventDefault) 46965 e.preventDefault(); 46966 return false; 46967} 46968const elInitialOverflow = /* @__PURE__ */ new WeakMap(); 46969function useScrollLock(element, initialState = false) { 46970 const isLocked = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialState); 46971 let stopTouchMoveListener = null; 46972 let initialOverflow = ""; 46973 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(element), (el) => { 46974 const target = resolveElement((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(el)); 46975 if (target) { 46976 const ele = target; 46977 if (!elInitialOverflow.get(ele)) 46978 elInitialOverflow.set(ele, ele.style.overflow); 46979 if (ele.style.overflow !== "hidden") 46980 initialOverflow = ele.style.overflow; 46981 if (ele.style.overflow === "hidden") 46982 return isLocked.value = true; 46983 if (isLocked.value) 46984 return ele.style.overflow = "hidden"; 46985 } 46986 }, { 46987 immediate: true 46988 }); 46989 const lock = () => { 46990 const el = resolveElement((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element)); 46991 if (!el || isLocked.value) 46992 return; 46993 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isIOS) { 46994 stopTouchMoveListener = useEventListener( 46995 el, 46996 "touchmove", 46997 (e) => { 46998 preventDefault(e); 46999 }, 47000 { passive: false } 47001 ); 47002 } 47003 el.style.overflow = "hidden"; 47004 isLocked.value = true; 47005 }; 47006 const unlock = () => { 47007 const el = resolveElement((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(element)); 47008 if (!el || !isLocked.value) 47009 return; 47010 _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener()); 47011 el.style.overflow = initialOverflow; 47012 elInitialOverflow.delete(el); 47013 isLocked.value = false; 47014 }; 47015 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(unlock); 47016 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 47017 get() { 47018 return isLocked.value; 47019 }, 47020 set(v) { 47021 if (v) 47022 lock(); 47023 else unlock(); 47024 } 47025 }); 47026} 47027 47028function useSessionStorage(key, initialValue, options = {}) { 47029 const { window = defaultWindow } = options; 47030 return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options); 47031} 47032 47033function useShare(shareOptions = {}, options = {}) { 47034 const { navigator = defaultNavigator } = options; 47035 const _navigator = navigator; 47036 const isSupported = useSupported(() => _navigator && "canShare" in _navigator); 47037 const share = async (overrideOptions = {}) => { 47038 if (isSupported.value) { 47039 const data = { 47040 ...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(shareOptions), 47041 ...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(overrideOptions) 47042 }; 47043 let granted = true; 47044 if (data.files && _navigator.canShare) 47045 granted = _navigator.canShare({ files: data.files }); 47046 if (granted) 47047 return _navigator.share(data); 47048 } 47049 }; 47050 return { 47051 isSupported, 47052 share 47053 }; 47054} 47055 47056const defaultSortFn = (source, compareFn) => source.sort(compareFn); 47057const defaultCompare = (a, b) => a - b; 47058function useSorted(...args) { 47059 var _a, _b, _c, _d; 47060 const [source] = args; 47061 let compareFn = defaultCompare; 47062 let options = {}; 47063 if (args.length === 2) { 47064 if (typeof args[1] === "object") { 47065 options = args[1]; 47066 compareFn = (_a = options.compareFn) != null ? _a : defaultCompare; 47067 } else { 47068 compareFn = (_b = args[1]) != null ? _b : defaultCompare; 47069 } 47070 } else if (args.length > 2) { 47071 compareFn = (_c = args[1]) != null ? _c : defaultCompare; 47072 options = (_d = args[2]) != null ? _d : {}; 47073 } 47074 const { 47075 dirty = false, 47076 sortFn = defaultSortFn 47077 } = options; 47078 if (!dirty) 47079 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => sortFn([...(0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source)], compareFn)); 47080 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watchEffect)(() => { 47081 const result = sortFn((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source), compareFn); 47082 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.isRef)(source)) 47083 source.value = result; 47084 else 47085 source.splice(0, source.length, ...result); 47086 }); 47087 return source; 47088} 47089 47090function useSpeechRecognition(options = {}) { 47091 const { 47092 interimResults = true, 47093 continuous = true, 47094 window = defaultWindow 47095 } = options; 47096 const lang = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(options.lang || "en-US"); 47097 const isListening = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47098 const isFinal = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47099 const result = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(""); 47100 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(void 0); 47101 const toggle = (value = !isListening.value) => { 47102 isListening.value = value; 47103 }; 47104 const start = () => { 47105 isListening.value = true; 47106 }; 47107 const stop = () => { 47108 isListening.value = false; 47109 }; 47110 const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition); 47111 const isSupported = useSupported(() => SpeechRecognition); 47112 let recognition; 47113 if (isSupported.value) { 47114 recognition = new SpeechRecognition(); 47115 recognition.continuous = continuous; 47116 recognition.interimResults = interimResults; 47117 recognition.lang = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(lang); 47118 recognition.onstart = () => { 47119 isFinal.value = false; 47120 }; 47121 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(lang, (lang2) => { 47122 if (recognition && !isListening.value) 47123 recognition.lang = lang2; 47124 }); 47125 recognition.onresult = (event) => { 47126 const currentResult = event.results[event.resultIndex]; 47127 const { transcript } = currentResult[0]; 47128 isFinal.value = currentResult.isFinal; 47129 result.value = transcript; 47130 error.value = void 0; 47131 }; 47132 recognition.onerror = (event) => { 47133 error.value = event; 47134 }; 47135 recognition.onend = () => { 47136 isListening.value = false; 47137 recognition.lang = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(lang); 47138 }; 47139 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(isListening, () => { 47140 if (isListening.value) 47141 recognition.start(); 47142 else 47143 recognition.stop(); 47144 }); 47145 } 47146 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 47147 isListening.value = false; 47148 }); 47149 return { 47150 isSupported, 47151 isListening, 47152 isFinal, 47153 recognition, 47154 result, 47155 error, 47156 toggle, 47157 start, 47158 stop 47159 }; 47160} 47161 47162function useSpeechSynthesis(text, options = {}) { 47163 const { 47164 pitch = 1, 47165 rate = 1, 47166 volume = 1, 47167 window = defaultWindow 47168 } = options; 47169 const synth = window && window.speechSynthesis; 47170 const isSupported = useSupported(() => synth); 47171 const isPlaying = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47172 const status = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("init"); 47173 const spokenText = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(text || ""); 47174 const lang = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(options.lang || "en-US"); 47175 const error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(void 0); 47176 const toggle = (value = !isPlaying.value) => { 47177 isPlaying.value = value; 47178 }; 47179 const bindEventsForUtterance = (utterance2) => { 47180 utterance2.lang = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(lang); 47181 utterance2.voice = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.voice) || null; 47182 utterance2.pitch = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(pitch); 47183 utterance2.rate = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(rate); 47184 utterance2.volume = volume; 47185 utterance2.onstart = () => { 47186 isPlaying.value = true; 47187 status.value = "play"; 47188 }; 47189 utterance2.onpause = () => { 47190 isPlaying.value = false; 47191 status.value = "pause"; 47192 }; 47193 utterance2.onresume = () => { 47194 isPlaying.value = true; 47195 status.value = "play"; 47196 }; 47197 utterance2.onend = () => { 47198 isPlaying.value = false; 47199 status.value = "end"; 47200 }; 47201 utterance2.onerror = (event) => { 47202 error.value = event; 47203 }; 47204 }; 47205 const utterance = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 47206 isPlaying.value = false; 47207 status.value = "init"; 47208 const newUtterance = new SpeechSynthesisUtterance(spokenText.value); 47209 bindEventsForUtterance(newUtterance); 47210 return newUtterance; 47211 }); 47212 const speak = () => { 47213 synth.cancel(); 47214 utterance && synth.speak(utterance.value); 47215 }; 47216 const stop = () => { 47217 synth.cancel(); 47218 isPlaying.value = false; 47219 }; 47220 if (isSupported.value) { 47221 bindEventsForUtterance(utterance.value); 47222 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(lang, (lang2) => { 47223 if (utterance.value && !isPlaying.value) 47224 utterance.value.lang = lang2; 47225 }); 47226 if (options.voice) { 47227 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(options.voice, () => { 47228 synth.cancel(); 47229 }); 47230 } 47231 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(isPlaying, () => { 47232 if (isPlaying.value) 47233 synth.resume(); 47234 else 47235 synth.pause(); 47236 }); 47237 } 47238 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 47239 isPlaying.value = false; 47240 }); 47241 return { 47242 isSupported, 47243 isPlaying, 47244 status, 47245 utterance, 47246 error, 47247 stop, 47248 toggle, 47249 speak 47250 }; 47251} 47252 47253function useStepper(steps, initialStep) { 47254 const stepsRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(steps); 47255 const stepNames = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value)); 47256 const index = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0])); 47257 const current = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => at(index.value)); 47258 const isFirst = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => index.value === 0); 47259 const isLast = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => index.value === stepNames.value.length - 1); 47260 const next = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => stepNames.value[index.value + 1]); 47261 const previous = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => stepNames.value[index.value - 1]); 47262 function at(index2) { 47263 if (Array.isArray(stepsRef.value)) 47264 return stepsRef.value[index2]; 47265 return stepsRef.value[stepNames.value[index2]]; 47266 } 47267 function get(step) { 47268 if (!stepNames.value.includes(step)) 47269 return; 47270 return at(stepNames.value.indexOf(step)); 47271 } 47272 function goTo(step) { 47273 if (stepNames.value.includes(step)) 47274 index.value = stepNames.value.indexOf(step); 47275 } 47276 function goToNext() { 47277 if (isLast.value) 47278 return; 47279 index.value++; 47280 } 47281 function goToPrevious() { 47282 if (isFirst.value) 47283 return; 47284 index.value--; 47285 } 47286 function goBackTo(step) { 47287 if (isAfter(step)) 47288 goTo(step); 47289 } 47290 function isNext(step) { 47291 return stepNames.value.indexOf(step) === index.value + 1; 47292 } 47293 function isPrevious(step) { 47294 return stepNames.value.indexOf(step) === index.value - 1; 47295 } 47296 function isCurrent(step) { 47297 return stepNames.value.indexOf(step) === index.value; 47298 } 47299 function isBefore(step) { 47300 return index.value < stepNames.value.indexOf(step); 47301 } 47302 function isAfter(step) { 47303 return index.value > stepNames.value.indexOf(step); 47304 } 47305 return { 47306 steps: stepsRef, 47307 stepNames, 47308 index, 47309 current, 47310 next, 47311 previous, 47312 isFirst, 47313 isLast, 47314 at, 47315 get, 47316 goTo, 47317 goToNext, 47318 goToPrevious, 47319 goBackTo, 47320 isNext, 47321 isPrevious, 47322 isCurrent, 47323 isBefore, 47324 isAfter 47325 }; 47326} 47327 47328function useStorageAsync(key, initialValue, storage, options = {}) { 47329 var _a; 47330 const { 47331 flush = "pre", 47332 deep = true, 47333 listenToStorageChanges = true, 47334 writeDefaults = true, 47335 mergeDefaults = false, 47336 shallow, 47337 window = defaultWindow, 47338 eventFilter, 47339 onError = (e) => { 47340 console.error(e); 47341 } 47342 } = options; 47343 const rawInit = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(initialValue); 47344 const type = guessSerializerType(rawInit); 47345 const data = (shallow ? vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef : vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue); 47346 const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; 47347 if (!storage) { 47348 try { 47349 storage = getSSRHandler("getDefaultStorageAsync", () => { 47350 var _a2; 47351 return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; 47352 })(); 47353 } catch (e) { 47354 onError(e); 47355 } 47356 } 47357 async function read(event) { 47358 if (!storage || event && event.key !== key) 47359 return; 47360 try { 47361 const rawValue = event ? event.newValue : await storage.getItem(key); 47362 if (rawValue == null) { 47363 data.value = rawInit; 47364 if (writeDefaults && rawInit !== null) 47365 await storage.setItem(key, await serializer.write(rawInit)); 47366 } else if (mergeDefaults) { 47367 const value = await serializer.read(rawValue); 47368 if (typeof mergeDefaults === "function") 47369 data.value = mergeDefaults(value, rawInit); 47370 else if (type === "object" && !Array.isArray(value)) 47371 data.value = { ...rawInit, ...value }; 47372 else data.value = value; 47373 } else { 47374 data.value = await serializer.read(rawValue); 47375 } 47376 } catch (e) { 47377 onError(e); 47378 } 47379 } 47380 read(); 47381 if (window && listenToStorageChanges) 47382 useEventListener(window, "storage", (e) => Promise.resolve().then(() => read(e))); 47383 if (storage) { 47384 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.watchWithFilter)( 47385 data, 47386 async () => { 47387 try { 47388 if (data.value == null) 47389 await storage.removeItem(key); 47390 else 47391 await storage.setItem(key, await serializer.write(data.value)); 47392 } catch (e) { 47393 onError(e); 47394 } 47395 }, 47396 { 47397 flush, 47398 deep, 47399 eventFilter 47400 } 47401 ); 47402 } 47403 return data; 47404} 47405 47406let _id = 0; 47407function useStyleTag(css, options = {}) { 47408 const isLoaded = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47409 const { 47410 document = defaultDocument, 47411 immediate = true, 47412 manual = false, 47413 id = `vueuse_styletag_${++_id}` 47414 } = options; 47415 const cssRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(css); 47416 let stop = () => { 47417 }; 47418 const load = () => { 47419 if (!document) 47420 return; 47421 const el = document.getElementById(id) || document.createElement("style"); 47422 if (!el.isConnected) { 47423 el.id = id; 47424 if (options.media) 47425 el.media = options.media; 47426 document.head.appendChild(el); 47427 } 47428 if (isLoaded.value) 47429 return; 47430 stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 47431 cssRef, 47432 (value) => { 47433 el.textContent = value; 47434 }, 47435 { immediate: true } 47436 ); 47437 isLoaded.value = true; 47438 }; 47439 const unload = () => { 47440 if (!document || !isLoaded.value) 47441 return; 47442 stop(); 47443 document.head.removeChild(document.getElementById(id)); 47444 isLoaded.value = false; 47445 }; 47446 if (immediate && !manual) 47447 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(load); 47448 if (!manual) 47449 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(unload); 47450 return { 47451 id, 47452 css: cssRef, 47453 unload, 47454 load, 47455 isLoaded: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.readonly)(isLoaded) 47456 }; 47457} 47458 47459function useSwipe(target, options = {}) { 47460 const { 47461 threshold = 50, 47462 onSwipe, 47463 onSwipeEnd, 47464 onSwipeStart, 47465 passive = true, 47466 window = defaultWindow 47467 } = options; 47468 const coordsStart = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ x: 0, y: 0 }); 47469 const coordsEnd = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({ x: 0, y: 0 }); 47470 const diffX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => coordsStart.x - coordsEnd.x); 47471 const diffY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => coordsStart.y - coordsEnd.y); 47472 const { max, abs } = Math; 47473 const isThresholdExceeded = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => max(abs(diffX.value), abs(diffY.value)) >= threshold); 47474 const isSwiping = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47475 const direction = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 47476 if (!isThresholdExceeded.value) 47477 return "none"; 47478 if (abs(diffX.value) > abs(diffY.value)) { 47479 return diffX.value > 0 ? "left" : "right"; 47480 } else { 47481 return diffY.value > 0 ? "up" : "down"; 47482 } 47483 }); 47484 const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY]; 47485 const updateCoordsStart = (x, y) => { 47486 coordsStart.x = x; 47487 coordsStart.y = y; 47488 }; 47489 const updateCoordsEnd = (x, y) => { 47490 coordsEnd.x = x; 47491 coordsEnd.y = y; 47492 }; 47493 let listenerOptions; 47494 const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document); 47495 if (!passive) 47496 listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true }; 47497 else 47498 listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false }; 47499 const onTouchEnd = (e) => { 47500 if (isSwiping.value) 47501 onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); 47502 isSwiping.value = false; 47503 }; 47504 const stops = [ 47505 useEventListener(target, "touchstart", (e) => { 47506 if (e.touches.length !== 1) 47507 return; 47508 if (listenerOptions.capture && !listenerOptions.passive) 47509 e.preventDefault(); 47510 const [x, y] = getTouchEventCoords(e); 47511 updateCoordsStart(x, y); 47512 updateCoordsEnd(x, y); 47513 onSwipeStart == null ? void 0 : onSwipeStart(e); 47514 }, listenerOptions), 47515 useEventListener(target, "touchmove", (e) => { 47516 if (e.touches.length !== 1) 47517 return; 47518 const [x, y] = getTouchEventCoords(e); 47519 updateCoordsEnd(x, y); 47520 if (!isSwiping.value && isThresholdExceeded.value) 47521 isSwiping.value = true; 47522 if (isSwiping.value) 47523 onSwipe == null ? void 0 : onSwipe(e); 47524 }, listenerOptions), 47525 useEventListener(target, ["touchend", "touchcancel"], onTouchEnd, listenerOptions) 47526 ]; 47527 const stop = () => stops.forEach((s) => s()); 47528 return { 47529 isPassiveEventSupported, 47530 isSwiping, 47531 direction, 47532 coordsStart, 47533 coordsEnd, 47534 lengthX: diffX, 47535 lengthY: diffY, 47536 stop 47537 }; 47538} 47539function checkPassiveEventSupport(document) { 47540 if (!document) 47541 return false; 47542 let supportsPassive = false; 47543 const optionsBlock = { 47544 get passive() { 47545 supportsPassive = true; 47546 return false; 47547 } 47548 }; 47549 document.addEventListener("x", _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop, optionsBlock); 47550 document.removeEventListener("x", _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.noop); 47551 return supportsPassive; 47552} 47553 47554function useTemplateRefsList() { 47555 const refs = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 47556 refs.value.set = (el) => { 47557 if (el) 47558 refs.value.push(el); 47559 }; 47560 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.onBeforeUpdate)(() => { 47561 refs.value.length = 0; 47562 }); 47563 return refs; 47564} 47565 47566function useTextDirection(options = {}) { 47567 const { 47568 document = defaultDocument, 47569 selector = "html", 47570 observe = false, 47571 initialValue = "ltr" 47572 } = options; 47573 function getValue() { 47574 var _a, _b; 47575 return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute("dir")) != null ? _b : initialValue; 47576 } 47577 const dir = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(getValue()); 47578 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(() => dir.value = getValue()); 47579 if (observe && document) { 47580 useMutationObserver( 47581 document.querySelector(selector), 47582 () => dir.value = getValue(), 47583 { attributes: true } 47584 ); 47585 } 47586 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 47587 get() { 47588 return dir.value; 47589 }, 47590 set(v) { 47591 var _a, _b; 47592 dir.value = v; 47593 if (!document) 47594 return; 47595 if (dir.value) 47596 (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute("dir", dir.value); 47597 else 47598 (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute("dir"); 47599 } 47600 }); 47601} 47602 47603function getRangesFromSelection(selection) { 47604 var _a; 47605 const rangeCount = (_a = selection.rangeCount) != null ? _a : 0; 47606 return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i)); 47607} 47608function useTextSelection(options = {}) { 47609 const { 47610 window = defaultWindow 47611 } = options; 47612 const selection = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 47613 const text = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 47614 var _a, _b; 47615 return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : ""; 47616 }); 47617 const ranges = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => selection.value ? getRangesFromSelection(selection.value) : []); 47618 const rects = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => ranges.value.map((range) => range.getBoundingClientRect())); 47619 function onSelectionChange() { 47620 selection.value = null; 47621 if (window) 47622 selection.value = window.getSelection(); 47623 } 47624 if (window) 47625 useEventListener(window.document, "selectionchange", onSelectionChange); 47626 return { 47627 text, 47628 rects, 47629 ranges, 47630 selection 47631 }; 47632} 47633 47634function useTextareaAutosize(options) { 47635 var _a; 47636 const textarea = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(options == null ? void 0 : options.element); 47637 const input = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(options == null ? void 0 : options.input); 47638 const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : "height"; 47639 const textareaScrollHeight = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(1); 47640 function triggerResize() { 47641 var _a2; 47642 if (!textarea.value) 47643 return; 47644 let height = ""; 47645 textarea.value.style[styleProp] = "1px"; 47646 textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight; 47647 if (options == null ? void 0 : options.styleTarget) 47648 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`; 47649 else 47650 height = `${textareaScrollHeight.value}px`; 47651 textarea.value.style[styleProp] = height; 47652 } 47653 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([input, textarea], () => (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.nextTick)(triggerResize), { immediate: true }); 47654 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(textareaScrollHeight, () => { 47655 var _a2; 47656 return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options); 47657 }); 47658 useResizeObserver(textarea, () => triggerResize()); 47659 if (options == null ? void 0 : options.watch) 47660 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(options.watch, triggerResize, { immediate: true, deep: true }); 47661 return { 47662 textarea, 47663 input, 47664 triggerResize 47665 }; 47666} 47667 47668function useThrottledRefHistory(source, options = {}) { 47669 const { throttle = 200, trailing = true } = options; 47670 const filter = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.throttleFilter)(throttle, trailing); 47671 const history = useRefHistory(source, { ...options, eventFilter: filter }); 47672 return { 47673 ...history 47674 }; 47675} 47676 47677const DEFAULT_UNITS = [ 47678 { max: 6e4, value: 1e3, name: "second" }, 47679 { max: 276e4, value: 6e4, name: "minute" }, 47680 { max: 72e6, value: 36e5, name: "hour" }, 47681 { max: 5184e5, value: 864e5, name: "day" }, 47682 { max: 24192e5, value: 6048e5, name: "week" }, 47683 { max: 28512e6, value: 2592e6, name: "month" }, 47684 { max: Number.POSITIVE_INFINITY, value: 31536e6, name: "year" } 47685]; 47686const DEFAULT_MESSAGES = { 47687 justNow: "just now", 47688 past: (n) => n.match(/\d/) ? `${n} ago` : n, 47689 future: (n) => n.match(/\d/) ? `in ${n}` : n, 47690 month: (n, past) => n === 1 ? past ? "last month" : "next month" : `${n} month${n > 1 ? "s" : ""}`, 47691 year: (n, past) => n === 1 ? past ? "last year" : "next year" : `${n} year${n > 1 ? "s" : ""}`, 47692 day: (n, past) => n === 1 ? past ? "yesterday" : "tomorrow" : `${n} day${n > 1 ? "s" : ""}`, 47693 week: (n, past) => n === 1 ? past ? "last week" : "next week" : `${n} week${n > 1 ? "s" : ""}`, 47694 hour: (n) => `${n} hour${n > 1 ? "s" : ""}`, 47695 minute: (n) => `${n} minute${n > 1 ? "s" : ""}`, 47696 second: (n) => `${n} second${n > 1 ? "s" : ""}`, 47697 invalid: "" 47698}; 47699function DEFAULT_FORMATTER(date) { 47700 return date.toISOString().slice(0, 10); 47701} 47702function useTimeAgo(time, options = {}) { 47703 const { 47704 controls: exposeControls = false, 47705 updateInterval = 3e4 47706 } = options; 47707 const { now, ...controls } = useNow({ interval: updateInterval, controls: true }); 47708 const timeAgo = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => formatTimeAgo(new Date((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(time)), options, (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(now))); 47709 if (exposeControls) { 47710 return { 47711 timeAgo, 47712 ...controls 47713 }; 47714 } else { 47715 return timeAgo; 47716 } 47717} 47718function formatTimeAgo(from, options = {}, now = Date.now()) { 47719 var _a; 47720 const { 47721 max, 47722 messages = DEFAULT_MESSAGES, 47723 fullDateFormatter = DEFAULT_FORMATTER, 47724 units = DEFAULT_UNITS, 47725 showSecond = false, 47726 rounding = "round" 47727 } = options; 47728 const roundFn = typeof rounding === "number" ? (n) => +n.toFixed(rounding) : Math[rounding]; 47729 const diff = +now - +from; 47730 const absDiff = Math.abs(diff); 47731 function getValue(diff2, unit) { 47732 return roundFn(Math.abs(diff2) / unit.value); 47733 } 47734 function format(diff2, unit) { 47735 const val = getValue(diff2, unit); 47736 const past = diff2 > 0; 47737 const str = applyFormat(unit.name, val, past); 47738 return applyFormat(past ? "past" : "future", str, past); 47739 } 47740 function applyFormat(name, val, isPast) { 47741 const formatter = messages[name]; 47742 if (typeof formatter === "function") 47743 return formatter(val, isPast); 47744 return formatter.replace("{0}", val.toString()); 47745 } 47746 if (absDiff < 6e4 && !showSecond) 47747 return messages.justNow; 47748 if (typeof max === "number" && absDiff > max) 47749 return fullDateFormatter(new Date(from)); 47750 if (typeof max === "string") { 47751 const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max; 47752 if (unitMax && absDiff > unitMax) 47753 return fullDateFormatter(new Date(from)); 47754 } 47755 for (const [idx, unit] of units.entries()) { 47756 const val = getValue(diff, unit); 47757 if (val <= 0 && units[idx - 1]) 47758 return format(diff, units[idx - 1]); 47759 if (absDiff < unit.max) 47760 return format(diff, unit); 47761 } 47762 return messages.invalid; 47763} 47764 47765function useTimeoutPoll(fn, interval, timeoutPollOptions) { 47766 const { start } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useTimeoutFn)(loop, interval, { immediate: false }); 47767 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 47768 async function loop() { 47769 if (!isActive.value) 47770 return; 47771 await fn(); 47772 start(); 47773 } 47774 function resume() { 47775 if (!isActive.value) { 47776 isActive.value = true; 47777 loop(); 47778 } 47779 } 47780 function pause() { 47781 isActive.value = false; 47782 } 47783 if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate) 47784 resume(); 47785 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(pause); 47786 return { 47787 isActive, 47788 pause, 47789 resume 47790 }; 47791} 47792 47793function useTimestamp(options = {}) { 47794 const { 47795 controls: exposeControls = false, 47796 offset = 0, 47797 immediate = true, 47798 interval = "requestAnimationFrame", 47799 callback 47800 } = options; 47801 const ts = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp)() + offset); 47802 const update = () => ts.value = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.timestamp)() + offset; 47803 const cb = callback ? () => { 47804 update(); 47805 callback(ts.value); 47806 } : update; 47807 const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)(cb, interval, { immediate }); 47808 if (exposeControls) { 47809 return { 47810 timestamp: ts, 47811 ...controls 47812 }; 47813 } else { 47814 return ts; 47815 } 47816} 47817 47818function useTitle(newTitle = null, options = {}) { 47819 var _a, _b, _c; 47820 const { 47821 document = defaultDocument, 47822 restoreOnUnmount = (t) => t 47823 } = options; 47824 const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : ""; 47825 const title = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null); 47826 const isReadonly = newTitle && typeof newTitle === "function"; 47827 function format(t) { 47828 if (!("titleTemplate" in options)) 47829 return t; 47830 const template = options.titleTemplate || "%s"; 47831 return typeof template === "function" ? template(t) : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(template).replace(/%s/g, t); 47832 } 47833 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 47834 title, 47835 (t, o) => { 47836 if (t !== o && document) 47837 document.title = format(typeof t === "string" ? t : ""); 47838 }, 47839 { immediate: true } 47840 ); 47841 if (options.observe && !options.titleTemplate && document && !isReadonly) { 47842 useMutationObserver( 47843 (_c = document.head) == null ? void 0 : _c.querySelector("title"), 47844 () => { 47845 if (document && document.title !== title.value) 47846 title.value = format(document.title); 47847 }, 47848 { childList: true } 47849 ); 47850 } 47851 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnBeforeUnmount)(() => { 47852 if (restoreOnUnmount) { 47853 const restoredTitle = restoreOnUnmount(originalTitle, title.value || ""); 47854 if (restoredTitle != null && document) 47855 document.title = restoredTitle; 47856 } 47857 }); 47858 return title; 47859} 47860 47861const _TransitionPresets = { 47862 easeInSine: [0.12, 0, 0.39, 0], 47863 easeOutSine: [0.61, 1, 0.88, 1], 47864 easeInOutSine: [0.37, 0, 0.63, 1], 47865 easeInQuad: [0.11, 0, 0.5, 0], 47866 easeOutQuad: [0.5, 1, 0.89, 1], 47867 easeInOutQuad: [0.45, 0, 0.55, 1], 47868 easeInCubic: [0.32, 0, 0.67, 0], 47869 easeOutCubic: [0.33, 1, 0.68, 1], 47870 easeInOutCubic: [0.65, 0, 0.35, 1], 47871 easeInQuart: [0.5, 0, 0.75, 0], 47872 easeOutQuart: [0.25, 1, 0.5, 1], 47873 easeInOutQuart: [0.76, 0, 0.24, 1], 47874 easeInQuint: [0.64, 0, 0.78, 0], 47875 easeOutQuint: [0.22, 1, 0.36, 1], 47876 easeInOutQuint: [0.83, 0, 0.17, 1], 47877 easeInExpo: [0.7, 0, 0.84, 0], 47878 easeOutExpo: [0.16, 1, 0.3, 1], 47879 easeInOutExpo: [0.87, 0, 0.13, 1], 47880 easeInCirc: [0.55, 0, 1, 0.45], 47881 easeOutCirc: [0, 0.55, 0.45, 1], 47882 easeInOutCirc: [0.85, 0, 0.15, 1], 47883 easeInBack: [0.36, 0, 0.66, -0.56], 47884 easeOutBack: [0.34, 1.56, 0.64, 1], 47885 easeInOutBack: [0.68, -0.6, 0.32, 1.6] 47886}; 47887const TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.identity }, _TransitionPresets); 47888function createEasingFunction([p0, p1, p2, p3]) { 47889 const a = (a1, a2) => 1 - 3 * a2 + 3 * a1; 47890 const b = (a1, a2) => 3 * a2 - 6 * a1; 47891 const c = (a1) => 3 * a1; 47892 const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t; 47893 const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1); 47894 const getTforX = (x) => { 47895 let aGuessT = x; 47896 for (let i = 0; i < 4; ++i) { 47897 const currentSlope = getSlope(aGuessT, p0, p2); 47898 if (currentSlope === 0) 47899 return aGuessT; 47900 const currentX = calcBezier(aGuessT, p0, p2) - x; 47901 aGuessT -= currentX / currentSlope; 47902 } 47903 return aGuessT; 47904 }; 47905 return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3); 47906} 47907function lerp(a, b, alpha) { 47908 return a + alpha * (b - a); 47909} 47910function toVec(t) { 47911 return (typeof t === "number" ? [t] : t) || []; 47912} 47913function executeTransition(source, from, to, options = {}) { 47914 var _a, _b; 47915 const fromVal = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(from); 47916 const toVal = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(to); 47917 const v1 = toVec(fromVal); 47918 const v2 = toVec(toVal); 47919 const duration = (_a = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.duration)) != null ? _a : 1e3; 47920 const startedAt = Date.now(); 47921 const endAt = Date.now() + duration; 47922 const trans = typeof options.transition === "function" ? options.transition : (_b = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.transition)) != null ? _b : _vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.identity; 47923 const ease = typeof trans === "function" ? trans : createEasingFunction(trans); 47924 return new Promise((resolve) => { 47925 source.value = fromVal; 47926 const tick = () => { 47927 var _a2; 47928 if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) { 47929 resolve(); 47930 return; 47931 } 47932 const now = Date.now(); 47933 const alpha = ease((now - startedAt) / duration); 47934 const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha)); 47935 if (Array.isArray(source.value)) 47936 source.value = arr.map((n, i) => { 47937 var _a3, _b2; 47938 return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha); 47939 }); 47940 else if (typeof source.value === "number") 47941 source.value = arr[0]; 47942 if (now < endAt) { 47943 requestAnimationFrame(tick); 47944 } else { 47945 source.value = toVal; 47946 resolve(); 47947 } 47948 }; 47949 tick(); 47950 }); 47951} 47952function useTransition(source, options = {}) { 47953 let currentId = 0; 47954 const sourceVal = () => { 47955 const v = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(source); 47956 return typeof v === "number" ? v : v.map(_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue); 47957 }; 47958 const outputRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(sourceVal()); 47959 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(sourceVal, async (to) => { 47960 var _a, _b; 47961 if ((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled)) 47962 return; 47963 const id = ++currentId; 47964 if (options.delay) 47965 await (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.promiseTimeout)((0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.delay)); 47966 if (id !== currentId) 47967 return; 47968 const toVal = Array.isArray(to) ? to.map(_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue) : (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(to); 47969 (_a = options.onStarted) == null ? void 0 : _a.call(options); 47970 await executeTransition(outputRef, outputRef.value, toVal, { 47971 ...options, 47972 abort: () => { 47973 var _a2; 47974 return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options)); 47975 } 47976 }); 47977 (_b = options.onFinished) == null ? void 0 : _b.call(options); 47978 }, { deep: true }); 47979 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(() => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled), (disabled) => { 47980 if (disabled) { 47981 currentId++; 47982 outputRef.value = sourceVal(); 47983 } 47984 }); 47985 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 47986 currentId++; 47987 }); 47988 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toValue)(options.disabled) ? sourceVal() : outputRef.value); 47989} 47990 47991function useUrlSearchParams(mode = "history", options = {}) { 47992 const { 47993 initialValue = {}, 47994 removeNullishValues = true, 47995 removeFalsyValues = false, 47996 write: enableWrite = true, 47997 window = defaultWindow 47998 } = options; 47999 if (!window) 48000 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)(initialValue); 48001 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.reactive)({}); 48002 function getRawParams() { 48003 if (mode === "history") { 48004 return window.location.search || ""; 48005 } else if (mode === "hash") { 48006 const hash = window.location.hash || ""; 48007 const index = hash.indexOf("?"); 48008 return index > 0 ? hash.slice(index) : ""; 48009 } else { 48010 return (window.location.hash || "").replace(/^#/, ""); 48011 } 48012 } 48013 function constructQuery(params) { 48014 const stringified = params.toString(); 48015 if (mode === "history") 48016 return `${stringified ? `?${stringified}` : ""}${window.location.hash || ""}`; 48017 if (mode === "hash-params") 48018 return `${window.location.search || ""}${stringified ? `#${stringified}` : ""}`; 48019 const hash = window.location.hash || "#"; 48020 const index = hash.indexOf("?"); 48021 if (index > 0) 48022 return `${hash.slice(0, index)}${stringified ? `?${stringified}` : ""}`; 48023 return `${hash}${stringified ? `?${stringified}` : ""}`; 48024 } 48025 function read() { 48026 return new URLSearchParams(getRawParams()); 48027 } 48028 function updateState(params) { 48029 const unusedKeys = new Set(Object.keys(state)); 48030 for (const key of params.keys()) { 48031 const paramsForKey = params.getAll(key); 48032 state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || ""; 48033 unusedKeys.delete(key); 48034 } 48035 Array.from(unusedKeys).forEach((key) => delete state[key]); 48036 } 48037 const { pause, resume } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.pausableWatch)( 48038 state, 48039 () => { 48040 const params = new URLSearchParams(""); 48041 Object.keys(state).forEach((key) => { 48042 const mapEntry = state[key]; 48043 if (Array.isArray(mapEntry)) 48044 mapEntry.forEach((value) => params.append(key, value)); 48045 else if (removeNullishValues && mapEntry == null) 48046 params.delete(key); 48047 else if (removeFalsyValues && !mapEntry) 48048 params.delete(key); 48049 else 48050 params.set(key, mapEntry); 48051 }); 48052 write(params); 48053 }, 48054 { deep: true } 48055 ); 48056 function write(params, shouldUpdate) { 48057 pause(); 48058 if (shouldUpdate) 48059 updateState(params); 48060 window.history.replaceState( 48061 window.history.state, 48062 window.document.title, 48063 window.location.pathname + constructQuery(params) 48064 ); 48065 resume(); 48066 } 48067 function onChanged() { 48068 if (!enableWrite) 48069 return; 48070 write(read(), true); 48071 } 48072 useEventListener(window, "popstate", onChanged, false); 48073 if (mode !== "history") 48074 useEventListener(window, "hashchange", onChanged, false); 48075 const initial = read(); 48076 if (initial.keys().next().value) 48077 updateState(initial); 48078 else 48079 Object.assign(state, initialValue); 48080 return state; 48081} 48082 48083function useUserMedia(options = {}) { 48084 var _a, _b; 48085 const enabled = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)((_a = options.enabled) != null ? _a : false); 48086 const autoSwitch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)((_b = options.autoSwitch) != null ? _b : true); 48087 const constraints = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(options.constraints); 48088 const { navigator = defaultNavigator } = options; 48089 const isSupported = useSupported(() => { 48090 var _a2; 48091 return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia; 48092 }); 48093 const stream = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); 48094 function getDeviceOptions(type) { 48095 switch (type) { 48096 case "video": { 48097 if (constraints.value) 48098 return constraints.value.video || false; 48099 break; 48100 } 48101 case "audio": { 48102 if (constraints.value) 48103 return constraints.value.audio || false; 48104 break; 48105 } 48106 } 48107 } 48108 async function _start() { 48109 if (!isSupported.value || stream.value) 48110 return; 48111 stream.value = await navigator.mediaDevices.getUserMedia({ 48112 video: getDeviceOptions("video"), 48113 audio: getDeviceOptions("audio") 48114 }); 48115 return stream.value; 48116 } 48117 function _stop() { 48118 var _a2; 48119 (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); 48120 stream.value = void 0; 48121 } 48122 function stop() { 48123 _stop(); 48124 enabled.value = false; 48125 } 48126 async function start() { 48127 await _start(); 48128 if (stream.value) 48129 enabled.value = true; 48130 return stream.value; 48131 } 48132 async function restart() { 48133 _stop(); 48134 return await start(); 48135 } 48136 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 48137 enabled, 48138 (v) => { 48139 if (v) 48140 _start(); 48141 else _stop(); 48142 }, 48143 { immediate: true } 48144 ); 48145 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 48146 constraints, 48147 () => { 48148 if (autoSwitch.value && stream.value) 48149 restart(); 48150 }, 48151 { immediate: true } 48152 ); 48153 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 48154 stop(); 48155 }); 48156 return { 48157 isSupported, 48158 stream, 48159 start, 48160 stop, 48161 restart, 48162 constraints, 48163 enabled, 48164 autoSwitch 48165 }; 48166} 48167 48168function useVModel(props, key, emit, options = {}) { 48169 var _a, _b, _c, _d, _e; 48170 const { 48171 clone = false, 48172 passive = false, 48173 eventName, 48174 deep = false, 48175 defaultValue, 48176 shouldEmit 48177 } = options; 48178 const vm = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.getCurrentInstance)(); 48179 const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy)); 48180 let event = eventName; 48181 if (!key) { 48182 if (vue_demi__WEBPACK_IMPORTED_MODULE_1__.isVue2) { 48183 const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model; 48184 key = (modelOptions == null ? void 0 : modelOptions.value) || "value"; 48185 if (!eventName) 48186 event = (modelOptions == null ? void 0 : modelOptions.event) || "input"; 48187 } else { 48188 key = "modelValue"; 48189 } 48190 } 48191 event = event || `update:${key.toString()}`; 48192 const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val); 48193 const getValue = () => (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isDef)(props[key]) ? cloneFn(props[key]) : defaultValue; 48194 const triggerEmit = (value) => { 48195 if (shouldEmit) { 48196 if (shouldEmit(value)) 48197 _emit(event, value); 48198 } else { 48199 _emit(event, value); 48200 } 48201 }; 48202 if (passive) { 48203 const initialValue = getValue(); 48204 const proxy = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialValue); 48205 let isUpdating = false; 48206 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 48207 () => props[key], 48208 (v) => { 48209 if (!isUpdating) { 48210 isUpdating = true; 48211 proxy.value = cloneFn(v); 48212 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => isUpdating = false); 48213 } 48214 } 48215 ); 48216 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)( 48217 proxy, 48218 (v) => { 48219 if (!isUpdating && (v !== props[key] || deep)) 48220 triggerEmit(v); 48221 }, 48222 { deep } 48223 ); 48224 return proxy; 48225 } else { 48226 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 48227 get() { 48228 return getValue(); 48229 }, 48230 set(value) { 48231 triggerEmit(value); 48232 } 48233 }); 48234 } 48235} 48236 48237function useVModels(props, emit, options = {}) { 48238 const ret = {}; 48239 for (const key in props) { 48240 ret[key] = useVModel( 48241 props, 48242 key, 48243 emit, 48244 options 48245 ); 48246 } 48247 return ret; 48248} 48249 48250function useVibrate(options) { 48251 const { 48252 pattern = [], 48253 interval = 0, 48254 navigator = defaultNavigator 48255 } = options || {}; 48256 const isSupported = useSupported(() => typeof navigator !== "undefined" && "vibrate" in navigator); 48257 const patternRef = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(pattern); 48258 let intervalControls; 48259 const vibrate = (pattern2 = patternRef.value) => { 48260 if (isSupported.value) 48261 navigator.vibrate(pattern2); 48262 }; 48263 const stop = () => { 48264 if (isSupported.value) 48265 navigator.vibrate(0); 48266 intervalControls == null ? void 0 : intervalControls.pause(); 48267 }; 48268 if (interval > 0) { 48269 intervalControls = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)( 48270 vibrate, 48271 interval, 48272 { 48273 immediate: false, 48274 immediateCallback: false 48275 } 48276 ); 48277 } 48278 return { 48279 isSupported, 48280 pattern, 48281 intervalControls, 48282 vibrate, 48283 stop 48284 }; 48285} 48286 48287function useVirtualList(list, options) { 48288 const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list); 48289 return { 48290 list: currentList, 48291 scrollTo, 48292 containerProps: { 48293 ref: containerRef, 48294 onScroll: () => { 48295 calculateRange(); 48296 }, 48297 style: containerStyle 48298 }, 48299 wrapperProps 48300 }; 48301} 48302function useVirtualListResources(list) { 48303 const containerRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 48304 const size = useElementSize(containerRef); 48305 const currentList = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)([]); 48306 const source = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(list); 48307 const state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({ start: 0, end: 10 }); 48308 return { state, source, currentList, size, containerRef }; 48309} 48310function createGetViewCapacity(state, source, itemSize) { 48311 return (containerSize) => { 48312 if (typeof itemSize === "number") 48313 return Math.ceil(containerSize / itemSize); 48314 const { start = 0 } = state.value; 48315 let sum = 0; 48316 let capacity = 0; 48317 for (let i = start; i < source.value.length; i++) { 48318 const size = itemSize(i); 48319 sum += size; 48320 capacity = i; 48321 if (sum > containerSize) 48322 break; 48323 } 48324 return capacity - start; 48325 }; 48326} 48327function createGetOffset(source, itemSize) { 48328 return (scrollDirection) => { 48329 if (typeof itemSize === "number") 48330 return Math.floor(scrollDirection / itemSize) + 1; 48331 let sum = 0; 48332 let offset = 0; 48333 for (let i = 0; i < source.value.length; i++) { 48334 const size = itemSize(i); 48335 sum += size; 48336 if (sum >= scrollDirection) { 48337 offset = i; 48338 break; 48339 } 48340 } 48341 return offset + 1; 48342 }; 48343} 48344function createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) { 48345 return () => { 48346 const element = containerRef.value; 48347 if (element) { 48348 const offset = getOffset(type === "vertical" ? element.scrollTop : element.scrollLeft); 48349 const viewCapacity = getViewCapacity(type === "vertical" ? element.clientHeight : element.clientWidth); 48350 const from = offset - overscan; 48351 const to = offset + viewCapacity + overscan; 48352 state.value = { 48353 start: from < 0 ? 0 : from, 48354 end: to > source.value.length ? source.value.length : to 48355 }; 48356 currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({ 48357 data: ele, 48358 index: index + state.value.start 48359 })); 48360 } 48361 }; 48362} 48363function createGetDistance(itemSize, source) { 48364 return (index) => { 48365 if (typeof itemSize === "number") { 48366 const size2 = index * itemSize; 48367 return size2; 48368 } 48369 const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0); 48370 return size; 48371 }; 48372} 48373function useWatchForSizes(size, list, containerRef, calculateRange) { 48374 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)([size.width, size.height, list, containerRef], () => { 48375 calculateRange(); 48376 }); 48377} 48378function createComputedTotalSize(itemSize, source) { 48379 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 48380 if (typeof itemSize === "number") 48381 return source.value.length * itemSize; 48382 return source.value.reduce((sum, _, index) => sum + itemSize(index), 0); 48383 }); 48384} 48385const scrollToDictionaryForElementScrollKey = { 48386 horizontal: "scrollLeft", 48387 vertical: "scrollTop" 48388}; 48389function createScrollTo(type, calculateRange, getDistance, containerRef) { 48390 return (index) => { 48391 if (containerRef.value) { 48392 containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index); 48393 calculateRange(); 48394 } 48395 }; 48396} 48397function useHorizontalVirtualList(options, list) { 48398 const resources = useVirtualListResources(list); 48399 const { state, source, currentList, size, containerRef } = resources; 48400 const containerStyle = { overflowX: "auto" }; 48401 const { itemWidth, overscan = 5 } = options; 48402 const getViewCapacity = createGetViewCapacity(state, source, itemWidth); 48403 const getOffset = createGetOffset(source, itemWidth); 48404 const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources); 48405 const getDistanceLeft = createGetDistance(itemWidth, source); 48406 const offsetLeft = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => getDistanceLeft(state.value.start)); 48407 const totalWidth = createComputedTotalSize(itemWidth, source); 48408 useWatchForSizes(size, list, containerRef, calculateRange); 48409 const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef); 48410 const wrapperProps = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 48411 return { 48412 style: { 48413 height: "100%", 48414 width: `${totalWidth.value - offsetLeft.value}px`, 48415 marginLeft: `${offsetLeft.value}px`, 48416 display: "flex" 48417 } 48418 }; 48419 }); 48420 return { 48421 scrollTo, 48422 calculateRange, 48423 wrapperProps, 48424 containerStyle, 48425 currentList, 48426 containerRef 48427 }; 48428} 48429function useVerticalVirtualList(options, list) { 48430 const resources = useVirtualListResources(list); 48431 const { state, source, currentList, size, containerRef } = resources; 48432 const containerStyle = { overflowY: "auto" }; 48433 const { itemHeight, overscan = 5 } = options; 48434 const getViewCapacity = createGetViewCapacity(state, source, itemHeight); 48435 const getOffset = createGetOffset(source, itemHeight); 48436 const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources); 48437 const getDistanceTop = createGetDistance(itemHeight, source); 48438 const offsetTop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => getDistanceTop(state.value.start)); 48439 const totalHeight = createComputedTotalSize(itemHeight, source); 48440 useWatchForSizes(size, list, containerRef, calculateRange); 48441 const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef); 48442 const wrapperProps = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { 48443 return { 48444 style: { 48445 width: "100%", 48446 height: `${totalHeight.value - offsetTop.value}px`, 48447 marginTop: `${offsetTop.value}px` 48448 } 48449 }; 48450 }); 48451 return { 48452 calculateRange, 48453 scrollTo, 48454 containerStyle, 48455 wrapperProps, 48456 currentList, 48457 containerRef 48458 }; 48459} 48460 48461function useWakeLock(options = {}) { 48462 const { 48463 navigator = defaultNavigator, 48464 document = defaultDocument 48465 } = options; 48466 let wakeLock; 48467 const isSupported = useSupported(() => navigator && "wakeLock" in navigator); 48468 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 48469 async function onVisibilityChange() { 48470 if (!isSupported.value || !wakeLock) 48471 return; 48472 if (document && document.visibilityState === "visible") 48473 wakeLock = await navigator.wakeLock.request("screen"); 48474 isActive.value = !wakeLock.released; 48475 } 48476 if (document) 48477 useEventListener(document, "visibilitychange", onVisibilityChange, { passive: true }); 48478 async function request(type) { 48479 if (!isSupported.value) 48480 return; 48481 wakeLock = await navigator.wakeLock.request(type); 48482 isActive.value = !wakeLock.released; 48483 } 48484 async function release() { 48485 if (!isSupported.value || !wakeLock) 48486 return; 48487 await wakeLock.release(); 48488 isActive.value = !wakeLock.released; 48489 wakeLock = null; 48490 } 48491 return { 48492 isSupported, 48493 isActive, 48494 request, 48495 release 48496 }; 48497} 48498 48499function useWebNotification(options = {}) { 48500 const { 48501 window = defaultWindow, 48502 requestPermissions: _requestForPermissions = true 48503 } = options; 48504 const defaultWebNotificationOptions = options; 48505 const isSupported = useSupported(() => { 48506 if (!window || !("Notification" in window)) 48507 return false; 48508 try { 48509 new Notification(""); 48510 } catch (e) { 48511 return false; 48512 } 48513 return true; 48514 }); 48515 const permissionGranted = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(isSupported.value && "permission" in Notification && Notification.permission === "granted"); 48516 const notification = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 48517 const ensurePermissions = async () => { 48518 if (!isSupported.value) 48519 return; 48520 if (!permissionGranted.value && Notification.permission !== "denied") { 48521 const result = await Notification.requestPermission(); 48522 if (result === "granted") 48523 permissionGranted.value = true; 48524 } 48525 return permissionGranted.value; 48526 }; 48527 const { on: onClick, trigger: clickTrigger } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 48528 const { on: onShow, trigger: showTrigger } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 48529 const { on: onError, trigger: errorTrigger } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 48530 const { on: onClose, trigger: closeTrigger } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.createEventHook)(); 48531 const show = async (overrides) => { 48532 if (!isSupported.value || !permissionGranted.value) 48533 return; 48534 const options2 = Object.assign({}, defaultWebNotificationOptions, overrides); 48535 notification.value = new Notification(options2.title || "", options2); 48536 notification.value.onclick = clickTrigger; 48537 notification.value.onshow = showTrigger; 48538 notification.value.onerror = errorTrigger; 48539 notification.value.onclose = closeTrigger; 48540 return notification.value; 48541 }; 48542 const close = () => { 48543 if (notification.value) 48544 notification.value.close(); 48545 notification.value = null; 48546 }; 48547 if (_requestForPermissions) 48548 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(ensurePermissions); 48549 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(close); 48550 if (isSupported.value && window) { 48551 const document = window.document; 48552 useEventListener(document, "visibilitychange", (e) => { 48553 e.preventDefault(); 48554 if (document.visibilityState === "visible") { 48555 close(); 48556 } 48557 }); 48558 } 48559 return { 48560 isSupported, 48561 notification, 48562 ensurePermissions, 48563 permissionGranted, 48564 show, 48565 close, 48566 onClick, 48567 onShow, 48568 onError, 48569 onClose 48570 }; 48571} 48572 48573const DEFAULT_PING_MESSAGE = "ping"; 48574function resolveNestedOptions(options) { 48575 if (options === true) 48576 return {}; 48577 return options; 48578} 48579function useWebSocket(url, options = {}) { 48580 const { 48581 onConnected, 48582 onDisconnected, 48583 onError, 48584 onMessage, 48585 immediate = true, 48586 autoClose = true, 48587 protocols = [] 48588 } = options; 48589 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 48590 const status = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("CLOSED"); 48591 const wsRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 48592 const urlRef = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.toRef)(url); 48593 let heartbeatPause; 48594 let heartbeatResume; 48595 let explicitlyClosed = false; 48596 let retried = 0; 48597 let bufferedData = []; 48598 let pongTimeoutWait; 48599 const _sendBuffer = () => { 48600 if (bufferedData.length && wsRef.value && status.value === "OPEN") { 48601 for (const buffer of bufferedData) 48602 wsRef.value.send(buffer); 48603 bufferedData = []; 48604 } 48605 }; 48606 const resetHeartbeat = () => { 48607 clearTimeout(pongTimeoutWait); 48608 pongTimeoutWait = void 0; 48609 }; 48610 const close = (code = 1e3, reason) => { 48611 if (!_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient || !wsRef.value) 48612 return; 48613 explicitlyClosed = true; 48614 resetHeartbeat(); 48615 heartbeatPause == null ? void 0 : heartbeatPause(); 48616 wsRef.value.close(code, reason); 48617 wsRef.value = void 0; 48618 }; 48619 const send = (data2, useBuffer = true) => { 48620 if (!wsRef.value || status.value !== "OPEN") { 48621 if (useBuffer) 48622 bufferedData.push(data2); 48623 return false; 48624 } 48625 _sendBuffer(); 48626 wsRef.value.send(data2); 48627 return true; 48628 }; 48629 const _init = () => { 48630 if (explicitlyClosed || typeof urlRef.value === "undefined") 48631 return; 48632 const ws = new WebSocket(urlRef.value, protocols); 48633 wsRef.value = ws; 48634 status.value = "CONNECTING"; 48635 ws.onopen = () => { 48636 status.value = "OPEN"; 48637 onConnected == null ? void 0 : onConnected(ws); 48638 heartbeatResume == null ? void 0 : heartbeatResume(); 48639 _sendBuffer(); 48640 }; 48641 ws.onclose = (ev) => { 48642 status.value = "CLOSED"; 48643 onDisconnected == null ? void 0 : onDisconnected(ws, ev); 48644 if (!explicitlyClosed && options.autoReconnect) { 48645 const { 48646 retries = -1, 48647 delay = 1e3, 48648 onFailed 48649 } = resolveNestedOptions(options.autoReconnect); 48650 retried += 1; 48651 if (typeof retries === "number" && (retries < 0 || retried < retries)) 48652 setTimeout(_init, delay); 48653 else if (typeof retries === "function" && retries()) 48654 setTimeout(_init, delay); 48655 else 48656 onFailed == null ? void 0 : onFailed(); 48657 } 48658 }; 48659 ws.onerror = (e) => { 48660 onError == null ? void 0 : onError(ws, e); 48661 }; 48662 ws.onmessage = (e) => { 48663 if (options.heartbeat) { 48664 resetHeartbeat(); 48665 const { 48666 message = DEFAULT_PING_MESSAGE 48667 } = resolveNestedOptions(options.heartbeat); 48668 if (e.data === message) 48669 return; 48670 } 48671 data.value = e.data; 48672 onMessage == null ? void 0 : onMessage(ws, e); 48673 }; 48674 }; 48675 if (options.heartbeat) { 48676 const { 48677 message = DEFAULT_PING_MESSAGE, 48678 interval = 1e3, 48679 pongTimeout = 1e3 48680 } = resolveNestedOptions(options.heartbeat); 48681 const { pause, resume } = (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.useIntervalFn)( 48682 () => { 48683 send(message, false); 48684 if (pongTimeoutWait != null) 48685 return; 48686 pongTimeoutWait = setTimeout(() => { 48687 close(); 48688 explicitlyClosed = false; 48689 }, pongTimeout); 48690 }, 48691 interval, 48692 { immediate: false } 48693 ); 48694 heartbeatPause = pause; 48695 heartbeatResume = resume; 48696 } 48697 if (autoClose) { 48698 if (_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient) 48699 useEventListener("beforeunload", () => close()); 48700 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(close); 48701 } 48702 const open = () => { 48703 if (!_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isClient && !_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.isWorker) 48704 return; 48705 close(); 48706 explicitlyClosed = false; 48707 retried = 0; 48708 _init(); 48709 }; 48710 if (immediate) 48711 open(); 48712 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(urlRef, open); 48713 return { 48714 data, 48715 status, 48716 close, 48717 send, 48718 open, 48719 ws: wsRef 48720 }; 48721} 48722 48723function useWebWorker(arg0, workerOptions, options) { 48724 const { 48725 window = defaultWindow 48726 } = options != null ? options : {}; 48727 const data = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(null); 48728 const worker = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); 48729 const post = (...args) => { 48730 if (!worker.value) 48731 return; 48732 worker.value.postMessage(...args); 48733 }; 48734 const terminate = function terminate2() { 48735 if (!worker.value) 48736 return; 48737 worker.value.terminate(); 48738 }; 48739 if (window) { 48740 if (typeof arg0 === "string") 48741 worker.value = new Worker(arg0, workerOptions); 48742 else if (typeof arg0 === "function") 48743 worker.value = arg0(); 48744 else 48745 worker.value = arg0; 48746 worker.value.onmessage = (e) => { 48747 data.value = e.data; 48748 }; 48749 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(() => { 48750 if (worker.value) 48751 worker.value.terminate(); 48752 }); 48753 } 48754 return { 48755 data, 48756 post, 48757 terminate, 48758 worker 48759 }; 48760} 48761 48762function jobRunner(userFunc) { 48763 return (e) => { 48764 const userFuncArgs = e.data[0]; 48765 return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => { 48766 postMessage(["SUCCESS", result]); 48767 }).catch((error) => { 48768 postMessage(["ERROR", error]); 48769 }); 48770 }; 48771} 48772 48773function depsParser(deps, localDeps) { 48774 if (deps.length === 0 && localDeps.length === 0) 48775 return ""; 48776 const depsString = deps.map((dep) => `'${dep}'`).toString(); 48777 const depsFunctionString = localDeps.filter((dep) => typeof dep === "function").map((fn) => { 48778 const str = fn.toString(); 48779 if (str.trim().startsWith("function")) { 48780 return str; 48781 } else { 48782 const name = fn.name; 48783 return `const ${name} = ${str}`; 48784 } 48785 }).join(";"); 48786 const importString = `importScripts(${depsString});`; 48787 return `${depsString.trim() === "" ? "" : importString} ${depsFunctionString}`; 48788} 48789 48790function createWorkerBlobUrl(fn, deps, localDeps) { 48791 const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`; 48792 const blob = new Blob([blobCode], { type: "text/javascript" }); 48793 const url = URL.createObjectURL(blob); 48794 return url; 48795} 48796 48797function useWebWorkerFn(fn, options = {}) { 48798 const { 48799 dependencies = [], 48800 localDependencies = [], 48801 timeout, 48802 window = defaultWindow 48803 } = options; 48804 const worker = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 48805 const workerStatus = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)("PENDING"); 48806 const promise = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)({}); 48807 const timeoutId = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(); 48808 const workerTerminate = (status = "PENDING") => { 48809 if (worker.value && worker.value._url && window) { 48810 worker.value.terminate(); 48811 URL.revokeObjectURL(worker.value._url); 48812 promise.value = {}; 48813 worker.value = void 0; 48814 window.clearTimeout(timeoutId.value); 48815 workerStatus.value = status; 48816 } 48817 }; 48818 workerTerminate(); 48819 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnScopeDispose)(workerTerminate); 48820 const generateWorker = () => { 48821 const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies); 48822 const newWorker = new Worker(blobUrl); 48823 newWorker._url = blobUrl; 48824 newWorker.onmessage = (e) => { 48825 const { resolve = () => { 48826 }, reject = () => { 48827 } } = promise.value; 48828 const [status, result] = e.data; 48829 switch (status) { 48830 case "SUCCESS": 48831 resolve(result); 48832 workerTerminate(status); 48833 break; 48834 default: 48835 reject(result); 48836 workerTerminate("ERROR"); 48837 break; 48838 } 48839 }; 48840 newWorker.onerror = (e) => { 48841 const { reject = () => { 48842 } } = promise.value; 48843 e.preventDefault(); 48844 reject(e); 48845 workerTerminate("ERROR"); 48846 }; 48847 if (timeout) { 48848 timeoutId.value = setTimeout( 48849 () => workerTerminate("TIMEOUT_EXPIRED"), 48850 timeout 48851 ); 48852 } 48853 return newWorker; 48854 }; 48855 const callWorker = (...fnArgs) => new Promise((resolve, reject) => { 48856 promise.value = { 48857 resolve, 48858 reject 48859 }; 48860 worker.value && worker.value.postMessage([[...fnArgs]]); 48861 workerStatus.value = "RUNNING"; 48862 }); 48863 const workerFn = (...fnArgs) => { 48864 if (workerStatus.value === "RUNNING") { 48865 console.error( 48866 "[useWebWorkerFn] You can only run one instance of the worker at a time." 48867 ); 48868 return Promise.reject(); 48869 } 48870 worker.value = generateWorker(); 48871 return callWorker(...fnArgs); 48872 }; 48873 return { 48874 workerFn, 48875 workerStatus, 48876 workerTerminate 48877 }; 48878} 48879 48880function useWindowFocus(options = {}) { 48881 const { window = defaultWindow } = options; 48882 if (!window) 48883 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(false); 48884 const focused = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(window.document.hasFocus()); 48885 useEventListener(window, "blur", () => { 48886 focused.value = false; 48887 }); 48888 useEventListener(window, "focus", () => { 48889 focused.value = true; 48890 }); 48891 return focused; 48892} 48893 48894function useWindowScroll(options = {}) { 48895 const { window = defaultWindow, behavior = "auto" } = options; 48896 if (!window) { 48897 return { 48898 x: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0), 48899 y: (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(0) 48900 }; 48901 } 48902 const internalX = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(window.scrollX); 48903 const internalY = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(window.scrollY); 48904 const x = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 48905 get() { 48906 return internalX.value; 48907 }, 48908 set(x2) { 48909 scrollTo({ left: x2, behavior }); 48910 } 48911 }); 48912 const y = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.computed)({ 48913 get() { 48914 return internalY.value; 48915 }, 48916 set(y2) { 48917 scrollTo({ top: y2, behavior }); 48918 } 48919 }); 48920 useEventListener( 48921 window, 48922 "scroll", 48923 () => { 48924 internalX.value = window.scrollX; 48925 internalY.value = window.scrollY; 48926 }, 48927 { 48928 capture: false, 48929 passive: true 48930 } 48931 ); 48932 return { x, y }; 48933} 48934 48935function useWindowSize(options = {}) { 48936 const { 48937 window = defaultWindow, 48938 initialWidth = Number.POSITIVE_INFINITY, 48939 initialHeight = Number.POSITIVE_INFINITY, 48940 listenOrientation = true, 48941 includeScrollbar = true 48942 } = options; 48943 const width = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialWidth); 48944 const height = (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.ref)(initialHeight); 48945 const update = () => { 48946 if (window) { 48947 if (includeScrollbar) { 48948 width.value = window.innerWidth; 48949 height.value = window.innerHeight; 48950 } else { 48951 width.value = window.document.documentElement.clientWidth; 48952 height.value = window.document.documentElement.clientHeight; 48953 } 48954 } 48955 }; 48956 update(); 48957 (0,_vueuse_shared__WEBPACK_IMPORTED_MODULE_0__.tryOnMounted)(update); 48958 useEventListener("resize", update, { passive: true }); 48959 if (listenOrientation) { 48960 const matches = useMediaQuery("(orientation: portrait)"); 48961 (0,vue_demi__WEBPACK_IMPORTED_MODULE_1__.watch)(matches, () => update()); 48962 } 48963 return { width, height }; 48964} 48965 48966 48967 48968 48969/***/ }), 48970
vendor: 19,389 bytes, lines 48971-49179
48971/***/ "./node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs": 48972/*!***********************************************************************!*\ 48973 !*** ./node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs ***! 48974 \***********************************************************************/ 48975/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 48976 48977"use strict"; 48978__webpack_require__.r(__webpack_exports__); 48979/* harmony export */ __webpack_require__.d(__webpack_exports__, { 48980/* harmony export */ BaseTransition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransition), 48981/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators), 48982/* harmony export */ Comment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Comment), 48983/* harmony export */ DeprecationTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.DeprecationTypes), 48984/* harmony export */ EffectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.EffectScope), 48985/* harmony export */ ErrorCodes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ErrorCodes), 48986/* harmony export */ ErrorTypeStrings: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ErrorTypeStrings), 48987/* harmony export */ Fragment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Fragment), 48988/* harmony export */ KeepAlive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.KeepAlive), 48989/* harmony export */ ReactiveEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect), 48990/* harmony export */ Static: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Static), 48991/* harmony export */ Suspense: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Suspense), 48992/* harmony export */ Teleport: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Teleport), 48993/* harmony export */ Text: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Text), 48994/* harmony export */ TrackOpTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TrackOpTypes), 48995/* harmony export */ Transition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Transition), 48996/* harmony export */ TransitionGroup: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup), 48997/* harmony export */ TriggerOpTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TriggerOpTypes), 48998/* harmony export */ Vue: () => (/* reexport module object */ vue__WEBPACK_IMPORTED_MODULE_0__), 48999/* harmony export */ Vue2: () => (/* binding */ Vue2), 49000/* harmony export */ VueElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.VueElement), 49001/* harmony export */ assertNumber: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.assertNumber), 49002/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling), 49003/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling), 49004/* harmony export */ camelize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.camelize), 49005/* harmony export */ capitalize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.capitalize), 49006/* harmony export */ cloneVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.cloneVNode), 49007/* harmony export */ compatUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compatUtils), 49008/* harmony export */ compile: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compile), 49009/* harmony export */ computed: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.computed), 49010/* harmony export */ createApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createApp), 49011/* harmony export */ createBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createBlock), 49012/* harmony export */ createCommentVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode), 49013/* harmony export */ createElementBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock), 49014/* harmony export */ createElementVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode), 49015/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer), 49016/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy), 49017/* harmony export */ createRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createRenderer), 49018/* harmony export */ createSSRApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSSRApp), 49019/* harmony export */ createSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSlots), 49020/* harmony export */ createStaticVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode), 49021/* harmony export */ createTextVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode), 49022/* harmony export */ createVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createVNode), 49023/* harmony export */ customRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.customRef), 49024/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent), 49025/* harmony export */ defineComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent), 49026/* harmony export */ defineCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement), 49027/* harmony export */ defineEmits: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineEmits), 49028/* harmony export */ defineExpose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineExpose), 49029/* harmony export */ defineModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineModel), 49030/* harmony export */ defineOptions: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineOptions), 49031/* harmony export */ defineProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineProps), 49032/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement), 49033/* harmony export */ defineSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSlots), 49034/* harmony export */ del: () => (/* binding */ del), 49035/* harmony export */ devtools: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.devtools), 49036/* harmony export */ effect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effect), 49037/* harmony export */ effectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effectScope), 49038/* harmony export */ getCurrentInstance: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance), 49039/* harmony export */ getCurrentScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope), 49040/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren), 49041/* harmony export */ guardReactiveProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps), 49042/* harmony export */ h: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.h), 49043/* harmony export */ handleError: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.handleError), 49044/* harmony export */ hasInjectionContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext), 49045/* harmony export */ hydrate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hydrate), 49046/* harmony export */ initCustomFormatter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter), 49047/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR), 49048/* harmony export */ inject: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.inject), 49049/* harmony export */ install: () => (/* binding */ install), 49050/* harmony export */ isMemoSame: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isMemoSame), 49051/* harmony export */ isProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isProxy), 49052/* harmony export */ isReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReactive), 49053/* harmony export */ isReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReadonly), 49054/* harmony export */ isRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRef), 49055/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly), 49056/* harmony export */ isShallow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isShallow), 49057/* harmony export */ isVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isVNode), 49058/* harmony export */ isVue2: () => (/* binding */ isVue2), 49059/* harmony export */ isVue3: () => (/* binding */ isVue3), 49060/* harmony export */ markRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.markRaw), 49061/* harmony export */ mergeDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults), 49062/* harmony export */ mergeModels: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels), 49063/* harmony export */ mergeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps), 49064/* harmony export */ nextTick: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.nextTick), 49065/* harmony export */ normalizeClass: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass), 49066/* harmony export */ normalizeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps), 49067/* harmony export */ normalizeStyle: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle), 49068/* harmony export */ onActivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onActivated), 49069/* harmony export */ onBeforeMount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount), 49070/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount), 49071/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate), 49072/* harmony export */ onDeactivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated), 49073/* harmony export */ onErrorCaptured: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured), 49074/* harmony export */ onMounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onMounted), 49075/* harmony export */ onRenderTracked: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked), 49076/* harmony export */ onRenderTriggered: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered), 49077/* harmony export */ onScopeDispose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose), 49078/* harmony export */ onServerPrefetch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch), 49079/* harmony export */ onUnmounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted), 49080/* harmony export */ onUpdated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated), 49081/* harmony export */ openBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.openBlock), 49082/* harmony export */ popScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId), 49083/* harmony export */ provide: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.provide), 49084/* harmony export */ proxyRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.proxyRefs), 49085/* harmony export */ pushScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId), 49086/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb), 49087/* harmony export */ reactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.reactive), 49088/* harmony export */ readonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.readonly), 49089/* harmony export */ ref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ref), 49090/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler), 49091/* harmony export */ render: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.render), 49092/* harmony export */ renderList: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderList), 49093/* harmony export */ renderSlot: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot), 49094/* harmony export */ resolveComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent), 49095/* harmony export */ resolveDirective: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective), 49096/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent), 49097/* harmony export */ resolveFilter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveFilter), 49098/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks), 49099/* harmony export */ set: () => (/* binding */ set), 49100/* harmony export */ setBlockTracking: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking), 49101/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook), 49102/* harmony export */ setTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks), 49103/* harmony export */ shallowReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive), 49104/* harmony export */ shallowReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly), 49105/* harmony export */ shallowRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef), 49106/* harmony export */ ssrContextKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey), 49107/* harmony export */ ssrUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrUtils), 49108/* harmony export */ stop: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.stop), 49109/* harmony export */ toDisplayString: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString), 49110/* harmony export */ toHandlerKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey), 49111/* harmony export */ toHandlers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlers), 49112/* harmony export */ toRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRaw), 49113/* harmony export */ toRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRef), 49114/* harmony export */ toRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRefs), 49115/* harmony export */ toValue: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toValue), 49116/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs), 49117/* harmony export */ triggerRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.triggerRef), 49118/* harmony export */ unref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.unref), 49119/* harmony export */ useAttrs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs), 49120/* harmony export */ useCssModule: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssModule), 49121/* harmony export */ useCssVars: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssVars), 49122/* harmony export */ useModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useModel), 49123/* harmony export */ useSSRContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSSRContext), 49124/* harmony export */ useSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSlots), 49125/* harmony export */ useTransitionState: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useTransitionState), 49126/* harmony export */ vModelCheckbox: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox), 49127/* harmony export */ vModelDynamic: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic), 49128/* harmony export */ vModelRadio: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio), 49129/* harmony export */ vModelSelect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect), 49130/* harmony export */ vModelText: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelText), 49131/* harmony export */ vShow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vShow), 49132/* harmony export */ version: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.version), 49133/* harmony export */ warn: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.warn), 49134/* harmony export */ watch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watch), 49135/* harmony export */ watchEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect), 49136/* harmony export */ watchPostEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect), 49137/* harmony export */ watchSyncEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect), 49138/* harmony export */ withAsyncContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext), 49139/* harmony export */ withCtx: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withCtx), 49140/* harmony export */ withDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDefaults), 49141/* harmony export */ withDirectives: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives), 49142/* harmony export */ withKeys: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withKeys), 49143/* harmony export */ withMemo: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withMemo), 49144/* harmony export */ withModifiers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers), 49145/* harmony export */ withScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withScopeId) 49146/* harmony export */ }); 49147/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); 49148 49149 49150var isVue2 = false 49151var isVue3 = true 49152var Vue2 = undefined 49153 49154function install() {} 49155 49156function set(target, key, val) { 49157 if (Array.isArray(target)) { 49158 target.length = Math.max(target.length, key) 49159 target.splice(key, 1, val) 49160 return val 49161 } 49162 target[key] = val 49163 return val 49164} 49165 49166function del(target, key) { 49167 if (Array.isArray(target)) { 49168 target.splice(key, 1) 49169 return 49170 } 49171 delete target[key] 49172} 49173 49174 49175 49176 49177 49178/***/ }), 49179
vendor: 54,415 bytes, lines 49180-50888
49180/***/ "./node_modules/@vueuse/shared/index.mjs": 49181/*!***********************************************!*\ 49182 !*** ./node_modules/@vueuse/shared/index.mjs ***! 49183 \***********************************************/ 49184/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 49185 49186"use strict"; 49187__webpack_require__.r(__webpack_exports__); 49188/* harmony export */ __webpack_require__.d(__webpack_exports__, { 49189/* harmony export */ assert: () => (/* binding */ assert), 49190/* harmony export */ autoResetRef: () => (/* binding */ refAutoReset), 49191/* harmony export */ bypassFilter: () => (/* binding */ bypassFilter), 49192/* harmony export */ camelize: () => (/* binding */ camelize), 49193/* harmony export */ clamp: () => (/* binding */ clamp), 49194/* harmony export */ computedEager: () => (/* binding */ computedEager), 49195/* harmony export */ computedWithControl: () => (/* binding */ computedWithControl), 49196/* harmony export */ containsProp: () => (/* binding */ containsProp), 49197/* harmony export */ controlledComputed: () => (/* binding */ computedWithControl), 49198/* harmony export */ controlledRef: () => (/* binding */ controlledRef), 49199/* harmony export */ createEventHook: () => (/* binding */ createEventHook), 49200/* harmony export */ createFilterWrapper: () => (/* binding */ createFilterWrapper), 49201/* harmony export */ createGlobalState: () => (/* binding */ createGlobalState), 49202/* harmony export */ createInjectionState: () => (/* binding */ createInjectionState), 49203/* harmony export */ createReactiveFn: () => (/* binding */ reactify), 49204/* harmony export */ createSharedComposable: () => (/* binding */ createSharedComposable), 49205/* harmony export */ createSingletonPromise: () => (/* binding */ createSingletonPromise), 49206/* harmony export */ debounceFilter: () => (/* binding */ debounceFilter), 49207/* harmony export */ debouncedRef: () => (/* binding */ refDebounced), 49208/* harmony export */ debouncedWatch: () => (/* binding */ watchDebounced), 49209/* harmony export */ directiveHooks: () => (/* binding */ directiveHooks), 49210/* harmony export */ eagerComputed: () => (/* binding */ computedEager), 49211/* harmony export */ extendRef: () => (/* binding */ extendRef), 49212/* harmony export */ formatDate: () => (/* binding */ formatDate), 49213/* harmony export */ get: () => (/* binding */ get), 49214/* harmony export */ getLifeCycleTarget: () => (/* binding */ getLifeCycleTarget), 49215/* harmony export */ hasOwn: () => (/* binding */ hasOwn), 49216/* harmony export */ hyphenate: () => (/* binding */ hyphenate), 49217/* harmony export */ identity: () => (/* binding */ identity), 49218/* harmony export */ ignorableWatch: () => (/* binding */ watchIgnorable), 49219/* harmony export */ increaseWithUnit: () => (/* binding */ increaseWithUnit), 49220/* harmony export */ injectLocal: () => (/* binding */ injectLocal), 49221/* harmony export */ invoke: () => (/* binding */ invoke), 49222/* harmony export */ isClient: () => (/* binding */ isClient), 49223/* harmony export */ isDef: () => (/* binding */ isDef), 49224/* harmony export */ isDefined: () => (/* binding */ isDefined), 49225/* harmony export */ isIOS: () => (/* binding */ isIOS), 49226/* harmony export */ isObject: () => (/* binding */ isObject), 49227/* harmony export */ isWorker: () => (/* binding */ isWorker), 49228/* harmony export */ makeDestructurable: () => (/* binding */ makeDestructurable), 49229/* harmony export */ noop: () => (/* binding */ noop), 49230/* harmony export */ normalizeDate: () => (/* binding */ normalizeDate), 49231/* harmony export */ notNullish: () => (/* binding */ notNullish), 49232/* harmony export */ now: () => (/* binding */ now), 49233/* harmony export */ objectEntries: () => (/* binding */ objectEntries), 49234/* harmony export */ objectOmit: () => (/* binding */ objectOmit), 49235/* harmony export */ objectPick: () => (/* binding */ objectPick), 49236/* harmony export */ pausableFilter: () => (/* binding */ pausableFilter), 49237/* harmony export */ pausableWatch: () => (/* binding */ watchPausable), 49238/* harmony export */ promiseTimeout: () => (/* binding */ promiseTimeout), 49239/* harmony export */ provideLocal: () => (/* binding */ provideLocal), 49240/* harmony export */ rand: () => (/* binding */ rand), 49241/* harmony export */ reactify: () => (/* binding */ reactify), 49242/* harmony export */ reactifyObject: () => (/* binding */ reactifyObject), 49243/* harmony export */ reactiveComputed: () => (/* binding */ reactiveComputed), 49244/* harmony export */ reactiveOmit: () => (/* binding */ reactiveOmit), 49245/* harmony export */ reactivePick: () => (/* binding */ reactivePick), 49246/* harmony export */ refAutoReset: () => (/* binding */ refAutoReset), 49247/* harmony export */ refDebounced: () => (/* binding */ refDebounced), 49248/* harmony export */ refDefault: () => (/* binding */ refDefault), 49249/* harmony export */ refThrottled: () => (/* binding */ refThrottled), 49250/* harmony export */ refWithControl: () => (/* binding */ refWithControl), 49251/* harmony export */ resolveRef: () => (/* binding */ resolveRef), 49252/* harmony export */ resolveUnref: () => (/* binding */ resolveUnref), 49253/* harmony export */ set: () => (/* binding */ set), 49254/* harmony export */ syncRef: () => (/* binding */ syncRef), 49255/* harmony export */ syncRefs: () => (/* binding */ syncRefs), 49256/* harmony export */ throttleFilter: () => (/* binding */ throttleFilter), 49257/* harmony export */ throttledRef: () => (/* binding */ refThrottled), 49258/* harmony export */ throttledWatch: () => (/* binding */ watchThrottled), 49259/* harmony export */ timestamp: () => (/* binding */ timestamp), 49260/* harmony export */ toReactive: () => (/* binding */ toReactive), 49261/* harmony export */ toRef: () => (/* binding */ toRef), 49262/* harmony export */ toRefs: () => (/* binding */ toRefs), 49263/* harmony export */ toValue: () => (/* binding */ toValue), 49264/* harmony export */ tryOnBeforeMount: () => (/* binding */ tryOnBeforeMount), 49265/* harmony export */ tryOnBeforeUnmount: () => (/* binding */ tryOnBeforeUnmount), 49266/* harmony export */ tryOnMounted: () => (/* binding */ tryOnMounted), 49267/* harmony export */ tryOnScopeDispose: () => (/* binding */ tryOnScopeDispose), 49268/* harmony export */ tryOnUnmounted: () => (/* binding */ tryOnUnmounted), 49269/* harmony export */ until: () => (/* binding */ until), 49270/* harmony export */ useArrayDifference: () => (/* binding */ useArrayDifference), 49271/* harmony export */ useArrayEvery: () => (/* binding */ useArrayEvery), 49272/* harmony export */ useArrayFilter: () => (/* binding */ useArrayFilter), 49273/* harmony export */ useArrayFind: () => (/* binding */ useArrayFind), 49274/* harmony export */ useArrayFindIndex: () => (/* binding */ useArrayFindIndex), 49275/* harmony export */ useArrayFindLast: () => (/* binding */ useArrayFindLast), 49276/* harmony export */ useArrayIncludes: () => (/* binding */ useArrayIncludes), 49277/* harmony export */ useArrayJoin: () => (/* binding */ useArrayJoin), 49278/* harmony export */ useArrayMap: () => (/* binding */ useArrayMap), 49279/* harmony export */ useArrayReduce: () => (/* binding */ useArrayReduce), 49280/* harmony export */ useArraySome: () => (/* binding */ useArraySome), 49281/* harmony export */ useArrayUnique: () => (/* binding */ useArrayUnique), 49282/* harmony export */ useCounter: () => (/* binding */ useCounter), 49283/* harmony export */ useDateFormat: () => (/* binding */ useDateFormat), 49284/* harmony export */ useDebounce: () => (/* binding */ refDebounced), 49285/* harmony export */ useDebounceFn: () => (/* binding */ useDebounceFn), 49286/* harmony export */ useInterval: () => (/* binding */ useInterval), 49287/* harmony export */ useIntervalFn: () => (/* binding */ useIntervalFn), 49288/* harmony export */ useLastChanged: () => (/* binding */ useLastChanged), 49289/* harmony export */ useThrottle: () => (/* binding */ refThrottled), 49290/* harmony export */ useThrottleFn: () => (/* binding */ useThrottleFn), 49291/* harmony export */ useTimeout: () => (/* binding */ useTimeout), 49292/* harmony export */ useTimeoutFn: () => (/* binding */ useTimeoutFn), 49293/* harmony export */ useToNumber: () => (/* binding */ useToNumber), 49294/* harmony export */ useToString: () => (/* binding */ useToString), 49295/* harmony export */ useToggle: () => (/* binding */ useToggle), 49296/* harmony export */ watchArray: () => (/* binding */ watchArray), 49297/* harmony export */ watchAtMost: () => (/* binding */ watchAtMost), 49298/* harmony export */ watchDebounced: () => (/* binding */ watchDebounced), 49299/* harmony export */ watchDeep: () => (/* binding */ watchDeep), 49300/* harmony export */ watchIgnorable: () => (/* binding */ watchIgnorable), 49301/* harmony export */ watchImmediate: () => (/* binding */ watchImmediate), 49302/* harmony export */ watchOnce: () => (/* binding */ watchOnce), 49303/* harmony export */ watchPausable: () => (/* binding */ watchPausable), 49304/* harmony export */ watchThrottled: () => (/* binding */ watchThrottled), 49305/* harmony export */ watchTriggerable: () => (/* binding */ watchTriggerable), 49306/* harmony export */ watchWithFilter: () => (/* binding */ watchWithFilter), 49307/* harmony export */ whenever: () => (/* binding */ whenever) 49308/* harmony export */ }); 49309/* harmony import */ var vue_demi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-demi */ "./node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.mjs"); 49310 49311 49312function computedEager(fn, options) { 49313 var _a; 49314 const result = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(); 49315 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watchEffect)(() => { 49316 result.value = fn(); 49317 }, { 49318 ...options, 49319 flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync" 49320 }); 49321 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.readonly)(result); 49322} 49323 49324function computedWithControl(source, fn) { 49325 let v = void 0; 49326 let track; 49327 let trigger; 49328 const dirty = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(true); 49329 const update = () => { 49330 dirty.value = true; 49331 trigger(); 49332 }; 49333 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(source, update, { flush: "sync" }); 49334 const get = typeof fn === "function" ? fn : fn.get; 49335 const set = typeof fn === "function" ? void 0 : fn.set; 49336 const result = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.customRef)((_track, _trigger) => { 49337 track = _track; 49338 trigger = _trigger; 49339 return { 49340 get() { 49341 if (dirty.value) { 49342 v = get(); 49343 dirty.value = false; 49344 } 49345 track(); 49346 return v; 49347 }, 49348 set(v2) { 49349 set == null ? void 0 : set(v2); 49350 } 49351 }; 49352 }); 49353 if (Object.isExtensible(result)) 49354 result.trigger = update; 49355 return result; 49356} 49357 49358function tryOnScopeDispose(fn) { 49359 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope)()) { 49360 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose)(fn); 49361 return true; 49362 } 49363 return false; 49364} 49365 49366function createEventHook() { 49367 const fns = /* @__PURE__ */ new Set(); 49368 const off = (fn) => { 49369 fns.delete(fn); 49370 }; 49371 const on = (fn) => { 49372 fns.add(fn); 49373 const offFn = () => off(fn); 49374 tryOnScopeDispose(offFn); 49375 return { 49376 off: offFn 49377 }; 49378 }; 49379 const trigger = (...args) => { 49380 return Promise.all(Array.from(fns).map((fn) => fn(...args))); 49381 }; 49382 return { 49383 on, 49384 off, 49385 trigger 49386 }; 49387} 49388 49389function createGlobalState(stateFactory) { 49390 let initialized = false; 49391 let state; 49392 const scope = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.effectScope)(true); 49393 return (...args) => { 49394 if (!initialized) { 49395 state = scope.run(() => stateFactory(...args)); 49396 initialized = true; 49397 } 49398 return state; 49399 }; 49400} 49401 49402const localProvidedStateMap = /* @__PURE__ */ new WeakMap(); 49403 49404const provideLocal = (key, value) => { 49405 var _a; 49406 const instance = (_a = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)()) == null ? void 0 : _a.proxy; 49407 if (instance == null) 49408 throw new Error("provideLocal must be called in setup"); 49409 if (!localProvidedStateMap.has(instance)) 49410 localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null)); 49411 const localProvidedState = localProvidedStateMap.get(instance); 49412 localProvidedState[key] = value; 49413 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.provide)(key, value); 49414}; 49415 49416const injectLocal = (...args) => { 49417 var _a; 49418 const key = args[0]; 49419 const instance = (_a = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)()) == null ? void 0 : _a.proxy; 49420 if (instance == null) 49421 throw new Error("injectLocal must be called in setup"); 49422 if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) 49423 return localProvidedStateMap.get(instance)[key]; 49424 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.inject)(...args); 49425}; 49426 49427function createInjectionState(composable, options) { 49428 const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState"); 49429 const defaultValue = options == null ? void 0 : options.defaultValue; 49430 const useProvidingState = (...args) => { 49431 const state = composable(...args); 49432 provideLocal(key, state); 49433 return state; 49434 }; 49435 const useInjectedState = () => injectLocal(key, defaultValue); 49436 return [useProvidingState, useInjectedState]; 49437} 49438 49439function createSharedComposable(composable) { 49440 let subscribers = 0; 49441 let state; 49442 let scope; 49443 const dispose = () => { 49444 subscribers -= 1; 49445 if (scope && subscribers <= 0) { 49446 scope.stop(); 49447 state = void 0; 49448 scope = void 0; 49449 } 49450 }; 49451 return (...args) => { 49452 subscribers += 1; 49453 if (!state) { 49454 scope = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.effectScope)(true); 49455 state = scope.run(() => composable(...args)); 49456 } 49457 tryOnScopeDispose(dispose); 49458 return state; 49459 }; 49460} 49461 49462function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) { 49463 if (!vue_demi__WEBPACK_IMPORTED_MODULE_0__.isVue3 && !vue_demi__WEBPACK_IMPORTED_MODULE_0__.version.startsWith("2.7.")) { 49464 if (true) 49465 throw new Error("[VueUse] extendRef only works in Vue 2.7 or above."); 49466 return; 49467 } 49468 for (const [key, value] of Object.entries(extend)) { 49469 if (key === "value") 49470 continue; 49471 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(value) && unwrap) { 49472 Object.defineProperty(ref, key, { 49473 get() { 49474 return value.value; 49475 }, 49476 set(v) { 49477 value.value = v; 49478 }, 49479 enumerable 49480 }); 49481 } else { 49482 Object.defineProperty(ref, key, { value, enumerable }); 49483 } 49484 } 49485 return ref; 49486} 49487 49488function get(obj, key) { 49489 if (key == null) 49490 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(obj); 49491 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(obj)[key]; 49492} 49493 49494function isDefined(v) { 49495 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(v) != null; 49496} 49497 49498function makeDestructurable(obj, arr) { 49499 if (typeof Symbol !== "undefined") { 49500 const clone = { ...obj }; 49501 Object.defineProperty(clone, Symbol.iterator, { 49502 enumerable: false, 49503 value() { 49504 let index = 0; 49505 return { 49506 next: () => ({ 49507 value: arr[index++], 49508 done: index > arr.length 49509 }) 49510 }; 49511 } 49512 }); 49513 return clone; 49514 } else { 49515 return Object.assign([...arr], obj); 49516 } 49517} 49518 49519function toValue(r) { 49520 return typeof r === "function" ? r() : (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(r); 49521} 49522const resolveUnref = toValue; 49523 49524function reactify(fn, options) { 49525 const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref : toValue; 49526 return function(...args) { 49527 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => fn.apply(this, args.map((i) => unrefFn(i)))); 49528 }; 49529} 49530 49531function reactifyObject(obj, optionsOrKeys = {}) { 49532 let keys = []; 49533 let options; 49534 if (Array.isArray(optionsOrKeys)) { 49535 keys = optionsOrKeys; 49536 } else { 49537 options = optionsOrKeys; 49538 const { includeOwnProperties = true } = optionsOrKeys; 49539 keys.push(...Object.keys(obj)); 49540 if (includeOwnProperties) 49541 keys.push(...Object.getOwnPropertyNames(obj)); 49542 } 49543 return Object.fromEntries( 49544 keys.map((key) => { 49545 const value = obj[key]; 49546 return [ 49547 key, 49548 typeof value === "function" ? reactify(value.bind(obj), options) : value 49549 ]; 49550 }) 49551 ); 49552} 49553 49554function toReactive(objectRef) { 49555 if (!(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(objectRef)) 49556 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.reactive)(objectRef); 49557 const proxy = new Proxy({}, { 49558 get(_, p, receiver) { 49559 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(Reflect.get(objectRef.value, p, receiver)); 49560 }, 49561 set(_, p, value) { 49562 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(objectRef.value[p]) && !(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) 49563 objectRef.value[p].value = value; 49564 else 49565 objectRef.value[p] = value; 49566 return true; 49567 }, 49568 deleteProperty(_, p) { 49569 return Reflect.deleteProperty(objectRef.value, p); 49570 }, 49571 has(_, p) { 49572 return Reflect.has(objectRef.value, p); 49573 }, 49574 ownKeys() { 49575 return Object.keys(objectRef.value); 49576 }, 49577 getOwnPropertyDescriptor() { 49578 return { 49579 enumerable: true, 49580 configurable: true 49581 }; 49582 } 49583 }); 49584 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.reactive)(proxy); 49585} 49586 49587function reactiveComputed(fn) { 49588 return toReactive((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(fn)); 49589} 49590 49591function reactiveOmit(obj, ...keys) { 49592 const flatKeys = keys.flat(); 49593 const predicate = flatKeys[0]; 49594 return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.toRefs)(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.toRefs)(obj)).filter((e) => !flatKeys.includes(e[0])))); 49595} 49596 49597const isClient = typeof window !== "undefined" && typeof document !== "undefined"; 49598const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; 49599const isDef = (val) => typeof val !== "undefined"; 49600const notNullish = (val) => val != null; 49601const assert = (condition, ...infos) => { 49602 if (!condition) 49603 console.warn(...infos); 49604}; 49605const toString = Object.prototype.toString; 49606const isObject = (val) => toString.call(val) === "[object Object]"; 49607const now = () => Date.now(); 49608const timestamp = () => +Date.now(); 49609const clamp = (n, min, max) => Math.min(max, Math.max(min, n)); 49610const noop = () => { 49611}; 49612const rand = (min, max) => { 49613 min = Math.ceil(min); 49614 max = Math.floor(max); 49615 return Math.floor(Math.random() * (max - min + 1)) + min; 49616}; 49617const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key); 49618const isIOS = /* @__PURE__ */ getIsIOS(); 49619function getIsIOS() { 49620 var _a, _b; 49621 return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent)); 49622} 49623 49624function createFilterWrapper(filter, fn) { 49625 function wrapper(...args) { 49626 return new Promise((resolve, reject) => { 49627 Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject); 49628 }); 49629 } 49630 return wrapper; 49631} 49632const bypassFilter = (invoke) => { 49633 return invoke(); 49634}; 49635function debounceFilter(ms, options = {}) { 49636 let timer; 49637 let maxTimer; 49638 let lastRejector = noop; 49639 const _clearTimeout = (timer2) => { 49640 clearTimeout(timer2); 49641 lastRejector(); 49642 lastRejector = noop; 49643 }; 49644 const filter = (invoke) => { 49645 const duration = toValue(ms); 49646 const maxDuration = toValue(options.maxWait); 49647 if (timer) 49648 _clearTimeout(timer); 49649 if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) { 49650 if (maxTimer) { 49651 _clearTimeout(maxTimer); 49652 maxTimer = null; 49653 } 49654 return Promise.resolve(invoke()); 49655 } 49656 return new Promise((resolve, reject) => { 49657 lastRejector = options.rejectOnCancel ? reject : resolve; 49658 if (maxDuration && !maxTimer) { 49659 maxTimer = setTimeout(() => { 49660 if (timer) 49661 _clearTimeout(timer); 49662 maxTimer = null; 49663 resolve(invoke()); 49664 }, maxDuration); 49665 } 49666 timer = setTimeout(() => { 49667 if (maxTimer) 49668 _clearTimeout(maxTimer); 49669 maxTimer = null; 49670 resolve(invoke()); 49671 }, duration); 49672 }); 49673 }; 49674 return filter; 49675} 49676function throttleFilter(...args) { 49677 let lastExec = 0; 49678 let timer; 49679 let isLeading = true; 49680 let lastRejector = noop; 49681 let lastValue; 49682 let ms; 49683 let trailing; 49684 let leading; 49685 let rejectOnCancel; 49686 if (!(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(args[0]) && typeof args[0] === "object") 49687 ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]); 49688 else 49689 [ms, trailing = true, leading = true, rejectOnCancel = false] = args; 49690 const clear = () => { 49691 if (timer) { 49692 clearTimeout(timer); 49693 timer = void 0; 49694 lastRejector(); 49695 lastRejector = noop; 49696 } 49697 }; 49698 const filter = (_invoke) => { 49699 const duration = toValue(ms); 49700 const elapsed = Date.now() - lastExec; 49701 const invoke = () => { 49702 return lastValue = _invoke(); 49703 }; 49704 clear(); 49705 if (duration <= 0) { 49706 lastExec = Date.now(); 49707 return invoke(); 49708 } 49709 if (elapsed > duration && (leading || !isLeading)) { 49710 lastExec = Date.now(); 49711 invoke(); 49712 } else if (trailing) { 49713 lastValue = new Promise((resolve, reject) => { 49714 lastRejector = rejectOnCancel ? reject : resolve; 49715 timer = setTimeout(() => { 49716 lastExec = Date.now(); 49717 isLeading = true; 49718 resolve(invoke()); 49719 clear(); 49720 }, Math.max(0, duration - elapsed)); 49721 }); 49722 } 49723 if (!leading && !timer) 49724 timer = setTimeout(() => isLeading = true, duration); 49725 isLeading = false; 49726 return lastValue; 49727 }; 49728 return filter; 49729} 49730function pausableFilter(extendFilter = bypassFilter) { 49731 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(true); 49732 function pause() { 49733 isActive.value = false; 49734 } 49735 function resume() { 49736 isActive.value = true; 49737 } 49738 const eventFilter = (...args) => { 49739 if (isActive.value) 49740 extendFilter(...args); 49741 }; 49742 return { isActive: (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.readonly)(isActive), pause, resume, eventFilter }; 49743} 49744 49745const directiveHooks = { 49746 mounted: vue_demi__WEBPACK_IMPORTED_MODULE_0__.isVue3 ? "mounted" : "inserted", 49747 updated: vue_demi__WEBPACK_IMPORTED_MODULE_0__.isVue3 ? "updated" : "componentUpdated", 49748 unmounted: vue_demi__WEBPACK_IMPORTED_MODULE_0__.isVue3 ? "unmounted" : "unbind" 49749}; 49750 49751function cacheStringFunction(fn) { 49752 const cache = /* @__PURE__ */ Object.create(null); 49753 return (str) => { 49754 const hit = cache[str]; 49755 return hit || (cache[str] = fn(str)); 49756 }; 49757} 49758const hyphenateRE = /\B([A-Z])/g; 49759const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); 49760const camelizeRE = /-(\w)/g; 49761const camelize = cacheStringFunction((str) => { 49762 return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); 49763}); 49764 49765function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") { 49766 return new Promise((resolve, reject) => { 49767 if (throwOnTimeout) 49768 setTimeout(() => reject(reason), ms); 49769 else 49770 setTimeout(resolve, ms); 49771 }); 49772} 49773function identity(arg) { 49774 return arg; 49775} 49776function createSingletonPromise(fn) { 49777 let _promise; 49778 function wrapper() { 49779 if (!_promise) 49780 _promise = fn(); 49781 return _promise; 49782 } 49783 wrapper.reset = async () => { 49784 const _prev = _promise; 49785 _promise = void 0; 49786 if (_prev) 49787 await _prev; 49788 }; 49789 return wrapper; 49790} 49791function invoke(fn) { 49792 return fn(); 49793} 49794function containsProp(obj, ...props) { 49795 return props.some((k) => k in obj); 49796} 49797function increaseWithUnit(target, delta) { 49798 var _a; 49799 if (typeof target === "number") 49800 return target + delta; 49801 const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || ""; 49802 const unit = target.slice(value.length); 49803 const result = Number.parseFloat(value) + delta; 49804 if (Number.isNaN(result)) 49805 return target; 49806 return result + unit; 49807} 49808function objectPick(obj, keys, omitUndefined = false) { 49809 return keys.reduce((n, k) => { 49810 if (k in obj) { 49811 if (!omitUndefined || obj[k] !== void 0) 49812 n[k] = obj[k]; 49813 } 49814 return n; 49815 }, {}); 49816} 49817function objectOmit(obj, keys, omitUndefined = false) { 49818 return Object.fromEntries(Object.entries(obj).filter(([key, value]) => { 49819 return (!omitUndefined || value !== void 0) && !keys.includes(key); 49820 })); 49821} 49822function objectEntries(obj) { 49823 return Object.entries(obj); 49824} 49825function getLifeCycleTarget(target) { 49826 return target || (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)(); 49827} 49828 49829function toRef(...args) { 49830 if (args.length !== 1) 49831 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.toRef)(...args); 49832 const r = args[0]; 49833 return typeof r === "function" ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.readonly)((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.customRef)(() => ({ get: r, set: noop }))) : (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(r); 49834} 49835const resolveRef = toRef; 49836 49837function reactivePick(obj, ...keys) { 49838 const flatKeys = keys.flat(); 49839 const predicate = flatKeys[0]; 49840 return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.toRefs)(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)]))); 49841} 49842 49843function refAutoReset(defaultValue, afterMs = 1e4) { 49844 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.customRef)((track, trigger) => { 49845 let value = toValue(defaultValue); 49846 let timer; 49847 const resetAfter = () => setTimeout(() => { 49848 value = toValue(defaultValue); 49849 trigger(); 49850 }, toValue(afterMs)); 49851 tryOnScopeDispose(() => { 49852 clearTimeout(timer); 49853 }); 49854 return { 49855 get() { 49856 track(); 49857 return value; 49858 }, 49859 set(newValue) { 49860 value = newValue; 49861 trigger(); 49862 clearTimeout(timer); 49863 timer = resetAfter(); 49864 } 49865 }; 49866 }); 49867} 49868 49869function useDebounceFn(fn, ms = 200, options = {}) { 49870 return createFilterWrapper( 49871 debounceFilter(ms, options), 49872 fn 49873 ); 49874} 49875 49876function refDebounced(value, ms = 200, options = {}) { 49877 const debounced = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(value.value); 49878 const updater = useDebounceFn(() => { 49879 debounced.value = value.value; 49880 }, ms, options); 49881 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(value, () => updater()); 49882 return debounced; 49883} 49884 49885function refDefault(source, defaultValue) { 49886 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)({ 49887 get() { 49888 var _a; 49889 return (_a = source.value) != null ? _a : defaultValue; 49890 }, 49891 set(value) { 49892 source.value = value; 49893 } 49894 }); 49895} 49896 49897function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) { 49898 return createFilterWrapper( 49899 throttleFilter(ms, trailing, leading, rejectOnCancel), 49900 fn 49901 ); 49902} 49903 49904function refThrottled(value, delay = 200, trailing = true, leading = true) { 49905 if (delay <= 0) 49906 return value; 49907 const throttled = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(value.value); 49908 const updater = useThrottleFn(() => { 49909 throttled.value = value.value; 49910 }, delay, trailing, leading); 49911 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(value, () => updater()); 49912 return throttled; 49913} 49914 49915function refWithControl(initial, options = {}) { 49916 let source = initial; 49917 let track; 49918 let trigger; 49919 const ref = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.customRef)((_track, _trigger) => { 49920 track = _track; 49921 trigger = _trigger; 49922 return { 49923 get() { 49924 return get(); 49925 }, 49926 set(v) { 49927 set(v); 49928 } 49929 }; 49930 }); 49931 function get(tracking = true) { 49932 if (tracking) 49933 track(); 49934 return source; 49935 } 49936 function set(value, triggering = true) { 49937 var _a, _b; 49938 if (value === source) 49939 return; 49940 const old = source; 49941 if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false) 49942 return; 49943 source = value; 49944 (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old); 49945 if (triggering) 49946 trigger(); 49947 } 49948 const untrackedGet = () => get(false); 49949 const silentSet = (v) => set(v, false); 49950 const peek = () => get(false); 49951 const lay = (v) => set(v, false); 49952 return extendRef( 49953 ref, 49954 { 49955 get, 49956 set, 49957 untrackedGet, 49958 silentSet, 49959 peek, 49960 lay 49961 }, 49962 { enumerable: true } 49963 ); 49964} 49965const controlledRef = refWithControl; 49966 49967function set(...args) { 49968 if (args.length === 2) { 49969 const [ref, value] = args; 49970 ref.value = value; 49971 } 49972 if (args.length === 3) { 49973 if (vue_demi__WEBPACK_IMPORTED_MODULE_0__.isVue2) { 49974 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.set)(...args); 49975 } else { 49976 const [target, key, value] = args; 49977 target[key] = value; 49978 } 49979 } 49980} 49981 49982function watchWithFilter(source, cb, options = {}) { 49983 const { 49984 eventFilter = bypassFilter, 49985 ...watchOptions 49986 } = options; 49987 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 49988 source, 49989 createFilterWrapper( 49990 eventFilter, 49991 cb 49992 ), 49993 watchOptions 49994 ); 49995} 49996 49997function watchPausable(source, cb, options = {}) { 49998 const { 49999 eventFilter: filter, 50000 ...watchOptions 50001 } = options; 50002 const { eventFilter, pause, resume, isActive } = pausableFilter(filter); 50003 const stop = watchWithFilter( 50004 source, 50005 cb, 50006 { 50007 ...watchOptions, 50008 eventFilter 50009 } 50010 ); 50011 return { stop, pause, resume, isActive }; 50012} 50013 50014function syncRef(left, right, ...[options]) { 50015 const { 50016 flush = "sync", 50017 deep = false, 50018 immediate = true, 50019 direction = "both", 50020 transform = {} 50021 } = options || {}; 50022 const watchers = []; 50023 const transformLTR = "ltr" in transform && transform.ltr || ((v) => v); 50024 const transformRTL = "rtl" in transform && transform.rtl || ((v) => v); 50025 if (direction === "both" || direction === "ltr") { 50026 watchers.push(watchPausable( 50027 left, 50028 (newValue) => { 50029 watchers.forEach((w) => w.pause()); 50030 right.value = transformLTR(newValue); 50031 watchers.forEach((w) => w.resume()); 50032 }, 50033 { flush, deep, immediate } 50034 )); 50035 } 50036 if (direction === "both" || direction === "rtl") { 50037 watchers.push(watchPausable( 50038 right, 50039 (newValue) => { 50040 watchers.forEach((w) => w.pause()); 50041 left.value = transformRTL(newValue); 50042 watchers.forEach((w) => w.resume()); 50043 }, 50044 { flush, deep, immediate } 50045 )); 50046 } 50047 const stop = () => { 50048 watchers.forEach((w) => w.stop()); 50049 }; 50050 return stop; 50051} 50052 50053function syncRefs(source, targets, options = {}) { 50054 const { 50055 flush = "sync", 50056 deep = false, 50057 immediate = true 50058 } = options; 50059 if (!Array.isArray(targets)) 50060 targets = [targets]; 50061 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50062 source, 50063 (newValue) => targets.forEach((target) => target.value = newValue), 50064 { flush, deep, immediate } 50065 ); 50066} 50067 50068function toRefs(objectRef, options = {}) { 50069 if (!(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(objectRef)) 50070 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.toRefs)(objectRef); 50071 const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; 50072 for (const key in objectRef.value) { 50073 result[key] = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.customRef)(() => ({ 50074 get() { 50075 return objectRef.value[key]; 50076 }, 50077 set(v) { 50078 var _a; 50079 const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true; 50080 if (replaceRef) { 50081 if (Array.isArray(objectRef.value)) { 50082 const copy = [...objectRef.value]; 50083 copy[key] = v; 50084 objectRef.value = copy; 50085 } else { 50086 const newObject = { ...objectRef.value, [key]: v }; 50087 Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); 50088 objectRef.value = newObject; 50089 } 50090 } else { 50091 objectRef.value[key] = v; 50092 } 50093 } 50094 })); 50095 } 50096 return result; 50097} 50098 50099function tryOnBeforeMount(fn, sync = true, target) { 50100 const instance = getLifeCycleTarget(target); 50101 if (instance) 50102 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(fn, target); 50103 else if (sync) 50104 fn(); 50105 else 50106 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)(fn); 50107} 50108 50109function tryOnBeforeUnmount(fn, target) { 50110 const instance = getLifeCycleTarget(target); 50111 if (instance) 50112 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(fn, target); 50113} 50114 50115function tryOnMounted(fn, sync = true, target) { 50116 const instance = getLifeCycleTarget(); 50117 if (instance) 50118 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onMounted)(fn, target); 50119 else if (sync) 50120 fn(); 50121 else 50122 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)(fn); 50123} 50124 50125function tryOnUnmounted(fn, target) { 50126 const instance = getLifeCycleTarget(target); 50127 if (instance) 50128 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(fn, target); 50129} 50130 50131function createUntil(r, isNot = false) { 50132 function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) { 50133 let stop = null; 50134 const watcher = new Promise((resolve) => { 50135 stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50136 r, 50137 (v) => { 50138 if (condition(v) !== isNot) { 50139 stop == null ? void 0 : stop(); 50140 resolve(v); 50141 } 50142 }, 50143 { 50144 flush, 50145 deep, 50146 immediate: true 50147 } 50148 ); 50149 }); 50150 const promises = [watcher]; 50151 if (timeout != null) { 50152 promises.push( 50153 promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop()) 50154 ); 50155 } 50156 return Promise.race(promises); 50157 } 50158 function toBe(value, options) { 50159 if (!(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) 50160 return toMatch((v) => v === value, options); 50161 const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {}; 50162 let stop = null; 50163 const watcher = new Promise((resolve) => { 50164 stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50165 [r, value], 50166 ([v1, v2]) => { 50167 if (isNot !== (v1 === v2)) { 50168 stop == null ? void 0 : stop(); 50169 resolve(v1); 50170 } 50171 }, 50172 { 50173 flush, 50174 deep, 50175 immediate: true 50176 } 50177 ); 50178 }); 50179 const promises = [watcher]; 50180 if (timeout != null) { 50181 promises.push( 50182 promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => { 50183 stop == null ? void 0 : stop(); 50184 return toValue(r); 50185 }) 50186 ); 50187 } 50188 return Promise.race(promises); 50189 } 50190 function toBeTruthy(options) { 50191 return toMatch((v) => Boolean(v), options); 50192 } 50193 function toBeNull(options) { 50194 return toBe(null, options); 50195 } 50196 function toBeUndefined(options) { 50197 return toBe(void 0, options); 50198 } 50199 function toBeNaN(options) { 50200 return toMatch(Number.isNaN, options); 50201 } 50202 function toContains(value, options) { 50203 return toMatch((v) => { 50204 const array = Array.from(v); 50205 return array.includes(value) || array.includes(toValue(value)); 50206 }, options); 50207 } 50208 function changed(options) { 50209 return changedTimes(1, options); 50210 } 50211 function changedTimes(n = 1, options) { 50212 let count = -1; 50213 return toMatch(() => { 50214 count += 1; 50215 return count >= n; 50216 }, options); 50217 } 50218 if (Array.isArray(toValue(r))) { 50219 const instance = { 50220 toMatch, 50221 toContains, 50222 changed, 50223 changedTimes, 50224 get not() { 50225 return createUntil(r, !isNot); 50226 } 50227 }; 50228 return instance; 50229 } else { 50230 const instance = { 50231 toMatch, 50232 toBe, 50233 toBeTruthy, 50234 toBeNull, 50235 toBeNaN, 50236 toBeUndefined, 50237 changed, 50238 changedTimes, 50239 get not() { 50240 return createUntil(r, !isNot); 50241 } 50242 }; 50243 return instance; 50244 } 50245} 50246function until(r) { 50247 return createUntil(r); 50248} 50249 50250function defaultComparator(value, othVal) { 50251 return value === othVal; 50252} 50253function useArrayDifference(...args) { 50254 var _a; 50255 const list = args[0]; 50256 const values = args[1]; 50257 let compareFn = (_a = args[2]) != null ? _a : defaultComparator; 50258 if (typeof compareFn === "string") { 50259 const key = compareFn; 50260 compareFn = (value, othVal) => value[key] === othVal[key]; 50261 } 50262 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1)); 50263} 50264 50265function useArrayEvery(list, fn) { 50266 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array))); 50267} 50268 50269function useArrayFilter(list, fn) { 50270 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).map((i) => toValue(i)).filter(fn)); 50271} 50272 50273function useArrayFind(list, fn) { 50274 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue( 50275 toValue(list).find((element, index, array) => fn(toValue(element), index, array)) 50276 )); 50277} 50278 50279function useArrayFindIndex(list, fn) { 50280 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array))); 50281} 50282 50283function findLast(arr, cb) { 50284 let index = arr.length; 50285 while (index-- > 0) { 50286 if (cb(arr[index], index, arr)) 50287 return arr[index]; 50288 } 50289 return void 0; 50290} 50291function useArrayFindLast(list, fn) { 50292 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue( 50293 !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array)) 50294 )); 50295} 50296 50297function isArrayIncludesOptions(obj) { 50298 return isObject(obj) && containsProp(obj, "formIndex", "comparator"); 50299} 50300function useArrayIncludes(...args) { 50301 var _a; 50302 const list = args[0]; 50303 const value = args[1]; 50304 let comparator = args[2]; 50305 let formIndex = 0; 50306 if (isArrayIncludesOptions(comparator)) { 50307 formIndex = (_a = comparator.fromIndex) != null ? _a : 0; 50308 comparator = comparator.comparator; 50309 } 50310 if (typeof comparator === "string") { 50311 const key = comparator; 50312 comparator = (element, value2) => element[key] === toValue(value2); 50313 } 50314 comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2); 50315 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).slice(formIndex).some((element, index, array) => comparator( 50316 toValue(element), 50317 toValue(value), 50318 index, 50319 toValue(array) 50320 ))); 50321} 50322 50323function useArrayJoin(list, separator) { 50324 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).map((i) => toValue(i)).join(toValue(separator))); 50325} 50326 50327function useArrayMap(list, fn) { 50328 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).map((i) => toValue(i)).map(fn)); 50329} 50330 50331function useArrayReduce(list, reducer, ...args) { 50332 const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index); 50333 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 50334 const resolved = toValue(list); 50335 return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback); 50336 }); 50337} 50338 50339function useArraySome(list, fn) { 50340 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array))); 50341} 50342 50343function uniq(array) { 50344 return Array.from(new Set(array)); 50345} 50346function uniqueElementsBy(array, fn) { 50347 return array.reduce((acc, v) => { 50348 if (!acc.some((x) => fn(v, x, array))) 50349 acc.push(v); 50350 return acc; 50351 }, []); 50352} 50353function useArrayUnique(list, compareFn) { 50354 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 50355 const resolvedList = toValue(list).map((element) => toValue(element)); 50356 return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList); 50357 }); 50358} 50359 50360function useCounter(initialValue = 0, options = {}) { 50361 let _initialValue = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(initialValue); 50362 const count = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(initialValue); 50363 const { 50364 max = Number.POSITIVE_INFINITY, 50365 min = Number.NEGATIVE_INFINITY 50366 } = options; 50367 const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min); 50368 const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max); 50369 const get = () => count.value; 50370 const set = (val) => count.value = Math.max(min, Math.min(max, val)); 50371 const reset = (val = _initialValue) => { 50372 _initialValue = val; 50373 return set(val); 50374 }; 50375 return { count, inc, dec, get, set, reset }; 50376} 50377 50378const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i; 50379const REGEX_FORMAT = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g; 50380function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) { 50381 let m = hours < 12 ? "AM" : "PM"; 50382 if (hasPeriod) 50383 m = m.split("").reduce((acc, curr) => acc += `${curr}.`, ""); 50384 return isLowercase ? m.toLowerCase() : m; 50385} 50386function formatOrdinal(num) { 50387 const suffixes = ["th", "st", "nd", "rd"]; 50388 const v = num % 100; 50389 return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]); 50390} 50391function formatDate(date, formatStr, options = {}) { 50392 var _a; 50393 const years = date.getFullYear(); 50394 const month = date.getMonth(); 50395 const days = date.getDate(); 50396 const hours = date.getHours(); 50397 const minutes = date.getMinutes(); 50398 const seconds = date.getSeconds(); 50399 const milliseconds = date.getMilliseconds(); 50400 const day = date.getDay(); 50401 const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem; 50402 const matches = { 50403 Yo: () => formatOrdinal(years), 50404 YY: () => String(years).slice(-2), 50405 YYYY: () => years, 50406 M: () => month + 1, 50407 Mo: () => formatOrdinal(month + 1), 50408 MM: () => `${month + 1}`.padStart(2, "0"), 50409 MMM: () => date.toLocaleDateString(options.locales, { month: "short" }), 50410 MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }), 50411 D: () => String(days), 50412 Do: () => formatOrdinal(days), 50413 DD: () => `${days}`.padStart(2, "0"), 50414 H: () => String(hours), 50415 Ho: () => formatOrdinal(hours), 50416 HH: () => `${hours}`.padStart(2, "0"), 50417 h: () => `${hours % 12 || 12}`.padStart(1, "0"), 50418 ho: () => formatOrdinal(hours % 12 || 12), 50419 hh: () => `${hours % 12 || 12}`.padStart(2, "0"), 50420 m: () => String(minutes), 50421 mo: () => formatOrdinal(minutes), 50422 mm: () => `${minutes}`.padStart(2, "0"), 50423 s: () => String(seconds), 50424 so: () => formatOrdinal(seconds), 50425 ss: () => `${seconds}`.padStart(2, "0"), 50426 SSS: () => `${milliseconds}`.padStart(3, "0"), 50427 d: () => day, 50428 dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }), 50429 ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }), 50430 dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }), 50431 A: () => meridiem(hours, minutes), 50432 AA: () => meridiem(hours, minutes, false, true), 50433 a: () => meridiem(hours, minutes, true), 50434 aa: () => meridiem(hours, minutes, true, true) 50435 }; 50436 return formatStr.replace(REGEX_FORMAT, (match, $1) => { 50437 var _a2, _b; 50438 return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match; 50439 }); 50440} 50441function normalizeDate(date) { 50442 if (date === null) 50443 return new Date(Number.NaN); 50444 if (date === void 0) 50445 return /* @__PURE__ */ new Date(); 50446 if (date instanceof Date) 50447 return new Date(date); 50448 if (typeof date === "string" && !/Z$/i.test(date)) { 50449 const d = date.match(REGEX_PARSE); 50450 if (d) { 50451 const m = d[2] - 1 || 0; 50452 const ms = (d[7] || "0").substring(0, 3); 50453 return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); 50454 } 50455 } 50456 return new Date(date); 50457} 50458function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) { 50459 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options)); 50460} 50461 50462function useIntervalFn(cb, interval = 1e3, options = {}) { 50463 const { 50464 immediate = true, 50465 immediateCallback = false 50466 } = options; 50467 let timer = null; 50468 const isActive = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false); 50469 function clean() { 50470 if (timer) { 50471 clearInterval(timer); 50472 timer = null; 50473 } 50474 } 50475 function pause() { 50476 isActive.value = false; 50477 clean(); 50478 } 50479 function resume() { 50480 const intervalValue = toValue(interval); 50481 if (intervalValue <= 0) 50482 return; 50483 isActive.value = true; 50484 if (immediateCallback) 50485 cb(); 50486 clean(); 50487 timer = setInterval(cb, intervalValue); 50488 } 50489 if (immediate && isClient) 50490 resume(); 50491 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(interval) || typeof interval === "function") { 50492 const stopWatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(interval, () => { 50493 if (isActive.value && isClient) 50494 resume(); 50495 }); 50496 tryOnScopeDispose(stopWatch); 50497 } 50498 tryOnScopeDispose(pause); 50499 return { 50500 isActive, 50501 pause, 50502 resume 50503 }; 50504} 50505 50506function useInterval(interval = 1e3, options = {}) { 50507 const { 50508 controls: exposeControls = false, 50509 immediate = true, 50510 callback 50511 } = options; 50512 const counter = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0); 50513 const update = () => counter.value += 1; 50514 const reset = () => { 50515 counter.value = 0; 50516 }; 50517 const controls = useIntervalFn( 50518 callback ? () => { 50519 update(); 50520 callback(counter.value); 50521 } : update, 50522 interval, 50523 { immediate } 50524 ); 50525 if (exposeControls) { 50526 return { 50527 counter, 50528 reset, 50529 ...controls 50530 }; 50531 } else { 50532 return counter; 50533 } 50534} 50535 50536function useLastChanged(source, options = {}) { 50537 var _a; 50538 const ms = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)((_a = options.initialValue) != null ? _a : null); 50539 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50540 source, 50541 () => ms.value = timestamp(), 50542 options 50543 ); 50544 return ms; 50545} 50546 50547function useTimeoutFn(cb, interval, options = {}) { 50548 const { 50549 immediate = true 50550 } = options; 50551 const isPending = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false); 50552 let timer = null; 50553 function clear() { 50554 if (timer) { 50555 clearTimeout(timer); 50556 timer = null; 50557 } 50558 } 50559 function stop() { 50560 isPending.value = false; 50561 clear(); 50562 } 50563 function start(...args) { 50564 clear(); 50565 isPending.value = true; 50566 timer = setTimeout(() => { 50567 isPending.value = false; 50568 timer = null; 50569 cb(...args); 50570 }, toValue(interval)); 50571 } 50572 if (immediate) { 50573 isPending.value = true; 50574 if (isClient) 50575 start(); 50576 } 50577 tryOnScopeDispose(stop); 50578 return { 50579 isPending: (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.readonly)(isPending), 50580 start, 50581 stop 50582 }; 50583} 50584 50585function useTimeout(interval = 1e3, options = {}) { 50586 const { 50587 controls: exposeControls = false, 50588 callback 50589 } = options; 50590 const controls = useTimeoutFn( 50591 callback != null ? callback : noop, 50592 interval, 50593 options 50594 ); 50595 const ready = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => !controls.isPending.value); 50596 if (exposeControls) { 50597 return { 50598 ready, 50599 ...controls 50600 }; 50601 } else { 50602 return ready; 50603 } 50604} 50605 50606function useToNumber(value, options = {}) { 50607 const { 50608 method = "parseFloat", 50609 radix, 50610 nanToZero 50611 } = options; 50612 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 50613 let resolved = toValue(value); 50614 if (typeof resolved === "string") 50615 resolved = Number[method](resolved, radix); 50616 if (nanToZero && Number.isNaN(resolved)) 50617 resolved = 0; 50618 return resolved; 50619 }); 50620} 50621 50622function useToString(value) { 50623 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => `${toValue(value)}`); 50624} 50625 50626function useToggle(initialValue = false, options = {}) { 50627 const { 50628 truthyValue = true, 50629 falsyValue = false 50630 } = options; 50631 const valueIsRef = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(initialValue); 50632 const _value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(initialValue); 50633 function toggle(value) { 50634 if (arguments.length) { 50635 _value.value = value; 50636 return _value.value; 50637 } else { 50638 const truthy = toValue(truthyValue); 50639 _value.value = _value.value === truthy ? toValue(falsyValue) : truthy; 50640 return _value.value; 50641 } 50642 } 50643 if (valueIsRef) 50644 return toggle; 50645 else 50646 return [_value, toggle]; 50647} 50648 50649function watchArray(source, cb, options) { 50650 let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)]; 50651 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(source, (newList, _, onCleanup) => { 50652 const oldListRemains = Array.from({ length: oldList.length }); 50653 const added = []; 50654 for (const obj of newList) { 50655 let found = false; 50656 for (let i = 0; i < oldList.length; i++) { 50657 if (!oldListRemains[i] && obj === oldList[i]) { 50658 oldListRemains[i] = true; 50659 found = true; 50660 break; 50661 } 50662 } 50663 if (!found) 50664 added.push(obj); 50665 } 50666 const removed = oldList.filter((_2, i) => !oldListRemains[i]); 50667 cb(newList, oldList, added, removed, onCleanup); 50668 oldList = [...newList]; 50669 }, options); 50670} 50671 50672function watchAtMost(source, cb, options) { 50673 const { 50674 count, 50675 ...watchOptions 50676 } = options; 50677 const current = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0); 50678 const stop = watchWithFilter( 50679 source, 50680 (...args) => { 50681 current.value += 1; 50682 if (current.value >= toValue(count)) 50683 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => stop()); 50684 cb(...args); 50685 }, 50686 watchOptions 50687 ); 50688 return { count: current, stop }; 50689} 50690 50691function watchDebounced(source, cb, options = {}) { 50692 const { 50693 debounce = 0, 50694 maxWait = void 0, 50695 ...watchOptions 50696 } = options; 50697 return watchWithFilter( 50698 source, 50699 cb, 50700 { 50701 ...watchOptions, 50702 eventFilter: debounceFilter(debounce, { maxWait }) 50703 } 50704 ); 50705} 50706 50707function watchDeep(source, cb, options) { 50708 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50709 source, 50710 cb, 50711 { 50712 ...options, 50713 deep: true 50714 } 50715 ); 50716} 50717 50718function watchIgnorable(source, cb, options = {}) { 50719 const { 50720 eventFilter = bypassFilter, 50721 ...watchOptions 50722 } = options; 50723 const filteredCb = createFilterWrapper( 50724 eventFilter, 50725 cb 50726 ); 50727 let ignoreUpdates; 50728 let ignorePrevAsyncUpdates; 50729 let stop; 50730 if (watchOptions.flush === "sync") { 50731 const ignore = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false); 50732 ignorePrevAsyncUpdates = () => { 50733 }; 50734 ignoreUpdates = (updater) => { 50735 ignore.value = true; 50736 updater(); 50737 ignore.value = false; 50738 }; 50739 stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50740 source, 50741 (...args) => { 50742 if (!ignore.value) 50743 filteredCb(...args); 50744 }, 50745 watchOptions 50746 ); 50747 } else { 50748 const disposables = []; 50749 const ignoreCounter = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0); 50750 const syncCounter = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0); 50751 ignorePrevAsyncUpdates = () => { 50752 ignoreCounter.value = syncCounter.value; 50753 }; 50754 disposables.push( 50755 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50756 source, 50757 () => { 50758 syncCounter.value++; 50759 }, 50760 { ...watchOptions, flush: "sync" } 50761 ) 50762 ); 50763 ignoreUpdates = (updater) => { 50764 const syncCounterPrev = syncCounter.value; 50765 updater(); 50766 ignoreCounter.value += syncCounter.value - syncCounterPrev; 50767 }; 50768 disposables.push( 50769 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50770 source, 50771 (...args) => { 50772 const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value; 50773 ignoreCounter.value = 0; 50774 syncCounter.value = 0; 50775 if (ignore) 50776 return; 50777 filteredCb(...args); 50778 }, 50779 watchOptions 50780 ) 50781 ); 50782 stop = () => { 50783 disposables.forEach((fn) => fn()); 50784 }; 50785 } 50786 return { stop, ignoreUpdates, ignorePrevAsyncUpdates }; 50787} 50788 50789function watchImmediate(source, cb, options) { 50790 return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50791 source, 50792 cb, 50793 { 50794 ...options, 50795 immediate: true 50796 } 50797 ); 50798} 50799 50800function watchOnce(source, cb, options) { 50801 const stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(source, (...args) => { 50802 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => stop()); 50803 return cb(...args); 50804 }, options); 50805 return stop; 50806} 50807 50808function watchThrottled(source, cb, options = {}) { 50809 const { 50810 throttle = 0, 50811 trailing = true, 50812 leading = true, 50813 ...watchOptions 50814 } = options; 50815 return watchWithFilter( 50816 source, 50817 cb, 50818 { 50819 ...watchOptions, 50820 eventFilter: throttleFilter(throttle, trailing, leading) 50821 } 50822 ); 50823} 50824 50825function watchTriggerable(source, cb, options = {}) { 50826 let cleanupFn; 50827 function onEffect() { 50828 if (!cleanupFn) 50829 return; 50830 const fn = cleanupFn; 50831 cleanupFn = void 0; 50832 fn(); 50833 } 50834 function onCleanup(callback) { 50835 cleanupFn = callback; 50836 } 50837 const _cb = (value, oldValue) => { 50838 onEffect(); 50839 return cb(value, oldValue, onCleanup); 50840 }; 50841 const res = watchIgnorable(source, _cb, options); 50842 const { ignoreUpdates } = res; 50843 const trigger = () => { 50844 let res2; 50845 ignoreUpdates(() => { 50846 res2 = _cb(getWatchSources(source), getOldValue(source)); 50847 }); 50848 return res2; 50849 }; 50850 return { 50851 ...res, 50852 trigger 50853 }; 50854} 50855function getWatchSources(sources) { 50856 if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isReactive)(sources)) 50857 return sources; 50858 if (Array.isArray(sources)) 50859 return sources.map((item) => toValue(item)); 50860 return toValue(sources); 50861} 50862function getOldValue(source) { 50863 return Array.isArray(source) ? source.map(() => void 0) : void 0; 50864} 50865 50866function whenever(source, cb, options) { 50867 const stop = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)( 50868 source, 50869 (v, ov, onInvalidate) => { 50870 if (v) { 50871 if (options == null ? void 0 : options.once) 50872 (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => stop()); 50873 cb(v, ov, onInvalidate); 50874 } 50875 }, 50876 { 50877 ...options, 50878 once: false 50879 } 50880 ); 50881 return stop; 50882} 50883 50884 50885 50886 50887/***/ }), 50888
vendor: 19,397 bytes, lines 50889-51097
50889/***/ "./node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.mjs": 50890/*!*************************************************************************!*\ 50891 !*** ./node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.mjs ***! 50892 \*************************************************************************/ 50893/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 50894 50895"use strict"; 50896__webpack_require__.r(__webpack_exports__); 50897/* harmony export */ __webpack_require__.d(__webpack_exports__, { 50898/* harmony export */ BaseTransition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransition), 50899/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators), 50900/* harmony export */ Comment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Comment), 50901/* harmony export */ DeprecationTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.DeprecationTypes), 50902/* harmony export */ EffectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.EffectScope), 50903/* harmony export */ ErrorCodes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ErrorCodes), 50904/* harmony export */ ErrorTypeStrings: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ErrorTypeStrings), 50905/* harmony export */ Fragment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Fragment), 50906/* harmony export */ KeepAlive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.KeepAlive), 50907/* harmony export */ ReactiveEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect), 50908/* harmony export */ Static: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Static), 50909/* harmony export */ Suspense: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Suspense), 50910/* harmony export */ Teleport: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Teleport), 50911/* harmony export */ Text: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Text), 50912/* harmony export */ TrackOpTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TrackOpTypes), 50913/* harmony export */ Transition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Transition), 50914/* harmony export */ TransitionGroup: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup), 50915/* harmony export */ TriggerOpTypes: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TriggerOpTypes), 50916/* harmony export */ Vue: () => (/* reexport module object */ vue__WEBPACK_IMPORTED_MODULE_0__), 50917/* harmony export */ Vue2: () => (/* binding */ Vue2), 50918/* harmony export */ VueElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.VueElement), 50919/* harmony export */ assertNumber: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.assertNumber), 50920/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling), 50921/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling), 50922/* harmony export */ camelize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.camelize), 50923/* harmony export */ capitalize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.capitalize), 50924/* harmony export */ cloneVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.cloneVNode), 50925/* harmony export */ compatUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compatUtils), 50926/* harmony export */ compile: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compile), 50927/* harmony export */ computed: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.computed), 50928/* harmony export */ createApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createApp), 50929/* harmony export */ createBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createBlock), 50930/* harmony export */ createCommentVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode), 50931/* harmony export */ createElementBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock), 50932/* harmony export */ createElementVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode), 50933/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer), 50934/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy), 50935/* harmony export */ createRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createRenderer), 50936/* harmony export */ createSSRApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSSRApp), 50937/* harmony export */ createSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSlots), 50938/* harmony export */ createStaticVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode), 50939/* harmony export */ createTextVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode), 50940/* harmony export */ createVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createVNode), 50941/* harmony export */ customRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.customRef), 50942/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent), 50943/* harmony export */ defineComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent), 50944/* harmony export */ defineCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement), 50945/* harmony export */ defineEmits: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineEmits), 50946/* harmony export */ defineExpose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineExpose), 50947/* harmony export */ defineModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineModel), 50948/* harmony export */ defineOptions: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineOptions), 50949/* harmony export */ defineProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineProps), 50950/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement), 50951/* harmony export */ defineSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSlots), 50952/* harmony export */ del: () => (/* binding */ del), 50953/* harmony export */ devtools: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.devtools), 50954/* harmony export */ effect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effect), 50955/* harmony export */ effectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effectScope), 50956/* harmony export */ getCurrentInstance: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance), 50957/* harmony export */ getCurrentScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope), 50958/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren), 50959/* harmony export */ guardReactiveProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps), 50960/* harmony export */ h: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.h), 50961/* harmony export */ handleError: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.handleError), 50962/* harmony export */ hasInjectionContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext), 50963/* harmony export */ hydrate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hydrate), 50964/* harmony export */ initCustomFormatter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter), 50965/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR), 50966/* harmony export */ inject: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.inject), 50967/* harmony export */ install: () => (/* binding */ install), 50968/* harmony export */ isMemoSame: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isMemoSame), 50969/* harmony export */ isProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isProxy), 50970/* harmony export */ isReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReactive), 50971/* harmony export */ isReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReadonly), 50972/* harmony export */ isRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRef), 50973/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly), 50974/* harmony export */ isShallow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isShallow), 50975/* harmony export */ isVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isVNode), 50976/* harmony export */ isVue2: () => (/* binding */ isVue2), 50977/* harmony export */ isVue3: () => (/* binding */ isVue3), 50978/* harmony export */ markRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.markRaw), 50979/* harmony export */ mergeDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults), 50980/* harmony export */ mergeModels: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels), 50981/* harmony export */ mergeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps), 50982/* harmony export */ nextTick: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.nextTick), 50983/* harmony export */ normalizeClass: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass), 50984/* harmony export */ normalizeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps), 50985/* harmony export */ normalizeStyle: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle), 50986/* harmony export */ onActivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onActivated), 50987/* harmony export */ onBeforeMount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount), 50988/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount), 50989/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate), 50990/* harmony export */ onDeactivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated), 50991/* harmony export */ onErrorCaptured: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured), 50992/* harmony export */ onMounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onMounted), 50993/* harmony export */ onRenderTracked: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked), 50994/* harmony export */ onRenderTriggered: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered), 50995/* harmony export */ onScopeDispose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose), 50996/* harmony export */ onServerPrefetch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch), 50997/* harmony export */ onUnmounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted), 50998/* harmony export */ onUpdated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated), 50999/* harmony export */ openBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.openBlock), 51000/* harmony export */ popScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId), 51001/* harmony export */ provide: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.provide), 51002/* harmony export */ proxyRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.proxyRefs), 51003/* harmony export */ pushScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId), 51004/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb), 51005/* harmony export */ reactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.reactive), 51006/* harmony export */ readonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.readonly), 51007/* harmony export */ ref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ref), 51008/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler), 51009/* harmony export */ render: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.render), 51010/* harmony export */ renderList: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderList), 51011/* harmony export */ renderSlot: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot), 51012/* harmony export */ resolveComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent), 51013/* harmony export */ resolveDirective: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective), 51014/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent), 51015/* harmony export */ resolveFilter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveFilter), 51016/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks), 51017/* harmony export */ set: () => (/* binding */ set), 51018/* harmony export */ setBlockTracking: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking), 51019/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook), 51020/* harmony export */ setTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks), 51021/* harmony export */ shallowReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive), 51022/* harmony export */ shallowReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly), 51023/* harmony export */ shallowRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef), 51024/* harmony export */ ssrContextKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey), 51025/* harmony export */ ssrUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrUtils), 51026/* harmony export */ stop: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.stop), 51027/* harmony export */ toDisplayString: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString), 51028/* harmony export */ toHandlerKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey), 51029/* harmony export */ toHandlers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlers), 51030/* harmony export */ toRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRaw), 51031/* harmony export */ toRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRef), 51032/* harmony export */ toRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRefs), 51033/* harmony export */ toValue: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toValue), 51034/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs), 51035/* harmony export */ triggerRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.triggerRef), 51036/* harmony export */ unref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.unref), 51037/* harmony export */ useAttrs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs), 51038/* harmony export */ useCssModule: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssModule), 51039/* harmony export */ useCssVars: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssVars), 51040/* harmony export */ useModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useModel), 51041/* harmony export */ useSSRContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSSRContext), 51042/* harmony export */ useSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSlots), 51043/* harmony export */ useTransitionState: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useTransitionState), 51044/* harmony export */ vModelCheckbox: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox), 51045/* harmony export */ vModelDynamic: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic), 51046/* harmony export */ vModelRadio: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio), 51047/* harmony export */ vModelSelect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect), 51048/* harmony export */ vModelText: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelText), 51049/* harmony export */ vShow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vShow), 51050/* harmony export */ version: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.version), 51051/* harmony export */ warn: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.warn), 51052/* harmony export */ watch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watch), 51053/* harmony export */ watchEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect), 51054/* harmony export */ watchPostEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect), 51055/* harmony export */ watchSyncEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect), 51056/* harmony export */ withAsyncContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext), 51057/* harmony export */ withCtx: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withCtx), 51058/* harmony export */ withDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDefaults), 51059/* harmony export */ withDirectives: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives), 51060/* harmony export */ withKeys: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withKeys), 51061/* harmony export */ withMemo: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withMemo), 51062/* harmony export */ withModifiers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers), 51063/* harmony export */ withScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withScopeId) 51064/* harmony export */ }); 51065/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); 51066 51067 51068var isVue2 = false 51069var isVue3 = true 51070var Vue2 = undefined 51071 51072function install() {} 51073 51074function set(target, key, val) { 51075 if (Array.isArray(target)) { 51076 target.length = Math.max(target.length, key) 51077 target.splice(key, 1, val) 51078 return val 51079 } 51080 target[key] = val 51081 return val 51082} 51083 51084function del(target, key) { 51085 if (Array.isArray(target)) { 51086 target.splice(key, 1) 51087 return 51088 } 51089 delete target[key] 51090} 51091 51092 51093 51094 51095 51096/***/ }), 51097
vendor: 763 bytes, lines 51098-51117
51098/***/ "./node_modules/date-fns/_lib/addLeadingZeros.mjs": 51099/*!********************************************************!*\ 51100 !*** ./node_modules/date-fns/_lib/addLeadingZeros.mjs ***! 51101 \********************************************************/ 51102/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 51103 51104"use strict"; 51105__webpack_require__.r(__webpack_exports__); 51106/* harmony export */ __webpack_require__.d(__webpack_exports__, { 51107/* harmony export */ addLeadingZeros: () => (/* binding */ addLeadingZeros) 51108/* harmony export */ }); 51109function addLeadingZeros(number, targetLength) { 51110 const sign = number < 0 ? "-" : ""; 51111 const output = Math.abs(number).toString().padStart(targetLength, "0"); 51112 return sign + output; 51113} 51114 51115 51116/***/ }), 51117
vendor: 818 bytes, lines 51118-51142
51118/***/ "./node_modules/date-fns/_lib/defaultOptions.mjs": 51119/*!*******************************************************!*\ 51120 !*** ./node_modules/date-fns/_lib/defaultOptions.mjs ***! 51121 \*******************************************************/ 51122/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 51123 51124"use strict"; 51125__webpack_require__.r(__webpack_exports__); 51126/* harmony export */ __webpack_require__.d(__webpack_exports__, { 51127/* harmony export */ getDefaultOptions: () => (/* binding */ getDefaultOptions), 51128/* harmony export */ setDefaultOptions: () => (/* binding */ setDefaultOptions) 51129/* harmony export */ }); 51130let defaultOptions = {}; 51131 51132function getDefaultOptions() { 51133 return defaultOptions; 51134} 51135 51136function setDefaultOptions(newOptions) { 51137 defaultOptions = newOptions; 51138} 51139 51140 51141/***/ }), 51142
vendor: 26,354 bytes, lines 51143-51940
51143/***/ "./node_modules/date-fns/_lib/format/formatters.mjs": 51144/*!**********************************************************!*\ 51145 !*** ./node_modules/date-fns/_lib/format/formatters.mjs ***! 51146 \**********************************************************/ 51147/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 51148 51149"use strict"; 51150__webpack_require__.r(__webpack_exports__); 51151/* harmony export */ __webpack_require__.d(__webpack_exports__, { 51152/* harmony export */ formatters: () => (/* binding */ formatters) 51153/* harmony export */ }); 51154/* harmony import */ var _getDayOfYear_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../getDayOfYear.mjs */ "./node_modules/date-fns/getDayOfYear.mjs"); 51155/* harmony import */ var _getISOWeek_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../getISOWeek.mjs */ "./node_modules/date-fns/getISOWeek.mjs"); 51156/* harmony import */ var _getISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../getISOWeekYear.mjs */ "./node_modules/date-fns/getISOWeekYear.mjs"); 51157/* harmony import */ var _getWeek_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../getWeek.mjs */ "./node_modules/date-fns/getWeek.mjs"); 51158/* harmony import */ var _getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../getWeekYear.mjs */ "./node_modules/date-fns/getWeekYear.mjs"); 51159/* harmony import */ var _addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../addLeadingZeros.mjs */ "./node_modules/date-fns/_lib/addLeadingZeros.mjs"); 51160/* harmony import */ var _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lightFormatters.mjs */ "./node_modules/date-fns/_lib/format/lightFormatters.mjs"); 51161 51162 51163 51164 51165 51166 51167 51168 51169const dayPeriodEnum = { 51170 am: "am", 51171 pm: "pm", 51172 midnight: "midnight", 51173 noon: "noon", 51174 morning: "morning", 51175 afternoon: "afternoon", 51176 evening: "evening", 51177 night: "night", 51178}; 51179 51180/* 51181 * | | Unit | | Unit | 51182 * |-----|--------------------------------|-----|--------------------------------| 51183 * | a | AM, PM | A* | Milliseconds in day | 51184 * | b | AM, PM, noon, midnight | B | Flexible day period | 51185 * | c | Stand-alone local day of week | C* | Localized hour w/ day period | 51186 * | d | Day of month | D | Day of year | 51187 * | e | Local day of week | E | Day of week | 51188 * | f | | F* | Day of week in month | 51189 * | g* | Modified Julian day | G | Era | 51190 * | h | Hour [1-12] | H | Hour [0-23] | 51191 * | i! | ISO day of week | I! | ISO week of year | 51192 * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | 51193 * | k | Hour [1-24] | K | Hour [0-11] | 51194 * | l* | (deprecated) | L | Stand-alone month | 51195 * | m | Minute | M | Month | 51196 * | n | | N | | 51197 * | o! | Ordinal number modifier | O | Timezone (GMT) | 51198 * | p! | Long localized time | P! | Long localized date | 51199 * | q | Stand-alone quarter | Q | Quarter | 51200 * | r* | Related Gregorian year | R! | ISO week-numbering year | 51201 * | s | Second | S | Fraction of second | 51202 * | t! | Seconds timestamp | T! | Milliseconds timestamp | 51203 * | u | Extended year | U* | Cyclic year | 51204 * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | 51205 * | w | Local week of year | W* | Week of month | 51206 * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | 51207 * | y | Year (abs) | Y | Local week-numbering year | 51208 * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) | 51209 * 51210 * Letters marked by * are not implemented but reserved by Unicode standard. 51211 * 51212 * Letters marked by ! are non-standard, but implemented by date-fns: 51213 * - `o` modifies the previous token to turn it into an ordinal (see `format` docs) 51214 * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, 51215 * i.e. 7 for Sunday, 1 for Monday, etc. 51216 * - `I` is ISO week of year, as opposed to `w` which is local week of year. 51217 * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. 51218 * `R` is supposed to be used in conjunction with `I` and `i` 51219 * for universal ISO week-numbering date, whereas 51220 * `Y` is supposed to be used in conjunction with `w` and `e` 51221 * for week-numbering date specific to the locale. 51222 * - `P` is long localized date format 51223 * - `p` is long localized time format 51224 */ 51225 51226const formatters = { 51227 // Era 51228 G: function (date, token, localize) { 51229 const era = date.getFullYear() > 0 ? 1 : 0; 51230 switch (token) { 51231 // AD, BC 51232 case "G": 51233 case "GG": 51234 case "GGG": 51235 return localize.era(era, { width: "abbreviated" }); 51236 // A, B 51237 case "GGGGG": 51238 return localize.era(era, { width: "narrow" }); 51239 // Anno Domini, Before Christ 51240 case "GGGG": 51241 default: 51242 return localize.era(era, { width: "wide" }); 51243 } 51244 }, 51245 51246 // Year 51247 y: function (date, token, localize) { 51248 // Ordinal number 51249 if (token === "yo") { 51250 const signedYear = date.getFullYear(); 51251 // Returns 1 for 1 BC (which is year 0 in JavaScript) 51252 const year = signedYear > 0 ? signedYear : 1 - signedYear; 51253 return localize.ordinalNumber(year, { unit: "year" }); 51254 } 51255 51256 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.y(date, token); 51257 }, 51258 51259 // Local week-numbering year 51260 Y: function (date, token, localize, options) { 51261 const signedWeekYear = (0,_getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_1__.getWeekYear)(date, options); 51262 // Returns 1 for 1 BC (which is year 0 in JavaScript) 51263 const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; 51264 51265 // Two digit year 51266 if (token === "YY") { 51267 const twoDigitYear = weekYear % 100; 51268 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(twoDigitYear, 2); 51269 } 51270 51271 // Ordinal number 51272 if (token === "Yo") { 51273 return localize.ordinalNumber(weekYear, { unit: "year" }); 51274 } 51275 51276 // Padding 51277 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(weekYear, token.length); 51278 }, 51279 51280 // ISO week-numbering year 51281 R: function (date, token) { 51282 const isoWeekYear = (0,_getISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_3__.getISOWeekYear)(date); 51283 51284 // Padding 51285 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(isoWeekYear, token.length); 51286 }, 51287 51288 // Extended year. This is a single number designating the year of this calendar system. 51289 // The main difference between `y` and `u` localizers are B.C. years: 51290 // | Year | `y` | `u` | 51291 // |------|-----|-----| 51292 // | AC 1 | 1 | 1 | 51293 // | BC 1 | 1 | 0 | 51294 // | BC 2 | 2 | -1 | 51295 // Also `yy` always returns the last two digits of a year, 51296 // while `uu` pads single digit years to 2 characters and returns other years unchanged. 51297 u: function (date, token) { 51298 const year = date.getFullYear(); 51299 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(year, token.length); 51300 }, 51301 51302 // Quarter 51303 Q: function (date, token, localize) { 51304 const quarter = Math.ceil((date.getMonth() + 1) / 3); 51305 switch (token) { 51306 // 1, 2, 3, 4 51307 case "Q": 51308 return String(quarter); 51309 // 01, 02, 03, 04 51310 case "QQ": 51311 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(quarter, 2); 51312 // 1st, 2nd, 3rd, 4th 51313 case "Qo": 51314 return localize.ordinalNumber(quarter, { unit: "quarter" }); 51315 // Q1, Q2, Q3, Q4 51316 case "QQQ": 51317 return localize.quarter(quarter, { 51318 width: "abbreviated", 51319 context: "formatting", 51320 }); 51321 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 51322 case "QQQQQ": 51323 return localize.quarter(quarter, { 51324 width: "narrow", 51325 context: "formatting", 51326 }); 51327 // 1st quarter, 2nd quarter, ... 51328 case "QQQQ": 51329 default: 51330 return localize.quarter(quarter, { 51331 width: "wide", 51332 context: "formatting", 51333 }); 51334 } 51335 }, 51336 51337 // Stand-alone quarter 51338 q: function (date, token, localize) { 51339 const quarter = Math.ceil((date.getMonth() + 1) / 3); 51340 switch (token) { 51341 // 1, 2, 3, 4 51342 case "q": 51343 return String(quarter); 51344 // 01, 02, 03, 04 51345 case "qq": 51346 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(quarter, 2); 51347 // 1st, 2nd, 3rd, 4th 51348 case "qo": 51349 return localize.ordinalNumber(quarter, { unit: "quarter" }); 51350 // Q1, Q2, Q3, Q4 51351 case "qqq": 51352 return localize.quarter(quarter, { 51353 width: "abbreviated", 51354 context: "standalone", 51355 }); 51356 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 51357 case "qqqqq": 51358 return localize.quarter(quarter, { 51359 width: "narrow", 51360 context: "standalone", 51361 }); 51362 // 1st quarter, 2nd quarter, ... 51363 case "qqqq": 51364 default: 51365 return localize.quarter(quarter, { 51366 width: "wide", 51367 context: "standalone", 51368 }); 51369 } 51370 }, 51371 51372 // Month 51373 M: function (date, token, localize) { 51374 const month = date.getMonth(); 51375 switch (token) { 51376 case "M": 51377 case "MM": 51378 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.M(date, token); 51379 // 1st, 2nd, ..., 12th 51380 case "Mo": 51381 return localize.ordinalNumber(month + 1, { unit: "month" }); 51382 // Jan, Feb, ..., Dec 51383 case "MMM": 51384 return localize.month(month, { 51385 width: "abbreviated", 51386 context: "formatting", 51387 }); 51388 // J, F, ..., D 51389 case "MMMMM": 51390 return localize.month(month, { 51391 width: "narrow", 51392 context: "formatting", 51393 }); 51394 // January, February, ..., December 51395 case "MMMM": 51396 default: 51397 return localize.month(month, { width: "wide", context: "formatting" }); 51398 } 51399 }, 51400 51401 // Stand-alone month 51402 L: function (date, token, localize) { 51403 const month = date.getMonth(); 51404 switch (token) { 51405 // 1, 2, ..., 12 51406 case "L": 51407 return String(month + 1); 51408 // 01, 02, ..., 12 51409 case "LL": 51410 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(month + 1, 2); 51411 // 1st, 2nd, ..., 12th 51412 case "Lo": 51413 return localize.ordinalNumber(month + 1, { unit: "month" }); 51414 // Jan, Feb, ..., Dec 51415 case "LLL": 51416 return localize.month(month, { 51417 width: "abbreviated", 51418 context: "standalone", 51419 }); 51420 // J, F, ..., D 51421 case "LLLLL": 51422 return localize.month(month, { 51423 width: "narrow", 51424 context: "standalone", 51425 }); 51426 // January, February, ..., December 51427 case "LLLL": 51428 default: 51429 return localize.month(month, { width: "wide", context: "standalone" }); 51430 } 51431 }, 51432 51433 // Local week of year 51434 w: function (date, token, localize, options) { 51435 const week = (0,_getWeek_mjs__WEBPACK_IMPORTED_MODULE_4__.getWeek)(date, options); 51436 51437 if (token === "wo") { 51438 return localize.ordinalNumber(week, { unit: "week" }); 51439 } 51440 51441 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(week, token.length); 51442 }, 51443 51444 // ISO week of year 51445 I: function (date, token, localize) { 51446 const isoWeek = (0,_getISOWeek_mjs__WEBPACK_IMPORTED_MODULE_5__.getISOWeek)(date); 51447 51448 if (token === "Io") { 51449 return localize.ordinalNumber(isoWeek, { unit: "week" }); 51450 } 51451 51452 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(isoWeek, token.length); 51453 }, 51454 51455 // Day of the month 51456 d: function (date, token, localize) { 51457 if (token === "do") { 51458 return localize.ordinalNumber(date.getDate(), { unit: "date" }); 51459 } 51460 51461 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.d(date, token); 51462 }, 51463 51464 // Day of year 51465 D: function (date, token, localize) { 51466 const dayOfYear = (0,_getDayOfYear_mjs__WEBPACK_IMPORTED_MODULE_6__.getDayOfYear)(date); 51467 51468 if (token === "Do") { 51469 return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" }); 51470 } 51471 51472 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(dayOfYear, token.length); 51473 }, 51474 51475 // Day of week 51476 E: function (date, token, localize) { 51477 const dayOfWeek = date.getDay(); 51478 switch (token) { 51479 // Tue 51480 case "E": 51481 case "EE": 51482 case "EEE": 51483 return localize.day(dayOfWeek, { 51484 width: "abbreviated", 51485 context: "formatting", 51486 }); 51487 // T 51488 case "EEEEE": 51489 return localize.day(dayOfWeek, { 51490 width: "narrow", 51491 context: "formatting", 51492 }); 51493 // Tu 51494 case "EEEEEE": 51495 return localize.day(dayOfWeek, { 51496 width: "short", 51497 context: "formatting", 51498 }); 51499 // Tuesday 51500 case "EEEE": 51501 default: 51502 return localize.day(dayOfWeek, { 51503 width: "wide", 51504 context: "formatting", 51505 }); 51506 } 51507 }, 51508 51509 // Local day of week 51510 e: function (date, token, localize, options) { 51511 const dayOfWeek = date.getDay(); 51512 const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; 51513 switch (token) { 51514 // Numerical value (Nth day of week with current locale or weekStartsOn) 51515 case "e": 51516 return String(localDayOfWeek); 51517 // Padded numerical value 51518 case "ee": 51519 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(localDayOfWeek, 2); 51520 // 1st, 2nd, ..., 7th 51521 case "eo": 51522 return localize.ordinalNumber(localDayOfWeek, { unit: "day" }); 51523 case "eee": 51524 return localize.day(dayOfWeek, { 51525 width: "abbreviated", 51526 context: "formatting", 51527 }); 51528 // T 51529 case "eeeee": 51530 return localize.day(dayOfWeek, { 51531 width: "narrow", 51532 context: "formatting", 51533 }); 51534 // Tu 51535 case "eeeeee": 51536 return localize.day(dayOfWeek, { 51537 width: "short", 51538 context: "formatting", 51539 }); 51540 // Tuesday 51541 case "eeee": 51542 default: 51543 return localize.day(dayOfWeek, { 51544 width: "wide", 51545 context: "formatting", 51546 }); 51547 } 51548 }, 51549 51550 // Stand-alone local day of week 51551 c: function (date, token, localize, options) { 51552 const dayOfWeek = date.getDay(); 51553 const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; 51554 switch (token) { 51555 // Numerical value (same as in `e`) 51556 case "c": 51557 return String(localDayOfWeek); 51558 // Padded numerical value 51559 case "cc": 51560 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(localDayOfWeek, token.length); 51561 // 1st, 2nd, ..., 7th 51562 case "co": 51563 return localize.ordinalNumber(localDayOfWeek, { unit: "day" }); 51564 case "ccc": 51565 return localize.day(dayOfWeek, { 51566 width: "abbreviated", 51567 context: "standalone", 51568 }); 51569 // T 51570 case "ccccc": 51571 return localize.day(dayOfWeek, { 51572 width: "narrow", 51573 context: "standalone", 51574 }); 51575 // Tu 51576 case "cccccc": 51577 return localize.day(dayOfWeek, { 51578 width: "short", 51579 context: "standalone", 51580 }); 51581 // Tuesday 51582 case "cccc": 51583 default: 51584 return localize.day(dayOfWeek, { 51585 width: "wide", 51586 context: "standalone", 51587 }); 51588 } 51589 }, 51590 51591 // ISO day of week 51592 i: function (date, token, localize) { 51593 const dayOfWeek = date.getDay(); 51594 const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; 51595 switch (token) { 51596 // 2 51597 case "i": 51598 return String(isoDayOfWeek); 51599 // 02 51600 case "ii": 51601 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(isoDayOfWeek, token.length); 51602 // 2nd 51603 case "io": 51604 return localize.ordinalNumber(isoDayOfWeek, { unit: "day" }); 51605 // Tue 51606 case "iii": 51607 return localize.day(dayOfWeek, { 51608 width: "abbreviated", 51609 context: "formatting", 51610 }); 51611 // T 51612 case "iiiii": 51613 return localize.day(dayOfWeek, { 51614 width: "narrow", 51615 context: "formatting", 51616 }); 51617 // Tu 51618 case "iiiiii": 51619 return localize.day(dayOfWeek, { 51620 width: "short", 51621 context: "formatting", 51622 }); 51623 // Tuesday 51624 case "iiii": 51625 default: 51626 return localize.day(dayOfWeek, { 51627 width: "wide", 51628 context: "formatting", 51629 }); 51630 } 51631 }, 51632 51633 // AM or PM 51634 a: function (date, token, localize) { 51635 const hours = date.getHours(); 51636 const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; 51637 51638 switch (token) { 51639 case "a": 51640 case "aa": 51641 return localize.dayPeriod(dayPeriodEnumValue, { 51642 width: "abbreviated", 51643 context: "formatting", 51644 }); 51645 case "aaa": 51646 return localize 51647 .dayPeriod(dayPeriodEnumValue, { 51648 width: "abbreviated", 51649 context: "formatting", 51650 }) 51651 .toLowerCase(); 51652 case "aaaaa": 51653 return localize.dayPeriod(dayPeriodEnumValue, { 51654 width: "narrow", 51655 context: "formatting", 51656 }); 51657 case "aaaa": 51658 default: 51659 return localize.dayPeriod(dayPeriodEnumValue, { 51660 width: "wide", 51661 context: "formatting", 51662 }); 51663 } 51664 }, 51665 51666 // AM, PM, midnight, noon 51667 b: function (date, token, localize) { 51668 const hours = date.getHours(); 51669 let dayPeriodEnumValue; 51670 if (hours === 12) { 51671 dayPeriodEnumValue = dayPeriodEnum.noon; 51672 } else if (hours === 0) { 51673 dayPeriodEnumValue = dayPeriodEnum.midnight; 51674 } else { 51675 dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; 51676 } 51677 51678 switch (token) { 51679 case "b": 51680 case "bb": 51681 return localize.dayPeriod(dayPeriodEnumValue, { 51682 width: "abbreviated", 51683 context: "formatting", 51684 }); 51685 case "bbb": 51686 return localize 51687 .dayPeriod(dayPeriodEnumValue, { 51688 width: "abbreviated", 51689 context: "formatting", 51690 }) 51691 .toLowerCase(); 51692 case "bbbbb": 51693 return localize.dayPeriod(dayPeriodEnumValue, { 51694 width: "narrow", 51695 context: "formatting", 51696 }); 51697 case "bbbb": 51698 default: 51699 return localize.dayPeriod(dayPeriodEnumValue, { 51700 width: "wide", 51701 context: "formatting", 51702 }); 51703 } 51704 }, 51705 51706 // in the morning, in the afternoon, in the evening, at night 51707 B: function (date, token, localize) { 51708 const hours = date.getHours(); 51709 let dayPeriodEnumValue; 51710 if (hours >= 17) { 51711 dayPeriodEnumValue = dayPeriodEnum.evening; 51712 } else if (hours >= 12) { 51713 dayPeriodEnumValue = dayPeriodEnum.afternoon; 51714 } else if (hours >= 4) { 51715 dayPeriodEnumValue = dayPeriodEnum.morning; 51716 } else { 51717 dayPeriodEnumValue = dayPeriodEnum.night; 51718 } 51719 51720 switch (token) { 51721 case "B": 51722 case "BB": 51723 case "BBB": 51724 return localize.dayPeriod(dayPeriodEnumValue, { 51725 width: "abbreviated", 51726 context: "formatting", 51727 }); 51728 case "BBBBB": 51729 return localize.dayPeriod(dayPeriodEnumValue, { 51730 width: "narrow", 51731 context: "formatting", 51732 }); 51733 case "BBBB": 51734 default: 51735 return localize.dayPeriod(dayPeriodEnumValue, { 51736 width: "wide", 51737 context: "formatting", 51738 }); 51739 } 51740 }, 51741 51742 // Hour [1-12] 51743 h: function (date, token, localize) { 51744 if (token === "ho") { 51745 let hours = date.getHours() % 12; 51746 if (hours === 0) hours = 12; 51747 return localize.ordinalNumber(hours, { unit: "hour" }); 51748 } 51749 51750 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.h(date, token); 51751 }, 51752 51753 // Hour [0-23] 51754 H: function (date, token, localize) { 51755 if (token === "Ho") { 51756 return localize.ordinalNumber(date.getHours(), { unit: "hour" }); 51757 } 51758 51759 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.H(date, token); 51760 }, 51761 51762 // Hour [0-11] 51763 K: function (date, token, localize) { 51764 const hours = date.getHours() % 12; 51765 51766 if (token === "Ko") { 51767 return localize.ordinalNumber(hours, { unit: "hour" }); 51768 } 51769 51770 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(hours, token.length); 51771 }, 51772 51773 // Hour [1-24] 51774 k: function (date, token, localize) { 51775 let hours = date.getHours(); 51776 if (hours === 0) hours = 24; 51777 51778 if (token === "ko") { 51779 return localize.ordinalNumber(hours, { unit: "hour" }); 51780 } 51781 51782 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(hours, token.length); 51783 }, 51784 51785 // Minute 51786 m: function (date, token, localize) { 51787 if (token === "mo") { 51788 return localize.ordinalNumber(date.getMinutes(), { unit: "minute" }); 51789 } 51790 51791 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.m(date, token); 51792 }, 51793 51794 // Second 51795 s: function (date, token, localize) { 51796 if (token === "so") { 51797 return localize.ordinalNumber(date.getSeconds(), { unit: "second" }); 51798 } 51799 51800 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.s(date, token); 51801 }, 51802 51803 // Fraction of second 51804 S: function (date, token) { 51805 return _lightFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.lightFormatters.S(date, token); 51806 }, 51807 51808 // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) 51809 X: function (date, token, _localize) { 51810 const timezoneOffset = date.getTimezoneOffset(); 51811 51812 if (timezoneOffset === 0) { 51813 return "Z"; 51814 } 51815 51816 switch (token) { 51817 // Hours and optional minutes 51818 case "X": 51819 return formatTimezoneWithOptionalMinutes(timezoneOffset); 51820 51821 // Hours, minutes and optional seconds without `:` delimiter 51822 // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets 51823 // so this token always has the same output as `XX` 51824 case "XXXX": 51825 case "XX": // Hours and minutes without `:` delimiter 51826 return formatTimezone(timezoneOffset); 51827 51828 // Hours, minutes and optional seconds with `:` delimiter 51829 // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets 51830 // so this token always has the same output as `XXX` 51831 case "XXXXX": 51832 case "XXX": // Hours and minutes with `:` delimiter 51833 default: 51834 return formatTimezone(timezoneOffset, ":"); 51835 } 51836 }, 51837 51838 // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) 51839 x: function (date, token, _localize) { 51840 const timezoneOffset = date.getTimezoneOffset(); 51841 51842 switch (token) { 51843 // Hours and optional minutes 51844 case "x": 51845 return formatTimezoneWithOptionalMinutes(timezoneOffset); 51846 51847 // Hours, minutes and optional seconds without `:` delimiter 51848 // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets 51849 // so this token always has the same output as `xx` 51850 case "xxxx": 51851 case "xx": // Hours and minutes without `:` delimiter 51852 return formatTimezone(timezoneOffset); 51853 51854 // Hours, minutes and optional seconds with `:` delimiter 51855 // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets 51856 // so this token always has the same output as `xxx` 51857 case "xxxxx": 51858 case "xxx": // Hours and minutes with `:` delimiter 51859 default: 51860 return formatTimezone(timezoneOffset, ":"); 51861 } 51862 }, 51863 51864 // Timezone (GMT) 51865 O: function (date, token, _localize) { 51866 const timezoneOffset = date.getTimezoneOffset(); 51867 51868 switch (token) { 51869 // Short 51870 case "O": 51871 case "OO": 51872 case "OOO": 51873 return "GMT" + formatTimezoneShort(timezoneOffset, ":"); 51874 // Long 51875 case "OOOO": 51876 default: 51877 return "GMT" + formatTimezone(timezoneOffset, ":"); 51878 } 51879 }, 51880 51881 // Timezone (specific non-location) 51882 z: function (date, token, _localize) { 51883 const timezoneOffset = date.getTimezoneOffset(); 51884 51885 switch (token) { 51886 // Short 51887 case "z": 51888 case "zz": 51889 case "zzz": 51890 return "GMT" + formatTimezoneShort(timezoneOffset, ":"); 51891 // Long 51892 case "zzzz": 51893 default: 51894 return "GMT" + formatTimezone(timezoneOffset, ":"); 51895 } 51896 }, 51897 51898 // Seconds timestamp 51899 t: function (date, token, _localize) { 51900 const timestamp = Math.trunc(date.getTime() / 1000); 51901 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(timestamp, token.length); 51902 }, 51903 51904 // Milliseconds timestamp 51905 T: function (date, token, _localize) { 51906 const timestamp = date.getTime(); 51907 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(timestamp, token.length); 51908 }, 51909}; 51910 51911function formatTimezoneShort(offset, delimiter = "") { 51912 const sign = offset > 0 ? "-" : "+"; 51913 const absOffset = Math.abs(offset); 51914 const hours = Math.trunc(absOffset / 60); 51915 const minutes = absOffset % 60; 51916 if (minutes === 0) { 51917 return sign + String(hours); 51918 } 51919 return sign + String(hours) + delimiter + (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(minutes, 2); 51920} 51921 51922function formatTimezoneWithOptionalMinutes(offset, delimiter) { 51923 if (offset % 60 === 0) { 51924 const sign = offset > 0 ? "-" : "+"; 51925 return sign + (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(Math.abs(offset) / 60, 2); 51926 } 51927 return formatTimezone(offset, delimiter); 51928} 51929 51930function formatTimezone(offset, delimiter = "") { 51931 const sign = offset > 0 ? "-" : "+"; 51932 const absOffset = Math.abs(offset); 51933 const hours = (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(Math.trunc(absOffset / 60), 2); 51934 const minutes = (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_2__.addLeadingZeros)(absOffset % 60, 2); 51935 return sign + hours + delimiter + minutes; 51936} 51937 51938 51939/***/ }), 51940
vendor: 4,161 bytes, lines 51941-52048
51941/***/ "./node_modules/date-fns/_lib/format/lightFormatters.mjs": 51942/*!***************************************************************!*\ 51943 !*** ./node_modules/date-fns/_lib/format/lightFormatters.mjs ***! 51944 \***************************************************************/ 51945/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 51946 51947"use strict"; 51948__webpack_require__.r(__webpack_exports__); 51949/* harmony export */ __webpack_require__.d(__webpack_exports__, { 51950/* harmony export */ lightFormatters: () => (/* binding */ lightFormatters) 51951/* harmony export */ }); 51952/* harmony import */ var _addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../addLeadingZeros.mjs */ "./node_modules/date-fns/_lib/addLeadingZeros.mjs"); 51953 51954 51955/* 51956 * | | Unit | | Unit | 51957 * |-----|--------------------------------|-----|--------------------------------| 51958 * | a | AM, PM | A* | | 51959 * | d | Day of month | D | | 51960 * | h | Hour [1-12] | H | Hour [0-23] | 51961 * | m | Minute | M | Month | 51962 * | s | Second | S | Fraction of second | 51963 * | y | Year (abs) | Y | | 51964 * 51965 * Letters marked by * are not implemented but reserved by Unicode standard. 51966 */ 51967 51968const lightFormatters = { 51969 // Year 51970 y(date, token) { 51971 // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens 51972 // | Year | y | yy | yyy | yyyy | yyyyy | 51973 // |----------|-------|----|-------|-------|-------| 51974 // | AD 1 | 1 | 01 | 001 | 0001 | 00001 | 51975 // | AD 12 | 12 | 12 | 012 | 0012 | 00012 | 51976 // | AD 123 | 123 | 23 | 123 | 0123 | 00123 | 51977 // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | 51978 // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | 51979 51980 const signedYear = date.getFullYear(); 51981 // Returns 1 for 1 BC (which is year 0 in JavaScript) 51982 const year = signedYear > 0 ? signedYear : 1 - signedYear; 51983 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(token === "yy" ? year % 100 : year, token.length); 51984 }, 51985 51986 // Month 51987 M(date, token) { 51988 const month = date.getMonth(); 51989 return token === "M" ? String(month + 1) : (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(month + 1, 2); 51990 }, 51991 51992 // Day of the month 51993 d(date, token) { 51994 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(date.getDate(), token.length); 51995 }, 51996 51997 // AM or PM 51998 a(date, token) { 51999 const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am"; 52000 52001 switch (token) { 52002 case "a": 52003 case "aa": 52004 return dayPeriodEnumValue.toUpperCase(); 52005 case "aaa": 52006 return dayPeriodEnumValue; 52007 case "aaaaa": 52008 return dayPeriodEnumValue[0]; 52009 case "aaaa": 52010 default: 52011 return dayPeriodEnumValue === "am" ? "a.m." : "p.m."; 52012 } 52013 }, 52014 52015 // Hour [1-12] 52016 h(date, token) { 52017 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(date.getHours() % 12 || 12, token.length); 52018 }, 52019 52020 // Hour [0-23] 52021 H(date, token) { 52022 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(date.getHours(), token.length); 52023 }, 52024 52025 // Minute 52026 m(date, token) { 52027 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(date.getMinutes(), token.length); 52028 }, 52029 52030 // Second 52031 s(date, token) { 52032 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(date.getSeconds(), token.length); 52033 }, 52034 52035 // Fraction of second 52036 S(date, token) { 52037 const numberOfDigits = token.length; 52038 const milliseconds = date.getMilliseconds(); 52039 const fractionalSeconds = Math.trunc( 52040 milliseconds * Math.pow(10, numberOfDigits - 3), 52041 ); 52042 return (0,_addLeadingZeros_mjs__WEBPACK_IMPORTED_MODULE_0__.addLeadingZeros)(fractionalSeconds, token.length); 52043 }, 52044}; 52045 52046 52047/***/ }), 52048
vendor: 2,260 bytes, lines 52049-52127
52049/***/ "./node_modules/date-fns/_lib/format/longFormatters.mjs": 52050/*!**************************************************************!*\ 52051 !*** ./node_modules/date-fns/_lib/format/longFormatters.mjs ***! 52052 \**************************************************************/ 52053/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52054 52055"use strict"; 52056__webpack_require__.r(__webpack_exports__); 52057/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52058/* harmony export */ longFormatters: () => (/* binding */ longFormatters) 52059/* harmony export */ }); 52060const dateLongFormatter = (pattern, formatLong) => { 52061 switch (pattern) { 52062 case "P": 52063 return formatLong.date({ width: "short" }); 52064 case "PP": 52065 return formatLong.date({ width: "medium" }); 52066 case "PPP": 52067 return formatLong.date({ width: "long" }); 52068 case "PPPP": 52069 default: 52070 return formatLong.date({ width: "full" }); 52071 } 52072}; 52073 52074const timeLongFormatter = (pattern, formatLong) => { 52075 switch (pattern) { 52076 case "p": 52077 return formatLong.time({ width: "short" }); 52078 case "pp": 52079 return formatLong.time({ width: "medium" }); 52080 case "ppp": 52081 return formatLong.time({ width: "long" }); 52082 case "pppp": 52083 default: 52084 return formatLong.time({ width: "full" }); 52085 } 52086}; 52087 52088const dateTimeLongFormatter = (pattern, formatLong) => { 52089 const matchResult = pattern.match(/(P+)(p+)?/) || []; 52090 const datePattern = matchResult[1]; 52091 const timePattern = matchResult[2]; 52092 52093 if (!timePattern) { 52094 return dateLongFormatter(pattern, formatLong); 52095 } 52096 52097 let dateTimeFormat; 52098 52099 switch (datePattern) { 52100 case "P": 52101 dateTimeFormat = formatLong.dateTime({ width: "short" }); 52102 break; 52103 case "PP": 52104 dateTimeFormat = formatLong.dateTime({ width: "medium" }); 52105 break; 52106 case "PPP": 52107 dateTimeFormat = formatLong.dateTime({ width: "long" }); 52108 break; 52109 case "PPPP": 52110 default: 52111 dateTimeFormat = formatLong.dateTime({ width: "full" }); 52112 break; 52113 } 52114 52115 return dateTimeFormat 52116 .replace("{{date}}", dateLongFormatter(datePattern, formatLong)) 52117 .replace("{{time}}", timeLongFormatter(timePattern, formatLong)); 52118}; 52119 52120const longFormatters = { 52121 p: timeLongFormatter, 52122 P: dateTimeLongFormatter, 52123}; 52124 52125 52126/***/ }), 52127
vendor: 1,812 bytes, lines 52128-52172
52128/***/ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs": 52129/*!************************************************************************!*\ 52130 !*** ./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs ***! 52131 \************************************************************************/ 52132/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52133 52134"use strict"; 52135__webpack_require__.r(__webpack_exports__); 52136/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52137/* harmony export */ getTimezoneOffsetInMilliseconds: () => (/* binding */ getTimezoneOffsetInMilliseconds) 52138/* harmony export */ }); 52139/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52140 52141 52142/** 52143 * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. 52144 * They usually appear for dates that denote time before the timezones were introduced 52145 * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 52146 * and GMT+01:00:00 after that date) 52147 * 52148 * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, 52149 * which would lead to incorrect calculations. 52150 * 52151 * This function returns the timezone offset in milliseconds that takes seconds in account. 52152 */ 52153function getTimezoneOffsetInMilliseconds(date) { 52154 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 52155 const utcDate = new Date( 52156 Date.UTC( 52157 _date.getFullYear(), 52158 _date.getMonth(), 52159 _date.getDate(), 52160 _date.getHours(), 52161 _date.getMinutes(), 52162 _date.getSeconds(), 52163 _date.getMilliseconds(), 52164 ), 52165 ); 52166 utcDate.setUTCFullYear(_date.getFullYear()); 52167 return +date - +utcDate; 52168} 52169 52170 52171/***/ }), 52172
vendor: 1,607 bytes, lines 52173-52212
52173/***/ "./node_modules/date-fns/_lib/protectedTokens.mjs": 52174/*!********************************************************!*\ 52175 !*** ./node_modules/date-fns/_lib/protectedTokens.mjs ***! 52176 \********************************************************/ 52177/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52178 52179"use strict"; 52180__webpack_require__.r(__webpack_exports__); 52181/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52182/* harmony export */ isProtectedDayOfYearToken: () => (/* binding */ isProtectedDayOfYearToken), 52183/* harmony export */ isProtectedWeekYearToken: () => (/* binding */ isProtectedWeekYearToken), 52184/* harmony export */ warnOrThrowProtectedError: () => (/* binding */ warnOrThrowProtectedError) 52185/* harmony export */ }); 52186const dayOfYearTokenRE = /^D+$/; 52187const weekYearTokenRE = /^Y+$/; 52188 52189const throwTokens = ["D", "DD", "YY", "YYYY"]; 52190 52191function isProtectedDayOfYearToken(token) { 52192 return dayOfYearTokenRE.test(token); 52193} 52194 52195function isProtectedWeekYearToken(token) { 52196 return weekYearTokenRE.test(token); 52197} 52198 52199function warnOrThrowProtectedError(token, format, input) { 52200 const _message = message(token, format, input); 52201 console.warn(_message); 52202 if (throwTokens.includes(token)) throw new RangeError(_message); 52203} 52204 52205function message(token, format, input) { 52206 const subject = token[0] === "Y" ? "years" : "days of the month"; 52207 return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; 52208} 52209 52210 52211/***/ }), 52212
vendor: 3,705 bytes, lines 52213-52308
52213/***/ "./node_modules/date-fns/add.mjs": 52214/*!***************************************!*\ 52215 !*** ./node_modules/date-fns/add.mjs ***! 52216 \***************************************/ 52217/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52218 52219"use strict"; 52220__webpack_require__.r(__webpack_exports__); 52221/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52222/* harmony export */ add: () => (/* binding */ add), 52223/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52224/* harmony export */ }); 52225/* harmony import */ var _addDays_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addDays.mjs */ "./node_modules/date-fns/addDays.mjs"); 52226/* harmony import */ var _addMonths_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./addMonths.mjs */ "./node_modules/date-fns/addMonths.mjs"); 52227/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 52228/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52229 52230 52231 52232 52233 52234/** 52235 * @name add 52236 * @category Common Helpers 52237 * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. 52238 * 52239 * @description 52240 * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. 52241 * 52242 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52243 * 52244 * @param date - The date to be changed 52245 * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added. 52246 * 52247 * | Key | Description | 52248 * |----------------|------------------------------------| 52249 * | years | Amount of years to be added | 52250 * | months | Amount of months to be added | 52251 * | weeks | Amount of weeks to be added | 52252 * | days | Amount of days to be added | 52253 * | hours | Amount of hours to be added | 52254 * | minutes | Amount of minutes to be added | 52255 * | seconds | Amount of seconds to be added | 52256 * 52257 * All values default to 0 52258 * 52259 * @returns The new date with the seconds added 52260 * 52261 * @example 52262 * // Add the following duration to 1 September 2014, 10:19:50 52263 * const result = add(new Date(2014, 8, 1, 10, 19, 50), { 52264 * years: 2, 52265 * months: 9, 52266 * weeks: 1, 52267 * days: 7, 52268 * hours: 5,\\-7 52269 * minutes: 9, 52270 * seconds: 30, 52271 * }) 52272 * //=> Thu Jun 15 2017 15:29:20 52273 */ 52274function add(date, duration) { 52275 const { 52276 years = 0, 52277 months = 0, 52278 weeks = 0, 52279 days = 0, 52280 hours = 0, 52281 minutes = 0, 52282 seconds = 0, 52283 } = duration; 52284 52285 // Add years and months 52286 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 52287 const dateWithMonths = 52288 months || years ? (0,_addMonths_mjs__WEBPACK_IMPORTED_MODULE_1__.addMonths)(_date, months + years * 12) : _date; 52289 52290 // Add weeks and days 52291 const dateWithDays = 52292 days || weeks ? (0,_addDays_mjs__WEBPACK_IMPORTED_MODULE_2__.addDays)(dateWithMonths, days + weeks * 7) : dateWithMonths; 52293 52294 // Add days, hours, minutes and seconds 52295 const minutesToAdd = minutes + hours * 60; 52296 const secondsToAdd = seconds + minutesToAdd * 60; 52297 const msToAdd = secondsToAdd * 1000; 52298 const finalDate = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__.constructFrom)(date, dateWithDays.getTime() + msToAdd); 52299 52300 return finalDate; 52301} 52302 52303// Fallback for modularized imports: 52304/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (add); 52305 52306 52307/***/ }), 52308
vendor: 2,054 bytes, lines 52309-52362
52309/***/ "./node_modules/date-fns/addDays.mjs": 52310/*!*******************************************!*\ 52311 !*** ./node_modules/date-fns/addDays.mjs ***! 52312 \*******************************************/ 52313/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52314 52315"use strict"; 52316__webpack_require__.r(__webpack_exports__); 52317/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52318/* harmony export */ addDays: () => (/* binding */ addDays), 52319/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52320/* harmony export */ }); 52321/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52322/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 52323 52324 52325 52326/** 52327 * @name addDays 52328 * @category Day Helpers 52329 * @summary Add the specified number of days to the given date. 52330 * 52331 * @description 52332 * Add the specified number of days to the given date. 52333 * 52334 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52335 * 52336 * @param date - The date to be changed 52337 * @param amount - The amount of days to be added. 52338 * 52339 * @returns The new date with the days added 52340 * 52341 * @example 52342 * // Add 10 days to 1 September 2014: 52343 * const result = addDays(new Date(2014, 8, 1), 10) 52344 * //=> Thu Sep 11 2014 00:00:00 52345 */ 52346function addDays(date, amount) { 52347 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 52348 if (isNaN(amount)) return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, NaN); 52349 if (!amount) { 52350 // If 0 days, no-op to avoid changing times in the hour before end of DST 52351 return _date; 52352 } 52353 _date.setDate(_date.getDate() + amount); 52354 return _date; 52355} 52356 52357// Fallback for modularized imports: 52358/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addDays); 52359 52360 52361/***/ }), 52362
vendor: 1,898 bytes, lines 52363-52409
52363/***/ "./node_modules/date-fns/addHours.mjs": 52364/*!********************************************!*\ 52365 !*** ./node_modules/date-fns/addHours.mjs ***! 52366 \********************************************/ 52367/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52368 52369"use strict"; 52370__webpack_require__.r(__webpack_exports__); 52371/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52372/* harmony export */ addHours: () => (/* binding */ addHours), 52373/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52374/* harmony export */ }); 52375/* harmony import */ var _addMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addMilliseconds.mjs */ "./node_modules/date-fns/addMilliseconds.mjs"); 52376/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/date-fns/constants.mjs"); 52377 52378 52379 52380/** 52381 * @name addHours 52382 * @category Hour Helpers 52383 * @summary Add the specified number of hours to the given date. 52384 * 52385 * @description 52386 * Add the specified number of hours to the given date. 52387 * 52388 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52389 * 52390 * @param date - The date to be changed 52391 * @param amount - The amount of hours to be added. 52392 * 52393 * @returns The new date with the hours added 52394 * 52395 * @example 52396 * // Add 2 hours to 10 July 2014 23:00:00: 52397 * const result = addHours(new Date(2014, 6, 10, 23, 0), 2) 52398 * //=> Fri Jul 11 2014 01:00:00 52399 */ 52400function addHours(date, amount) { 52401 return (0,_addMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_0__.addMilliseconds)(date, amount * _constants_mjs__WEBPACK_IMPORTED_MODULE_1__.millisecondsInHour); 52402} 52403 52404// Fallback for modularized imports: 52405/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addHours); 52406 52407 52408/***/ }), 52409
vendor: 2,038 bytes, lines 52410-52457
52410/***/ "./node_modules/date-fns/addMilliseconds.mjs": 52411/*!***************************************************!*\ 52412 !*** ./node_modules/date-fns/addMilliseconds.mjs ***! 52413 \***************************************************/ 52414/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52415 52416"use strict"; 52417__webpack_require__.r(__webpack_exports__); 52418/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52419/* harmony export */ addMilliseconds: () => (/* binding */ addMilliseconds), 52420/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52421/* harmony export */ }); 52422/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52423/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 52424 52425 52426 52427/** 52428 * @name addMilliseconds 52429 * @category Millisecond Helpers 52430 * @summary Add the specified number of milliseconds to the given date. 52431 * 52432 * @description 52433 * Add the specified number of milliseconds to the given date. 52434 * 52435 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52436 * 52437 * @param date - The date to be changed 52438 * @param amount - The amount of milliseconds to be added. 52439 * 52440 * @returns The new date with the milliseconds added 52441 * 52442 * @example 52443 * // Add 750 milliseconds to 10 July 2014 12:45:30.000: 52444 * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) 52445 * //=> Thu Jul 10 2014 12:45:30.750 52446 */ 52447function addMilliseconds(date, amount) { 52448 const timestamp = +(0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 52449 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, timestamp + amount); 52450} 52451 52452// Fallback for modularized imports: 52453/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addMilliseconds); 52454 52455 52456/***/ }), 52457
vendor: 3,849 bytes, lines 52458-52545
52458/***/ "./node_modules/date-fns/addMonths.mjs": 52459/*!*********************************************!*\ 52460 !*** ./node_modules/date-fns/addMonths.mjs ***! 52461 \*********************************************/ 52462/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52463 52464"use strict"; 52465__webpack_require__.r(__webpack_exports__); 52466/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52467/* harmony export */ addMonths: () => (/* binding */ addMonths), 52468/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52469/* harmony export */ }); 52470/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52471/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 52472 52473 52474 52475/** 52476 * @name addMonths 52477 * @category Month Helpers 52478 * @summary Add the specified number of months to the given date. 52479 * 52480 * @description 52481 * Add the specified number of months to the given date. 52482 * 52483 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52484 * 52485 * @param date - The date to be changed 52486 * @param amount - The amount of months to be added. 52487 * 52488 * @returns The new date with the months added 52489 * 52490 * @example 52491 * // Add 5 months to 1 September 2014: 52492 * const result = addMonths(new Date(2014, 8, 1), 5) 52493 * //=> Sun Feb 01 2015 00:00:00 52494 * 52495 * // Add one month to 30 January 2023: 52496 * const result = addMonths(new Date(2023, 0, 30), 1) 52497 * //=> Tue Feb 28 2023 00:00:00 52498 */ 52499function addMonths(date, amount) { 52500 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 52501 if (isNaN(amount)) return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, NaN); 52502 if (!amount) { 52503 // If 0 months, no-op to avoid changing times in the hour before end of DST 52504 return _date; 52505 } 52506 const dayOfMonth = _date.getDate(); 52507 52508 // The JS Date object supports date math by accepting out-of-bounds values for 52509 // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and 52510 // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we 52511 // want except that dates will wrap around the end of a month, meaning that 52512 // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So 52513 // we'll default to the end of the desired month by adding 1 to the desired 52514 // month and using a date of 0 to back up one day to the end of the desired 52515 // month. 52516 const endOfDesiredMonth = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, _date.getTime()); 52517 endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0); 52518 const daysInMonth = endOfDesiredMonth.getDate(); 52519 if (dayOfMonth >= daysInMonth) { 52520 // If we're already at the end of the month, then this is the correct date 52521 // and we're done. 52522 return endOfDesiredMonth; 52523 } else { 52524 // Otherwise, we now know that setting the original day-of-month value won't 52525 // cause an overflow, so set the desired day-of-month. Note that we can't 52526 // just set the date of `endOfDesiredMonth` because that object may have had 52527 // its time changed in the unusual case where where a DST transition was on 52528 // the last day of the month and its local time was in the hour skipped or 52529 // repeated next to a DST transition. So we use `date` instead which is 52530 // guaranteed to still have the original time. 52531 _date.setFullYear( 52532 endOfDesiredMonth.getFullYear(), 52533 endOfDesiredMonth.getMonth(), 52534 dayOfMonth, 52535 ); 52536 return _date; 52537 } 52538} 52539 52540// Fallback for modularized imports: 52541/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addMonths); 52542 52543 52544/***/ }), 52545
vendor: 1,719 bytes, lines 52546-52591
52546/***/ "./node_modules/date-fns/addQuarters.mjs": 52547/*!***********************************************!*\ 52548 !*** ./node_modules/date-fns/addQuarters.mjs ***! 52549 \***********************************************/ 52550/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52551 52552"use strict"; 52553__webpack_require__.r(__webpack_exports__); 52554/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52555/* harmony export */ addQuarters: () => (/* binding */ addQuarters), 52556/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52557/* harmony export */ }); 52558/* harmony import */ var _addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addMonths.mjs */ "./node_modules/date-fns/addMonths.mjs"); 52559 52560 52561/** 52562 * @name addQuarters 52563 * @category Quarter Helpers 52564 * @summary Add the specified number of year quarters to the given date. 52565 * 52566 * @description 52567 * Add the specified number of year quarters to the given date. 52568 * 52569 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52570 * 52571 * @param date - The date to be changed 52572 * @param amount - The amount of quarters to be added. 52573 * 52574 * @returns The new date with the quarters added 52575 * 52576 * @example 52577 * // Add 1 quarter to 1 September 2014: 52578 * const result = addQuarters(new Date(2014, 8, 1), 1) 52579 * //=> Mon Dec 01 2014 00:00:00 52580 */ 52581function addQuarters(date, amount) { 52582 const months = amount * 3; 52583 return (0,_addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__.addMonths)(date, months); 52584} 52585 52586// Fallback for modularized imports: 52587/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addQuarters); 52588 52589 52590/***/ }), 52591
vendor: 1,638 bytes, lines 52592-52636
52592/***/ "./node_modules/date-fns/addYears.mjs": 52593/*!********************************************!*\ 52594 !*** ./node_modules/date-fns/addYears.mjs ***! 52595 \********************************************/ 52596/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52597 52598"use strict"; 52599__webpack_require__.r(__webpack_exports__); 52600/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52601/* harmony export */ addYears: () => (/* binding */ addYears), 52602/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52603/* harmony export */ }); 52604/* harmony import */ var _addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addMonths.mjs */ "./node_modules/date-fns/addMonths.mjs"); 52605 52606 52607/** 52608 * @name addYears 52609 * @category Year Helpers 52610 * @summary Add the specified number of years to the given date. 52611 * 52612 * @description 52613 * Add the specified number of years to the given date. 52614 * 52615 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52616 * 52617 * @param date - The date to be changed 52618 * @param amount - The amount of years to be added. 52619 * 52620 * @returns The new date with the years added 52621 * 52622 * @example 52623 * // Add 5 years to 1 September 2014: 52624 * const result = addYears(new Date(2014, 8, 1), 5) 52625 * //=> Sun Sep 01 2019 00:00:00 52626 */ 52627function addYears(date, amount) { 52628 return (0,_addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__.addMonths)(date, amount * 12); 52629} 52630 52631// Fallback for modularized imports: 52632/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addYears); 52633 52634 52635/***/ }), 52636
vendor: 2,340 bytes, lines 52637-52707
52637/***/ "./node_modules/date-fns/compareAsc.mjs": 52638/*!**********************************************!*\ 52639 !*** ./node_modules/date-fns/compareAsc.mjs ***! 52640 \**********************************************/ 52641/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52642 52643"use strict"; 52644__webpack_require__.r(__webpack_exports__); 52645/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52646/* harmony export */ compareAsc: () => (/* binding */ compareAsc), 52647/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52648/* harmony export */ }); 52649/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 52650 52651 52652/** 52653 * @name compareAsc 52654 * @category Common Helpers 52655 * @summary Compare the two dates and return -1, 0 or 1. 52656 * 52657 * @description 52658 * Compare the two dates and return 1 if the first date is after the second, 52659 * -1 if the first date is before the second or 0 if dates are equal. 52660 * 52661 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52662 * 52663 * @param dateLeft - The first date to compare 52664 * @param dateRight - The second date to compare 52665 * 52666 * @returns The result of the comparison 52667 * 52668 * @example 52669 * // Compare 11 February 1987 and 10 July 1989: 52670 * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10)) 52671 * //=> -1 52672 * 52673 * @example 52674 * // Sort the array of dates: 52675 * const result = [ 52676 * new Date(1995, 6, 2), 52677 * new Date(1987, 1, 11), 52678 * new Date(1989, 6, 10) 52679 * ].sort(compareAsc) 52680 * //=> [ 52681 * // Wed Feb 11 1987 00:00:00, 52682 * // Mon Jul 10 1989 00:00:00, 52683 * // Sun Jul 02 1995 00:00:00 52684 * // ] 52685 */ 52686function compareAsc(dateLeft, dateRight) { 52687 const _dateLeft = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateLeft); 52688 const _dateRight = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateRight); 52689 52690 const diff = _dateLeft.getTime() - _dateRight.getTime(); 52691 52692 if (diff < 0) { 52693 return -1; 52694 } else if (diff > 0) { 52695 return 1; 52696 // Return 0 if diff is 0; return NaN if diff is NaN 52697 } else { 52698 return diff; 52699 } 52700} 52701 52702// Fallback for modularized imports: 52703/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compareAsc); 52704 52705 52706/***/ }), 52707
vendor: 5,818 bytes, lines 52708-52947
52708/***/ "./node_modules/date-fns/constants.mjs": 52709/*!*********************************************!*\ 52710 !*** ./node_modules/date-fns/constants.mjs ***! 52711 \*********************************************/ 52712/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52713 52714"use strict"; 52715__webpack_require__.r(__webpack_exports__); 52716/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52717/* harmony export */ daysInWeek: () => (/* binding */ daysInWeek), 52718/* harmony export */ daysInYear: () => (/* binding */ daysInYear), 52719/* harmony export */ maxTime: () => (/* binding */ maxTime), 52720/* harmony export */ millisecondsInDay: () => (/* binding */ millisecondsInDay), 52721/* harmony export */ millisecondsInHour: () => (/* binding */ millisecondsInHour), 52722/* harmony export */ millisecondsInMinute: () => (/* binding */ millisecondsInMinute), 52723/* harmony export */ millisecondsInSecond: () => (/* binding */ millisecondsInSecond), 52724/* harmony export */ millisecondsInWeek: () => (/* binding */ millisecondsInWeek), 52725/* harmony export */ minTime: () => (/* binding */ minTime), 52726/* harmony export */ minutesInDay: () => (/* binding */ minutesInDay), 52727/* harmony export */ minutesInHour: () => (/* binding */ minutesInHour), 52728/* harmony export */ minutesInMonth: () => (/* binding */ minutesInMonth), 52729/* harmony export */ minutesInYear: () => (/* binding */ minutesInYear), 52730/* harmony export */ monthsInQuarter: () => (/* binding */ monthsInQuarter), 52731/* harmony export */ monthsInYear: () => (/* binding */ monthsInYear), 52732/* harmony export */ quartersInYear: () => (/* binding */ quartersInYear), 52733/* harmony export */ secondsInDay: () => (/* binding */ secondsInDay), 52734/* harmony export */ secondsInHour: () => (/* binding */ secondsInHour), 52735/* harmony export */ secondsInMinute: () => (/* binding */ secondsInMinute), 52736/* harmony export */ secondsInMonth: () => (/* binding */ secondsInMonth), 52737/* harmony export */ secondsInQuarter: () => (/* binding */ secondsInQuarter), 52738/* harmony export */ secondsInWeek: () => (/* binding */ secondsInWeek), 52739/* harmony export */ secondsInYear: () => (/* binding */ secondsInYear) 52740/* harmony export */ }); 52741/** 52742 * @module constants 52743 * @summary Useful constants 52744 * @description 52745 * Collection of useful date constants. 52746 * 52747 * The constants could be imported from `date-fns/constants`: 52748 * 52749 * ```ts 52750 * import { maxTime, minTime } from "./constants/date-fns/constants"; 52751 * 52752 * function isAllowedTime(time) { 52753 * return time <= maxTime && time >= minTime; 52754 * } 52755 * ``` 52756 */ 52757 52758/** 52759 * @constant 52760 * @name daysInWeek 52761 * @summary Days in 1 week. 52762 */ 52763const daysInWeek = 7; 52764 52765/** 52766 * @constant 52767 * @name daysInYear 52768 * @summary Days in 1 year. 52769 * 52770 * @description 52771 * How many days in a year. 52772 * 52773 * One years equals 365.2425 days according to the formula: 52774 * 52775 * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400. 52776 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days 52777 */ 52778const daysInYear = 365.2425; 52779 52780/** 52781 * @constant 52782 * @name maxTime 52783 * @summary Maximum allowed time. 52784 * 52785 * @example 52786 * import { maxTime } from "./constants/date-fns/constants"; 52787 * 52788 * const isValid = 8640000000000001 <= maxTime; 52789 * //=> false 52790 * 52791 * new Date(8640000000000001); 52792 * //=> Invalid Date 52793 */ 52794const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000; 52795 52796/** 52797 * @constant 52798 * @name minTime 52799 * @summary Minimum allowed time. 52800 * 52801 * @example 52802 * import { minTime } from "./constants/date-fns/constants"; 52803 * 52804 * const isValid = -8640000000000001 >= minTime; 52805 * //=> false 52806 * 52807 * new Date(-8640000000000001) 52808 * //=> Invalid Date 52809 */ 52810const minTime = -maxTime; 52811 52812/** 52813 * @constant 52814 * @name millisecondsInWeek 52815 * @summary Milliseconds in 1 week. 52816 */ 52817const millisecondsInWeek = 604800000; 52818 52819/** 52820 * @constant 52821 * @name millisecondsInDay 52822 * @summary Milliseconds in 1 day. 52823 */ 52824const millisecondsInDay = 86400000; 52825 52826/** 52827 * @constant 52828 * @name millisecondsInMinute 52829 * @summary Milliseconds in 1 minute 52830 */ 52831const millisecondsInMinute = 60000; 52832 52833/** 52834 * @constant 52835 * @name millisecondsInHour 52836 * @summary Milliseconds in 1 hour 52837 */ 52838const millisecondsInHour = 3600000; 52839 52840/** 52841 * @constant 52842 * @name millisecondsInSecond 52843 * @summary Milliseconds in 1 second 52844 */ 52845const millisecondsInSecond = 1000; 52846 52847/** 52848 * @constant 52849 * @name minutesInYear 52850 * @summary Minutes in 1 year. 52851 */ 52852const minutesInYear = 525600; 52853 52854/** 52855 * @constant 52856 * @name minutesInMonth 52857 * @summary Minutes in 1 month. 52858 */ 52859const minutesInMonth = 43200; 52860 52861/** 52862 * @constant 52863 * @name minutesInDay 52864 * @summary Minutes in 1 day. 52865 */ 52866const minutesInDay = 1440; 52867 52868/** 52869 * @constant 52870 * @name minutesInHour 52871 * @summary Minutes in 1 hour. 52872 */ 52873const minutesInHour = 60; 52874 52875/** 52876 * @constant 52877 * @name monthsInQuarter 52878 * @summary Months in 1 quarter. 52879 */ 52880const monthsInQuarter = 3; 52881 52882/** 52883 * @constant 52884 * @name monthsInYear 52885 * @summary Months in 1 year. 52886 */ 52887const monthsInYear = 12; 52888 52889/** 52890 * @constant 52891 * @name quartersInYear 52892 * @summary Quarters in 1 year 52893 */ 52894const quartersInYear = 4; 52895 52896/** 52897 * @constant 52898 * @name secondsInHour 52899 * @summary Seconds in 1 hour. 52900 */ 52901const secondsInHour = 3600; 52902 52903/** 52904 * @constant 52905 * @name secondsInMinute 52906 * @summary Seconds in 1 minute. 52907 */ 52908const secondsInMinute = 60; 52909 52910/** 52911 * @constant 52912 * @name secondsInDay 52913 * @summary Seconds in 1 day. 52914 */ 52915const secondsInDay = secondsInHour * 24; 52916 52917/** 52918 * @constant 52919 * @name secondsInWeek 52920 * @summary Seconds in 1 week. 52921 */ 52922const secondsInWeek = secondsInDay * 7; 52923 52924/** 52925 * @constant 52926 * @name secondsInYear 52927 * @summary Seconds in 1 year. 52928 */ 52929const secondsInYear = secondsInDay * daysInYear; 52930 52931/** 52932 * @constant 52933 * @name secondsInMonth 52934 * @summary Seconds in 1 month 52935 */ 52936const secondsInMonth = secondsInYear / 12; 52937 52938/** 52939 * @constant 52940 * @name secondsInQuarter 52941 * @summary Seconds in 1 quarter. 52942 */ 52943const secondsInQuarter = secondsInMonth * 3; 52944 52945 52946/***/ }), 52947
vendor: 2,004 bytes, lines 52948-53003
52948/***/ "./node_modules/date-fns/constructFrom.mjs": 52949/*!*************************************************!*\ 52950 !*** ./node_modules/date-fns/constructFrom.mjs ***! 52951 \*************************************************/ 52952/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 52953 52954"use strict"; 52955__webpack_require__.r(__webpack_exports__); 52956/* harmony export */ __webpack_require__.d(__webpack_exports__, { 52957/* harmony export */ constructFrom: () => (/* binding */ constructFrom), 52958/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 52959/* harmony export */ }); 52960/** 52961 * @name constructFrom 52962 * @category Generic Helpers 52963 * @summary Constructs a date using the reference date and the value 52964 * 52965 * @description 52966 * The function constructs a new date using the constructor from the reference 52967 * date and the given value. It helps to build generic functions that accept 52968 * date extensions. 52969 * 52970 * It defaults to `Date` if the passed reference date is a number or a string. 52971 * 52972 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 52973 * 52974 * @param date - The reference date to take constructor from 52975 * @param value - The value to create the date 52976 * 52977 * @returns Date initialized using the given date and value 52978 * 52979 * @example 52980 * import { constructFrom } from 'date-fns' 52981 * 52982 * // A function that clones a date preserving the original type 52983 * function cloneDate<DateType extends Date(date: DateType): DateType { 52984 * return constructFrom( 52985 * date, // Use contrustor from the given date 52986 * date.getTime() // Use the date value to create a new date 52987 * ) 52988 * } 52989 */ 52990function constructFrom(date, value) { 52991 if (date instanceof Date) { 52992 return new date.constructor(value); 52993 } else { 52994 return new Date(value); 52995 } 52996} 52997 52998// Fallback for modularized imports: 52999/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (constructFrom); 53000 53001 53002/***/ }), 53003
vendor: 3,357 bytes, lines 53004-53075
53004/***/ "./node_modules/date-fns/differenceInCalendarDays.mjs": 53005/*!************************************************************!*\ 53006 !*** ./node_modules/date-fns/differenceInCalendarDays.mjs ***! 53007 \************************************************************/ 53008/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53009 53010"use strict"; 53011__webpack_require__.r(__webpack_exports__); 53012/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53013/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53014/* harmony export */ differenceInCalendarDays: () => (/* binding */ differenceInCalendarDays) 53015/* harmony export */ }); 53016/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/date-fns/constants.mjs"); 53017/* harmony import */ var _startOfDay_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./startOfDay.mjs */ "./node_modules/date-fns/startOfDay.mjs"); 53018/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_lib/getTimezoneOffsetInMilliseconds.mjs */ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs"); 53019 53020 53021 53022 53023/** 53024 * @name differenceInCalendarDays 53025 * @category Day Helpers 53026 * @summary Get the number of calendar days between the given dates. 53027 * 53028 * @description 53029 * Get the number of calendar days between the given dates. This means that the times are removed 53030 * from the dates and then the difference in days is calculated. 53031 * 53032 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53033 * 53034 * @param dateLeft - The later date 53035 * @param dateRight - The earlier date 53036 * 53037 * @returns The number of calendar days 53038 * 53039 * @example 53040 * // How many calendar days are between 53041 * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? 53042 * const result = differenceInCalendarDays( 53043 * new Date(2012, 6, 2, 0, 0), 53044 * new Date(2011, 6, 2, 23, 0) 53045 * ) 53046 * //=> 366 53047 * // How many calendar days are between 53048 * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00? 53049 * const result = differenceInCalendarDays( 53050 * new Date(2011, 6, 3, 0, 1), 53051 * new Date(2011, 6, 2, 23, 59) 53052 * ) 53053 * //=> 1 53054 */ 53055function differenceInCalendarDays(dateLeft, dateRight) { 53056 const startOfDayLeft = (0,_startOfDay_mjs__WEBPACK_IMPORTED_MODULE_0__.startOfDay)(dateLeft); 53057 const startOfDayRight = (0,_startOfDay_mjs__WEBPACK_IMPORTED_MODULE_0__.startOfDay)(dateRight); 53058 53059 const timestampLeft = 53060 +startOfDayLeft - (0,_lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_1__.getTimezoneOffsetInMilliseconds)(startOfDayLeft); 53061 const timestampRight = 53062 +startOfDayRight - (0,_lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_1__.getTimezoneOffsetInMilliseconds)(startOfDayRight); 53063 53064 // Round the number of days to the nearest integer because the number of 53065 // milliseconds in a day is not constant (e.g. it's different in the week of 53066 // the daylight saving time clock shift). 53067 return Math.round((timestampLeft - timestampRight) / _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.millisecondsInDay); 53068} 53069 53070// Fallback for modularized imports: 53071/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (differenceInCalendarDays); 53072 53073 53074/***/ }), 53075
vendor: 1,991 bytes, lines 53076-53126
53076/***/ "./node_modules/date-fns/differenceInCalendarYears.mjs": 53077/*!*************************************************************!*\ 53078 !*** ./node_modules/date-fns/differenceInCalendarYears.mjs ***! 53079 \*************************************************************/ 53080/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53081 53082"use strict"; 53083__webpack_require__.r(__webpack_exports__); 53084/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53085/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53086/* harmony export */ differenceInCalendarYears: () => (/* binding */ differenceInCalendarYears) 53087/* harmony export */ }); 53088/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53089 53090 53091/** 53092 * @name differenceInCalendarYears 53093 * @category Year Helpers 53094 * @summary Get the number of calendar years between the given dates. 53095 * 53096 * @description 53097 * Get the number of calendar years between the given dates. 53098 * 53099 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53100 * 53101 * @param dateLeft - The later date 53102 * @param dateRight - The earlier date 53103 53104 * @returns The number of calendar years 53105 * 53106 * @example 53107 * // How many calendar years are between 31 December 2013 and 11 February 2015? 53108 * const result = differenceInCalendarYears( 53109 * new Date(2015, 1, 11), 53110 * new Date(2013, 11, 31) 53111 * ) 53112 * //=> 2 53113 */ 53114function differenceInCalendarYears(dateLeft, dateRight) { 53115 const _dateLeft = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateLeft); 53116 const _dateRight = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateRight); 53117 53118 return _dateLeft.getFullYear() - _dateRight.getFullYear(); 53119} 53120 53121// Fallback for modularized imports: 53122/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (differenceInCalendarYears); 53123 53124 53125/***/ }), 53126
vendor: 2,997 bytes, lines 53127-53192
53127/***/ "./node_modules/date-fns/differenceInYears.mjs": 53128/*!*****************************************************!*\ 53129 !*** ./node_modules/date-fns/differenceInYears.mjs ***! 53130 \*****************************************************/ 53131/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53132 53133"use strict"; 53134__webpack_require__.r(__webpack_exports__); 53135/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53136/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53137/* harmony export */ differenceInYears: () => (/* binding */ differenceInYears) 53138/* harmony export */ }); 53139/* harmony import */ var _compareAsc_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compareAsc.mjs */ "./node_modules/date-fns/compareAsc.mjs"); 53140/* harmony import */ var _differenceInCalendarYears_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./differenceInCalendarYears.mjs */ "./node_modules/date-fns/differenceInCalendarYears.mjs"); 53141/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53142 53143 53144 53145 53146/** 53147 * @name differenceInYears 53148 * @category Year Helpers 53149 * @summary Get the number of full years between the given dates. 53150 * 53151 * @description 53152 * Get the number of full years between the given dates. 53153 * 53154 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53155 * 53156 * @param dateLeft - The later date 53157 * @param dateRight - The earlier date 53158 * 53159 * @returns The number of full years 53160 * 53161 * @example 53162 * // How many full years are between 31 December 2013 and 11 February 2015? 53163 * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31)) 53164 * //=> 1 53165 */ 53166function differenceInYears(dateLeft, dateRight) { 53167 const _dateLeft = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateLeft); 53168 const _dateRight = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateRight); 53169 53170 const sign = (0,_compareAsc_mjs__WEBPACK_IMPORTED_MODULE_1__.compareAsc)(_dateLeft, _dateRight); 53171 const difference = Math.abs((0,_differenceInCalendarYears_mjs__WEBPACK_IMPORTED_MODULE_2__.differenceInCalendarYears)(_dateLeft, _dateRight)); 53172 53173 // Set both dates to a valid leap year for accurate comparison when dealing 53174 // with leap days 53175 _dateLeft.setFullYear(1584); 53176 _dateRight.setFullYear(1584); 53177 53178 // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full 53179 // If so, result must be decreased by 1 in absolute value 53180 const isLastYearNotFull = (0,_compareAsc_mjs__WEBPACK_IMPORTED_MODULE_1__.compareAsc)(_dateLeft, _dateRight) === -sign; 53181 const result = sign * (difference - +isLastYearNotFull); 53182 53183 // Prevent negative zero 53184 return result === 0 ? 0 : result; 53185} 53186 53187// Fallback for modularized imports: 53188/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (differenceInYears); 53189 53190 53191/***/ }), 53192
vendor: 2,755 bytes, lines 53193-53273
53193/***/ "./node_modules/date-fns/eachDayOfInterval.mjs": 53194/*!*****************************************************!*\ 53195 !*** ./node_modules/date-fns/eachDayOfInterval.mjs ***! 53196 \*****************************************************/ 53197/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53198 53199"use strict"; 53200__webpack_require__.r(__webpack_exports__); 53201/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53202/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53203/* harmony export */ eachDayOfInterval: () => (/* binding */ eachDayOfInterval) 53204/* harmony export */ }); 53205/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53206 53207 53208/** 53209 * The {@link eachDayOfInterval} function options. 53210 */ 53211 53212/** 53213 * @name eachDayOfInterval 53214 * @category Interval Helpers 53215 * @summary Return the array of dates within the specified time interval. 53216 * 53217 * @description 53218 * Return the array of dates within the specified time interval. 53219 * 53220 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53221 * 53222 * @param interval - The interval. 53223 * @param options - An object with options. 53224 * 53225 * @returns The array with starts of days from the day of the interval start to the day of the interval end 53226 * 53227 * @example 53228 * // Each day between 6 October 2014 and 10 October 2014: 53229 * const result = eachDayOfInterval({ 53230 * start: new Date(2014, 9, 6), 53231 * end: new Date(2014, 9, 10) 53232 * }) 53233 * //=> [ 53234 * // Mon Oct 06 2014 00:00:00, 53235 * // Tue Oct 07 2014 00:00:00, 53236 * // Wed Oct 08 2014 00:00:00, 53237 * // Thu Oct 09 2014 00:00:00, 53238 * // Fri Oct 10 2014 00:00:00 53239 * // ] 53240 */ 53241function eachDayOfInterval(interval, options) { 53242 const startDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(interval.start); 53243 const endDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(interval.end); 53244 53245 let reversed = +startDate > +endDate; 53246 const endTime = reversed ? +startDate : +endDate; 53247 const currentDate = reversed ? endDate : startDate; 53248 currentDate.setHours(0, 0, 0, 0); 53249 53250 let step = options?.step ?? 1; 53251 if (!step) return []; 53252 if (step < 0) { 53253 step = -step; 53254 reversed = !reversed; 53255 } 53256 53257 const dates = []; 53258 53259 while (+currentDate <= endTime) { 53260 dates.push((0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(currentDate)); 53261 currentDate.setDate(currentDate.getDate() + step); 53262 currentDate.setHours(0, 0, 0, 0); 53263 } 53264 53265 return reversed ? dates.reverse() : dates; 53266} 53267 53268// Fallback for modularized imports: 53269/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (eachDayOfInterval); 53270 53271 53272/***/ }), 53273
vendor: 3,311 bytes, lines 53274-53357
53274/***/ "./node_modules/date-fns/eachQuarterOfInterval.mjs": 53275/*!*********************************************************!*\ 53276 !*** ./node_modules/date-fns/eachQuarterOfInterval.mjs ***! 53277 \*********************************************************/ 53278/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53279 53280"use strict"; 53281__webpack_require__.r(__webpack_exports__); 53282/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53283/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53284/* harmony export */ eachQuarterOfInterval: () => (/* binding */ eachQuarterOfInterval) 53285/* harmony export */ }); 53286/* harmony import */ var _addQuarters_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addQuarters.mjs */ "./node_modules/date-fns/addQuarters.mjs"); 53287/* harmony import */ var _startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./startOfQuarter.mjs */ "./node_modules/date-fns/startOfQuarter.mjs"); 53288/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53289 53290 53291 53292 53293/** 53294 * The {@link eachQuarterOfInterval} function options. 53295 */ 53296 53297/** 53298 * @name eachQuarterOfInterval 53299 * @category Interval Helpers 53300 * @summary Return the array of quarters within the specified time interval. 53301 * 53302 * @description 53303 * Return the array of quarters within the specified time interval. 53304 * 53305 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53306 * 53307 * @param interval - The interval 53308 * 53309 * @returns The array with starts of quarters from the quarter of the interval start to the quarter of the interval end 53310 * 53311 * @example 53312 * // Each quarter within interval 6 February 2014 - 10 August 2014: 53313 * const result = eachQuarterOfInterval({ 53314 * start: new Date(2014, 1, 6), 53315 * end: new Date(2014, 7, 10) 53316 * }) 53317 * //=> [ 53318 * // Wed Jan 01 2014 00:00:00, 53319 * // Tue Apr 01 2014 00:00:00, 53320 * // Tue Jul 01 2014 00:00:00, 53321 * // ] 53322 */ 53323function eachQuarterOfInterval(interval, options) { 53324 const startDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(interval.start); 53325 const endDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(interval.end); 53326 53327 let reversed = +startDate > +endDate; 53328 const endTime = reversed 53329 ? +(0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfQuarter)(startDate) 53330 : +(0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfQuarter)(endDate); 53331 let currentDate = reversed 53332 ? (0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfQuarter)(endDate) 53333 : (0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfQuarter)(startDate); 53334 53335 let step = options?.step ?? 1; 53336 if (!step) return []; 53337 if (step < 0) { 53338 step = -step; 53339 reversed = !reversed; 53340 } 53341 53342 const dates = []; 53343 53344 while (+currentDate <= endTime) { 53345 dates.push((0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(currentDate)); 53346 currentDate = (0,_addQuarters_mjs__WEBPACK_IMPORTED_MODULE_2__.addQuarters)(currentDate, step); 53347 } 53348 53349 return reversed ? dates.reverse() : dates; 53350} 53351 53352// Fallback for modularized imports: 53353/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (eachQuarterOfInterval); 53354 53355 53356/***/ }), 53357
vendor: 1,833 bytes, lines 53358-53407
53358/***/ "./node_modules/date-fns/endOfQuarter.mjs": 53359/*!************************************************!*\ 53360 !*** ./node_modules/date-fns/endOfQuarter.mjs ***! 53361 \************************************************/ 53362/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53363 53364"use strict"; 53365__webpack_require__.r(__webpack_exports__); 53366/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53367/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53368/* harmony export */ endOfQuarter: () => (/* binding */ endOfQuarter) 53369/* harmony export */ }); 53370/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53371 53372 53373/** 53374 * @name endOfQuarter 53375 * @category Quarter Helpers 53376 * @summary Return the end of a year quarter for the given date. 53377 * 53378 * @description 53379 * Return the end of a year quarter for the given date. 53380 * The result will be in the local timezone. 53381 * 53382 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53383 * 53384 * @param date - The original date 53385 * 53386 * @returns The end of a quarter 53387 * 53388 * @example 53389 * // The end of a quarter for 2 September 2014 11:55:00: 53390 * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) 53391 * //=> Tue Sep 30 2014 23:59:59.999 53392 */ 53393function endOfQuarter(date) { 53394 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 53395 const currentMonth = _date.getMonth(); 53396 const month = currentMonth - (currentMonth % 3) + 3; 53397 _date.setMonth(month, 0); 53398 _date.setHours(23, 59, 59, 999); 53399 return _date; 53400} 53401 53402// Fallback for modularized imports: 53403/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (endOfQuarter); 53404 53405 53406/***/ }), 53407
vendor: 2,606 bytes, lines 53408-53478
53408/***/ "./node_modules/date-fns/endOfWeek.mjs": 53409/*!*********************************************!*\ 53410 !*** ./node_modules/date-fns/endOfWeek.mjs ***! 53411 \*********************************************/ 53412/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53413 53414"use strict"; 53415__webpack_require__.r(__webpack_exports__); 53416/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53417/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53418/* harmony export */ endOfWeek: () => (/* binding */ endOfWeek) 53419/* harmony export */ }); 53420/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53421/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 53422 53423 53424 53425/** 53426 * The {@link endOfWeek} function options. 53427 */ 53428 53429/** 53430 * @name endOfWeek 53431 * @category Week Helpers 53432 * @summary Return the end of a week for the given date. 53433 * 53434 * @description 53435 * Return the end of a week for the given date. 53436 * The result will be in the local timezone. 53437 * 53438 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53439 * 53440 * @param date - The original date 53441 * @param options - An object with options 53442 * 53443 * @returns The end of a week 53444 * 53445 * @example 53446 * // The end of a week for 2 September 2014 11:55:00: 53447 * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0)) 53448 * //=> Sat Sep 06 2014 23:59:59.999 53449 * 53450 * @example 53451 * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00: 53452 * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) 53453 * //=> Sun Sep 07 2014 23:59:59.999 53454 */ 53455function endOfWeek(date, options) { 53456 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)(); 53457 const weekStartsOn = 53458 options?.weekStartsOn ?? 53459 options?.locale?.options?.weekStartsOn ?? 53460 defaultOptions.weekStartsOn ?? 53461 defaultOptions.locale?.options?.weekStartsOn ?? 53462 0; 53463 53464 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_1__.toDate)(date); 53465 const day = _date.getDay(); 53466 const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn); 53467 53468 _date.setDate(_date.getDate() + diff); 53469 _date.setHours(23, 59, 59, 999); 53470 return _date; 53471} 53472 53473// Fallback for modularized imports: 53474/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (endOfWeek); 53475 53476 53477/***/ }), 53478
vendor: 1,728 bytes, lines 53479-53527
53479/***/ "./node_modules/date-fns/endOfYear.mjs": 53480/*!*********************************************!*\ 53481 !*** ./node_modules/date-fns/endOfYear.mjs ***! 53482 \*********************************************/ 53483/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53484 53485"use strict"; 53486__webpack_require__.r(__webpack_exports__); 53487/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53488/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53489/* harmony export */ endOfYear: () => (/* binding */ endOfYear) 53490/* harmony export */ }); 53491/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53492 53493 53494/** 53495 * @name endOfYear 53496 * @category Year Helpers 53497 * @summary Return the end of a year for the given date. 53498 * 53499 * @description 53500 * Return the end of a year for the given date. 53501 * The result will be in the local timezone. 53502 * 53503 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53504 * 53505 * @param date - The original date 53506 * 53507 * @returns The end of a year 53508 * 53509 * @example 53510 * // The end of a year for 2 September 2014 11:55:00: 53511 * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 00)) 53512 * //=> Wed Dec 31 2014 23:59:59.999 53513 */ 53514function endOfYear(date) { 53515 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 53516 const year = _date.getFullYear(); 53517 _date.setFullYear(year + 1, 0, 0); 53518 _date.setHours(23, 59, 59, 999); 53519 return _date; 53520} 53521 53522// Fallback for modularized imports: 53523/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (endOfYear); 53524 53525 53526/***/ }), 53527
vendor: 27,413 bytes, lines 53528-53985
53528/***/ "./node_modules/date-fns/format.mjs": 53529/*!******************************************!*\ 53530 !*** ./node_modules/date-fns/format.mjs ***! 53531 \******************************************/ 53532/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53533 53534"use strict"; 53535__webpack_require__.r(__webpack_exports__); 53536/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53537/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53538/* harmony export */ format: () => (/* binding */ format), 53539/* harmony export */ formatDate: () => (/* binding */ format), 53540/* harmony export */ formatters: () => (/* reexport safe */ _lib_format_formatters_mjs__WEBPACK_IMPORTED_MODULE_0__.formatters), 53541/* harmony export */ longFormatters: () => (/* reexport safe */ _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_1__.longFormatters) 53542/* harmony export */ }); 53543/* harmony import */ var _lib_defaultLocale_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_lib/defaultLocale.mjs */ "./node_modules/date-fns/locale/en-US.mjs"); 53544/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 53545/* harmony import */ var _lib_format_formatters_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/format/formatters.mjs */ "./node_modules/date-fns/_lib/format/formatters.mjs"); 53546/* harmony import */ var _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_lib/format/longFormatters.mjs */ "./node_modules/date-fns/_lib/format/longFormatters.mjs"); 53547/* harmony import */ var _lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./_lib/protectedTokens.mjs */ "./node_modules/date-fns/_lib/protectedTokens.mjs"); 53548/* harmony import */ var _isValid_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isValid.mjs */ "./node_modules/date-fns/isValid.mjs"); 53549/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53550 53551 53552 53553 53554 53555 53556 53557 53558// Rexports of internal for libraries to use. 53559// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874 53560 53561 53562// This RegExp consists of three parts separated by `|`: 53563// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token 53564// (one of the certain letters followed by `o`) 53565// - (\w)\1* matches any sequences of the same letter 53566// - '' matches two quote characters in a row 53567// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), 53568// except a single quote symbol, which ends the sequence. 53569// Two quote characters do not end the sequence. 53570// If there is no matching single quote 53571// then the sequence will continue until the end of the string. 53572// - . matches any single character unmatched by previous parts of the RegExps 53573const formattingTokensRegExp = 53574 /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; 53575 53576// This RegExp catches symbols escaped by quotes, and also 53577// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` 53578const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; 53579 53580const escapedStringRegExp = /^'([^]*?)'?$/; 53581const doubleQuoteRegExp = /''/g; 53582const unescapedLatinCharacterRegExp = /[a-zA-Z]/; 53583 53584 53585 53586/** 53587 * The {@link format} function options. 53588 */ 53589 53590/** 53591 * @name format 53592 * @alias formatDate 53593 * @category Common Helpers 53594 * @summary Format the date. 53595 * 53596 * @description 53597 * Return the formatted date string in the given format. The result may vary by locale. 53598 * 53599 * > â ï¸ Please note that the `format` tokens differ from Moment.js and other libraries. 53600 * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53601 * 53602 * The characters wrapped between two single quotes characters (') are escaped. 53603 * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. 53604 * (see the last example) 53605 * 53606 * Format of the string is based on Unicode Technical Standard #35: 53607 * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table 53608 * with a few additions (see note 7 below the table). 53609 * 53610 * Accepted patterns: 53611 * | Unit | Pattern | Result examples | Notes | 53612 * |---------------------------------|---------|-----------------------------------|-------| 53613 * | Era | G..GGG | AD, BC | | 53614 * | | GGGG | Anno Domini, Before Christ | 2 | 53615 * | | GGGGG | A, B | | 53616 * | Calendar year | y | 44, 1, 1900, 2017 | 5 | 53617 * | | yo | 44th, 1st, 0th, 17th | 5,7 | 53618 * | | yy | 44, 01, 00, 17 | 5 | 53619 * | | yyy | 044, 001, 1900, 2017 | 5 | 53620 * | | yyyy | 0044, 0001, 1900, 2017 | 5 | 53621 * | | yyyyy | ... | 3,5 | 53622 * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 | 53623 * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 | 53624 * | | YY | 44, 01, 00, 17 | 5,8 | 53625 * | | YYY | 044, 001, 1900, 2017 | 5 | 53626 * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 | 53627 * | | YYYYY | ... | 3,5 | 53628 * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 | 53629 * | | RR | -43, 00, 01, 1900, 2017 | 5,7 | 53630 * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 | 53631 * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 | 53632 * | | RRRRR | ... | 3,5,7 | 53633 * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 | 53634 * | | uu | -43, 01, 1900, 2017 | 5 | 53635 * | | uuu | -043, 001, 1900, 2017 | 5 | 53636 * | | uuuu | -0043, 0001, 1900, 2017 | 5 | 53637 * | | uuuuu | ... | 3,5 | 53638 * | Quarter (formatting) | Q | 1, 2, 3, 4 | | 53639 * | | Qo | 1st, 2nd, 3rd, 4th | 7 | 53640 * | | QQ | 01, 02, 03, 04 | | 53641 * | | QQQ | Q1, Q2, Q3, Q4 | | 53642 * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | 53643 * | | QQQQQ | 1, 2, 3, 4 | 4 | 53644 * | Quarter (stand-alone) | q | 1, 2, 3, 4 | | 53645 * | | qo | 1st, 2nd, 3rd, 4th | 7 | 53646 * | | qq | 01, 02, 03, 04 | | 53647 * | | qqq | Q1, Q2, Q3, Q4 | | 53648 * | | qqqq | 1st quarter, 2nd quarter, ... | 2 | 53649 * | | qqqqq | 1, 2, 3, 4 | 4 | 53650 * | Month (formatting) | M | 1, 2, ..., 12 | | 53651 * | | Mo | 1st, 2nd, ..., 12th | 7 | 53652 * | | MM | 01, 02, ..., 12 | | 53653 * | | MMM | Jan, Feb, ..., Dec | | 53654 * | | MMMM | January, February, ..., December | 2 | 53655 * | | MMMMM | J, F, ..., D | | 53656 * | Month (stand-alone) | L | 1, 2, ..., 12 | | 53657 * | | Lo | 1st, 2nd, ..., 12th | 7 | 53658 * | | LL | 01, 02, ..., 12 | | 53659 * | | LLL | Jan, Feb, ..., Dec | | 53660 * | | LLLL | January, February, ..., December | 2 | 53661 * | | LLLLL | J, F, ..., D | | 53662 * | Local week of year | w | 1, 2, ..., 53 | | 53663 * | | wo | 1st, 2nd, ..., 53th | 7 | 53664 * | | ww | 01, 02, ..., 53 | | 53665 * | ISO week of year | I | 1, 2, ..., 53 | 7 | 53666 * | | Io | 1st, 2nd, ..., 53th | 7 | 53667 * | | II | 01, 02, ..., 53 | 7 | 53668 * | Day of month | d | 1, 2, ..., 31 | | 53669 * | | do | 1st, 2nd, ..., 31st | 7 | 53670 * | | dd | 01, 02, ..., 31 | | 53671 * | Day of year | D | 1, 2, ..., 365, 366 | 9 | 53672 * | | Do | 1st, 2nd, ..., 365th, 366th | 7 | 53673 * | | DD | 01, 02, ..., 365, 366 | 9 | 53674 * | | DDD | 001, 002, ..., 365, 366 | | 53675 * | | DDDD | ... | 3 | 53676 * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | | 53677 * | | EEEE | Monday, Tuesday, ..., Sunday | 2 | 53678 * | | EEEEE | M, T, W, T, F, S, S | | 53679 * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | 53680 * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 | 53681 * | | io | 1st, 2nd, ..., 7th | 7 | 53682 * | | ii | 01, 02, ..., 07 | 7 | 53683 * | | iii | Mon, Tue, Wed, ..., Sun | 7 | 53684 * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 | 53685 * | | iiiii | M, T, W, T, F, S, S | 7 | 53686 * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 | 53687 * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | | 53688 * | | eo | 2nd, 3rd, ..., 1st | 7 | 53689 * | | ee | 02, 03, ..., 01 | | 53690 * | | eee | Mon, Tue, Wed, ..., Sun | | 53691 * | | eeee | Monday, Tuesday, ..., Sunday | 2 | 53692 * | | eeeee | M, T, W, T, F, S, S | | 53693 * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | 53694 * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | | 53695 * | | co | 2nd, 3rd, ..., 1st | 7 | 53696 * | | cc | 02, 03, ..., 01 | | 53697 * | | ccc | Mon, Tue, Wed, ..., Sun | | 53698 * | | cccc | Monday, Tuesday, ..., Sunday | 2 | 53699 * | | ccccc | M, T, W, T, F, S, S | | 53700 * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | 53701 * | AM, PM | a..aa | AM, PM | | 53702 * | | aaa | am, pm | | 53703 * | | aaaa | a.m., p.m. | 2 | 53704 * | | aaaaa | a, p | | 53705 * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | | 53706 * | | bbb | am, pm, noon, midnight | | 53707 * | | bbbb | a.m., p.m., noon, midnight | 2 | 53708 * | | bbbbb | a, p, n, mi | | 53709 * | Flexible day period | B..BBB | at night, in the morning, ... | | 53710 * | | BBBB | at night, in the morning, ... | 2 | 53711 * | | BBBBB | at night, in the morning, ... | | 53712 * | Hour [1-12] | h | 1, 2, ..., 11, 12 | | 53713 * | | ho | 1st, 2nd, ..., 11th, 12th | 7 | 53714 * | | hh | 01, 02, ..., 11, 12 | | 53715 * | Hour [0-23] | H | 0, 1, 2, ..., 23 | | 53716 * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 | 53717 * | | HH | 00, 01, 02, ..., 23 | | 53718 * | Hour [0-11] | K | 1, 2, ..., 11, 0 | | 53719 * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 | 53720 * | | KK | 01, 02, ..., 11, 00 | | 53721 * | Hour [1-24] | k | 24, 1, 2, ..., 23 | | 53722 * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 | 53723 * | | kk | 24, 01, 02, ..., 23 | | 53724 * | Minute | m | 0, 1, ..., 59 | | 53725 * | | mo | 0th, 1st, ..., 59th | 7 | 53726 * | | mm | 00, 01, ..., 59 | | 53727 * | Second | s | 0, 1, ..., 59 | | 53728 * | | so | 0th, 1st, ..., 59th | 7 | 53729 * | | ss | 00, 01, ..., 59 | | 53730 * | Fraction of second | S | 0, 1, ..., 9 | | 53731 * | | SS | 00, 01, ..., 99 | | 53732 * | | SSS | 000, 001, ..., 999 | | 53733 * | | SSSS | ... | 3 | 53734 * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | | 53735 * | | XX | -0800, +0530, Z | | 53736 * | | XXX | -08:00, +05:30, Z | | 53737 * | | XXXX | -0800, +0530, Z, +123456 | 2 | 53738 * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | 53739 * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | | 53740 * | | xx | -0800, +0530, +0000 | | 53741 * | | xxx | -08:00, +05:30, +00:00 | 2 | 53742 * | | xxxx | -0800, +0530, +0000, +123456 | | 53743 * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | 53744 * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | | 53745 * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 | 53746 * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 | 53747 * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 | 53748 * | Seconds timestamp | t | 512969520 | 7 | 53749 * | | tt | ... | 3,7 | 53750 * | Milliseconds timestamp | T | 512969520900 | 7 | 53751 * | | TT | ... | 3,7 | 53752 * | Long localized date | P | 04/29/1453 | 7 | 53753 * | | PP | Apr 29, 1453 | 7 | 53754 * | | PPP | April 29th, 1453 | 7 | 53755 * | | PPPP | Friday, April 29th, 1453 | 2,7 | 53756 * | Long localized time | p | 12:00 AM | 7 | 53757 * | | pp | 12:00:00 AM | 7 | 53758 * | | ppp | 12:00:00 AM GMT+2 | 7 | 53759 * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 | 53760 * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 | 53761 * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 | 53762 * | | PPPppp | April 29th, 1453 at ... | 7 | 53763 * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 | 53764 * Notes: 53765 * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale 53766 * are the same as "stand-alone" units, but are different in some languages. 53767 * "Formatting" units are declined according to the rules of the language 53768 * in the context of a date. "Stand-alone" units are always nominative singular: 53769 * 53770 * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` 53771 * 53772 * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` 53773 * 53774 * 2. Any sequence of the identical letters is a pattern, unless it is escaped by 53775 * the single quote characters (see below). 53776 * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`) 53777 * the output will be the same as default pattern for this unit, usually 53778 * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units 53779 * are marked with "2" in the last column of the table. 53780 * 53781 * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'` 53782 * 53783 * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'` 53784 * 53785 * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'` 53786 * 53787 * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'` 53788 * 53789 * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'` 53790 * 53791 * 3. Some patterns could be unlimited length (such as `yyyyyyyy`). 53792 * The output will be padded with zeros to match the length of the pattern. 53793 * 53794 * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'` 53795 * 53796 * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. 53797 * These tokens represent the shortest form of the quarter. 53798 * 53799 * 5. The main difference between `y` and `u` patterns are B.C. years: 53800 * 53801 * | Year | `y` | `u` | 53802 * |------|-----|-----| 53803 * | AC 1 | 1 | 1 | 53804 * | BC 1 | 1 | 0 | 53805 * | BC 2 | 2 | -1 | 53806 * 53807 * Also `yy` always returns the last two digits of a year, 53808 * while `uu` pads single digit years to 2 characters and returns other years unchanged: 53809 * 53810 * | Year | `yy` | `uu` | 53811 * |------|------|------| 53812 * | 1 | 01 | 01 | 53813 * | 14 | 14 | 14 | 53814 * | 376 | 76 | 376 | 53815 * | 1453 | 53 | 1453 | 53816 * 53817 * The same difference is true for local and ISO week-numbering years (`Y` and `R`), 53818 * except local week-numbering years are dependent on `options.weekStartsOn` 53819 * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear) 53820 * and [getWeekYear](https://date-fns.org/docs/getWeekYear)). 53821 * 53822 * 6. Specific non-location timezones are currently unavailable in `date-fns`, 53823 * so right now these tokens fall back to GMT timezones. 53824 * 53825 * 7. These patterns are not in the Unicode Technical Standard #35: 53826 * - `i`: ISO day of week 53827 * - `I`: ISO week of year 53828 * - `R`: ISO week-numbering year 53829 * - `t`: seconds timestamp 53830 * - `T`: milliseconds timestamp 53831 * - `o`: ordinal number modifier 53832 * - `P`: long localized date 53833 * - `p`: long localized time 53834 * 53835 * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. 53836 * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53837 * 53838 * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month. 53839 * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53840 * 53841 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 53842 * 53843 * @param date - The original date 53844 * @param format - The string of tokens 53845 * @param options - An object with options 53846 * 53847 * @returns The formatted date string 53848 * 53849 * @throws `date` must not be Invalid Date 53850 * @throws `options.locale` must contain `localize` property 53851 * @throws `options.locale` must contain `formatLong` property 53852 * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53853 * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53854 * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53855 * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 53856 * @throws format string contains an unescaped latin alphabet character 53857 * 53858 * @example 53859 * // Represent 11 February 2014 in middle-endian format: 53860 * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy') 53861 * //=> '02/11/2014' 53862 * 53863 * @example 53864 * // Represent 2 July 2014 in Esperanto: 53865 * import { eoLocale } from 'date-fns/locale/eo' 53866 * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", { 53867 * locale: eoLocale 53868 * }) 53869 * //=> '2-a de julio 2014' 53870 * 53871 * @example 53872 * // Escape string by single quote characters: 53873 * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'") 53874 * //=> "3 o'clock" 53875 */ 53876function format(date, formatStr, options) { 53877 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_2__.getDefaultOptions)(); 53878 const locale = options?.locale ?? defaultOptions.locale ?? _lib_defaultLocale_mjs__WEBPACK_IMPORTED_MODULE_3__.enUS; 53879 53880 const firstWeekContainsDate = 53881 options?.firstWeekContainsDate ?? 53882 options?.locale?.options?.firstWeekContainsDate ?? 53883 defaultOptions.firstWeekContainsDate ?? 53884 defaultOptions.locale?.options?.firstWeekContainsDate ?? 53885 1; 53886 53887 const weekStartsOn = 53888 options?.weekStartsOn ?? 53889 options?.locale?.options?.weekStartsOn ?? 53890 defaultOptions.weekStartsOn ?? 53891 defaultOptions.locale?.options?.weekStartsOn ?? 53892 0; 53893 53894 const originalDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_4__.toDate)(date); 53895 53896 if (!(0,_isValid_mjs__WEBPACK_IMPORTED_MODULE_5__.isValid)(originalDate)) { 53897 throw new RangeError("Invalid time value"); 53898 } 53899 53900 let parts = formatStr 53901 .match(longFormattingTokensRegExp) 53902 .map((substring) => { 53903 const firstCharacter = substring[0]; 53904 if (firstCharacter === "p" || firstCharacter === "P") { 53905 const longFormatter = _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_1__.longFormatters[firstCharacter]; 53906 return longFormatter(substring, locale.formatLong); 53907 } 53908 return substring; 53909 }) 53910 .join("") 53911 .match(formattingTokensRegExp) 53912 .map((substring) => { 53913 // Replace two single quote characters with one single quote character 53914 if (substring === "''") { 53915 return { isToken: false, value: "'" }; 53916 } 53917 53918 const firstCharacter = substring[0]; 53919 if (firstCharacter === "'") { 53920 return { isToken: false, value: cleanEscapedString(substring) }; 53921 } 53922 53923 if (_lib_format_formatters_mjs__WEBPACK_IMPORTED_MODULE_0__.formatters[firstCharacter]) { 53924 return { isToken: true, value: substring }; 53925 } 53926 53927 if (firstCharacter.match(unescapedLatinCharacterRegExp)) { 53928 throw new RangeError( 53929 "Format string contains an unescaped latin alphabet character `" + 53930 firstCharacter + 53931 "`", 53932 ); 53933 } 53934 53935 return { isToken: false, value: substring }; 53936 }); 53937 53938 // invoke localize preprocessor (only for french locales at the moment) 53939 if (locale.localize.preprocessor) { 53940 parts = locale.localize.preprocessor(originalDate, parts); 53941 } 53942 53943 const formatterOptions = { 53944 firstWeekContainsDate, 53945 weekStartsOn, 53946 locale, 53947 }; 53948 53949 return parts 53950 .map((part) => { 53951 if (!part.isToken) return part.value; 53952 53953 const token = part.value; 53954 53955 if ( 53956 (!options?.useAdditionalWeekYearTokens && 53957 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_6__.isProtectedWeekYearToken)(token)) || 53958 (!options?.useAdditionalDayOfYearTokens && 53959 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_6__.isProtectedDayOfYearToken)(token)) 53960 ) { 53961 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_6__.warnOrThrowProtectedError)(token, formatStr, String(date)); 53962 } 53963 53964 const formatter = _lib_format_formatters_mjs__WEBPACK_IMPORTED_MODULE_0__.formatters[token[0]]; 53965 return formatter(originalDate, token, locale.localize, formatterOptions); 53966 }) 53967 .join(""); 53968} 53969 53970function cleanEscapedString(input) { 53971 const matched = input.match(escapedStringRegExp); 53972 53973 if (!matched) { 53974 return input; 53975 } 53976 53977 return matched[1].replace(doubleQuoteRegExp, "'"); 53978} 53979 53980// Fallback for modularized imports: 53981/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (format); 53982 53983 53984/***/ }), 53985
vendor: 1,544 bytes, lines 53986-54031
53986/***/ "./node_modules/date-fns/getDay.mjs": 53987/*!******************************************!*\ 53988 !*** ./node_modules/date-fns/getDay.mjs ***! 53989 \******************************************/ 53990/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53991 53992"use strict"; 53993__webpack_require__.r(__webpack_exports__); 53994/* harmony export */ __webpack_require__.d(__webpack_exports__, { 53995/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 53996/* harmony export */ getDay: () => (/* binding */ getDay) 53997/* harmony export */ }); 53998/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 53999 54000 54001/** 54002 * @name getDay 54003 * @category Weekday Helpers 54004 * @summary Get the day of the week of the given date. 54005 * 54006 * @description 54007 * Get the day of the week of the given date. 54008 * 54009 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54010 * 54011 * @param date - The given date 54012 * 54013 * @returns The day of week, 0 represents Sunday 54014 * 54015 * @example 54016 * // Which day of the week is 29 February 2012? 54017 * const result = getDay(new Date(2012, 1, 29)) 54018 * //=> 3 54019 */ 54020function getDay(date) { 54021 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54022 const day = _date.getDay(); 54023 return day; 54024} 54025 54026// Fallback for modularized imports: 54027/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDay); 54028 54029 54030/***/ }), 54031
vendor: 2,127 bytes, lines 54032-54082
54032/***/ "./node_modules/date-fns/getDayOfYear.mjs": 54033/*!************************************************!*\ 54034 !*** ./node_modules/date-fns/getDayOfYear.mjs ***! 54035 \************************************************/ 54036/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54037 54038"use strict"; 54039__webpack_require__.r(__webpack_exports__); 54040/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54041/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54042/* harmony export */ getDayOfYear: () => (/* binding */ getDayOfYear) 54043/* harmony export */ }); 54044/* harmony import */ var _differenceInCalendarDays_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./differenceInCalendarDays.mjs */ "./node_modules/date-fns/differenceInCalendarDays.mjs"); 54045/* harmony import */ var _startOfYear_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./startOfYear.mjs */ "./node_modules/date-fns/startOfYear.mjs"); 54046/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54047 54048 54049 54050 54051/** 54052 * @name getDayOfYear 54053 * @category Day Helpers 54054 * @summary Get the day of the year of the given date. 54055 * 54056 * @description 54057 * Get the day of the year of the given date. 54058 * 54059 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54060 * 54061 * @param date - The given date 54062 * 54063 * @returns The day of year 54064 * 54065 * @example 54066 * // Which day of the year is 2 July 2014? 54067 * const result = getDayOfYear(new Date(2014, 6, 2)) 54068 * //=> 183 54069 */ 54070function getDayOfYear(date) { 54071 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54072 const diff = (0,_differenceInCalendarDays_mjs__WEBPACK_IMPORTED_MODULE_1__.differenceInCalendarDays)(_date, (0,_startOfYear_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfYear)(_date)); 54073 const dayOfYear = diff + 1; 54074 return dayOfYear; 54075} 54076 54077// Fallback for modularized imports: 54078/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDayOfYear); 54079 54080 54081/***/ }), 54082
vendor: 2,055 bytes, lines 54083-54134
54083/***/ "./node_modules/date-fns/getDaysInMonth.mjs": 54084/*!**************************************************!*\ 54085 !*** ./node_modules/date-fns/getDaysInMonth.mjs ***! 54086 \**************************************************/ 54087/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54088 54089"use strict"; 54090__webpack_require__.r(__webpack_exports__); 54091/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54092/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54093/* harmony export */ getDaysInMonth: () => (/* binding */ getDaysInMonth) 54094/* harmony export */ }); 54095/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54096/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 54097 54098 54099 54100/** 54101 * @name getDaysInMonth 54102 * @category Month Helpers 54103 * @summary Get the number of days in a month of the given date. 54104 * 54105 * @description 54106 * Get the number of days in a month of the given date. 54107 * 54108 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54109 * 54110 * @param date - The given date 54111 * 54112 * @returns The number of days in a month 54113 * 54114 * @example 54115 * // How many days are in February 2000? 54116 * const result = getDaysInMonth(new Date(2000, 1)) 54117 * //=> 29 54118 */ 54119function getDaysInMonth(date) { 54120 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54121 const year = _date.getFullYear(); 54122 const monthIndex = _date.getMonth(); 54123 const lastDayOfMonth = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 54124 lastDayOfMonth.setFullYear(year, monthIndex + 1, 0); 54125 lastDayOfMonth.setHours(0, 0, 0, 0); 54126 return lastDayOfMonth.getDate(); 54127} 54128 54129// Fallback for modularized imports: 54130/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDaysInMonth); 54131 54132 54133/***/ }), 54134
vendor: 1,747 bytes, lines 54135-54183
54135/***/ "./node_modules/date-fns/getDefaultOptions.mjs": 54136/*!*****************************************************!*\ 54137 !*** ./node_modules/date-fns/getDefaultOptions.mjs ***! 54138 \*****************************************************/ 54139/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54140 54141"use strict"; 54142__webpack_require__.r(__webpack_exports__); 54143/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54144/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54145/* harmony export */ getDefaultOptions: () => (/* binding */ getDefaultOptions) 54146/* harmony export */ }); 54147/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 54148 54149 54150/** 54151 * @name getDefaultOptions 54152 * @category Common Helpers 54153 * @summary Get default options. 54154 * @pure false 54155 * 54156 * @description 54157 * Returns an object that contains defaults for 54158 * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate` 54159 * arguments for all functions. 54160 * 54161 * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions). 54162 * 54163 * @returns The default options 54164 * 54165 * @example 54166 * const result = getDefaultOptions() 54167 * //=> {} 54168 * 54169 * @example 54170 * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 }) 54171 * const result = getDefaultOptions() 54172 * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 } 54173 */ 54174function getDefaultOptions() { 54175 return Object.assign({}, (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)()); 54176} 54177 54178// Fallback for modularized imports: 54179/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDefaultOptions); 54180 54181 54182/***/ }), 54183
vendor: 1,530 bytes, lines 54184-54229
54184/***/ "./node_modules/date-fns/getHours.mjs": 54185/*!********************************************!*\ 54186 !*** ./node_modules/date-fns/getHours.mjs ***! 54187 \********************************************/ 54188/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54189 54190"use strict"; 54191__webpack_require__.r(__webpack_exports__); 54192/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54193/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54194/* harmony export */ getHours: () => (/* binding */ getHours) 54195/* harmony export */ }); 54196/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54197 54198 54199/** 54200 * @name getHours 54201 * @category Hour Helpers 54202 * @summary Get the hours of the given date. 54203 * 54204 * @description 54205 * Get the hours of the given date. 54206 * 54207 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54208 * 54209 * @param date - The given date 54210 * 54211 * @returns The hours 54212 * 54213 * @example 54214 * // Get the hours of 29 February 2012 11:45:00: 54215 * const result = getHours(new Date(2012, 1, 29, 11, 45)) 54216 * //=> 11 54217 */ 54218function getHours(date) { 54219 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54220 const hours = _date.getHours(); 54221 return hours; 54222} 54223 54224// Fallback for modularized imports: 54225/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getHours); 54226 54227 54228/***/ }), 54229
vendor: 1,723 bytes, lines 54230-54283
54230/***/ "./node_modules/date-fns/getISODay.mjs": 54231/*!*********************************************!*\ 54232 !*** ./node_modules/date-fns/getISODay.mjs ***! 54233 \*********************************************/ 54234/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54235 54236"use strict"; 54237__webpack_require__.r(__webpack_exports__); 54238/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54239/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54240/* harmony export */ getISODay: () => (/* binding */ getISODay) 54241/* harmony export */ }); 54242/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54243 54244 54245/** 54246 * @name getISODay 54247 * @category Weekday Helpers 54248 * @summary Get the day of the ISO week of the given date. 54249 * 54250 * @description 54251 * Get the day of the ISO week of the given date, 54252 * which is 7 for Sunday, 1 for Monday etc. 54253 * 54254 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 54255 * 54256 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54257 * 54258 * @param date - The given date 54259 * 54260 * @returns The day of ISO week 54261 * 54262 * @example 54263 * // Which day of the ISO week is 26 February 2012? 54264 * const result = getISODay(new Date(2012, 1, 26)) 54265 * //=> 7 54266 */ 54267function getISODay(date) { 54268 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54269 let day = _date.getDay(); 54270 54271 if (day === 0) { 54272 day = 7; 54273 } 54274 54275 return day; 54276} 54277 54278// Fallback for modularized imports: 54279/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getISODay); 54280 54281 54282/***/ }), 54283
vendor: 2,583 bytes, lines 54284-54341
54284/***/ "./node_modules/date-fns/getISOWeek.mjs": 54285/*!**********************************************!*\ 54286 !*** ./node_modules/date-fns/getISOWeek.mjs ***! 54287 \**********************************************/ 54288/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54289 54290"use strict"; 54291__webpack_require__.r(__webpack_exports__); 54292/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54293/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54294/* harmony export */ getISOWeek: () => (/* binding */ getISOWeek) 54295/* harmony export */ }); 54296/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/date-fns/constants.mjs"); 54297/* harmony import */ var _startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./startOfISOWeek.mjs */ "./node_modules/date-fns/startOfISOWeek.mjs"); 54298/* harmony import */ var _startOfISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./startOfISOWeekYear.mjs */ "./node_modules/date-fns/startOfISOWeekYear.mjs"); 54299/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54300 54301 54302 54303 54304 54305/** 54306 * @name getISOWeek 54307 * @category ISO Week Helpers 54308 * @summary Get the ISO week of the given date. 54309 * 54310 * @description 54311 * Get the ISO week of the given date. 54312 * 54313 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 54314 * 54315 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54316 * 54317 * @param date - The given date 54318 * 54319 * @returns The ISO week 54320 * 54321 * @example 54322 * // Which week of the ISO-week numbering year is 2 January 2005? 54323 * const result = getISOWeek(new Date(2005, 0, 2)) 54324 * //=> 53 54325 */ 54326function getISOWeek(date) { 54327 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54328 const diff = +(0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfISOWeek)(_date) - +(0,_startOfISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfISOWeekYear)(_date); 54329 54330 // Round the number of weeks to the nearest integer because the number of 54331 // milliseconds in a week is not constant (e.g. it's different in the week of 54332 // the daylight saving time clock shift). 54333 return Math.round(diff / _constants_mjs__WEBPACK_IMPORTED_MODULE_3__.millisecondsInWeek) + 1; 54334} 54335 54336// Fallback for modularized imports: 54337/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getISOWeek); 54338 54339 54340/***/ }), 54341
vendor: 2,996 bytes, lines 54342-54411
54342/***/ "./node_modules/date-fns/getISOWeekYear.mjs": 54343/*!**************************************************!*\ 54344 !*** ./node_modules/date-fns/getISOWeekYear.mjs ***! 54345 \**************************************************/ 54346/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54347 54348"use strict"; 54349__webpack_require__.r(__webpack_exports__); 54350/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54351/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54352/* harmony export */ getISOWeekYear: () => (/* binding */ getISOWeekYear) 54353/* harmony export */ }); 54354/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 54355/* harmony import */ var _startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./startOfISOWeek.mjs */ "./node_modules/date-fns/startOfISOWeek.mjs"); 54356/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54357 54358 54359 54360 54361/** 54362 * @name getISOWeekYear 54363 * @category ISO Week-Numbering Year Helpers 54364 * @summary Get the ISO week-numbering year of the given date. 54365 * 54366 * @description 54367 * Get the ISO week-numbering year of the given date, 54368 * which always starts 3 days before the year's first Thursday. 54369 * 54370 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 54371 * 54372 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54373 * 54374 * @param date - The given date 54375 * 54376 * @returns The ISO week-numbering year 54377 * 54378 * @example 54379 * // Which ISO-week numbering year is 2 January 2005? 54380 * const result = getISOWeekYear(new Date(2005, 0, 2)) 54381 * //=> 2004 54382 */ 54383function getISOWeekYear(date) { 54384 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54385 const year = _date.getFullYear(); 54386 54387 const fourthOfJanuaryOfNextYear = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 54388 fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); 54389 fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); 54390 const startOfNextYear = (0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfISOWeek)(fourthOfJanuaryOfNextYear); 54391 54392 const fourthOfJanuaryOfThisYear = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 54393 fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); 54394 fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); 54395 const startOfThisYear = (0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfISOWeek)(fourthOfJanuaryOfThisYear); 54396 54397 if (_date.getTime() >= startOfNextYear.getTime()) { 54398 return year + 1; 54399 } else if (_date.getTime() >= startOfThisYear.getTime()) { 54400 return year; 54401 } else { 54402 return year - 1; 54403 } 54404} 54405 54406// Fallback for modularized imports: 54407/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getISOWeekYear); 54408 54409 54410/***/ }), 54411
vendor: 1,569 bytes, lines 54412-54457
54412/***/ "./node_modules/date-fns/getMinutes.mjs": 54413/*!**********************************************!*\ 54414 !*** ./node_modules/date-fns/getMinutes.mjs ***! 54415 \**********************************************/ 54416/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54417 54418"use strict"; 54419__webpack_require__.r(__webpack_exports__); 54420/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54421/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54422/* harmony export */ getMinutes: () => (/* binding */ getMinutes) 54423/* harmony export */ }); 54424/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54425 54426 54427/** 54428 * @name getMinutes 54429 * @category Minute Helpers 54430 * @summary Get the minutes of the given date. 54431 * 54432 * @description 54433 * Get the minutes of the given date. 54434 * 54435 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54436 * 54437 * @param date - The given date 54438 * 54439 * @returns The minutes 54440 * 54441 * @example 54442 * // Get the minutes of 29 February 2012 11:45:05: 54443 * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5)) 54444 * //=> 45 54445 */ 54446function getMinutes(date) { 54447 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54448 const minutes = _date.getMinutes(); 54449 return minutes; 54450} 54451 54452// Fallback for modularized imports: 54453/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getMinutes); 54454 54455 54456/***/ }), 54457
vendor: 1,524 bytes, lines 54458-54503
54458/***/ "./node_modules/date-fns/getMonth.mjs": 54459/*!********************************************!*\ 54460 !*** ./node_modules/date-fns/getMonth.mjs ***! 54461 \********************************************/ 54462/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54463 54464"use strict"; 54465__webpack_require__.r(__webpack_exports__); 54466/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54467/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54468/* harmony export */ getMonth: () => (/* binding */ getMonth) 54469/* harmony export */ }); 54470/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54471 54472 54473/** 54474 * @name getMonth 54475 * @category Month Helpers 54476 * @summary Get the month of the given date. 54477 * 54478 * @description 54479 * Get the month of the given date. 54480 * 54481 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54482 * 54483 * @param date - The given date 54484 * 54485 * @returns The month index (0-11) 54486 * 54487 * @example 54488 * // Which month is 29 February 2012? 54489 * const result = getMonth(new Date(2012, 1, 29)) 54490 * //=> 1 54491 */ 54492function getMonth(date) { 54493 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54494 const month = _date.getMonth(); 54495 return month; 54496} 54497 54498// Fallback for modularized imports: 54499/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getMonth); 54500 54501 54502/***/ }), 54503
vendor: 1,569 bytes, lines 54504-54549
54504/***/ "./node_modules/date-fns/getQuarter.mjs": 54505/*!**********************************************!*\ 54506 !*** ./node_modules/date-fns/getQuarter.mjs ***! 54507 \**********************************************/ 54508/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54509 54510"use strict"; 54511__webpack_require__.r(__webpack_exports__); 54512/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54513/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54514/* harmony export */ getQuarter: () => (/* binding */ getQuarter) 54515/* harmony export */ }); 54516/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54517 54518 54519/** 54520 * @name getQuarter 54521 * @category Quarter Helpers 54522 * @summary Get the year quarter of the given date. 54523 * 54524 * @description 54525 * Get the year quarter of the given date. 54526 * 54527 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54528 * 54529 * @param date - The given date 54530 * 54531 * @returns The quarter 54532 * 54533 * @example 54534 * // Which quarter is 2 July 2014? 54535 * const result = getQuarter(new Date(2014, 6, 2)) 54536 * //=> 3 54537 */ 54538function getQuarter(date) { 54539 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54540 const quarter = Math.trunc(_date.getMonth() / 3) + 1; 54541 return quarter; 54542} 54543 54544// Fallback for modularized imports: 54545/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getQuarter); 54546 54547 54548/***/ }), 54549
vendor: 1,577 bytes, lines 54550-54595
54550/***/ "./node_modules/date-fns/getSeconds.mjs": 54551/*!**********************************************!*\ 54552 !*** ./node_modules/date-fns/getSeconds.mjs ***! 54553 \**********************************************/ 54554/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54555 54556"use strict"; 54557__webpack_require__.r(__webpack_exports__); 54558/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54559/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54560/* harmony export */ getSeconds: () => (/* binding */ getSeconds) 54561/* harmony export */ }); 54562/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54563 54564 54565/** 54566 * @name getSeconds 54567 * @category Second Helpers 54568 * @summary Get the seconds of the given date. 54569 * 54570 * @description 54571 * Get the seconds of the given date. 54572 * 54573 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54574 * 54575 * @param date - The given date 54576 * 54577 * @returns The seconds 54578 * 54579 * @example 54580 * // Get the seconds of 29 February 2012 11:45:05.123: 54581 * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123)) 54582 * //=> 5 54583 */ 54584function getSeconds(date) { 54585 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54586 const seconds = _date.getSeconds(); 54587 return seconds; 54588} 54589 54590// Fallback for modularized imports: 54591/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSeconds); 54592 54593 54594/***/ }), 54595
vendor: 3,255 bytes, lines 54596-54673
54596/***/ "./node_modules/date-fns/getWeek.mjs": 54597/*!*******************************************!*\ 54598 !*** ./node_modules/date-fns/getWeek.mjs ***! 54599 \*******************************************/ 54600/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54601 54602"use strict"; 54603__webpack_require__.r(__webpack_exports__); 54604/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54605/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54606/* harmony export */ getWeek: () => (/* binding */ getWeek) 54607/* harmony export */ }); 54608/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/date-fns/constants.mjs"); 54609/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 54610/* harmony import */ var _startOfWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./startOfWeekYear.mjs */ "./node_modules/date-fns/startOfWeekYear.mjs"); 54611/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54612 54613 54614 54615 54616 54617/** 54618 * The {@link getWeek} function options. 54619 */ 54620 54621/** 54622 * @name getWeek 54623 * @category Week Helpers 54624 * @summary Get the local week index of the given date. 54625 * 54626 * @description 54627 * Get the local week index of the given date. 54628 * The exact calculation depends on the values of 54629 * `options.weekStartsOn` (which is the index of the first day of the week) 54630 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 54631 * the first week of the week-numbering year) 54632 * 54633 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 54634 * 54635 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54636 * 54637 * @param date - The given date 54638 * @param options - An object with options 54639 * 54640 * @returns The week 54641 * 54642 * @example 54643 * // Which week of the local week numbering year is 2 January 2005 with default options? 54644 * const result = getWeek(new Date(2005, 0, 2)) 54645 * //=> 2 54646 * 54647 * @example 54648 * // Which week of the local week numbering year is 2 January 2005, 54649 * // if Monday is the first day of the week, 54650 * // and the first week of the year always contains 4 January? 54651 * const result = getWeek(new Date(2005, 0, 2), { 54652 * weekStartsOn: 1, 54653 * firstWeekContainsDate: 4 54654 * }) 54655 * //=> 53 54656 */ 54657 54658function getWeek(date, options) { 54659 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54660 const diff = +(0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_1__.startOfWeek)(_date, options) - +(0,_startOfWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfWeekYear)(_date, options); 54661 54662 // Round the number of weeks to the nearest integer because the number of 54663 // milliseconds in a week is not constant (e.g. it's different in the week of 54664 // the daylight saving time clock shift). 54665 return Math.round(diff / _constants_mjs__WEBPACK_IMPORTED_MODULE_3__.millisecondsInWeek) + 1; 54666} 54667 54668// Fallback for modularized imports: 54669/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getWeek); 54670 54671 54672/***/ }), 54673
vendor: 4,206 bytes, lines 54674-54771
54674/***/ "./node_modules/date-fns/getWeekYear.mjs": 54675/*!***********************************************!*\ 54676 !*** ./node_modules/date-fns/getWeekYear.mjs ***! 54677 \***********************************************/ 54678/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54679 54680"use strict"; 54681__webpack_require__.r(__webpack_exports__); 54682/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54683/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54684/* harmony export */ getWeekYear: () => (/* binding */ getWeekYear) 54685/* harmony export */ }); 54686/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 54687/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 54688/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54689/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 54690 54691 54692 54693 54694 54695/** 54696 * The {@link getWeekYear} function options. 54697 */ 54698 54699/** 54700 * @name getWeekYear 54701 * @category Week-Numbering Year Helpers 54702 * @summary Get the local week-numbering year of the given date. 54703 * 54704 * @description 54705 * Get the local week-numbering year of the given date. 54706 * The exact calculation depends on the values of 54707 * `options.weekStartsOn` (which is the index of the first day of the week) 54708 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 54709 * the first week of the week-numbering year) 54710 * 54711 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 54712 * 54713 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54714 * 54715 * @param date - The given date 54716 * @param options - An object with options. 54717 * 54718 * @returns The local week-numbering year 54719 * 54720 * @example 54721 * // Which week numbering year is 26 December 2004 with the default settings? 54722 * const result = getWeekYear(new Date(2004, 11, 26)) 54723 * //=> 2005 54724 * 54725 * @example 54726 * // Which week numbering year is 26 December 2004 if week starts on Saturday? 54727 * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 }) 54728 * //=> 2004 54729 * 54730 * @example 54731 * // Which week numbering year is 26 December 2004 if the first week contains 4 January? 54732 * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 }) 54733 * //=> 2004 54734 */ 54735function getWeekYear(date, options) { 54736 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54737 const year = _date.getFullYear(); 54738 54739 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_1__.getDefaultOptions)(); 54740 const firstWeekContainsDate = 54741 options?.firstWeekContainsDate ?? 54742 options?.locale?.options?.firstWeekContainsDate ?? 54743 defaultOptions.firstWeekContainsDate ?? 54744 defaultOptions.locale?.options?.firstWeekContainsDate ?? 54745 1; 54746 54747 const firstWeekOfNextYear = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, 0); 54748 firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); 54749 firstWeekOfNextYear.setHours(0, 0, 0, 0); 54750 const startOfNextYear = (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(firstWeekOfNextYear, options); 54751 54752 const firstWeekOfThisYear = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, 0); 54753 firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); 54754 firstWeekOfThisYear.setHours(0, 0, 0, 0); 54755 const startOfThisYear = (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(firstWeekOfThisYear, options); 54756 54757 if (_date.getTime() >= startOfNextYear.getTime()) { 54758 return year + 1; 54759 } else if (_date.getTime() >= startOfThisYear.getTime()) { 54760 return year; 54761 } else { 54762 return year - 1; 54763 } 54764} 54765 54766// Fallback for modularized imports: 54767/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getWeekYear); 54768 54769 54770/***/ }), 54771
vendor: 1,450 bytes, lines 54772-54815
54772/***/ "./node_modules/date-fns/getYear.mjs": 54773/*!*******************************************!*\ 54774 !*** ./node_modules/date-fns/getYear.mjs ***! 54775 \*******************************************/ 54776/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54777 54778"use strict"; 54779__webpack_require__.r(__webpack_exports__); 54780/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54781/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54782/* harmony export */ getYear: () => (/* binding */ getYear) 54783/* harmony export */ }); 54784/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54785 54786 54787/** 54788 * @name getYear 54789 * @category Year Helpers 54790 * @summary Get the year of the given date. 54791 * 54792 * @description 54793 * Get the year of the given date. 54794 * 54795 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54796 * 54797 * @param date - The given date 54798 * 54799 * @returns The year 54800 * 54801 * @example 54802 * // Which year is 2 July 2014? 54803 * const result = getYear(new Date(2014, 6, 2)) 54804 * //=> 2014 54805 */ 54806function getYear(date) { 54807 return (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date).getFullYear(); 54808} 54809 54810// Fallback for modularized imports: 54811/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getYear); 54812 54813 54814/***/ }), 54815
vendor: 1,785 bytes, lines 54816-54862
54816/***/ "./node_modules/date-fns/isAfter.mjs": 54817/*!*******************************************!*\ 54818 !*** ./node_modules/date-fns/isAfter.mjs ***! 54819 \*******************************************/ 54820/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54821 54822"use strict"; 54823__webpack_require__.r(__webpack_exports__); 54824/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54825/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54826/* harmony export */ isAfter: () => (/* binding */ isAfter) 54827/* harmony export */ }); 54828/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54829 54830 54831/** 54832 * @name isAfter 54833 * @category Common Helpers 54834 * @summary Is the first date after the second one? 54835 * 54836 * @description 54837 * Is the first date after the second one? 54838 * 54839 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54840 * 54841 * @param date - The date that should be after the other one to return true 54842 * @param dateToCompare - The date to compare with 54843 * 54844 * @returns The first date is after the second date 54845 * 54846 * @example 54847 * // Is 10 July 1989 after 11 February 1987? 54848 * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11)) 54849 * //=> true 54850 */ 54851function isAfter(date, dateToCompare) { 54852 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54853 const _dateToCompare = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateToCompare); 54854 return _date.getTime() > _dateToCompare.getTime(); 54855} 54856 54857// Fallback for modularized imports: 54858/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isAfter); 54859 54860 54861/***/ }), 54862
vendor: 1,783 bytes, lines 54863-54909
54863/***/ "./node_modules/date-fns/isBefore.mjs": 54864/*!********************************************!*\ 54865 !*** ./node_modules/date-fns/isBefore.mjs ***! 54866 \********************************************/ 54867/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54868 54869"use strict"; 54870__webpack_require__.r(__webpack_exports__); 54871/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54872/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54873/* harmony export */ isBefore: () => (/* binding */ isBefore) 54874/* harmony export */ }); 54875/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54876 54877 54878/** 54879 * @name isBefore 54880 * @category Common Helpers 54881 * @summary Is the first date before the second one? 54882 * 54883 * @description 54884 * Is the first date before the second one? 54885 * 54886 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54887 * 54888 * @param date - The date that should be before the other one to return true 54889 * @param dateToCompare - The date to compare with 54890 * 54891 * @returns The first date is before the second date 54892 * 54893 * @example 54894 * // Is 10 July 1989 before 11 February 1987? 54895 * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11)) 54896 * //=> false 54897 */ 54898function isBefore(date, dateToCompare) { 54899 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 54900 const _dateToCompare = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(dateToCompare); 54901 return +_date < +_dateToCompare; 54902} 54903 54904// Fallback for modularized imports: 54905/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isBefore); 54906 54907 54908/***/ }), 54909
vendor: 1,523 bytes, lines 54910-54967
54910/***/ "./node_modules/date-fns/isDate.mjs": 54911/*!******************************************!*\ 54912 !*** ./node_modules/date-fns/isDate.mjs ***! 54913 \******************************************/ 54914/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54915 54916"use strict"; 54917__webpack_require__.r(__webpack_exports__); 54918/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54919/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54920/* harmony export */ isDate: () => (/* binding */ isDate) 54921/* harmony export */ }); 54922/** 54923 * @name isDate 54924 * @category Common Helpers 54925 * @summary Is the given value a date? 54926 * 54927 * @description 54928 * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes. 54929 * 54930 * @param value - The value to check 54931 * 54932 * @returns True if the given value is a date 54933 * 54934 * @example 54935 * // For a valid date: 54936 * const result = isDate(new Date()) 54937 * //=> true 54938 * 54939 * @example 54940 * // For an invalid date: 54941 * const result = isDate(new Date(NaN)) 54942 * //=> true 54943 * 54944 * @example 54945 * // For some value: 54946 * const result = isDate('2014-02-31') 54947 * //=> false 54948 * 54949 * @example 54950 * // For an object: 54951 * const result = isDate({}) 54952 * //=> false 54953 */ 54954function isDate(value) { 54955 return ( 54956 value instanceof Date || 54957 (typeof value === "object" && 54958 Object.prototype.toString.call(value) === "[object Date]") 54959 ); 54960} 54961 54962// Fallback for modularized imports: 54963/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isDate); 54964 54965 54966/***/ }), 54967
vendor: 1,761 bytes, lines 54968-55017
54968/***/ "./node_modules/date-fns/isEqual.mjs": 54969/*!*******************************************!*\ 54970 !*** ./node_modules/date-fns/isEqual.mjs ***! 54971 \*******************************************/ 54972/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 54973 54974"use strict"; 54975__webpack_require__.r(__webpack_exports__); 54976/* harmony export */ __webpack_require__.d(__webpack_exports__, { 54977/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 54978/* harmony export */ isEqual: () => (/* binding */ isEqual) 54979/* harmony export */ }); 54980/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 54981 54982 54983/** 54984 * @name isEqual 54985 * @category Common Helpers 54986 * @summary Are the given dates equal? 54987 * 54988 * @description 54989 * Are the given dates equal? 54990 * 54991 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 54992 * 54993 * @param dateLeft - The first date to compare 54994 * @param dateRight - The second date to compare 54995 * 54996 * @returns The dates are equal 54997 * 54998 * @example 54999 * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal? 55000 * const result = isEqual( 55001 * new Date(2014, 6, 2, 6, 30, 45, 0), 55002 * new Date(2014, 6, 2, 6, 30, 45, 500) 55003 * ) 55004 * //=> false 55005 */ 55006function isEqual(leftDate, rightDate) { 55007 const _dateLeft = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(leftDate); 55008 const _dateRight = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(rightDate); 55009 return +_dateLeft === +_dateRight; 55010} 55011 55012// Fallback for modularized imports: 55013/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isEqual); 55014 55015 55016/***/ }), 55017
vendor: 2,116 bytes, lines 55018-55070
55018/***/ "./node_modules/date-fns/isSameQuarter.mjs": 55019/*!*************************************************!*\ 55020 !*** ./node_modules/date-fns/isSameQuarter.mjs ***! 55021 \*************************************************/ 55022/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55023 55024"use strict"; 55025__webpack_require__.r(__webpack_exports__); 55026/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55027/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 55028/* harmony export */ isSameQuarter: () => (/* binding */ isSameQuarter) 55029/* harmony export */ }); 55030/* harmony import */ var _startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./startOfQuarter.mjs */ "./node_modules/date-fns/startOfQuarter.mjs"); 55031 55032 55033/** 55034 * @name isSameQuarter 55035 * @category Quarter Helpers 55036 * @summary Are the given dates in the same quarter (and year)? 55037 * 55038 * @description 55039 * Are the given dates in the same quarter (and year)? 55040 * 55041 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 55042 * 55043 * @param dateLeft - The first date to check 55044 * @param dateRight - The second date to check 55045 55046 * @returns The dates are in the same quarter (and year) 55047 * 55048 * @example 55049 * // Are 1 January 2014 and 8 March 2014 in the same quarter? 55050 * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8)) 55051 * //=> true 55052 * 55053 * @example 55054 * // Are 1 January 2014 and 1 January 2015 in the same quarter? 55055 * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1)) 55056 * //=> false 55057 */ 55058function isSameQuarter(dateLeft, dateRight) { 55059 const dateLeftStartOfQuarter = (0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_0__.startOfQuarter)(dateLeft); 55060 const dateRightStartOfQuarter = (0,_startOfQuarter_mjs__WEBPACK_IMPORTED_MODULE_0__.startOfQuarter)(dateRight); 55061 55062 return +dateLeftStartOfQuarter === +dateRightStartOfQuarter; 55063} 55064 55065// Fallback for modularized imports: 55066/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSameQuarter); 55067 55068 55069/***/ }), 55070
vendor: 2,190 bytes, lines 55071-55134
55071/***/ "./node_modules/date-fns/isValid.mjs": 55072/*!*******************************************!*\ 55073 !*** ./node_modules/date-fns/isValid.mjs ***! 55074 \*******************************************/ 55075/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55076 55077"use strict"; 55078__webpack_require__.r(__webpack_exports__); 55079/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55080/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 55081/* harmony export */ isValid: () => (/* binding */ isValid) 55082/* harmony export */ }); 55083/* harmony import */ var _isDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isDate.mjs */ "./node_modules/date-fns/isDate.mjs"); 55084/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 55085 55086 55087 55088/** 55089 * @name isValid 55090 * @category Common Helpers 55091 * @summary Is the given date valid? 55092 * 55093 * @description 55094 * Returns false if argument is Invalid Date and true otherwise. 55095 * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate) 55096 * Invalid Date is a Date, whose time value is NaN. 55097 * 55098 * Time value of Date: http://es5.github.io/#x15.9.1.1 55099 * 55100 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 55101 * 55102 * @param date - The date to check 55103 * 55104 * @returns The date is valid 55105 * 55106 * @example 55107 * // For the valid date: 55108 * const result = isValid(new Date(2014, 1, 31)) 55109 * //=> true 55110 * 55111 * @example 55112 * // For the value, convertable into a date: 55113 * const result = isValid(1393804800000) 55114 * //=> true 55115 * 55116 * @example 55117 * // For the invalid date: 55118 * const result = isValid(new Date('')) 55119 * //=> false 55120 */ 55121function isValid(date) { 55122 if (!(0,_isDate_mjs__WEBPACK_IMPORTED_MODULE_0__.isDate)(date) && typeof date !== "number") { 55123 return false; 55124 } 55125 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_1__.toDate)(date); 55126 return !isNaN(Number(_date)); 55127} 55128 55129// Fallback for modularized imports: 55130/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isValid); 55131 55132 55133/***/ }), 55134
vendor: 887 bytes, lines 55135-55157
55135/***/ "./node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs": 55136/*!*****************************************************************!*\ 55137 !*** ./node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs ***! 55138 \*****************************************************************/ 55139/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55140 55141"use strict"; 55142__webpack_require__.r(__webpack_exports__); 55143/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55144/* harmony export */ buildFormatLongFn: () => (/* binding */ buildFormatLongFn) 55145/* harmony export */ }); 55146function buildFormatLongFn(args) { 55147 return (options = {}) => { 55148 // TODO: Remove String() 55149 const width = options.width ? String(options.width) : args.defaultWidth; 55150 const format = args.formats[width] || args.formats[args.defaultWidth]; 55151 return format; 55152 }; 55153} 55154 55155 55156/***/ }), 55157
vendor: 2,405 bytes, lines 55158-55236
55158/***/ "./node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs": 55159/*!***************************************************************!*\ 55160 !*** ./node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs ***! 55161 \***************************************************************/ 55162/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55163 55164"use strict"; 55165__webpack_require__.r(__webpack_exports__); 55166/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55167/* harmony export */ buildLocalizeFn: () => (/* binding */ buildLocalizeFn) 55168/* harmony export */ }); 55169/* eslint-disable no-unused-vars */ 55170 55171/** 55172 * The localize function argument callback which allows to convert raw value to 55173 * the actual type. 55174 * 55175 * @param value - The value to convert 55176 * 55177 * @returns The converted value 55178 */ 55179 55180/** 55181 * The map of localized values for each width. 55182 */ 55183 55184/** 55185 * The index type of the locale unit value. It types conversion of units of 55186 * values that don't start at 0 (i.e. quarters). 55187 */ 55188 55189/** 55190 * Converts the unit value to the tuple of values. 55191 */ 55192 55193/** 55194 * The tuple of localized era values. The first element represents BC, 55195 * the second element represents AD. 55196 */ 55197 55198/** 55199 * The tuple of localized quarter values. The first element represents Q1. 55200 */ 55201 55202/** 55203 * The tuple of localized day values. The first element represents Sunday. 55204 */ 55205 55206/** 55207 * The tuple of localized month values. The first element represents January. 55208 */ 55209 55210function buildLocalizeFn(args) { 55211 return (value, options) => { 55212 const context = options?.context ? String(options.context) : "standalone"; 55213 55214 let valuesArray; 55215 if (context === "formatting" && args.formattingValues) { 55216 const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; 55217 const width = options?.width ? String(options.width) : defaultWidth; 55218 55219 valuesArray = 55220 args.formattingValues[width] || args.formattingValues[defaultWidth]; 55221 } else { 55222 const defaultWidth = args.defaultWidth; 55223 const width = options?.width ? String(options.width) : args.defaultWidth; 55224 55225 valuesArray = args.values[width] || args.values[defaultWidth]; 55226 } 55227 const index = args.argumentCallback ? args.argumentCallback(value) : value; 55228 55229 // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it! 55230 return valuesArray[index]; 55231 }; 55232} 55233 55234 55235/***/ }), 55236
vendor: 2,135 bytes, lines 55237-55308
55237/***/ "./node_modules/date-fns/locale/_lib/buildMatchFn.mjs": 55238/*!************************************************************!*\ 55239 !*** ./node_modules/date-fns/locale/_lib/buildMatchFn.mjs ***! 55240 \************************************************************/ 55241/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55242 55243"use strict"; 55244__webpack_require__.r(__webpack_exports__); 55245/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55246/* harmony export */ buildMatchFn: () => (/* binding */ buildMatchFn) 55247/* harmony export */ }); 55248function buildMatchFn(args) { 55249 return (string, options = {}) => { 55250 const width = options.width; 55251 55252 const matchPattern = 55253 (width && args.matchPatterns[width]) || 55254 args.matchPatterns[args.defaultMatchWidth]; 55255 const matchResult = string.match(matchPattern); 55256 55257 if (!matchResult) { 55258 return null; 55259 } 55260 const matchedString = matchResult[0]; 55261 55262 const parsePatterns = 55263 (width && args.parsePatterns[width]) || 55264 args.parsePatterns[args.defaultParseWidth]; 55265 55266 const key = Array.isArray(parsePatterns) 55267 ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) 55268 : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type 55269 findKey(parsePatterns, (pattern) => pattern.test(matchedString)); 55270 55271 let value; 55272 55273 value = args.valueCallback ? args.valueCallback(key) : key; 55274 value = options.valueCallback 55275 ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type 55276 options.valueCallback(value) 55277 : value; 55278 55279 const rest = string.slice(matchedString.length); 55280 55281 return { value, rest }; 55282 }; 55283} 55284 55285function findKey(object, predicate) { 55286 for (const key in object) { 55287 if ( 55288 Object.prototype.hasOwnProperty.call(object, key) && 55289 predicate(object[key]) 55290 ) { 55291 return key; 55292 } 55293 } 55294 return undefined; 55295} 55296 55297function findIndex(array, predicate) { 55298 for (let key = 0; key < array.length; key++) { 55299 if (predicate(array[key])) { 55300 return key; 55301 } 55302 } 55303 return undefined; 55304} 55305 55306 55307/***/ }), 55308
vendor: 1,298 bytes, lines 55309-55343
55309/***/ "./node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs": 55310/*!*******************************************************************!*\ 55311 !*** ./node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs ***! 55312 \*******************************************************************/ 55313/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55314 55315"use strict"; 55316__webpack_require__.r(__webpack_exports__); 55317/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55318/* harmony export */ buildMatchPatternFn: () => (/* binding */ buildMatchPatternFn) 55319/* harmony export */ }); 55320function buildMatchPatternFn(args) { 55321 return (string, options = {}) => { 55322 const matchResult = string.match(args.matchPattern); 55323 if (!matchResult) return null; 55324 const matchedString = matchResult[0]; 55325 55326 const parseResult = string.match(args.parsePattern); 55327 if (!parseResult) return null; 55328 let value = args.valueCallback 55329 ? args.valueCallback(parseResult[0]) 55330 : parseResult[0]; 55331 55332 // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type 55333 value = options.valueCallback ? options.valueCallback(value) : value; 55334 55335 const rest = string.slice(matchedString.length); 55336 55337 return { value, rest }; 55338 }; 55339} 55340 55341 55342/***/ }), 55343
vendor: 2,470 bytes, lines 55344-55393
55344/***/ "./node_modules/date-fns/locale/en-US.mjs": 55345/*!************************************************!*\ 55346 !*** ./node_modules/date-fns/locale/en-US.mjs ***! 55347 \************************************************/ 55348/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55349 55350"use strict"; 55351__webpack_require__.r(__webpack_exports__); 55352/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55353/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 55354/* harmony export */ enUS: () => (/* binding */ enUS) 55355/* harmony export */ }); 55356/* harmony import */ var _en_US_lib_formatDistance_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./en-US/_lib/formatDistance.mjs */ "./node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs"); 55357/* harmony import */ var _en_US_lib_formatLong_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./en-US/_lib/formatLong.mjs */ "./node_modules/date-fns/locale/en-US/_lib/formatLong.mjs"); 55358/* harmony import */ var _en_US_lib_formatRelative_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./en-US/_lib/formatRelative.mjs */ "./node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs"); 55359/* harmony import */ var _en_US_lib_localize_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./en-US/_lib/localize.mjs */ "./node_modules/date-fns/locale/en-US/_lib/localize.mjs"); 55360/* harmony import */ var _en_US_lib_match_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./en-US/_lib/match.mjs */ "./node_modules/date-fns/locale/en-US/_lib/match.mjs"); 55361 55362 55363 55364 55365 55366 55367/** 55368 * @category Locales 55369 * @summary English locale (United States). 55370 * @language English 55371 * @iso-639-2 eng 55372 * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp) 55373 * @author Lesha Koss [@leshakoss](https://github.com/leshakoss) 55374 */ 55375const enUS = { 55376 code: "en-US", 55377 formatDistance: _en_US_lib_formatDistance_mjs__WEBPACK_IMPORTED_MODULE_0__.formatDistance, 55378 formatLong: _en_US_lib_formatLong_mjs__WEBPACK_IMPORTED_MODULE_1__.formatLong, 55379 formatRelative: _en_US_lib_formatRelative_mjs__WEBPACK_IMPORTED_MODULE_2__.formatRelative, 55380 localize: _en_US_lib_localize_mjs__WEBPACK_IMPORTED_MODULE_3__.localize, 55381 match: _en_US_lib_match_mjs__WEBPACK_IMPORTED_MODULE_4__.match, 55382 options: { 55383 weekStartsOn: 0 /* Sunday */, 55384 firstWeekContainsDate: 1, 55385 }, 55386}; 55387 55388// Fallback for modularized imports: 55389/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (enUS); 55390 55391 55392/***/ }), 55393
vendor: 2,391 bytes, lines 55394-55509
55394/***/ "./node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs": 55395/*!********************************************************************!*\ 55396 !*** ./node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs ***! 55397 \********************************************************************/ 55398/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55399 55400"use strict"; 55401__webpack_require__.r(__webpack_exports__); 55402/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55403/* harmony export */ formatDistance: () => (/* binding */ formatDistance) 55404/* harmony export */ }); 55405const formatDistanceLocale = { 55406 lessThanXSeconds: { 55407 one: "less than a second", 55408 other: "less than {{count}} seconds", 55409 }, 55410 55411 xSeconds: { 55412 one: "1 second", 55413 other: "{{count}} seconds", 55414 }, 55415 55416 halfAMinute: "half a minute", 55417 55418 lessThanXMinutes: { 55419 one: "less than a minute", 55420 other: "less than {{count}} minutes", 55421 }, 55422 55423 xMinutes: { 55424 one: "1 minute", 55425 other: "{{count}} minutes", 55426 }, 55427 55428 aboutXHours: { 55429 one: "about 1 hour", 55430 other: "about {{count}} hours", 55431 }, 55432 55433 xHours: { 55434 one: "1 hour", 55435 other: "{{count}} hours", 55436 }, 55437 55438 xDays: { 55439 one: "1 day", 55440 other: "{{count}} days", 55441 }, 55442 55443 aboutXWeeks: { 55444 one: "about 1 week", 55445 other: "about {{count}} weeks", 55446 }, 55447 55448 xWeeks: { 55449 one: "1 week", 55450 other: "{{count}} weeks", 55451 }, 55452 55453 aboutXMonths: { 55454 one: "about 1 month", 55455 other: "about {{count}} months", 55456 }, 55457 55458 xMonths: { 55459 one: "1 month", 55460 other: "{{count}} months", 55461 }, 55462 55463 aboutXYears: { 55464 one: "about 1 year", 55465 other: "about {{count}} years", 55466 }, 55467 55468 xYears: { 55469 one: "1 year", 55470 other: "{{count}} years", 55471 }, 55472 55473 overXYears: { 55474 one: "over 1 year", 55475 other: "over {{count}} years", 55476 }, 55477 55478 almostXYears: { 55479 one: "almost 1 year", 55480 other: "almost {{count}} years", 55481 }, 55482}; 55483 55484const formatDistance = (token, count, options) => { 55485 let result; 55486 55487 const tokenValue = formatDistanceLocale[token]; 55488 if (typeof tokenValue === "string") { 55489 result = tokenValue; 55490 } else if (count === 1) { 55491 result = tokenValue.one; 55492 } else { 55493 result = tokenValue.other.replace("{{count}}", count.toString()); 55494 } 55495 55496 if (options?.addSuffix) { 55497 if (options.comparison && options.comparison > 0) { 55498 return "in " + result; 55499 } else { 55500 return result + " ago"; 55501 } 55502 } 55503 55504 return result; 55505}; 55506 55507 55508/***/ }), 55509
vendor: 1,676 bytes, lines 55510-55564
55510/***/ "./node_modules/date-fns/locale/en-US/_lib/formatLong.mjs": 55511/*!****************************************************************!*\ 55512 !*** ./node_modules/date-fns/locale/en-US/_lib/formatLong.mjs ***! 55513 \****************************************************************/ 55514/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55515 55516"use strict"; 55517__webpack_require__.r(__webpack_exports__); 55518/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55519/* harmony export */ formatLong: () => (/* binding */ formatLong) 55520/* harmony export */ }); 55521/* harmony import */ var _lib_buildFormatLongFn_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_lib/buildFormatLongFn.mjs */ "./node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs"); 55522 55523 55524const dateFormats = { 55525 full: "EEEE, MMMM do, y", 55526 long: "MMMM do, y", 55527 medium: "MMM d, y", 55528 short: "MM/dd/yyyy", 55529}; 55530 55531const timeFormats = { 55532 full: "h:mm:ss a zzzz", 55533 long: "h:mm:ss a z", 55534 medium: "h:mm:ss a", 55535 short: "h:mm a", 55536}; 55537 55538const dateTimeFormats = { 55539 full: "{{date}} 'at' {{time}}", 55540 long: "{{date}} 'at' {{time}}", 55541 medium: "{{date}}, {{time}}", 55542 short: "{{date}}, {{time}}", 55543}; 55544 55545const formatLong = { 55546 date: (0,_lib_buildFormatLongFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildFormatLongFn)({ 55547 formats: dateFormats, 55548 defaultWidth: "full", 55549 }), 55550 55551 time: (0,_lib_buildFormatLongFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildFormatLongFn)({ 55552 formats: timeFormats, 55553 defaultWidth: "full", 55554 }), 55555 55556 dateTime: (0,_lib_buildFormatLongFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildFormatLongFn)({ 55557 formats: dateTimeFormats, 55558 defaultWidth: "full", 55559 }), 55560}; 55561 55562 55563/***/ }), 55564
vendor: 914 bytes, lines 55565-55590
55565/***/ "./node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs": 55566/*!********************************************************************!*\ 55567 !*** ./node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs ***! 55568 \********************************************************************/ 55569/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55570 55571"use strict"; 55572__webpack_require__.r(__webpack_exports__); 55573/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55574/* harmony export */ formatRelative: () => (/* binding */ formatRelative) 55575/* harmony export */ }); 55576const formatRelativeLocale = { 55577 lastWeek: "'last' eeee 'at' p", 55578 yesterday: "'yesterday at' p", 55579 today: "'today at' p", 55580 tomorrow: "'tomorrow at' p", 55581 nextWeek: "eeee 'at' p", 55582 other: "P", 55583}; 55584 55585const formatRelative = (token, _date, _baseDate, _options) => 55586 formatRelativeLocale[token]; 55587 55588 55589/***/ }), 55590
vendor: 4,937 bytes, lines 55591-55793
55591/***/ "./node_modules/date-fns/locale/en-US/_lib/localize.mjs": 55592/*!**************************************************************!*\ 55593 !*** ./node_modules/date-fns/locale/en-US/_lib/localize.mjs ***! 55594 \**************************************************************/ 55595/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55596 55597"use strict"; 55598__webpack_require__.r(__webpack_exports__); 55599/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55600/* harmony export */ localize: () => (/* binding */ localize) 55601/* harmony export */ }); 55602/* harmony import */ var _lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_lib/buildLocalizeFn.mjs */ "./node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs"); 55603 55604 55605const eraValues = { 55606 narrow: ["B", "A"], 55607 abbreviated: ["BC", "AD"], 55608 wide: ["Before Christ", "Anno Domini"], 55609}; 55610 55611const quarterValues = { 55612 narrow: ["1", "2", "3", "4"], 55613 abbreviated: ["Q1", "Q2", "Q3", "Q4"], 55614 wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], 55615}; 55616 55617// Note: in English, the names of days of the week and months are capitalized. 55618// If you are making a new locale based on this one, check if the same is true for the language you're working on. 55619// Generally, formatted dates should look like they are in the middle of a sentence, 55620// e.g. in Spanish language the weekdays and months should be in the lowercase. 55621const monthValues = { 55622 narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], 55623 abbreviated: [ 55624 "Jan", 55625 "Feb", 55626 "Mar", 55627 "Apr", 55628 "May", 55629 "Jun", 55630 "Jul", 55631 "Aug", 55632 "Sep", 55633 "Oct", 55634 "Nov", 55635 "Dec", 55636 ], 55637 55638 wide: [ 55639 "January", 55640 "February", 55641 "March", 55642 "April", 55643 "May", 55644 "June", 55645 "July", 55646 "August", 55647 "September", 55648 "October", 55649 "November", 55650 "December", 55651 ], 55652}; 55653 55654const dayValues = { 55655 narrow: ["S", "M", "T", "W", "T", "F", "S"], 55656 short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], 55657 abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 55658 wide: [ 55659 "Sunday", 55660 "Monday", 55661 "Tuesday", 55662 "Wednesday", 55663 "Thursday", 55664 "Friday", 55665 "Saturday", 55666 ], 55667}; 55668 55669const dayPeriodValues = { 55670 narrow: { 55671 am: "a", 55672 pm: "p", 55673 midnight: "mi", 55674 noon: "n", 55675 morning: "morning", 55676 afternoon: "afternoon", 55677 evening: "evening", 55678 night: "night", 55679 }, 55680 abbreviated: { 55681 am: "AM", 55682 pm: "PM", 55683 midnight: "midnight", 55684 noon: "noon", 55685 morning: "morning", 55686 afternoon: "afternoon", 55687 evening: "evening", 55688 night: "night", 55689 }, 55690 wide: { 55691 am: "a.m.", 55692 pm: "p.m.", 55693 midnight: "midnight", 55694 noon: "noon", 55695 morning: "morning", 55696 afternoon: "afternoon", 55697 evening: "evening", 55698 night: "night", 55699 }, 55700}; 55701 55702const formattingDayPeriodValues = { 55703 narrow: { 55704 am: "a", 55705 pm: "p", 55706 midnight: "mi", 55707 noon: "n", 55708 morning: "in the morning", 55709 afternoon: "in the afternoon", 55710 evening: "in the evening", 55711 night: "at night", 55712 }, 55713 abbreviated: { 55714 am: "AM", 55715 pm: "PM", 55716 midnight: "midnight", 55717 noon: "noon", 55718 morning: "in the morning", 55719 afternoon: "in the afternoon", 55720 evening: "in the evening", 55721 night: "at night", 55722 }, 55723 wide: { 55724 am: "a.m.", 55725 pm: "p.m.", 55726 midnight: "midnight", 55727 noon: "noon", 55728 morning: "in the morning", 55729 afternoon: "in the afternoon", 55730 evening: "in the evening", 55731 night: "at night", 55732 }, 55733}; 55734 55735const ordinalNumber = (dirtyNumber, _options) => { 55736 const number = Number(dirtyNumber); 55737 55738 // If ordinal numbers depend on context, for example, 55739 // if they are different for different grammatical genders, 55740 // use `options.unit`. 55741 // 55742 // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear', 55743 // 'day', 'hour', 'minute', 'second'. 55744 55745 const rem100 = number % 100; 55746 if (rem100 > 20 || rem100 < 10) { 55747 switch (rem100 % 10) { 55748 case 1: 55749 return number + "st"; 55750 case 2: 55751 return number + "nd"; 55752 case 3: 55753 return number + "rd"; 55754 } 55755 } 55756 return number + "th"; 55757}; 55758 55759const localize = { 55760 ordinalNumber, 55761 55762 era: (0,_lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildLocalizeFn)({ 55763 values: eraValues, 55764 defaultWidth: "wide", 55765 }), 55766 55767 quarter: (0,_lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildLocalizeFn)({ 55768 values: quarterValues, 55769 defaultWidth: "wide", 55770 argumentCallback: (quarter) => quarter - 1, 55771 }), 55772 55773 month: (0,_lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildLocalizeFn)({ 55774 values: monthValues, 55775 defaultWidth: "wide", 55776 }), 55777 55778 day: (0,_lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildLocalizeFn)({ 55779 values: dayValues, 55780 defaultWidth: "wide", 55781 }), 55782 55783 dayPeriod: (0,_lib_buildLocalizeFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildLocalizeFn)({ 55784 values: dayPeriodValues, 55785 defaultWidth: "wide", 55786 formattingValues: formattingDayPeriodValues, 55787 defaultFormattingWidth: "wide", 55788 }), 55789}; 55790 55791 55792/***/ }), 55793
vendor: 4,315 bytes, lines 55794-55942
55794/***/ "./node_modules/date-fns/locale/en-US/_lib/match.mjs": 55795/*!***********************************************************!*\ 55796 !*** ./node_modules/date-fns/locale/en-US/_lib/match.mjs ***! 55797 \***********************************************************/ 55798/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55799 55800"use strict"; 55801__webpack_require__.r(__webpack_exports__); 55802/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55803/* harmony export */ match: () => (/* binding */ match) 55804/* harmony export */ }); 55805/* harmony import */ var _lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_lib/buildMatchFn.mjs */ "./node_modules/date-fns/locale/_lib/buildMatchFn.mjs"); 55806/* harmony import */ var _lib_buildMatchPatternFn_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_lib/buildMatchPatternFn.mjs */ "./node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs"); 55807 55808 55809 55810const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; 55811const parseOrdinalNumberPattern = /\d+/i; 55812 55813const matchEraPatterns = { 55814 narrow: /^(b|a)/i, 55815 abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, 55816 wide: /^(before christ|before common era|anno domini|common era)/i, 55817}; 55818const parseEraPatterns = { 55819 any: [/^b/i, /^(a|c)/i], 55820}; 55821 55822const matchQuarterPatterns = { 55823 narrow: /^[1234]/i, 55824 abbreviated: /^q[1234]/i, 55825 wide: /^[1234](th|st|nd|rd)? quarter/i, 55826}; 55827const parseQuarterPatterns = { 55828 any: [/1/i, /2/i, /3/i, /4/i], 55829}; 55830 55831const matchMonthPatterns = { 55832 narrow: /^[jfmasond]/i, 55833 abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, 55834 wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i, 55835}; 55836const parseMonthPatterns = { 55837 narrow: [ 55838 /^j/i, 55839 /^f/i, 55840 /^m/i, 55841 /^a/i, 55842 /^m/i, 55843 /^j/i, 55844 /^j/i, 55845 /^a/i, 55846 /^s/i, 55847 /^o/i, 55848 /^n/i, 55849 /^d/i, 55850 ], 55851 55852 any: [ 55853 /^ja/i, 55854 /^f/i, 55855 /^mar/i, 55856 /^ap/i, 55857 /^may/i, 55858 /^jun/i, 55859 /^jul/i, 55860 /^au/i, 55861 /^s/i, 55862 /^o/i, 55863 /^n/i, 55864 /^d/i, 55865 ], 55866}; 55867 55868const matchDayPatterns = { 55869 narrow: /^[smtwf]/i, 55870 short: /^(su|mo|tu|we|th|fr|sa)/i, 55871 abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, 55872 wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i, 55873}; 55874const parseDayPatterns = { 55875 narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], 55876 any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i], 55877}; 55878 55879const matchDayPeriodPatterns = { 55880 narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, 55881 any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i, 55882}; 55883const parseDayPeriodPatterns = { 55884 any: { 55885 am: /^a/i, 55886 pm: /^p/i, 55887 midnight: /^mi/i, 55888 noon: /^no/i, 55889 morning: /morning/i, 55890 afternoon: /afternoon/i, 55891 evening: /evening/i, 55892 night: /night/i, 55893 }, 55894}; 55895 55896const match = { 55897 ordinalNumber: (0,_lib_buildMatchPatternFn_mjs__WEBPACK_IMPORTED_MODULE_0__.buildMatchPatternFn)({ 55898 matchPattern: matchOrdinalNumberPattern, 55899 parsePattern: parseOrdinalNumberPattern, 55900 valueCallback: (value) => parseInt(value, 10), 55901 }), 55902 55903 era: (0,_lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__.buildMatchFn)({ 55904 matchPatterns: matchEraPatterns, 55905 defaultMatchWidth: "wide", 55906 parsePatterns: parseEraPatterns, 55907 defaultParseWidth: "any", 55908 }), 55909 55910 quarter: (0,_lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__.buildMatchFn)({ 55911 matchPatterns: matchQuarterPatterns, 55912 defaultMatchWidth: "wide", 55913 parsePatterns: parseQuarterPatterns, 55914 defaultParseWidth: "any", 55915 valueCallback: (index) => index + 1, 55916 }), 55917 55918 month: (0,_lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__.buildMatchFn)({ 55919 matchPatterns: matchMonthPatterns, 55920 defaultMatchWidth: "wide", 55921 parsePatterns: parseMonthPatterns, 55922 defaultParseWidth: "any", 55923 }), 55924 55925 day: (0,_lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__.buildMatchFn)({ 55926 matchPatterns: matchDayPatterns, 55927 defaultMatchWidth: "wide", 55928 parsePatterns: parseDayPatterns, 55929 defaultParseWidth: "any", 55930 }), 55931 55932 dayPeriod: (0,_lib_buildMatchFn_mjs__WEBPACK_IMPORTED_MODULE_1__.buildMatchFn)({ 55933 matchPatterns: matchDayPeriodPatterns, 55934 defaultMatchWidth: "any", 55935 parsePatterns: parseDayPeriodPatterns, 55936 defaultParseWidth: "any", 55937 }), 55938}; 55939 55940 55941/***/ }), 55942
vendor: 31,798 bytes, lines 55943-56480
55943/***/ "./node_modules/date-fns/parse.mjs": 55944/*!*****************************************!*\ 55945 !*** ./node_modules/date-fns/parse.mjs ***! 55946 \*****************************************/ 55947/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 55948 55949"use strict"; 55950__webpack_require__.r(__webpack_exports__); 55951/* harmony export */ __webpack_require__.d(__webpack_exports__, { 55952/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 55953/* harmony export */ longFormatters: () => (/* reexport safe */ _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.longFormatters), 55954/* harmony export */ parse: () => (/* binding */ parse), 55955/* harmony export */ parsers: () => (/* reexport safe */ _parse_lib_parsers_mjs__WEBPACK_IMPORTED_MODULE_1__.parsers) 55956/* harmony export */ }); 55957/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 55958/* harmony import */ var _getDefaultOptions_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getDefaultOptions.mjs */ "./node_modules/date-fns/getDefaultOptions.mjs"); 55959/* harmony import */ var _lib_defaultLocale_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_lib/defaultLocale.mjs */ "./node_modules/date-fns/locale/en-US.mjs"); 55960/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 55961/* harmony import */ var _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/format/longFormatters.mjs */ "./node_modules/date-fns/_lib/format/longFormatters.mjs"); 55962/* harmony import */ var _lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./_lib/protectedTokens.mjs */ "./node_modules/date-fns/_lib/protectedTokens.mjs"); 55963/* harmony import */ var _parse_lib_parsers_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse/_lib/parsers.mjs */ "./node_modules/date-fns/parse/_lib/parsers.mjs"); 55964/* harmony import */ var _parse_lib_Setter_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parse/_lib/Setter.mjs */ "./node_modules/date-fns/parse/_lib/Setter.mjs"); 55965 55966 55967 55968 55969 55970 55971 55972 55973 55974// Rexports of internal for libraries to use. 55975// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874 55976 55977 55978/** 55979 * The {@link parse} function options. 55980 */ 55981 55982// This RegExp consists of three parts separated by `|`: 55983// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token 55984// (one of the certain letters followed by `o`) 55985// - (\w)\1* matches any sequences of the same letter 55986// - '' matches two quote characters in a row 55987// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), 55988// except a single quote symbol, which ends the sequence. 55989// Two quote characters do not end the sequence. 55990// If there is no matching single quote 55991// then the sequence will continue until the end of the string. 55992// - . matches any single character unmatched by previous parts of the RegExps 55993const formattingTokensRegExp = 55994 /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; 55995 55996// This RegExp catches symbols escaped by quotes, and also 55997// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` 55998const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; 55999 56000const escapedStringRegExp = /^'([^]*?)'?$/; 56001const doubleQuoteRegExp = /''/g; 56002 56003const notWhitespaceRegExp = /\S/; 56004const unescapedLatinCharacterRegExp = /[a-zA-Z]/; 56005 56006/** 56007 * @name parse 56008 * @category Common Helpers 56009 * @summary Parse the date. 56010 * 56011 * @description 56012 * Return the date parsed from string using the given format string. 56013 * 56014 * > â ï¸ Please note that the `format` tokens differ from Moment.js and other libraries. 56015 * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56016 * 56017 * The characters in the format string wrapped between two single quotes characters (') are escaped. 56018 * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. 56019 * 56020 * Format of the format string is based on Unicode Technical Standard #35: 56021 * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table 56022 * with a few additions (see note 5 below the table). 56023 * 56024 * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited 56025 * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception: 56026 * 56027 * ```javascript 56028 * parse('23 AM', 'HH a', new Date()) 56029 * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time 56030 * ``` 56031 * 56032 * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true 56033 * 56034 * Accepted format string patterns: 56035 * | Unit |Prior| Pattern | Result examples | Notes | 56036 * |---------------------------------|-----|---------|-----------------------------------|-------| 56037 * | Era | 140 | G..GGG | AD, BC | | 56038 * | | | GGGG | Anno Domini, Before Christ | 2 | 56039 * | | | GGGGG | A, B | | 56040 * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 | 56041 * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 | 56042 * | | | yy | 44, 01, 00, 17 | 4 | 56043 * | | | yyy | 044, 001, 123, 999 | 4 | 56044 * | | | yyyy | 0044, 0001, 1900, 2017 | 4 | 56045 * | | | yyyyy | ... | 2,4 | 56046 * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 | 56047 * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 | 56048 * | | | YY | 44, 01, 00, 17 | 4,6 | 56049 * | | | YYY | 044, 001, 123, 999 | 4 | 56050 * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 | 56051 * | | | YYYYY | ... | 2,4 | 56052 * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 | 56053 * | | | RR | -43, 01, 00, 17 | 4,5 | 56054 * | | | RRR | -043, 001, 123, 999, -999 | 4,5 | 56055 * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 | 56056 * | | | RRRRR | ... | 2,4,5 | 56057 * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 | 56058 * | | | uu | -43, 01, 99, -99 | 4 | 56059 * | | | uuu | -043, 001, 123, 999, -999 | 4 | 56060 * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 | 56061 * | | | uuuuu | ... | 2,4 | 56062 * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | | 56063 * | | | Qo | 1st, 2nd, 3rd, 4th | 5 | 56064 * | | | QQ | 01, 02, 03, 04 | | 56065 * | | | QQQ | Q1, Q2, Q3, Q4 | | 56066 * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | 56067 * | | | QQQQQ | 1, 2, 3, 4 | 4 | 56068 * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | | 56069 * | | | qo | 1st, 2nd, 3rd, 4th | 5 | 56070 * | | | qq | 01, 02, 03, 04 | | 56071 * | | | qqq | Q1, Q2, Q3, Q4 | | 56072 * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 | 56073 * | | | qqqqq | 1, 2, 3, 4 | 3 | 56074 * | Month (formatting) | 110 | M | 1, 2, ..., 12 | | 56075 * | | | Mo | 1st, 2nd, ..., 12th | 5 | 56076 * | | | MM | 01, 02, ..., 12 | | 56077 * | | | MMM | Jan, Feb, ..., Dec | | 56078 * | | | MMMM | January, February, ..., December | 2 | 56079 * | | | MMMMM | J, F, ..., D | | 56080 * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | | 56081 * | | | Lo | 1st, 2nd, ..., 12th | 5 | 56082 * | | | LL | 01, 02, ..., 12 | | 56083 * | | | LLL | Jan, Feb, ..., Dec | | 56084 * | | | LLLL | January, February, ..., December | 2 | 56085 * | | | LLLLL | J, F, ..., D | | 56086 * | Local week of year | 100 | w | 1, 2, ..., 53 | | 56087 * | | | wo | 1st, 2nd, ..., 53th | 5 | 56088 * | | | ww | 01, 02, ..., 53 | | 56089 * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 | 56090 * | | | Io | 1st, 2nd, ..., 53th | 5 | 56091 * | | | II | 01, 02, ..., 53 | 5 | 56092 * | Day of month | 90 | d | 1, 2, ..., 31 | | 56093 * | | | do | 1st, 2nd, ..., 31st | 5 | 56094 * | | | dd | 01, 02, ..., 31 | | 56095 * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 | 56096 * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 | 56097 * | | | DD | 01, 02, ..., 365, 366 | 7 | 56098 * | | | DDD | 001, 002, ..., 365, 366 | | 56099 * | | | DDDD | ... | 2 | 56100 * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | | 56101 * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 | 56102 * | | | EEEEE | M, T, W, T, F, S, S | | 56103 * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | 56104 * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 | 56105 * | | | io | 1st, 2nd, ..., 7th | 5 | 56106 * | | | ii | 01, 02, ..., 07 | 5 | 56107 * | | | iii | Mon, Tue, Wed, ..., Sun | 5 | 56108 * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 | 56109 * | | | iiiii | M, T, W, T, F, S, S | 5 | 56110 * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 | 56111 * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | | 56112 * | | | eo | 2nd, 3rd, ..., 1st | 5 | 56113 * | | | ee | 02, 03, ..., 01 | | 56114 * | | | eee | Mon, Tue, Wed, ..., Sun | | 56115 * | | | eeee | Monday, Tuesday, ..., Sunday | 2 | 56116 * | | | eeeee | M, T, W, T, F, S, S | | 56117 * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | 56118 * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | | 56119 * | | | co | 2nd, 3rd, ..., 1st | 5 | 56120 * | | | cc | 02, 03, ..., 01 | | 56121 * | | | ccc | Mon, Tue, Wed, ..., Sun | | 56122 * | | | cccc | Monday, Tuesday, ..., Sunday | 2 | 56123 * | | | ccccc | M, T, W, T, F, S, S | | 56124 * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | 56125 * | AM, PM | 80 | a..aaa | AM, PM | | 56126 * | | | aaaa | a.m., p.m. | 2 | 56127 * | | | aaaaa | a, p | | 56128 * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | | 56129 * | | | bbbb | a.m., p.m., noon, midnight | 2 | 56130 * | | | bbbbb | a, p, n, mi | | 56131 * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | | 56132 * | | | BBBB | at night, in the morning, ... | 2 | 56133 * | | | BBBBB | at night, in the morning, ... | | 56134 * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | | 56135 * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 | 56136 * | | | hh | 01, 02, ..., 11, 12 | | 56137 * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | | 56138 * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 | 56139 * | | | HH | 00, 01, 02, ..., 23 | | 56140 * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | | 56141 * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 | 56142 * | | | KK | 01, 02, ..., 11, 00 | | 56143 * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | | 56144 * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 | 56145 * | | | kk | 24, 01, 02, ..., 23 | | 56146 * | Minute | 60 | m | 0, 1, ..., 59 | | 56147 * | | | mo | 0th, 1st, ..., 59th | 5 | 56148 * | | | mm | 00, 01, ..., 59 | | 56149 * | Second | 50 | s | 0, 1, ..., 59 | | 56150 * | | | so | 0th, 1st, ..., 59th | 5 | 56151 * | | | ss | 00, 01, ..., 59 | | 56152 * | Seconds timestamp | 40 | t | 512969520 | | 56153 * | | | tt | ... | 2 | 56154 * | Fraction of second | 30 | S | 0, 1, ..., 9 | | 56155 * | | | SS | 00, 01, ..., 99 | | 56156 * | | | SSS | 000, 001, ..., 999 | | 56157 * | | | SSSS | ... | 2 | 56158 * | Milliseconds timestamp | 20 | T | 512969520900 | | 56159 * | | | TT | ... | 2 | 56160 * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | | 56161 * | | | XX | -0800, +0530, Z | | 56162 * | | | XXX | -08:00, +05:30, Z | | 56163 * | | | XXXX | -0800, +0530, Z, +123456 | 2 | 56164 * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | 56165 * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | | 56166 * | | | xx | -0800, +0530, +0000 | | 56167 * | | | xxx | -08:00, +05:30, +00:00 | 2 | 56168 * | | | xxxx | -0800, +0530, +0000, +123456 | | 56169 * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | 56170 * | Long localized date | NA | P | 05/29/1453 | 5,8 | 56171 * | | | PP | May 29, 1453 | | 56172 * | | | PPP | May 29th, 1453 | | 56173 * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 | 56174 * | Long localized time | NA | p | 12:00 AM | 5,8 | 56175 * | | | pp | 12:00:00 AM | | 56176 * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | | 56177 * | | | PPpp | May 29, 1453, 12:00:00 AM | | 56178 * | | | PPPpp | May 29th, 1453 at ... | | 56179 * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 | 56180 * Notes: 56181 * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale 56182 * are the same as "stand-alone" units, but are different in some languages. 56183 * "Formatting" units are declined according to the rules of the language 56184 * in the context of a date. "Stand-alone" units are always nominative singular. 56185 * In `format` function, they will produce different result: 56186 * 56187 * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` 56188 * 56189 * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` 56190 * 56191 * `parse` will try to match both formatting and stand-alone units interchangably. 56192 * 56193 * 2. Any sequence of the identical letters is a pattern, unless it is escaped by 56194 * the single quote characters (see below). 56195 * If the sequence is longer than listed in table: 56196 * - for numerical units (`yyyyyyyy`) `parse` will try to match a number 56197 * as wide as the sequence 56198 * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit. 56199 * These variations are marked with "2" in the last column of the table. 56200 * 56201 * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. 56202 * These tokens represent the shortest form of the quarter. 56203 * 56204 * 4. The main difference between `y` and `u` patterns are B.C. years: 56205 * 56206 * | Year | `y` | `u` | 56207 * |------|-----|-----| 56208 * | AC 1 | 1 | 1 | 56209 * | BC 1 | 1 | 0 | 56210 * | BC 2 | 2 | -1 | 56211 * 56212 * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`: 56213 * 56214 * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00` 56215 * 56216 * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00` 56217 * 56218 * while `uu` will just assign the year as is: 56219 * 56220 * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00` 56221 * 56222 * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00` 56223 * 56224 * The same difference is true for local and ISO week-numbering years (`Y` and `R`), 56225 * except local week-numbering years are dependent on `options.weekStartsOn` 56226 * and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear) 56227 * and [setWeekYear](https://date-fns.org/docs/setWeekYear)). 56228 * 56229 * 5. These patterns are not in the Unicode Technical Standard #35: 56230 * - `i`: ISO day of week 56231 * - `I`: ISO week of year 56232 * - `R`: ISO week-numbering year 56233 * - `o`: ordinal number modifier 56234 * - `P`: long localized date 56235 * - `p`: long localized time 56236 * 56237 * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. 56238 * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56239 * 56240 * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month. 56241 * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56242 * 56243 * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based 56244 * on the given locale. 56245 * 56246 * using `en-US` locale: `P` => `MM/dd/yyyy` 56247 * using `en-US` locale: `p` => `hh:mm a` 56248 * using `pt-BR` locale: `P` => `dd/MM/yyyy` 56249 * using `pt-BR` locale: `p` => `HH:mm` 56250 * 56251 * Values will be assigned to the date in the descending order of its unit's priority. 56252 * Units of an equal priority overwrite each other in the order of appearance. 56253 * 56254 * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year), 56255 * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing. 56256 * 56257 * `referenceDate` must be passed for correct work of the function. 56258 * If you're not sure which `referenceDate` to supply, create a new instance of Date: 56259 * `parse('02/11/2014', 'MM/dd/yyyy', new Date())` 56260 * In this case parsing will be done in the context of the current date. 56261 * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`, 56262 * then `Invalid Date` will be returned. 56263 * 56264 * The result may vary by locale. 56265 * 56266 * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned. 56267 * 56268 * If parsing failed, `Invalid Date` will be returned. 56269 * Invalid Date is a Date, whose time value is NaN. 56270 * Time value of Date: http://es5.github.io/#x15.9.1.1 56271 * 56272 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 56273 * 56274 * @param dateStr - The string to parse 56275 * @param formatStr - The string of tokens 56276 * @param referenceDate - defines values missing from the parsed dateString 56277 * @param options - An object with options. 56278 * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56279 * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56280 * 56281 * @returns The parsed date 56282 * 56283 * @throws `options.locale` must contain `match` property 56284 * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56285 * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56286 * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56287 * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 56288 * @throws format string contains an unescaped latin alphabet character 56289 * 56290 * @example 56291 * // Parse 11 February 2014 from middle-endian format: 56292 * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date()) 56293 * //=> Tue Feb 11 2014 00:00:00 56294 * 56295 * @example 56296 * // Parse 28th of February in Esperanto locale in the context of 2010 year: 56297 * import eo from 'date-fns/locale/eo' 56298 * var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), { 56299 * locale: eo 56300 * }) 56301 * //=> Sun Feb 28 2010 00:00:00 56302 */ 56303function parse(dateStr, formatStr, referenceDate, options) { 56304 const defaultOptions = (0,_getDefaultOptions_mjs__WEBPACK_IMPORTED_MODULE_2__.getDefaultOptions)(); 56305 const locale = options?.locale ?? defaultOptions.locale ?? _lib_defaultLocale_mjs__WEBPACK_IMPORTED_MODULE_3__.enUS; 56306 56307 const firstWeekContainsDate = 56308 options?.firstWeekContainsDate ?? 56309 options?.locale?.options?.firstWeekContainsDate ?? 56310 defaultOptions.firstWeekContainsDate ?? 56311 defaultOptions.locale?.options?.firstWeekContainsDate ?? 56312 1; 56313 56314 const weekStartsOn = 56315 options?.weekStartsOn ?? 56316 options?.locale?.options?.weekStartsOn ?? 56317 defaultOptions.weekStartsOn ?? 56318 defaultOptions.locale?.options?.weekStartsOn ?? 56319 0; 56320 56321 if (formatStr === "") { 56322 if (dateStr === "") { 56323 return (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_4__.toDate)(referenceDate); 56324 } else { 56325 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56326 } 56327 } 56328 56329 const subFnOptions = { 56330 firstWeekContainsDate, 56331 weekStartsOn, 56332 locale, 56333 }; 56334 56335 // If timezone isn't specified, it will be set to the system timezone 56336 const setters = [new _parse_lib_Setter_mjs__WEBPACK_IMPORTED_MODULE_6__.DateToSystemTimezoneSetter()]; 56337 56338 const tokens = formatStr 56339 .match(longFormattingTokensRegExp) 56340 .map((substring) => { 56341 const firstCharacter = substring[0]; 56342 if (firstCharacter in _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.longFormatters) { 56343 const longFormatter = _lib_format_longFormatters_mjs__WEBPACK_IMPORTED_MODULE_0__.longFormatters[firstCharacter]; 56344 return longFormatter(substring, locale.formatLong); 56345 } 56346 return substring; 56347 }) 56348 .join("") 56349 .match(formattingTokensRegExp); 56350 56351 const usedTokens = []; 56352 56353 for (let token of tokens) { 56354 if ( 56355 !options?.useAdditionalWeekYearTokens && 56356 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_7__.isProtectedWeekYearToken)(token) 56357 ) { 56358 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_7__.warnOrThrowProtectedError)(token, formatStr, dateStr); 56359 } 56360 if ( 56361 !options?.useAdditionalDayOfYearTokens && 56362 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_7__.isProtectedDayOfYearToken)(token) 56363 ) { 56364 (0,_lib_protectedTokens_mjs__WEBPACK_IMPORTED_MODULE_7__.warnOrThrowProtectedError)(token, formatStr, dateStr); 56365 } 56366 56367 const firstCharacter = token[0]; 56368 const parser = _parse_lib_parsers_mjs__WEBPACK_IMPORTED_MODULE_1__.parsers[firstCharacter]; 56369 if (parser) { 56370 const { incompatibleTokens } = parser; 56371 if (Array.isArray(incompatibleTokens)) { 56372 const incompatibleToken = usedTokens.find( 56373 (usedToken) => 56374 incompatibleTokens.includes(usedToken.token) || 56375 usedToken.token === firstCharacter, 56376 ); 56377 if (incompatibleToken) { 56378 throw new RangeError( 56379 `The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`, 56380 ); 56381 } 56382 } else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) { 56383 throw new RangeError( 56384 `The format string mustn't contain \`${token}\` and any other token at the same time`, 56385 ); 56386 } 56387 56388 usedTokens.push({ token: firstCharacter, fullToken: token }); 56389 56390 const parseResult = parser.run( 56391 dateStr, 56392 token, 56393 locale.match, 56394 subFnOptions, 56395 ); 56396 56397 if (!parseResult) { 56398 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56399 } 56400 56401 setters.push(parseResult.setter); 56402 56403 dateStr = parseResult.rest; 56404 } else { 56405 if (firstCharacter.match(unescapedLatinCharacterRegExp)) { 56406 throw new RangeError( 56407 "Format string contains an unescaped latin alphabet character `" + 56408 firstCharacter + 56409 "`", 56410 ); 56411 } 56412 56413 // Replace two single quote characters with one single quote character 56414 if (token === "''") { 56415 token = "'"; 56416 } else if (firstCharacter === "'") { 56417 token = cleanEscapedString(token); 56418 } 56419 56420 // Cut token from string, or, if string doesn't match the token, return Invalid Date 56421 if (dateStr.indexOf(token) === 0) { 56422 dateStr = dateStr.slice(token.length); 56423 } else { 56424 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56425 } 56426 } 56427 } 56428 56429 // Check if the remaining input contains something other than whitespace 56430 if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) { 56431 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56432 } 56433 56434 const uniquePrioritySetters = setters 56435 .map((setter) => setter.priority) 56436 .sort((a, b) => b - a) 56437 .filter((priority, index, array) => array.indexOf(priority) === index) 56438 .map((priority) => 56439 setters 56440 .filter((setter) => setter.priority === priority) 56441 .sort((a, b) => b.subPriority - a.subPriority), 56442 ) 56443 .map((setterArray) => setterArray[0]); 56444 56445 let date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_4__.toDate)(referenceDate); 56446 56447 if (isNaN(date.getTime())) { 56448 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56449 } 56450 56451 const flags = {}; 56452 for (const setter of uniquePrioritySetters) { 56453 if (!setter.validate(date, subFnOptions)) { 56454 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, NaN); 56455 } 56456 56457 const result = setter.set(date, flags, subFnOptions); 56458 // Result is tuple (date, flags) 56459 if (Array.isArray(result)) { 56460 date = result[0]; 56461 Object.assign(flags, result[1]); 56462 // Result is date 56463 } else { 56464 date = result; 56465 } 56466 } 56467 56468 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_5__.constructFrom)(referenceDate, date); 56469} 56470 56471function cleanEscapedString(input) { 56472 return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'"); 56473} 56474 56475// Fallback for modularized imports: 56476/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse); 56477 56478 56479/***/ }), 56480
vendor: 1,182 bytes, lines 56481-56521
56481/***/ "./node_modules/date-fns/parse/_lib/Parser.mjs": 56482/*!*****************************************************!*\ 56483 !*** ./node_modules/date-fns/parse/_lib/Parser.mjs ***! 56484 \*****************************************************/ 56485/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56486 56487"use strict"; 56488__webpack_require__.r(__webpack_exports__); 56489/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56490/* harmony export */ Parser: () => (/* binding */ Parser) 56491/* harmony export */ }); 56492/* harmony import */ var _Setter_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Setter.mjs */ "./node_modules/date-fns/parse/_lib/Setter.mjs"); 56493 56494 56495class Parser { 56496 run(dateString, token, match, options) { 56497 const result = this.parse(dateString, token, match, options); 56498 if (!result) { 56499 return null; 56500 } 56501 56502 return { 56503 setter: new _Setter_mjs__WEBPACK_IMPORTED_MODULE_0__.ValueSetter( 56504 result.value, 56505 this.validate, 56506 this.set, 56507 this.priority, 56508 this.subPriority, 56509 ), 56510 rest: result.rest, 56511 }; 56512 } 56513 56514 validate(_utcDate, _value, _options) { 56515 return true; 56516 } 56517} 56518 56519 56520/***/ }), 56521
vendor: 2,044 bytes, lines 56522-56591
56522/***/ "./node_modules/date-fns/parse/_lib/Setter.mjs": 56523/*!*****************************************************!*\ 56524 !*** ./node_modules/date-fns/parse/_lib/Setter.mjs ***! 56525 \*****************************************************/ 56526/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56527 56528"use strict"; 56529__webpack_require__.r(__webpack_exports__); 56530/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56531/* harmony export */ DateToSystemTimezoneSetter: () => (/* binding */ DateToSystemTimezoneSetter), 56532/* harmony export */ Setter: () => (/* binding */ Setter), 56533/* harmony export */ ValueSetter: () => (/* binding */ ValueSetter) 56534/* harmony export */ }); 56535/* harmony import */ var _transpose_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../transpose.mjs */ "./node_modules/date-fns/transpose.mjs"); 56536/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 56537 56538 56539 56540const TIMEZONE_UNIT_PRIORITY = 10; 56541 56542class Setter { 56543 subPriority = 0; 56544 56545 validate(_utcDate, _options) { 56546 return true; 56547 } 56548} 56549 56550class ValueSetter extends Setter { 56551 constructor( 56552 value, 56553 56554 validateValue, 56555 56556 setValue, 56557 56558 priority, 56559 subPriority, 56560 ) { 56561 super(); 56562 this.value = value; 56563 this.validateValue = validateValue; 56564 this.setValue = setValue; 56565 this.priority = priority; 56566 if (subPriority) { 56567 this.subPriority = subPriority; 56568 } 56569 } 56570 56571 validate(date, options) { 56572 return this.validateValue(date, this.value, options); 56573 } 56574 56575 set(date, flags, options) { 56576 return this.setValue(date, flags, this.value, options); 56577 } 56578} 56579 56580class DateToSystemTimezoneSetter extends Setter { 56581 priority = TIMEZONE_UNIT_PRIORITY; 56582 subPriority = -1; 56583 set(date, flags) { 56584 if (flags.timestampIsSet) return date; 56585 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_0__.constructFrom)(date, (0,_transpose_mjs__WEBPACK_IMPORTED_MODULE_1__.transpose)(date, Date)); 56586 } 56587} 56588 56589 56590/***/ }), 56591
vendor: 1,789 bytes, lines 56592-56638
56592/***/ "./node_modules/date-fns/parse/_lib/constants.mjs": 56593/*!********************************************************!*\ 56594 !*** ./node_modules/date-fns/parse/_lib/constants.mjs ***! 56595 \********************************************************/ 56596/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56597 56598"use strict"; 56599__webpack_require__.r(__webpack_exports__); 56600/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56601/* harmony export */ numericPatterns: () => (/* binding */ numericPatterns), 56602/* harmony export */ timezonePatterns: () => (/* binding */ timezonePatterns) 56603/* harmony export */ }); 56604const numericPatterns = { 56605 month: /^(1[0-2]|0?\d)/, // 0 to 12 56606 date: /^(3[0-1]|[0-2]?\d)/, // 0 to 31 56607 dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, // 0 to 366 56608 week: /^(5[0-3]|[0-4]?\d)/, // 0 to 53 56609 hour23h: /^(2[0-3]|[0-1]?\d)/, // 0 to 23 56610 hour24h: /^(2[0-4]|[0-1]?\d)/, // 0 to 24 56611 hour11h: /^(1[0-1]|0?\d)/, // 0 to 11 56612 hour12h: /^(1[0-2]|0?\d)/, // 0 to 12 56613 minute: /^[0-5]?\d/, // 0 to 59 56614 second: /^[0-5]?\d/, // 0 to 59 56615 56616 singleDigit: /^\d/, // 0 to 9 56617 twoDigits: /^\d{1,2}/, // 0 to 99 56618 threeDigits: /^\d{1,3}/, // 0 to 999 56619 fourDigits: /^\d{1,4}/, // 0 to 9999 56620 56621 anyDigitsSigned: /^-?\d+/, 56622 singleDigitSigned: /^-?\d/, // 0 to 9, -0 to -9 56623 twoDigitsSigned: /^-?\d{1,2}/, // 0 to 99, -0 to -99 56624 threeDigitsSigned: /^-?\d{1,3}/, // 0 to 999, -0 to -999 56625 fourDigitsSigned: /^-?\d{1,4}/, // 0 to 9999, -0 to -9999 56626}; 56627 56628const timezonePatterns = { 56629 basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/, 56630 basic: /^([+-])(\d{2})(\d{2})|Z/, 56631 basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/, 56632 extended: /^([+-])(\d{2}):(\d{2})|Z/, 56633 extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/, 56634}; 56635 56636 56637/***/ }), 56638
vendor: 13,100 bytes, lines 56639-56793
56639/***/ "./node_modules/date-fns/parse/_lib/parsers.mjs": 56640/*!******************************************************!*\ 56641 !*** ./node_modules/date-fns/parse/_lib/parsers.mjs ***! 56642 \******************************************************/ 56643/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56644 56645"use strict"; 56646__webpack_require__.r(__webpack_exports__); 56647/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56648/* harmony export */ parsers: () => (/* binding */ parsers) 56649/* harmony export */ }); 56650/* harmony import */ var _parsers_EraParser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parsers/EraParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/EraParser.mjs"); 56651/* harmony import */ var _parsers_YearParser_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parsers/YearParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/YearParser.mjs"); 56652/* harmony import */ var _parsers_LocalWeekYearParser_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parsers/LocalWeekYearParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs"); 56653/* harmony import */ var _parsers_ISOWeekYearParser_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parsers/ISOWeekYearParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs"); 56654/* harmony import */ var _parsers_ExtendedYearParser_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./parsers/ExtendedYearParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs"); 56655/* harmony import */ var _parsers_QuarterParser_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parsers/QuarterParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs"); 56656/* harmony import */ var _parsers_StandAloneQuarterParser_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parsers/StandAloneQuarterParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs"); 56657/* harmony import */ var _parsers_MonthParser_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./parsers/MonthParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs"); 56658/* harmony import */ var _parsers_StandAloneMonthParser_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./parsers/StandAloneMonthParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs"); 56659/* harmony import */ var _parsers_LocalWeekParser_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./parsers/LocalWeekParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs"); 56660/* harmony import */ var _parsers_ISOWeekParser_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./parsers/ISOWeekParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs"); 56661/* harmony import */ var _parsers_DateParser_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./parsers/DateParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/DateParser.mjs"); 56662/* harmony import */ var _parsers_DayOfYearParser_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./parsers/DayOfYearParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs"); 56663/* harmony import */ var _parsers_DayParser_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./parsers/DayParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/DayParser.mjs"); 56664/* harmony import */ var _parsers_LocalDayParser_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./parsers/LocalDayParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs"); 56665/* harmony import */ var _parsers_StandAloneLocalDayParser_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./parsers/StandAloneLocalDayParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs"); 56666/* harmony import */ var _parsers_ISODayParser_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./parsers/ISODayParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs"); 56667/* harmony import */ var _parsers_AMPMParser_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./parsers/AMPMParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs"); 56668/* harmony import */ var _parsers_AMPMMidnightParser_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./parsers/AMPMMidnightParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs"); 56669/* harmony import */ var _parsers_DayPeriodParser_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./parsers/DayPeriodParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs"); 56670/* harmony import */ var _parsers_Hour1to12Parser_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./parsers/Hour1to12Parser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs"); 56671/* harmony import */ var _parsers_Hour0to23Parser_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./parsers/Hour0to23Parser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs"); 56672/* harmony import */ var _parsers_Hour0To11Parser_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./parsers/Hour0To11Parser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs"); 56673/* harmony import */ var _parsers_Hour1To24Parser_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./parsers/Hour1To24Parser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs"); 56674/* harmony import */ var _parsers_MinuteParser_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./parsers/MinuteParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs"); 56675/* harmony import */ var _parsers_SecondParser_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./parsers/SecondParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs"); 56676/* harmony import */ var _parsers_FractionOfSecondParser_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./parsers/FractionOfSecondParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs"); 56677/* harmony import */ var _parsers_ISOTimezoneWithZParser_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./parsers/ISOTimezoneWithZParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs"); 56678/* harmony import */ var _parsers_ISOTimezoneParser_mjs__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./parsers/ISOTimezoneParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs"); 56679/* harmony import */ var _parsers_TimestampSecondsParser_mjs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./parsers/TimestampSecondsParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs"); 56680/* harmony import */ var _parsers_TimestampMillisecondsParser_mjs__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./parsers/TimestampMillisecondsParser.mjs */ "./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs"); 56681 56682 56683 56684 56685 56686 56687 56688 56689 56690 56691 56692 56693 56694 56695 56696 56697 56698 56699 56700 56701 56702 56703 56704 56705 56706 56707 56708 56709 56710 56711 56712 56713/* 56714 * | | Unit | | Unit | 56715 * |-----|--------------------------------|-----|--------------------------------| 56716 * | a | AM, PM | A* | Milliseconds in day | 56717 * | b | AM, PM, noon, midnight | B | Flexible day period | 56718 * | c | Stand-alone local day of week | C* | Localized hour w/ day period | 56719 * | d | Day of month | D | Day of year | 56720 * | e | Local day of week | E | Day of week | 56721 * | f | | F* | Day of week in month | 56722 * | g* | Modified Julian day | G | Era | 56723 * | h | Hour [1-12] | H | Hour [0-23] | 56724 * | i! | ISO day of week | I! | ISO week of year | 56725 * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | 56726 * | k | Hour [1-24] | K | Hour [0-11] | 56727 * | l* | (deprecated) | L | Stand-alone month | 56728 * | m | Minute | M | Month | 56729 * | n | | N | | 56730 * | o! | Ordinal number modifier | O* | Timezone (GMT) | 56731 * | p | | P | | 56732 * | q | Stand-alone quarter | Q | Quarter | 56733 * | r* | Related Gregorian year | R! | ISO week-numbering year | 56734 * | s | Second | S | Fraction of second | 56735 * | t! | Seconds timestamp | T! | Milliseconds timestamp | 56736 * | u | Extended year | U* | Cyclic year | 56737 * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | 56738 * | w | Local week of year | W* | Week of month | 56739 * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | 56740 * | y | Year (abs) | Y | Local week-numbering year | 56741 * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) | 56742 * 56743 * Letters marked by * are not implemented but reserved by Unicode standard. 56744 * 56745 * Letters marked by ! are non-standard, but implemented by date-fns: 56746 * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs) 56747 * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, 56748 * i.e. 7 for Sunday, 1 for Monday, etc. 56749 * - `I` is ISO week of year, as opposed to `w` which is local week of year. 56750 * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. 56751 * `R` is supposed to be used in conjunction with `I` and `i` 56752 * for universal ISO week-numbering date, whereas 56753 * `Y` is supposed to be used in conjunction with `w` and `e` 56754 * for week-numbering date specific to the locale. 56755 */ 56756// eslint-disable-next-line @typescript-eslint/no-explicit-any -- It's ok, we want any here 56757const parsers = { 56758 G: new _parsers_EraParser_mjs__WEBPACK_IMPORTED_MODULE_0__.EraParser(), 56759 y: new _parsers_YearParser_mjs__WEBPACK_IMPORTED_MODULE_1__.YearParser(), 56760 Y: new _parsers_LocalWeekYearParser_mjs__WEBPACK_IMPORTED_MODULE_2__.LocalWeekYearParser(), 56761 R: new _parsers_ISOWeekYearParser_mjs__WEBPACK_IMPORTED_MODULE_3__.ISOWeekYearParser(), 56762 u: new _parsers_ExtendedYearParser_mjs__WEBPACK_IMPORTED_MODULE_4__.ExtendedYearParser(), 56763 Q: new _parsers_QuarterParser_mjs__WEBPACK_IMPORTED_MODULE_5__.QuarterParser(), 56764 q: new _parsers_StandAloneQuarterParser_mjs__WEBPACK_IMPORTED_MODULE_6__.StandAloneQuarterParser(), 56765 M: new _parsers_MonthParser_mjs__WEBPACK_IMPORTED_MODULE_7__.MonthParser(), 56766 L: new _parsers_StandAloneMonthParser_mjs__WEBPACK_IMPORTED_MODULE_8__.StandAloneMonthParser(), 56767 w: new _parsers_LocalWeekParser_mjs__WEBPACK_IMPORTED_MODULE_9__.LocalWeekParser(), 56768 I: new _parsers_ISOWeekParser_mjs__WEBPACK_IMPORTED_MODULE_10__.ISOWeekParser(), 56769 d: new _parsers_DateParser_mjs__WEBPACK_IMPORTED_MODULE_11__.DateParser(), 56770 D: new _parsers_DayOfYearParser_mjs__WEBPACK_IMPORTED_MODULE_12__.DayOfYearParser(), 56771 E: new _parsers_DayParser_mjs__WEBPACK_IMPORTED_MODULE_13__.DayParser(), 56772 e: new _parsers_LocalDayParser_mjs__WEBPACK_IMPORTED_MODULE_14__.LocalDayParser(), 56773 c: new _parsers_StandAloneLocalDayParser_mjs__WEBPACK_IMPORTED_MODULE_15__.StandAloneLocalDayParser(), 56774 i: new _parsers_ISODayParser_mjs__WEBPACK_IMPORTED_MODULE_16__.ISODayParser(), 56775 a: new _parsers_AMPMParser_mjs__WEBPACK_IMPORTED_MODULE_17__.AMPMParser(), 56776 b: new _parsers_AMPMMidnightParser_mjs__WEBPACK_IMPORTED_MODULE_18__.AMPMMidnightParser(), 56777 B: new _parsers_DayPeriodParser_mjs__WEBPACK_IMPORTED_MODULE_19__.DayPeriodParser(), 56778 h: new _parsers_Hour1to12Parser_mjs__WEBPACK_IMPORTED_MODULE_20__.Hour1to12Parser(), 56779 H: new _parsers_Hour0to23Parser_mjs__WEBPACK_IMPORTED_MODULE_21__.Hour0to23Parser(), 56780 K: new _parsers_Hour0To11Parser_mjs__WEBPACK_IMPORTED_MODULE_22__.Hour0To11Parser(), 56781 k: new _parsers_Hour1To24Parser_mjs__WEBPACK_IMPORTED_MODULE_23__.Hour1To24Parser(), 56782 m: new _parsers_MinuteParser_mjs__WEBPACK_IMPORTED_MODULE_24__.MinuteParser(), 56783 s: new _parsers_SecondParser_mjs__WEBPACK_IMPORTED_MODULE_25__.SecondParser(), 56784 S: new _parsers_FractionOfSecondParser_mjs__WEBPACK_IMPORTED_MODULE_26__.FractionOfSecondParser(), 56785 X: new _parsers_ISOTimezoneWithZParser_mjs__WEBPACK_IMPORTED_MODULE_27__.ISOTimezoneWithZParser(), 56786 x: new _parsers_ISOTimezoneParser_mjs__WEBPACK_IMPORTED_MODULE_28__.ISOTimezoneParser(), 56787 t: new _parsers_TimestampSecondsParser_mjs__WEBPACK_IMPORTED_MODULE_29__.TimestampSecondsParser(), 56788 T: new _parsers_TimestampMillisecondsParser_mjs__WEBPACK_IMPORTED_MODULE_30__.TimestampMillisecondsParser(), 56789}; 56790 56791 56792/***/ }), 56793
vendor: 2,227 bytes, lines 56794-56863
56794/***/ "./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs": 56795/*!*************************************************************************!*\ 56796 !*** ./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs ***! 56797 \*************************************************************************/ 56798/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56799 56800"use strict"; 56801__webpack_require__.r(__webpack_exports__); 56802/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56803/* harmony export */ AMPMMidnightParser: () => (/* binding */ AMPMMidnightParser) 56804/* harmony export */ }); 56805/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 56806/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 56807 56808 56809 56810class AMPMMidnightParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 56811 priority = 80; 56812 56813 parse(dateString, token, match) { 56814 switch (token) { 56815 case "b": 56816 case "bb": 56817 case "bbb": 56818 return ( 56819 match.dayPeriod(dateString, { 56820 width: "abbreviated", 56821 context: "formatting", 56822 }) || 56823 match.dayPeriod(dateString, { 56824 width: "narrow", 56825 context: "formatting", 56826 }) 56827 ); 56828 56829 case "bbbbb": 56830 return match.dayPeriod(dateString, { 56831 width: "narrow", 56832 context: "formatting", 56833 }); 56834 case "bbbb": 56835 default: 56836 return ( 56837 match.dayPeriod(dateString, { 56838 width: "wide", 56839 context: "formatting", 56840 }) || 56841 match.dayPeriod(dateString, { 56842 width: "abbreviated", 56843 context: "formatting", 56844 }) || 56845 match.dayPeriod(dateString, { 56846 width: "narrow", 56847 context: "formatting", 56848 }) 56849 ); 56850 } 56851 } 56852 56853 set(date, _flags, value) { 56854 date.setHours((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0); 56855 return date; 56856 } 56857 56858 incompatibleTokens = ["a", "B", "H", "k", "t", "T"]; 56859} 56860 56861 56862/***/ }), 56863
vendor: 2,171 bytes, lines 56864-56933
56864/***/ "./node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs": 56865/*!*****************************************************************!*\ 56866 !*** ./node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs ***! 56867 \*****************************************************************/ 56868/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56869 56870"use strict"; 56871__webpack_require__.r(__webpack_exports__); 56872/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56873/* harmony export */ AMPMParser: () => (/* binding */ AMPMParser) 56874/* harmony export */ }); 56875/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 56876/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 56877 56878 56879 56880class AMPMParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 56881 priority = 80; 56882 56883 parse(dateString, token, match) { 56884 switch (token) { 56885 case "a": 56886 case "aa": 56887 case "aaa": 56888 return ( 56889 match.dayPeriod(dateString, { 56890 width: "abbreviated", 56891 context: "formatting", 56892 }) || 56893 match.dayPeriod(dateString, { 56894 width: "narrow", 56895 context: "formatting", 56896 }) 56897 ); 56898 56899 case "aaaaa": 56900 return match.dayPeriod(dateString, { 56901 width: "narrow", 56902 context: "formatting", 56903 }); 56904 case "aaaa": 56905 default: 56906 return ( 56907 match.dayPeriod(dateString, { 56908 width: "wide", 56909 context: "formatting", 56910 }) || 56911 match.dayPeriod(dateString, { 56912 width: "abbreviated", 56913 context: "formatting", 56914 }) || 56915 match.dayPeriod(dateString, { 56916 width: "narrow", 56917 context: "formatting", 56918 }) 56919 ); 56920 } 56921 } 56922 56923 set(date, _flags, value) { 56924 date.setHours((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0); 56925 return date; 56926 } 56927 56928 incompatibleTokens = ["b", "B", "H", "k", "t", "T"]; 56929} 56930 56931 56932/***/ }), 56933
vendor: 2,427 bytes, lines 56934-57008
56934/***/ "./node_modules/date-fns/parse/_lib/parsers/DateParser.mjs": 56935/*!*****************************************************************!*\ 56936 !*** ./node_modules/date-fns/parse/_lib/parsers/DateParser.mjs ***! 56937 \*****************************************************************/ 56938/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 56939 56940"use strict"; 56941__webpack_require__.r(__webpack_exports__); 56942/* harmony export */ __webpack_require__.d(__webpack_exports__, { 56943/* harmony export */ DateParser: () => (/* binding */ DateParser) 56944/* harmony export */ }); 56945/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 56946/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 56947/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 56948 56949 56950 56951 56952const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 56953const DAYS_IN_MONTH_LEAP_YEAR = [ 56954 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 56955]; 56956 56957// Day of the month 56958class DateParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 56959 priority = 90; 56960 subPriority = 1; 56961 56962 parse(dateString, token, match) { 56963 switch (token) { 56964 case "d": 56965 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.date, dateString); 56966 case "do": 56967 return match.ordinalNumber(dateString, { unit: "date" }); 56968 default: 56969 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 56970 } 56971 } 56972 56973 validate(date, value) { 56974 const year = date.getFullYear(); 56975 const isLeapYear = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.isLeapYearIndex)(year); 56976 const month = date.getMonth(); 56977 if (isLeapYear) { 56978 return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month]; 56979 } else { 56980 return value >= 1 && value <= DAYS_IN_MONTH[month]; 56981 } 56982 } 56983 56984 set(date, _flags, value) { 56985 date.setDate(value); 56986 date.setHours(0, 0, 0, 0); 56987 return date; 56988 } 56989 56990 incompatibleTokens = [ 56991 "Y", 56992 "R", 56993 "q", 56994 "Q", 56995 "w", 56996 "I", 56997 "D", 56998 "i", 56999 "e", 57000 "c", 57001 "t", 57002 "T", 57003 ]; 57004} 57005 57006 57007/***/ }), 57008
vendor: 2,257 bytes, lines 57009-57081
57009/***/ "./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs": 57010/*!**********************************************************************!*\ 57011 !*** ./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs ***! 57012 \**********************************************************************/ 57013/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57014 57015"use strict"; 57016__webpack_require__.r(__webpack_exports__); 57017/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57018/* harmony export */ DayOfYearParser: () => (/* binding */ DayOfYearParser) 57019/* harmony export */ }); 57020/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57021/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57022/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57023 57024 57025 57026 57027class DayOfYearParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57028 priority = 90; 57029 57030 subpriority = 1; 57031 57032 parse(dateString, token, match) { 57033 switch (token) { 57034 case "D": 57035 case "DD": 57036 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.dayOfYear, dateString); 57037 case "Do": 57038 return match.ordinalNumber(dateString, { unit: "date" }); 57039 default: 57040 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57041 } 57042 } 57043 57044 validate(date, value) { 57045 const year = date.getFullYear(); 57046 const isLeapYear = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.isLeapYearIndex)(year); 57047 if (isLeapYear) { 57048 return value >= 1 && value <= 366; 57049 } else { 57050 return value >= 1 && value <= 365; 57051 } 57052 } 57053 57054 set(date, _flags, value) { 57055 date.setMonth(0, value); 57056 date.setHours(0, 0, 0, 0); 57057 return date; 57058 } 57059 57060 incompatibleTokens = [ 57061 "Y", 57062 "R", 57063 "q", 57064 "Q", 57065 "M", 57066 "L", 57067 "w", 57068 "I", 57069 "d", 57070 "E", 57071 "i", 57072 "e", 57073 "c", 57074 "t", 57075 "T", 57076 ]; 57077} 57078 57079 57080/***/ }), 57081
vendor: 2,543 bytes, lines 57082-57160
57082/***/ "./node_modules/date-fns/parse/_lib/parsers/DayParser.mjs": 57083/*!****************************************************************!*\ 57084 !*** ./node_modules/date-fns/parse/_lib/parsers/DayParser.mjs ***! 57085 \****************************************************************/ 57086/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57087 57088"use strict"; 57089__webpack_require__.r(__webpack_exports__); 57090/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57091/* harmony export */ DayParser: () => (/* binding */ DayParser) 57092/* harmony export */ }); 57093/* harmony import */ var _setDay_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../setDay.mjs */ "./node_modules/date-fns/setDay.mjs"); 57094/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57095 57096 57097 57098// Day of week 57099class DayParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57100 priority = 90; 57101 57102 parse(dateString, token, match) { 57103 switch (token) { 57104 // Tue 57105 case "E": 57106 case "EE": 57107 case "EEE": 57108 return ( 57109 match.day(dateString, { 57110 width: "abbreviated", 57111 context: "formatting", 57112 }) || 57113 match.day(dateString, { width: "short", context: "formatting" }) || 57114 match.day(dateString, { width: "narrow", context: "formatting" }) 57115 ); 57116 57117 // T 57118 case "EEEEE": 57119 return match.day(dateString, { 57120 width: "narrow", 57121 context: "formatting", 57122 }); 57123 // Tu 57124 case "EEEEEE": 57125 return ( 57126 match.day(dateString, { width: "short", context: "formatting" }) || 57127 match.day(dateString, { width: "narrow", context: "formatting" }) 57128 ); 57129 57130 // Tuesday 57131 case "EEEE": 57132 default: 57133 return ( 57134 match.day(dateString, { width: "wide", context: "formatting" }) || 57135 match.day(dateString, { 57136 width: "abbreviated", 57137 context: "formatting", 57138 }) || 57139 match.day(dateString, { width: "short", context: "formatting" }) || 57140 match.day(dateString, { width: "narrow", context: "formatting" }) 57141 ); 57142 } 57143 } 57144 57145 validate(_date, value) { 57146 return value >= 0 && value <= 6; 57147 } 57148 57149 set(date, _flags, value, options) { 57150 date = (0,_setDay_mjs__WEBPACK_IMPORTED_MODULE_1__.setDay)(date, value, options); 57151 date.setHours(0, 0, 0, 0); 57152 return date; 57153 } 57154 57155 incompatibleTokens = ["D", "i", "e", "c", "t", "T"]; 57156} 57157 57158 57159/***/ }), 57160
vendor: 2,258 bytes, lines 57161-57231
57161/***/ "./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs": 57162/*!**********************************************************************!*\ 57163 !*** ./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs ***! 57164 \**********************************************************************/ 57165/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57166 57167"use strict"; 57168__webpack_require__.r(__webpack_exports__); 57169/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57170/* harmony export */ DayPeriodParser: () => (/* binding */ DayPeriodParser) 57171/* harmony export */ }); 57172/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57173/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57174 57175 57176 57177// in the morning, in the afternoon, in the evening, at night 57178class DayPeriodParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57179 priority = 80; 57180 57181 parse(dateString, token, match) { 57182 switch (token) { 57183 case "B": 57184 case "BB": 57185 case "BBB": 57186 return ( 57187 match.dayPeriod(dateString, { 57188 width: "abbreviated", 57189 context: "formatting", 57190 }) || 57191 match.dayPeriod(dateString, { 57192 width: "narrow", 57193 context: "formatting", 57194 }) 57195 ); 57196 57197 case "BBBBB": 57198 return match.dayPeriod(dateString, { 57199 width: "narrow", 57200 context: "formatting", 57201 }); 57202 case "BBBB": 57203 default: 57204 return ( 57205 match.dayPeriod(dateString, { 57206 width: "wide", 57207 context: "formatting", 57208 }) || 57209 match.dayPeriod(dateString, { 57210 width: "abbreviated", 57211 context: "formatting", 57212 }) || 57213 match.dayPeriod(dateString, { 57214 width: "narrow", 57215 context: "formatting", 57216 }) 57217 ); 57218 } 57219 } 57220 57221 set(date, _flags, value) { 57222 date.setHours((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0); 57223 return date; 57224 } 57225 57226 incompatibleTokens = ["a", "b", "t", "T"]; 57227} 57228 57229 57230/***/ }), 57231
vendor: 1,673 bytes, lines 57232-57286
57232/***/ "./node_modules/date-fns/parse/_lib/parsers/EraParser.mjs": 57233/*!****************************************************************!*\ 57234 !*** ./node_modules/date-fns/parse/_lib/parsers/EraParser.mjs ***! 57235 \****************************************************************/ 57236/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57237 57238"use strict"; 57239__webpack_require__.r(__webpack_exports__); 57240/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57241/* harmony export */ EraParser: () => (/* binding */ EraParser) 57242/* harmony export */ }); 57243/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57244 57245 57246class EraParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57247 priority = 140; 57248 57249 parse(dateString, token, match) { 57250 switch (token) { 57251 // AD, BC 57252 case "G": 57253 case "GG": 57254 case "GGG": 57255 return ( 57256 match.era(dateString, { width: "abbreviated" }) || 57257 match.era(dateString, { width: "narrow" }) 57258 ); 57259 57260 // A, B 57261 case "GGGGG": 57262 return match.era(dateString, { width: "narrow" }); 57263 // Anno Domini, Before Christ 57264 case "GGGG": 57265 default: 57266 return ( 57267 match.era(dateString, { width: "wide" }) || 57268 match.era(dateString, { width: "abbreviated" }) || 57269 match.era(dateString, { width: "narrow" }) 57270 ); 57271 } 57272 } 57273 57274 set(date, flags, value) { 57275 flags.era = value; 57276 date.setFullYear(value, 0, 1); 57277 date.setHours(0, 0, 0, 0); 57278 return date; 57279 } 57280 57281 incompatibleTokens = ["R", "u", "t", "T"]; 57282} 57283 57284 57285/***/ }), 57286
vendor: 1,528 bytes, lines 57287-57325
57287/***/ "./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs": 57288/*!*************************************************************************!*\ 57289 !*** ./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs ***! 57290 \*************************************************************************/ 57291/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57292 57293"use strict"; 57294__webpack_require__.r(__webpack_exports__); 57295/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57296/* harmony export */ ExtendedYearParser: () => (/* binding */ ExtendedYearParser) 57297/* harmony export */ }); 57298/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57299/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57300 57301 57302 57303class ExtendedYearParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57304 priority = 130; 57305 57306 parse(dateString, token) { 57307 if (token === "u") { 57308 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(4, dateString); 57309 } 57310 57311 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(token.length, dateString); 57312 } 57313 57314 set(date, _flags, value) { 57315 date.setFullYear(value, 0, 1); 57316 date.setHours(0, 0, 0, 0); 57317 return date; 57318 } 57319 57320 incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]; 57321} 57322 57323 57324/***/ }), 57325
vendor: 1,512 bytes, lines 57326-57361
57326/***/ "./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs": 57327/*!*****************************************************************************!*\ 57328 !*** ./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs ***! 57329 \*****************************************************************************/ 57330/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57331 57332"use strict"; 57333__webpack_require__.r(__webpack_exports__); 57334/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57335/* harmony export */ FractionOfSecondParser: () => (/* binding */ FractionOfSecondParser) 57336/* harmony export */ }); 57337/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57338/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57339 57340 57341 57342class FractionOfSecondParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57343 priority = 30; 57344 57345 parse(dateString, token) { 57346 const valueCallback = (value) => 57347 Math.trunc(value * Math.pow(10, -token.length + 3)); 57348 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback); 57349 } 57350 57351 set(date, _flags, value) { 57352 date.setMilliseconds(value); 57353 return date; 57354 } 57355 57356 incompatibleTokens = ["t", "T"]; 57357} 57358 57359 57360/***/ }), 57361
vendor: 2,000 bytes, lines 57362-57413
57362/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs": 57363/*!**********************************************************************!*\ 57364 !*** ./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs ***! 57365 \**********************************************************************/ 57366/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57367 57368"use strict"; 57369__webpack_require__.r(__webpack_exports__); 57370/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57371/* harmony export */ Hour0To11Parser: () => (/* binding */ Hour0To11Parser) 57372/* harmony export */ }); 57373/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57374/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57375/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57376 57377 57378 57379 57380class Hour0To11Parser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57381 priority = 70; 57382 57383 parse(dateString, token, match) { 57384 switch (token) { 57385 case "K": 57386 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour11h, dateString); 57387 case "Ko": 57388 return match.ordinalNumber(dateString, { unit: "hour" }); 57389 default: 57390 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57391 } 57392 } 57393 57394 validate(_date, value) { 57395 return value >= 0 && value <= 11; 57396 } 57397 57398 set(date, _flags, value) { 57399 const isPM = date.getHours() >= 12; 57400 if (isPM && value < 12) { 57401 date.setHours(value + 12, 0, 0, 0); 57402 } else { 57403 date.setHours(value, 0, 0, 0); 57404 } 57405 return date; 57406 } 57407 57408 incompatibleTokens = ["h", "H", "k", "t", "T"]; 57409} 57410 57411 57412/***/ }), 57413
vendor: 1,877 bytes, lines 57414-57460
57414/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs": 57415/*!**********************************************************************!*\ 57416 !*** ./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs ***! 57417 \**********************************************************************/ 57418/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57419 57420"use strict"; 57421__webpack_require__.r(__webpack_exports__); 57422/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57423/* harmony export */ Hour0to23Parser: () => (/* binding */ Hour0to23Parser) 57424/* harmony export */ }); 57425/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57426/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57427/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57428 57429 57430 57431 57432class Hour0to23Parser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57433 priority = 70; 57434 57435 parse(dateString, token, match) { 57436 switch (token) { 57437 case "H": 57438 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour23h, dateString); 57439 case "Ho": 57440 return match.ordinalNumber(dateString, { unit: "hour" }); 57441 default: 57442 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57443 } 57444 } 57445 57446 validate(_date, value) { 57447 return value >= 0 && value <= 23; 57448 } 57449 57450 set(date, _flags, value) { 57451 date.setHours(value, 0, 0, 0); 57452 return date; 57453 } 57454 57455 incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"]; 57456} 57457 57458 57459/***/ }), 57460
vendor: 1,929 bytes, lines 57461-57508
57461/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs": 57462/*!**********************************************************************!*\ 57463 !*** ./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs ***! 57464 \**********************************************************************/ 57465/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57466 57467"use strict"; 57468__webpack_require__.r(__webpack_exports__); 57469/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57470/* harmony export */ Hour1To24Parser: () => (/* binding */ Hour1To24Parser) 57471/* harmony export */ }); 57472/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57473/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57474/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57475 57476 57477 57478 57479class Hour1To24Parser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57480 priority = 70; 57481 57482 parse(dateString, token, match) { 57483 switch (token) { 57484 case "k": 57485 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour24h, dateString); 57486 case "ko": 57487 return match.ordinalNumber(dateString, { unit: "hour" }); 57488 default: 57489 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57490 } 57491 } 57492 57493 validate(_date, value) { 57494 return value >= 1 && value <= 24; 57495 } 57496 57497 set(date, _flags, value) { 57498 const hours = value <= 24 ? value % 24 : value; 57499 date.setHours(hours, 0, 0, 0); 57500 return date; 57501 } 57502 57503 incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"]; 57504} 57505 57506 57507/***/ }), 57508
vendor: 2,073 bytes, lines 57509-57562
57509/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs": 57510/*!**********************************************************************!*\ 57511 !*** ./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs ***! 57512 \**********************************************************************/ 57513/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57514 57515"use strict"; 57516__webpack_require__.r(__webpack_exports__); 57517/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57518/* harmony export */ Hour1to12Parser: () => (/* binding */ Hour1to12Parser) 57519/* harmony export */ }); 57520/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57521/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57522/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57523 57524 57525 57526 57527class Hour1to12Parser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57528 priority = 70; 57529 57530 parse(dateString, token, match) { 57531 switch (token) { 57532 case "h": 57533 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour12h, dateString); 57534 case "ho": 57535 return match.ordinalNumber(dateString, { unit: "hour" }); 57536 default: 57537 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57538 } 57539 } 57540 57541 validate(_date, value) { 57542 return value >= 1 && value <= 12; 57543 } 57544 57545 set(date, _flags, value) { 57546 const isPM = date.getHours() >= 12; 57547 if (isPM && value < 12) { 57548 date.setHours(value + 12, 0, 0, 0); 57549 } else if (!isPM && value === 12) { 57550 date.setHours(0, 0, 0, 0); 57551 } else { 57552 date.setHours(value, 0, 0, 0); 57553 } 57554 return date; 57555 } 57556 57557 incompatibleTokens = ["H", "K", "k", "t", "T"]; 57558} 57559 57560 57561/***/ }), 57562
vendor: 3,792 bytes, lines 57563-57696
57563/***/ "./node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs": 57564/*!*******************************************************************!*\ 57565 !*** ./node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs ***! 57566 \*******************************************************************/ 57567/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57568 57569"use strict"; 57570__webpack_require__.r(__webpack_exports__); 57571/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57572/* harmony export */ ISODayParser: () => (/* binding */ ISODayParser) 57573/* harmony export */ }); 57574/* harmony import */ var _setISODay_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setISODay.mjs */ "./node_modules/date-fns/setISODay.mjs"); 57575/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57576/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57577 57578 57579 57580 57581// ISO day of week 57582class ISODayParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57583 priority = 90; 57584 57585 parse(dateString, token, match) { 57586 const valueCallback = (value) => { 57587 if (value === 0) { 57588 return 7; 57589 } 57590 return value; 57591 }; 57592 57593 switch (token) { 57594 // 2 57595 case "i": 57596 case "ii": // 02 57597 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57598 // 2nd 57599 case "io": 57600 return match.ordinalNumber(dateString, { unit: "day" }); 57601 // Tue 57602 case "iii": 57603 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 57604 match.day(dateString, { 57605 width: "abbreviated", 57606 context: "formatting", 57607 }) || 57608 match.day(dateString, { 57609 width: "short", 57610 context: "formatting", 57611 }) || 57612 match.day(dateString, { 57613 width: "narrow", 57614 context: "formatting", 57615 }), 57616 valueCallback, 57617 ); 57618 // T 57619 case "iiiii": 57620 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 57621 match.day(dateString, { 57622 width: "narrow", 57623 context: "formatting", 57624 }), 57625 valueCallback, 57626 ); 57627 // Tu 57628 case "iiiiii": 57629 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 57630 match.day(dateString, { 57631 width: "short", 57632 context: "formatting", 57633 }) || 57634 match.day(dateString, { 57635 width: "narrow", 57636 context: "formatting", 57637 }), 57638 valueCallback, 57639 ); 57640 // Tuesday 57641 case "iiii": 57642 default: 57643 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 57644 match.day(dateString, { 57645 width: "wide", 57646 context: "formatting", 57647 }) || 57648 match.day(dateString, { 57649 width: "abbreviated", 57650 context: "formatting", 57651 }) || 57652 match.day(dateString, { 57653 width: "short", 57654 context: "formatting", 57655 }) || 57656 match.day(dateString, { 57657 width: "narrow", 57658 context: "formatting", 57659 }), 57660 valueCallback, 57661 ); 57662 } 57663 } 57664 57665 validate(_date, value) { 57666 return value >= 1 && value <= 7; 57667 } 57668 57669 set(date, _flags, value) { 57670 date = (0,_setISODay_mjs__WEBPACK_IMPORTED_MODULE_2__.setISODay)(date, value); 57671 date.setHours(0, 0, 0, 0); 57672 return date; 57673 } 57674 57675 incompatibleTokens = [ 57676 "y", 57677 "Y", 57678 "u", 57679 "q", 57680 "Q", 57681 "M", 57682 "L", 57683 "w", 57684 "d", 57685 "D", 57686 "E", 57687 "e", 57688 "c", 57689 "t", 57690 "T", 57691 ]; 57692} 57693 57694 57695/***/ }), 57696
vendor: 3,148 bytes, lines 57697-57761
57697/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs": 57698/*!************************************************************************!*\ 57699 !*** ./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs ***! 57700 \************************************************************************/ 57701/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57702 57703"use strict"; 57704__webpack_require__.r(__webpack_exports__); 57705/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57706/* harmony export */ ISOTimezoneParser: () => (/* binding */ ISOTimezoneParser) 57707/* harmony export */ }); 57708/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 57709/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.mjs */ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs"); 57710/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57711/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57712/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57713 57714 57715 57716 57717 57718 57719// Timezone (ISO-8601) 57720class ISOTimezoneParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57721 priority = 10; 57722 57723 parse(dateString, token) { 57724 switch (token) { 57725 case "x": 57726 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57727 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalMinutes, 57728 dateString, 57729 ); 57730 case "xx": 57731 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basic, dateString); 57732 case "xxxx": 57733 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57734 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalSeconds, 57735 dateString, 57736 ); 57737 case "xxxxx": 57738 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57739 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extendedOptionalSeconds, 57740 dateString, 57741 ); 57742 case "xxx": 57743 default: 57744 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extended, dateString); 57745 } 57746 } 57747 57748 set(date, flags, value) { 57749 if (flags.timestampIsSet) return date; 57750 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__.constructFrom)( 57751 date, 57752 date.getTime() - (0,_lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_4__.getTimezoneOffsetInMilliseconds)(date) - value, 57753 ); 57754 } 57755 57756 incompatibleTokens = ["t", "T", "X"]; 57757} 57758 57759 57760/***/ }), 57761
vendor: 3,200 bytes, lines 57762-57826
57762/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs": 57763/*!*****************************************************************************!*\ 57764 !*** ./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs ***! 57765 \*****************************************************************************/ 57766/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57767 57768"use strict"; 57769__webpack_require__.r(__webpack_exports__); 57770/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57771/* harmony export */ ISOTimezoneWithZParser: () => (/* binding */ ISOTimezoneWithZParser) 57772/* harmony export */ }); 57773/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 57774/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.mjs */ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs"); 57775/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57776/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57777/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57778 57779 57780 57781 57782 57783 57784// Timezone (ISO-8601. +00:00 is `'Z'`) 57785class ISOTimezoneWithZParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57786 priority = 10; 57787 57788 parse(dateString, token) { 57789 switch (token) { 57790 case "X": 57791 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57792 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalMinutes, 57793 dateString, 57794 ); 57795 case "XX": 57796 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basic, dateString); 57797 case "XXXX": 57798 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57799 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalSeconds, 57800 dateString, 57801 ); 57802 case "XXXXX": 57803 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)( 57804 _constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extendedOptionalSeconds, 57805 dateString, 57806 ); 57807 case "XXX": 57808 default: 57809 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extended, dateString); 57810 } 57811 } 57812 57813 set(date, flags, value) { 57814 if (flags.timestampIsSet) return date; 57815 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_3__.constructFrom)( 57816 date, 57817 date.getTime() - (0,_lib_getTimezoneOffsetInMilliseconds_mjs__WEBPACK_IMPORTED_MODULE_4__.getTimezoneOffsetInMilliseconds)(date) - value, 57818 ); 57819 } 57820 57821 incompatibleTokens = ["t", "T", "x"]; 57822} 57823 57824 57825/***/ }), 57826
vendor: 2,425 bytes, lines 57827-57892
57827/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs": 57828/*!********************************************************************!*\ 57829 !*** ./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs ***! 57830 \********************************************************************/ 57831/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57832 57833"use strict"; 57834__webpack_require__.r(__webpack_exports__); 57835/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57836/* harmony export */ ISOWeekParser: () => (/* binding */ ISOWeekParser) 57837/* harmony export */ }); 57838/* harmony import */ var _setISOWeek_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../setISOWeek.mjs */ "./node_modules/date-fns/setISOWeek.mjs"); 57839/* harmony import */ var _startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfISOWeek.mjs */ "./node_modules/date-fns/startOfISOWeek.mjs"); 57840/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 57841/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57842/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57843 57844 57845 57846 57847 57848 57849// ISO week of year 57850class ISOWeekParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57851 priority = 100; 57852 57853 parse(dateString, token, match) { 57854 switch (token) { 57855 case "I": 57856 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.week, dateString); 57857 case "Io": 57858 return match.ordinalNumber(dateString, { unit: "week" }); 57859 default: 57860 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 57861 } 57862 } 57863 57864 validate(_date, value) { 57865 return value >= 1 && value <= 53; 57866 } 57867 57868 set(date, _flags, value) { 57869 return (0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfISOWeek)((0,_setISOWeek_mjs__WEBPACK_IMPORTED_MODULE_4__.setISOWeek)(date, value)); 57870 } 57871 57872 incompatibleTokens = [ 57873 "y", 57874 "Y", 57875 "u", 57876 "q", 57877 "Q", 57878 "M", 57879 "L", 57880 "w", 57881 "d", 57882 "D", 57883 "e", 57884 "c", 57885 "t", 57886 "T", 57887 ]; 57888} 57889 57890 57891/***/ }), 57892
vendor: 2,194 bytes, lines 57893-57953
57893/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs": 57894/*!************************************************************************!*\ 57895 !*** ./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs ***! 57896 \************************************************************************/ 57897/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57898 57899"use strict"; 57900__webpack_require__.r(__webpack_exports__); 57901/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57902/* harmony export */ ISOWeekYearParser: () => (/* binding */ ISOWeekYearParser) 57903/* harmony export */ }); 57904/* harmony import */ var _startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfISOWeek.mjs */ "./node_modules/date-fns/startOfISOWeek.mjs"); 57905/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 57906/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57907/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57908 57909 57910 57911 57912 57913// ISO week-numbering year 57914class ISOWeekYearParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57915 priority = 130; 57916 57917 parse(dateString, token) { 57918 if (token === "R") { 57919 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(4, dateString); 57920 } 57921 57922 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(token.length, dateString); 57923 } 57924 57925 set(date, _flags, value) { 57926 const firstWeekOfYear = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, 0); 57927 firstWeekOfYear.setFullYear(value, 0, 4); 57928 firstWeekOfYear.setHours(0, 0, 0, 0); 57929 return (0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfISOWeek)(firstWeekOfYear); 57930 } 57931 57932 incompatibleTokens = [ 57933 "G", 57934 "y", 57935 "Y", 57936 "u", 57937 "Q", 57938 "q", 57939 "M", 57940 "L", 57941 "w", 57942 "d", 57943 "D", 57944 "e", 57945 "c", 57946 "t", 57947 "T", 57948 ]; 57949} 57950 57951 57952/***/ }), 57953
vendor: 3,525 bytes, lines 57954-58065
57954/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs": 57955/*!*********************************************************************!*\ 57956 !*** ./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs ***! 57957 \*********************************************************************/ 57958/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 57959 57960"use strict"; 57961__webpack_require__.r(__webpack_exports__); 57962/* harmony export */ __webpack_require__.d(__webpack_exports__, { 57963/* harmony export */ LocalDayParser: () => (/* binding */ LocalDayParser) 57964/* harmony export */ }); 57965/* harmony import */ var _setDay_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setDay.mjs */ "./node_modules/date-fns/setDay.mjs"); 57966/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 57967/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 57968 57969 57970 57971 57972// Local day of week 57973class LocalDayParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 57974 priority = 90; 57975 parse(dateString, token, match, options) { 57976 const valueCallback = (value) => { 57977 // We want here floor instead of trunc, so we get -7 for value 0 instead of 0 57978 const wholeWeekDays = Math.floor((value - 1) / 7) * 7; 57979 return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays; 57980 }; 57981 57982 switch (token) { 57983 // 3 57984 case "e": 57985 case "ee": // 03 57986 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback); 57987 // 3rd 57988 case "eo": 57989 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 57990 match.ordinalNumber(dateString, { 57991 unit: "day", 57992 }), 57993 valueCallback, 57994 ); 57995 // Tue 57996 case "eee": 57997 return ( 57998 match.day(dateString, { 57999 width: "abbreviated", 58000 context: "formatting", 58001 }) || 58002 match.day(dateString, { width: "short", context: "formatting" }) || 58003 match.day(dateString, { width: "narrow", context: "formatting" }) 58004 ); 58005 58006 // T 58007 case "eeeee": 58008 return match.day(dateString, { 58009 width: "narrow", 58010 context: "formatting", 58011 }); 58012 // Tu 58013 case "eeeeee": 58014 return ( 58015 match.day(dateString, { width: "short", context: "formatting" }) || 58016 match.day(dateString, { width: "narrow", context: "formatting" }) 58017 ); 58018 58019 // Tuesday 58020 case "eeee": 58021 default: 58022 return ( 58023 match.day(dateString, { width: "wide", context: "formatting" }) || 58024 match.day(dateString, { 58025 width: "abbreviated", 58026 context: "formatting", 58027 }) || 58028 match.day(dateString, { width: "short", context: "formatting" }) || 58029 match.day(dateString, { width: "narrow", context: "formatting" }) 58030 ); 58031 } 58032 } 58033 58034 validate(_date, value) { 58035 return value >= 0 && value <= 6; 58036 } 58037 58038 set(date, _flags, value, options) { 58039 date = (0,_setDay_mjs__WEBPACK_IMPORTED_MODULE_2__.setDay)(date, value, options); 58040 date.setHours(0, 0, 0, 0); 58041 return date; 58042 } 58043 58044 incompatibleTokens = [ 58045 "y", 58046 "R", 58047 "u", 58048 "q", 58049 "Q", 58050 "M", 58051 "L", 58052 "I", 58053 "d", 58054 "D", 58055 "E", 58056 "i", 58057 "c", 58058 "t", 58059 "T", 58060 ]; 58061} 58062 58063 58064/***/ }), 58065
vendor: 2,429 bytes, lines 58066-58130
58066/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs": 58067/*!**********************************************************************!*\ 58068 !*** ./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs ***! 58069 \**********************************************************************/ 58070/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58071 58072"use strict"; 58073__webpack_require__.r(__webpack_exports__); 58074/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58075/* harmony export */ LocalWeekParser: () => (/* binding */ LocalWeekParser) 58076/* harmony export */ }); 58077/* harmony import */ var _setWeek_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../setWeek.mjs */ "./node_modules/date-fns/setWeek.mjs"); 58078/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 58079/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58080/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58081/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58082 58083 58084 58085 58086 58087 58088// Local week of year 58089class LocalWeekParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58090 priority = 100; 58091 58092 parse(dateString, token, match) { 58093 switch (token) { 58094 case "w": 58095 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.week, dateString); 58096 case "wo": 58097 return match.ordinalNumber(dateString, { unit: "week" }); 58098 default: 58099 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 58100 } 58101 } 58102 58103 validate(_date, value) { 58104 return value >= 1 && value <= 53; 58105 } 58106 58107 set(date, _flags, value, options) { 58108 return (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)((0,_setWeek_mjs__WEBPACK_IMPORTED_MODULE_4__.setWeek)(date, value, options), options); 58109 } 58110 58111 incompatibleTokens = [ 58112 "y", 58113 "R", 58114 "u", 58115 "q", 58116 "Q", 58117 "M", 58118 "L", 58119 "I", 58120 "d", 58121 "D", 58122 "i", 58123 "t", 58124 "T", 58125 ]; 58126} 58127 58128 58129/***/ }), 58130
vendor: 3,256 bytes, lines 58131-58223
58131/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs": 58132/*!**************************************************************************!*\ 58133 !*** ./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs ***! 58134 \**************************************************************************/ 58135/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58136 58137"use strict"; 58138__webpack_require__.r(__webpack_exports__); 58139/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58140/* harmony export */ LocalWeekYearParser: () => (/* binding */ LocalWeekYearParser) 58141/* harmony export */ }); 58142/* harmony import */ var _getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../getWeekYear.mjs */ "./node_modules/date-fns/getWeekYear.mjs"); 58143/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 58144/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58145/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58146 58147 58148 58149 58150 58151// Local week-numbering year 58152class LocalWeekYearParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58153 priority = 130; 58154 58155 parse(dateString, token, match) { 58156 const valueCallback = (year) => ({ 58157 year, 58158 isTwoDigitYear: token === "YY", 58159 }); 58160 58161 switch (token) { 58162 case "Y": 58163 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(4, dateString), valueCallback); 58164 case "Yo": 58165 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58166 match.ordinalNumber(dateString, { 58167 unit: "year", 58168 }), 58169 valueCallback, 58170 ); 58171 default: 58172 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback); 58173 } 58174 } 58175 58176 validate(_date, value) { 58177 return value.isTwoDigitYear || value.year > 0; 58178 } 58179 58180 set(date, flags, value, options) { 58181 const currentYear = (0,_getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_2__.getWeekYear)(date, options); 58182 58183 if (value.isTwoDigitYear) { 58184 const normalizedTwoDigitYear = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.normalizeTwoDigitYear)( 58185 value.year, 58186 currentYear, 58187 ); 58188 date.setFullYear( 58189 normalizedTwoDigitYear, 58190 0, 58191 options.firstWeekContainsDate, 58192 ); 58193 date.setHours(0, 0, 0, 0); 58194 return (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(date, options); 58195 } 58196 58197 const year = 58198 !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year; 58199 date.setFullYear(year, 0, options.firstWeekContainsDate); 58200 date.setHours(0, 0, 0, 0); 58201 return (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(date, options); 58202 } 58203 58204 incompatibleTokens = [ 58205 "y", 58206 "R", 58207 "u", 58208 "Q", 58209 "q", 58210 "M", 58211 "L", 58212 "I", 58213 "d", 58214 "D", 58215 "i", 58216 "t", 58217 "T", 58218 ]; 58219} 58220 58221 58222/***/ }), 58223
vendor: 1,831 bytes, lines 58224-58270
58224/***/ "./node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs": 58225/*!*******************************************************************!*\ 58226 !*** ./node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs ***! 58227 \*******************************************************************/ 58228/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58229 58230"use strict"; 58231__webpack_require__.r(__webpack_exports__); 58232/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58233/* harmony export */ MinuteParser: () => (/* binding */ MinuteParser) 58234/* harmony export */ }); 58235/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58236/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58237/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58238 58239 58240 58241 58242class MinuteParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58243 priority = 60; 58244 58245 parse(dateString, token, match) { 58246 switch (token) { 58247 case "m": 58248 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.minute, dateString); 58249 case "mo": 58250 return match.ordinalNumber(dateString, { unit: "minute" }); 58251 default: 58252 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 58253 } 58254 } 58255 58256 validate(_date, value) { 58257 return value >= 0 && value <= 59; 58258 } 58259 58260 set(date, _flags, value) { 58261 date.setMinutes(value, 0, 0); 58262 return date; 58263 } 58264 58265 incompatibleTokens = ["t", "T"]; 58266} 58267 58268 58269/***/ }), 58270
vendor: 3,181 bytes, lines 58271-58372
58271/***/ "./node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs": 58272/*!******************************************************************!*\ 58273 !*** ./node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs ***! 58274 \******************************************************************/ 58275/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58276 58277"use strict"; 58278__webpack_require__.r(__webpack_exports__); 58279/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58280/* harmony export */ MonthParser: () => (/* binding */ MonthParser) 58281/* harmony export */ }); 58282/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58283/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58284/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58285 58286 58287 58288 58289class MonthParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58290 incompatibleTokens = [ 58291 "Y", 58292 "R", 58293 "q", 58294 "Q", 58295 "L", 58296 "w", 58297 "I", 58298 "D", 58299 "i", 58300 "e", 58301 "c", 58302 "t", 58303 "T", 58304 ]; 58305 58306 priority = 110; 58307 58308 parse(dateString, token, match) { 58309 const valueCallback = (value) => value - 1; 58310 58311 switch (token) { 58312 // 1, 2, ..., 12 58313 case "M": 58314 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58315 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.month, dateString), 58316 valueCallback, 58317 ); 58318 // 01, 02, ..., 12 58319 case "MM": 58320 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(2, dateString), valueCallback); 58321 // 1st, 2nd, ..., 12th 58322 case "Mo": 58323 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58324 match.ordinalNumber(dateString, { 58325 unit: "month", 58326 }), 58327 valueCallback, 58328 ); 58329 // Jan, Feb, ..., Dec 58330 case "MMM": 58331 return ( 58332 match.month(dateString, { 58333 width: "abbreviated", 58334 context: "formatting", 58335 }) || 58336 match.month(dateString, { width: "narrow", context: "formatting" }) 58337 ); 58338 58339 // J, F, ..., D 58340 case "MMMMM": 58341 return match.month(dateString, { 58342 width: "narrow", 58343 context: "formatting", 58344 }); 58345 // January, February, ..., December 58346 case "MMMM": 58347 default: 58348 return ( 58349 match.month(dateString, { width: "wide", context: "formatting" }) || 58350 match.month(dateString, { 58351 width: "abbreviated", 58352 context: "formatting", 58353 }) || 58354 match.month(dateString, { width: "narrow", context: "formatting" }) 58355 ); 58356 } 58357 } 58358 58359 validate(_date, value) { 58360 return value >= 0 && value <= 11; 58361 } 58362 58363 set(date, _flags, value) { 58364 date.setMonth(value, 1); 58365 date.setHours(0, 0, 0, 0); 58366 return date; 58367 } 58368} 58369 58370 58371/***/ }), 58372
vendor: 2,695 bytes, lines 58373-58470
58373/***/ "./node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs": 58374/*!********************************************************************!*\ 58375 !*** ./node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs ***! 58376 \********************************************************************/ 58377/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58378 58379"use strict"; 58380__webpack_require__.r(__webpack_exports__); 58381/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58382/* harmony export */ QuarterParser: () => (/* binding */ QuarterParser) 58383/* harmony export */ }); 58384/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58385/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58386 58387 58388 58389class QuarterParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58390 priority = 120; 58391 58392 parse(dateString, token, match) { 58393 switch (token) { 58394 // 1, 2, 3, 4 58395 case "Q": 58396 case "QQ": // 01, 02, 03, 04 58397 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 58398 // 1st, 2nd, 3rd, 4th 58399 case "Qo": 58400 return match.ordinalNumber(dateString, { unit: "quarter" }); 58401 // Q1, Q2, Q3, Q4 58402 case "QQQ": 58403 return ( 58404 match.quarter(dateString, { 58405 width: "abbreviated", 58406 context: "formatting", 58407 }) || 58408 match.quarter(dateString, { 58409 width: "narrow", 58410 context: "formatting", 58411 }) 58412 ); 58413 58414 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 58415 case "QQQQQ": 58416 return match.quarter(dateString, { 58417 width: "narrow", 58418 context: "formatting", 58419 }); 58420 // 1st quarter, 2nd quarter, ... 58421 case "QQQQ": 58422 default: 58423 return ( 58424 match.quarter(dateString, { 58425 width: "wide", 58426 context: "formatting", 58427 }) || 58428 match.quarter(dateString, { 58429 width: "abbreviated", 58430 context: "formatting", 58431 }) || 58432 match.quarter(dateString, { 58433 width: "narrow", 58434 context: "formatting", 58435 }) 58436 ); 58437 } 58438 } 58439 58440 validate(_date, value) { 58441 return value >= 1 && value <= 4; 58442 } 58443 58444 set(date, _flags, value) { 58445 date.setMonth((value - 1) * 3, 1); 58446 date.setHours(0, 0, 0, 0); 58447 return date; 58448 } 58449 58450 incompatibleTokens = [ 58451 "Y", 58452 "R", 58453 "q", 58454 "M", 58455 "L", 58456 "w", 58457 "I", 58458 "d", 58459 "D", 58460 "i", 58461 "e", 58462 "c", 58463 "t", 58464 "T", 58465 ]; 58466} 58467 58468 58469/***/ }), 58470
vendor: 1,828 bytes, lines 58471-58517
58471/***/ "./node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs": 58472/*!*******************************************************************!*\ 58473 !*** ./node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs ***! 58474 \*******************************************************************/ 58475/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58476 58477"use strict"; 58478__webpack_require__.r(__webpack_exports__); 58479/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58480/* harmony export */ SecondParser: () => (/* binding */ SecondParser) 58481/* harmony export */ }); 58482/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58483/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58484/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58485 58486 58487 58488 58489class SecondParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58490 priority = 50; 58491 58492 parse(dateString, token, match) { 58493 switch (token) { 58494 case "s": 58495 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.second, dateString); 58496 case "so": 58497 return match.ordinalNumber(dateString, { unit: "second" }); 58498 default: 58499 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 58500 } 58501 } 58502 58503 validate(_date, value) { 58504 return value >= 0 && value <= 59; 58505 } 58506 58507 set(date, _flags, value) { 58508 date.setSeconds(value, 0); 58509 return date; 58510 } 58511 58512 incompatibleTokens = ["t", "T"]; 58513} 58514 58515 58516/***/ }), 58517
vendor: 3,608 bytes, lines 58518-58630
58518/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs": 58519/*!*******************************************************************************!*\ 58520 !*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs ***! 58521 \*******************************************************************************/ 58522/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58523 58524"use strict"; 58525__webpack_require__.r(__webpack_exports__); 58526/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58527/* harmony export */ StandAloneLocalDayParser: () => (/* binding */ StandAloneLocalDayParser) 58528/* harmony export */ }); 58529/* harmony import */ var _setDay_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setDay.mjs */ "./node_modules/date-fns/setDay.mjs"); 58530/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58531/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58532 58533 58534 58535 58536// Stand-alone local day of week 58537class StandAloneLocalDayParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58538 priority = 90; 58539 58540 parse(dateString, token, match, options) { 58541 const valueCallback = (value) => { 58542 // We want here floor instead of trunc, so we get -7 for value 0 instead of 0 58543 const wholeWeekDays = Math.floor((value - 1) / 7) * 7; 58544 return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays; 58545 }; 58546 58547 switch (token) { 58548 // 3 58549 case "c": 58550 case "cc": // 03 58551 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback); 58552 // 3rd 58553 case "co": 58554 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58555 match.ordinalNumber(dateString, { 58556 unit: "day", 58557 }), 58558 valueCallback, 58559 ); 58560 // Tue 58561 case "ccc": 58562 return ( 58563 match.day(dateString, { 58564 width: "abbreviated", 58565 context: "standalone", 58566 }) || 58567 match.day(dateString, { width: "short", context: "standalone" }) || 58568 match.day(dateString, { width: "narrow", context: "standalone" }) 58569 ); 58570 58571 // T 58572 case "ccccc": 58573 return match.day(dateString, { 58574 width: "narrow", 58575 context: "standalone", 58576 }); 58577 // Tu 58578 case "cccccc": 58579 return ( 58580 match.day(dateString, { width: "short", context: "standalone" }) || 58581 match.day(dateString, { width: "narrow", context: "standalone" }) 58582 ); 58583 58584 // Tuesday 58585 case "cccc": 58586 default: 58587 return ( 58588 match.day(dateString, { width: "wide", context: "standalone" }) || 58589 match.day(dateString, { 58590 width: "abbreviated", 58591 context: "standalone", 58592 }) || 58593 match.day(dateString, { width: "short", context: "standalone" }) || 58594 match.day(dateString, { width: "narrow", context: "standalone" }) 58595 ); 58596 } 58597 } 58598 58599 validate(_date, value) { 58600 return value >= 0 && value <= 6; 58601 } 58602 58603 set(date, _flags, value, options) { 58604 date = (0,_setDay_mjs__WEBPACK_IMPORTED_MODULE_2__.setDay)(date, value, options); 58605 date.setHours(0, 0, 0, 0); 58606 return date; 58607 } 58608 58609 incompatibleTokens = [ 58610 "y", 58611 "R", 58612 "u", 58613 "q", 58614 "Q", 58615 "M", 58616 "L", 58617 "I", 58618 "d", 58619 "D", 58620 "E", 58621 "i", 58622 "e", 58623 "t", 58624 "T", 58625 ]; 58626} 58627 58628 58629/***/ }), 58630
vendor: 3,251 bytes, lines 58631-58732
58631/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs": 58632/*!****************************************************************************!*\ 58633 !*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs ***! 58634 \****************************************************************************/ 58635/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58636 58637"use strict"; 58638__webpack_require__.r(__webpack_exports__); 58639/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58640/* harmony export */ StandAloneMonthParser: () => (/* binding */ StandAloneMonthParser) 58641/* harmony export */ }); 58642/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58643/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58644/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58645 58646 58647 58648 58649class StandAloneMonthParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58650 priority = 110; 58651 58652 parse(dateString, token, match) { 58653 const valueCallback = (value) => value - 1; 58654 58655 switch (token) { 58656 // 1, 2, ..., 12 58657 case "L": 58658 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58659 (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_mjs__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.month, dateString), 58660 valueCallback, 58661 ); 58662 // 01, 02, ..., 12 58663 case "LL": 58664 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(2, dateString), valueCallback); 58665 // 1st, 2nd, ..., 12th 58666 case "Lo": 58667 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58668 match.ordinalNumber(dateString, { 58669 unit: "month", 58670 }), 58671 valueCallback, 58672 ); 58673 // Jan, Feb, ..., Dec 58674 case "LLL": 58675 return ( 58676 match.month(dateString, { 58677 width: "abbreviated", 58678 context: "standalone", 58679 }) || 58680 match.month(dateString, { width: "narrow", context: "standalone" }) 58681 ); 58682 58683 // J, F, ..., D 58684 case "LLLLL": 58685 return match.month(dateString, { 58686 width: "narrow", 58687 context: "standalone", 58688 }); 58689 // January, February, ..., December 58690 case "LLLL": 58691 default: 58692 return ( 58693 match.month(dateString, { width: "wide", context: "standalone" }) || 58694 match.month(dateString, { 58695 width: "abbreviated", 58696 context: "standalone", 58697 }) || 58698 match.month(dateString, { width: "narrow", context: "standalone" }) 58699 ); 58700 } 58701 } 58702 58703 validate(_date, value) { 58704 return value >= 0 && value <= 11; 58705 } 58706 58707 set(date, _flags, value) { 58708 date.setMonth(value, 1); 58709 date.setHours(0, 0, 0, 0); 58710 return date; 58711 } 58712 58713 incompatibleTokens = [ 58714 "Y", 58715 "R", 58716 "q", 58717 "Q", 58718 "M", 58719 "w", 58720 "I", 58721 "D", 58722 "i", 58723 "e", 58724 "c", 58725 "t", 58726 "T", 58727 ]; 58728} 58729 58730 58731/***/ }), 58732
vendor: 2,765 bytes, lines 58733-58830
58733/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs": 58734/*!******************************************************************************!*\ 58735 !*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs ***! 58736 \******************************************************************************/ 58737/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58738 58739"use strict"; 58740__webpack_require__.r(__webpack_exports__); 58741/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58742/* harmony export */ StandAloneQuarterParser: () => (/* binding */ StandAloneQuarterParser) 58743/* harmony export */ }); 58744/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58745/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58746 58747 58748 58749class StandAloneQuarterParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58750 priority = 120; 58751 58752 parse(dateString, token, match) { 58753 switch (token) { 58754 // 1, 2, 3, 4 58755 case "q": 58756 case "qq": // 01, 02, 03, 04 58757 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString); 58758 // 1st, 2nd, 3rd, 4th 58759 case "qo": 58760 return match.ordinalNumber(dateString, { unit: "quarter" }); 58761 // Q1, Q2, Q3, Q4 58762 case "qqq": 58763 return ( 58764 match.quarter(dateString, { 58765 width: "abbreviated", 58766 context: "standalone", 58767 }) || 58768 match.quarter(dateString, { 58769 width: "narrow", 58770 context: "standalone", 58771 }) 58772 ); 58773 58774 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 58775 case "qqqqq": 58776 return match.quarter(dateString, { 58777 width: "narrow", 58778 context: "standalone", 58779 }); 58780 // 1st quarter, 2nd quarter, ... 58781 case "qqqq": 58782 default: 58783 return ( 58784 match.quarter(dateString, { 58785 width: "wide", 58786 context: "standalone", 58787 }) || 58788 match.quarter(dateString, { 58789 width: "abbreviated", 58790 context: "standalone", 58791 }) || 58792 match.quarter(dateString, { 58793 width: "narrow", 58794 context: "standalone", 58795 }) 58796 ); 58797 } 58798 } 58799 58800 validate(_date, value) { 58801 return value >= 1 && value <= 4; 58802 } 58803 58804 set(date, _flags, value) { 58805 date.setMonth((value - 1) * 3, 1); 58806 date.setHours(0, 0, 0, 0); 58807 return date; 58808 } 58809 58810 incompatibleTokens = [ 58811 "Y", 58812 "R", 58813 "Q", 58814 "M", 58815 "L", 58816 "w", 58817 "I", 58818 "d", 58819 "D", 58820 "i", 58821 "e", 58822 "c", 58823 "t", 58824 "T", 58825 ]; 58826} 58827 58828 58829/***/ }), 58830
vendor: 1,607 bytes, lines 58831-58865
58831/***/ "./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs": 58832/*!**********************************************************************************!*\ 58833 !*** ./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs ***! 58834 \**********************************************************************************/ 58835/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58836 58837"use strict"; 58838__webpack_require__.r(__webpack_exports__); 58839/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58840/* harmony export */ TimestampMillisecondsParser: () => (/* binding */ TimestampMillisecondsParser) 58841/* harmony export */ }); 58842/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 58843/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58844/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58845 58846 58847 58848 58849class TimestampMillisecondsParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58850 priority = 20; 58851 58852 parse(dateString) { 58853 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseAnyDigitsSigned)(dateString); 58854 } 58855 58856 set(date, _flags, value) { 58857 return [(0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, value), { timestampIsSet: true }]; 58858 } 58859 58860 incompatibleTokens = "*"; 58861} 58862 58863 58864/***/ }), 58865
vendor: 1,579 bytes, lines 58866-58900
58866/***/ "./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs": 58867/*!*****************************************************************************!*\ 58868 !*** ./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs ***! 58869 \*****************************************************************************/ 58870/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58871 58872"use strict"; 58873__webpack_require__.r(__webpack_exports__); 58874/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58875/* harmony export */ TimestampSecondsParser: () => (/* binding */ TimestampSecondsParser) 58876/* harmony export */ }); 58877/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 58878/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58879/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58880 58881 58882 58883 58884class TimestampSecondsParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58885 priority = 40; 58886 58887 parse(dateString) { 58888 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseAnyDigitsSigned)(dateString); 58889 } 58890 58891 set(date, _flags, value) { 58892 return [(0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, value * 1000), { timestampIsSet: true }]; 58893 } 58894 58895 incompatibleTokens = "*"; 58896} 58897 58898 58899/***/ }), 58900
vendor: 2,911 bytes, lines 58901-58977
58901/***/ "./node_modules/date-fns/parse/_lib/parsers/YearParser.mjs": 58902/*!*****************************************************************!*\ 58903 !*** ./node_modules/date-fns/parse/_lib/parsers/YearParser.mjs ***! 58904 \*****************************************************************/ 58905/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58906 58907"use strict"; 58908__webpack_require__.r(__webpack_exports__); 58909/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58910/* harmony export */ YearParser: () => (/* binding */ YearParser) 58911/* harmony export */ }); 58912/* harmony import */ var _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.mjs */ "./node_modules/date-fns/parse/_lib/Parser.mjs"); 58913/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.mjs */ "./node_modules/date-fns/parse/_lib/utils.mjs"); 58914 58915 58916 58917// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns 58918// | Year | y | yy | yyy | yyyy | yyyyy | 58919// |----------|-------|----|-------|-------|-------| 58920// | AD 1 | 1 | 01 | 001 | 0001 | 00001 | 58921// | AD 12 | 12 | 12 | 012 | 0012 | 00012 | 58922// | AD 123 | 123 | 23 | 123 | 0123 | 00123 | 58923// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | 58924// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | 58925class YearParser extends _Parser_mjs__WEBPACK_IMPORTED_MODULE_0__.Parser { 58926 priority = 130; 58927 incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]; 58928 58929 parse(dateString, token, match) { 58930 const valueCallback = (year) => ({ 58931 year, 58932 isTwoDigitYear: token === "yy", 58933 }); 58934 58935 switch (token) { 58936 case "y": 58937 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(4, dateString), valueCallback); 58938 case "yo": 58939 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)( 58940 match.ordinalNumber(dateString, { 58941 unit: "year", 58942 }), 58943 valueCallback, 58944 ); 58945 default: 58946 return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback); 58947 } 58948 } 58949 58950 validate(_date, value) { 58951 return value.isTwoDigitYear || value.year > 0; 58952 } 58953 58954 set(date, flags, value) { 58955 const currentYear = date.getFullYear(); 58956 58957 if (value.isTwoDigitYear) { 58958 const normalizedTwoDigitYear = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.normalizeTwoDigitYear)( 58959 value.year, 58960 currentYear, 58961 ); 58962 date.setFullYear(normalizedTwoDigitYear, 0, 1); 58963 date.setHours(0, 0, 0, 0); 58964 return date; 58965 } 58966 58967 const year = 58968 !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year; 58969 date.setFullYear(year, 0, 1); 58970 date.setHours(0, 0, 0, 0); 58971 return date; 58972 } 58973} 58974 58975 58976/***/ }), 58977
vendor: 5,459 bytes, lines 58978-59135
58978/***/ "./node_modules/date-fns/parse/_lib/utils.mjs": 58979/*!****************************************************!*\ 58980 !*** ./node_modules/date-fns/parse/_lib/utils.mjs ***! 58981 \****************************************************/ 58982/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 58983 58984"use strict"; 58985__webpack_require__.r(__webpack_exports__); 58986/* harmony export */ __webpack_require__.d(__webpack_exports__, { 58987/* harmony export */ dayPeriodEnumToHours: () => (/* binding */ dayPeriodEnumToHours), 58988/* harmony export */ isLeapYearIndex: () => (/* binding */ isLeapYearIndex), 58989/* harmony export */ mapValue: () => (/* binding */ mapValue), 58990/* harmony export */ normalizeTwoDigitYear: () => (/* binding */ normalizeTwoDigitYear), 58991/* harmony export */ parseAnyDigitsSigned: () => (/* binding */ parseAnyDigitsSigned), 58992/* harmony export */ parseNDigits: () => (/* binding */ parseNDigits), 58993/* harmony export */ parseNDigitsSigned: () => (/* binding */ parseNDigitsSigned), 58994/* harmony export */ parseNumericPattern: () => (/* binding */ parseNumericPattern), 58995/* harmony export */ parseTimezonePattern: () => (/* binding */ parseTimezonePattern) 58996/* harmony export */ }); 58997/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants.mjs */ "./node_modules/date-fns/constants.mjs"); 58998/* harmony import */ var _constants_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.mjs */ "./node_modules/date-fns/parse/_lib/constants.mjs"); 58999 59000 59001 59002function mapValue(parseFnResult, mapFn) { 59003 if (!parseFnResult) { 59004 return parseFnResult; 59005 } 59006 59007 return { 59008 value: mapFn(parseFnResult.value), 59009 rest: parseFnResult.rest, 59010 }; 59011} 59012 59013function parseNumericPattern(pattern, dateString) { 59014 const matchResult = dateString.match(pattern); 59015 59016 if (!matchResult) { 59017 return null; 59018 } 59019 59020 return { 59021 value: parseInt(matchResult[0], 10), 59022 rest: dateString.slice(matchResult[0].length), 59023 }; 59024} 59025 59026function parseTimezonePattern(pattern, dateString) { 59027 const matchResult = dateString.match(pattern); 59028 59029 if (!matchResult) { 59030 return null; 59031 } 59032 59033 // Input is 'Z' 59034 if (matchResult[0] === "Z") { 59035 return { 59036 value: 0, 59037 rest: dateString.slice(1), 59038 }; 59039 } 59040 59041 const sign = matchResult[1] === "+" ? 1 : -1; 59042 const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0; 59043 const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0; 59044 const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0; 59045 59046 return { 59047 value: 59048 sign * 59049 (hours * _constants_mjs__WEBPACK_IMPORTED_MODULE_0__.millisecondsInHour + 59050 minutes * _constants_mjs__WEBPACK_IMPORTED_MODULE_0__.millisecondsInMinute + 59051 seconds * _constants_mjs__WEBPACK_IMPORTED_MODULE_0__.millisecondsInSecond), 59052 rest: dateString.slice(matchResult[0].length), 59053 }; 59054} 59055 59056function parseAnyDigitsSigned(dateString) { 59057 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.anyDigitsSigned, dateString); 59058} 59059 59060function parseNDigits(n, dateString) { 59061 switch (n) { 59062 case 1: 59063 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.singleDigit, dateString); 59064 case 2: 59065 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.twoDigits, dateString); 59066 case 3: 59067 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.threeDigits, dateString); 59068 case 4: 59069 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.fourDigits, dateString); 59070 default: 59071 return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), dateString); 59072 } 59073} 59074 59075function parseNDigitsSigned(n, dateString) { 59076 switch (n) { 59077 case 1: 59078 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.singleDigitSigned, dateString); 59079 case 2: 59080 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.twoDigitsSigned, dateString); 59081 case 3: 59082 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.threeDigitsSigned, dateString); 59083 case 4: 59084 return parseNumericPattern(_constants_mjs__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.fourDigitsSigned, dateString); 59085 default: 59086 return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), dateString); 59087 } 59088} 59089 59090function dayPeriodEnumToHours(dayPeriod) { 59091 switch (dayPeriod) { 59092 case "morning": 59093 return 4; 59094 case "evening": 59095 return 17; 59096 case "pm": 59097 case "noon": 59098 case "afternoon": 59099 return 12; 59100 case "am": 59101 case "midnight": 59102 case "night": 59103 default: 59104 return 0; 59105 } 59106} 59107 59108function normalizeTwoDigitYear(twoDigitYear, currentYear) { 59109 const isCommonEra = currentYear > 0; 59110 // Absolute number of the current year: 59111 // 1 -> 1 AC 59112 // 0 -> 1 BC 59113 // -1 -> 2 BC 59114 const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear; 59115 59116 let result; 59117 if (absCurrentYear <= 50) { 59118 result = twoDigitYear || 100; 59119 } else { 59120 const rangeEnd = absCurrentYear + 50; 59121 const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100; 59122 const isPreviousCentury = twoDigitYear >= rangeEnd % 100; 59123 result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0); 59124 } 59125 59126 return isCommonEra ? result : 1 - result; 59127} 59128 59129function isLeapYearIndex(year) { 59130 return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0); 59131} 59132 59133 59134/***/ }), 59135
vendor: 3,337 bytes, lines 59136-59232
59136/***/ "./node_modules/date-fns/set.mjs": 59137/*!***************************************!*\ 59138 !*** ./node_modules/date-fns/set.mjs ***! 59139 \***************************************/ 59140/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59141 59142"use strict"; 59143__webpack_require__.r(__webpack_exports__); 59144/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59145/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59146/* harmony export */ set: () => (/* binding */ set) 59147/* harmony export */ }); 59148/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 59149/* harmony import */ var _setMonth_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./setMonth.mjs */ "./node_modules/date-fns/setMonth.mjs"); 59150/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59151 59152 59153 59154 59155/** 59156 * @name set 59157 * @category Common Helpers 59158 * @summary Set date values to a given date. 59159 * 59160 * @description 59161 * Set date values to a given date. 59162 * 59163 * Sets time values to date from object `values`. 59164 * A value is not set if it is undefined or null or doesn't exist in `values`. 59165 * 59166 * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts 59167 * to use native `Date#setX` methods. If you use this function, you may not want to include the 59168 * other `setX` functions that date-fns provides if you are concerned about the bundle size. 59169 * 59170 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59171 * 59172 * @param date - The date to be changed 59173 * @param values - The date values to be set 59174 * 59175 * @returns The new date with options set 59176 * 59177 * @example 59178 * // Transform 1 September 2014 into 20 October 2015 in a single line: 59179 * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 }) 59180 * //=> Tue Oct 20 2015 00:00:00 59181 * 59182 * @example 59183 * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00: 59184 * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 }) 59185 * //=> Mon Sep 01 2014 12:23:45 59186 */ 59187 59188function set(date, values) { 59189 let _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59190 59191 // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date 59192 if (isNaN(+_date)) { 59193 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, NaN); 59194 } 59195 59196 if (values.year != null) { 59197 _date.setFullYear(values.year); 59198 } 59199 59200 if (values.month != null) { 59201 _date = (0,_setMonth_mjs__WEBPACK_IMPORTED_MODULE_2__.setMonth)(_date, values.month); 59202 } 59203 59204 if (values.date != null) { 59205 _date.setDate(values.date); 59206 } 59207 59208 if (values.hours != null) { 59209 _date.setHours(values.hours); 59210 } 59211 59212 if (values.minutes != null) { 59213 _date.setMinutes(values.minutes); 59214 } 59215 59216 if (values.seconds != null) { 59217 _date.setSeconds(values.seconds); 59218 } 59219 59220 if (values.milliseconds != null) { 59221 _date.setMilliseconds(values.milliseconds); 59222 } 59223 59224 return _date; 59225} 59226 59227// Fallback for modularized imports: 59228/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (set); 59229 59230 59231/***/ }), 59232
vendor: 2,893 bytes, lines 59233-59310
59233/***/ "./node_modules/date-fns/setDay.mjs": 59234/*!******************************************!*\ 59235 !*** ./node_modules/date-fns/setDay.mjs ***! 59236 \******************************************/ 59237/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59238 59239"use strict"; 59240__webpack_require__.r(__webpack_exports__); 59241/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59242/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59243/* harmony export */ setDay: () => (/* binding */ setDay) 59244/* harmony export */ }); 59245/* harmony import */ var _addDays_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addDays.mjs */ "./node_modules/date-fns/addDays.mjs"); 59246/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59247/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 59248 59249 59250 59251 59252/** 59253 * The {@link setDay} function options. 59254 */ 59255 59256/** 59257 * @name setDay 59258 * @category Weekday Helpers 59259 * @summary Set the day of the week to the given date. 59260 * 59261 * @description 59262 * Set the day of the week to the given date. 59263 * 59264 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59265 * 59266 * @param date - The date to be changed 59267 * @param day - The day of the week of the new date 59268 * @param options - An object with options. 59269 * 59270 * @returns The new date with the day of the week set 59271 * 59272 * @example 59273 * // Set week day to Sunday, with the default weekStartsOn of Sunday: 59274 * const result = setDay(new Date(2014, 8, 1), 0) 59275 * //=> Sun Aug 31 2014 00:00:00 59276 * 59277 * @example 59278 * // Set week day to Sunday, with a weekStartsOn of Monday: 59279 * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 }) 59280 * //=> Sun Sep 07 2014 00:00:00 59281 */ 59282function setDay(date, day, options) { 59283 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)(); 59284 const weekStartsOn = 59285 options?.weekStartsOn ?? 59286 options?.locale?.options?.weekStartsOn ?? 59287 defaultOptions.weekStartsOn ?? 59288 defaultOptions.locale?.options?.weekStartsOn ?? 59289 0; 59290 59291 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_1__.toDate)(date); 59292 const currentDay = _date.getDay(); 59293 59294 const remainder = day % 7; 59295 const dayIndex = (remainder + 7) % 7; 59296 59297 const delta = 7 - weekStartsOn; 59298 const diff = 59299 day < 0 || day > 6 59300 ? day - ((currentDay + delta) % 7) 59301 : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7); 59302 return (0,_addDays_mjs__WEBPACK_IMPORTED_MODULE_2__.addDays)(_date, diff); 59303} 59304 59305// Fallback for modularized imports: 59306/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setDay); 59307 59308 59309/***/ }), 59310
vendor: 1,624 bytes, lines 59311-59357
59311/***/ "./node_modules/date-fns/setHours.mjs": 59312/*!********************************************!*\ 59313 !*** ./node_modules/date-fns/setHours.mjs ***! 59314 \********************************************/ 59315/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59316 59317"use strict"; 59318__webpack_require__.r(__webpack_exports__); 59319/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59320/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59321/* harmony export */ setHours: () => (/* binding */ setHours) 59322/* harmony export */ }); 59323/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59324 59325 59326/** 59327 * @name setHours 59328 * @category Hour Helpers 59329 * @summary Set the hours to the given date. 59330 * 59331 * @description 59332 * Set the hours to the given date. 59333 * 59334 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59335 * 59336 * @param date - The date to be changed 59337 * @param hours - The hours of the new date 59338 * 59339 * @returns The new date with the hours set 59340 * 59341 * @example 59342 * // Set 4 hours to 1 September 2014 11:30:00: 59343 * const result = setHours(new Date(2014, 8, 1, 11, 30), 4) 59344 * //=> Mon Sep 01 2014 04:30:00 59345 */ 59346function setHours(date, hours) { 59347 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59348 _date.setHours(hours); 59349 return _date; 59350} 59351 59352// Fallback for modularized imports: 59353/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setHours); 59354 59355 59356/***/ }), 59357
vendor: 2,226 bytes, lines 59358-59411
59358/***/ "./node_modules/date-fns/setISODay.mjs": 59359/*!*********************************************!*\ 59360 !*** ./node_modules/date-fns/setISODay.mjs ***! 59361 \*********************************************/ 59362/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59363 59364"use strict"; 59365__webpack_require__.r(__webpack_exports__); 59366/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59367/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59368/* harmony export */ setISODay: () => (/* binding */ setISODay) 59369/* harmony export */ }); 59370/* harmony import */ var _addDays_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addDays.mjs */ "./node_modules/date-fns/addDays.mjs"); 59371/* harmony import */ var _getISODay_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getISODay.mjs */ "./node_modules/date-fns/getISODay.mjs"); 59372/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59373 59374 59375 59376 59377/** 59378 * @name setISODay 59379 * @category Weekday Helpers 59380 * @summary Set the day of the ISO week to the given date. 59381 * 59382 * @description 59383 * Set the day of the ISO week to the given date. 59384 * ISO week starts with Monday. 59385 * 7 is the index of Sunday, 1 is the index of Monday etc. 59386 * 59387 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59388 * 59389 * @param date - The date to be changed 59390 * @param day - The day of the ISO week of the new date 59391 * 59392 * @returns The new date with the day of the ISO week set 59393 * 59394 * @example 59395 * // Set Sunday to 1 September 2014: 59396 * const result = setISODay(new Date(2014, 8, 1), 7) 59397 * //=> Sun Sep 07 2014 00:00:00 59398 */ 59399function setISODay(date, day) { 59400 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59401 const currentDay = (0,_getISODay_mjs__WEBPACK_IMPORTED_MODULE_1__.getISODay)(_date); 59402 const diff = day - currentDay; 59403 return (0,_addDays_mjs__WEBPACK_IMPORTED_MODULE_2__.addDays)(_date, diff); 59404} 59405 59406// Fallback for modularized imports: 59407/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setISODay); 59408 59409 59410/***/ }), 59411
vendor: 2,020 bytes, lines 59412-59463
59412/***/ "./node_modules/date-fns/setISOWeek.mjs": 59413/*!**********************************************!*\ 59414 !*** ./node_modules/date-fns/setISOWeek.mjs ***! 59415 \**********************************************/ 59416/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59417 59418"use strict"; 59419__webpack_require__.r(__webpack_exports__); 59420/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59421/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59422/* harmony export */ setISOWeek: () => (/* binding */ setISOWeek) 59423/* harmony export */ }); 59424/* harmony import */ var _getISOWeek_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getISOWeek.mjs */ "./node_modules/date-fns/getISOWeek.mjs"); 59425/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59426 59427 59428 59429/** 59430 * @name setISOWeek 59431 * @category ISO Week Helpers 59432 * @summary Set the ISO week to the given date. 59433 * 59434 * @description 59435 * Set the ISO week to the given date, saving the weekday number. 59436 * 59437 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 59438 * 59439 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59440 * 59441 * @param date - The date to be changed 59442 * @param week - The ISO week of the new date 59443 * 59444 * @returns The new date with the ISO week set 59445 * 59446 * @example 59447 * // Set the 53rd ISO week to 7 August 2004: 59448 * const result = setISOWeek(new Date(2004, 7, 7), 53) 59449 * //=> Sat Jan 01 2005 00:00:00 59450 */ 59451function setISOWeek(date, week) { 59452 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59453 const diff = (0,_getISOWeek_mjs__WEBPACK_IMPORTED_MODULE_1__.getISOWeek)(_date) - week; 59454 _date.setDate(_date.getDate() - diff * 7); 59455 return _date; 59456} 59457 59458// Fallback for modularized imports: 59459/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setISOWeek); 59460 59461 59462/***/ }), 59463
vendor: 1,785 bytes, lines 59464-59510
59464/***/ "./node_modules/date-fns/setMilliseconds.mjs": 59465/*!***************************************************!*\ 59466 !*** ./node_modules/date-fns/setMilliseconds.mjs ***! 59467 \***************************************************/ 59468/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59469 59470"use strict"; 59471__webpack_require__.r(__webpack_exports__); 59472/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59473/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59474/* harmony export */ setMilliseconds: () => (/* binding */ setMilliseconds) 59475/* harmony export */ }); 59476/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59477 59478 59479/** 59480 * @name setMilliseconds 59481 * @category Millisecond Helpers 59482 * @summary Set the milliseconds to the given date. 59483 * 59484 * @description 59485 * Set the milliseconds to the given date. 59486 * 59487 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59488 * 59489 * @param date - The date to be changed 59490 * @param milliseconds - The milliseconds of the new date 59491 * 59492 * @returns The new date with the milliseconds set 59493 * 59494 * @example 59495 * // Set 300 milliseconds to 1 September 2014 11:30:40.500: 59496 * const result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300) 59497 * //=> Mon Sep 01 2014 11:30:40.300 59498 */ 59499function setMilliseconds(date, milliseconds) { 59500 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59501 _date.setMilliseconds(milliseconds); 59502 return _date; 59503} 59504 59505// Fallback for modularized imports: 59506/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setMilliseconds); 59507 59508 59509/***/ }), 59510
vendor: 1,670 bytes, lines 59511-59557
59511/***/ "./node_modules/date-fns/setMinutes.mjs": 59512/*!**********************************************!*\ 59513 !*** ./node_modules/date-fns/setMinutes.mjs ***! 59514 \**********************************************/ 59515/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59516 59517"use strict"; 59518__webpack_require__.r(__webpack_exports__); 59519/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59520/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59521/* harmony export */ setMinutes: () => (/* binding */ setMinutes) 59522/* harmony export */ }); 59523/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59524 59525 59526/** 59527 * @name setMinutes 59528 * @category Minute Helpers 59529 * @summary Set the minutes to the given date. 59530 * 59531 * @description 59532 * Set the minutes to the given date. 59533 * 59534 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59535 * 59536 * @param date - The date to be changed 59537 * @param minutes - The minutes of the new date 59538 * 59539 * @returns The new date with the minutes set 59540 * 59541 * @example 59542 * // Set 45 minutes to 1 September 2014 11:30:40: 59543 * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45) 59544 * //=> Mon Sep 01 2014 11:45:40 59545 */ 59546function setMinutes(date, minutes) { 59547 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59548 _date.setMinutes(minutes); 59549 return _date; 59550} 59551 59552// Fallback for modularized imports: 59553/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setMinutes); 59554 59555 59556/***/ }), 59557
vendor: 2,470 bytes, lines 59558-59617
59558/***/ "./node_modules/date-fns/setMonth.mjs": 59559/*!********************************************!*\ 59560 !*** ./node_modules/date-fns/setMonth.mjs ***! 59561 \********************************************/ 59562/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59563 59564"use strict"; 59565__webpack_require__.r(__webpack_exports__); 59566/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59567/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59568/* harmony export */ setMonth: () => (/* binding */ setMonth) 59569/* harmony export */ }); 59570/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 59571/* harmony import */ var _getDaysInMonth_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getDaysInMonth.mjs */ "./node_modules/date-fns/getDaysInMonth.mjs"); 59572/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59573 59574 59575 59576 59577/** 59578 * @name setMonth 59579 * @category Month Helpers 59580 * @summary Set the month to the given date. 59581 * 59582 * @description 59583 * Set the month to the given date. 59584 * 59585 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59586 * 59587 * @param date - The date to be changed 59588 * @param month - The month index to set (0-11) 59589 * 59590 * @returns The new date with the month set 59591 * 59592 * @example 59593 * // Set February to 1 September 2014: 59594 * const result = setMonth(new Date(2014, 8, 1), 1) 59595 * //=> Sat Feb 01 2014 00:00:00 59596 */ 59597function setMonth(date, month) { 59598 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59599 const year = _date.getFullYear(); 59600 const day = _date.getDate(); 59601 59602 const dateWithDesiredMonth = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 59603 dateWithDesiredMonth.setFullYear(year, month, 15); 59604 dateWithDesiredMonth.setHours(0, 0, 0, 0); 59605 const daysInMonth = (0,_getDaysInMonth_mjs__WEBPACK_IMPORTED_MODULE_2__.getDaysInMonth)(dateWithDesiredMonth); 59606 // Set the last day of the new month 59607 // if the original date was the last day of the longer month 59608 _date.setMonth(month, Math.min(day, daysInMonth)); 59609 return _date; 59610} 59611 59612// Fallback for modularized imports: 59613/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setMonth); 59614 59615 59616/***/ }), 59617
vendor: 1,670 bytes, lines 59618-59664
59618/***/ "./node_modules/date-fns/setSeconds.mjs": 59619/*!**********************************************!*\ 59620 !*** ./node_modules/date-fns/setSeconds.mjs ***! 59621 \**********************************************/ 59622/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59623 59624"use strict"; 59625__webpack_require__.r(__webpack_exports__); 59626/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59627/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59628/* harmony export */ setSeconds: () => (/* binding */ setSeconds) 59629/* harmony export */ }); 59630/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59631 59632 59633/** 59634 * @name setSeconds 59635 * @category Second Helpers 59636 * @summary Set the seconds to the given date. 59637 * 59638 * @description 59639 * Set the seconds to the given date. 59640 * 59641 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59642 * 59643 * @param date - The date to be changed 59644 * @param seconds - The seconds of the new date 59645 * 59646 * @returns The new date with the seconds set 59647 * 59648 * @example 59649 * // Set 45 seconds to 1 September 2014 11:30:40: 59650 * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45) 59651 * //=> Mon Sep 01 2014 11:30:45 59652 */ 59653function setSeconds(date, seconds) { 59654 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59655 _date.setSeconds(seconds); 59656 return _date; 59657} 59658 59659// Fallback for modularized imports: 59660/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setSeconds); 59661 59662 59663/***/ }), 59664
vendor: 2,678 bytes, lines 59665-59735
59665/***/ "./node_modules/date-fns/setWeek.mjs": 59666/*!*******************************************!*\ 59667 !*** ./node_modules/date-fns/setWeek.mjs ***! 59668 \*******************************************/ 59669/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59670 59671"use strict"; 59672__webpack_require__.r(__webpack_exports__); 59673/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59674/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59675/* harmony export */ setWeek: () => (/* binding */ setWeek) 59676/* harmony export */ }); 59677/* harmony import */ var _getWeek_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getWeek.mjs */ "./node_modules/date-fns/getWeek.mjs"); 59678/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59679 59680 59681 59682/** 59683 * The {@link setWeek} function options. 59684 */ 59685 59686/** 59687 * @name setWeek 59688 * @category Week Helpers 59689 * @summary Set the local week to the given date. 59690 * 59691 * @description 59692 * Set the local week to the given date, saving the weekday number. 59693 * The exact calculation depends on the values of 59694 * `options.weekStartsOn` (which is the index of the first day of the week) 59695 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 59696 * the first week of the week-numbering year) 59697 * 59698 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 59699 * 59700 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59701 * 59702 * @param date - The date to be changed 59703 * @param week - The week of the new date 59704 * @param options - An object with options 59705 * 59706 * @returns The new date with the local week set 59707 * 59708 * @example 59709 * // Set the 1st week to 2 January 2005 with default options: 59710 * const result = setWeek(new Date(2005, 0, 2), 1) 59711 * //=> Sun Dec 26 2004 00:00:00 59712 * 59713 * @example 59714 * // Set the 1st week to 2 January 2005, 59715 * // if Monday is the first day of the week, 59716 * // and the first week of the year always contains 4 January: 59717 * const result = setWeek(new Date(2005, 0, 2), 1, { 59718 * weekStartsOn: 1, 59719 * firstWeekContainsDate: 4 59720 * }) 59721 * //=> Sun Jan 4 2004 00:00:00 59722 */ 59723function setWeek(date, week, options) { 59724 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59725 const diff = (0,_getWeek_mjs__WEBPACK_IMPORTED_MODULE_1__.getWeek)(_date, options) - week; 59726 _date.setDate(_date.getDate() - diff * 7); 59727 return _date; 59728} 59729 59730// Fallback for modularized imports: 59731/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setWeek); 59732 59733 59734/***/ }), 59735
vendor: 1,989 bytes, lines 59736-59790
59736/***/ "./node_modules/date-fns/setYear.mjs": 59737/*!*******************************************!*\ 59738 !*** ./node_modules/date-fns/setYear.mjs ***! 59739 \*******************************************/ 59740/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59741 59742"use strict"; 59743__webpack_require__.r(__webpack_exports__); 59744/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59745/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59746/* harmony export */ setYear: () => (/* binding */ setYear) 59747/* harmony export */ }); 59748/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 59749/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59750 59751 59752 59753/** 59754 * @name setYear 59755 * @category Year Helpers 59756 * @summary Set the year to the given date. 59757 * 59758 * @description 59759 * Set the year to the given date. 59760 * 59761 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59762 * 59763 * @param date - The date to be changed 59764 * @param year - The year of the new date 59765 * 59766 * @returns The new date with the year set 59767 * 59768 * @example 59769 * // Set year 2013 to 1 September 2014: 59770 * const result = setYear(new Date(2014, 8, 1), 2013) 59771 * //=> Sun Sep 01 2013 00:00:00 59772 */ 59773function setYear(date, year) { 59774 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59775 59776 // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date 59777 if (isNaN(+_date)) { 59778 return (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, NaN); 59779 } 59780 59781 _date.setFullYear(year); 59782 return _date; 59783} 59784 59785// Fallback for modularized imports: 59786/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setYear); 59787 59788 59789/***/ }), 59790
vendor: 1,658 bytes, lines 59791-59837
59791/***/ "./node_modules/date-fns/startOfDay.mjs": 59792/*!**********************************************!*\ 59793 !*** ./node_modules/date-fns/startOfDay.mjs ***! 59794 \**********************************************/ 59795/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59796 59797"use strict"; 59798__webpack_require__.r(__webpack_exports__); 59799/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59800/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59801/* harmony export */ startOfDay: () => (/* binding */ startOfDay) 59802/* harmony export */ }); 59803/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59804 59805 59806/** 59807 * @name startOfDay 59808 * @category Day Helpers 59809 * @summary Return the start of a day for the given date. 59810 * 59811 * @description 59812 * Return the start of a day for the given date. 59813 * The result will be in the local timezone. 59814 * 59815 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59816 * 59817 * @param date - The original date 59818 * 59819 * @returns The start of a day 59820 * 59821 * @example 59822 * // The start of a day for 2 September 2014 11:55:00: 59823 * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) 59824 * //=> Tue Sep 02 2014 00:00:00 59825 */ 59826function startOfDay(date) { 59827 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59828 _date.setHours(0, 0, 0, 0); 59829 return _date; 59830} 59831 59832// Fallback for modularized imports: 59833/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfDay); 59834 59835 59836/***/ }), 59837
vendor: 1,794 bytes, lines 59838-59884
59838/***/ "./node_modules/date-fns/startOfISOWeek.mjs": 59839/*!**************************************************!*\ 59840 !*** ./node_modules/date-fns/startOfISOWeek.mjs ***! 59841 \**************************************************/ 59842/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59843 59844"use strict"; 59845__webpack_require__.r(__webpack_exports__); 59846/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59847/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59848/* harmony export */ startOfISOWeek: () => (/* binding */ startOfISOWeek) 59849/* harmony export */ }); 59850/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 59851 59852 59853/** 59854 * @name startOfISOWeek 59855 * @category ISO Week Helpers 59856 * @summary Return the start of an ISO week for the given date. 59857 * 59858 * @description 59859 * Return the start of an ISO week for the given date. 59860 * The result will be in the local timezone. 59861 * 59862 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 59863 * 59864 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59865 * 59866 * @param date - The original date 59867 * 59868 * @returns The start of an ISO week 59869 * 59870 * @example 59871 * // The start of an ISO week for 2 September 2014 11:55:00: 59872 * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) 59873 * //=> Mon Sep 01 2014 00:00:00 59874 */ 59875function startOfISOWeek(date) { 59876 return (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_0__.startOfWeek)(date, { weekStartsOn: 1 }); 59877} 59878 59879// Fallback for modularized imports: 59880/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfISOWeek); 59881 59882 59883/***/ }), 59884
vendor: 2,550 bytes, lines 59885-59940
59885/***/ "./node_modules/date-fns/startOfISOWeekYear.mjs": 59886/*!******************************************************!*\ 59887 !*** ./node_modules/date-fns/startOfISOWeekYear.mjs ***! 59888 \******************************************************/ 59889/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59890 59891"use strict"; 59892__webpack_require__.r(__webpack_exports__); 59893/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59894/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59895/* harmony export */ startOfISOWeekYear: () => (/* binding */ startOfISOWeekYear) 59896/* harmony export */ }); 59897/* harmony import */ var _getISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getISOWeekYear.mjs */ "./node_modules/date-fns/getISOWeekYear.mjs"); 59898/* harmony import */ var _startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./startOfISOWeek.mjs */ "./node_modules/date-fns/startOfISOWeek.mjs"); 59899/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 59900 59901 59902 59903 59904/** 59905 * @name startOfISOWeekYear 59906 * @category ISO Week-Numbering Year Helpers 59907 * @summary Return the start of an ISO week-numbering year for the given date. 59908 * 59909 * @description 59910 * Return the start of an ISO week-numbering year, 59911 * which always starts 3 days before the year's first Thursday. 59912 * The result will be in the local timezone. 59913 * 59914 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 59915 * 59916 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59917 * 59918 * @param date - The original date 59919 * 59920 * @returns The start of an ISO week-numbering year 59921 * 59922 * @example 59923 * // The start of an ISO week-numbering year for 2 July 2005: 59924 * const result = startOfISOWeekYear(new Date(2005, 6, 2)) 59925 * //=> Mon Jan 03 2005 00:00:00 59926 */ 59927function startOfISOWeekYear(date) { 59928 const year = (0,_getISOWeekYear_mjs__WEBPACK_IMPORTED_MODULE_0__.getISOWeekYear)(date); 59929 const fourthOfJanuary = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 59930 fourthOfJanuary.setFullYear(year, 0, 4); 59931 fourthOfJanuary.setHours(0, 0, 0, 0); 59932 return (0,_startOfISOWeek_mjs__WEBPACK_IMPORTED_MODULE_2__.startOfISOWeek)(fourthOfJanuary); 59933} 59934 59935// Fallback for modularized imports: 59936/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfISOWeekYear); 59937 59938 59939/***/ }), 59940
vendor: 1,708 bytes, lines 59941-59988
59941/***/ "./node_modules/date-fns/startOfMonth.mjs": 59942/*!************************************************!*\ 59943 !*** ./node_modules/date-fns/startOfMonth.mjs ***! 59944 \************************************************/ 59945/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59946 59947"use strict"; 59948__webpack_require__.r(__webpack_exports__); 59949/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59950/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59951/* harmony export */ startOfMonth: () => (/* binding */ startOfMonth) 59952/* harmony export */ }); 59953/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 59954 59955 59956/** 59957 * @name startOfMonth 59958 * @category Month Helpers 59959 * @summary Return the start of a month for the given date. 59960 * 59961 * @description 59962 * Return the start of a month for the given date. 59963 * The result will be in the local timezone. 59964 * 59965 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 59966 * 59967 * @param date - The original date 59968 * 59969 * @returns The start of a month 59970 * 59971 * @example 59972 * // The start of a month for 2 September 2014 11:55:00: 59973 * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0)) 59974 * //=> Mon Sep 01 2014 00:00:00 59975 */ 59976function startOfMonth(date) { 59977 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 59978 _date.setDate(1); 59979 _date.setHours(0, 0, 0, 0); 59980 return _date; 59981} 59982 59983// Fallback for modularized imports: 59984/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfMonth); 59985 59986 59987/***/ }), 59988
vendor: 1,848 bytes, lines 59989-60038
59989/***/ "./node_modules/date-fns/startOfQuarter.mjs": 59990/*!**************************************************!*\ 59991 !*** ./node_modules/date-fns/startOfQuarter.mjs ***! 59992 \**************************************************/ 59993/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 59994 59995"use strict"; 59996__webpack_require__.r(__webpack_exports__); 59997/* harmony export */ __webpack_require__.d(__webpack_exports__, { 59998/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 59999/* harmony export */ startOfQuarter: () => (/* binding */ startOfQuarter) 60000/* harmony export */ }); 60001/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 60002 60003 60004/** 60005 * @name startOfQuarter 60006 * @category Quarter Helpers 60007 * @summary Return the start of a year quarter for the given date. 60008 * 60009 * @description 60010 * Return the start of a year quarter for the given date. 60011 * The result will be in the local timezone. 60012 * 60013 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60014 * 60015 * @param date - The original date 60016 * 60017 * @returns The start of a quarter 60018 * 60019 * @example 60020 * // The start of a quarter for 2 September 2014 11:55:00: 60021 * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) 60022 * //=> Tue Jul 01 2014 00:00:00 60023 */ 60024function startOfQuarter(date) { 60025 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 60026 const currentMonth = _date.getMonth(); 60027 const month = currentMonth - (currentMonth % 3); 60028 _date.setMonth(month, 1); 60029 _date.setHours(0, 0, 0, 0); 60030 return _date; 60031} 60032 60033// Fallback for modularized imports: 60034/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfQuarter); 60035 60036 60037/***/ }), 60038
vendor: 2,620 bytes, lines 60039-60109
60039/***/ "./node_modules/date-fns/startOfWeek.mjs": 60040/*!***********************************************!*\ 60041 !*** ./node_modules/date-fns/startOfWeek.mjs ***! 60042 \***********************************************/ 60043/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60044 60045"use strict"; 60046__webpack_require__.r(__webpack_exports__); 60047/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60048/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60049/* harmony export */ startOfWeek: () => (/* binding */ startOfWeek) 60050/* harmony export */ }); 60051/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 60052/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 60053 60054 60055 60056/** 60057 * The {@link startOfWeek} function options. 60058 */ 60059 60060/** 60061 * @name startOfWeek 60062 * @category Week Helpers 60063 * @summary Return the start of a week for the given date. 60064 * 60065 * @description 60066 * Return the start of a week for the given date. 60067 * The result will be in the local timezone. 60068 * 60069 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60070 * 60071 * @param date - The original date 60072 * @param options - An object with options 60073 * 60074 * @returns The start of a week 60075 * 60076 * @example 60077 * // The start of a week for 2 September 2014 11:55:00: 60078 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) 60079 * //=> Sun Aug 31 2014 00:00:00 60080 * 60081 * @example 60082 * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: 60083 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) 60084 * //=> Mon Sep 01 2014 00:00:00 60085 */ 60086function startOfWeek(date, options) { 60087 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)(); 60088 const weekStartsOn = 60089 options?.weekStartsOn ?? 60090 options?.locale?.options?.weekStartsOn ?? 60091 defaultOptions.weekStartsOn ?? 60092 defaultOptions.locale?.options?.weekStartsOn ?? 60093 0; 60094 60095 const _date = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_1__.toDate)(date); 60096 const day = _date.getDay(); 60097 const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; 60098 60099 _date.setDate(_date.getDate() - diff); 60100 _date.setHours(0, 0, 0, 0); 60101 return _date; 60102} 60103 60104// Fallback for modularized imports: 60105/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfWeek); 60106 60107 60108/***/ }), 60109
vendor: 3,659 bytes, lines 60110-60193
60110/***/ "./node_modules/date-fns/startOfWeekYear.mjs": 60111/*!***************************************************!*\ 60112 !*** ./node_modules/date-fns/startOfWeekYear.mjs ***! 60113 \***************************************************/ 60114/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60115 60116"use strict"; 60117__webpack_require__.r(__webpack_exports__); 60118/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60119/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60120/* harmony export */ startOfWeekYear: () => (/* binding */ startOfWeekYear) 60121/* harmony export */ }); 60122/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 60123/* harmony import */ var _getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getWeekYear.mjs */ "./node_modules/date-fns/getWeekYear.mjs"); 60124/* harmony import */ var _startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./startOfWeek.mjs */ "./node_modules/date-fns/startOfWeek.mjs"); 60125/* harmony import */ var _lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.mjs */ "./node_modules/date-fns/_lib/defaultOptions.mjs"); 60126 60127 60128 60129 60130 60131/** 60132 * The {@link startOfWeekYear} function options. 60133 */ 60134 60135/** 60136 * @name startOfWeekYear 60137 * @category Week-Numbering Year Helpers 60138 * @summary Return the start of a local week-numbering year for the given date. 60139 * 60140 * @description 60141 * Return the start of a local week-numbering year. 60142 * The exact calculation depends on the values of 60143 * `options.weekStartsOn` (which is the index of the first day of the week) 60144 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 60145 * the first week of the week-numbering year) 60146 * 60147 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 60148 * 60149 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60150 * 60151 * @param date - The original date 60152 * @param options - An object with options 60153 * 60154 * @returns The start of a week-numbering year 60155 * 60156 * @example 60157 * // The start of an a week-numbering year for 2 July 2005 with default settings: 60158 * const result = startOfWeekYear(new Date(2005, 6, 2)) 60159 * //=> Sun Dec 26 2004 00:00:00 60160 * 60161 * @example 60162 * // The start of a week-numbering year for 2 July 2005 60163 * // if Monday is the first day of week 60164 * // and 4 January is always in the first week of the year: 60165 * const result = startOfWeekYear(new Date(2005, 6, 2), { 60166 * weekStartsOn: 1, 60167 * firstWeekContainsDate: 4 60168 * }) 60169 * //=> Mon Jan 03 2005 00:00:00 60170 */ 60171function startOfWeekYear(date, options) { 60172 const defaultOptions = (0,_lib_defaultOptions_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)(); 60173 const firstWeekContainsDate = 60174 options?.firstWeekContainsDate ?? 60175 options?.locale?.options?.firstWeekContainsDate ?? 60176 defaultOptions.firstWeekContainsDate ?? 60177 defaultOptions.locale?.options?.firstWeekContainsDate ?? 60178 1; 60179 60180 const year = (0,_getWeekYear_mjs__WEBPACK_IMPORTED_MODULE_1__.getWeekYear)(date, options); 60181 const firstWeek = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, 0); 60182 firstWeek.setFullYear(year, 0, firstWeekContainsDate); 60183 firstWeek.setHours(0, 0, 0, 0); 60184 const _date = (0,_startOfWeek_mjs__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(firstWeek, options); 60185 return _date; 60186} 60187 60188// Fallback for modularized imports: 60189/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfWeekYear); 60190 60191 60192/***/ }), 60193
vendor: 1,991 bytes, lines 60194-60244
60194/***/ "./node_modules/date-fns/startOfYear.mjs": 60195/*!***********************************************!*\ 60196 !*** ./node_modules/date-fns/startOfYear.mjs ***! 60197 \***********************************************/ 60198/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60199 60200"use strict"; 60201__webpack_require__.r(__webpack_exports__); 60202/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60203/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60204/* harmony export */ startOfYear: () => (/* binding */ startOfYear) 60205/* harmony export */ }); 60206/* harmony import */ var _toDate_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.mjs */ "./node_modules/date-fns/toDate.mjs"); 60207/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 60208 60209 60210 60211/** 60212 * @name startOfYear 60213 * @category Year Helpers 60214 * @summary Return the start of a year for the given date. 60215 * 60216 * @description 60217 * Return the start of a year for the given date. 60218 * The result will be in the local timezone. 60219 * 60220 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60221 * 60222 * @param date - The original date 60223 * 60224 * @returns The start of a year 60225 * 60226 * @example 60227 * // The start of a year for 2 September 2014 11:55:00: 60228 * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) 60229 * //=> Wed Jan 01 2014 00:00:00 60230 */ 60231function startOfYear(date) { 60232 const cleanDate = (0,_toDate_mjs__WEBPACK_IMPORTED_MODULE_0__.toDate)(date); 60233 const _date = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_1__.constructFrom)(date, 0); 60234 _date.setFullYear(cleanDate.getFullYear(), 0, 1); 60235 _date.setHours(0, 0, 0, 0); 60236 return _date; 60237} 60238 60239// Fallback for modularized imports: 60240/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfYear); 60241 60242 60243/***/ }), 60244
vendor: 3,392 bytes, lines 60245-60335
60245/***/ "./node_modules/date-fns/sub.mjs": 60246/*!***************************************!*\ 60247 !*** ./node_modules/date-fns/sub.mjs ***! 60248 \***************************************/ 60249/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60250 60251"use strict"; 60252__webpack_require__.r(__webpack_exports__); 60253/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60254/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60255/* harmony export */ sub: () => (/* binding */ sub) 60256/* harmony export */ }); 60257/* harmony import */ var _subDays_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subDays.mjs */ "./node_modules/date-fns/subDays.mjs"); 60258/* harmony import */ var _subMonths_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subMonths.mjs */ "./node_modules/date-fns/subMonths.mjs"); 60259/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 60260 60261 60262 60263 60264/** 60265 * @name sub 60266 * @category Common Helpers 60267 * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. 60268 * 60269 * @description 60270 * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. 60271 * 60272 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60273 * 60274 * @param date - The date to be changed 60275 * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted 60276 * 60277 * | Key | Description | 60278 * |---------|------------------------------------| 60279 * | years | Amount of years to be subtracted | 60280 * | months | Amount of months to be subtracted | 60281 * | weeks | Amount of weeks to be subtracted | 60282 * | days | Amount of days to be subtracted | 60283 * | hours | Amount of hours to be subtracted | 60284 * | minutes | Amount of minutes to be subtracted | 60285 * | seconds | Amount of seconds to be subtracted | 60286 * 60287 * All values default to 0 60288 * 60289 * @returns The new date with the seconds subtracted 60290 * 60291 * @example 60292 * // Subtract the following duration from 15 June 2017 15:29:20 60293 * const result = sub(new Date(2017, 5, 15, 15, 29, 20), { 60294 * years: 2, 60295 * months: 9, 60296 * weeks: 1, 60297 * days: 7, 60298 * hours: 5, 60299 * minutes: 9, 60300 * seconds: 30 60301 * }) 60302 * //=> Mon Sep 1 2014 10:19:50 60303 */ 60304function sub(date, duration) { 60305 const { 60306 years = 0, 60307 months = 0, 60308 weeks = 0, 60309 days = 0, 60310 hours = 0, 60311 minutes = 0, 60312 seconds = 0, 60313 } = duration; 60314 60315 // Subtract years and months 60316 const dateWithoutMonths = (0,_subMonths_mjs__WEBPACK_IMPORTED_MODULE_0__.subMonths)(date, months + years * 12); 60317 60318 // Subtract weeks and days 60319 const dateWithoutDays = (0,_subDays_mjs__WEBPACK_IMPORTED_MODULE_1__.subDays)(dateWithoutMonths, days + weeks * 7); 60320 60321 // Subtract hours, minutes and seconds 60322 const minutestoSub = minutes + hours * 60; 60323 const secondstoSub = seconds + minutestoSub * 60; 60324 const mstoSub = secondstoSub * 1000; 60325 const finalDate = (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, dateWithoutDays.getTime() - mstoSub); 60326 60327 return finalDate; 60328} 60329 60330// Fallback for modularized imports: 60331/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sub); 60332 60333 60334/***/ }), 60335
vendor: 1,641 bytes, lines 60336-60380
60336/***/ "./node_modules/date-fns/subDays.mjs": 60337/*!*******************************************!*\ 60338 !*** ./node_modules/date-fns/subDays.mjs ***! 60339 \*******************************************/ 60340/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60341 60342"use strict"; 60343__webpack_require__.r(__webpack_exports__); 60344/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60345/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60346/* harmony export */ subDays: () => (/* binding */ subDays) 60347/* harmony export */ }); 60348/* harmony import */ var _addDays_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addDays.mjs */ "./node_modules/date-fns/addDays.mjs"); 60349 60350 60351/** 60352 * @name subDays 60353 * @category Day Helpers 60354 * @summary Subtract the specified number of days from the given date. 60355 * 60356 * @description 60357 * Subtract the specified number of days from the given date. 60358 * 60359 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60360 * 60361 * @param date - The date to be changed 60362 * @param amount - The amount of days to be subtracted. 60363 * 60364 * @returns The new date with the days subtracted 60365 * 60366 * @example 60367 * // Subtract 10 days from 1 September 2014: 60368 * const result = subDays(new Date(2014, 8, 1), 10) 60369 * //=> Fri Aug 22 2014 00:00:00 60370 */ 60371function subDays(date, amount) { 60372 return (0,_addDays_mjs__WEBPACK_IMPORTED_MODULE_0__.addDays)(date, -amount); 60373} 60374 60375// Fallback for modularized imports: 60376/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (subDays); 60377 60378 60379/***/ }), 60380
vendor: 1,680 bytes, lines 60381-60425
60381/***/ "./node_modules/date-fns/subMonths.mjs": 60382/*!*********************************************!*\ 60383 !*** ./node_modules/date-fns/subMonths.mjs ***! 60384 \*********************************************/ 60385/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60386 60387"use strict"; 60388__webpack_require__.r(__webpack_exports__); 60389/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60390/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60391/* harmony export */ subMonths: () => (/* binding */ subMonths) 60392/* harmony export */ }); 60393/* harmony import */ var _addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addMonths.mjs */ "./node_modules/date-fns/addMonths.mjs"); 60394 60395 60396/** 60397 * @name subMonths 60398 * @category Month Helpers 60399 * @summary Subtract the specified number of months from the given date. 60400 * 60401 * @description 60402 * Subtract the specified number of months from the given date. 60403 * 60404 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60405 * 60406 * @param date - The date to be changed 60407 * @param amount - The amount of months to be subtracted. 60408 * 60409 * @returns The new date with the months subtracted 60410 * 60411 * @example 60412 * // Subtract 5 months from 1 February 2015: 60413 * const result = subMonths(new Date(2015, 1, 1), 5) 60414 * //=> Mon Sep 01 2014 00:00:00 60415 */ 60416function subMonths(date, amount) { 60417 return (0,_addMonths_mjs__WEBPACK_IMPORTED_MODULE_0__.addMonths)(date, -amount); 60418} 60419 60420// Fallback for modularized imports: 60421/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (subMonths); 60422 60423 60424/***/ }), 60425
vendor: 1,660 bytes, lines 60426-60470
60426/***/ "./node_modules/date-fns/subYears.mjs": 60427/*!********************************************!*\ 60428 !*** ./node_modules/date-fns/subYears.mjs ***! 60429 \********************************************/ 60430/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60431 60432"use strict"; 60433__webpack_require__.r(__webpack_exports__); 60434/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60435/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60436/* harmony export */ subYears: () => (/* binding */ subYears) 60437/* harmony export */ }); 60438/* harmony import */ var _addYears_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addYears.mjs */ "./node_modules/date-fns/addYears.mjs"); 60439 60440 60441/** 60442 * @name subYears 60443 * @category Year Helpers 60444 * @summary Subtract the specified number of years from the given date. 60445 * 60446 * @description 60447 * Subtract the specified number of years from the given date. 60448 * 60449 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60450 * 60451 * @param date - The date to be changed 60452 * @param amount - The amount of years to be subtracted. 60453 * 60454 * @returns The new date with the years subtracted 60455 * 60456 * @example 60457 * // Subtract 5 years from 1 September 2014: 60458 * const result = subYears(new Date(2014, 8, 1), 5) 60459 * //=> Tue Sep 01 2009 00:00:00 60460 */ 60461function subYears(date, amount) { 60462 return (0,_addYears_mjs__WEBPACK_IMPORTED_MODULE_0__.addYears)(date, -amount); 60463} 60464 60465// Fallback for modularized imports: 60466/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (subYears); 60467 60468 60469/***/ }), 60470
vendor: 2,383 bytes, lines 60471-60544
60471/***/ "./node_modules/date-fns/toDate.mjs": 60472/*!******************************************!*\ 60473 !*** ./node_modules/date-fns/toDate.mjs ***! 60474 \******************************************/ 60475/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60476 60477"use strict"; 60478__webpack_require__.r(__webpack_exports__); 60479/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60480/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60481/* harmony export */ toDate: () => (/* binding */ toDate) 60482/* harmony export */ }); 60483/** 60484 * @name toDate 60485 * @category Common Helpers 60486 * @summary Convert the given argument to an instance of Date. 60487 * 60488 * @description 60489 * Convert the given argument to an instance of Date. 60490 * 60491 * If the argument is an instance of Date, the function returns its clone. 60492 * 60493 * If the argument is a number, it is treated as a timestamp. 60494 * 60495 * If the argument is none of the above, the function returns Invalid Date. 60496 * 60497 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. 60498 * 60499 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 60500 * 60501 * @param argument - The value to convert 60502 * 60503 * @returns The parsed date in the local time zone 60504 * 60505 * @example 60506 * // Clone the date: 60507 * const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) 60508 * //=> Tue Feb 11 2014 11:30:30 60509 * 60510 * @example 60511 * // Convert the timestamp to date: 60512 * const result = toDate(1392098430000) 60513 * //=> Tue Feb 11 2014 11:30:30 60514 */ 60515function toDate(argument) { 60516 const argStr = Object.prototype.toString.call(argument); 60517 60518 // Clone the date 60519 if ( 60520 argument instanceof Date || 60521 (typeof argument === "object" && argStr === "[object Date]") 60522 ) { 60523 // Prevent the date to lose the milliseconds when passed to new Date() in IE10 60524 return new argument.constructor(+argument); 60525 } else if ( 60526 typeof argument === "number" || 60527 argStr === "[object Number]" || 60528 typeof argument === "string" || 60529 argStr === "[object String]" 60530 ) { 60531 // TODO: Can we get rid of as? 60532 return new Date(argument); 60533 } else { 60534 // TODO: Can we get rid of as? 60535 return new Date(NaN); 60536 } 60537} 60538 60539// Fallback for modularized imports: 60540/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toDate); 60541 60542 60543/***/ }), 60544
vendor: 2,328 bytes, lines 60545-60612
60545/***/ "./node_modules/date-fns/transpose.mjs": 60546/*!*********************************************!*\ 60547 !*** ./node_modules/date-fns/transpose.mjs ***! 60548 \*********************************************/ 60549/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60550 60551"use strict"; 60552__webpack_require__.r(__webpack_exports__); 60553/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60554/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 60555/* harmony export */ transpose: () => (/* binding */ transpose) 60556/* harmony export */ }); 60557/* harmony import */ var _constructFrom_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constructFrom.mjs */ "./node_modules/date-fns/constructFrom.mjs"); 60558 60559 60560/** 60561 * @name transpose 60562 * @category Generic Helpers 60563 * @summary Transpose the date to the given constructor. 60564 * 60565 * @description 60566 * The function transposes the date to the given constructor. It helps you 60567 * to transpose the date in the system time zone to say `UTCDate` or any other 60568 * date extension. 60569 * 60570 * @typeParam DateInputType - The input `Date` type derived from the passed argument. 60571 * @typeParam DateOutputType - The output `Date` type derived from the passed constructor. 60572 * 60573 * @param fromDate - The date to use values from 60574 * @param constructor - The date constructor to use 60575 * 60576 * @returns Date transposed to the given constructor 60577 * 60578 * @example 60579 * // Create July 10, 2022 00:00 in locale time zone 60580 * const date = new Date(2022, 6, 10) 60581 * //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)' 60582 * 60583 * @example 60584 * // Transpose the date to July 10, 2022 00:00 in UTC 60585 * transpose(date, UTCDate) 60586 * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)' 60587 */ 60588function transpose(fromDate, constructor) { 60589 const date = 60590 constructor instanceof Date 60591 ? (0,_constructFrom_mjs__WEBPACK_IMPORTED_MODULE_0__.constructFrom)(constructor, 0) 60592 : new constructor(0); 60593 date.setFullYear( 60594 fromDate.getFullYear(), 60595 fromDate.getMonth(), 60596 fromDate.getDate(), 60597 ); 60598 date.setHours( 60599 fromDate.getHours(), 60600 fromDate.getMinutes(), 60601 fromDate.getSeconds(), 60602 fromDate.getMilliseconds(), 60603 ); 60604 return date; 60605} 60606 60607// Fallback for modularized imports: 60608/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (transpose); 60609 60610 60611/***/ }), 60612
vendor: 127,682 bytes, lines 60613-65526
60613/***/ "./node_modules/decimal.js/decimal.mjs": 60614/*!*********************************************!*\ 60615 !*** ./node_modules/decimal.js/decimal.mjs ***! 60616 \*********************************************/ 60617/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 60618 60619"use strict"; 60620__webpack_require__.r(__webpack_exports__); 60621/* harmony export */ __webpack_require__.d(__webpack_exports__, { 60622/* harmony export */ Decimal: () => (/* binding */ Decimal), 60623/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 60624/* harmony export */ }); 60625/*! 60626 * decimal.js v10.4.3 60627 * An arbitrary-precision Decimal type for JavaScript. 60628 * https://github.com/MikeMcl/decimal.js 60629 * Copyright (c) 2022 Michael Mclaughlin <[email protected]> 60630 * MIT Licence 60631 */ 60632 60633 60634// ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // 60635 60636 60637 // The maximum exponent magnitude. 60638 // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`. 60639var EXP_LIMIT = 9e15, // 0 to 9e15 60640 60641 // The limit on the value of `precision`, and on the value of the first argument to 60642 // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`. 60643 MAX_DIGITS = 1e9, // 0 to 1e9 60644 60645 // Base conversion alphabet. 60646 NUMERALS = '0123456789abcdef', 60647 60648 // The natural logarithm of 10 (1025 digits). 60649 LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', 60650 60651 // Pi (1025 digits). 60652 PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', 60653 60654 60655 // The initial configuration properties of the Decimal constructor. 60656 DEFAULTS = { 60657 60658 // These values must be integers within the stated ranges (inclusive). 60659 // Most of these values can be changed at run-time using the `Decimal.config` method. 60660 60661 // The maximum number of significant digits of the result of a calculation or base conversion. 60662 // E.g. `Decimal.config({ precision: 20 });` 60663 precision: 20, // 1 to MAX_DIGITS 60664 60665 // The rounding mode used when rounding to `precision`. 60666 // 60667 // ROUND_UP 0 Away from zero. 60668 // ROUND_DOWN 1 Towards zero. 60669 // ROUND_CEIL 2 Towards +Infinity. 60670 // ROUND_FLOOR 3 Towards -Infinity. 60671 // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up. 60672 // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. 60673 // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. 60674 // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. 60675 // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. 60676 // 60677 // E.g. 60678 // `Decimal.rounding = 4;` 60679 // `Decimal.rounding = Decimal.ROUND_HALF_UP;` 60680 rounding: 4, // 0 to 8 60681 60682 // The modulo mode used when calculating the modulus: a mod n. 60683 // The quotient (q = a / n) is calculated according to the corresponding rounding mode. 60684 // The remainder (r) is calculated as: r = a - n * q. 60685 // 60686 // UP 0 The remainder is positive if the dividend is negative, else is negative. 60687 // DOWN 1 The remainder has the same sign as the dividend (JavaScript %). 60688 // FLOOR 3 The remainder has the same sign as the divisor (Python %). 60689 // HALF_EVEN 6 The IEEE 754 remainder function. 60690 // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive. 60691 // 60692 // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian 60693 // division (9) are commonly used for the modulus operation. The other rounding modes can also 60694 // be used, but they may not give useful results. 60695 modulo: 1, // 0 to 9 60696 60697 // The exponent value at and beneath which `toString` returns exponential notation. 60698 // JavaScript numbers: -7 60699 toExpNeg: -7, // 0 to -EXP_LIMIT 60700 60701 // The exponent value at and above which `toString` returns exponential notation. 60702 // JavaScript numbers: 21 60703 toExpPos: 21, // 0 to EXP_LIMIT 60704 60705 // The minimum exponent value, beneath which underflow to zero occurs. 60706 // JavaScript numbers: -324 (5e-324) 60707 minE: -EXP_LIMIT, // -1 to -EXP_LIMIT 60708 60709 // The maximum exponent value, above which overflow to Infinity occurs. 60710 // JavaScript numbers: 308 (1.7976931348623157e+308) 60711 maxE: EXP_LIMIT, // 1 to EXP_LIMIT 60712 60713 // Whether to use cryptographically-secure random number generation, if available. 60714 crypto: false // true/false 60715 }, 60716 60717 60718// ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- // 60719 60720 60721 inexact, quadrant, 60722 external = true, 60723 60724 decimalError = '[DecimalError] ', 60725 invalidArgument = decimalError + 'Invalid argument: ', 60726 precisionLimitExceeded = decimalError + 'Precision limit exceeded', 60727 cryptoUnavailable = decimalError + 'crypto unavailable', 60728 tag = '[object Decimal]', 60729 60730 mathfloor = Math.floor, 60731 mathpow = Math.pow, 60732 60733 isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, 60734 isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, 60735 isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, 60736 isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, 60737 60738 BASE = 1e7, 60739 LOG_BASE = 7, 60740 MAX_SAFE_INTEGER = 9007199254740991, 60741 60742 LN10_PRECISION = LN10.length - 1, 60743 PI_PRECISION = PI.length - 1, 60744 60745 // Decimal.prototype object 60746 P = { toStringTag: tag }; 60747 60748 60749// Decimal prototype methods 60750 60751 60752/* 60753 * absoluteValue abs 60754 * ceil 60755 * clampedTo clamp 60756 * comparedTo cmp 60757 * cosine cos 60758 * cubeRoot cbrt 60759 * decimalPlaces dp 60760 * dividedBy div 60761 * dividedToIntegerBy divToInt 60762 * equals eq 60763 * floor 60764 * greaterThan gt 60765 * greaterThanOrEqualTo gte 60766 * hyperbolicCosine cosh 60767 * hyperbolicSine sinh 60768 * hyperbolicTangent tanh 60769 * inverseCosine acos 60770 * inverseHyperbolicCosine acosh 60771 * inverseHyperbolicSine asinh 60772 * inverseHyperbolicTangent atanh 60773 * inverseSine asin 60774 * inverseTangent atan 60775 * isFinite 60776 * isInteger isInt 60777 * isNaN 60778 * isNegative isNeg 60779 * isPositive isPos 60780 * isZero 60781 * lessThan lt 60782 * lessThanOrEqualTo lte 60783 * logarithm log 60784 * [maximum] [max] 60785 * [minimum] [min] 60786 * minus sub 60787 * modulo mod 60788 * naturalExponential exp 60789 * naturalLogarithm ln 60790 * negated neg 60791 * plus add 60792 * precision sd 60793 * round 60794 * sine sin 60795 * squareRoot sqrt 60796 * tangent tan 60797 * times mul 60798 * toBinary 60799 * toDecimalPlaces toDP 60800 * toExponential 60801 * toFixed 60802 * toFraction 60803 * toHexadecimal toHex 60804 * toNearest 60805 * toNumber 60806 * toOctal 60807 * toPower pow 60808 * toPrecision 60809 * toSignificantDigits toSD 60810 * toString 60811 * truncated trunc 60812 * valueOf toJSON 60813 */ 60814 60815 60816/* 60817 * Return a new Decimal whose value is the absolute value of this Decimal. 60818 * 60819 */ 60820P.absoluteValue = P.abs = function () { 60821 var x = new this.constructor(this); 60822 if (x.s < 0) x.s = 1; 60823 return finalise(x); 60824}; 60825 60826 60827/* 60828 * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the 60829 * direction of positive Infinity. 60830 * 60831 */ 60832P.ceil = function () { 60833 return finalise(new this.constructor(this), this.e + 1, 2); 60834}; 60835 60836 60837/* 60838 * Return a new Decimal whose value is the value of this Decimal clamped to the range 60839 * delineated by `min` and `max`. 60840 * 60841 * min {number|string|Decimal} 60842 * max {number|string|Decimal} 60843 * 60844 */ 60845P.clampedTo = P.clamp = function (min, max) { 60846 var k, 60847 x = this, 60848 Ctor = x.constructor; 60849 min = new Ctor(min); 60850 max = new Ctor(max); 60851 if (!min.s || !max.s) return new Ctor(NaN); 60852 if (min.gt(max)) throw Error(invalidArgument + max); 60853 k = x.cmp(min); 60854 return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x); 60855}; 60856 60857 60858/* 60859 * Return 60860 * 1 if the value of this Decimal is greater than the value of `y`, 60861 * -1 if the value of this Decimal is less than the value of `y`, 60862 * 0 if they have the same value, 60863 * NaN if the value of either Decimal is NaN. 60864 * 60865 */ 60866P.comparedTo = P.cmp = function (y) { 60867 var i, j, xdL, ydL, 60868 x = this, 60869 xd = x.d, 60870 yd = (y = new x.constructor(y)).d, 60871 xs = x.s, 60872 ys = y.s; 60873 60874 // Either NaN or ±Infinity? 60875 if (!xd || !yd) { 60876 return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1; 60877 } 60878 60879 // Either zero? 60880 if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0; 60881 60882 // Signs differ? 60883 if (xs !== ys) return xs; 60884 60885 // Compare exponents. 60886 if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1; 60887 60888 xdL = xd.length; 60889 ydL = yd.length; 60890 60891 // Compare digit by digit. 60892 for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) { 60893 if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1; 60894 } 60895 60896 // Compare lengths. 60897 return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; 60898}; 60899 60900 60901/* 60902 * Return a new Decimal whose value is the cosine of the value in radians of this Decimal. 60903 * 60904 * Domain: [-Infinity, Infinity] 60905 * Range: [-1, 1] 60906 * 60907 * cos(0) = 1 60908 * cos(-0) = 1 60909 * cos(Infinity) = NaN 60910 * cos(-Infinity) = NaN 60911 * cos(NaN) = NaN 60912 * 60913 */ 60914P.cosine = P.cos = function () { 60915 var pr, rm, 60916 x = this, 60917 Ctor = x.constructor; 60918 60919 if (!x.d) return new Ctor(NaN); 60920 60921 // cos(0) = cos(-0) = 1 60922 if (!x.d[0]) return new Ctor(1); 60923 60924 pr = Ctor.precision; 60925 rm = Ctor.rounding; 60926 Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; 60927 Ctor.rounding = 1; 60928 60929 x = cosine(Ctor, toLessThanHalfPi(Ctor, x)); 60930 60931 Ctor.precision = pr; 60932 Ctor.rounding = rm; 60933 60934 return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); 60935}; 60936 60937 60938/* 60939 * 60940 * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to 60941 * `precision` significant digits using rounding mode `rounding`. 60942 * 60943 * cbrt(0) = 0 60944 * cbrt(-0) = -0 60945 * cbrt(1) = 1 60946 * cbrt(-1) = -1 60947 * cbrt(N) = N 60948 * cbrt(-I) = -I 60949 * cbrt(I) = I 60950 * 60951 * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3)) 60952 * 60953 */ 60954P.cubeRoot = P.cbrt = function () { 60955 var e, m, n, r, rep, s, sd, t, t3, t3plusx, 60956 x = this, 60957 Ctor = x.constructor; 60958 60959 if (!x.isFinite() || x.isZero()) return new Ctor(x); 60960 external = false; 60961 60962 // Initial estimate. 60963 s = x.s * mathpow(x.s * x, 1 / 3); 60964 60965 // Math.cbrt underflow/overflow? 60966 // Pass x to Math.pow as integer, then adjust the exponent of the result. 60967 if (!s || Math.abs(s) == 1 / 0) { 60968 n = digitsToString(x.d); 60969 e = x.e; 60970 60971 // Adjust n exponent so it is a multiple of 3 away from x exponent. 60972 if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00'); 60973 s = mathpow(n, 1 / 3); 60974 60975 // Rarely, e may be one less than the result exponent value. 60976 e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)); 60977 60978 if (s == 1 / 0) { 60979 n = '5e' + e; 60980 } else { 60981 n = s.toExponential(); 60982 n = n.slice(0, n.indexOf('e') + 1) + e; 60983 } 60984 60985 r = new Ctor(n); 60986 r.s = x.s; 60987 } else { 60988 r = new Ctor(s.toString()); 60989 } 60990 60991 sd = (e = Ctor.precision) + 3; 60992 60993 // Halley's method. 60994 // TODO? Compare Newton's method. 60995 for (;;) { 60996 t = r; 60997 t3 = t.times(t).times(t); 60998 t3plusx = t3.plus(x); 60999 r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1); 61000 61001 // TODO? Replace with for-loop and checkRoundingDigits. 61002 if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { 61003 n = n.slice(sd - 3, sd + 1); 61004 61005 // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999 61006 // , i.e. approaching a rounding boundary, continue the iteration. 61007 if (n == '9999' || !rep && n == '4999') { 61008 61009 // On the first iteration only, check to see if rounding up gives the exact result as the 61010 // nines may infinitely repeat. 61011 if (!rep) { 61012 finalise(t, e + 1, 0); 61013 61014 if (t.times(t).times(t).eq(x)) { 61015 r = t; 61016 break; 61017 } 61018 } 61019 61020 sd += 4; 61021 rep = 1; 61022 } else { 61023 61024 // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. 61025 // If not, then there are further digits and m will be truthy. 61026 if (!+n || !+n.slice(1) && n.charAt(0) == '5') { 61027 61028 // Truncate to the first rounding digit. 61029 finalise(r, e + 1, 1); 61030 m = !r.times(r).times(r).eq(x); 61031 } 61032 61033 break; 61034 } 61035 } 61036 } 61037 61038 external = true; 61039 61040 return finalise(r, e, Ctor.rounding, m); 61041}; 61042 61043 61044/* 61045 * Return the number of decimal places of the value of this Decimal. 61046 * 61047 */ 61048P.decimalPlaces = P.dp = function () { 61049 var w, 61050 d = this.d, 61051 n = NaN; 61052 61053 if (d) { 61054 w = d.length - 1; 61055 n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE; 61056 61057 // Subtract the number of trailing zeros of the last word. 61058 w = d[w]; 61059 if (w) for (; w % 10 == 0; w /= 10) n--; 61060 if (n < 0) n = 0; 61061 } 61062 61063 return n; 61064}; 61065 61066 61067/* 61068 * n / 0 = I 61069 * n / N = N 61070 * n / I = 0 61071 * 0 / n = 0 61072 * 0 / 0 = N 61073 * 0 / N = N 61074 * 0 / I = 0 61075 * N / n = N 61076 * N / 0 = N 61077 * N / N = N 61078 * N / I = N 61079 * I / n = I 61080 * I / 0 = I 61081 * I / N = N 61082 * I / I = N 61083 * 61084 * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to 61085 * `precision` significant digits using rounding mode `rounding`. 61086 * 61087 */ 61088P.dividedBy = P.div = function (y) { 61089 return divide(this, new this.constructor(y)); 61090}; 61091 61092 61093/* 61094 * Return a new Decimal whose value is the integer part of dividing the value of this Decimal 61095 * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`. 61096 * 61097 */ 61098P.dividedToIntegerBy = P.divToInt = function (y) { 61099 var x = this, 61100 Ctor = x.constructor; 61101 return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding); 61102}; 61103 61104 61105/* 61106 * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false. 61107 * 61108 */ 61109P.equals = P.eq = function (y) { 61110 return this.cmp(y) === 0; 61111}; 61112 61113 61114/* 61115 * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the 61116 * direction of negative Infinity. 61117 * 61118 */ 61119P.floor = function () { 61120 return finalise(new this.constructor(this), this.e + 1, 3); 61121}; 61122 61123 61124/* 61125 * Return true if the value of this Decimal is greater than the value of `y`, otherwise return 61126 * false. 61127 * 61128 */ 61129P.greaterThan = P.gt = function (y) { 61130 return this.cmp(y) > 0; 61131}; 61132 61133 61134/* 61135 * Return true if the value of this Decimal is greater than or equal to the value of `y`, 61136 * otherwise return false. 61137 * 61138 */ 61139P.greaterThanOrEqualTo = P.gte = function (y) { 61140 var k = this.cmp(y); 61141 return k == 1 || k === 0; 61142}; 61143 61144 61145/* 61146 * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this 61147 * Decimal. 61148 * 61149 * Domain: [-Infinity, Infinity] 61150 * Range: [1, Infinity] 61151 * 61152 * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... 61153 * 61154 * cosh(0) = 1 61155 * cosh(-0) = 1 61156 * cosh(Infinity) = Infinity 61157 * cosh(-Infinity) = Infinity 61158 * cosh(NaN) = NaN 61159 * 61160 * x time taken (ms) result 61161 * 1000 9 9.8503555700852349694e+433 61162 * 10000 25 4.4034091128314607936e+4342 61163 * 100000 171 1.4033316802130615897e+43429 61164 * 1000000 3817 1.5166076984010437725e+434294 61165 * 10000000 abandoned after 2 minute wait 61166 * 61167 * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x)) 61168 * 61169 */ 61170P.hyperbolicCosine = P.cosh = function () { 61171 var k, n, pr, rm, len, 61172 x = this, 61173 Ctor = x.constructor, 61174 one = new Ctor(1); 61175 61176 if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN); 61177 if (x.isZero()) return one; 61178 61179 pr = Ctor.precision; 61180 rm = Ctor.rounding; 61181 Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; 61182 Ctor.rounding = 1; 61183 len = x.d.length; 61184 61185 // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1 61186 // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4)) 61187 61188 // Estimate the optimum number of times to use the argument reduction. 61189 // TODO? Estimation reused from cosine() and may not be optimal here. 61190 if (len < 32) { 61191 k = Math.ceil(len / 3); 61192 n = (1 / tinyPow(4, k)).toString(); 61193 } else { 61194 k = 16; 61195 n = '2.3283064365386962890625e-10'; 61196 } 61197 61198 x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true); 61199 61200 // Reverse argument reduction 61201 var cosh2_x, 61202 i = k, 61203 d8 = new Ctor(8); 61204 for (; i--;) { 61205 cosh2_x = x.times(x); 61206 x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8)))); 61207 } 61208 61209 return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); 61210}; 61211 61212 61213/* 61214 * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this 61215 * Decimal. 61216 * 61217 * Domain: [-Infinity, Infinity] 61218 * Range: [-Infinity, Infinity] 61219 * 61220 * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... 61221 * 61222 * sinh(0) = 0 61223 * sinh(-0) = -0 61224 * sinh(Infinity) = Infinity 61225 * sinh(-Infinity) = -Infinity 61226 * sinh(NaN) = NaN 61227 * 61228 * x time taken (ms) 61229 * 10 2 ms 61230 * 100 5 ms 61231 * 1000 14 ms 61232 * 10000 82 ms 61233 * 100000 886 ms 1.4033316802130615897e+43429 61234 * 200000 2613 ms 61235 * 300000 5407 ms 61236 * 400000 8824 ms 61237 * 500000 13026 ms 8.7080643612718084129e+217146 61238 * 1000000 48543 ms 61239 * 61240 * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x)) 61241 * 61242 */ 61243P.hyperbolicSine = P.sinh = function () { 61244 var k, pr, rm, len, 61245 x = this, 61246 Ctor = x.constructor; 61247 61248 if (!x.isFinite() || x.isZero()) return new Ctor(x); 61249 61250 pr = Ctor.precision; 61251 rm = Ctor.rounding; 61252 Ctor.precision = pr + Math.max(x.e, x.sd()) + 4; 61253 Ctor.rounding = 1; 61254 len = x.d.length; 61255 61256 if (len < 3) { 61257 x = taylorSeries(Ctor, 2, x, x, true); 61258 } else { 61259 61260 // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x)) 61261 // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3)) 61262 // 3 multiplications and 1 addition 61263 61264 // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x))) 61265 // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5))) 61266 // 4 multiplications and 2 additions 61267 61268 // Estimate the optimum number of times to use the argument reduction. 61269 k = 1.4 * Math.sqrt(len); 61270 k = k > 16 ? 16 : k | 0; 61271 61272 x = x.times(1 / tinyPow(5, k)); 61273 x = taylorSeries(Ctor, 2, x, x, true); 61274 61275 // Reverse argument reduction 61276 var sinh2_x, 61277 d5 = new Ctor(5), 61278 d16 = new Ctor(16), 61279 d20 = new Ctor(20); 61280 for (; k--;) { 61281 sinh2_x = x.times(x); 61282 x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20)))); 61283 } 61284 } 61285 61286 Ctor.precision = pr; 61287 Ctor.rounding = rm; 61288 61289 return finalise(x, pr, rm, true); 61290}; 61291 61292 61293/* 61294 * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this 61295 * Decimal. 61296 * 61297 * Domain: [-Infinity, Infinity] 61298 * Range: [-1, 1] 61299 * 61300 * tanh(x) = sinh(x) / cosh(x) 61301 * 61302 * tanh(0) = 0 61303 * tanh(-0) = -0 61304 * tanh(Infinity) = 1 61305 * tanh(-Infinity) = -1 61306 * tanh(NaN) = NaN 61307 * 61308 */ 61309P.hyperbolicTangent = P.tanh = function () { 61310 var pr, rm, 61311 x = this, 61312 Ctor = x.constructor; 61313 61314 if (!x.isFinite()) return new Ctor(x.s); 61315 if (x.isZero()) return new Ctor(x); 61316 61317 pr = Ctor.precision; 61318 rm = Ctor.rounding; 61319 Ctor.precision = pr + 7; 61320 Ctor.rounding = 1; 61321 61322 return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); 61323}; 61324 61325 61326/* 61327 * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of 61328 * this Decimal. 61329 * 61330 * Domain: [-1, 1] 61331 * Range: [0, pi] 61332 * 61333 * acos(x) = pi/2 - asin(x) 61334 * 61335 * acos(0) = pi/2 61336 * acos(-0) = pi/2 61337 * acos(1) = 0 61338 * acos(-1) = pi 61339 * acos(1/2) = pi/3 61340 * acos(-1/2) = 2*pi/3 61341 * acos(|x| > 1) = NaN 61342 * acos(NaN) = NaN 61343 * 61344 */ 61345P.inverseCosine = P.acos = function () { 61346 var halfPi, 61347 x = this, 61348 Ctor = x.constructor, 61349 k = x.abs().cmp(1), 61350 pr = Ctor.precision, 61351 rm = Ctor.rounding; 61352 61353 if (k !== -1) { 61354 return k === 0 61355 // |x| is 1 61356 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) 61357 // |x| > 1 or x is NaN 61358 : new Ctor(NaN); 61359 } 61360 61361 if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5); 61362 61363 // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3 61364 61365 Ctor.precision = pr + 6; 61366 Ctor.rounding = 1; 61367 61368 x = x.asin(); 61369 halfPi = getPi(Ctor, pr + 4, rm).times(0.5); 61370 61371 Ctor.precision = pr; 61372 Ctor.rounding = rm; 61373 61374 return halfPi.minus(x); 61375}; 61376 61377 61378/* 61379 * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the 61380 * value of this Decimal. 61381 * 61382 * Domain: [1, Infinity] 61383 * Range: [0, Infinity] 61384 * 61385 * acosh(x) = ln(x + sqrt(x^2 - 1)) 61386 * 61387 * acosh(x < 1) = NaN 61388 * acosh(NaN) = NaN 61389 * acosh(Infinity) = Infinity 61390 * acosh(-Infinity) = NaN 61391 * acosh(0) = NaN 61392 * acosh(-0) = NaN 61393 * acosh(1) = 0 61394 * acosh(-1) = NaN 61395 * 61396 */ 61397P.inverseHyperbolicCosine = P.acosh = function () { 61398 var pr, rm, 61399 x = this, 61400 Ctor = x.constructor; 61401 61402 if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN); 61403 if (!x.isFinite()) return new Ctor(x); 61404 61405 pr = Ctor.precision; 61406 rm = Ctor.rounding; 61407 Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4; 61408 Ctor.rounding = 1; 61409 external = false; 61410 61411 x = x.times(x).minus(1).sqrt().plus(x); 61412 61413 external = true; 61414 Ctor.precision = pr; 61415 Ctor.rounding = rm; 61416 61417 return x.ln(); 61418}; 61419 61420 61421/* 61422 * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value 61423 * of this Decimal. 61424 * 61425 * Domain: [-Infinity, Infinity] 61426 * Range: [-Infinity, Infinity] 61427 * 61428 * asinh(x) = ln(x + sqrt(x^2 + 1)) 61429 * 61430 * asinh(NaN) = NaN 61431 * asinh(Infinity) = Infinity 61432 * asinh(-Infinity) = -Infinity 61433 * asinh(0) = 0 61434 * asinh(-0) = -0 61435 * 61436 */ 61437P.inverseHyperbolicSine = P.asinh = function () { 61438 var pr, rm, 61439 x = this, 61440 Ctor = x.constructor; 61441 61442 if (!x.isFinite() || x.isZero()) return new Ctor(x); 61443 61444 pr = Ctor.precision; 61445 rm = Ctor.rounding; 61446 Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6; 61447 Ctor.rounding = 1; 61448 external = false; 61449 61450 x = x.times(x).plus(1).sqrt().plus(x); 61451 61452 external = true; 61453 Ctor.precision = pr; 61454 Ctor.rounding = rm; 61455 61456 return x.ln(); 61457}; 61458 61459 61460/* 61461 * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the 61462 * value of this Decimal. 61463 * 61464 * Domain: [-1, 1] 61465 * Range: [-Infinity, Infinity] 61466 * 61467 * atanh(x) = 0.5 * ln((1 + x) / (1 - x)) 61468 * 61469 * atanh(|x| > 1) = NaN 61470 * atanh(NaN) = NaN 61471 * atanh(Infinity) = NaN 61472 * atanh(-Infinity) = NaN 61473 * atanh(0) = 0 61474 * atanh(-0) = -0 61475 * atanh(1) = Infinity 61476 * atanh(-1) = -Infinity 61477 * 61478 */ 61479P.inverseHyperbolicTangent = P.atanh = function () { 61480 var pr, rm, wpr, xsd, 61481 x = this, 61482 Ctor = x.constructor; 61483 61484 if (!x.isFinite()) return new Ctor(NaN); 61485 if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN); 61486 61487 pr = Ctor.precision; 61488 rm = Ctor.rounding; 61489 xsd = x.sd(); 61490 61491 if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true); 61492 61493 Ctor.precision = wpr = xsd - x.e; 61494 61495 x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1); 61496 61497 Ctor.precision = pr + 4; 61498 Ctor.rounding = 1; 61499 61500 x = x.ln(); 61501 61502 Ctor.precision = pr; 61503 Ctor.rounding = rm; 61504 61505 return x.times(0.5); 61506}; 61507 61508 61509/* 61510 * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this 61511 * Decimal. 61512 * 61513 * Domain: [-Infinity, Infinity] 61514 * Range: [-pi/2, pi/2] 61515 * 61516 * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) 61517 * 61518 * asin(0) = 0 61519 * asin(-0) = -0 61520 * asin(1/2) = pi/6 61521 * asin(-1/2) = -pi/6 61522 * asin(1) = pi/2 61523 * asin(-1) = -pi/2 61524 * asin(|x| > 1) = NaN 61525 * asin(NaN) = NaN 61526 * 61527 * TODO? Compare performance of Taylor series. 61528 * 61529 */ 61530P.inverseSine = P.asin = function () { 61531 var halfPi, k, 61532 pr, rm, 61533 x = this, 61534 Ctor = x.constructor; 61535 61536 if (x.isZero()) return new Ctor(x); 61537 61538 k = x.abs().cmp(1); 61539 pr = Ctor.precision; 61540 rm = Ctor.rounding; 61541 61542 if (k !== -1) { 61543 61544 // |x| is 1 61545 if (k === 0) { 61546 halfPi = getPi(Ctor, pr + 4, rm).times(0.5); 61547 halfPi.s = x.s; 61548 return halfPi; 61549 } 61550 61551 // |x| > 1 or x is NaN 61552 return new Ctor(NaN); 61553 } 61554 61555 // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6 61556 61557 Ctor.precision = pr + 6; 61558 Ctor.rounding = 1; 61559 61560 x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan(); 61561 61562 Ctor.precision = pr; 61563 Ctor.rounding = rm; 61564 61565 return x.times(2); 61566}; 61567 61568 61569/* 61570 * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value 61571 * of this Decimal. 61572 * 61573 * Domain: [-Infinity, Infinity] 61574 * Range: [-pi/2, pi/2] 61575 * 61576 * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... 61577 * 61578 * atan(0) = 0 61579 * atan(-0) = -0 61580 * atan(1) = pi/4 61581 * atan(-1) = -pi/4 61582 * atan(Infinity) = pi/2 61583 * atan(-Infinity) = -pi/2 61584 * atan(NaN) = NaN 61585 * 61586 */ 61587P.inverseTangent = P.atan = function () { 61588 var i, j, k, n, px, t, r, wpr, x2, 61589 x = this, 61590 Ctor = x.constructor, 61591 pr = Ctor.precision, 61592 rm = Ctor.rounding; 61593 61594 if (!x.isFinite()) { 61595 if (!x.s) return new Ctor(NaN); 61596 if (pr + 4 <= PI_PRECISION) { 61597 r = getPi(Ctor, pr + 4, rm).times(0.5); 61598 r.s = x.s; 61599 return r; 61600 } 61601 } else if (x.isZero()) { 61602 return new Ctor(x); 61603 } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) { 61604 r = getPi(Ctor, pr + 4, rm).times(0.25); 61605 r.s = x.s; 61606 return r; 61607 } 61608 61609 Ctor.precision = wpr = pr + 10; 61610 Ctor.rounding = 1; 61611 61612 // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x); 61613 61614 // Argument reduction 61615 // Ensure |x| < 0.42 61616 // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2))) 61617 61618 k = Math.min(28, wpr / LOG_BASE + 2 | 0); 61619 61620 for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1)); 61621 61622 external = false; 61623 61624 j = Math.ceil(wpr / LOG_BASE); 61625 n = 1; 61626 x2 = x.times(x); 61627 r = new Ctor(x); 61628 px = x; 61629 61630 // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ... 61631 for (; i !== -1;) { 61632 px = px.times(x2); 61633 t = r.minus(px.div(n += 2)); 61634 61635 px = px.times(x2); 61636 r = t.plus(px.div(n += 2)); 61637 61638 if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;); 61639 } 61640 61641 if (k) r = r.times(2 << (k - 1)); 61642 61643 external = true; 61644 61645 return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true); 61646}; 61647 61648 61649/* 61650 * Return true if the value of this Decimal is a finite number, otherwise return false. 61651 * 61652 */ 61653P.isFinite = function () { 61654 return !!this.d; 61655}; 61656 61657 61658/* 61659 * Return true if the value of this Decimal is an integer, otherwise return false. 61660 * 61661 */ 61662P.isInteger = P.isInt = function () { 61663 return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; 61664}; 61665 61666 61667/* 61668 * Return true if the value of this Decimal is NaN, otherwise return false. 61669 * 61670 */ 61671P.isNaN = function () { 61672 return !this.s; 61673}; 61674 61675 61676/* 61677 * Return true if the value of this Decimal is negative, otherwise return false. 61678 * 61679 */ 61680P.isNegative = P.isNeg = function () { 61681 return this.s < 0; 61682}; 61683 61684 61685/* 61686 * Return true if the value of this Decimal is positive, otherwise return false. 61687 * 61688 */ 61689P.isPositive = P.isPos = function () { 61690 return this.s > 0; 61691}; 61692 61693 61694/* 61695 * Return true if the value of this Decimal is 0 or -0, otherwise return false. 61696 * 61697 */ 61698P.isZero = function () { 61699 return !!this.d && this.d[0] === 0; 61700}; 61701 61702 61703/* 61704 * Return true if the value of this Decimal is less than `y`, otherwise return false. 61705 * 61706 */ 61707P.lessThan = P.lt = function (y) { 61708 return this.cmp(y) < 0; 61709}; 61710 61711 61712/* 61713 * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false. 61714 * 61715 */ 61716P.lessThanOrEqualTo = P.lte = function (y) { 61717 return this.cmp(y) < 1; 61718}; 61719 61720 61721/* 61722 * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision` 61723 * significant digits using rounding mode `rounding`. 61724 * 61725 * If no base is specified, return log[10](arg). 61726 * 61727 * log[base](arg) = ln(arg) / ln(base) 61728 * 61729 * The result will always be correctly rounded if the base of the log is 10, and 'almost always' 61730 * otherwise: 61731 * 61732 * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen 61733 * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error 61734 * between the result and the correctly rounded result will be one ulp (unit in the last place). 61735 * 61736 * log[-b](a) = NaN 61737 * log[0](a) = NaN 61738 * log[1](a) = NaN 61739 * log[NaN](a) = NaN 61740 * log[Infinity](a) = NaN 61741 * log[b](0) = -Infinity 61742 * log[b](-0) = -Infinity 61743 * log[b](-a) = NaN 61744 * log[b](1) = 0 61745 * log[b](Infinity) = Infinity 61746 * log[b](NaN) = NaN 61747 * 61748 * [base] {number|string|Decimal} The base of the logarithm. 61749 * 61750 */ 61751P.logarithm = P.log = function (base) { 61752 var isBase10, d, denominator, k, inf, num, sd, r, 61753 arg = this, 61754 Ctor = arg.constructor, 61755 pr = Ctor.precision, 61756 rm = Ctor.rounding, 61757 guard = 5; 61758 61759 // Default base is 10. 61760 if (base == null) { 61761 base = new Ctor(10); 61762 isBase10 = true; 61763 } else { 61764 base = new Ctor(base); 61765 d = base.d; 61766 61767 // Return NaN if base is negative, or non-finite, or is 0 or 1. 61768 if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN); 61769 61770 isBase10 = base.eq(10); 61771 } 61772 61773 d = arg.d; 61774 61775 // Is arg negative, non-finite, 0 or 1? 61776 if (arg.s < 0 || !d || !d[0] || arg.eq(1)) { 61777 return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0); 61778 } 61779 61780 // The result will have a non-terminating decimal expansion if base is 10 and arg is not an 61781 // integer power of 10. 61782 if (isBase10) { 61783 if (d.length > 1) { 61784 inf = true; 61785 } else { 61786 for (k = d[0]; k % 10 === 0;) k /= 10; 61787 inf = k !== 1; 61788 } 61789 } 61790 61791 external = false; 61792 sd = pr + guard; 61793 num = naturalLogarithm(arg, sd); 61794 denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); 61795 61796 // The result will have 5 rounding digits. 61797 r = divide(num, denominator, sd, 1); 61798 61799 // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000, 61800 // calculate 10 further digits. 61801 // 61802 // If the result is known to have an infinite decimal expansion, repeat this until it is clear 61803 // that the result is above or below the boundary. Otherwise, if after calculating the 10 61804 // further digits, the last 14 are nines, round up and assume the result is exact. 61805 // Also assume the result is exact if the last 14 are zero. 61806 // 61807 // Example of a result that will be incorrectly rounded: 61808 // log[1048576](4503599627370502) = 2.60000000000000009610279511444746... 61809 // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it 61810 // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so 61811 // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal 61812 // place is still 2.6. 61813 if (checkRoundingDigits(r.d, k = pr, rm)) { 61814 61815 do { 61816 sd += 10; 61817 num = naturalLogarithm(arg, sd); 61818 denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd); 61819 r = divide(num, denominator, sd, 1); 61820 61821 if (!inf) { 61822 61823 // Check for 14 nines from the 2nd rounding digit, as the first may be 4. 61824 if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) { 61825 r = finalise(r, pr + 1, 0); 61826 } 61827 61828 break; 61829 } 61830 } while (checkRoundingDigits(r.d, k += 10, rm)); 61831 } 61832 61833 external = true; 61834 61835 return finalise(r, pr, rm); 61836}; 61837 61838 61839/* 61840 * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal. 61841 * 61842 * arguments {number|string|Decimal} 61843 * 61844P.max = function () { 61845 Array.prototype.push.call(arguments, this); 61846 return maxOrMin(this.constructor, arguments, 'lt'); 61847}; 61848 */ 61849 61850 61851/* 61852 * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal. 61853 * 61854 * arguments {number|string|Decimal} 61855 * 61856P.min = function () { 61857 Array.prototype.push.call(arguments, this); 61858 return maxOrMin(this.constructor, arguments, 'gt'); 61859}; 61860 */ 61861 61862 61863/* 61864 * n - 0 = n 61865 * n - N = N 61866 * n - I = -I 61867 * 0 - n = -n 61868 * 0 - 0 = 0 61869 * 0 - N = N 61870 * 0 - I = -I 61871 * N - n = N 61872 * N - 0 = N 61873 * N - N = N 61874 * N - I = N 61875 * I - n = I 61876 * I - 0 = I 61877 * I - N = N 61878 * I - I = N 61879 * 61880 * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision` 61881 * significant digits using rounding mode `rounding`. 61882 * 61883 */ 61884P.minus = P.sub = function (y) { 61885 var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd, 61886 x = this, 61887 Ctor = x.constructor; 61888 61889 y = new Ctor(y); 61890 61891 // If either is not finite... 61892 if (!x.d || !y.d) { 61893 61894 // Return NaN if either is NaN. 61895 if (!x.s || !y.s) y = new Ctor(NaN); 61896 61897 // Return y negated if x is finite and y is ±Infinity. 61898 else if (x.d) y.s = -y.s; 61899 61900 // Return x if y is finite and x is ±Infinity. 61901 // Return x if both are ±Infinity with different signs. 61902 // Return NaN if both are ±Infinity with the same sign. 61903 else y = new Ctor(y.d || x.s !== y.s ? x : NaN); 61904 61905 return y; 61906 } 61907 61908 // If signs differ... 61909 if (x.s != y.s) { 61910 y.s = -y.s; 61911 return x.plus(y); 61912 } 61913 61914 xd = x.d; 61915 yd = y.d; 61916 pr = Ctor.precision; 61917 rm = Ctor.rounding; 61918 61919 // If either is zero... 61920 if (!xd[0] || !yd[0]) { 61921 61922 // Return y negated if x is zero and y is non-zero. 61923 if (yd[0]) y.s = -y.s; 61924 61925 // Return x if y is zero and x is non-zero. 61926 else if (xd[0]) y = new Ctor(x); 61927 61928 // Return zero if both are zero. 61929 // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity. 61930 else return new Ctor(rm === 3 ? -0 : 0); 61931 61932 return external ? finalise(y, pr, rm) : y; 61933 } 61934 61935 // x and y are finite, non-zero numbers with the same sign. 61936 61937 // Calculate base 1e7 exponents. 61938 e = mathfloor(y.e / LOG_BASE); 61939 xe = mathfloor(x.e / LOG_BASE); 61940 61941 xd = xd.slice(); 61942 k = xe - e; 61943 61944 // If base 1e7 exponents differ... 61945 if (k) { 61946 xLTy = k < 0; 61947 61948 if (xLTy) { 61949 d = xd; 61950 k = -k; 61951 len = yd.length; 61952 } else { 61953 d = yd; 61954 e = xe; 61955 len = xd.length; 61956 } 61957 61958 // Numbers with massively different exponents would result in a very high number of 61959 // zeros needing to be prepended, but this can be avoided while still ensuring correct 61960 // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`. 61961 i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2; 61962 61963 if (k > i) { 61964 k = i; 61965 d.length = 1; 61966 } 61967 61968 // Prepend zeros to equalise exponents. 61969 d.reverse(); 61970 for (i = k; i--;) d.push(0); 61971 d.reverse(); 61972 61973 // Base 1e7 exponents equal. 61974 } else { 61975 61976 // Check digits to determine which is the bigger number. 61977 61978 i = xd.length; 61979 len = yd.length; 61980 xLTy = i < len; 61981 if (xLTy) len = i; 61982 61983 for (i = 0; i < len; i++) { 61984 if (xd[i] != yd[i]) { 61985 xLTy = xd[i] < yd[i]; 61986 break; 61987 } 61988 } 61989 61990 k = 0; 61991 } 61992 61993 if (xLTy) { 61994 d = xd; 61995 xd = yd; 61996 yd = d; 61997 y.s = -y.s; 61998 } 61999 62000 len = xd.length; 62001 62002 // Append zeros to `xd` if shorter. 62003 // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length. 62004 for (i = yd.length - len; i > 0; --i) xd[len++] = 0; 62005 62006 // Subtract yd from xd. 62007 for (i = yd.length; i > k;) { 62008 62009 if (xd[--i] < yd[i]) { 62010 for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1; 62011 --xd[j]; 62012 xd[i] += BASE; 62013 } 62014 62015 xd[i] -= yd[i]; 62016 } 62017 62018 // Remove trailing zeros. 62019 for (; xd[--len] === 0;) xd.pop(); 62020 62021 // Remove leading zeros and adjust exponent accordingly. 62022 for (; xd[0] === 0; xd.shift()) --e; 62023 62024 // Zero? 62025 if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0); 62026 62027 y.d = xd; 62028 y.e = getBase10Exponent(xd, e); 62029 62030 return external ? finalise(y, pr, rm) : y; 62031}; 62032 62033 62034/* 62035 * n % 0 = N 62036 * n % N = N 62037 * n % I = n 62038 * 0 % n = 0 62039 * -0 % n = -0 62040 * 0 % 0 = N 62041 * 0 % N = N 62042 * 0 % I = 0 62043 * N % n = N 62044 * N % 0 = N 62045 * N % N = N 62046 * N % I = N 62047 * I % n = N 62048 * I % 0 = N 62049 * I % N = N 62050 * I % I = N 62051 * 62052 * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to 62053 * `precision` significant digits using rounding mode `rounding`. 62054 * 62055 * The result depends on the modulo mode. 62056 * 62057 */ 62058P.modulo = P.mod = function (y) { 62059 var q, 62060 x = this, 62061 Ctor = x.constructor; 62062 62063 y = new Ctor(y); 62064 62065 // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0. 62066 if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN); 62067 62068 // Return x if y is ±Infinity or x is ±0. 62069 if (!y.d || x.d && !x.d[0]) { 62070 return finalise(new Ctor(x), Ctor.precision, Ctor.rounding); 62071 } 62072 62073 // Prevent rounding of intermediate calculations. 62074 external = false; 62075 62076 if (Ctor.modulo == 9) { 62077 62078 // Euclidian division: q = sign(y) * floor(x / abs(y)) 62079 // result = x - q * y where 0 <= result < abs(y) 62080 q = divide(x, y.abs(), 0, 3, 1); 62081 q.s *= y.s; 62082 } else { 62083 q = divide(x, y, 0, Ctor.modulo, 1); 62084 } 62085 62086 q = q.times(y); 62087 62088 external = true; 62089 62090 return x.minus(q); 62091}; 62092 62093 62094/* 62095 * Return a new Decimal whose value is the natural exponential of the value of this Decimal, 62096 * i.e. the base e raised to the power the value of this Decimal, rounded to `precision` 62097 * significant digits using rounding mode `rounding`. 62098 * 62099 */ 62100P.naturalExponential = P.exp = function () { 62101 return naturalExponential(this); 62102}; 62103 62104 62105/* 62106 * Return a new Decimal whose value is the natural logarithm of the value of this Decimal, 62107 * rounded to `precision` significant digits using rounding mode `rounding`. 62108 * 62109 */ 62110P.naturalLogarithm = P.ln = function () { 62111 return naturalLogarithm(this); 62112}; 62113 62114 62115/* 62116 * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by 62117 * -1. 62118 * 62119 */ 62120P.negated = P.neg = function () { 62121 var x = new this.constructor(this); 62122 x.s = -x.s; 62123 return finalise(x); 62124}; 62125 62126 62127/* 62128 * n + 0 = n 62129 * n + N = N 62130 * n + I = I 62131 * 0 + n = n 62132 * 0 + 0 = 0 62133 * 0 + N = N 62134 * 0 + I = I 62135 * N + n = N 62136 * N + 0 = N 62137 * N + N = N 62138 * N + I = N 62139 * I + n = I 62140 * I + 0 = I 62141 * I + N = N 62142 * I + I = I 62143 * 62144 * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision` 62145 * significant digits using rounding mode `rounding`. 62146 * 62147 */ 62148P.plus = P.add = function (y) { 62149 var carry, d, e, i, k, len, pr, rm, xd, yd, 62150 x = this, 62151 Ctor = x.constructor; 62152 62153 y = new Ctor(y); 62154 62155 // If either is not finite... 62156 if (!x.d || !y.d) { 62157 62158 // Return NaN if either is NaN. 62159 if (!x.s || !y.s) y = new Ctor(NaN); 62160 62161 // Return x if y is finite and x is ±Infinity. 62162 // Return x if both are ±Infinity with the same sign. 62163 // Return NaN if both are ±Infinity with different signs. 62164 // Return y if x is finite and y is ±Infinity. 62165 else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN); 62166 62167 return y; 62168 } 62169 62170 // If signs differ... 62171 if (x.s != y.s) { 62172 y.s = -y.s; 62173 return x.minus(y); 62174 } 62175 62176 xd = x.d; 62177 yd = y.d; 62178 pr = Ctor.precision; 62179 rm = Ctor.rounding; 62180 62181 // If either is zero... 62182 if (!xd[0] || !yd[0]) { 62183 62184 // Return x if y is zero. 62185 // Return y if y is non-zero. 62186 if (!yd[0]) y = new Ctor(x); 62187 62188 return external ? finalise(y, pr, rm) : y; 62189 } 62190 62191 // x and y are finite, non-zero numbers with the same sign. 62192 62193 // Calculate base 1e7 exponents. 62194 k = mathfloor(x.e / LOG_BASE); 62195 e = mathfloor(y.e / LOG_BASE); 62196 62197 xd = xd.slice(); 62198 i = k - e; 62199 62200 // If base 1e7 exponents differ... 62201 if (i) { 62202 62203 if (i < 0) { 62204 d = xd; 62205 i = -i; 62206 len = yd.length; 62207 } else { 62208 d = yd; 62209 e = k; 62210 len = xd.length; 62211 } 62212 62213 // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1. 62214 k = Math.ceil(pr / LOG_BASE); 62215 len = k > len ? k + 1 : len + 1; 62216 62217 if (i > len) { 62218 i = len; 62219 d.length = 1; 62220 } 62221 62222 // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts. 62223 d.reverse(); 62224 for (; i--;) d.push(0); 62225 d.reverse(); 62226 } 62227 62228 len = xd.length; 62229 i = yd.length; 62230 62231 // If yd is longer than xd, swap xd and yd so xd points to the longer array. 62232 if (len - i < 0) { 62233 i = len; 62234 d = yd; 62235 yd = xd; 62236 xd = d; 62237 } 62238 62239 // Only start adding at yd.length - 1 as the further digits of xd can be left as they are. 62240 for (carry = 0; i;) { 62241 carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0; 62242 xd[i] %= BASE; 62243 } 62244 62245 if (carry) { 62246 xd.unshift(carry); 62247 ++e; 62248 } 62249 62250 // Remove trailing zeros. 62251 // No need to check for zero, as +x + +y != 0 && -x + -y != 0 62252 for (len = xd.length; xd[--len] == 0;) xd.pop(); 62253 62254 y.d = xd; 62255 y.e = getBase10Exponent(xd, e); 62256 62257 return external ? finalise(y, pr, rm) : y; 62258}; 62259 62260 62261/* 62262 * Return the number of significant digits of the value of this Decimal. 62263 * 62264 * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. 62265 * 62266 */ 62267P.precision = P.sd = function (z) { 62268 var k, 62269 x = this; 62270 62271 if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z); 62272 62273 if (x.d) { 62274 k = getPrecision(x.d); 62275 if (z && x.e + 1 > k) k = x.e + 1; 62276 } else { 62277 k = NaN; 62278 } 62279 62280 return k; 62281}; 62282 62283 62284/* 62285 * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using 62286 * rounding mode `rounding`. 62287 * 62288 */ 62289P.round = function () { 62290 var x = this, 62291 Ctor = x.constructor; 62292 62293 return finalise(new Ctor(x), x.e + 1, Ctor.rounding); 62294}; 62295 62296 62297/* 62298 * Return a new Decimal whose value is the sine of the value in radians of this Decimal. 62299 * 62300 * Domain: [-Infinity, Infinity] 62301 * Range: [-1, 1] 62302 * 62303 * sin(x) = x - x^3/3! + x^5/5! - ... 62304 * 62305 * sin(0) = 0 62306 * sin(-0) = -0 62307 * sin(Infinity) = NaN 62308 * sin(-Infinity) = NaN 62309 * sin(NaN) = NaN 62310 * 62311 */ 62312P.sine = P.sin = function () { 62313 var pr, rm, 62314 x = this, 62315 Ctor = x.constructor; 62316 62317 if (!x.isFinite()) return new Ctor(NaN); 62318 if (x.isZero()) return new Ctor(x); 62319 62320 pr = Ctor.precision; 62321 rm = Ctor.rounding; 62322 Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE; 62323 Ctor.rounding = 1; 62324 62325 x = sine(Ctor, toLessThanHalfPi(Ctor, x)); 62326 62327 Ctor.precision = pr; 62328 Ctor.rounding = rm; 62329 62330 return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); 62331}; 62332 62333 62334/* 62335 * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision` 62336 * significant digits using rounding mode `rounding`. 62337 * 62338 * sqrt(-n) = N 62339 * sqrt(N) = N 62340 * sqrt(-I) = N 62341 * sqrt(I) = I 62342 * sqrt(0) = 0 62343 * sqrt(-0) = -0 62344 * 62345 */ 62346P.squareRoot = P.sqrt = function () { 62347 var m, n, sd, r, rep, t, 62348 x = this, 62349 d = x.d, 62350 e = x.e, 62351 s = x.s, 62352 Ctor = x.constructor; 62353 62354 // Negative/NaN/Infinity/zero? 62355 if (s !== 1 || !d || !d[0]) { 62356 return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0); 62357 } 62358 62359 external = false; 62360 62361 // Initial estimate. 62362 s = Math.sqrt(+x); 62363 62364 // Math.sqrt underflow/overflow? 62365 // Pass x to Math.sqrt as integer, then adjust the exponent of the result. 62366 if (s == 0 || s == 1 / 0) { 62367 n = digitsToString(d); 62368 62369 if ((n.length + e) % 2 == 0) n += '0'; 62370 s = Math.sqrt(n); 62371 e = mathfloor((e + 1) / 2) - (e < 0 || e % 2); 62372 62373 if (s == 1 / 0) { 62374 n = '5e' + e; 62375 } else { 62376 n = s.toExponential(); 62377 n = n.slice(0, n.indexOf('e') + 1) + e; 62378 } 62379 62380 r = new Ctor(n); 62381 } else { 62382 r = new Ctor(s.toString()); 62383 } 62384 62385 sd = (e = Ctor.precision) + 3; 62386 62387 // Newton-Raphson iteration. 62388 for (;;) { 62389 t = r; 62390 r = t.plus(divide(x, t, sd + 2, 1)).times(0.5); 62391 62392 // TODO? Replace with for-loop and checkRoundingDigits. 62393 if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) { 62394 n = n.slice(sd - 3, sd + 1); 62395 62396 // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 62397 // 4999, i.e. approaching a rounding boundary, continue the iteration. 62398 if (n == '9999' || !rep && n == '4999') { 62399 62400 // On the first iteration only, check to see if rounding up gives the exact result as the 62401 // nines may infinitely repeat. 62402 if (!rep) { 62403 finalise(t, e + 1, 0); 62404 62405 if (t.times(t).eq(x)) { 62406 r = t; 62407 break; 62408 } 62409 } 62410 62411 sd += 4; 62412 rep = 1; 62413 } else { 62414 62415 // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result. 62416 // If not, then there are further digits and m will be truthy. 62417 if (!+n || !+n.slice(1) && n.charAt(0) == '5') { 62418 62419 // Truncate to the first rounding digit. 62420 finalise(r, e + 1, 1); 62421 m = !r.times(r).eq(x); 62422 } 62423 62424 break; 62425 } 62426 } 62427 } 62428 62429 external = true; 62430 62431 return finalise(r, e, Ctor.rounding, m); 62432}; 62433 62434 62435/* 62436 * Return a new Decimal whose value is the tangent of the value in radians of this Decimal. 62437 * 62438 * Domain: [-Infinity, Infinity] 62439 * Range: [-Infinity, Infinity] 62440 * 62441 * tan(0) = 0 62442 * tan(-0) = -0 62443 * tan(Infinity) = NaN 62444 * tan(-Infinity) = NaN 62445 * tan(NaN) = NaN 62446 * 62447 */ 62448P.tangent = P.tan = function () { 62449 var pr, rm, 62450 x = this, 62451 Ctor = x.constructor; 62452 62453 if (!x.isFinite()) return new Ctor(NaN); 62454 if (x.isZero()) return new Ctor(x); 62455 62456 pr = Ctor.precision; 62457 rm = Ctor.rounding; 62458 Ctor.precision = pr + 10; 62459 Ctor.rounding = 1; 62460 62461 x = x.sin(); 62462 x.s = 1; 62463 x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0); 62464 62465 Ctor.precision = pr; 62466 Ctor.rounding = rm; 62467 62468 return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); 62469}; 62470 62471 62472/* 62473 * n * 0 = 0 62474 * n * N = N 62475 * n * I = I 62476 * 0 * n = 0 62477 * 0 * 0 = 0 62478 * 0 * N = N 62479 * 0 * I = N 62480 * N * n = N 62481 * N * 0 = N 62482 * N * N = N 62483 * N * I = N 62484 * I * n = I 62485 * I * 0 = N 62486 * I * N = N 62487 * I * I = I 62488 * 62489 * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant 62490 * digits using rounding mode `rounding`. 62491 * 62492 */ 62493P.times = P.mul = function (y) { 62494 var carry, e, i, k, r, rL, t, xdL, ydL, 62495 x = this, 62496 Ctor = x.constructor, 62497 xd = x.d, 62498 yd = (y = new Ctor(y)).d; 62499 62500 y.s *= x.s; 62501 62502 // If either is NaN, ±Infinity or ±0... 62503 if (!xd || !xd[0] || !yd || !yd[0]) { 62504 62505 return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd 62506 62507 // Return NaN if either is NaN. 62508 // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity. 62509 ? NaN 62510 62511 // Return ±Infinity if either is ±Infinity. 62512 // Return ±0 if either is ±0. 62513 : !xd || !yd ? y.s / 0 : y.s * 0); 62514 } 62515 62516 e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE); 62517 xdL = xd.length; 62518 ydL = yd.length; 62519 62520 // Ensure xd points to the longer array. 62521 if (xdL < ydL) { 62522 r = xd; 62523 xd = yd; 62524 yd = r; 62525 rL = xdL; 62526 xdL = ydL; 62527 ydL = rL; 62528 } 62529 62530 // Initialise the result array with zeros. 62531 r = []; 62532 rL = xdL + ydL; 62533 for (i = rL; i--;) r.push(0); 62534 62535 // Multiply! 62536 for (i = ydL; --i >= 0;) { 62537 carry = 0; 62538 for (k = xdL + i; k > i;) { 62539 t = r[k] + yd[i] * xd[k - i - 1] + carry; 62540 r[k--] = t % BASE | 0; 62541 carry = t / BASE | 0; 62542 } 62543 62544 r[k] = (r[k] + carry) % BASE | 0; 62545 } 62546 62547 // Remove trailing zeros. 62548 for (; !r[--rL];) r.pop(); 62549 62550 if (carry) ++e; 62551 else r.shift(); 62552 62553 y.d = r; 62554 y.e = getBase10Exponent(r, e); 62555 62556 return external ? finalise(y, Ctor.precision, Ctor.rounding) : y; 62557}; 62558 62559 62560/* 62561 * Return a string representing the value of this Decimal in base 2, round to `sd` significant 62562 * digits using rounding mode `rm`. 62563 * 62564 * If the optional `sd` argument is present then return binary exponential notation. 62565 * 62566 * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. 62567 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62568 * 62569 */ 62570P.toBinary = function (sd, rm) { 62571 return toStringBinary(this, 2, sd, rm); 62572}; 62573 62574 62575/* 62576 * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp` 62577 * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted. 62578 * 62579 * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal. 62580 * 62581 * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. 62582 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62583 * 62584 */ 62585P.toDecimalPlaces = P.toDP = function (dp, rm) { 62586 var x = this, 62587 Ctor = x.constructor; 62588 62589 x = new Ctor(x); 62590 if (dp === void 0) return x; 62591 62592 checkInt32(dp, 0, MAX_DIGITS); 62593 62594 if (rm === void 0) rm = Ctor.rounding; 62595 else checkInt32(rm, 0, 8); 62596 62597 return finalise(x, dp + x.e + 1, rm); 62598}; 62599 62600 62601/* 62602 * Return a string representing the value of this Decimal in exponential notation rounded to 62603 * `dp` fixed decimal places using rounding mode `rounding`. 62604 * 62605 * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. 62606 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62607 * 62608 */ 62609P.toExponential = function (dp, rm) { 62610 var str, 62611 x = this, 62612 Ctor = x.constructor; 62613 62614 if (dp === void 0) { 62615 str = finiteToString(x, true); 62616 } else { 62617 checkInt32(dp, 0, MAX_DIGITS); 62618 62619 if (rm === void 0) rm = Ctor.rounding; 62620 else checkInt32(rm, 0, 8); 62621 62622 x = finalise(new Ctor(x), dp + 1, rm); 62623 str = finiteToString(x, true, dp + 1); 62624 } 62625 62626 return x.isNeg() && !x.isZero() ? '-' + str : str; 62627}; 62628 62629 62630/* 62631 * Return a string representing the value of this Decimal in normal (fixed-point) notation to 62632 * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is 62633 * omitted. 62634 * 62635 * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'. 62636 * 62637 * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive. 62638 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62639 * 62640 * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. 62641 * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. 62642 * (-0).toFixed(3) is '0.000'. 62643 * (-0.5).toFixed(0) is '-0'. 62644 * 62645 */ 62646P.toFixed = function (dp, rm) { 62647 var str, y, 62648 x = this, 62649 Ctor = x.constructor; 62650 62651 if (dp === void 0) { 62652 str = finiteToString(x); 62653 } else { 62654 checkInt32(dp, 0, MAX_DIGITS); 62655 62656 if (rm === void 0) rm = Ctor.rounding; 62657 else checkInt32(rm, 0, 8); 62658 62659 y = finalise(new Ctor(x), dp + x.e + 1, rm); 62660 str = finiteToString(y, false, dp + y.e + 1); 62661 } 62662 62663 // To determine whether to add the minus sign look at the value before it was rounded, 62664 // i.e. look at `x` rather than `y`. 62665 return x.isNeg() && !x.isZero() ? '-' + str : str; 62666}; 62667 62668 62669/* 62670 * Return an array representing the value of this Decimal as a simple fraction with an integer 62671 * numerator and an integer denominator. 62672 * 62673 * The denominator will be a positive non-zero value less than or equal to the specified maximum 62674 * denominator. If a maximum denominator is not specified, the denominator will be the lowest 62675 * value necessary to represent the number exactly. 62676 * 62677 * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity. 62678 * 62679 */ 62680P.toFraction = function (maxD) { 62681 var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r, 62682 x = this, 62683 xd = x.d, 62684 Ctor = x.constructor; 62685 62686 if (!xd) return new Ctor(x); 62687 62688 n1 = d0 = new Ctor(1); 62689 d1 = n0 = new Ctor(0); 62690 62691 d = new Ctor(d1); 62692 e = d.e = getPrecision(xd) - x.e - 1; 62693 k = e % LOG_BASE; 62694 d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k); 62695 62696 if (maxD == null) { 62697 62698 // d is 10**e, the minimum max-denominator needed. 62699 maxD = e > 0 ? d : n1; 62700 } else { 62701 n = new Ctor(maxD); 62702 if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n); 62703 maxD = n.gt(d) ? (e > 0 ? d : n1) : n; 62704 } 62705 62706 external = false; 62707 n = new Ctor(digitsToString(xd)); 62708 pr = Ctor.precision; 62709 Ctor.precision = e = xd.length * LOG_BASE * 2; 62710 62711 for (;;) { 62712 q = divide(n, d, 0, 1, 1); 62713 d2 = d0.plus(q.times(d1)); 62714 if (d2.cmp(maxD) == 1) break; 62715 d0 = d1; 62716 d1 = d2; 62717 d2 = n1; 62718 n1 = n0.plus(q.times(d2)); 62719 n0 = d2; 62720 d2 = d; 62721 d = n.minus(q.times(d2)); 62722 n = d2; 62723 } 62724 62725 d2 = divide(maxD.minus(d0), d1, 0, 1, 1); 62726 n0 = n0.plus(d2.times(n1)); 62727 d0 = d0.plus(d2.times(d1)); 62728 n0.s = n1.s = x.s; 62729 62730 // Determine which fraction is closer to x, n0/d0 or n1/d1? 62731 r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1 62732 ? [n1, d1] : [n0, d0]; 62733 62734 Ctor.precision = pr; 62735 external = true; 62736 62737 return r; 62738}; 62739 62740 62741/* 62742 * Return a string representing the value of this Decimal in base 16, round to `sd` significant 62743 * digits using rounding mode `rm`. 62744 * 62745 * If the optional `sd` argument is present then return binary exponential notation. 62746 * 62747 * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. 62748 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62749 * 62750 */ 62751P.toHexadecimal = P.toHex = function (sd, rm) { 62752 return toStringBinary(this, 16, sd, rm); 62753}; 62754 62755 62756/* 62757 * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding 62758 * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal. 62759 * 62760 * The return value will always have the same sign as this Decimal, unless either this Decimal 62761 * or `y` is NaN, in which case the return value will be also be NaN. 62762 * 62763 * The return value is not affected by the value of `precision`. 62764 * 62765 * y {number|string|Decimal} The magnitude to round to a multiple of. 62766 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62767 * 62768 * 'toNearest() rounding mode not an integer: {rm}' 62769 * 'toNearest() rounding mode out of range: {rm}' 62770 * 62771 */ 62772P.toNearest = function (y, rm) { 62773 var x = this, 62774 Ctor = x.constructor; 62775 62776 x = new Ctor(x); 62777 62778 if (y == null) { 62779 62780 // If x is not finite, return x. 62781 if (!x.d) return x; 62782 62783 y = new Ctor(1); 62784 rm = Ctor.rounding; 62785 } else { 62786 y = new Ctor(y); 62787 if (rm === void 0) { 62788 rm = Ctor.rounding; 62789 } else { 62790 checkInt32(rm, 0, 8); 62791 } 62792 62793 // If x is not finite, return x if y is not NaN, else NaN. 62794 if (!x.d) return y.s ? x : y; 62795 62796 // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN. 62797 if (!y.d) { 62798 if (y.s) y.s = x.s; 62799 return y; 62800 } 62801 } 62802 62803 // If y is not zero, calculate the nearest multiple of y to x. 62804 if (y.d[0]) { 62805 external = false; 62806 x = divide(x, y, 0, rm, 1).times(y); 62807 external = true; 62808 finalise(x); 62809 62810 // If y is zero, return zero with the sign of x. 62811 } else { 62812 y.s = x.s; 62813 x = y; 62814 } 62815 62816 return x; 62817}; 62818 62819 62820/* 62821 * Return the value of this Decimal converted to a number primitive. 62822 * Zero keeps its sign. 62823 * 62824 */ 62825P.toNumber = function () { 62826 return +this; 62827}; 62828 62829 62830/* 62831 * Return a string representing the value of this Decimal in base 8, round to `sd` significant 62832 * digits using rounding mode `rm`. 62833 * 62834 * If the optional `sd` argument is present then return binary exponential notation. 62835 * 62836 * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. 62837 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62838 * 62839 */ 62840P.toOctal = function (sd, rm) { 62841 return toStringBinary(this, 8, sd, rm); 62842}; 62843 62844 62845/* 62846 * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded 62847 * to `precision` significant digits using rounding mode `rounding`. 62848 * 62849 * ECMAScript compliant. 62850 * 62851 * pow(x, NaN) = NaN 62852 * pow(x, ±0) = 1 62853 62854 * pow(NaN, non-zero) = NaN 62855 * pow(abs(x) > 1, +Infinity) = +Infinity 62856 * pow(abs(x) > 1, -Infinity) = +0 62857 * pow(abs(x) == 1, ±Infinity) = NaN 62858 * pow(abs(x) < 1, +Infinity) = +0 62859 * pow(abs(x) < 1, -Infinity) = +Infinity 62860 * pow(+Infinity, y > 0) = +Infinity 62861 * pow(+Infinity, y < 0) = +0 62862 * pow(-Infinity, odd integer > 0) = -Infinity 62863 * pow(-Infinity, even integer > 0) = +Infinity 62864 * pow(-Infinity, odd integer < 0) = -0 62865 * pow(-Infinity, even integer < 0) = +0 62866 * pow(+0, y > 0) = +0 62867 * pow(+0, y < 0) = +Infinity 62868 * pow(-0, odd integer > 0) = -0 62869 * pow(-0, even integer > 0) = +0 62870 * pow(-0, odd integer < 0) = -Infinity 62871 * pow(-0, even integer < 0) = +Infinity 62872 * pow(finite x < 0, finite non-integer) = NaN 62873 * 62874 * For non-integer or very large exponents pow(x, y) is calculated using 62875 * 62876 * x^y = exp(y*ln(x)) 62877 * 62878 * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the 62879 * probability of an incorrectly rounded result 62880 * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14 62881 * i.e. 1 in 250,000,000,000,000 62882 * 62883 * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place). 62884 * 62885 * y {number|string|Decimal} The power to which to raise this Decimal. 62886 * 62887 */ 62888P.toPower = P.pow = function (y) { 62889 var e, k, pr, r, rm, s, 62890 x = this, 62891 Ctor = x.constructor, 62892 yn = +(y = new Ctor(y)); 62893 62894 // Either ±Infinity, NaN or ±0? 62895 if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn)); 62896 62897 x = new Ctor(x); 62898 62899 if (x.eq(1)) return x; 62900 62901 pr = Ctor.precision; 62902 rm = Ctor.rounding; 62903 62904 if (y.eq(1)) return finalise(x, pr, rm); 62905 62906 // y exponent 62907 e = mathfloor(y.e / LOG_BASE); 62908 62909 // If y is a small integer use the 'exponentiation by squaring' algorithm. 62910 if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) { 62911 r = intPow(Ctor, x, k, pr); 62912 return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm); 62913 } 62914 62915 s = x.s; 62916 62917 // if x is negative 62918 if (s < 0) { 62919 62920 // if y is not an integer 62921 if (e < y.d.length - 1) return new Ctor(NaN); 62922 62923 // Result is positive if x is negative and the last digit of integer y is even. 62924 if ((y.d[e] & 1) == 0) s = 1; 62925 62926 // if x.eq(-1) 62927 if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) { 62928 x.s = s; 62929 return x; 62930 } 62931 } 62932 62933 // Estimate result exponent. 62934 // x^y = 10^e, where e = y * log10(x) 62935 // log10(x) = log10(x_significand) + x_exponent 62936 // log10(x_significand) = ln(x_significand) / ln(10) 62937 k = mathpow(+x, yn); 62938 e = k == 0 || !isFinite(k) 62939 ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1)) 62940 : new Ctor(k + '').e; 62941 62942 // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1. 62943 62944 // Overflow/underflow? 62945 if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0); 62946 62947 external = false; 62948 Ctor.rounding = x.s = 1; 62949 62950 // Estimate the extra guard digits needed to ensure five correct rounding digits from 62951 // naturalLogarithm(x). Example of failure without these extra digits (precision: 10): 62952 // new Decimal(2.32456).pow('2087987436534566.46411') 62953 // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815 62954 k = Math.min(12, (e + '').length); 62955 62956 // r = x^y = exp(y*ln(x)) 62957 r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr); 62958 62959 // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40) 62960 if (r.d) { 62961 62962 // Truncate to the required precision plus five rounding digits. 62963 r = finalise(r, pr + 5, 1); 62964 62965 // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate 62966 // the result. 62967 if (checkRoundingDigits(r.d, pr, rm)) { 62968 e = pr + 10; 62969 62970 // Truncate to the increased precision plus five rounding digits. 62971 r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1); 62972 62973 // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9). 62974 if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) { 62975 r = finalise(r, pr + 1, 0); 62976 } 62977 } 62978 } 62979 62980 r.s = s; 62981 external = true; 62982 Ctor.rounding = rm; 62983 62984 return finalise(r, pr, rm); 62985}; 62986 62987 62988/* 62989 * Return a string representing the value of this Decimal rounded to `sd` significant digits 62990 * using rounding mode `rounding`. 62991 * 62992 * Return exponential notation if `sd` is less than the number of digits necessary to represent 62993 * the integer part of the value in normal notation. 62994 * 62995 * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. 62996 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 62997 * 62998 */ 62999P.toPrecision = function (sd, rm) { 63000 var str, 63001 x = this, 63002 Ctor = x.constructor; 63003 63004 if (sd === void 0) { 63005 str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); 63006 } else { 63007 checkInt32(sd, 1, MAX_DIGITS); 63008 63009 if (rm === void 0) rm = Ctor.rounding; 63010 else checkInt32(rm, 0, 8); 63011 63012 x = finalise(new Ctor(x), sd, rm); 63013 str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd); 63014 } 63015 63016 return x.isNeg() && !x.isZero() ? '-' + str : str; 63017}; 63018 63019 63020/* 63021 * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd` 63022 * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if 63023 * omitted. 63024 * 63025 * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive. 63026 * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. 63027 * 63028 * 'toSD() digits out of range: {sd}' 63029 * 'toSD() digits not an integer: {sd}' 63030 * 'toSD() rounding mode not an integer: {rm}' 63031 * 'toSD() rounding mode out of range: {rm}' 63032 * 63033 */ 63034P.toSignificantDigits = P.toSD = function (sd, rm) { 63035 var x = this, 63036 Ctor = x.constructor; 63037 63038 if (sd === void 0) { 63039 sd = Ctor.precision; 63040 rm = Ctor.rounding; 63041 } else { 63042 checkInt32(sd, 1, MAX_DIGITS); 63043 63044 if (rm === void 0) rm = Ctor.rounding; 63045 else checkInt32(rm, 0, 8); 63046 } 63047 63048 return finalise(new Ctor(x), sd, rm); 63049}; 63050 63051 63052/* 63053 * Return a string representing the value of this Decimal. 63054 * 63055 * Return exponential notation if this Decimal has a positive exponent equal to or greater than 63056 * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`. 63057 * 63058 */ 63059P.toString = function () { 63060 var x = this, 63061 Ctor = x.constructor, 63062 str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); 63063 63064 return x.isNeg() && !x.isZero() ? '-' + str : str; 63065}; 63066 63067 63068/* 63069 * Return a new Decimal whose value is the value of this Decimal truncated to a whole number. 63070 * 63071 */ 63072P.truncated = P.trunc = function () { 63073 return finalise(new this.constructor(this), this.e + 1, 1); 63074}; 63075 63076 63077/* 63078 * Return a string representing the value of this Decimal. 63079 * Unlike `toString`, negative zero will include the minus sign. 63080 * 63081 */ 63082P.valueOf = P.toJSON = function () { 63083 var x = this, 63084 Ctor = x.constructor, 63085 str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos); 63086 63087 return x.isNeg() ? '-' + str : str; 63088}; 63089 63090 63091// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers. 63092 63093 63094/* 63095 * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower, 63096 * finiteToString, naturalExponential, naturalLogarithm 63097 * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest, 63098 * P.toPrecision, P.toSignificantDigits, toStringBinary, random 63099 * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm 63100 * convertBase toStringBinary, parseOther 63101 * cos P.cos 63102 * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy, 63103 * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction, 63104 * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm, 63105 * taylorSeries, atan2, parseOther 63106 * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh, 63107 * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus, 63108 * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot, 63109 * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed, 63110 * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits, 63111 * P.truncated, divide, getLn10, getPi, naturalExponential, 63112 * naturalLogarithm, ceil, floor, round, trunc 63113 * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf, 63114 * toStringBinary 63115 * getBase10Exponent P.minus, P.plus, P.times, parseOther 63116 * getLn10 P.logarithm, naturalLogarithm 63117 * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2 63118 * getPrecision P.precision, P.toFraction 63119 * getZeroString digitsToString, finiteToString 63120 * intPow P.toPower, parseOther 63121 * isOdd toLessThanHalfPi 63122 * maxOrMin max, min 63123 * naturalExponential P.naturalExponential, P.toPower 63124 * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm, 63125 * P.toPower, naturalExponential 63126 * nonFiniteToString finiteToString, toStringBinary 63127 * parseDecimal Decimal 63128 * parseOther Decimal 63129 * sin P.sin 63130 * taylorSeries P.cosh, P.sinh, cos, sin 63131 * toLessThanHalfPi P.cos, P.sin 63132 * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal 63133 * truncate intPow 63134 * 63135 * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi, 63136 * naturalLogarithm, config, parseOther, random, Decimal 63137 */ 63138 63139 63140function digitsToString(d) { 63141 var i, k, ws, 63142 indexOfLastWord = d.length - 1, 63143 str = '', 63144 w = d[0]; 63145 63146 if (indexOfLastWord > 0) { 63147 str += w; 63148 for (i = 1; i < indexOfLastWord; i++) { 63149 ws = d[i] + ''; 63150 k = LOG_BASE - ws.length; 63151 if (k) str += getZeroString(k); 63152 str += ws; 63153 } 63154 63155 w = d[i]; 63156 ws = w + ''; 63157 k = LOG_BASE - ws.length; 63158 if (k) str += getZeroString(k); 63159 } else if (w === 0) { 63160 return '0'; 63161 } 63162 63163 // Remove trailing zeros of last w. 63164 for (; w % 10 === 0;) w /= 10; 63165 63166 return str + w; 63167} 63168 63169 63170function checkInt32(i, min, max) { 63171 if (i !== ~~i || i < min || i > max) { 63172 throw Error(invalidArgument + i); 63173 } 63174} 63175 63176 63177/* 63178 * Check 5 rounding digits if `repeating` is null, 4 otherwise. 63179 * `repeating == null` if caller is `log` or `pow`, 63180 * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`. 63181 */ 63182function checkRoundingDigits(d, i, rm, repeating) { 63183 var di, k, r, rd; 63184 63185 // Get the length of the first word of the array d. 63186 for (k = d[0]; k >= 10; k /= 10) --i; 63187 63188 // Is the rounding digit in the first word of d? 63189 if (--i < 0) { 63190 i += LOG_BASE; 63191 di = 0; 63192 } else { 63193 di = Math.ceil((i + 1) / LOG_BASE); 63194 i %= LOG_BASE; 63195 } 63196 63197 // i is the index (0 - 6) of the rounding digit. 63198 // E.g. if within the word 3487563 the first rounding digit is 5, 63199 // then i = 4, k = 1000, rd = 3487563 % 1000 = 563 63200 k = mathpow(10, LOG_BASE - i); 63201 rd = d[di] % k | 0; 63202 63203 if (repeating == null) { 63204 if (i < 3) { 63205 if (i == 0) rd = rd / 100 | 0; 63206 else if (i == 1) rd = rd / 10 | 0; 63207 r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0; 63208 } else { 63209 r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && 63210 (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || 63211 (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0; 63212 } 63213 } else { 63214 if (i < 4) { 63215 if (i == 0) rd = rd / 1000 | 0; 63216 else if (i == 1) rd = rd / 100 | 0; 63217 else if (i == 2) rd = rd / 10 | 0; 63218 r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999; 63219 } else { 63220 r = ((repeating || rm < 4) && rd + 1 == k || 63221 (!repeating && rm > 3) && rd + 1 == k / 2) && 63222 (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1; 63223 } 63224 } 63225 63226 return r; 63227} 63228 63229 63230// Convert string of `baseIn` to an array of numbers of `baseOut`. 63231// Eg. convertBase('255', 10, 16) returns [15, 15]. 63232// Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. 63233function convertBase(str, baseIn, baseOut) { 63234 var j, 63235 arr = [0], 63236 arrL, 63237 i = 0, 63238 strL = str.length; 63239 63240 for (; i < strL;) { 63241 for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn; 63242 arr[0] += NUMERALS.indexOf(str.charAt(i++)); 63243 for (j = 0; j < arr.length; j++) { 63244 if (arr[j] > baseOut - 1) { 63245 if (arr[j + 1] === void 0) arr[j + 1] = 0; 63246 arr[j + 1] += arr[j] / baseOut | 0; 63247 arr[j] %= baseOut; 63248 } 63249 } 63250 } 63251 63252 return arr.reverse(); 63253} 63254 63255 63256/* 63257 * cos(x) = 1 - x^2/2! + x^4/4! - ... 63258 * |x| < pi/2 63259 * 63260 */ 63261function cosine(Ctor, x) { 63262 var k, len, y; 63263 63264 if (x.isZero()) return x; 63265 63266 // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1 63267 // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1 63268 63269 // Estimate the optimum number of times to use the argument reduction. 63270 len = x.d.length; 63271 if (len < 32) { 63272 k = Math.ceil(len / 3); 63273 y = (1 / tinyPow(4, k)).toString(); 63274 } else { 63275 k = 16; 63276 y = '2.3283064365386962890625e-10'; 63277 } 63278 63279 Ctor.precision += k; 63280 63281 x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1)); 63282 63283 // Reverse argument reduction 63284 for (var i = k; i--;) { 63285 var cos2x = x.times(x); 63286 x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1); 63287 } 63288 63289 Ctor.precision -= k; 63290 63291 return x; 63292} 63293 63294 63295/* 63296 * Perform division in the specified base. 63297 */ 63298var divide = (function () { 63299 63300 // Assumes non-zero x and k, and hence non-zero result. 63301 function multiplyInteger(x, k, base) { 63302 var temp, 63303 carry = 0, 63304 i = x.length; 63305 63306 for (x = x.slice(); i--;) { 63307 temp = x[i] * k + carry; 63308 x[i] = temp % base | 0; 63309 carry = temp / base | 0; 63310 } 63311 63312 if (carry) x.unshift(carry); 63313 63314 return x; 63315 } 63316 63317 function compare(a, b, aL, bL) { 63318 var i, r; 63319 63320 if (aL != bL) { 63321 r = aL > bL ? 1 : -1; 63322 } else { 63323 for (i = r = 0; i < aL; i++) { 63324 if (a[i] != b[i]) { 63325 r = a[i] > b[i] ? 1 : -1; 63326 break; 63327 } 63328 } 63329 } 63330 63331 return r; 63332 } 63333 63334 function subtract(a, b, aL, base) { 63335 var i = 0; 63336 63337 // Subtract b from a. 63338 for (; aL--;) { 63339 a[aL] -= i; 63340 i = a[aL] < b[aL] ? 1 : 0; 63341 a[aL] = i * base + a[aL] - b[aL]; 63342 } 63343 63344 // Remove leading zeros. 63345 for (; !a[0] && a.length > 1;) a.shift(); 63346 } 63347 63348 return function (x, y, pr, rm, dp, base) { 63349 var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, 63350 yL, yz, 63351 Ctor = x.constructor, 63352 sign = x.s == y.s ? 1 : -1, 63353 xd = x.d, 63354 yd = y.d; 63355 63356 // Either NaN, Infinity or 0? 63357 if (!xd || !xd[0] || !yd || !yd[0]) { 63358 63359 return new Ctor(// Return NaN if either NaN, or both Infinity or 0. 63360 !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN : 63361 63362 // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0. 63363 xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0); 63364 } 63365 63366 if (base) { 63367 logBase = 1; 63368 e = x.e - y.e; 63369 } else { 63370 base = BASE; 63371 logBase = LOG_BASE; 63372 e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase); 63373 } 63374 63375 yL = yd.length; 63376 xL = xd.length; 63377 q = new Ctor(sign); 63378 qd = q.d = []; 63379 63380 // Result exponent may be one less than e. 63381 // The digit array of a Decimal from toStringBinary may have trailing zeros. 63382 for (i = 0; yd[i] == (xd[i] || 0); i++); 63383 63384 if (yd[i] > (xd[i] || 0)) e--; 63385 63386 if (pr == null) { 63387 sd = pr = Ctor.precision; 63388 rm = Ctor.rounding; 63389 } else if (dp) { 63390 sd = pr + (x.e - y.e) + 1; 63391 } else { 63392 sd = pr; 63393 } 63394 63395 if (sd < 0) { 63396 qd.push(1); 63397 more = true; 63398 } else { 63399 63400 // Convert precision in number of base 10 digits to base 1e7 digits. 63401 sd = sd / logBase + 2 | 0; 63402 i = 0; 63403 63404 // divisor < 1e7 63405 if (yL == 1) { 63406 k = 0; 63407 yd = yd[0]; 63408 sd++; 63409 63410 // k is the carry. 63411 for (; (i < xL || k) && sd--; i++) { 63412 t = k * base + (xd[i] || 0); 63413 qd[i] = t / yd | 0; 63414 k = t % yd | 0; 63415 } 63416 63417 more = k || i < xL; 63418 63419 // divisor >= 1e7 63420 } else { 63421 63422 // Normalise xd and yd so highest order digit of yd is >= base/2 63423 k = base / (yd[0] + 1) | 0; 63424 63425 if (k > 1) { 63426 yd = multiplyInteger(yd, k, base); 63427 xd = multiplyInteger(xd, k, base); 63428 yL = yd.length; 63429 xL = xd.length; 63430 } 63431 63432 xi = yL; 63433 rem = xd.slice(0, yL); 63434 remL = rem.length; 63435 63436 // Add zeros to make remainder as long as divisor. 63437 for (; remL < yL;) rem[remL++] = 0; 63438 63439 yz = yd.slice(); 63440 yz.unshift(0); 63441 yd0 = yd[0]; 63442 63443 if (yd[1] >= base / 2) ++yd0; 63444 63445 do { 63446 k = 0; 63447 63448 // Compare divisor and remainder. 63449 cmp = compare(yd, rem, yL, remL); 63450 63451 // If divisor < remainder. 63452 if (cmp < 0) { 63453 63454 // Calculate trial digit, k. 63455 rem0 = rem[0]; 63456 if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); 63457 63458 // k will be how many times the divisor goes into the current remainder. 63459 k = rem0 / yd0 | 0; 63460 63461 // Algorithm: 63462 // 1. product = divisor * trial digit (k) 63463 // 2. if product > remainder: product -= divisor, k-- 63464 // 3. remainder -= product 63465 // 4. if product was < remainder at 2: 63466 // 5. compare new remainder and divisor 63467 // 6. If remainder > divisor: remainder -= divisor, k++ 63468 63469 if (k > 1) { 63470 if (k >= base) k = base - 1; 63471 63472 // product = divisor * trial digit. 63473 prod = multiplyInteger(yd, k, base); 63474 prodL = prod.length; 63475 remL = rem.length; 63476 63477 // Compare product and remainder. 63478 cmp = compare(prod, rem, prodL, remL); 63479 63480 // product > remainder. 63481 if (cmp == 1) { 63482 k--; 63483 63484 // Subtract divisor from product. 63485 subtract(prod, yL < prodL ? yz : yd, prodL, base); 63486 } 63487 } else { 63488 63489 // cmp is -1. 63490 // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1 63491 // to avoid it. If k is 1 there is a need to compare yd and rem again below. 63492 if (k == 0) cmp = k = 1; 63493 prod = yd.slice(); 63494 } 63495 63496 prodL = prod.length; 63497 if (prodL < remL) prod.unshift(0); 63498 63499 // Subtract product from remainder. 63500 subtract(rem, prod, remL, base); 63501 63502 // If product was < previous remainder. 63503 if (cmp == -1) { 63504 remL = rem.length; 63505 63506 // Compare divisor and new remainder. 63507 cmp = compare(yd, rem, yL, remL); 63508 63509 // If divisor < new remainder, subtract divisor from remainder. 63510 if (cmp < 1) { 63511 k++; 63512 63513 // Subtract divisor from remainder. 63514 subtract(rem, yL < remL ? yz : yd, remL, base); 63515 } 63516 } 63517 63518 remL = rem.length; 63519 } else if (cmp === 0) { 63520 k++; 63521 rem = [0]; 63522 } // if cmp === 1, k will be 0 63523 63524 // Add the next digit, k, to the result array. 63525 qd[i++] = k; 63526 63527 // Update the remainder. 63528 if (cmp && rem[0]) { 63529 rem[remL++] = xd[xi] || 0; 63530 } else { 63531 rem = [xd[xi]]; 63532 remL = 1; 63533 } 63534 63535 } while ((xi++ < xL || rem[0] !== void 0) && sd--); 63536 63537 more = rem[0] !== void 0; 63538 } 63539 63540 // Leading zero? 63541 if (!qd[0]) qd.shift(); 63542 } 63543 63544 // logBase is 1 when divide is being used for base conversion. 63545 if (logBase == 1) { 63546 q.e = e; 63547 inexact = more; 63548 } else { 63549 63550 // To calculate q.e, first get the number of digits of qd[0]. 63551 for (i = 1, k = qd[0]; k >= 10; k /= 10) i++; 63552 q.e = i + e * logBase - 1; 63553 63554 finalise(q, dp ? pr + q.e + 1 : pr, rm, more); 63555 } 63556 63557 return q; 63558 }; 63559})(); 63560 63561 63562/* 63563 * Round `x` to `sd` significant digits using rounding mode `rm`. 63564 * Check for over/under-flow. 63565 */ 63566 function finalise(x, sd, rm, isTruncated) { 63567 var digits, i, j, k, rd, roundUp, w, xd, xdi, 63568 Ctor = x.constructor; 63569 63570 // Don't round if sd is null or undefined. 63571 out: if (sd != null) { 63572 xd = x.d; 63573 63574 // Infinity/NaN. 63575 if (!xd) return x; 63576 63577 // rd: the rounding digit, i.e. the digit after the digit that may be rounded up. 63578 // w: the word of xd containing rd, a base 1e7 number. 63579 // xdi: the index of w within xd. 63580 // digits: the number of digits of w. 63581 // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if 63582 // they had leading zeros) 63583 // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero). 63584 63585 // Get the length of the first word of the digits array xd. 63586 for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++; 63587 i = sd - digits; 63588 63589 // Is the rounding digit in the first word of xd? 63590 if (i < 0) { 63591 i += LOG_BASE; 63592 j = sd; 63593 w = xd[xdi = 0]; 63594 63595 // Get the rounding digit at index j of w. 63596 rd = w / mathpow(10, digits - j - 1) % 10 | 0; 63597 } else { 63598 xdi = Math.ceil((i + 1) / LOG_BASE); 63599 k = xd.length; 63600 if (xdi >= k) { 63601 if (isTruncated) { 63602 63603 // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`. 63604 for (; k++ <= xdi;) xd.push(0); 63605 w = rd = 0; 63606 digits = 1; 63607 i %= LOG_BASE; 63608 j = i - LOG_BASE + 1; 63609 } else { 63610 break out; 63611 } 63612 } else { 63613 w = k = xd[xdi]; 63614 63615 // Get the number of digits of w. 63616 for (digits = 1; k >= 10; k /= 10) digits++; 63617 63618 // Get the index of rd within w. 63619 i %= LOG_BASE; 63620 63621 // Get the index of rd within w, adjusted for leading zeros. 63622 // The number of leading zeros of w is given by LOG_BASE - digits. 63623 j = i - LOG_BASE + digits; 63624 63625 // Get the rounding digit at index j of w. 63626 rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; 63627 } 63628 } 63629 63630 // Are there any non-zero digits after the rounding digit? 63631 isTruncated = isTruncated || sd < 0 || 63632 xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1)); 63633 63634 // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right 63635 // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression 63636 // will give 714. 63637 63638 roundUp = rm < 4 63639 ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) 63640 : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 && 63641 63642 // Check whether the digit to the left of the rounding digit is odd. 63643 ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 || 63644 rm == (x.s < 0 ? 8 : 7)); 63645 63646 if (sd < 1 || !xd[0]) { 63647 xd.length = 0; 63648 if (roundUp) { 63649 63650 // Convert sd to decimal places. 63651 sd -= x.e + 1; 63652 63653 // 1, 0.1, 0.01, 0.001, 0.0001 etc. 63654 xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE); 63655 x.e = -sd || 0; 63656 } else { 63657 63658 // Zero. 63659 xd[0] = x.e = 0; 63660 } 63661 63662 return x; 63663 } 63664 63665 // Remove excess digits. 63666 if (i == 0) { 63667 xd.length = xdi; 63668 k = 1; 63669 xdi--; 63670 } else { 63671 xd.length = xdi + 1; 63672 k = mathpow(10, LOG_BASE - i); 63673 63674 // E.g. 56700 becomes 56000 if 7 is the rounding digit. 63675 // j > 0 means i > number of leading zeros of w. 63676 xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0; 63677 } 63678 63679 if (roundUp) { 63680 for (;;) { 63681 63682 // Is the digit to be rounded up in the first word of xd? 63683 if (xdi == 0) { 63684 63685 // i will be the length of xd[0] before k is added. 63686 for (i = 1, j = xd[0]; j >= 10; j /= 10) i++; 63687 j = xd[0] += k; 63688 for (k = 1; j >= 10; j /= 10) k++; 63689 63690 // if i != k the length has increased. 63691 if (i != k) { 63692 x.e++; 63693 if (xd[0] == BASE) xd[0] = 1; 63694 } 63695 63696 break; 63697 } else { 63698 xd[xdi] += k; 63699 if (xd[xdi] != BASE) break; 63700 xd[xdi--] = 0; 63701 k = 1; 63702 } 63703 } 63704 } 63705 63706 // Remove trailing zeros. 63707 for (i = xd.length; xd[--i] === 0;) xd.pop(); 63708 } 63709 63710 if (external) { 63711 63712 // Overflow? 63713 if (x.e > Ctor.maxE) { 63714 63715 // Infinity. 63716 x.d = null; 63717 x.e = NaN; 63718 63719 // Underflow? 63720 } else if (x.e < Ctor.minE) { 63721 63722 // Zero. 63723 x.e = 0; 63724 x.d = [0]; 63725 // Ctor.underflow = true; 63726 } // else Ctor.underflow = false; 63727 } 63728 63729 return x; 63730} 63731 63732 63733function finiteToString(x, isExp, sd) { 63734 if (!x.isFinite()) return nonFiniteToString(x); 63735 var k, 63736 e = x.e, 63737 str = digitsToString(x.d), 63738 len = str.length; 63739 63740 if (isExp) { 63741 if (sd && (k = sd - len) > 0) { 63742 str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k); 63743 } else if (len > 1) { 63744 str = str.charAt(0) + '.' + str.slice(1); 63745 } 63746 63747 str = str + (x.e < 0 ? 'e' : 'e+') + x.e; 63748 } else if (e < 0) { 63749 str = '0.' + getZeroString(-e - 1) + str; 63750 if (sd && (k = sd - len) > 0) str += getZeroString(k); 63751 } else if (e >= len) { 63752 str += getZeroString(e + 1 - len); 63753 if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k); 63754 } else { 63755 if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k); 63756 if (sd && (k = sd - len) > 0) { 63757 if (e + 1 === len) str += '.'; 63758 str += getZeroString(k); 63759 } 63760 } 63761 63762 return str; 63763} 63764 63765 63766// Calculate the base 10 exponent from the base 1e7 exponent. 63767function getBase10Exponent(digits, e) { 63768 var w = digits[0]; 63769 63770 // Add the number of digits of the first word of the digits array. 63771 for ( e *= LOG_BASE; w >= 10; w /= 10) e++; 63772 return e; 63773} 63774 63775 63776function getLn10(Ctor, sd, pr) { 63777 if (sd > LN10_PRECISION) { 63778 63779 // Reset global state in case the exception is caught. 63780 external = true; 63781 if (pr) Ctor.precision = pr; 63782 throw Error(precisionLimitExceeded); 63783 } 63784 return finalise(new Ctor(LN10), sd, 1, true); 63785} 63786 63787 63788function getPi(Ctor, sd, rm) { 63789 if (sd > PI_PRECISION) throw Error(precisionLimitExceeded); 63790 return finalise(new Ctor(PI), sd, rm, true); 63791} 63792 63793 63794function getPrecision(digits) { 63795 var w = digits.length - 1, 63796 len = w * LOG_BASE + 1; 63797 63798 w = digits[w]; 63799 63800 // If non-zero... 63801 if (w) { 63802 63803 // Subtract the number of trailing zeros of the last word. 63804 for (; w % 10 == 0; w /= 10) len--; 63805 63806 // Add the number of digits of the first word. 63807 for (w = digits[0]; w >= 10; w /= 10) len++; 63808 } 63809 63810 return len; 63811} 63812 63813 63814function getZeroString(k) { 63815 var zs = ''; 63816 for (; k--;) zs += '0'; 63817 return zs; 63818} 63819 63820 63821/* 63822 * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an 63823 * integer of type number. 63824 * 63825 * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`. 63826 * 63827 */ 63828function intPow(Ctor, x, n, pr) { 63829 var isTruncated, 63830 r = new Ctor(1), 63831 63832 // Max n of 9007199254740991 takes 53 loop iterations. 63833 // Maximum digits array length; leaves [28, 34] guard digits. 63834 k = Math.ceil(pr / LOG_BASE + 4); 63835 63836 external = false; 63837 63838 for (;;) { 63839 if (n % 2) { 63840 r = r.times(x); 63841 if (truncate(r.d, k)) isTruncated = true; 63842 } 63843 63844 n = mathfloor(n / 2); 63845 if (n === 0) { 63846 63847 // To ensure correct rounding when r.d is truncated, increment the last word if it is zero. 63848 n = r.d.length - 1; 63849 if (isTruncated && r.d[n] === 0) ++r.d[n]; 63850 break; 63851 } 63852 63853 x = x.times(x); 63854 truncate(x.d, k); 63855 } 63856 63857 external = true; 63858 63859 return r; 63860} 63861 63862 63863function isOdd(n) { 63864 return n.d[n.d.length - 1] & 1; 63865} 63866 63867 63868/* 63869 * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'. 63870 */ 63871function maxOrMin(Ctor, args, ltgt) { 63872 var y, 63873 x = new Ctor(args[0]), 63874 i = 0; 63875 63876 for (; ++i < args.length;) { 63877 y = new Ctor(args[i]); 63878 if (!y.s) { 63879 x = y; 63880 break; 63881 } else if (x[ltgt](y)) { 63882 x = y; 63883 } 63884 } 63885 63886 return x; 63887} 63888 63889 63890/* 63891 * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant 63892 * digits. 63893 * 63894 * Taylor/Maclaurin series. 63895 * 63896 * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ... 63897 * 63898 * Argument reduction: 63899 * Repeat x = x / 32, k += 5, until |x| < 0.1 63900 * exp(x) = exp(x / 2^k)^(2^k) 63901 * 63902 * Previously, the argument was initially reduced by 63903 * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10) 63904 * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was 63905 * found to be slower than just dividing repeatedly by 32 as above. 63906 * 63907 * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000 63908 * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000 63909 * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324) 63910 * 63911 * exp(Infinity) = Infinity 63912 * exp(-Infinity) = 0 63913 * exp(NaN) = NaN 63914 * exp(±0) = 1 63915 * 63916 * exp(x) is non-terminating for any finite, non-zero x. 63917 * 63918 * The result will always be correctly rounded. 63919 * 63920 */ 63921function naturalExponential(x, sd) { 63922 var denominator, guard, j, pow, sum, t, wpr, 63923 rep = 0, 63924 i = 0, 63925 k = 0, 63926 Ctor = x.constructor, 63927 rm = Ctor.rounding, 63928 pr = Ctor.precision; 63929 63930 // 0/NaN/Infinity? 63931 if (!x.d || !x.d[0] || x.e > 17) { 63932 63933 return new Ctor(x.d 63934 ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 63935 : x.s ? x.s < 0 ? 0 : x : 0 / 0); 63936 } 63937 63938 if (sd == null) { 63939 external = false; 63940 wpr = pr; 63941 } else { 63942 wpr = sd; 63943 } 63944 63945 t = new Ctor(0.03125); 63946 63947 // while abs(x) >= 0.1 63948 while (x.e > -2) { 63949 63950 // x = x / 2^5 63951 x = x.times(t); 63952 k += 5; 63953 } 63954 63955 // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision 63956 // necessary to ensure the first 4 rounding digits are correct. 63957 guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0; 63958 wpr += guard; 63959 denominator = pow = sum = new Ctor(1); 63960 Ctor.precision = wpr; 63961 63962 for (;;) { 63963 pow = finalise(pow.times(x), wpr, 1); 63964 denominator = denominator.times(++i); 63965 t = sum.plus(divide(pow, denominator, wpr, 1)); 63966 63967 if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { 63968 j = k; 63969 while (j--) sum = finalise(sum.times(sum), wpr, 1); 63970 63971 // Check to see if the first 4 rounding digits are [49]999. 63972 // If so, repeat the summation with a higher precision, otherwise 63973 // e.g. with precision: 18, rounding: 1 63974 // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123) 63975 // `wpr - guard` is the index of first rounding digit. 63976 if (sd == null) { 63977 63978 if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { 63979 Ctor.precision = wpr += 10; 63980 denominator = pow = t = new Ctor(1); 63981 i = 0; 63982 rep++; 63983 } else { 63984 return finalise(sum, Ctor.precision = pr, rm, external = true); 63985 } 63986 } else { 63987 Ctor.precision = pr; 63988 return sum; 63989 } 63990 } 63991 63992 sum = t; 63993 } 63994} 63995 63996 63997/* 63998 * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant 63999 * digits. 64000 * 64001 * ln(-n) = NaN 64002 * ln(0) = -Infinity 64003 * ln(-0) = -Infinity 64004 * ln(1) = 0 64005 * ln(Infinity) = Infinity 64006 * ln(-Infinity) = NaN 64007 * ln(NaN) = NaN 64008 * 64009 * ln(n) (n != 1) is non-terminating. 64010 * 64011 */ 64012function naturalLogarithm(y, sd) { 64013 var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, 64014 n = 1, 64015 guard = 10, 64016 x = y, 64017 xd = x.d, 64018 Ctor = x.constructor, 64019 rm = Ctor.rounding, 64020 pr = Ctor.precision; 64021 64022 // Is x negative or Infinity, NaN, 0 or 1? 64023 if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) { 64024 return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x); 64025 } 64026 64027 if (sd == null) { 64028 external = false; 64029 wpr = pr; 64030 } else { 64031 wpr = sd; 64032 } 64033 64034 Ctor.precision = wpr += guard; 64035 c = digitsToString(xd); 64036 c0 = c.charAt(0); 64037 64038 if (Math.abs(e = x.e) < 1.5e15) { 64039 64040 // Argument reduction. 64041 // The series converges faster the closer the argument is to 1, so using 64042 // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b 64043 // multiply the argument by itself until the leading digits of the significand are 7, 8, 9, 64044 // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can 64045 // later be divided by this number, then separate out the power of 10 using 64046 // ln(a*10^b) = ln(a) + b*ln(10). 64047 64048 // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14). 64049 //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) { 64050 // max n is 6 (gives 0.7 - 1.3) 64051 while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) { 64052 x = x.times(y); 64053 c = digitsToString(x.d); 64054 c0 = c.charAt(0); 64055 n++; 64056 } 64057 64058 e = x.e; 64059 64060 if (c0 > 1) { 64061 x = new Ctor('0.' + c); 64062 e++; 64063 } else { 64064 x = new Ctor(c0 + '.' + c.slice(1)); 64065 } 64066 } else { 64067 64068 // The argument reduction method above may result in overflow if the argument y is a massive 64069 // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this 64070 // function using ln(x*10^e) = ln(x) + e*ln(10). 64071 t = getLn10(Ctor, wpr + 2, pr).times(e + ''); 64072 x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t); 64073 Ctor.precision = pr; 64074 64075 return sd == null ? finalise(x, pr, rm, external = true) : x; 64076 } 64077 64078 // x1 is x reduced to a value near 1. 64079 x1 = x; 64080 64081 // Taylor series. 64082 // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...) 64083 // where x = (y - 1)/(y + 1) (|x| < 1) 64084 sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1); 64085 x2 = finalise(x.times(x), wpr, 1); 64086 denominator = 3; 64087 64088 for (;;) { 64089 numerator = finalise(numerator.times(x2), wpr, 1); 64090 t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1)); 64091 64092 if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) { 64093 sum = sum.times(2); 64094 64095 // Reverse the argument reduction. Check that e is not 0 because, besides preventing an 64096 // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0. 64097 if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + '')); 64098 sum = divide(sum, new Ctor(n), wpr, 1); 64099 64100 // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has 64101 // been repeated previously) and the first 4 rounding digits 9999? 64102 // If so, restart the summation with a higher precision, otherwise 64103 // e.g. with precision: 12, rounding: 1 64104 // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463. 64105 // `wpr - guard` is the index of first rounding digit. 64106 if (sd == null) { 64107 if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) { 64108 Ctor.precision = wpr += guard; 64109 t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1); 64110 x2 = finalise(x.times(x), wpr, 1); 64111 denominator = rep = 1; 64112 } else { 64113 return finalise(sum, Ctor.precision = pr, rm, external = true); 64114 } 64115 } else { 64116 Ctor.precision = pr; 64117 return sum; 64118 } 64119 } 64120 64121 sum = t; 64122 denominator += 2; 64123 } 64124} 64125 64126 64127// ±Infinity, NaN. 64128function nonFiniteToString(x) { 64129 // Unsigned. 64130 return String(x.s * x.s / 0); 64131} 64132 64133 64134/* 64135 * Parse the value of a new Decimal `x` from string `str`. 64136 */ 64137function parseDecimal(x, str) { 64138 var e, i, len; 64139 64140 // Decimal point? 64141 if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); 64142 64143 // Exponential form? 64144 if ((i = str.search(/e/i)) > 0) { 64145 64146 // Determine exponent. 64147 if (e < 0) e = i; 64148 e += +str.slice(i + 1); 64149 str = str.substring(0, i); 64150 } else if (e < 0) { 64151 64152 // Integer. 64153 e = str.length; 64154 } 64155 64156 // Determine leading zeros. 64157 for (i = 0; str.charCodeAt(i) === 48; i++); 64158 64159 // Determine trailing zeros. 64160 for (len = str.length; str.charCodeAt(len - 1) === 48; --len); 64161 str = str.slice(i, len); 64162 64163 if (str) { 64164 len -= i; 64165 x.e = e = e - i - 1; 64166 x.d = []; 64167 64168 // Transform base 64169 64170 // e is the base 10 exponent. 64171 // i is where to slice str to get the first word of the digits array. 64172 i = (e + 1) % LOG_BASE; 64173 if (e < 0) i += LOG_BASE; 64174 64175 if (i < len) { 64176 if (i) x.d.push(+str.slice(0, i)); 64177 for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE)); 64178 str = str.slice(i); 64179 i = LOG_BASE - str.length; 64180 } else { 64181 i -= len; 64182 } 64183 64184 for (; i--;) str += '0'; 64185 x.d.push(+str); 64186 64187 if (external) { 64188 64189 // Overflow? 64190 if (x.e > x.constructor.maxE) { 64191 64192 // Infinity. 64193 x.d = null; 64194 x.e = NaN; 64195 64196 // Underflow? 64197 } else if (x.e < x.constructor.minE) { 64198 64199 // Zero. 64200 x.e = 0; 64201 x.d = [0]; 64202 // x.constructor.underflow = true; 64203 } // else x.constructor.underflow = false; 64204 } 64205 } else { 64206 64207 // Zero. 64208 x.e = 0; 64209 x.d = [0]; 64210 } 64211 64212 return x; 64213} 64214 64215 64216/* 64217 * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value. 64218 */ 64219function parseOther(x, str) { 64220 var base, Ctor, divisor, i, isFloat, len, p, xd, xe; 64221 64222 if (str.indexOf('_') > -1) { 64223 str = str.replace(/(\d)_(?=\d)/g, '$1'); 64224 if (isDecimal.test(str)) return parseDecimal(x, str); 64225 } else if (str === 'Infinity' || str === 'NaN') { 64226 if (!+str) x.s = NaN; 64227 x.e = NaN; 64228 x.d = null; 64229 return x; 64230 } 64231 64232 if (isHex.test(str)) { 64233 base = 16; 64234 str = str.toLowerCase(); 64235 } else if (isBinary.test(str)) { 64236 base = 2; 64237 } else if (isOctal.test(str)) { 64238 base = 8; 64239 } else { 64240 throw Error(invalidArgument + str); 64241 } 64242 64243 // Is there a binary exponent part? 64244 i = str.search(/p/i); 64245 64246 if (i > 0) { 64247 p = +str.slice(i + 1); 64248 str = str.substring(2, i); 64249 } else { 64250 str = str.slice(2); 64251 } 64252 64253 // Convert `str` as an integer then divide the result by `base` raised to a power such that the 64254 // fraction part will be restored. 64255 i = str.indexOf('.'); 64256 isFloat = i >= 0; 64257 Ctor = x.constructor; 64258 64259 if (isFloat) { 64260 str = str.replace('.', ''); 64261 len = str.length; 64262 i = len - i; 64263 64264 // log[10](16) = 1.2041... , log[10](88) = 1.9444.... 64265 divisor = intPow(Ctor, new Ctor(base), i, i * 2); 64266 } 64267 64268 xd = convertBase(str, base, BASE); 64269 xe = xd.length - 1; 64270 64271 // Remove trailing zeros. 64272 for (i = xe; xd[i] === 0; --i) xd.pop(); 64273 if (i < 0) return new Ctor(x.s * 0); 64274 x.e = getBase10Exponent(xd, xe); 64275 x.d = xd; 64276 external = false; 64277 64278 // At what precision to perform the division to ensure exact conversion? 64279 // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount) 64280 // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412 64281 // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits. 64282 // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount 64283 // Therefore using 4 * the number of digits of str will always be enough. 64284 if (isFloat) x = divide(x, divisor, len * 4); 64285 64286 // Multiply by the binary exponent part if present. 64287 if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p)); 64288 external = true; 64289 64290 return x; 64291} 64292 64293 64294/* 64295 * sin(x) = x - x^3/3! + x^5/5! - ... 64296 * |x| < pi/2 64297 * 64298 */ 64299function sine(Ctor, x) { 64300 var k, 64301 len = x.d.length; 64302 64303 if (len < 3) { 64304 return x.isZero() ? x : taylorSeries(Ctor, 2, x, x); 64305 } 64306 64307 // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x) 64308 // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5) 64309 // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20)) 64310 64311 // Estimate the optimum number of times to use the argument reduction. 64312 k = 1.4 * Math.sqrt(len); 64313 k = k > 16 ? 16 : k | 0; 64314 64315 x = x.times(1 / tinyPow(5, k)); 64316 x = taylorSeries(Ctor, 2, x, x); 64317 64318 // Reverse argument reduction 64319 var sin2_x, 64320 d5 = new Ctor(5), 64321 d16 = new Ctor(16), 64322 d20 = new Ctor(20); 64323 for (; k--;) { 64324 sin2_x = x.times(x); 64325 x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20)))); 64326 } 64327 64328 return x; 64329} 64330 64331 64332// Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`. 64333function taylorSeries(Ctor, n, x, y, isHyperbolic) { 64334 var j, t, u, x2, 64335 i = 1, 64336 pr = Ctor.precision, 64337 k = Math.ceil(pr / LOG_BASE); 64338 64339 external = false; 64340 x2 = x.times(x); 64341 u = new Ctor(y); 64342 64343 for (;;) { 64344 t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1); 64345 u = isHyperbolic ? y.plus(t) : y.minus(t); 64346 y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1); 64347 t = u.plus(y); 64348 64349 if (t.d[k] !== void 0) { 64350 for (j = k; t.d[j] === u.d[j] && j--;); 64351 if (j == -1) break; 64352 } 64353 64354 j = u; 64355 u = y; 64356 y = t; 64357 t = j; 64358 i++; 64359 } 64360 64361 external = true; 64362 t.d.length = k + 1; 64363 64364 return t; 64365} 64366 64367 64368// Exponent e must be positive and non-zero. 64369function tinyPow(b, e) { 64370 var n = b; 64371 while (--e) n *= b; 64372 return n; 64373} 64374 64375 64376// Return the absolute value of `x` reduced to less than or equal to half pi. 64377function toLessThanHalfPi(Ctor, x) { 64378 var t, 64379 isNeg = x.s < 0, 64380 pi = getPi(Ctor, Ctor.precision, 1), 64381 halfPi = pi.times(0.5); 64382 64383 x = x.abs(); 64384 64385 if (x.lte(halfPi)) { 64386 quadrant = isNeg ? 4 : 1; 64387 return x; 64388 } 64389 64390 t = x.divToInt(pi); 64391 64392 if (t.isZero()) { 64393 quadrant = isNeg ? 3 : 2; 64394 } else { 64395 x = x.minus(t.times(pi)); 64396 64397 // 0 <= x < pi 64398 if (x.lte(halfPi)) { 64399 quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1); 64400 return x; 64401 } 64402 64403 quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2); 64404 } 64405 64406 return x.minus(pi).abs(); 64407} 64408 64409 64410/* 64411 * Return the value of Decimal `x` as a string in base `baseOut`. 64412 * 64413 * If the optional `sd` argument is present include a binary exponent suffix. 64414 */ 64415function toStringBinary(x, baseOut, sd, rm) { 64416 var base, e, i, k, len, roundUp, str, xd, y, 64417 Ctor = x.constructor, 64418 isExp = sd !== void 0; 64419 64420 if (isExp) { 64421 checkInt32(sd, 1, MAX_DIGITS); 64422 if (rm === void 0) rm = Ctor.rounding; 64423 else checkInt32(rm, 0, 8); 64424 } else { 64425 sd = Ctor.precision; 64426 rm = Ctor.rounding; 64427 } 64428 64429 if (!x.isFinite()) { 64430 str = nonFiniteToString(x); 64431 } else { 64432 str = finiteToString(x); 64433 i = str.indexOf('.'); 64434 64435 // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required: 64436 // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10)) 64437 // minBinaryExponent = floor(decimalExponent * log[2](10)) 64438 // log[2](10) = 3.321928094887362347870319429489390175864 64439 64440 if (isExp) { 64441 base = 2; 64442 if (baseOut == 16) { 64443 sd = sd * 4 - 3; 64444 } else if (baseOut == 8) { 64445 sd = sd * 3 - 2; 64446 } 64447 } else { 64448 base = baseOut; 64449 } 64450 64451 // Convert the number as an integer then divide the result by its base raised to a power such 64452 // that the fraction part will be restored. 64453 64454 // Non-integer. 64455 if (i >= 0) { 64456 str = str.replace('.', ''); 64457 y = new Ctor(1); 64458 y.e = str.length - i; 64459 y.d = convertBase(finiteToString(y), 10, base); 64460 y.e = y.d.length; 64461 } 64462 64463 xd = convertBase(str, 10, base); 64464 e = len = xd.length; 64465 64466 // Remove trailing zeros. 64467 for (; xd[--len] == 0;) xd.pop(); 64468 64469 if (!xd[0]) { 64470 str = isExp ? '0p+0' : '0'; 64471 } else { 64472 if (i < 0) { 64473 e--; 64474 } else { 64475 x = new Ctor(x); 64476 x.d = xd; 64477 x.e = e; 64478 x = divide(x, y, sd, rm, 0, base); 64479 xd = x.d; 64480 e = x.e; 64481 roundUp = inexact; 64482 } 64483 64484 // The rounding digit, i.e. the digit after the digit that may be rounded up. 64485 i = xd[sd]; 64486 k = base / 2; 64487 roundUp = roundUp || xd[sd + 1] !== void 0; 64488 64489 roundUp = rm < 4 64490 ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2)) 64491 : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 || 64492 rm === (x.s < 0 ? 8 : 7)); 64493 64494 xd.length = sd; 64495 64496 if (roundUp) { 64497 64498 // Rounding up may mean the previous digit has to be rounded up and so on. 64499 for (; ++xd[--sd] > base - 1;) { 64500 xd[sd] = 0; 64501 if (!sd) { 64502 ++e; 64503 xd.unshift(1); 64504 } 64505 } 64506 } 64507 64508 // Determine trailing zeros. 64509 for (len = xd.length; !xd[len - 1]; --len); 64510 64511 // E.g. [4, 11, 15] becomes 4bf. 64512 for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]); 64513 64514 // Add binary exponent suffix? 64515 if (isExp) { 64516 if (len > 1) { 64517 if (baseOut == 16 || baseOut == 8) { 64518 i = baseOut == 16 ? 4 : 3; 64519 for (--len; len % i; len++) str += '0'; 64520 xd = convertBase(str, base, baseOut); 64521 for (len = xd.length; !xd[len - 1]; --len); 64522 64523 // xd[0] will always be be 1 64524 for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]); 64525 } else { 64526 str = str.charAt(0) + '.' + str.slice(1); 64527 } 64528 } 64529 64530 str = str + (e < 0 ? 'p' : 'p+') + e; 64531 } else if (e < 0) { 64532 for (; ++e;) str = '0' + str; 64533 str = '0.' + str; 64534 } else { 64535 if (++e > len) for (e -= len; e-- ;) str += '0'; 64536 else if (e < len) str = str.slice(0, e) + '.' + str.slice(e); 64537 } 64538 } 64539 64540 str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str; 64541 } 64542 64543 return x.s < 0 ? '-' + str : str; 64544} 64545 64546 64547// Does not strip trailing zeros. 64548function truncate(arr, len) { 64549 if (arr.length > len) { 64550 arr.length = len; 64551 return true; 64552 } 64553} 64554 64555 64556// Decimal methods 64557 64558 64559/* 64560 * abs 64561 * acos 64562 * acosh 64563 * add 64564 * asin 64565 * asinh 64566 * atan 64567 * atanh 64568 * atan2 64569 * cbrt 64570 * ceil 64571 * clamp 64572 * clone 64573 * config 64574 * cos 64575 * cosh 64576 * div 64577 * exp 64578 * floor 64579 * hypot 64580 * ln 64581 * log 64582 * log2 64583 * log10 64584 * max 64585 * min 64586 * mod 64587 * mul 64588 * pow 64589 * random 64590 * round 64591 * set 64592 * sign 64593 * sin 64594 * sinh 64595 * sqrt 64596 * sub 64597 * sum 64598 * tan 64599 * tanh 64600 * trunc 64601 */ 64602 64603 64604/* 64605 * Return a new Decimal whose value is the absolute value of `x`. 64606 * 64607 * x {number|string|Decimal} 64608 * 64609 */ 64610function abs(x) { 64611 return new this(x).abs(); 64612} 64613 64614 64615/* 64616 * Return a new Decimal whose value is the arccosine in radians of `x`. 64617 * 64618 * x {number|string|Decimal} 64619 * 64620 */ 64621function acos(x) { 64622 return new this(x).acos(); 64623} 64624 64625 64626/* 64627 * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to 64628 * `precision` significant digits using rounding mode `rounding`. 64629 * 64630 * x {number|string|Decimal} A value in radians. 64631 * 64632 */ 64633function acosh(x) { 64634 return new this(x).acosh(); 64635} 64636 64637 64638/* 64639 * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant 64640 * digits using rounding mode `rounding`. 64641 * 64642 * x {number|string|Decimal} 64643 * y {number|string|Decimal} 64644 * 64645 */ 64646function add(x, y) { 64647 return new this(x).plus(y); 64648} 64649 64650 64651/* 64652 * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision` 64653 * significant digits using rounding mode `rounding`. 64654 * 64655 * x {number|string|Decimal} 64656 * 64657 */ 64658function asin(x) { 64659 return new this(x).asin(); 64660} 64661 64662 64663/* 64664 * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to 64665 * `precision` significant digits using rounding mode `rounding`. 64666 * 64667 * x {number|string|Decimal} A value in radians. 64668 * 64669 */ 64670function asinh(x) { 64671 return new this(x).asinh(); 64672} 64673 64674 64675/* 64676 * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision` 64677 * significant digits using rounding mode `rounding`. 64678 * 64679 * x {number|string|Decimal} 64680 * 64681 */ 64682function atan(x) { 64683 return new this(x).atan(); 64684} 64685 64686 64687/* 64688 * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to 64689 * `precision` significant digits using rounding mode `rounding`. 64690 * 64691 * x {number|string|Decimal} A value in radians. 64692 * 64693 */ 64694function atanh(x) { 64695 return new this(x).atanh(); 64696} 64697 64698 64699/* 64700 * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi 64701 * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`. 64702 * 64703 * Domain: [-Infinity, Infinity] 64704 * Range: [-pi, pi] 64705 * 64706 * y {number|string|Decimal} The y-coordinate. 64707 * x {number|string|Decimal} The x-coordinate. 64708 * 64709 * atan2(±0, -0) = ±pi 64710 * atan2(±0, +0) = ±0 64711 * atan2(±0, -x) = ±pi for x > 0 64712 * atan2(±0, x) = ±0 for x > 0 64713 * atan2(-y, ±0) = -pi/2 for y > 0 64714 * atan2(y, ±0) = pi/2 for y > 0 64715 * atan2(±y, -Infinity) = ±pi for finite y > 0 64716 * atan2(±y, +Infinity) = ±0 for finite y > 0 64717 * atan2(±Infinity, x) = ±pi/2 for finite x 64718 * atan2(±Infinity, -Infinity) = ±3*pi/4 64719 * atan2(±Infinity, +Infinity) = ±pi/4 64720 * atan2(NaN, x) = NaN 64721 * atan2(y, NaN) = NaN 64722 * 64723 */ 64724function atan2(y, x) { 64725 y = new this(y); 64726 x = new this(x); 64727 var r, 64728 pr = this.precision, 64729 rm = this.rounding, 64730 wpr = pr + 4; 64731 64732 // Either NaN 64733 if (!y.s || !x.s) { 64734 r = new this(NaN); 64735 64736 // Both ±Infinity 64737 } else if (!y.d && !x.d) { 64738 r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75); 64739 r.s = y.s; 64740 64741 // x is ±Infinity or y is ±0 64742 } else if (!x.d || y.isZero()) { 64743 r = x.s < 0 ? getPi(this, pr, rm) : new this(0); 64744 r.s = y.s; 64745 64746 // y is ±Infinity or x is ±0 64747 } else if (!y.d || x.isZero()) { 64748 r = getPi(this, wpr, 1).times(0.5); 64749 r.s = y.s; 64750 64751 // Both non-zero and finite 64752 } else if (x.s < 0) { 64753 this.precision = wpr; 64754 this.rounding = 1; 64755 r = this.atan(divide(y, x, wpr, 1)); 64756 x = getPi(this, wpr, 1); 64757 this.precision = pr; 64758 this.rounding = rm; 64759 r = y.s < 0 ? r.minus(x) : r.plus(x); 64760 } else { 64761 r = this.atan(divide(y, x, wpr, 1)); 64762 } 64763 64764 return r; 64765} 64766 64767 64768/* 64769 * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant 64770 * digits using rounding mode `rounding`. 64771 * 64772 * x {number|string|Decimal} 64773 * 64774 */ 64775function cbrt(x) { 64776 return new this(x).cbrt(); 64777} 64778 64779 64780/* 64781 * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`. 64782 * 64783 * x {number|string|Decimal} 64784 * 64785 */ 64786function ceil(x) { 64787 return finalise(x = new this(x), x.e + 1, 2); 64788} 64789 64790 64791/* 64792 * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`. 64793 * 64794 * x {number|string|Decimal} 64795 * min {number|string|Decimal} 64796 * max {number|string|Decimal} 64797 * 64798 */ 64799function clamp(x, min, max) { 64800 return new this(x).clamp(min, max); 64801} 64802 64803 64804/* 64805 * Configure global settings for a Decimal constructor. 64806 * 64807 * `obj` is an object with one or more of the following properties, 64808 * 64809 * precision {number} 64810 * rounding {number} 64811 * toExpNeg {number} 64812 * toExpPos {number} 64813 * maxE {number} 64814 * minE {number} 64815 * modulo {number} 64816 * crypto {boolean|number} 64817 * defaults {true} 64818 * 64819 * E.g. Decimal.config({ precision: 20, rounding: 4 }) 64820 * 64821 */ 64822function config(obj) { 64823 if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected'); 64824 var i, p, v, 64825 useDefaults = obj.defaults === true, 64826 ps = [ 64827 'precision', 1, MAX_DIGITS, 64828 'rounding', 0, 8, 64829 'toExpNeg', -EXP_LIMIT, 0, 64830 'toExpPos', 0, EXP_LIMIT, 64831 'maxE', 0, EXP_LIMIT, 64832 'minE', -EXP_LIMIT, 0, 64833 'modulo', 0, 9 64834 ]; 64835 64836 for (i = 0; i < ps.length; i += 3) { 64837 if (p = ps[i], useDefaults) this[p] = DEFAULTS[p]; 64838 if ((v = obj[p]) !== void 0) { 64839 if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v; 64840 else throw Error(invalidArgument + p + ': ' + v); 64841 } 64842 } 64843 64844 if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p]; 64845 if ((v = obj[p]) !== void 0) { 64846 if (v === true || v === false || v === 0 || v === 1) { 64847 if (v) { 64848 if (typeof crypto != 'undefined' && crypto && 64849 (crypto.getRandomValues || crypto.randomBytes)) { 64850 this[p] = true; 64851 } else { 64852 throw Error(cryptoUnavailable); 64853 } 64854 } else { 64855 this[p] = false; 64856 } 64857 } else { 64858 throw Error(invalidArgument + p + ': ' + v); 64859 } 64860 } 64861 64862 return this; 64863} 64864 64865 64866/* 64867 * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant 64868 * digits using rounding mode `rounding`. 64869 * 64870 * x {number|string|Decimal} A value in radians. 64871 * 64872 */ 64873function cos(x) { 64874 return new this(x).cos(); 64875} 64876 64877 64878/* 64879 * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision 64880 * significant digits using rounding mode `rounding`. 64881 * 64882 * x {number|string|Decimal} A value in radians. 64883 * 64884 */ 64885function cosh(x) { 64886 return new this(x).cosh(); 64887} 64888 64889 64890/* 64891 * Create and return a Decimal constructor with the same configuration properties as this Decimal 64892 * constructor. 64893 * 64894 */ 64895function clone(obj) { 64896 var i, p, ps; 64897 64898 /* 64899 * The Decimal constructor and exported function. 64900 * Return a new Decimal instance. 64901 * 64902 * v {number|string|Decimal} A numeric value. 64903 * 64904 */ 64905 function Decimal(v) { 64906 var e, i, t, 64907 x = this; 64908 64909 // Decimal called without new. 64910 if (!(x instanceof Decimal)) return new Decimal(v); 64911 64912 // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor 64913 // which points to Object. 64914 x.constructor = Decimal; 64915 64916 // Duplicate. 64917 if (isDecimalInstance(v)) { 64918 x.s = v.s; 64919 64920 if (external) { 64921 if (!v.d || v.e > Decimal.maxE) { 64922 64923 // Infinity. 64924 x.e = NaN; 64925 x.d = null; 64926 } else if (v.e < Decimal.minE) { 64927 64928 // Zero. 64929 x.e = 0; 64930 x.d = [0]; 64931 } else { 64932 x.e = v.e; 64933 x.d = v.d.slice(); 64934 } 64935 } else { 64936 x.e = v.e; 64937 x.d = v.d ? v.d.slice() : v.d; 64938 } 64939 64940 return; 64941 } 64942 64943 t = typeof v; 64944 64945 if (t === 'number') { 64946 if (v === 0) { 64947 x.s = 1 / v < 0 ? -1 : 1; 64948 x.e = 0; 64949 x.d = [0]; 64950 return; 64951 } 64952 64953 if (v < 0) { 64954 v = -v; 64955 x.s = -1; 64956 } else { 64957 x.s = 1; 64958 } 64959 64960 // Fast path for small integers. 64961 if (v === ~~v && v < 1e7) { 64962 for (e = 0, i = v; i >= 10; i /= 10) e++; 64963 64964 if (external) { 64965 if (e > Decimal.maxE) { 64966 x.e = NaN; 64967 x.d = null; 64968 } else if (e < Decimal.minE) { 64969 x.e = 0; 64970 x.d = [0]; 64971 } else { 64972 x.e = e; 64973 x.d = [v]; 64974 } 64975 } else { 64976 x.e = e; 64977 x.d = [v]; 64978 } 64979 64980 return; 64981 64982 // Infinity, NaN. 64983 } else if (v * 0 !== 0) { 64984 if (!v) x.s = NaN; 64985 x.e = NaN; 64986 x.d = null; 64987 return; 64988 } 64989 64990 return parseDecimal(x, v.toString()); 64991 64992 } else if (t !== 'string') { 64993 throw Error(invalidArgument + v); 64994 } 64995 64996 // Minus sign? 64997 if ((i = v.charCodeAt(0)) === 45) { 64998 v = v.slice(1); 64999 x.s = -1; 65000 } else { 65001 // Plus sign? 65002 if (i === 43) v = v.slice(1); 65003 x.s = 1; 65004 } 65005 65006 return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v); 65007 } 65008 65009 Decimal.prototype = P; 65010 65011 Decimal.ROUND_UP = 0; 65012 Decimal.ROUND_DOWN = 1; 65013 Decimal.ROUND_CEIL = 2; 65014 Decimal.ROUND_FLOOR = 3; 65015 Decimal.ROUND_HALF_UP = 4; 65016 Decimal.ROUND_HALF_DOWN = 5; 65017 Decimal.ROUND_HALF_EVEN = 6; 65018 Decimal.ROUND_HALF_CEIL = 7; 65019 Decimal.ROUND_HALF_FLOOR = 8; 65020 Decimal.EUCLID = 9; 65021 65022 Decimal.config = Decimal.set = config; 65023 Decimal.clone = clone; 65024 Decimal.isDecimal = isDecimalInstance; 65025 65026 Decimal.abs = abs; 65027 Decimal.acos = acos; 65028 Decimal.acosh = acosh; // ES6 65029 Decimal.add = add; 65030 Decimal.asin = asin; 65031 Decimal.asinh = asinh; // ES6 65032 Decimal.atan = atan; 65033 Decimal.atanh = atanh; // ES6 65034 Decimal.atan2 = atan2; 65035 Decimal.cbrt = cbrt; // ES6 65036 Decimal.ceil = ceil; 65037 Decimal.clamp = clamp; 65038 Decimal.cos = cos; 65039 Decimal.cosh = cosh; // ES6 65040 Decimal.div = div; 65041 Decimal.exp = exp; 65042 Decimal.floor = floor; 65043 Decimal.hypot = hypot; // ES6 65044 Decimal.ln = ln; 65045 Decimal.log = log; 65046 Decimal.log10 = log10; // ES6 65047 Decimal.log2 = log2; // ES6 65048 Decimal.max = max; 65049 Decimal.min = min; 65050 Decimal.mod = mod; 65051 Decimal.mul = mul; 65052 Decimal.pow = pow; 65053 Decimal.random = random; 65054 Decimal.round = round; 65055 Decimal.sign = sign; // ES6 65056 Decimal.sin = sin; 65057 Decimal.sinh = sinh; // ES6 65058 Decimal.sqrt = sqrt; 65059 Decimal.sub = sub; 65060 Decimal.sum = sum; 65061 Decimal.tan = tan; 65062 Decimal.tanh = tanh; // ES6 65063 Decimal.trunc = trunc; // ES6 65064 65065 if (obj === void 0) obj = {}; 65066 if (obj) { 65067 if (obj.defaults !== true) { 65068 ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto']; 65069 for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p]; 65070 } 65071 } 65072 65073 Decimal.config(obj); 65074 65075 return Decimal; 65076} 65077 65078 65079/* 65080 * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant 65081 * digits using rounding mode `rounding`. 65082 * 65083 * x {number|string|Decimal} 65084 * y {number|string|Decimal} 65085 * 65086 */ 65087function div(x, y) { 65088 return new this(x).div(y); 65089} 65090 65091 65092/* 65093 * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision` 65094 * significant digits using rounding mode `rounding`. 65095 * 65096 * x {number|string|Decimal} The power to which to raise the base of the natural log. 65097 * 65098 */ 65099function exp(x) { 65100 return new this(x).exp(); 65101} 65102 65103 65104/* 65105 * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`. 65106 * 65107 * x {number|string|Decimal} 65108 * 65109 */ 65110function floor(x) { 65111 return finalise(x = new this(x), x.e + 1, 3); 65112} 65113 65114 65115/* 65116 * Return a new Decimal whose value is the square root of the sum of the squares of the arguments, 65117 * rounded to `precision` significant digits using rounding mode `rounding`. 65118 * 65119 * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...) 65120 * 65121 * arguments {number|string|Decimal} 65122 * 65123 */ 65124function hypot() { 65125 var i, n, 65126 t = new this(0); 65127 65128 external = false; 65129 65130 for (i = 0; i < arguments.length;) { 65131 n = new this(arguments[i++]); 65132 if (!n.d) { 65133 if (n.s) { 65134 external = true; 65135 return new this(1 / 0); 65136 } 65137 t = n; 65138 } else if (t.d) { 65139 t = t.plus(n.times(n)); 65140 } 65141 } 65142 65143 external = true; 65144 65145 return t.sqrt(); 65146} 65147 65148 65149/* 65150 * Return true if object is a Decimal instance (where Decimal is any Decimal constructor), 65151 * otherwise return false. 65152 * 65153 */ 65154function isDecimalInstance(obj) { 65155 return obj instanceof Decimal || obj && obj.toStringTag === tag || false; 65156} 65157 65158 65159/* 65160 * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision` 65161 * significant digits using rounding mode `rounding`. 65162 * 65163 * x {number|string|Decimal} 65164 * 65165 */ 65166function ln(x) { 65167 return new this(x).ln(); 65168} 65169 65170 65171/* 65172 * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base 65173 * is specified, rounded to `precision` significant digits using rounding mode `rounding`. 65174 * 65175 * log[y](x) 65176 * 65177 * x {number|string|Decimal} The argument of the logarithm. 65178 * y {number|string|Decimal} The base of the logarithm. 65179 * 65180 */ 65181function log(x, y) { 65182 return new this(x).log(y); 65183} 65184 65185 65186/* 65187 * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision` 65188 * significant digits using rounding mode `rounding`. 65189 * 65190 * x {number|string|Decimal} 65191 * 65192 */ 65193function log2(x) { 65194 return new this(x).log(2); 65195} 65196 65197 65198/* 65199 * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision` 65200 * significant digits using rounding mode `rounding`. 65201 * 65202 * x {number|string|Decimal} 65203 * 65204 */ 65205function log10(x) { 65206 return new this(x).log(10); 65207} 65208 65209 65210/* 65211 * Return a new Decimal whose value is the maximum of the arguments. 65212 * 65213 * arguments {number|string|Decimal} 65214 * 65215 */ 65216function max() { 65217 return maxOrMin(this, arguments, 'lt'); 65218} 65219 65220 65221/* 65222 * Return a new Decimal whose value is the minimum of the arguments. 65223 * 65224 * arguments {number|string|Decimal} 65225 * 65226 */ 65227function min() { 65228 return maxOrMin(this, arguments, 'gt'); 65229} 65230 65231 65232/* 65233 * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits 65234 * using rounding mode `rounding`. 65235 * 65236 * x {number|string|Decimal} 65237 * y {number|string|Decimal} 65238 * 65239 */ 65240function mod(x, y) { 65241 return new this(x).mod(y); 65242} 65243 65244 65245/* 65246 * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant 65247 * digits using rounding mode `rounding`. 65248 * 65249 * x {number|string|Decimal} 65250 * y {number|string|Decimal} 65251 * 65252 */ 65253function mul(x, y) { 65254 return new this(x).mul(y); 65255} 65256 65257 65258/* 65259 * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision 65260 * significant digits using rounding mode `rounding`. 65261 * 65262 * x {number|string|Decimal} The base. 65263 * y {number|string|Decimal} The exponent. 65264 * 65265 */ 65266function pow(x, y) { 65267 return new this(x).pow(y); 65268} 65269 65270 65271/* 65272 * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with 65273 * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros 65274 * are produced). 65275 * 65276 * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive. 65277 * 65278 */ 65279function random(sd) { 65280 var d, e, k, n, 65281 i = 0, 65282 r = new this(1), 65283 rd = []; 65284 65285 if (sd === void 0) sd = this.precision; 65286 else checkInt32(sd, 1, MAX_DIGITS); 65287 65288 k = Math.ceil(sd / LOG_BASE); 65289 65290 if (!this.crypto) { 65291 for (; i < k;) rd[i++] = Math.random() * 1e7 | 0; 65292 65293 // Browsers supporting crypto.getRandomValues. 65294 } else if (crypto.getRandomValues) { 65295 d = crypto.getRandomValues(new Uint32Array(k)); 65296 65297 for (; i < k;) { 65298 n = d[i]; 65299 65300 // 0 <= n < 4294967296 65301 // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865). 65302 if (n >= 4.29e9) { 65303 d[i] = crypto.getRandomValues(new Uint32Array(1))[0]; 65304 } else { 65305 65306 // 0 <= n <= 4289999999 65307 // 0 <= (n % 1e7) <= 9999999 65308 rd[i++] = n % 1e7; 65309 } 65310 } 65311 65312 // Node.js supporting crypto.randomBytes. 65313 } else if (crypto.randomBytes) { 65314 65315 // buffer 65316 d = crypto.randomBytes(k *= 4); 65317 65318 for (; i < k;) { 65319 65320 // 0 <= n < 2147483648 65321 n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24); 65322 65323 // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286). 65324 if (n >= 2.14e9) { 65325 crypto.randomBytes(4).copy(d, i); 65326 } else { 65327 65328 // 0 <= n <= 2139999999 65329 // 0 <= (n % 1e7) <= 9999999 65330 rd.push(n % 1e7); 65331 i += 4; 65332 } 65333 } 65334 65335 i = k / 4; 65336 } else { 65337 throw Error(cryptoUnavailable); 65338 } 65339 65340 k = rd[--i]; 65341 sd %= LOG_BASE; 65342 65343 // Convert trailing digits to zeros according to sd. 65344 if (k && sd) { 65345 n = mathpow(10, LOG_BASE - sd); 65346 rd[i] = (k / n | 0) * n; 65347 } 65348 65349 // Remove trailing words which are zero. 65350 for (; rd[i] === 0; i--) rd.pop(); 65351 65352 // Zero? 65353 if (i < 0) { 65354 e = 0; 65355 rd = [0]; 65356 } else { 65357 e = -1; 65358 65359 // Remove leading words which are zero and adjust exponent accordingly. 65360 for (; rd[0] === 0; e -= LOG_BASE) rd.shift(); 65361 65362 // Count the digits of the first word of rd to determine leading zeros. 65363 for (k = 1, n = rd[0]; n >= 10; n /= 10) k++; 65364 65365 // Adjust the exponent for leading zeros of the first word of rd. 65366 if (k < LOG_BASE) e -= LOG_BASE - k; 65367 } 65368 65369 r.e = e; 65370 r.d = rd; 65371 65372 return r; 65373} 65374 65375 65376/* 65377 * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`. 65378 * 65379 * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL). 65380 * 65381 * x {number|string|Decimal} 65382 * 65383 */ 65384function round(x) { 65385 return finalise(x = new this(x), x.e + 1, this.rounding); 65386} 65387 65388 65389/* 65390 * Return 65391 * 1 if x > 0, 65392 * -1 if x < 0, 65393 * 0 if x is 0, 65394 * -0 if x is -0, 65395 * NaN otherwise 65396 * 65397 * x {number|string|Decimal} 65398 * 65399 */ 65400function sign(x) { 65401 x = new this(x); 65402 return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN; 65403} 65404 65405 65406/* 65407 * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits 65408 * using rounding mode `rounding`. 65409 * 65410 * x {number|string|Decimal} A value in radians. 65411 * 65412 */ 65413function sin(x) { 65414 return new this(x).sin(); 65415} 65416 65417 65418/* 65419 * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision` 65420 * significant digits using rounding mode `rounding`. 65421 * 65422 * x {number|string|Decimal} A value in radians. 65423 * 65424 */ 65425function sinh(x) { 65426 return new this(x).sinh(); 65427} 65428 65429 65430/* 65431 * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant 65432 * digits using rounding mode `rounding`. 65433 * 65434 * x {number|string|Decimal} 65435 * 65436 */ 65437function sqrt(x) { 65438 return new this(x).sqrt(); 65439} 65440 65441 65442/* 65443 * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits 65444 * using rounding mode `rounding`. 65445 * 65446 * x {number|string|Decimal} 65447 * y {number|string|Decimal} 65448 * 65449 */ 65450function sub(x, y) { 65451 return new this(x).sub(y); 65452} 65453 65454 65455/* 65456 * Return a new Decimal whose value is the sum of the arguments, rounded to `precision` 65457 * significant digits using rounding mode `rounding`. 65458 * 65459 * Only the result is rounded, not the intermediate calculations. 65460 * 65461 * arguments {number|string|Decimal} 65462 * 65463 */ 65464function sum() { 65465 var i = 0, 65466 args = arguments, 65467 x = new this(args[i]); 65468 65469 external = false; 65470 for (; x.s && ++i < args.length;) x = x.plus(args[i]); 65471 external = true; 65472 65473 return finalise(x, this.precision, this.rounding); 65474} 65475 65476 65477/* 65478 * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant 65479 * digits using rounding mode `rounding`. 65480 * 65481 * x {number|string|Decimal} A value in radians. 65482 * 65483 */ 65484function tan(x) { 65485 return new this(x).tan(); 65486} 65487 65488 65489/* 65490 * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision` 65491 * significant digits using rounding mode `rounding`. 65492 * 65493 * x {number|string|Decimal} A value in radians. 65494 * 65495 */ 65496function tanh(x) { 65497 return new this(x).tanh(); 65498} 65499 65500 65501/* 65502 * Return a new Decimal whose value is `x` truncated to an integer. 65503 * 65504 * x {number|string|Decimal} 65505 * 65506 */ 65507function trunc(x) { 65508 return finalise(x = new this(x), x.e + 1, 1); 65509} 65510 65511 65512P[Symbol.for('nodejs.util.inspect.custom')] = P.toString; 65513P[Symbol.toStringTag] = 'Decimal'; 65514 65515// Create and configure initial Decimal constructor. 65516var Decimal = P.constructor = clone(DEFAULTS); 65517 65518// Create the internal constants from their string values. 65519LN10 = new Decimal(LN10); 65520PI = new Decimal(PI); 65521 65522/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Decimal); 65523 65524 65525/***/ }), 65526
vendor: 661,476 bytes, lines 65527-74536
65527/***/ "./node_modules/vue3-apexcharts/dist/vue3-apexcharts.js": 65528/*!**************************************************************!*\ 65529 !*** ./node_modules/vue3-apexcharts/dist/vue3-apexcharts.js ***! 65530 \**************************************************************/ 65531/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 65532 65533"use strict"; 65534__webpack_require__.r(__webpack_exports__); 65535/* harmony export */ __webpack_require__.d(__webpack_exports__, { 65536/* harmony export */ "default": () => (/* binding */ qe) 65537/* harmony export */ }); 65538/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); 65539 65540function ei(_) { 65541 return _ && _.__esModule && Object.prototype.hasOwnProperty.call(_, "default") ? _.default : _; 65542} 65543var Ue = { exports: {} }; 65544/*! 65545 * ApexCharts v3.45.2 65546 * (c) 2018-2024 ApexCharts 65547 * Released under the MIT License. 65548 */ 65549(function(_, Re) { 65550 function Ae(y, e) { 65551 var t = Object.keys(y); 65552 if (Object.getOwnPropertySymbols) { 65553 var i = Object.getOwnPropertySymbols(y); 65554 e && (i = i.filter(function(a) { 65555 return Object.getOwnPropertyDescriptor(y, a).enumerable; 65556 })), t.push.apply(t, i); 65557 } 65558 return t; 65559 } 65560 function X(y) { 65561 for (var e = 1; e < arguments.length; e++) { 65562 var t = arguments[e] != null ? arguments[e] : {}; 65563 e % 2 ? Ae(Object(t), !0).forEach(function(i) { 65564 ee(y, i, t[i]); 65565 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(y, Object.getOwnPropertyDescriptors(t)) : Ae(Object(t)).forEach(function(i) { 65566 Object.defineProperty(y, i, Object.getOwnPropertyDescriptor(t, i)); 65567 }); 65568 } 65569 return y; 65570 } 65571 function U(y) { 65572 return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { 65573 return typeof e; 65574 } : function(e) { 65575 return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 65576 }, U(y); 65577 } 65578 function F(y, e) { 65579 if (!(y instanceof e)) 65580 throw new TypeError("Cannot call a class as a function"); 65581 } 65582 function ce(y, e) { 65583 for (var t = 0; t < e.length; t++) { 65584 var i = e[t]; 65585 i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(y, i.key, i); 65586 } 65587 } 65588 function Y(y, e, t) { 65589 return e && ce(y.prototype, e), t && ce(y, t), y; 65590 } 65591 function ee(y, e, t) { 65592 return e in y ? Object.defineProperty(y, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : y[e] = t, y; 65593 } 65594 function ge(y, e) { 65595 if (typeof e != "function" && e !== null) 65596 throw new TypeError("Super expression must either be null or a function"); 65597 y.prototype = Object.create(e && e.prototype, { constructor: { value: y, writable: !0, configurable: !0 } }), e && Se(y, e); 65598 } 65599 function me(y) { 65600 return me = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { 65601 return e.__proto__ || Object.getPrototypeOf(e); 65602 }, me(y); 65603 } 65604 function Se(y, e) { 65605 return Se = Object.setPrototypeOf || function(t, i) { 65606 return t.__proto__ = i, t; 65607 }, Se(y, e); 65608 } 65609 function ze(y) { 65610 if (y === void 0) 65611 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 65612 return y; 65613 } 65614 function ue(y) { 65615 var e = function() { 65616 if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) 65617 return !1; 65618 if (typeof Proxy == "function") 65619 return !0; 65620 try { 65621 return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { 65622 })), !0; 65623 } catch { 65624 return !1; 65625 } 65626 }(); 65627 return function() { 65628 var t, i = me(y); 65629 if (e) { 65630 var a = me(this).constructor; 65631 t = Reflect.construct(i, arguments, a); 65632 } else 65633 t = i.apply(this, arguments); 65634 return function(s, r) { 65635 if (r && (typeof r == "object" || typeof r == "function")) 65636 return r; 65637 if (r !== void 0) 65638 throw new TypeError("Derived constructors may only return object or undefined"); 65639 return ze(s); 65640 }(this, t); 65641 }; 65642 } 65643 function Me(y, e) { 65644 return function(t) { 65645 if (Array.isArray(t)) 65646 return t; 65647 }(y) || function(t, i) { 65648 var a = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; 65649 if (a != null) { 65650 var s, r, n = [], o = !0, h = !1; 65651 try { 65652 for (a = a.call(t); !(o = (s = a.next()).done) && (n.push(s.value), !i || n.length !== i); o = !0) 65653 ; 65654 } catch (c) { 65655 h = !0, r = c; 65656 } finally { 65657 try { 65658 o || a.return == null || a.return(); 65659 } finally { 65660 if (h) 65661 throw r; 65662 } 65663 } 65664 return n; 65665 } 65666 }(y, e) || Xe(y, e) || function() { 65667 throw new TypeError(`Invalid attempt to destructure non-iterable instance. 65668In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); 65669 }(); 65670 } 65671 function J(y) { 65672 return function(e) { 65673 if (Array.isArray(e)) 65674 return Ce(e); 65675 }(y) || function(e) { 65676 if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) 65677 return Array.from(e); 65678 }(y) || Xe(y) || function() { 65679 throw new TypeError(`Invalid attempt to spread non-iterable instance. 65680In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); 65681 }(); 65682 } 65683 function Xe(y, e) { 65684 if (y) { 65685 if (typeof y == "string") 65686 return Ce(y, e); 65687 var t = Object.prototype.toString.call(y).slice(8, -1); 65688 return t === "Object" && y.constructor && (t = y.constructor.name), t === "Map" || t === "Set" ? Array.from(y) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ce(y, e) : void 0; 65689 } 65690 } 65691 function Ce(y, e) { 65692 (e == null || e > y.length) && (e = y.length); 65693 for (var t = 0, i = new Array(e); t < e; t++) 65694 i[t] = y[t]; 65695 return i; 65696 } 65697 var P = function() { 65698 function y() { 65699 F(this, y); 65700 } 65701 return Y(y, [{ key: "shadeRGBColor", value: function(e, t) { 65702 var i = t.split(","), a = e < 0 ? 0 : 255, s = e < 0 ? -1 * e : e, r = parseInt(i[0].slice(4), 10), n = parseInt(i[1], 10), o = parseInt(i[2], 10); 65703 return "rgb(" + (Math.round((a - r) * s) + r) + "," + (Math.round((a - n) * s) + n) + "," + (Math.round((a - o) * s) + o) + ")"; 65704 } }, { key: "shadeHexColor", value: function(e, t) { 65705 var i = parseInt(t.slice(1), 16), a = e < 0 ? 0 : 255, s = e < 0 ? -1 * e : e, r = i >> 16, n = i >> 8 & 255, o = 255 & i; 65706 return "#" + (16777216 + 65536 * (Math.round((a - r) * s) + r) + 256 * (Math.round((a - n) * s) + n) + (Math.round((a - o) * s) + o)).toString(16).slice(1); 65707 } }, { key: "shadeColor", value: function(e, t) { 65708 return y.isColorHex(t) ? this.shadeHexColor(e, t) : this.shadeRGBColor(e, t); 65709 } }], [{ key: "bind", value: function(e, t) { 65710 return function() { 65711 return e.apply(t, arguments); 65712 }; 65713 } }, { key: "isObject", value: function(e) { 65714 return e && U(e) === "object" && !Array.isArray(e) && e != null; 65715 } }, { key: "is", value: function(e, t) { 65716 return Object.prototype.toString.call(t) === "[object " + e + "]"; 65717 } }, { key: "listToArray", value: function(e) { 65718 var t, i = []; 65719 for (t = 0; t < e.length; t++) 65720 i[t] = e[t]; 65721 return i; 65722 } }, { key: "extend", value: function(e, t) { 65723 var i = this; 65724 typeof Object.assign != "function" && (Object.assign = function(s) { 65725 if (s == null) 65726 throw new TypeError("Cannot convert undefined or null to object"); 65727 for (var r = Object(s), n = 1; n < arguments.length; n++) { 65728 var o = arguments[n]; 65729 if (o != null) 65730 for (var h in o) 65731 o.hasOwnProperty(h) && (r[h] = o[h]); 65732 } 65733 return r; 65734 }); 65735 var a = Object.assign({}, e); 65736 return this.isObject(e) && this.isObject(t) && Object.keys(t).forEach(function(s) { 65737 i.isObject(t[s]) && s in e ? a[s] = i.extend(e[s], t[s]) : Object.assign(a, ee({}, s, t[s])); 65738 }), a; 65739 } }, { key: "extendArray", value: function(e, t) { 65740 var i = []; 65741 return e.map(function(a) { 65742 i.push(y.extend(t, a)); 65743 }), e = i; 65744 } }, { key: "monthMod", value: function(e) { 65745 return e % 12; 65746 } }, { key: "clone", value: function(e) { 65747 if (y.is("Array", e)) { 65748 for (var t = [], i = 0; i < e.length; i++) 65749 t[i] = this.clone(e[i]); 65750 return t; 65751 } 65752 if (y.is("Null", e)) 65753 return null; 65754 if (y.is("Date", e)) 65755 return e; 65756 if (U(e) === "object") { 65757 var a = {}; 65758 for (var s in e) 65759 e.hasOwnProperty(s) && (a[s] = this.clone(e[s])); 65760 return a; 65761 } 65762 return e; 65763 } }, { key: "log10", value: function(e) { 65764 return Math.log(e) / Math.LN10; 65765 } }, { key: "roundToBase10", value: function(e) { 65766 return Math.pow(10, Math.floor(Math.log10(e))); 65767 } }, { key: "roundToBase", value: function(e, t) { 65768 return Math.pow(t, Math.floor(Math.log(e) / Math.log(t))); 65769 } }, { key: "parseNumber", value: function(e) { 65770 return e === null ? e : parseFloat(e); 65771 } }, { key: "stripNumber", value: function(e) { 65772 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2; 65773 return Number.isInteger(e) ? e : parseFloat(e.toPrecision(t)); 65774 } }, { key: "randomId", value: function() { 65775 return (Math.random() + 1).toString(36).substring(4); 65776 } }, { key: "noExponents", value: function(e) { 65777 var t = String(e).split(/[eE]/); 65778 if (t.length === 1) 65779 return t[0]; 65780 var i = "", a = e < 0 ? "-" : "", s = t[0].replace(".", ""), r = Number(t[1]) + 1; 65781 if (r < 0) { 65782 for (i = a + "0."; r++; ) 65783 i += "0"; 65784 return i + s.replace(/^-/, ""); 65785 } 65786 for (r -= s.length; r--; ) 65787 i += "0"; 65788 return s + i; 65789 } }, { key: "getDimensions", value: function(e) { 65790 var t = getComputedStyle(e, null), i = e.clientHeight, a = e.clientWidth; 65791 return i -= parseFloat(t.paddingTop) + parseFloat(t.paddingBottom), [a -= parseFloat(t.paddingLeft) + parseFloat(t.paddingRight), i]; 65792 } }, { key: "getBoundingClientRect", value: function(e) { 65793 var t = e.getBoundingClientRect(); 65794 return { top: t.top, right: t.right, bottom: t.bottom, left: t.left, width: e.clientWidth, height: e.clientHeight, x: t.left, y: t.top }; 65795 } }, { key: "getLargestStringFromArr", value: function(e) { 65796 return e.reduce(function(t, i) { 65797 return Array.isArray(i) && (i = i.reduce(function(a, s) { 65798 return a.length > s.length ? a : s; 65799 })), t.length > i.length ? t : i; 65800 }, 0); 65801 } }, { key: "hexToRgba", value: function() { 65802 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "#999999", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.6; 65803 e.substring(0, 1) !== "#" && (e = "#999999"); 65804 var i = e.replace("#", ""); 65805 i = i.match(new RegExp("(.{" + i.length / 3 + "})", "g")); 65806 for (var a = 0; a < i.length; a++) 65807 i[a] = parseInt(i[a].length === 1 ? i[a] + i[a] : i[a], 16); 65808 return t !== void 0 && i.push(t), "rgba(" + i.join(",") + ")"; 65809 } }, { key: "getOpacityFromRGBA", value: function(e) { 65810 return parseFloat(e.replace(/^.*,(.+)\)/, "$1")); 65811 } }, { key: "rgb2hex", value: function(e) { 65812 return (e = e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) && e.length === 4 ? "#" + ("0" + parseInt(e[1], 10).toString(16)).slice(-2) + ("0" + parseInt(e[2], 10).toString(16)).slice(-2) + ("0" + parseInt(e[3], 10).toString(16)).slice(-2) : ""; 65813 } }, { key: "isColorHex", value: function(e) { 65814 return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e); 65815 } }, { key: "getPolygonPos", value: function(e, t) { 65816 for (var i = [], a = 2 * Math.PI / t, s = 0; s < t; s++) { 65817 var r = {}; 65818 r.x = e * Math.sin(s * a), r.y = -e * Math.cos(s * a), i.push(r); 65819 } 65820 return i; 65821 } }, { key: "polarToCartesian", value: function(e, t, i, a) { 65822 var s = (a - 90) * Math.PI / 180; 65823 return { x: e + i * Math.cos(s), y: t + i * Math.sin(s) }; 65824 } }, { key: "escapeString", value: function(e) { 65825 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "x", i = e.toString().slice(); 65826 return i = i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi, t); 65827 } }, { key: "negToZero", value: function(e) { 65828 return e < 0 ? 0 : e; 65829 } }, { key: "moveIndexInArray", value: function(e, t, i) { 65830 if (i >= e.length) 65831 for (var a = i - e.length + 1; a--; ) 65832 e.push(void 0); 65833 return e.splice(i, 0, e.splice(t, 1)[0]), e; 65834 } }, { key: "extractNumber", value: function(e) { 65835 return parseFloat(e.replace(/[^\d.]*/g, "")); 65836 } }, { key: "findAncestor", value: function(e, t) { 65837 for (; (e = e.parentElement) && !e.classList.contains(t); ) 65838 ; 65839 return e; 65840 } }, { key: "setELstyles", value: function(e, t) { 65841 for (var i in t) 65842 t.hasOwnProperty(i) && (e.style.key = t[i]); 65843 } }, { key: "isNumber", value: function(e) { 65844 return !isNaN(e) && parseFloat(Number(e)) === e && !isNaN(parseInt(e, 10)); 65845 } }, { key: "isFloat", value: function(e) { 65846 return Number(e) === e && e % 1 != 0; 65847 } }, { key: "isSafari", value: function() { 65848 return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); 65849 } }, { key: "isFirefox", value: function() { 65850 return navigator.userAgent.toLowerCase().indexOf("firefox") > -1; 65851 } }, { key: "isIE11", value: function() { 65852 if (window.navigator.userAgent.indexOf("MSIE") !== -1 || window.navigator.appVersion.indexOf("Trident/") > -1) 65853 return !0; 65854 } }, { key: "isIE", value: function() { 65855 var e = window.navigator.userAgent, t = e.indexOf("MSIE "); 65856 if (t > 0) 65857 return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10); 65858 if (e.indexOf("Trident/") > 0) { 65859 var i = e.indexOf("rv:"); 65860 return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10); 65861 } 65862 var a = e.indexOf("Edge/"); 65863 return a > 0 && parseInt(e.substring(a + 5, e.indexOf(".", a)), 10); 65864 } }]), y; 65865 }(), de = function() { 65866 function y(e) { 65867 F(this, y), this.ctx = e, this.w = e.w, this.setEasingFunctions(); 65868 } 65869 return Y(y, [{ key: "setEasingFunctions", value: function() { 65870 var e; 65871 if (!this.w.globals.easing) { 65872 switch (this.w.config.chart.animations.easing) { 65873 case "linear": 65874 e = "-"; 65875 break; 65876 case "easein": 65877 e = "<"; 65878 break; 65879 case "easeout": 65880 e = ">"; 65881 break; 65882 case "easeinout": 65883 default: 65884 e = "<>"; 65885 break; 65886 case "swing": 65887 e = function(t) { 65888 var i = 1.70158; 65889 return (t -= 1) * t * ((i + 1) * t + i) + 1; 65890 }; 65891 break; 65892 case "bounce": 65893 e = function(t) { 65894 return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375; 65895 }; 65896 break; 65897 case "elastic": 65898 e = function(t) { 65899 return t === !!t ? t : Math.pow(2, -10 * t) * Math.sin((t - 0.075) * (2 * Math.PI) / 0.3) + 1; 65900 }; 65901 } 65902 this.w.globals.easing = e; 65903 } 65904 } }, { key: "animateLine", value: function(e, t, i, a) { 65905 e.attr(t).animate(a).attr(i); 65906 } }, { key: "animateMarker", value: function(e, t, i, a, s, r) { 65907 t || (t = 0), e.attr({ r: t, width: t, height: t }).animate(a, s).attr({ r: i, width: i.width, height: i.height }).afterAll(function() { 65908 r(); 65909 }); 65910 } }, { key: "animateCircle", value: function(e, t, i, a, s) { 65911 e.attr({ r: t.r, cx: t.cx, cy: t.cy }).animate(a, s).attr({ r: i.r, cx: i.cx, cy: i.cy }); 65912 } }, { key: "animateRect", value: function(e, t, i, a, s) { 65913 e.attr(t).animate(a).attr(i).afterAll(function() { 65914 return s(); 65915 }); 65916 } }, { key: "animatePathsGradually", value: function(e) { 65917 var t = e.el, i = e.realIndex, a = e.j, s = e.fill, r = e.pathFrom, n = e.pathTo, o = e.speed, h = e.delay, c = this.w, d = 0; 65918 c.config.chart.animations.animateGradually.enabled && (d = c.config.chart.animations.animateGradually.delay), c.config.chart.animations.dynamicAnimation.enabled && c.globals.dataChanged && c.config.chart.type !== "bar" && (d = 0), this.morphSVG(t, i, a, c.config.chart.type !== "line" || c.globals.comboCharts ? s : "stroke", r, n, o, h * d); 65919 } }, { key: "showDelayedElements", value: function() { 65920 this.w.globals.delayedElements.forEach(function(e) { 65921 var t = e.el; 65922 t.classList.remove("apexcharts-element-hidden"), t.classList.add("apexcharts-hidden-element-shown"); 65923 }); 65924 } }, { key: "animationCompleted", value: function(e) { 65925 var t = this.w; 65926 t.globals.animationEnded || (t.globals.animationEnded = !0, this.showDelayedElements(), typeof t.config.chart.events.animationEnd == "function" && t.config.chart.events.animationEnd(this.ctx, { el: e, w: t })); 65927 } }, { key: "morphSVG", value: function(e, t, i, a, s, r, n, o) { 65928 var h = this, c = this.w; 65929 s || (s = e.attr("pathFrom")), r || (r = e.attr("pathTo")); 65930 var d = function(g) { 65931 return c.config.chart.type === "radar" && (n = 1), "M 0 ".concat(c.globals.gridHeight); 65932 }; 65933 (!s || s.indexOf("undefined") > -1 || s.indexOf("NaN") > -1) && (s = d()), (!r || r.indexOf("undefined") > -1 || r.indexOf("NaN") > -1) && (r = d()), c.globals.shouldAnimate || (n = 1), e.plot(s).animate(1, c.globals.easing, o).plot(s).animate(n, c.globals.easing, o).plot(r).afterAll(function() { 65934 P.isNumber(i) ? i === c.globals.series[c.globals.maxValsInArrayIndex].length - 2 && c.globals.shouldAnimate && h.animationCompleted(e) : a !== "none" && c.globals.shouldAnimate && (!c.globals.comboCharts && t === c.globals.series.length - 1 || c.globals.comboCharts) && h.animationCompleted(e), h.showDelayedElements(); 65935 }); 65936 } }]), y; 65937 }(), Z = function() { 65938 function y(e) { 65939 F(this, y), this.ctx = e, this.w = e.w; 65940 } 65941 return Y(y, [{ key: "getDefaultFilter", value: function(e, t) { 65942 var i = this.w; 65943 e.unfilter(!0), new window.SVG.Filter().size("120%", "180%", "-5%", "-40%"), i.config.states.normal.filter !== "none" ? this.applyFilter(e, t, i.config.states.normal.filter.type, i.config.states.normal.filter.value) : i.config.chart.dropShadow.enabled && this.dropShadow(e, i.config.chart.dropShadow, t); 65944 } }, { key: "addNormalFilter", value: function(e, t) { 65945 var i = this.w; 65946 i.config.chart.dropShadow.enabled && !e.node.classList.contains("apexcharts-marker") && this.dropShadow(e, i.config.chart.dropShadow, t); 65947 } }, { key: "addLightenFilter", value: function(e, t, i) { 65948 var a = this, s = this.w, r = i.intensity; 65949 e.unfilter(!0), new window.SVG.Filter(), e.filter(function(n) { 65950 var o = s.config.chart.dropShadow; 65951 (o.enabled ? a.addShadow(n, t, o) : n).componentTransfer({ rgb: { type: "linear", slope: 1.5, intercept: r } }); 65952 }), e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node); 65953 } }, { key: "addDarkenFilter", value: function(e, t, i) { 65954 var a = this, s = this.w, r = i.intensity; 65955 e.unfilter(!0), new window.SVG.Filter(), e.filter(function(n) { 65956 var o = s.config.chart.dropShadow; 65957 (o.enabled ? a.addShadow(n, t, o) : n).componentTransfer({ rgb: { type: "linear", slope: r } }); 65958 }), e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node); 65959 } }, { key: "applyFilter", value: function(e, t, i) { 65960 var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0.5; 65961 switch (i) { 65962 case "none": 65963 this.addNormalFilter(e, t); 65964 break; 65965 case "lighten": 65966 this.addLightenFilter(e, t, { intensity: a }); 65967 break; 65968 case "darken": 65969 this.addDarkenFilter(e, t, { intensity: a }); 65970 } 65971 } }, { key: "addShadow", value: function(e, t, i) { 65972 var a = i.blur, s = i.top, r = i.left, n = i.color, o = i.opacity, h = e.flood(Array.isArray(n) ? n[t] : n, o).composite(e.sourceAlpha, "in").offset(r, s).gaussianBlur(a).merge(e.source); 65973 return e.blend(e.source, h); 65974 } }, { key: "dropShadow", value: function(e, t) { 65975 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, a = t.top, s = t.left, r = t.blur, n = t.color, o = t.opacity, h = t.noUserSpaceOnUse, c = this.w; 65976 return e.unfilter(!0), P.isIE() && c.config.chart.type === "radialBar" || (n = Array.isArray(n) ? n[i] : n, e.filter(function(d) { 65977 var g = null; 65978 g = P.isSafari() || P.isFirefox() || P.isIE() ? d.flood(n, o).composite(d.sourceAlpha, "in").offset(s, a).gaussianBlur(r) : d.flood(n, o).composite(d.sourceAlpha, "in").offset(s, a).gaussianBlur(r).merge(d.source), d.blend(d.source, g); 65979 }), h || e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node)), e; 65980 } }, { key: "setSelectionFilter", value: function(e, t, i) { 65981 var a = this.w; 65982 if (a.globals.selectedDataPoints[t] !== void 0 && a.globals.selectedDataPoints[t].indexOf(i) > -1) { 65983 e.node.setAttribute("selected", !0); 65984 var s = a.config.states.active.filter; 65985 s !== "none" && this.applyFilter(e, t, s.type, s.value); 65986 } 65987 } }, { key: "_scaleFilterSize", value: function(e) { 65988 (function(t) { 65989 for (var i in t) 65990 t.hasOwnProperty(i) && e.setAttribute(i, t[i]); 65991 })({ width: "200%", height: "200%", x: "-50%", y: "-50%" }); 65992 } }]), y; 65993 }(), M = function() { 65994 function y(e) { 65995 F(this, y), this.ctx = e, this.w = e.w; 65996 } 65997 return Y(y, [{ key: "roundPathCorners", value: function(e, t) { 65998 function i(S, C, L) { 65999 var I = C.x - S.x, z = C.y - S.y, T = Math.sqrt(I * I + z * z); 66000 return a(S, C, Math.min(1, L / T)); 66001 } 66002 function a(S, C, L) { 66003 return { x: S.x + (C.x - S.x) * L, y: S.y + (C.y - S.y) * L }; 66004 } 66005 function s(S, C) { 66006 S.length > 2 && (S[S.length - 2] = C.x, S[S.length - 1] = C.y); 66007 } 66008 function r(S) { 66009 return { x: parseFloat(S[S.length - 2]), y: parseFloat(S[S.length - 1]) }; 66010 } 66011 e.indexOf("NaN") > -1 && (e = ""); 66012 var n = e.split(/[,\s]/).reduce(function(S, C) { 66013 var L = C.match("([a-zA-Z])(.+)"); 66014 return L ? (S.push(L[1]), S.push(L[2])) : S.push(C), S; 66015 }, []).reduce(function(S, C) { 66016 return parseFloat(C) == C && S.length ? S[S.length - 1].push(C) : S.push([C]), S; 66017 }, []), o = []; 66018 if (n.length > 1) { 66019 var h = r(n[0]), c = null; 66020 n[n.length - 1][0] == "Z" && n[0].length > 2 && (c = ["L", h.x, h.y], n[n.length - 1] = c), o.push(n[0]); 66021 for (var d = 1; d < n.length; d++) { 66022 var g = o[o.length - 1], p = n[d], f = p == c ? n[1] : n[d + 1]; 66023 if (f && g && g.length > 2 && p[0] == "L" && f.length > 2 && f[0] == "L") { 66024 var b, m, w = r(g), A = r(p), l = r(f); 66025 b = i(A, w, t), m = i(A, l, t), s(p, b), p.origPoint = A, o.push(p); 66026 var u = a(b, A, 0.5), x = a(A, m, 0.5), v = ["C", u.x, u.y, x.x, x.y, m.x, m.y]; 66027 v.origPoint = A, o.push(v); 66028 } else 66029 o.push(p); 66030 } 66031 if (c) { 66032 var k = r(o[o.length - 1]); 66033 o.push(["Z"]), s(o[0], k); 66034 } 66035 } else 66036 o = n; 66037 return o.reduce(function(S, C) { 66038 return S + C.join(" ") + " "; 66039 }, ""); 66040 } }, { key: "drawLine", value: function(e, t, i, a) { 66041 var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "#a8a8a8", r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0, n = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : null, o = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "butt"; 66042 return this.w.globals.dom.Paper.line().attr({ x1: e, y1: t, x2: i, y2: a, stroke: s, "stroke-dasharray": r, "stroke-width": n, "stroke-linecap": o }); 66043 } }, { key: "drawRect", value: function() { 66044 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "#fefefe", n = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 1, o = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : null, h = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : null, c = arguments.length > 9 && arguments[9] !== void 0 ? arguments[9] : 0, d = this.w.globals.dom.Paper.rect(); 66045 return d.attr({ x: e, y: t, width: i > 0 ? i : 0, height: a > 0 ? a : 0, rx: s, ry: s, opacity: n, "stroke-width": o !== null ? o : 0, stroke: h !== null ? h : "none", "stroke-dasharray": c }), d.node.setAttribute("fill", r), d; 66046 } }, { key: "drawPolygon", value: function(e) { 66047 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "#e1e1e1", i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "none"; 66048 return this.w.globals.dom.Paper.polygon(e).attr({ fill: a, stroke: t, "stroke-width": i }); 66049 } }, { key: "drawCircle", value: function(e) { 66050 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; 66051 e < 0 && (e = 0); 66052 var i = this.w.globals.dom.Paper.circle(2 * e); 66053 return t !== null && i.attr(t), i; 66054 } }, { key: "drawPath", value: function(e) { 66055 var t = e.d, i = t === void 0 ? "" : t, a = e.stroke, s = a === void 0 ? "#a8a8a8" : a, r = e.strokeWidth, n = r === void 0 ? 1 : r, o = e.fill, h = e.fillOpacity, c = h === void 0 ? 1 : h, d = e.strokeOpacity, g = d === void 0 ? 1 : d, p = e.classes, f = e.strokeLinecap, b = f === void 0 ? null : f, m = e.strokeDashArray, w = m === void 0 ? 0 : m, A = this.w; 66056 return b === null && (b = A.config.stroke.lineCap), (i.indexOf("undefined") > -1 || i.indexOf("NaN") > -1) && (i = "M 0 ".concat(A.globals.gridHeight)), A.globals.dom.Paper.path(i).attr({ fill: o, "fill-opacity": c, stroke: s, "stroke-opacity": g, "stroke-linecap": b, "stroke-width": n, "stroke-dasharray": w, class: p }); 66057 } }, { key: "group", value: function() { 66058 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, t = this.w.globals.dom.Paper.group(); 66059 return e !== null && t.attr(e), t; 66060 } }, { key: "move", value: function(e, t) { 66061 var i = ["M", e, t].join(" "); 66062 return i; 66063 } }, { key: "line", value: function(e, t) { 66064 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = null; 66065 return i === null ? a = [" L", e, t].join(" ") : i === "H" ? a = [" H", e].join(" ") : i === "V" && (a = [" V", t].join(" ")), a; 66066 } }, { key: "curve", value: function(e, t, i, a, s, r) { 66067 var n = ["C", e, t, i, a, s, r].join(" "); 66068 return n; 66069 } }, { key: "quadraticCurve", value: function(e, t, i, a) { 66070 return ["Q", e, t, i, a].join(" "); 66071 } }, { key: "arc", value: function(e, t, i, a, s, r, n) { 66072 var o = "A"; 66073 arguments.length > 7 && arguments[7] !== void 0 && arguments[7] && (o = "a"); 66074 var h = [o, e, t, i, a, s, r, n].join(" "); 66075 return h; 66076 } }, { key: "renderPaths", value: function(e) { 66077 var t, i = e.j, a = e.realIndex, s = e.pathFrom, r = e.pathTo, n = e.stroke, o = e.strokeWidth, h = e.strokeLinecap, c = e.fill, d = e.animationDelay, g = e.initialSpeed, p = e.dataChangeSpeed, f = e.className, b = e.shouldClipToGrid, m = b === void 0 || b, w = e.bindEventsOnPaths, A = w === void 0 || w, l = e.drawShadow, u = l === void 0 || l, x = this.w, v = new Z(this.ctx), k = new de(this.ctx), S = this.w.config.chart.animations.enabled, C = S && this.w.config.chart.animations.dynamicAnimation.enabled, L = !!(S && !x.globals.resized || C && x.globals.dataChanged && x.globals.shouldAnimate); 66078 L ? t = s : (t = r, x.globals.animationEnded = !0); 66079 var I = x.config.stroke.dashArray, z = 0; 66080 z = Array.isArray(I) ? I[a] : x.config.stroke.dashArray; 66081 var T = this.drawPath({ d: t, stroke: n, strokeWidth: o, fill: c, fillOpacity: 1, classes: f, strokeLinecap: h, strokeDashArray: z }); 66082 if (T.attr("index", a), m && T.attr({ "clip-path": "url(#gridRectMask".concat(x.globals.cuid, ")") }), x.config.states.normal.filter.type !== "none") 66083 v.getDefaultFilter(T, a); 66084 else if (x.config.chart.dropShadow.enabled && u && (!x.config.chart.dropShadow.enabledOnSeries || x.config.chart.dropShadow.enabledOnSeries && x.config.chart.dropShadow.enabledOnSeries.indexOf(a) !== -1)) { 66085 var E = x.config.chart.dropShadow; 66086 v.dropShadow(T, E, a); 66087 } 66088 A && (T.node.addEventListener("mouseenter", this.pathMouseEnter.bind(this, T)), T.node.addEventListener("mouseleave", this.pathMouseLeave.bind(this, T)), T.node.addEventListener("mousedown", this.pathMouseDown.bind(this, T))), T.attr({ pathTo: r, pathFrom: s }); 66089 var R = { el: T, j: i, realIndex: a, pathFrom: s, pathTo: r, fill: c, strokeWidth: o, delay: d }; 66090 return !S || x.globals.resized || x.globals.dataChanged ? !x.globals.resized && x.globals.dataChanged || k.showDelayedElements() : k.animatePathsGradually(X(X({}, R), {}, { speed: g })), x.globals.dataChanged && C && L && k.animatePathsGradually(X(X({}, R), {}, { speed: p })), T; 66091 } }, { key: "drawPattern", value: function(e, t, i) { 66092 var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "#a8a8a8", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0; 66093 return this.w.globals.dom.Paper.pattern(t, i, function(r) { 66094 e === "horizontalLines" ? r.line(0, 0, i, 0).stroke({ color: a, width: s + 1 }) : e === "verticalLines" ? r.line(0, 0, 0, t).stroke({ color: a, width: s + 1 }) : e === "slantedLines" ? r.line(0, 0, t, i).stroke({ color: a, width: s }) : e === "squares" ? r.rect(t, i).fill("none").stroke({ color: a, width: s }) : e === "circles" && r.circle(t).fill("none").stroke({ color: a, width: s }); 66095 }); 66096 } }, { key: "drawGradient", value: function(e, t, i, a, s) { 66097 var r, n = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : null, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : null, h = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : null, c = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : 0, d = this.w; 66098 t.length < 9 && t.indexOf("#") === 0 && (t = P.hexToRgba(t, a)), i.length < 9 && i.indexOf("#") === 0 && (i = P.hexToRgba(i, s)); 66099 var g = 0, p = 1, f = 1, b = null; 66100 o !== null && (g = o[0] !== void 0 ? o[0] / 100 : 0, p = o[1] !== void 0 ? o[1] / 100 : 1, f = o[2] !== void 0 ? o[2] / 100 : 1, b = o[3] !== void 0 ? o[3] / 100 : null); 66101 var m = !(d.config.chart.type !== "donut" && d.config.chart.type !== "pie" && d.config.chart.type !== "polarArea" && d.config.chart.type !== "bubble"); 66102 if (r = h === null || h.length === 0 ? d.globals.dom.Paper.gradient(m ? "radial" : "linear", function(l) { 66103 l.at(g, t, a), l.at(p, i, s), l.at(f, i, s), b !== null && l.at(b, t, a); 66104 }) : d.globals.dom.Paper.gradient(m ? "radial" : "linear", function(l) { 66105 (Array.isArray(h[c]) ? h[c] : h).forEach(function(u) { 66106 l.at(u.offset / 100, u.color, u.opacity); 66107 }); 66108 }), m) { 66109 var w = d.globals.gridWidth / 2, A = d.globals.gridHeight / 2; 66110 d.config.chart.type !== "bubble" ? r.attr({ gradientUnits: "userSpaceOnUse", cx: w, cy: A, r: n }) : r.attr({ cx: 0.5, cy: 0.5, r: 0.8, fx: 0.2, fy: 0.2 }); 66111 } else 66112 e === "vertical" ? r.from(0, 0).to(0, 1) : e === "diagonal" ? r.from(0, 0).to(1, 1) : e === "horizontal" ? r.from(0, 1).to(1, 1) : e === "diagonal2" && r.from(1, 0).to(0, 1); 66113 return r; 66114 } }, { key: "getTextBasedOnMaxWidth", value: function(e) { 66115 var t = e.text, i = e.maxWidth, a = e.fontSize, s = e.fontFamily, r = this.getTextRects(t, a, s), n = r.width / t.length, o = Math.floor(i / n); 66116 return i < r.width ? t.slice(0, o - 3) + "..." : t; 66117 } }, { key: "drawText", value: function(e) { 66118 var t = this, i = e.x, a = e.y, s = e.text, r = e.textAnchor, n = e.fontSize, o = e.fontFamily, h = e.fontWeight, c = e.foreColor, d = e.opacity, g = e.maxWidth, p = e.cssClass, f = p === void 0 ? "" : p, b = e.isPlainText, m = b === void 0 || b, w = e.dominantBaseline, A = w === void 0 ? "auto" : w, l = this.w; 66119 s === void 0 && (s = ""); 66120 var u = s; 66121 r || (r = "start"), c && c.length || (c = l.config.chart.foreColor), o = o || l.config.chart.fontFamily, h = h || "regular"; 66122 var x, v = { maxWidth: g, fontSize: n = n || "11px", fontFamily: o }; 66123 return Array.isArray(s) ? x = l.globals.dom.Paper.text(function(k) { 66124 for (var S = 0; S < s.length; S++) 66125 u = s[S], g && (u = t.getTextBasedOnMaxWidth(X({ text: s[S] }, v))), S === 0 ? k.tspan(u) : k.tspan(u).newLine(); 66126 }) : (g && (u = this.getTextBasedOnMaxWidth(X({ text: s }, v))), x = m ? l.globals.dom.Paper.plain(s) : l.globals.dom.Paper.text(function(k) { 66127 return k.tspan(u); 66128 })), x.attr({ x: i, y: a, "text-anchor": r, "dominant-baseline": A, "font-size": n, "font-family": o, "font-weight": h, fill: c, class: "apexcharts-text " + f }), x.node.style.fontFamily = o, x.node.style.opacity = d, x; 66129 } }, { key: "drawMarker", value: function(e, t, i) { 66130 e = e || 0; 66131 var a = i.pSize || 0, s = null; 66132 if (i.shape === "square" || i.shape === "rect") { 66133 var r = i.pRadius === void 0 ? a / 2 : i.pRadius; 66134 t !== null && a || (a = 0, r = 0); 66135 var n = 1.2 * a + r, o = this.drawRect(n, n, n, n, r); 66136 o.attr({ x: e - n / 2, y: t - n / 2, cx: e, cy: t, class: i.class ? i.class : "", fill: i.pointFillColor, "fill-opacity": i.pointFillOpacity ? i.pointFillOpacity : 1, stroke: i.pointStrokeColor, "stroke-width": i.pointStrokeWidth ? i.pointStrokeWidth : 0, "stroke-opacity": i.pointStrokeOpacity ? i.pointStrokeOpacity : 1 }), s = o; 66137 } else 66138 i.shape !== "circle" && i.shape || (P.isNumber(t) || (a = 0, t = 0), s = this.drawCircle(a, { cx: e, cy: t, class: i.class ? i.class : "", stroke: i.pointStrokeColor, fill: i.pointFillColor, "fill-opacity": i.pointFillOpacity ? i.pointFillOpacity : 1, "stroke-width": i.pointStrokeWidth ? i.pointStrokeWidth : 0, "stroke-opacity": i.pointStrokeOpacity ? i.pointStrokeOpacity : 1 })); 66139 return s; 66140 } }, { key: "pathMouseEnter", value: function(e, t) { 66141 var i = this.w, a = new Z(this.ctx), s = parseInt(e.node.getAttribute("index"), 10), r = parseInt(e.node.getAttribute("j"), 10); 66142 if (typeof i.config.chart.events.dataPointMouseEnter == "function" && i.config.chart.events.dataPointMouseEnter(t, this.ctx, { seriesIndex: s, dataPointIndex: r, w: i }), this.ctx.events.fireEvent("dataPointMouseEnter", [t, this.ctx, { seriesIndex: s, dataPointIndex: r, w: i }]), (i.config.states.active.filter.type === "none" || e.node.getAttribute("selected") !== "true") && i.config.states.hover.filter.type !== "none" && !i.globals.isTouchDevice) { 66143 var n = i.config.states.hover.filter; 66144 a.applyFilter(e, s, n.type, n.value); 66145 } 66146 } }, { key: "pathMouseLeave", value: function(e, t) { 66147 var i = this.w, a = new Z(this.ctx), s = parseInt(e.node.getAttribute("index"), 10), r = parseInt(e.node.getAttribute("j"), 10); 66148 typeof i.config.chart.events.dataPointMouseLeave == "function" && i.config.chart.events.dataPointMouseLeave(t, this.ctx, { seriesIndex: s, dataPointIndex: r, w: i }), this.ctx.events.fireEvent("dataPointMouseLeave", [t, this.ctx, { seriesIndex: s, dataPointIndex: r, w: i }]), i.config.states.active.filter.type !== "none" && e.node.getAttribute("selected") === "true" || i.config.states.hover.filter.type !== "none" && a.getDefaultFilter(e, s); 66149 } }, { key: "pathMouseDown", value: function(e, t) { 66150 var i = this.w, a = new Z(this.ctx), s = parseInt(e.node.getAttribute("index"), 10), r = parseInt(e.node.getAttribute("j"), 10), n = "false"; 66151 if (e.node.getAttribute("selected") === "true") { 66152 if (e.node.setAttribute("selected", "false"), i.globals.selectedDataPoints[s].indexOf(r) > -1) { 66153 var o = i.globals.selectedDataPoints[s].indexOf(r); 66154 i.globals.selectedDataPoints[s].splice(o, 1); 66155 } 66156 } else { 66157 if (!i.config.states.active.allowMultipleDataPointsSelection && i.globals.selectedDataPoints.length > 0) { 66158 i.globals.selectedDataPoints = []; 66159 var h = i.globals.dom.Paper.select(".apexcharts-series path").members, c = i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members, d = function(f) { 66160 Array.prototype.forEach.call(f, function(b) { 66161 b.node.setAttribute("selected", "false"), a.getDefaultFilter(b, s); 66162 }); 66163 }; 66164 d(h), d(c); 66165 } 66166 e.node.setAttribute("selected", "true"), n = "true", i.globals.selectedDataPoints[s] === void 0 && (i.globals.selectedDataPoints[s] = []), i.globals.selectedDataPoints[s].push(r); 66167 } 66168 if (n === "true") { 66169 var g = i.config.states.active.filter; 66170 if (g !== "none") 66171 a.applyFilter(e, s, g.type, g.value); 66172 else if (i.config.states.hover.filter !== "none" && !i.globals.isTouchDevice) { 66173 var p = i.config.states.hover.filter; 66174 a.applyFilter(e, s, p.type, p.value); 66175 } 66176 } else 66177 i.config.states.active.filter.type !== "none" && (i.config.states.hover.filter.type === "none" || i.globals.isTouchDevice ? a.getDefaultFilter(e, s) : (p = i.config.states.hover.filter, a.applyFilter(e, s, p.type, p.value))); 66178 typeof i.config.chart.events.dataPointSelection == "function" && i.config.chart.events.dataPointSelection(t, this.ctx, { selectedDataPoints: i.globals.selectedDataPoints, seriesIndex: s, dataPointIndex: r, w: i }), t && this.ctx.events.fireEvent("dataPointSelection", [t, this.ctx, { selectedDataPoints: i.globals.selectedDataPoints, seriesIndex: s, dataPointIndex: r, w: i }]); 66179 } }, { key: "rotateAroundCenter", value: function(e) { 66180 var t = {}; 66181 return e && typeof e.getBBox == "function" && (t = e.getBBox()), { x: t.x + t.width / 2, y: t.y + t.height / 2 }; 66182 } }, { key: "getTextRects", value: function(e, t, i, a) { 66183 var s = !(arguments.length > 4 && arguments[4] !== void 0) || arguments[4], r = this.w, n = this.drawText({ x: -200, y: -200, text: e, textAnchor: "start", fontSize: t, fontFamily: i, foreColor: "#fff", opacity: 0 }); 66184 a && n.attr("transform", a), r.globals.dom.Paper.add(n); 66185 var o = n.bbox(); 66186 return s || (o = n.node.getBoundingClientRect()), n.remove(), { width: o.width, height: o.height }; 66187 } }, { key: "placeTextWithEllipsis", value: function(e, t, i) { 66188 if (typeof e.getComputedTextLength == "function" && (e.textContent = t, t.length > 0 && e.getComputedTextLength() >= i / 1.1)) { 66189 for (var a = t.length - 3; a > 0; a -= 3) 66190 if (e.getSubStringLength(0, a) <= i / 1.1) 66191 return void (e.textContent = t.substring(0, a) + "..."); 66192 e.textContent = "."; 66193 } 66194 } }], [{ key: "setAttrs", value: function(e, t) { 66195 for (var i in t) 66196 t.hasOwnProperty(i) && e.setAttribute(i, t[i]); 66197 } }]), y; 66198 }(), q = function() { 66199 function y(e) { 66200 F(this, y), this.ctx = e, this.w = e.w; 66201 } 66202 return Y(y, [{ key: "getStackedSeriesTotals", value: function() { 66203 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = this.w, i = []; 66204 if (t.globals.series.length === 0) 66205 return i; 66206 for (var a = 0; a < t.globals.series[t.globals.maxValsInArrayIndex].length; a++) { 66207 for (var s = 0, r = 0; r < t.globals.series.length; r++) 66208 t.globals.series[r][a] !== void 0 && e.indexOf(r) === -1 && (s += t.globals.series[r][a]); 66209 i.push(s); 66210 } 66211 return i; 66212 } }, { key: "getSeriesTotalByIndex", value: function() { 66213 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; 66214 return e === null ? this.w.config.series.reduce(function(t, i) { 66215 return t + i; 66216 }, 0) : this.w.globals.series[e].reduce(function(t, i) { 66217 return t + i; 66218 }, 0); 66219 } }, { key: "getStackedSeriesTotalsByGroups", value: function() { 66220 var e = this, t = this.w, i = []; 66221 return t.globals.seriesGroups.forEach(function(a) { 66222 var s = []; 66223 t.config.series.forEach(function(n, o) { 66224 a.indexOf(n.name) > -1 && s.push(o); 66225 }); 66226 var r = t.globals.series.map(function(n, o) { 66227 return s.indexOf(o) === -1 ? o : -1; 66228 }).filter(function(n) { 66229 return n !== -1; 66230 }); 66231 i.push(e.getStackedSeriesTotals(r)); 66232 }), i; 66233 } }, { key: "isSeriesNull", value: function() { 66234 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; 66235 return (e === null ? this.w.config.series.filter(function(t) { 66236 return t !== null; 66237 }) : this.w.config.series[e].data.filter(function(t) { 66238 return t !== null; 66239 })).length === 0; 66240 } }, { key: "seriesHaveSameValues", value: function(e) { 66241 return this.w.globals.series[e].every(function(t, i, a) { 66242 return t === a[0]; 66243 }); 66244 } }, { key: "getCategoryLabels", value: function(e) { 66245 var t = this.w, i = e.slice(); 66246 return t.config.xaxis.convertedCatToNumeric && (i = e.map(function(a, s) { 66247 return t.config.xaxis.labels.formatter(a - t.globals.minX + 1); 66248 })), i; 66249 } }, { key: "getLargestSeries", value: function() { 66250 var e = this.w; 66251 e.globals.maxValsInArrayIndex = e.globals.series.map(function(t) { 66252 return t.length; 66253 }).indexOf(Math.max.apply(Math, e.globals.series.map(function(t) { 66254 return t.length; 66255 }))); 66256 } }, { key: "getLargestMarkerSize", value: function() { 66257 var e = this.w, t = 0; 66258 return e.globals.markers.size.forEach(function(i) { 66259 t = Math.max(t, i); 66260 }), e.config.markers.discrete && e.config.markers.discrete.length && e.config.markers.discrete.forEach(function(i) { 66261 t = Math.max(t, i.size); 66262 }), t > 0 && (t += e.config.markers.hover.sizeOffset + 1), e.globals.markers.largestSize = t, t; 66263 } }, { key: "getSeriesTotals", value: function() { 66264 var e = this.w; 66265 e.globals.seriesTotals = e.globals.series.map(function(t, i) { 66266 var a = 0; 66267 if (Array.isArray(t)) 66268 for (var s = 0; s < t.length; s++) 66269 a += t[s]; 66270 else 66271 a += t; 66272 return a; 66273 }); 66274 } }, { key: "getSeriesTotalsXRange", value: function(e, t) { 66275 var i = this.w; 66276 return i.globals.series.map(function(a, s) { 66277 for (var r = 0, n = 0; n < a.length; n++) 66278 i.globals.seriesX[s][n] > e && i.globals.seriesX[s][n] < t && (r += a[n]); 66279 return r; 66280 }); 66281 } }, { key: "getPercentSeries", value: function() { 66282 var e = this.w; 66283 e.globals.seriesPercent = e.globals.series.map(function(t, i) { 66284 var a = []; 66285 if (Array.isArray(t)) 66286 for (var s = 0; s < t.length; s++) { 66287 var r = e.globals.stackedSeriesTotals[s], n = 0; 66288 r && (n = 100 * t[s] / r), a.push(n); 66289 } 66290 else { 66291 var o = 100 * t / e.globals.seriesTotals.reduce(function(h, c) { 66292 return h + c; 66293 }, 0); 66294 a.push(o); 66295 } 66296 return a; 66297 }); 66298 } }, { key: "getCalculatedRatios", value: function() { 66299 var e, t, i, a = this.w.globals, s = [], r = 0, n = [], o = 0.1, h = 0; 66300 if (a.yRange = [], a.isMultipleYAxis) 66301 for (var c = 0; c < a.minYArr.length; c++) 66302 a.yRange.push(Math.abs(a.minYArr[c] - a.maxYArr[c])), n.push(0); 66303 else 66304 a.yRange.push(Math.abs(a.minY - a.maxY)); 66305 a.xRange = Math.abs(a.maxX - a.minX), a.zRange = Math.abs(a.maxZ - a.minZ); 66306 for (var d = 0; d < a.yRange.length; d++) 66307 s.push(a.yRange[d] / a.gridHeight); 66308 if (t = a.xRange / a.gridWidth, e = a.yRange / a.gridWidth, i = a.xRange / a.gridHeight, (r = a.zRange / a.gridHeight * 16) || (r = 1), a.minY !== Number.MIN_VALUE && Math.abs(a.minY) !== 0 && (a.hasNegs = !0), a.isMultipleYAxis) { 66309 n = []; 66310 for (var g = 0; g < s.length; g++) 66311 n.push(-a.minYArr[g] / s[g]); 66312 } else 66313 n.push(-a.minY / s[0]), a.minY !== Number.MIN_VALUE && Math.abs(a.minY) !== 0 && (o = -a.minY / e, h = a.minX / t); 66314 return { yRatio: s, invertedYRatio: e, zRatio: r, xRatio: t, invertedXRatio: i, baseLineInvertedY: o, baseLineY: n, baseLineX: h }; 66315 } }, { key: "getLogSeries", value: function(e) { 66316 var t = this, i = this.w; 66317 return i.globals.seriesLog = e.map(function(a, s) { 66318 return i.config.yaxis[s] && i.config.yaxis[s].logarithmic ? a.map(function(r) { 66319 return r === null ? null : t.getLogVal(i.config.yaxis[s].logBase, r, s); 66320 }) : a; 66321 }), i.globals.invalidLogScale ? e : i.globals.seriesLog; 66322 } }, { key: "getBaseLog", value: function(e, t) { 66323 return Math.log(t) / Math.log(e); 66324 } }, { key: "getLogVal", value: function(e, t, i) { 66325 if (t === 0) 66326 return 0; 66327 var a = this.w, s = a.globals.minYArr[i] === 0 ? -1 : this.getBaseLog(e, a.globals.minYArr[i]), r = (a.globals.maxYArr[i] === 0 ? 0 : this.getBaseLog(e, a.globals.maxYArr[i])) - s; 66328 return t < 1 ? t / r : (this.getBaseLog(e, t) - s) / r; 66329 } }, { key: "getLogYRatios", value: function(e) { 66330 var t = this, i = this.w, a = this.w.globals; 66331 return a.yLogRatio = e.slice(), a.logYRange = a.yRange.map(function(s, r) { 66332 if (i.config.yaxis[r] && t.w.config.yaxis[r].logarithmic) { 66333 var n, o = -Number.MAX_VALUE, h = Number.MIN_VALUE; 66334 return a.seriesLog.forEach(function(c, d) { 66335 c.forEach(function(g) { 66336 i.config.yaxis[d] && i.config.yaxis[d].logarithmic && (o = Math.max(g, o), h = Math.min(g, h)); 66337 }); 66338 }), n = Math.pow(a.yRange[r], Math.abs(h - o) / a.yRange[r]), a.yLogRatio[r] = n / a.gridHeight, n; 66339 } 66340 }), a.invalidLogScale ? e.slice() : a.yLogRatio; 66341 } }], [{ key: "checkComboSeries", value: function(e) { 66342 var t = !1, i = 0, a = 0; 66343 return e.length && e[0].type !== void 0 && e.forEach(function(s) { 66344 s.type !== "bar" && s.type !== "column" && s.type !== "candlestick" && s.type !== "boxPlot" || i++, s.type !== void 0 && a++; 66345 }), a > 0 && (t = !0), { comboBarCount: i, comboCharts: t }; 66346 } }, { key: "extendArrayProps", value: function(e, t, i) { 66347 return t.yaxis && (t = e.extendYAxis(t, i)), t.annotations && (t.annotations.yaxis && (t = e.extendYAxisAnnotations(t)), t.annotations.xaxis && (t = e.extendXAxisAnnotations(t)), t.annotations.points && (t = e.extendPointAnnotations(t))), t; 66348 } }]), y; 66349 }(), ve = function() { 66350 function y(e) { 66351 F(this, y), this.w = e.w, this.annoCtx = e; 66352 } 66353 return Y(y, [{ key: "setOrientations", value: function(e) { 66354 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, i = this.w; 66355 if (e.label.orientation === "vertical") { 66356 var a = t !== null ? t : 0, s = i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a, "']")); 66357 if (s !== null) { 66358 var r = s.getBoundingClientRect(); 66359 s.setAttribute("x", parseFloat(s.getAttribute("x")) - r.height + 4), e.label.position === "top" ? s.setAttribute("y", parseFloat(s.getAttribute("y")) + r.width) : s.setAttribute("y", parseFloat(s.getAttribute("y")) - r.width); 66360 var n = this.annoCtx.graphics.rotateAroundCenter(s), o = n.x, h = n.y; 66361 s.setAttribute("transform", "rotate(-90 ".concat(o, " ").concat(h, ")")); 66362 } 66363 } 66364 } }, { key: "addBackgroundToAnno", value: function(e, t) { 66365 var i = this.w; 66366 if (!e || t.label.text === void 0 || t.label.text !== void 0 && !String(t.label.text).trim()) 66367 return null; 66368 var a = i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(), s = e.getBoundingClientRect(), r = t.label.style.padding.left, n = t.label.style.padding.right, o = t.label.style.padding.top, h = t.label.style.padding.bottom; 66369 t.label.orientation === "vertical" && (o = t.label.style.padding.left, h = t.label.style.padding.right, r = t.label.style.padding.top, n = t.label.style.padding.bottom); 66370 var c = s.left - a.left - r, d = s.top - a.top - o, g = this.annoCtx.graphics.drawRect(c - i.globals.barPadForNumericAxis, d, s.width + r + n, s.height + o + h, t.label.borderRadius, t.label.style.background, 1, t.label.borderWidth, t.label.borderColor, 0); 66371 return t.id && g.node.classList.add(t.id), g; 66372 } }, { key: "annotationsBackground", value: function() { 66373 var e = this, t = this.w, i = function(a, s, r) { 66374 var n = t.globals.dom.baseEl.querySelector(".apexcharts-".concat(r, "-annotations .apexcharts-").concat(r, "-annotation-label[rel='").concat(s, "']")); 66375 if (n) { 66376 var o = n.parentNode, h = e.addBackgroundToAnno(n, a); 66377 h && (o.insertBefore(h.node, n), a.label.mouseEnter && h.node.addEventListener("mouseenter", a.label.mouseEnter.bind(e, a)), a.label.mouseLeave && h.node.addEventListener("mouseleave", a.label.mouseLeave.bind(e, a)), a.label.click && h.node.addEventListener("click", a.label.click.bind(e, a))); 66378 } 66379 }; 66380 t.config.annotations.xaxis.map(function(a, s) { 66381 i(a, s, "xaxis"); 66382 }), t.config.annotations.yaxis.map(function(a, s) { 66383 i(a, s, "yaxis"); 66384 }), t.config.annotations.points.map(function(a, s) { 66385 i(a, s, "point"); 66386 }); 66387 } }, { key: "getY1Y2", value: function(e, t) { 66388 var i, a = e === "y1" ? t.y : t.y2, s = this.w; 66389 if (this.annoCtx.invertAxis) { 66390 var r = s.globals.labels.indexOf(a); 66391 s.config.xaxis.convertedCatToNumeric && (r = s.globals.categoryLabels.indexOf(a)); 66392 var n = s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(" + (r + 1) + ")"); 66393 n && (i = parseFloat(n.getAttribute("y"))), t.seriesIndex !== void 0 && s.globals.barHeight && (i = i - s.globals.barHeight / 2 * (s.globals.series.length - 1) + s.globals.barHeight * t.seriesIndex); 66394 } else { 66395 var o; 66396 s.config.yaxis[t.yAxisIndex].logarithmic ? o = (a = new q(this.annoCtx.ctx).getLogVal(a, t.yAxisIndex)) / s.globals.yLogRatio[t.yAxisIndex] : o = (a - s.globals.minYArr[t.yAxisIndex]) / (s.globals.yRange[t.yAxisIndex] / s.globals.gridHeight), i = s.globals.gridHeight - o, !t.marker || t.y !== void 0 && t.y !== null || (i = 0), s.config.yaxis[t.yAxisIndex] && s.config.yaxis[t.yAxisIndex].reversed && (i = o); 66397 } 66398 return typeof a == "string" && a.indexOf("px") > -1 && (i = parseFloat(a)), i; 66399 } }, { key: "getX1X2", value: function(e, t) { 66400 var i = this.w, a = this.annoCtx.invertAxis ? i.globals.minY : i.globals.minX, s = this.annoCtx.invertAxis ? i.globals.maxY : i.globals.maxX, r = this.annoCtx.invertAxis ? i.globals.yRange[0] : i.globals.xRange, n = (t.x - a) / (r / i.globals.gridWidth); 66401 this.annoCtx.inversedReversedAxis && (n = (s - t.x) / (r / i.globals.gridWidth)), i.config.xaxis.type !== "category" && !i.config.xaxis.convertedCatToNumeric || this.annoCtx.invertAxis || i.globals.dataFormatXNumeric || (n = this.getStringX(t.x)); 66402 var o = (t.x2 - a) / (r / i.globals.gridWidth); 66403 return this.annoCtx.inversedReversedAxis && (o = (s - t.x2) / (r / i.globals.gridWidth)), i.config.xaxis.type !== "category" && !i.config.xaxis.convertedCatToNumeric || this.annoCtx.invertAxis || i.globals.dataFormatXNumeric || (o = this.getStringX(t.x2)), t.x !== void 0 && t.x !== null || !t.marker || (n = i.globals.gridWidth), e === "x1" && typeof t.x == "string" && t.x.indexOf("px") > -1 && (n = parseFloat(t.x)), e === "x2" && typeof t.x2 == "string" && t.x2.indexOf("px") > -1 && (o = parseFloat(t.x2)), t.seriesIndex !== void 0 && i.globals.barWidth && !this.annoCtx.invertAxis && (n = n - i.globals.barWidth / 2 * (i.globals.series.length - 1) + i.globals.barWidth * t.seriesIndex), e === "x1" ? n : o; 66404 } }, { key: "getStringX", value: function(e) { 66405 var t = this.w, i = e; 66406 t.config.xaxis.convertedCatToNumeric && t.globals.categoryLabels.length && (e = t.globals.categoryLabels.indexOf(e) + 1); 66407 var a = t.globals.labels.indexOf(e), s = t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(" + (a + 1) + ")"); 66408 return s && (i = parseFloat(s.getAttribute("x"))), i; 66409 } }]), y; 66410 }(), Oe = function() { 66411 function y(e) { 66412 F(this, y), this.w = e.w, this.annoCtx = e, this.invertAxis = this.annoCtx.invertAxis, this.helpers = new ve(this.annoCtx); 66413 } 66414 return Y(y, [{ key: "addXaxisAnnotation", value: function(e, t, i) { 66415 var a, s = this.w, r = this.helpers.getX1X2("x1", e), n = e.label.text, o = e.strokeDashArray; 66416 if (P.isNumber(r)) { 66417 if (e.x2 === null || e.x2 === void 0) { 66418 var h = this.annoCtx.graphics.drawLine(r + e.offsetX, 0 + e.offsetY, r + e.offsetX, s.globals.gridHeight + e.offsetY, e.borderColor, o, e.borderWidth); 66419 t.appendChild(h.node), e.id && h.node.classList.add(e.id); 66420 } else { 66421 if ((a = this.helpers.getX1X2("x2", e)) < r) { 66422 var c = r; 66423 r = a, a = c; 66424 } 66425 var d = this.annoCtx.graphics.drawRect(r + e.offsetX, 0 + e.offsetY, a - r, s.globals.gridHeight + e.offsetY, 0, e.fillColor, e.opacity, 1, e.borderColor, o); 66426 d.node.classList.add("apexcharts-annotation-rect"), d.attr("clip-path", "url(#gridRectMask".concat(s.globals.cuid, ")")), t.appendChild(d.node), e.id && d.node.classList.add(e.id); 66427 } 66428 var g = this.annoCtx.graphics.getTextRects(n, parseFloat(e.label.style.fontSize)), p = e.label.position === "top" ? 4 : e.label.position === "center" ? s.globals.gridHeight / 2 + (e.label.orientation === "vertical" ? g.width / 2 : 0) : s.globals.gridHeight, f = this.annoCtx.graphics.drawText({ x: r + e.label.offsetX, y: p + e.label.offsetY - (e.label.orientation === "vertical" ? e.label.position === "top" ? g.width / 2 - 12 : -g.width / 2 : 0), text: n, textAnchor: e.label.textAnchor, fontSize: e.label.style.fontSize, fontFamily: e.label.style.fontFamily, fontWeight: e.label.style.fontWeight, foreColor: e.label.style.color, cssClass: "apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass, " ").concat(e.id ? e.id : "") }); 66429 f.attr({ rel: i }), t.appendChild(f.node), this.annoCtx.helpers.setOrientations(e, i); 66430 } 66431 } }, { key: "drawXAxisAnnotations", value: function() { 66432 var e = this, t = this.w, i = this.annoCtx.graphics.group({ class: "apexcharts-xaxis-annotations" }); 66433 return t.config.annotations.xaxis.map(function(a, s) { 66434 e.addXaxisAnnotation(a, i.node, s); 66435 }), i; 66436 } }]), y; 66437 }(), He = function() { 66438 function y(e) { 66439 F(this, y), this.w = e.w, this.annoCtx = e, this.helpers = new ve(this.annoCtx); 66440 } 66441 return Y(y, [{ key: "addYaxisAnnotation", value: function(e, t, i) { 66442 var a, s = this.w, r = e.strokeDashArray, n = this.helpers.getY1Y2("y1", e), o = e.label.text; 66443 if (e.y2 === null || e.y2 === void 0) { 66444 var h = this.annoCtx.graphics.drawLine(0 + e.offsetX, n + e.offsetY, this._getYAxisAnnotationWidth(e), n + e.offsetY, e.borderColor, r, e.borderWidth); 66445 t.appendChild(h.node), e.id && h.node.classList.add(e.id); 66446 } else { 66447 if ((a = this.helpers.getY1Y2("y2", e)) > n) { 66448 var c = n; 66449 n = a, a = c; 66450 } 66451 var d = this.annoCtx.graphics.drawRect(0 + e.offsetX, a + e.offsetY, this._getYAxisAnnotationWidth(e), n - a, 0, e.fillColor, e.opacity, 1, e.borderColor, r); 66452 d.node.classList.add("apexcharts-annotation-rect"), d.attr("clip-path", "url(#gridRectMask".concat(s.globals.cuid, ")")), t.appendChild(d.node), e.id && d.node.classList.add(e.id); 66453 } 66454 var g = e.label.position === "right" ? s.globals.gridWidth : e.label.position === "center" ? s.globals.gridWidth / 2 : 0, p = this.annoCtx.graphics.drawText({ x: g + e.label.offsetX, y: (a ?? n) + e.label.offsetY - 3, text: o, textAnchor: e.label.textAnchor, fontSize: e.label.style.fontSize, fontFamily: e.label.style.fontFamily, fontWeight: e.label.style.fontWeight, foreColor: e.label.style.color, cssClass: "apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass, " ").concat(e.id ? e.id : "") }); 66455 p.attr({ rel: i }), t.appendChild(p.node); 66456 } }, { key: "_getYAxisAnnotationWidth", value: function(e) { 66457 var t = this.w; 66458 return t.globals.gridWidth, (e.width.indexOf("%") > -1 ? t.globals.gridWidth * parseInt(e.width, 10) / 100 : parseInt(e.width, 10)) + e.offsetX; 66459 } }, { key: "drawYAxisAnnotations", value: function() { 66460 var e = this, t = this.w, i = this.annoCtx.graphics.group({ class: "apexcharts-yaxis-annotations" }); 66461 return t.config.annotations.yaxis.map(function(a, s) { 66462 e.addYaxisAnnotation(a, i.node, s); 66463 }), i; 66464 } }]), y; 66465 }(), pe = function() { 66466 function y(e) { 66467 F(this, y), this.w = e.w, this.annoCtx = e, this.helpers = new ve(this.annoCtx); 66468 } 66469 return Y(y, [{ key: "addPointAnnotation", value: function(e, t, i) { 66470 this.w; 66471 var a = this.helpers.getX1X2("x1", e), s = this.helpers.getY1Y2("y1", e); 66472 if (P.isNumber(a)) { 66473 var r = { pSize: e.marker.size, pointStrokeWidth: e.marker.strokeWidth, pointFillColor: e.marker.fillColor, pointStrokeColor: e.marker.strokeColor, shape: e.marker.shape, pRadius: e.marker.radius, class: "apexcharts-point-annotation-marker ".concat(e.marker.cssClass, " ").concat(e.id ? e.id : "") }, n = this.annoCtx.graphics.drawMarker(a + e.marker.offsetX, s + e.marker.offsetY, r); 66474 t.appendChild(n.node); 66475 var o = e.label.text ? e.label.text : "", h = this.annoCtx.graphics.drawText({ x: a + e.label.offsetX, y: s + e.label.offsetY - e.marker.size - parseFloat(e.label.style.fontSize) / 1.6, text: o, textAnchor: e.label.textAnchor, fontSize: e.label.style.fontSize, fontFamily: e.label.style.fontFamily, fontWeight: e.label.style.fontWeight, foreColor: e.label.style.color, cssClass: "apexcharts-point-annotation-label ".concat(e.label.style.cssClass, " ").concat(e.id ? e.id : "") }); 66476 if (h.attr({ rel: i }), t.appendChild(h.node), e.customSVG.SVG) { 66477 var c = this.annoCtx.graphics.group({ class: "apexcharts-point-annotations-custom-svg " + e.customSVG.cssClass }); 66478 c.attr({ transform: "translate(".concat(a + e.customSVG.offsetX, ", ").concat(s + e.customSVG.offsetY, ")") }), c.node.innerHTML = e.customSVG.SVG, t.appendChild(c.node); 66479 } 66480 if (e.image.path) { 66481 var d = e.image.width ? e.image.width : 20, g = e.image.height ? e.image.height : 20; 66482 n = this.annoCtx.addImage({ x: a + e.image.offsetX - d / 2, y: s + e.image.offsetY - g / 2, width: d, height: g, path: e.image.path, appendTo: ".apexcharts-point-annotations" }); 66483 } 66484 e.mouseEnter && n.node.addEventListener("mouseenter", e.mouseEnter.bind(this, e)), e.mouseLeave && n.node.addEventListener("mouseleave", e.mouseLeave.bind(this, e)), e.click && n.node.addEventListener("click", e.click.bind(this, e)); 66485 } 66486 } }, { key: "drawPointAnnotations", value: function() { 66487 var e = this, t = this.w, i = this.annoCtx.graphics.group({ class: "apexcharts-point-annotations" }); 66488 return t.config.annotations.points.map(function(a, s) { 66489 e.addPointAnnotation(a, i.node, s); 66490 }), i; 66491 } }]), y; 66492 }(), H = { name: "en", options: { months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], toolbar: { exportToSVG: "Download SVG", exportToPNG: "Download PNG", exportToCSV: "Download CSV", menu: "Menu", selection: "Selection", selectionZoom: "Selection Zoom", zoomIn: "Zoom In", zoomOut: "Zoom Out", pan: "Panning", reset: "Reset Zoom" } } }, G = function() { 66493 function y() { 66494 F(this, y), this.yAxis = { show: !0, showAlways: !1, showForNullSeries: !0, seriesName: void 0, opposite: !1, reversed: !1, logarithmic: !1, logBase: 10, tickAmount: void 0, stepSize: void 0, forceNiceScale: !1, max: void 0, min: void 0, floating: !1, decimalsInFloat: void 0, labels: { show: !0, minWidth: 0, maxWidth: 160, offsetX: 0, offsetY: 0, align: void 0, rotate: 0, padding: 20, style: { colors: [], fontSize: "11px", fontWeight: 400, fontFamily: void 0, cssClass: "" }, formatter: void 0 }, axisBorder: { show: !1, color: "#e0e0e0", width: 1, offsetX: 0, offsetY: 0 }, axisTicks: { show: !1, color: "#e0e0e0", width: 6, offsetX: 0, offsetY: 0 }, title: { text: void 0, rotate: -90, offsetY: 0, offsetX: 0, style: { color: void 0, fontSize: "11px", fontWeight: 900, fontFamily: void 0, cssClass: "" } }, tooltip: { enabled: !1, offsetX: 0 }, crosshairs: { show: !0, position: "front", stroke: { color: "#b6b6b6", width: 1, dashArray: 0 } } }, this.pointAnnotation = { id: void 0, x: 0, y: null, yAxisIndex: 0, seriesIndex: void 0, mouseEnter: void 0, mouseLeave: void 0, click: void 0, marker: { size: 4, fillColor: "#fff", strokeWidth: 2, strokeColor: "#333", shape: "circle", offsetX: 0, offsetY: 0, radius: 2, cssClass: "" }, label: { borderColor: "#c2c2c2", borderWidth: 1, borderRadius: 2, text: void 0, textAnchor: "middle", offsetX: 0, offsetY: 0, mouseEnter: void 0, mouseLeave: void 0, click: void 0, style: { background: "#fff", color: void 0, fontSize: "11px", fontFamily: void 0, fontWeight: 400, cssClass: "", padding: { left: 5, right: 5, top: 2, bottom: 2 } } }, customSVG: { SVG: void 0, cssClass: void 0, offsetX: 0, offsetY: 0 }, image: { path: void 0, width: 20, height: 20, offsetX: 0, offsetY: 0 } }, this.yAxisAnnotation = { id: void 0, y: 0, y2: null, strokeDashArray: 1, fillColor: "#c2c2c2", borderColor: "#c2c2c2", borderWidth: 1, opacity: 0.3, offsetX: 0, offsetY: 0, width: "100%", yAxisIndex: 0, label: { borderColor: "#c2c2c2", borderWidth: 1, borderRadius: 2, text: void 0, textAnchor: "end", position: "right", offsetX: 0, offsetY: -3, mouseEnter: void 0, mouseLeave: void 0, click: void 0, style: { background: "#fff", color: void 0, fontSize: "11px", fontFamily: void 0, fontWeight: 400, cssClass: "", padding: { left: 5, right: 5, top: 2, bottom: 2 } } } }, this.xAxisAnnotation = { id: void 0, x: 0, x2: null, strokeDashArray: 1, fillColor: "#c2c2c2", borderColor: "#c2c2c2", borderWidth: 1, opacity: 0.3, offsetX: 0, offsetY: 0, label: { borderColor: "#c2c2c2", borderWidth: 1, borderRadius: 2, text: void 0, textAnchor: "middle", orientation: "vertical", position: "top", offsetX: 0, offsetY: 0, mouseEnter: void 0, mouseLeave: void 0, click: void 0, style: { background: "#fff", color: void 0, fontSize: "11px", fontFamily: void 0, fontWeight: 400, cssClass: "", padding: { left: 5, right: 5, top: 2, bottom: 2 } } } }, this.text = { x: 0, y: 0, text: "", textAnchor: "start", foreColor: void 0, fontSize: "13px", fontFamily: void 0, fontWeight: 400, appendTo: ".apexcharts-annotations", backgroundColor: "transparent", borderColor: "#c2c2c2", borderRadius: 0, borderWidth: 0, paddingLeft: 4, paddingRight: 4, paddingTop: 2, paddingBottom: 2 }; 66495 } 66496 return Y(y, [{ key: "init", value: function() { 66497 return { annotations: { yaxis: [this.yAxisAnnotation], xaxis: [this.xAxisAnnotation], points: [this.pointAnnotation], texts: [], images: [], shapes: [] }, chart: { animations: { enabled: !0, easing: "easeinout", speed: 800, animateGradually: { delay: 150, enabled: !0 }, dynamicAnimation: { enabled: !0, speed: 350 } }, background: "transparent", locales: [H], defaultLocale: "en", dropShadow: { enabled: !1, enabledOnSeries: void 0, top: 2, left: 2, blur: 4, color: "#000", opacity: 0.35 }, events: { animationEnd: void 0, beforeMount: void 0, mounted: void 0, updated: void 0, click: void 0, mouseMove: void 0, mouseLeave: void 0, xAxisLabelClick: void 0, legendClick: void 0, markerClick: void 0, selection: void 0, dataPointSelection: void 0, dataPointMouseEnter: void 0, dataPointMouseLeave: void 0, beforeZoom: void 0, beforeResetZoom: void 0, zoomed: void 0, scrolled: void 0, brushScrolled: void 0 }, foreColor: "#373d3f", fontFamily: "Helvetica, Arial, sans-serif", height: "auto", parentHeightOffset: 15, redrawOnParentResize: !0, redrawOnWindowResize: !0, id: void 0, group: void 0, nonce: void 0, offsetX: 0, offsetY: 0, selection: { enabled: !1, type: "x", fill: { color: "#24292e", opacity: 0.1 }, stroke: { width: 1, color: "#24292e", opacity: 0.4, dashArray: 3 }, xaxis: { min: void 0, max: void 0 }, yaxis: { min: void 0, max: void 0 } }, sparkline: { enabled: !1 }, brush: { enabled: !1, autoScaleYaxis: !0, target: void 0, targets: void 0 }, stacked: !1, stackOnlyBar: !0, stackType: "normal", toolbar: { show: !0, offsetX: 0, offsetY: 0, tools: { download: !0, selection: !0, zoom: !0, zoomin: !0, zoomout: !0, pan: !0, reset: !0, customIcons: [] }, export: { csv: { filename: void 0, columnDelimiter: ",", headerCategory: "category", headerValue: "value", dateFormatter: function(e) { 66498 return new Date(e).toDateString(); 66499 } }, png: { filename: void 0 }, svg: { filename: void 0 } }, autoSelected: "zoom" }, type: "line", width: "100%", zoom: { enabled: !0, type: "x", autoScaleYaxis: !1, zoomedArea: { fill: { color: "#90CAF9", opacity: 0.4 }, stroke: { color: "#0D47A1", opacity: 0.4, width: 1 } } } }, plotOptions: { area: { fillTo: "origin" }, bar: { horizontal: !1, columnWidth: "70%", barHeight: "70%", distributed: !1, borderRadius: 0, borderRadiusApplication: "around", borderRadiusWhenStacked: "last", rangeBarOverlap: !0, rangeBarGroupRows: !1, hideZeroBarsWhenGrouped: !1, isDumbbell: !1, dumbbellColors: void 0, isFunnel: !1, isFunnel3d: !0, colors: { ranges: [], backgroundBarColors: [], backgroundBarOpacity: 1, backgroundBarRadius: 0 }, dataLabels: { position: "top", maxItems: 100, hideOverflowingLabels: !0, orientation: "horizontal", total: { enabled: !1, formatter: void 0, offsetX: 0, offsetY: 0, style: { color: "#373d3f", fontSize: "12px", fontFamily: void 0, fontWeight: 600 } } } }, bubble: { zScaling: !0, minBubbleRadius: void 0, maxBubbleRadius: void 0 }, candlestick: { colors: { upward: "#00B746", downward: "#EF403C" }, wick: { useFillColor: !0 } }, boxPlot: { colors: { upper: "#00E396", lower: "#008FFB" } }, heatmap: { radius: 2, enableShades: !0, shadeIntensity: 0.5, reverseNegativeShade: !1, distributed: !1, useFillColorAsStroke: !1, colorScale: { inverse: !1, ranges: [], min: void 0, max: void 0 } }, treemap: { enableShades: !0, shadeIntensity: 0.5, distributed: !1, reverseNegativeShade: !1, useFillColorAsStroke: !1, borderRadius: 4, dataLabels: { format: "scale" }, colorScale: { inverse: !1, ranges: [], min: void 0, max: void 0 } }, radialBar: { inverseOrder: !1, startAngle: 0, endAngle: 360, offsetX: 0, offsetY: 0, hollow: { margin: 5, size: "50%", background: "transparent", image: void 0, imageWidth: 150, imageHeight: 150, imageOffsetX: 0, imageOffsetY: 0, imageClipped: !0, position: "front", dropShadow: { enabled: !1, top: 0, left: 0, blur: 3, color: "#000", opacity: 0.5 } }, track: { show: !0, startAngle: void 0, endAngle: void 0, background: "#f2f2f2", strokeWidth: "97%", opacity: 1, margin: 5, dropShadow: { enabled: !1, top: 0, left: 0, blur: 3, color: "#000", opacity: 0.5 } }, dataLabels: { show: !0, name: { show: !0, fontSize: "16px", fontFamily: void 0, fontWeight: 600, color: void 0, offsetY: 0, formatter: function(e) { 66500 return e; 66501 } }, value: { show: !0, fontSize: "14px", fontFamily: void 0, fontWeight: 400, color: void 0, offsetY: 16, formatter: function(e) { 66502 return e + "%"; 66503 } }, total: { show: !1, label: "Total", fontSize: "16px", fontWeight: 600, fontFamily: void 0, color: void 0, formatter: function(e) { 66504 return e.globals.seriesTotals.reduce(function(t, i) { 66505 return t + i; 66506 }, 0) / e.globals.series.length + "%"; 66507 } } }, barLabels: { enabled: !1, margin: 5, useSeriesColors: !0, fontFamily: void 0, fontWeight: 600, fontSize: "16px", formatter: function(e) { 66508 return e; 66509 }, onClick: void 0 } }, pie: { customScale: 1, offsetX: 0, offsetY: 0, startAngle: 0, endAngle: 360, expandOnClick: !0, dataLabels: { offset: 0, minAngleToShowLabel: 10 }, donut: { size: "65%", background: "transparent", labels: { show: !1, name: { show: !0, fontSize: "16px", fontFamily: void 0, fontWeight: 600, color: void 0, offsetY: -10, formatter: function(e) { 66510 return e; 66511 } }, value: { show: !0, fontSize: "20px", fontFamily: void 0, fontWeight: 400, color: void 0, offsetY: 10, formatter: function(e) { 66512 return e; 66513 } }, total: { show: !1, showAlways: !1, label: "Total", fontSize: "16px", fontWeight: 400, fontFamily: void 0, color: void 0, formatter: function(e) { 66514 return e.globals.seriesTotals.reduce(function(t, i) { 66515 return t + i; 66516 }, 0); 66517 } } } } }, polarArea: { rings: { strokeWidth: 1, strokeColor: "#e8e8e8" }, spokes: { strokeWidth: 1, connectorColors: "#e8e8e8" } }, radar: { size: void 0, offsetX: 0, offsetY: 0, polygons: { strokeWidth: 1, strokeColors: "#e8e8e8", connectorColors: "#e8e8e8", fill: { colors: void 0 } } } }, colors: void 0, dataLabels: { enabled: !0, enabledOnSeries: void 0, formatter: function(e) { 66518 return e !== null ? e : ""; 66519 }, textAnchor: "middle", distributed: !1, offsetX: 0, offsetY: 0, style: { fontSize: "12px", fontFamily: void 0, fontWeight: 600, colors: void 0 }, background: { enabled: !0, foreColor: "#fff", borderRadius: 2, padding: 4, opacity: 0.9, borderWidth: 1, borderColor: "#fff", dropShadow: { enabled: !1, top: 1, left: 1, blur: 1, color: "#000", opacity: 0.45 } }, dropShadow: { enabled: !1, top: 1, left: 1, blur: 1, color: "#000", opacity: 0.45 } }, fill: { type: "solid", colors: void 0, opacity: 0.85, gradient: { shade: "dark", type: "horizontal", shadeIntensity: 0.5, gradientToColors: void 0, inverseColors: !0, opacityFrom: 1, opacityTo: 1, stops: [0, 50, 100], colorStops: [] }, image: { src: [], width: void 0, height: void 0 }, pattern: { style: "squares", width: 6, height: 6, strokeWidth: 2 } }, forecastDataPoints: { count: 0, fillOpacity: 0.5, strokeWidth: void 0, dashArray: 4 }, grid: { show: !0, borderColor: "#e0e0e0", strokeDashArray: 0, position: "back", xaxis: { lines: { show: !1 } }, yaxis: { lines: { show: !0 } }, row: { colors: void 0, opacity: 0.5 }, column: { colors: void 0, opacity: 0.5 }, padding: { top: 0, right: 10, bottom: 0, left: 12 } }, labels: [], legend: { show: !0, showForSingleSeries: !1, showForNullSeries: !0, showForZeroSeries: !0, floating: !1, position: "bottom", horizontalAlign: "center", inverseOrder: !1, fontSize: "12px", fontFamily: void 0, fontWeight: 400, width: void 0, height: void 0, formatter: void 0, tooltipHoverFormatter: void 0, offsetX: -20, offsetY: 4, customLegendItems: [], labels: { colors: void 0, useSeriesColors: !1 }, markers: { width: 12, height: 12, strokeWidth: 0, fillColors: void 0, strokeColor: "#fff", radius: 12, customHTML: void 0, offsetX: 0, offsetY: 0, onClick: void 0 }, itemMargin: { horizontal: 5, vertical: 2 }, onItemClick: { toggleDataSeries: !0 }, onItemHover: { highlightDataSeries: !0 } }, markers: { discrete: [], size: 0, colors: void 0, strokeColors: "#fff", strokeWidth: 2, strokeOpacity: 0.9, strokeDashArray: 0, fillOpacity: 1, shape: "circle", width: 8, height: 8, radius: 2, offsetX: 0, offsetY: 0, onClick: void 0, onDblClick: void 0, showNullDataPoints: !0, hover: { size: void 0, sizeOffset: 3 } }, noData: { text: void 0, align: "center", verticalAlign: "middle", offsetX: 0, offsetY: 0, style: { color: void 0, fontSize: "14px", fontFamily: void 0 } }, responsive: [], series: void 0, states: { normal: { filter: { type: "none", value: 0 } }, hover: { filter: { type: "lighten", value: 0.1 } }, active: { allowMultipleDataPointsSelection: !1, filter: { type: "darken", value: 0.5 } } }, title: { text: void 0, align: "left", margin: 5, offsetX: 0, offsetY: 0, floating: !1, style: { fontSize: "14px", fontWeight: 900, fontFamily: void 0, color: void 0 } }, subtitle: { text: void 0, align: "left", margin: 5, offsetX: 0, offsetY: 30, floating: !1, style: { fontSize: "12px", fontWeight: 400, fontFamily: void 0, color: void 0 } }, stroke: { show: !0, curve: "smooth", lineCap: "butt", width: 2, colors: void 0, dashArray: 0, fill: { type: "solid", colors: void 0, opacity: 0.85, gradient: { shade: "dark", type: "horizontal", shadeIntensity: 0.5, gradientToColors: void 0, inverseColors: !0, opacityFrom: 1, opacityTo: 1, stops: [0, 50, 100], colorStops: [] } } }, tooltip: { enabled: !0, enabledOnSeries: void 0, shared: !0, hideEmptySeries: !1, followCursor: !1, intersect: !1, inverseOrder: !1, custom: void 0, fillSeriesColor: !1, theme: "light", cssClass: "", style: { fontSize: "12px", fontFamily: void 0 }, onDatasetHover: { highlightDataSeries: !1 }, x: { show: !0, format: "dd MMM", formatter: void 0 }, y: { formatter: void 0, title: { formatter: function(e) { 66520 return e ? e + ": " : ""; 66521 } } }, z: { formatter: void 0, title: "Size: " }, marker: { show: !0, fillColors: void 0 }, items: { display: "flex" }, fixed: { enabled: !1, position: "topRight", offsetX: 0, offsetY: 0 } }, xaxis: { type: "category", categories: [], convertedCatToNumeric: !1, offsetX: 0, offsetY: 0, overwriteCategories: void 0, labels: { show: !0, rotate: -45, rotateAlways: !1, hideOverlappingLabels: !0, trim: !1, minHeight: void 0, maxHeight: 120, showDuplicates: !0, style: { colors: [], fontSize: "12px", fontWeight: 400, fontFamily: void 0, cssClass: "" }, offsetX: 0, offsetY: 0, format: void 0, formatter: void 0, datetimeUTC: !0, datetimeFormatter: { year: "yyyy", month: "MMM 'yy", day: "dd MMM", hour: "HH:mm", minute: "HH:mm:ss", second: "HH:mm:ss" } }, group: { groups: [], style: { colors: [], fontSize: "12px", fontWeight: 400, fontFamily: void 0, cssClass: "" } }, axisBorder: { show: !0, color: "#e0e0e0", width: "100%", height: 1, offsetX: 0, offsetY: 0 }, axisTicks: { show: !0, color: "#e0e0e0", height: 6, offsetX: 0, offsetY: 0 }, stepSize: void 0, tickAmount: void 0, tickPlacement: "on", min: void 0, max: void 0, range: void 0, floating: !1, decimalsInFloat: void 0, position: "bottom", title: { text: void 0, offsetX: 0, offsetY: 0, style: { color: void 0, fontSize: "12px", fontWeight: 900, fontFamily: void 0, cssClass: "" } }, crosshairs: { show: !0, width: 1, position: "back", opacity: 0.9, stroke: { color: "#b6b6b6", width: 1, dashArray: 3 }, fill: { type: "solid", color: "#B1B9C4", gradient: { colorFrom: "#D8E3F0", colorTo: "#BED1E6", stops: [0, 100], opacityFrom: 0.4, opacityTo: 0.5 } }, dropShadow: { enabled: !1, left: 0, top: 0, blur: 1, opacity: 0.4 } }, tooltip: { enabled: !0, offsetY: 0, formatter: void 0, style: { fontSize: "12px", fontFamily: void 0 } } }, yaxis: this.yAxis, theme: { mode: "light", palette: "palette1", monochrome: { enabled: !1, color: "#008FFB", shadeTo: "light", shadeIntensity: 0.65 } } }; 66522 } }]), y; 66523 }(), ie = function() { 66524 function y(e) { 66525 F(this, y), this.ctx = e, this.w = e.w, this.graphics = new M(this.ctx), this.w.globals.isBarHorizontal && (this.invertAxis = !0), this.helpers = new ve(this), this.xAxisAnnotations = new Oe(this), this.yAxisAnnotations = new He(this), this.pointsAnnotations = new pe(this), this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed && (this.inversedReversedAxis = !0), this.xDivision = this.w.globals.gridWidth / this.w.globals.dataPoints; 66526 } 66527 return Y(y, [{ key: "drawAxesAnnotations", value: function() { 66528 var e = this.w; 66529 if (e.globals.axisCharts) { 66530 for (var t = this.yAxisAnnotations.drawYAxisAnnotations(), i = this.xAxisAnnotations.drawXAxisAnnotations(), a = this.pointsAnnotations.drawPointAnnotations(), s = e.config.chart.animations.enabled, r = [t, i, a], n = [i.node, t.node, a.node], o = 0; o < 3; o++) 66531 e.globals.dom.elGraphical.add(r[o]), !s || e.globals.resized || e.globals.dataChanged || e.config.chart.type !== "scatter" && e.config.chart.type !== "bubble" && e.globals.dataPoints > 1 && n[o].classList.add("apexcharts-element-hidden"), e.globals.delayedElements.push({ el: n[o], index: 0 }); 66532 this.helpers.annotationsBackground(); 66533 } 66534 } }, { key: "drawImageAnnos", value: function() { 66535 var e = this; 66536 this.w.config.annotations.images.map(function(t, i) { 66537 e.addImage(t, i); 66538 }); 66539 } }, { key: "drawTextAnnos", value: function() { 66540 var e = this; 66541 this.w.config.annotations.texts.map(function(t, i) { 66542 e.addText(t, i); 66543 }); 66544 } }, { key: "addXaxisAnnotation", value: function(e, t, i) { 66545 this.xAxisAnnotations.addXaxisAnnotation(e, t, i); 66546 } }, { key: "addYaxisAnnotation", value: function(e, t, i) { 66547 this.yAxisAnnotations.addYaxisAnnotation(e, t, i); 66548 } }, { key: "addPointAnnotation", value: function(e, t, i) { 66549 this.pointsAnnotations.addPointAnnotation(e, t, i); 66550 } }, { key: "addText", value: function(e, t) { 66551 var i = e.x, a = e.y, s = e.text, r = e.textAnchor, n = e.foreColor, o = e.fontSize, h = e.fontFamily, c = e.fontWeight, d = e.cssClass, g = e.backgroundColor, p = e.borderWidth, f = e.strokeDashArray, b = e.borderRadius, m = e.borderColor, w = e.appendTo, A = w === void 0 ? ".apexcharts-svg" : w, l = e.paddingLeft, u = l === void 0 ? 4 : l, x = e.paddingRight, v = x === void 0 ? 4 : x, k = e.paddingBottom, S = k === void 0 ? 2 : k, C = e.paddingTop, L = C === void 0 ? 2 : C, I = this.w, z = this.graphics.drawText({ x: i, y: a, text: s, textAnchor: r || "start", fontSize: o || "12px", fontWeight: c || "regular", fontFamily: h || I.config.chart.fontFamily, foreColor: n || I.config.chart.foreColor, cssClass: d }), T = I.globals.dom.baseEl.querySelector(A); 66552 T && T.appendChild(z.node); 66553 var E = z.bbox(); 66554 if (s) { 66555 var R = this.graphics.drawRect(E.x - u, E.y - L, E.width + u + v, E.height + S + L, b, g || "transparent", 1, p, m, f); 66556 T.insertBefore(R.node, z.node); 66557 } 66558 } }, { key: "addImage", value: function(e, t) { 66559 var i = this.w, a = e.path, s = e.x, r = s === void 0 ? 0 : s, n = e.y, o = n === void 0 ? 0 : n, h = e.width, c = h === void 0 ? 20 : h, d = e.height, g = d === void 0 ? 20 : d, p = e.appendTo, f = p === void 0 ? ".apexcharts-svg" : p, b = i.globals.dom.Paper.image(a); 66560 b.size(c, g).move(r, o); 66561 var m = i.globals.dom.baseEl.querySelector(f); 66562 return m && m.appendChild(b.node), b; 66563 } }, { key: "addXaxisAnnotationExternal", value: function(e, t, i) { 66564 return this.addAnnotationExternal({ params: e, pushToMemory: t, context: i, type: "xaxis", contextMethod: i.addXaxisAnnotation }), i; 66565 } }, { key: "addYaxisAnnotationExternal", value: function(e, t, i) { 66566 return this.addAnnotationExternal({ params: e, pushToMemory: t, context: i, type: "yaxis", contextMethod: i.addYaxisAnnotation }), i; 66567 } }, { key: "addPointAnnotationExternal", value: function(e, t, i) { 66568 return this.invertAxis === void 0 && (this.invertAxis = i.w.globals.isBarHorizontal), this.addAnnotationExternal({ params: e, pushToMemory: t, context: i, type: "point", contextMethod: i.addPointAnnotation }), i; 66569 } }, { key: "addAnnotationExternal", value: function(e) { 66570 var t = e.params, i = e.pushToMemory, a = e.context, s = e.type, r = e.contextMethod, n = a, o = n.w, h = o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s, "-annotations")), c = h.childNodes.length + 1, d = new G(), g = Object.assign({}, s === "xaxis" ? d.xAxisAnnotation : s === "yaxis" ? d.yAxisAnnotation : d.pointAnnotation), p = P.extend(g, t); 66571 switch (s) { 66572 case "xaxis": 66573 this.addXaxisAnnotation(p, h, c); 66574 break; 66575 case "yaxis": 66576 this.addYaxisAnnotation(p, h, c); 66577 break; 66578 case "point": 66579 this.addPointAnnotation(p, h, c); 66580 } 66581 var f = o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s, "-annotations .apexcharts-").concat(s, "-annotation-label[rel='").concat(c, "']")), b = this.helpers.addBackgroundToAnno(f, p); 66582 return b && h.insertBefore(b.node, f), i && o.globals.memory.methodsToExec.push({ context: n, id: p.id ? p.id : P.randomId(), method: r, label: "addAnnotation", params: t }), a; 66583 } }, { key: "clearAnnotations", value: function(e) { 66584 var t = e.w, i = t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"); 66585 t.globals.memory.methodsToExec.map(function(a, s) { 66586 a.label !== "addText" && a.label !== "addAnnotation" || t.globals.memory.methodsToExec.splice(s, 1); 66587 }), i = P.listToArray(i), Array.prototype.forEach.call(i, function(a) { 66588 for (; a.firstChild; ) 66589 a.removeChild(a.firstChild); 66590 }); 66591 } }, { key: "removeAnnotation", value: function(e, t) { 66592 var i = e.w, a = i.globals.dom.baseEl.querySelectorAll(".".concat(t)); 66593 a && (i.globals.memory.methodsToExec.map(function(s, r) { 66594 s.id === t && i.globals.memory.methodsToExec.splice(r, 1); 66595 }), Array.prototype.forEach.call(a, function(s) { 66596 s.parentElement.removeChild(s); 66597 })); 66598 } }]), y; 66599 }(), B = function() { 66600 function y(e) { 66601 F(this, y), this.ctx = e, this.w = e.w, this.months31 = [1, 3, 5, 7, 8, 10, 12], this.months30 = [2, 4, 6, 9, 11], this.daysCntOfYear = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; 66602 } 66603 return Y(y, [{ key: "isValidDate", value: function(e) { 66604 return typeof e != "number" && !isNaN(this.parseDate(e)); 66605 } }, { key: "getTimeStamp", value: function(e) { 66606 return Date.parse(e) ? this.w.config.xaxis.labels.datetimeUTC ? new Date(new Date(e).toISOString().substr(0, 25)).getTime() : new Date(e).getTime() : e; 66607 } }, { key: "getDate", value: function(e) { 66608 return this.w.config.xaxis.labels.datetimeUTC ? new Date(new Date(e).toUTCString()) : new Date(e); 66609 } }, { key: "parseDate", value: function(e) { 66610 var t = Date.parse(e); 66611 if (!isNaN(t)) 66612 return this.getTimeStamp(e); 66613 var i = Date.parse(e.replace(/-/g, "/").replace(/[a-z]+/gi, " ")); 66614 return i = this.getTimeStamp(i); 66615 } }, { key: "parseDateWithTimezone", value: function(e) { 66616 return Date.parse(e.replace(/-/g, "/").replace(/[a-z]+/gi, " ")); 66617 } }, { key: "formatDate", value: function(e, t) { 66618 var i = this.w.globals.locale, a = this.w.config.xaxis.labels.datetimeUTC, s = ["\0"].concat(J(i.months)), r = ["�"].concat(J(i.shortMonths)), n = ["�"].concat(J(i.days)), o = ["�"].concat(J(i.shortDays)); 66619 function h(S, C) { 66620 var L = S + ""; 66621 for (C = C || 2; L.length < C; ) 66622 L = "0" + L; 66623 return L; 66624 } 66625 var c = a ? e.getUTCFullYear() : e.getFullYear(); 66626 t = (t = (t = t.replace(/(^|[^\\])yyyy+/g, "$1" + c)).replace(/(^|[^\\])yy/g, "$1" + c.toString().substr(2, 2))).replace(/(^|[^\\])y/g, "$1" + c); 66627 var d = (a ? e.getUTCMonth() : e.getMonth()) + 1; 66628 t = (t = (t = (t = t.replace(/(^|[^\\])MMMM+/g, "$1" + s[0])).replace(/(^|[^\\])MMM/g, "$1" + r[0])).replace(/(^|[^\\])MM/g, "$1" + h(d))).replace(/(^|[^\\])M/g, "$1" + d); 66629 var g = a ? e.getUTCDate() : e.getDate(); 66630 t = (t = (t = (t = t.replace(/(^|[^\\])dddd+/g, "$1" + n[0])).replace(/(^|[^\\])ddd/g, "$1" + o[0])).replace(/(^|[^\\])dd/g, "$1" + h(g))).replace(/(^|[^\\])d/g, "$1" + g); 66631 var p = a ? e.getUTCHours() : e.getHours(), f = p > 12 ? p - 12 : p === 0 ? 12 : p; 66632 t = (t = (t = (t = t.replace(/(^|[^\\])HH+/g, "$1" + h(p))).replace(/(^|[^\\])H/g, "$1" + p)).replace(/(^|[^\\])hh+/g, "$1" + h(f))).replace(/(^|[^\\])h/g, "$1" + f); 66633 var b = a ? e.getUTCMinutes() : e.getMinutes(); 66634 t = (t = t.replace(/(^|[^\\])mm+/g, "$1" + h(b))).replace(/(^|[^\\])m/g, "$1" + b); 66635 var m = a ? e.getUTCSeconds() : e.getSeconds(); 66636 t = (t = t.replace(/(^|[^\\])ss+/g, "$1" + h(m))).replace(/(^|[^\\])s/g, "$1" + m); 66637 var w = a ? e.getUTCMilliseconds() : e.getMilliseconds(); 66638 t = t.replace(/(^|[^\\])fff+/g, "$1" + h(w, 3)), w = Math.round(w / 10), t = t.replace(/(^|[^\\])ff/g, "$1" + h(w)), w = Math.round(w / 10); 66639 var A = p < 12 ? "AM" : "PM"; 66640 t = (t = (t = t.replace(/(^|[^\\])f/g, "$1" + w)).replace(/(^|[^\\])TT+/g, "$1" + A)).replace(/(^|[^\\])T/g, "$1" + A.charAt(0)); 66641 var l = A.toLowerCase(); 66642 t = (t = t.replace(/(^|[^\\])tt+/g, "$1" + l)).replace(/(^|[^\\])t/g, "$1" + l.charAt(0)); 66643 var u = -e.getTimezoneOffset(), x = a || !u ? "Z" : u > 0 ? "+" : "-"; 66644 if (!a) { 66645 var v = (u = Math.abs(u)) % 60; 66646 x += h(Math.floor(u / 60)) + ":" + h(v); 66647 } 66648 t = t.replace(/(^|[^\\])K/g, "$1" + x); 66649 var k = (a ? e.getUTCDay() : e.getDay()) + 1; 66650 return t = (t = (t = (t = (t = t.replace(new RegExp(n[0], "g"), n[k])).replace(new RegExp(o[0], "g"), o[k])).replace(new RegExp(s[0], "g"), s[d])).replace(new RegExp(r[0], "g"), r[d])).replace(/\\(.)/g, "$1"); 66651 } }, { key: "getTimeUnitsfromTimestamp", value: function(e, t, i) { 66652 var a = this.w; 66653 a.config.xaxis.min !== void 0 && (e = a.config.xaxis.min), a.config.xaxis.max !== void 0 && (t = a.config.xaxis.max); 66654 var s = this.getDate(e), r = this.getDate(t), n = this.formatDate(s, "yyyy MM dd HH mm ss fff").split(" "), o = this.formatDate(r, "yyyy MM dd HH mm ss fff").split(" "); 66655 return { minMillisecond: parseInt(n[6], 10), maxMillisecond: parseInt(o[6], 10), minSecond: parseInt(n[5], 10), maxSecond: parseInt(o[5], 10), minMinute: parseInt(n[4], 10), maxMinute: parseInt(o[4], 10), minHour: parseInt(n[3], 10), maxHour: parseInt(o[3], 10), minDate: parseInt(n[2], 10), maxDate: parseInt(o[2], 10), minMonth: parseInt(n[1], 10) - 1, maxMonth: parseInt(o[1], 10) - 1, minYear: parseInt(n[0], 10), maxYear: parseInt(o[0], 10) }; 66656 } }, { key: "isLeapYear", value: function(e) { 66657 return e % 4 == 0 && e % 100 != 0 || e % 400 == 0; 66658 } }, { key: "calculcateLastDaysOfMonth", value: function(e, t, i) { 66659 return this.determineDaysOfMonths(e, t) - i; 66660 } }, { key: "determineDaysOfYear", value: function(e) { 66661 var t = 365; 66662 return this.isLeapYear(e) && (t = 366), t; 66663 } }, { key: "determineRemainingDaysOfYear", value: function(e, t, i) { 66664 var a = this.daysCntOfYear[t] + i; 66665 return t > 1 && this.isLeapYear() && a++, a; 66666 } }, { key: "determineDaysOfMonths", value: function(e, t) { 66667 var i = 30; 66668 switch (e = P.monthMod(e), !0) { 66669 case this.months30.indexOf(e) > -1: 66670 e === 2 && (i = this.isLeapYear(t) ? 29 : 28); 66671 break; 66672 case this.months31.indexOf(e) > -1: 66673 default: 66674 i = 31; 66675 } 66676 return i; 66677 } }]), y; 66678 }(), re = function() { 66679 function y(e) { 66680 F(this, y), this.ctx = e, this.w = e.w, this.tooltipKeyFormat = "dd MMM"; 66681 } 66682 return Y(y, [{ key: "xLabelFormat", value: function(e, t, i, a) { 66683 var s = this.w; 66684 if (s.config.xaxis.type === "datetime" && s.config.xaxis.labels.formatter === void 0 && s.config.tooltip.x.formatter === void 0) { 66685 var r = new B(this.ctx); 66686 return r.formatDate(r.getDate(t), s.config.tooltip.x.format); 66687 } 66688 return e(t, i, a); 66689 } }, { key: "defaultGeneralFormatter", value: function(e) { 66690 return Array.isArray(e) ? e.map(function(t) { 66691 return t; 66692 }) : e; 66693 } }, { key: "defaultYFormatter", value: function(e, t, i) { 66694 var a = this.w; 66695 return P.isNumber(e) && (e = a.globals.yValueDecimal !== 0 ? e.toFixed(t.decimalsInFloat !== void 0 ? t.decimalsInFloat : a.globals.yValueDecimal) : a.globals.maxYArr[i] - a.globals.minYArr[i] < 5 ? e.toFixed(1) : e.toFixed(0)), e; 66696 } }, { key: "setLabelFormatters", value: function() { 66697 var e = this, t = this.w; 66698 return t.globals.xaxisTooltipFormatter = function(i) { 66699 return e.defaultGeneralFormatter(i); 66700 }, t.globals.ttKeyFormatter = function(i) { 66701 return e.defaultGeneralFormatter(i); 66702 }, t.globals.ttZFormatter = function(i) { 66703 return i; 66704 }, t.globals.legendFormatter = function(i) { 66705 return e.defaultGeneralFormatter(i); 66706 }, t.config.xaxis.labels.formatter !== void 0 ? t.globals.xLabelFormatter = t.config.xaxis.labels.formatter : t.globals.xLabelFormatter = function(i) { 66707 if (P.isNumber(i)) { 66708 if (!t.config.xaxis.convertedCatToNumeric && t.config.xaxis.type === "numeric") { 66709 if (P.isNumber(t.config.xaxis.decimalsInFloat)) 66710 return i.toFixed(t.config.xaxis.decimalsInFloat); 66711 var a = t.globals.maxX - t.globals.minX; 66712 return a > 0 && a < 100 ? i.toFixed(1) : i.toFixed(0); 66713 } 66714 return t.globals.isBarHorizontal && t.globals.maxY - t.globals.minYArr < 4 ? i.toFixed(1) : i.toFixed(0); 66715 } 66716 return i; 66717 }, typeof t.config.tooltip.x.formatter == "function" ? t.globals.ttKeyFormatter = t.config.tooltip.x.formatter : t.globals.ttKeyFormatter = t.globals.xLabelFormatter, typeof t.config.xaxis.tooltip.formatter == "function" && (t.globals.xaxisTooltipFormatter = t.config.xaxis.tooltip.formatter), (Array.isArray(t.config.tooltip.y) || t.config.tooltip.y.formatter !== void 0) && (t.globals.ttVal = t.config.tooltip.y), t.config.tooltip.z.formatter !== void 0 && (t.globals.ttZFormatter = t.config.tooltip.z.formatter), t.config.legend.formatter !== void 0 && (t.globals.legendFormatter = t.config.legend.formatter), t.config.yaxis.forEach(function(i, a) { 66718 i.labels.formatter !== void 0 ? t.globals.yLabelFormatters[a] = i.labels.formatter : t.globals.yLabelFormatters[a] = function(s) { 66719 return t.globals.xyCharts ? Array.isArray(s) ? s.map(function(r) { 66720 return e.defaultYFormatter(r, i, a); 66721 }) : e.defaultYFormatter(s, i, a) : s; 66722 }; 66723 }), t.globals; 66724 } }, { key: "heatmapLabelFormatters", value: function() { 66725 var e = this.w; 66726 if (e.config.chart.type === "heatmap") { 66727 e.globals.yAxisScale[0].result = e.globals.seriesNames.slice(); 66728 var t = e.globals.seriesNames.reduce(function(i, a) { 66729 return i.length > a.length ? i : a; 66730 }, 0); 66731 e.globals.yAxisScale[0].niceMax = t, e.globals.yAxisScale[0].niceMin = t; 66732 } 66733 } }]), y; 66734 }(), fe = function(y) { 66735 var e, t = y.isTimeline, i = y.ctx, a = y.seriesIndex, s = y.dataPointIndex, r = y.y1, n = y.y2, o = y.w, h = o.globals.seriesRangeStart[a][s], c = o.globals.seriesRangeEnd[a][s], d = o.globals.labels[s], g = o.config.series[a].name ? o.config.series[a].name : "", p = o.globals.ttKeyFormatter, f = o.config.tooltip.y.title.formatter, b = { w: o, seriesIndex: a, dataPointIndex: s, start: h, end: c }; 66736 typeof f == "function" && (g = f(g, b)), (e = o.config.series[a].data[s]) !== null && e !== void 0 && e.x && (d = o.config.series[a].data[s].x), t || o.config.xaxis.type === "datetime" && (d = new re(i).xLabelFormat(o.globals.ttKeyFormatter, d, d, { i: void 0, dateFormatter: new B(i).formatDate, w: o })), typeof p == "function" && (d = p(d, b)), Number.isFinite(r) && Number.isFinite(n) && (h = r, c = n); 66737 var m = "", w = "", A = o.globals.colors[a]; 66738 if (o.config.tooltip.x.formatter === void 0) 66739 if (o.config.xaxis.type === "datetime") { 66740 var l = new B(i); 66741 m = l.formatDate(l.getDate(h), o.config.tooltip.x.format), w = l.formatDate(l.getDate(c), o.config.tooltip.x.format); 66742 } else 66743 m = h, w = c; 66744 else 66745 m = o.config.tooltip.x.formatter(h), w = o.config.tooltip.x.formatter(c); 66746 return { start: h, end: c, startVal: m, endVal: w, ylabel: d, color: A, seriesName: g }; 66747 }, ne = function(y) { 66748 var e = y.color, t = y.seriesName, i = y.ylabel, a = y.start, s = y.end, r = y.seriesIndex, n = y.dataPointIndex, o = y.ctx.tooltip.tooltipLabels.getFormatters(r); 66749 a = o.yLbFormatter(a), s = o.yLbFormatter(s); 66750 var h = o.yLbFormatter(y.w.globals.series[r][n]), c = `<span class="value start-value"> 66751 `.concat(a, ` 66752 </span> <span class="separator">-</span> <span class="value end-value"> 66753 `).concat(s, ` 66754 </span>`); 66755 return '<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: ' + e + '">' + (t || "") + '</span></div><div> <span class="category">' + i + ": </span> " + (y.w.globals.comboCharts ? y.w.config.series[r].type === "rangeArea" || y.w.config.series[r].type === "rangeBar" ? c : "<span>".concat(h, "</span>") : c) + " </div></div>"; 66756 }, oe = function() { 66757 function y(e) { 66758 F(this, y), this.opts = e; 66759 } 66760 return Y(y, [{ key: "hideYAxis", value: function() { 66761 this.opts.yaxis[0].show = !1, this.opts.yaxis[0].title.text = "", this.opts.yaxis[0].axisBorder.show = !1, this.opts.yaxis[0].axisTicks.show = !1, this.opts.yaxis[0].floating = !0; 66762 } }, { key: "line", value: function() { 66763 return { chart: { animations: { easing: "swing" } }, dataLabels: { enabled: !1 }, stroke: { width: 5, curve: "straight" }, markers: { size: 0, hover: { sizeOffset: 6 } }, xaxis: { crosshairs: { width: 1 } } }; 66764 } }, { key: "sparkline", value: function(e) { 66765 return this.hideYAxis(), P.extend(e, { grid: { show: !1, padding: { left: 0, right: 0, top: 0, bottom: 0 } }, legend: { show: !1 }, xaxis: { labels: { show: !1 }, tooltip: { enabled: !1 }, axisBorder: { show: !1 }, axisTicks: { show: !1 } }, chart: { toolbar: { show: !1 }, zoom: { enabled: !1 } }, dataLabels: { enabled: !1 } }); 66766 } }, { key: "bar", value: function() { 66767 return { chart: { stacked: !1, animations: { easing: "swing" } }, plotOptions: { bar: { dataLabels: { position: "center" } } }, dataLabels: { style: { colors: ["#fff"] }, background: { enabled: !1 } }, stroke: { width: 0, lineCap: "round" }, fill: { opacity: 0.85 }, legend: { markers: { shape: "square", radius: 2, size: 8 } }, tooltip: { shared: !1, intersect: !0 }, xaxis: { tooltip: { enabled: !1 }, tickPlacement: "between", crosshairs: { width: "barWidth", position: "back", fill: { type: "gradient" }, dropShadow: { enabled: !1 }, stroke: { width: 0 } } } }; 66768 } }, { key: "funnel", value: function() { 66769 return this.hideYAxis(), X(X({}, this.bar()), {}, { chart: { animations: { easing: "linear", speed: 800, animateGradually: { enabled: !1 } } }, plotOptions: { bar: { horizontal: !0, borderRadiusApplication: "around", borderRadius: 0, dataLabels: { position: "center" } } }, grid: { show: !1, padding: { left: 0, right: 0 } }, xaxis: { labels: { show: !1 }, tooltip: { enabled: !1 }, axisBorder: { show: !1 }, axisTicks: { show: !1 } } }); 66770 } }, { key: "candlestick", value: function() { 66771 var e = this; 66772 return { stroke: { width: 1, colors: ["#333"] }, fill: { opacity: 1 }, dataLabels: { enabled: !1 }, tooltip: { shared: !0, custom: function(t) { 66773 var i = t.seriesIndex, a = t.dataPointIndex, s = t.w; 66774 return e._getBoxTooltip(s, i, a, ["Open", "High", "", "Low", "Close"], "candlestick"); 66775 } }, states: { active: { filter: { type: "none" } } }, xaxis: { crosshairs: { width: 1 } } }; 66776 } }, { key: "boxPlot", value: function() { 66777 var e = this; 66778 return { chart: { animations: { dynamicAnimation: { enabled: !1 } } }, stroke: { width: 1, colors: ["#24292e"] }, dataLabels: { enabled: !1 }, tooltip: { shared: !0, custom: function(t) { 66779 var i = t.seriesIndex, a = t.dataPointIndex, s = t.w; 66780 return e._getBoxTooltip(s, i, a, ["Minimum", "Q1", "Median", "Q3", "Maximum"], "boxPlot"); 66781 } }, markers: { size: 5, strokeWidth: 1, strokeColors: "#111" }, xaxis: { crosshairs: { width: 1 } } }; 66782 } }, { key: "rangeBar", value: function() { 66783 return { chart: { animations: { animateGradually: !1 } }, stroke: { width: 0, lineCap: "square" }, plotOptions: { bar: { borderRadius: 0, dataLabels: { position: "center" } } }, dataLabels: { enabled: !1, formatter: function(e, t) { 66784 t.ctx; 66785 var i = t.seriesIndex, a = t.dataPointIndex, s = t.w, r = function() { 66786 var n = s.globals.seriesRangeStart[i][a]; 66787 return s.globals.seriesRangeEnd[i][a] - n; 66788 }; 66789 return s.globals.comboCharts ? s.config.series[i].type === "rangeBar" || s.config.series[i].type === "rangeArea" ? r() : e : r(); 66790 }, background: { enabled: !1 }, style: { colors: ["#fff"] } }, markers: { size: 10 }, tooltip: { shared: !1, followCursor: !0, custom: function(e) { 66791 return e.w.config.plotOptions && e.w.config.plotOptions.bar && e.w.config.plotOptions.bar.horizontal ? function(t) { 66792 var i = fe(X(X({}, t), {}, { isTimeline: !0 })), a = i.color, s = i.seriesName, r = i.ylabel, n = i.startVal, o = i.endVal; 66793 return ne(X(X({}, t), {}, { color: a, seriesName: s, ylabel: r, start: n, end: o })); 66794 }(e) : function(t) { 66795 var i = fe(t), a = i.color, s = i.seriesName, r = i.ylabel, n = i.start, o = i.end; 66796 return ne(X(X({}, t), {}, { color: a, seriesName: s, ylabel: r, start: n, end: o })); 66797 }(e); 66798 } }, xaxis: { tickPlacement: "between", tooltip: { enabled: !1 }, crosshairs: { stroke: { width: 0 } } } }; 66799 } }, { key: "dumbbell", value: function(e) { 66800 var t, i; 66801 return (t = e.plotOptions.bar) !== null && t !== void 0 && t.barHeight || (e.plotOptions.bar.barHeight = 2), (i = e.plotOptions.bar) !== null && i !== void 0 && i.columnWidth || (e.plotOptions.bar.columnWidth = 2), e; 66802 } }, { key: "area", value: function() { 66803 return { stroke: { width: 4, fill: { type: "solid", gradient: { inverseColors: !1, shade: "light", type: "vertical", opacityFrom: 0.65, opacityTo: 0.5, stops: [0, 100, 100] } } }, fill: { type: "gradient", gradient: { inverseColors: !1, shade: "light", type: "vertical", opacityFrom: 0.65, opacityTo: 0.5, stops: [0, 100, 100] } }, markers: { size: 0, hover: { sizeOffset: 6 } }, tooltip: { followCursor: !1 } }; 66804 } }, { key: "rangeArea", value: function() { 66805 return { stroke: { curve: "straight", width: 0 }, fill: { type: "solid", opacity: 0.6 }, markers: { size: 0 }, states: { hover: { filter: { type: "none" } }, active: { filter: { type: "none" } } }, tooltip: { intersect: !1, shared: !0, followCursor: !0, custom: function(e) { 66806 return function(t) { 66807 var i = fe(t), a = i.color, s = i.seriesName, r = i.ylabel, n = i.start, o = i.end; 66808 return ne(X(X({}, t), {}, { color: a, seriesName: s, ylabel: r, start: n, end: o })); 66809 }(e); 66810 } } }; 66811 } }, { key: "brush", value: function(e) { 66812 return P.extend(e, { chart: { toolbar: { autoSelected: "selection", show: !1 }, zoom: { enabled: !1 } }, dataLabels: { enabled: !1 }, stroke: { width: 1 }, tooltip: { enabled: !1 }, xaxis: { tooltip: { enabled: !1 } } }); 66813 } }, { key: "stacked100", value: function(e) { 66814 e.dataLabels = e.dataLabels || {}, e.dataLabels.formatter = e.dataLabels.formatter || void 0; 66815 var t = e.dataLabels.formatter; 66816 return e.yaxis.forEach(function(i, a) { 66817 e.yaxis[a].min = 0, e.yaxis[a].max = 100; 66818 }), e.chart.type === "bar" && (e.dataLabels.formatter = t || function(i) { 66819 return typeof i == "number" && i ? i.toFixed(0) + "%" : i; 66820 }), e; 66821 } }, { key: "stackedBars", value: function() { 66822 var e = this.bar(); 66823 return X(X({}, e), {}, { plotOptions: X(X({}, e.plotOptions), {}, { bar: X(X({}, e.plotOptions.bar), {}, { borderRadiusApplication: "end", borderRadiusWhenStacked: "last" }) }) }); 66824 } }, { key: "convertCatToNumeric", value: function(e) { 66825 return e.xaxis.convertedCatToNumeric = !0, e; 66826 } }, { key: "convertCatToNumericXaxis", value: function(e, t, i) { 66827 e.xaxis.type = "numeric", e.xaxis.labels = e.xaxis.labels || {}, e.xaxis.labels.formatter = e.xaxis.labels.formatter || function(r) { 66828 return P.isNumber(r) ? Math.floor(r) : r; 66829 }; 66830 var a = e.xaxis.labels.formatter, s = e.xaxis.categories && e.xaxis.categories.length ? e.xaxis.categories : e.labels; 66831 return i && i.length && (s = i.map(function(r) { 66832 return Array.isArray(r) ? r : String(r); 66833 })), s && s.length && (e.xaxis.labels.formatter = function(r) { 66834 return P.isNumber(r) ? a(s[Math.floor(r) - 1]) : a(r); 66835 }), e.xaxis.categories = [], e.labels = [], e.xaxis.tickAmount = e.xaxis.tickAmount || "dataPoints", e; 66836 } }, { key: "bubble", value: function() { 66837 return { dataLabels: { style: { colors: ["#fff"] } }, tooltip: { shared: !1, intersect: !0 }, xaxis: { crosshairs: { width: 0 } }, fill: { type: "solid", gradient: { shade: "light", inverse: !0, shadeIntensity: 0.55, opacityFrom: 0.4, opacityTo: 0.8 } } }; 66838 } }, { key: "scatter", value: function() { 66839 return { dataLabels: { enabled: !1 }, tooltip: { shared: !1, intersect: !0 }, markers: { size: 6, strokeWidth: 1, hover: { sizeOffset: 2 } } }; 66840 } }, { key: "heatmap", value: function() { 66841 return { chart: { stacked: !1 }, fill: { opacity: 1 }, dataLabels: { style: { colors: ["#fff"] } }, stroke: { colors: ["#fff"] }, tooltip: { followCursor: !0, marker: { show: !1 }, x: { show: !1 } }, legend: { position: "top", markers: { shape: "square", size: 10, offsetY: 2 } }, grid: { padding: { right: 20 } } }; 66842 } }, { key: "treemap", value: function() { 66843 return { chart: { zoom: { enabled: !1 } }, dataLabels: { style: { fontSize: 14, fontWeight: 600, colors: ["#fff"] } }, stroke: { show: !0, width: 2, colors: ["#fff"] }, legend: { show: !1 }, fill: { gradient: { stops: [0, 100] } }, tooltip: { followCursor: !0, x: { show: !1 } }, grid: { padding: { left: 0, right: 0 } }, xaxis: { crosshairs: { show: !1 }, tooltip: { enabled: !1 } } }; 66844 } }, { key: "pie", value: function() { 66845 return { chart: { toolbar: { show: !1 } }, plotOptions: { pie: { donut: { labels: { show: !1 } } } }, dataLabels: { formatter: function(e) { 66846 return e.toFixed(1) + "%"; 66847 }, style: { colors: ["#fff"] }, background: { enabled: !1 }, dropShadow: { enabled: !0 } }, stroke: { colors: ["#fff"] }, fill: { opacity: 1, gradient: { shade: "light", stops: [0, 100] } }, tooltip: { theme: "dark", fillSeriesColor: !0 }, legend: { position: "right" } }; 66848 } }, { key: "donut", value: function() { 66849 return { chart: { toolbar: { show: !1 } }, dataLabels: { formatter: function(e) { 66850 return e.toFixed(1) + "%"; 66851 }, style: { colors: ["#fff"] }, background: { enabled: !1 }, dropShadow: { enabled: !0 } }, stroke: { colors: ["#fff"] }, fill: { opacity: 1, gradient: { shade: "light", shadeIntensity: 0.35, stops: [80, 100], opacityFrom: 1, opacityTo: 1 } }, tooltip: { theme: "dark", fillSeriesColor: !0 }, legend: { position: "right" } }; 66852 } }, { key: "polarArea", value: function() { 66853 return this.opts.yaxis[0].tickAmount = this.opts.yaxis[0].tickAmount ? this.opts.yaxis[0].tickAmount : 6, { chart: { toolbar: { show: !1 } }, dataLabels: { formatter: function(e) { 66854 return e.toFixed(1) + "%"; 66855 }, enabled: !1 }, stroke: { show: !0, width: 2 }, fill: { opacity: 0.7 }, tooltip: { theme: "dark", fillSeriesColor: !0 }, legend: { position: "right" } }; 66856 } }, { key: "radar", value: function() { 66857 return this.opts.yaxis[0].labels.offsetY = this.opts.yaxis[0].labels.offsetY ? this.opts.yaxis[0].labels.offsetY : 6, { dataLabels: { enabled: !1, style: { fontSize: "11px" } }, stroke: { width: 2 }, markers: { size: 3, strokeWidth: 1, strokeOpacity: 1 }, fill: { opacity: 0.2 }, tooltip: { shared: !1, intersect: !0, followCursor: !0 }, grid: { show: !1 }, xaxis: { labels: { formatter: function(e) { 66858 return e; 66859 }, style: { colors: ["#a8a8a8"], fontSize: "11px" } }, tooltip: { enabled: !1 }, crosshairs: { show: !1 } } }; 66860 } }, { key: "radialBar", value: function() { 66861 return { chart: { animations: { dynamicAnimation: { enabled: !0, speed: 800 } }, toolbar: { show: !1 } }, fill: { gradient: { shade: "dark", shadeIntensity: 0.4, inverseColors: !1, type: "diagonal2", opacityFrom: 1, opacityTo: 1, stops: [70, 98, 100] } }, legend: { show: !1, position: "right" }, tooltip: { enabled: !1, fillSeriesColor: !0 } }; 66862 } }, { key: "_getBoxTooltip", value: function(e, t, i, a, s) { 66863 var r = e.globals.seriesCandleO[t][i], n = e.globals.seriesCandleH[t][i], o = e.globals.seriesCandleM[t][i], h = e.globals.seriesCandleL[t][i], c = e.globals.seriesCandleC[t][i]; 66864 return e.config.series[t].type && e.config.series[t].type !== s ? `<div class="apexcharts-custom-tooltip"> 66865 `.concat(e.config.series[t].name ? e.config.series[t].name : "series-" + (t + 1), ": <strong>").concat(e.globals.series[t][i], `</strong> 66866 </div>`) : '<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type, '">') + "<div>".concat(a[0], ': <span class="value">') + r + "</span></div>" + "<div>".concat(a[1], ': <span class="value">') + n + "</span></div>" + (o ? "<div>".concat(a[2], ': <span class="value">') + o + "</span></div>" : "") + "<div>".concat(a[3], ': <span class="value">') + h + "</span></div>" + "<div>".concat(a[4], ': <span class="value">') + c + "</span></div></div>"; 66867 } }]), y; 66868 }(), Le = function() { 66869 function y(e) { 66870 F(this, y), this.opts = e; 66871 } 66872 return Y(y, [{ key: "init", value: function(e) { 66873 var t = e.responsiveOverride, i = this.opts, a = new G(), s = new oe(i); 66874 this.chartType = i.chart.type, i = this.extendYAxis(i), i = this.extendAnnotations(i); 66875 var r = a.init(), n = {}; 66876 if (i && U(i) === "object") { 66877 var o, h, c, d, g, p, f, b, m = {}; 66878 m = ["line", "area", "bar", "candlestick", "boxPlot", "rangeBar", "rangeArea", "bubble", "scatter", "heatmap", "treemap", "pie", "polarArea", "donut", "radar", "radialBar"].indexOf(i.chart.type) !== -1 ? s[i.chart.type]() : s.line(), (o = i.plotOptions) !== null && o !== void 0 && (h = o.bar) !== null && h !== void 0 && h.isFunnel && (m = s.funnel()), i.chart.stacked && i.chart.type === "bar" && (m = s.stackedBars()), (c = i.chart.brush) !== null && c !== void 0 && c.enabled && (m = s.brush(m)), i.chart.stacked && i.chart.stackType === "100%" && (i = s.stacked100(i)), (d = i.plotOptions) !== null && d !== void 0 && (g = d.bar) !== null && g !== void 0 && g.isDumbbell && (i = s.dumbbell(i)), this.checkForDarkTheme(window.Apex), this.checkForDarkTheme(i), i.xaxis = i.xaxis || window.Apex.xaxis || {}, t || (i.xaxis.convertedCatToNumeric = !1), ((p = (i = this.checkForCatToNumericXAxis(this.chartType, m, i)).chart.sparkline) !== null && p !== void 0 && p.enabled || (f = window.Apex.chart) !== null && f !== void 0 && (b = f.sparkline) !== null && b !== void 0 && b.enabled) && (m = s.sparkline(m)), n = P.extend(r, m); 66879 } 66880 var w = P.extend(n, window.Apex); 66881 return r = P.extend(w, i), r = this.handleUserInputErrors(r); 66882 } }, { key: "checkForCatToNumericXAxis", value: function(e, t, i) { 66883 var a, s, r = new oe(i), n = (e === "bar" || e === "boxPlot") && ((a = i.plotOptions) === null || a === void 0 || (s = a.bar) === null || s === void 0 ? void 0 : s.horizontal), o = e === "pie" || e === "polarArea" || e === "donut" || e === "radar" || e === "radialBar" || e === "heatmap", h = i.xaxis.type !== "datetime" && i.xaxis.type !== "numeric", c = i.xaxis.tickPlacement ? i.xaxis.tickPlacement : t.xaxis && t.xaxis.tickPlacement; 66884 return n || o || !h || c === "between" || (i = r.convertCatToNumeric(i)), i; 66885 } }, { key: "extendYAxis", value: function(e, t) { 66886 var i = new G(); 66887 (e.yaxis === void 0 || !e.yaxis || Array.isArray(e.yaxis) && e.yaxis.length === 0) && (e.yaxis = {}), e.yaxis.constructor !== Array && window.Apex.yaxis && window.Apex.yaxis.constructor !== Array && (e.yaxis = P.extend(e.yaxis, window.Apex.yaxis)), e.yaxis.constructor !== Array ? e.yaxis = [P.extend(i.yAxis, e.yaxis)] : e.yaxis = P.extendArray(e.yaxis, i.yAxis); 66888 var a = !1; 66889 e.yaxis.forEach(function(r) { 66890 r.logarithmic && (a = !0); 66891 }); 66892 var s = e.series; 66893 return t && !s && (s = t.config.series), a && s.length !== e.yaxis.length && s.length && (e.yaxis = s.map(function(r, n) { 66894 if (r.name || (s[n].name = "series-".concat(n + 1)), e.yaxis[n]) 66895 return e.yaxis[n].seriesName = s[n].name, e.yaxis[n]; 66896 var o = P.extend(i.yAxis, e.yaxis[0]); 66897 return o.show = !1, o; 66898 })), a && s.length > 1 && s.length !== e.yaxis.length && console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"), e; 66899 } }, { key: "extendAnnotations", value: function(e) { 66900 return e.annotations === void 0 && (e.annotations = {}, e.annotations.yaxis = [], e.annotations.xaxis = [], e.annotations.points = []), e = this.extendYAxisAnnotations(e), e = this.extendXAxisAnnotations(e), e = this.extendPointAnnotations(e); 66901 } }, { key: "extendYAxisAnnotations", value: function(e) { 66902 var t = new G(); 66903 return e.annotations.yaxis = P.extendArray(e.annotations.yaxis !== void 0 ? e.annotations.yaxis : [], t.yAxisAnnotation), e; 66904 } }, { key: "extendXAxisAnnotations", value: function(e) { 66905 var t = new G(); 66906 return e.annotations.xaxis = P.extendArray(e.annotations.xaxis !== void 0 ? e.annotations.xaxis : [], t.xAxisAnnotation), e; 66907 } }, { key: "extendPointAnnotations", value: function(e) { 66908 var t = new G(); 66909 return e.annotations.points = P.extendArray(e.annotations.points !== void 0 ? e.annotations.points : [], t.pointAnnotation), e; 66910 } }, { key: "checkForDarkTheme", value: function(e) { 66911 e.theme && e.theme.mode === "dark" && (e.tooltip || (e.tooltip = {}), e.tooltip.theme !== "light" && (e.tooltip.theme = "dark"), e.chart.foreColor || (e.chart.foreColor = "#f6f7f8"), e.chart.background || (e.chart.background = "#424242"), e.theme.palette || (e.theme.palette = "palette4")); 66912 } }, { key: "handleUserInputErrors", value: function(e) { 66913 var t = e; 66914 if (t.tooltip.shared && t.tooltip.intersect) 66915 throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false."); 66916 if (t.chart.type === "bar" && t.plotOptions.bar.horizontal) { 66917 if (t.yaxis.length > 1) 66918 throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false"); 66919 t.yaxis[0].reversed && (t.yaxis[0].opposite = !0), t.xaxis.tooltip.enabled = !1, t.yaxis[0].tooltip.enabled = !1, t.chart.zoom.enabled = !1; 66920 } 66921 return t.chart.type !== "bar" && t.chart.type !== "rangeBar" || t.tooltip.shared && t.xaxis.crosshairs.width === "barWidth" && t.series.length > 1 && (t.xaxis.crosshairs.width = "tickWidth"), t.chart.type !== "candlestick" && t.chart.type !== "boxPlot" || t.yaxis[0].reversed && (console.warn("Reversed y-axis in ".concat(t.chart.type, " chart is not supported.")), t.yaxis[0].reversed = !1), t; 66922 } }]), y; 66923 }(), Ze = function() { 66924 function y() { 66925 F(this, y); 66926 } 66927 return Y(y, [{ key: "initGlobalVars", value: function(e) { 66928 e.series = [], e.seriesCandleO = [], e.seriesCandleH = [], e.seriesCandleM = [], e.seriesCandleL = [], e.seriesCandleC = [], e.seriesRangeStart = [], e.seriesRangeEnd = [], e.seriesRange = [], e.seriesPercent = [], e.seriesGoals = [], e.seriesX = [], e.seriesZ = [], e.seriesNames = [], e.seriesTotals = [], e.seriesLog = [], e.seriesColors = [], e.stackedSeriesTotals = [], e.seriesXvalues = [], e.seriesYvalues = [], e.labels = [], e.hasXaxisGroups = !1, e.groups = [], e.hasSeriesGroups = !1, e.seriesGroups = [], e.categoryLabels = [], e.timescaleLabels = [], e.noLabelsProvided = !1, e.resizeTimer = null, e.selectionResizeTimer = null, e.delayedElements = [], e.pointsArray = [], e.dataLabelsRects = [], e.isXNumeric = !1, e.skipLastTimelinelabel = !1, e.skipFirstTimelinelabel = !1, e.isDataXYZ = !1, e.isMultiLineX = !1, e.isMultipleYAxis = !1, e.maxY = -Number.MAX_VALUE, e.minY = Number.MIN_VALUE, e.minYArr = [], e.maxYArr = [], e.maxX = -Number.MAX_VALUE, e.minX = Number.MAX_VALUE, e.initialMaxX = -Number.MAX_VALUE, e.initialMinX = Number.MAX_VALUE, e.maxDate = 0, e.minDate = Number.MAX_VALUE, e.minZ = Number.MAX_VALUE, e.maxZ = -Number.MAX_VALUE, e.minXDiff = Number.MAX_VALUE, e.yAxisScale = [], e.xAxisScale = null, e.xAxisTicksPositions = [], e.yLabelsCoords = [], e.yTitleCoords = [], e.barPadForNumericAxis = 0, e.padHorizontal = 0, e.xRange = 0, e.yRange = [], e.zRange = 0, e.dataPoints = 0, e.xTickAmount = 0; 66929 } }, { key: "globalVars", value: function(e) { 66930 return { chartID: null, cuid: null, events: { beforeMount: [], mounted: [], updated: [], clicked: [], selection: [], dataPointSelection: [], zoomed: [], scrolled: [] }, colors: [], clientX: null, clientY: null, fill: { colors: [] }, stroke: { colors: [] }, dataLabels: { style: { colors: [] } }, radarPolygons: { fill: { colors: [] } }, markers: { colors: [], size: e.markers.size, largestSize: 0 }, animationEnded: !1, isTouchDevice: "ontouchstart" in window || navigator.msMaxTouchPoints, isDirty: !1, isExecCalled: !1, initialConfig: null, initialSeries: [], lastXAxis: [], lastYAxis: [], columnSeries: null, labels: [], timescaleLabels: [], noLabelsProvided: !1, allSeriesCollapsed: !1, collapsedSeries: [], collapsedSeriesIndices: [], ancillaryCollapsedSeries: [], ancillaryCollapsedSeriesIndices: [], risingSeries: [], dataFormatXNumeric: !1, capturedSeriesIndex: -1, capturedDataPointIndex: -1, selectedDataPoints: [], goldenPadding: 35, invalidLogScale: !1, ignoreYAxisIndexes: [], yAxisSameScaleIndices: [], maxValsInArrayIndex: 0, radialSize: 0, selection: void 0, zoomEnabled: e.chart.toolbar.autoSelected === "zoom" && e.chart.toolbar.tools.zoom && e.chart.zoom.enabled, panEnabled: e.chart.toolbar.autoSelected === "pan" && e.chart.toolbar.tools.pan, selectionEnabled: e.chart.toolbar.autoSelected === "selection" && e.chart.toolbar.tools.selection, yaxis: null, mousedown: !1, lastClientPosition: {}, visibleXRange: void 0, yValueDecimal: 0, total: 0, SVGNS: "http://www.w3.org/2000/svg", svgWidth: 0, svgHeight: 0, noData: !1, locale: {}, dom: {}, memory: { methodsToExec: [] }, shouldAnimate: !0, skipLastTimelinelabel: !1, skipFirstTimelinelabel: !1, delayedElements: [], axisCharts: !0, isDataXYZ: !1, resized: !1, resizeTimer: null, comboCharts: !1, dataChanged: !1, previousPaths: [], allSeriesHasEqualX: !0, pointsArray: [], dataLabelsRects: [], lastDrawnDataLabelsIndexes: [], hasNullValues: !1, easing: null, zoomed: !1, gridWidth: 0, gridHeight: 0, rotateXLabels: !1, defaultLabels: !1, xLabelFormatter: void 0, yLabelFormatters: [], xaxisTooltipFormatter: void 0, ttKeyFormatter: void 0, ttVal: void 0, ttZFormatter: void 0, LINE_HEIGHT_RATIO: 1.618, xAxisLabelsHeight: 0, xAxisGroupLabelsHeight: 0, xAxisLabelsWidth: 0, yAxisLabelsWidth: 0, scaleX: 1, scaleY: 1, translateX: 0, translateY: 0, translateYAxisX: [], yAxisWidths: [], translateXAxisY: 0, translateXAxisX: 0, tooltip: null }; 66931 } }, { key: "init", value: function(e) { 66932 var t = this.globalVars(e); 66933 return this.initGlobalVars(t), t.initialConfig = P.extend({}, e), t.initialSeries = P.clone(e.series), t.lastXAxis = P.clone(t.initialConfig.xaxis), t.lastYAxis = P.clone(t.initialConfig.yaxis), t; 66934 } }]), y; 66935 }(), ft = function() { 66936 function y(e) { 66937 F(this, y), this.opts = e; 66938 } 66939 return Y(y, [{ key: "init", value: function() { 66940 var e = new Le(this.opts).init({ responsiveOverride: !1 }); 66941 return { config: e, globals: new Ze().init(e) }; 66942 } }]), y; 66943 }(), ae = function() { 66944 function y(e) { 66945 F(this, y), this.ctx = e, this.w = e.w, this.opts = null, this.seriesIndex = 0; 66946 } 66947 return Y(y, [{ key: "clippedImgArea", value: function(e) { 66948 var t = this.w, i = t.config, a = parseInt(t.globals.gridWidth, 10), s = parseInt(t.globals.gridHeight, 10), r = a > s ? a : s, n = e.image, o = 0, h = 0; 66949 e.width === void 0 && e.height === void 0 ? i.fill.image.width !== void 0 && i.fill.image.height !== void 0 ? (o = i.fill.image.width + 1, h = i.fill.image.height) : (o = r + 1, h = r) : (o = e.width, h = e.height); 66950 var c = document.createElementNS(t.globals.SVGNS, "pattern"); 66951 M.setAttrs(c, { id: e.patternID, patternUnits: e.patternUnits ? e.patternUnits : "userSpaceOnUse", width: o + "px", height: h + "px" }); 66952 var d = document.createElementNS(t.globals.SVGNS, "image"); 66953 c.appendChild(d), d.setAttributeNS(window.SVG.xlink, "href", n), M.setAttrs(d, { x: 0, y: 0, preserveAspectRatio: "none", width: o + "px", height: h + "px" }), d.style.opacity = e.opacity, t.globals.dom.elDefs.node.appendChild(c); 66954 } }, { key: "getSeriesIndex", value: function(e) { 66955 var t = this.w, i = t.config.chart.type; 66956 return (i === "bar" || i === "rangeBar") && t.config.plotOptions.bar.distributed || i === "heatmap" || i === "treemap" ? this.seriesIndex = e.seriesNumber : this.seriesIndex = e.seriesNumber % t.globals.series.length, this.seriesIndex; 66957 } }, { key: "fillPath", value: function(e) { 66958 var t = this.w; 66959 this.opts = e; 66960 var i, a, s, r = this.w.config; 66961 this.seriesIndex = this.getSeriesIndex(e); 66962 var n = this.getFillColors()[this.seriesIndex]; 66963 t.globals.seriesColors[this.seriesIndex] !== void 0 && (n = t.globals.seriesColors[this.seriesIndex]), typeof n == "function" && (n = n({ seriesIndex: this.seriesIndex, dataPointIndex: e.dataPointIndex, value: e.value, w: t })); 66964 var o = e.fillType ? e.fillType : this.getFillType(this.seriesIndex), h = Array.isArray(r.fill.opacity) ? r.fill.opacity[this.seriesIndex] : r.fill.opacity; 66965 e.color && (n = e.color), n || (n = "#fff", console.warn("undefined color - ApexCharts")); 66966 var c = n; 66967 if (n.indexOf("rgb") === -1 ? n.length < 9 && (c = P.hexToRgba(n, h)) : n.indexOf("rgba") > -1 && (h = P.getOpacityFromRGBA(n)), e.opacity && (h = e.opacity), o === "pattern" && (a = this.handlePatternFill({ fillConfig: e.fillConfig, patternFill: a, fillColor: n, fillOpacity: h, defaultColor: c })), o === "gradient" && (s = this.handleGradientFill({ fillConfig: e.fillConfig, fillColor: n, fillOpacity: h, i: this.seriesIndex })), o === "image") { 66968 var d = r.fill.image.src, g = e.patternID ? e.patternID : ""; 66969 this.clippedImgArea({ opacity: h, image: Array.isArray(d) ? e.seriesNumber < d.length ? d[e.seriesNumber] : d[0] : d, width: e.width ? e.width : void 0, height: e.height ? e.height : void 0, patternUnits: e.patternUnits, patternID: "pattern".concat(t.globals.cuid).concat(e.seriesNumber + 1).concat(g) }), i = "url(#pattern".concat(t.globals.cuid).concat(e.seriesNumber + 1).concat(g, ")"); 66970 } else 66971 i = o === "gradient" ? s : o === "pattern" ? a : c; 66972 return e.solid && (i = c), i; 66973 } }, { key: "getFillType", value: function(e) { 66974 var t = this.w; 66975 return Array.isArray(t.config.fill.type) ? t.config.fill.type[e] : t.config.fill.type; 66976 } }, { key: "getFillColors", value: function() { 66977 var e = this.w, t = e.config, i = this.opts, a = []; 66978 return e.globals.comboCharts ? e.config.series[this.seriesIndex].type === "line" ? Array.isArray(e.globals.stroke.colors) ? a = e.globals.stroke.colors : a.push(e.globals.stroke.colors) : Array.isArray(e.globals.fill.colors) ? a = e.globals.fill.colors : a.push(e.globals.fill.colors) : t.chart.type === "line" ? Array.isArray(e.globals.stroke.colors) ? a = e.globals.stroke.colors : a.push(e.globals.stroke.colors) : Array.isArray(e.globals.fill.colors) ? a = e.globals.fill.colors : a.push(e.globals.fill.colors), i.fillColors !== void 0 && (a = [], Array.isArray(i.fillColors) ? a = i.fillColors.slice() : a.push(i.fillColors)), a; 66979 } }, { key: "handlePatternFill", value: function(e) { 66980 var t = e.fillConfig, i = e.patternFill, a = e.fillColor, s = e.fillOpacity, r = e.defaultColor, n = this.w.config.fill; 66981 t && (n = t); 66982 var o = this.opts, h = new M(this.ctx), c = Array.isArray(n.pattern.strokeWidth) ? n.pattern.strokeWidth[this.seriesIndex] : n.pattern.strokeWidth, d = a; 66983 return Array.isArray(n.pattern.style) ? i = n.pattern.style[o.seriesNumber] !== void 0 ? h.drawPattern(n.pattern.style[o.seriesNumber], n.pattern.width, n.pattern.height, d, c, s) : r : i = h.drawPattern(n.pattern.style, n.pattern.width, n.pattern.height, d, c, s), i; 66984 } }, { key: "handleGradientFill", value: function(e) { 66985 var t = e.fillColor, i = e.fillOpacity, a = e.fillConfig, s = e.i, r = this.w.config.fill; 66986 a && (r = X(X({}, r), a)); 66987 var n, o = this.opts, h = new M(this.ctx), c = new P(), d = r.gradient.type, g = t, p = r.gradient.opacityFrom === void 0 ? i : Array.isArray(r.gradient.opacityFrom) ? r.gradient.opacityFrom[s] : r.gradient.opacityFrom; 66988 g.indexOf("rgba") > -1 && (p = P.getOpacityFromRGBA(g)); 66989 var f = r.gradient.opacityTo === void 0 ? i : Array.isArray(r.gradient.opacityTo) ? r.gradient.opacityTo[s] : r.gradient.opacityTo; 66990 if (r.gradient.gradientToColors === void 0 || r.gradient.gradientToColors.length === 0) 66991 n = r.gradient.shade === "dark" ? c.shadeColor(-1 * parseFloat(r.gradient.shadeIntensity), t.indexOf("rgb") > -1 ? P.rgb2hex(t) : t) : c.shadeColor(parseFloat(r.gradient.shadeIntensity), t.indexOf("rgb") > -1 ? P.rgb2hex(t) : t); 66992 else if (r.gradient.gradientToColors[o.seriesNumber]) { 66993 var b = r.gradient.gradientToColors[o.seriesNumber]; 66994 n = b, b.indexOf("rgba") > -1 && (f = P.getOpacityFromRGBA(b)); 66995 } else 66996 n = t; 66997 if (r.gradient.gradientFrom && (g = r.gradient.gradientFrom), r.gradient.gradientTo && (n = r.gradient.gradientTo), r.gradient.inverseColors) { 66998 var m = g; 66999 g = n, n = m; 67000 } 67001 return g.indexOf("rgb") > -1 && (g = P.rgb2hex(g)), n.indexOf("rgb") > -1 && (n = P.rgb2hex(n)), h.drawGradient(d, g, n, p, f, o.size, r.gradient.stops, r.gradient.colorStops, s); 67002 } }]), y; 67003 }(), Pe = function() { 67004 function y(e, t) { 67005 F(this, y), this.ctx = e, this.w = e.w; 67006 } 67007 return Y(y, [{ key: "setGlobalMarkerSize", value: function() { 67008 var e = this.w; 67009 if (e.globals.markers.size = Array.isArray(e.config.markers.size) ? e.config.markers.size : [e.config.markers.size], e.globals.markers.size.length > 0) { 67010 if (e.globals.markers.size.length < e.globals.series.length + 1) 67011 for (var t = 0; t <= e.globals.series.length; t++) 67012 e.globals.markers.size[t] === void 0 && e.globals.markers.size.push(e.globals.markers.size[0]); 67013 } else 67014 e.globals.markers.size = e.config.series.map(function(i) { 67015 return e.config.markers.size; 67016 }); 67017 } }, { key: "plotChartMarkers", value: function(e, t, i, a) { 67018 var s, r = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], n = this.w, o = t, h = e, c = null, d = new M(this.ctx), g = n.config.markers.discrete && n.config.markers.discrete.length; 67019 if ((n.globals.markers.size[t] > 0 || r || g) && (c = d.group({ class: r || g ? "" : "apexcharts-series-markers" })).attr("clip-path", "url(#gridRectMarkerMask".concat(n.globals.cuid, ")")), Array.isArray(h.x)) 67020 for (var p = 0; p < h.x.length; p++) { 67021 var f = i; 67022 i === 1 && p === 0 && (f = 0), i === 1 && p === 1 && (f = 1); 67023 var b = "apexcharts-marker"; 67024 if (n.config.chart.type !== "line" && n.config.chart.type !== "area" || n.globals.comboCharts || n.config.tooltip.intersect || (b += " no-pointer-events"), (Array.isArray(n.config.markers.size) ? n.globals.markers.size[t] > 0 : n.config.markers.size > 0) || r || g) { 67025 P.isNumber(h.y[p]) ? b += " w".concat(P.randomId()) : b = "apexcharts-nullpoint"; 67026 var m = this.getMarkerConfig({ cssClass: b, seriesIndex: t, dataPointIndex: f }); 67027 n.config.series[o].data[f] && (n.config.series[o].data[f].fillColor && (m.pointFillColor = n.config.series[o].data[f].fillColor), n.config.series[o].data[f].strokeColor && (m.pointStrokeColor = n.config.series[o].data[f].strokeColor)), a && (m.pSize = a), (h.x[p] < 0 || h.x[p] > n.globals.gridWidth || h.y[p] < -n.globals.markers.largestSize || h.y[p] > n.globals.gridHeight + n.globals.markers.largestSize) && (m.pSize = 0), (s = d.drawMarker(h.x[p], h.y[p], m)).attr("rel", f), s.attr("j", f), s.attr("index", t), s.node.setAttribute("default-marker-size", m.pSize), new Z(this.ctx).setSelectionFilter(s, t, f), this.addEvents(s), c && c.add(s); 67028 } else 67029 n.globals.pointsArray[t] === void 0 && (n.globals.pointsArray[t] = []), n.globals.pointsArray[t].push([h.x[p], h.y[p]]); 67030 } 67031 return c; 67032 } }, { key: "getMarkerConfig", value: function(e) { 67033 var t = e.cssClass, i = e.seriesIndex, a = e.dataPointIndex, s = a === void 0 ? null : a, r = e.finishRadius, n = r === void 0 ? null : r, o = this.w, h = this.getMarkerStyle(i), c = o.globals.markers.size[i], d = o.config.markers; 67034 return s !== null && d.discrete.length && d.discrete.map(function(g) { 67035 g.seriesIndex === i && g.dataPointIndex === s && (h.pointStrokeColor = g.strokeColor, h.pointFillColor = g.fillColor, c = g.size, h.pointShape = g.shape); 67036 }), { pSize: n === null ? c : n, pRadius: d.radius, width: Array.isArray(d.width) ? d.width[i] : d.width, height: Array.isArray(d.height) ? d.height[i] : d.height, pointStrokeWidth: Array.isArray(d.strokeWidth) ? d.strokeWidth[i] : d.strokeWidth, pointStrokeColor: h.pointStrokeColor, pointFillColor: h.pointFillColor, shape: h.pointShape || (Array.isArray(d.shape) ? d.shape[i] : d.shape), class: t, pointStrokeOpacity: Array.isArray(d.strokeOpacity) ? d.strokeOpacity[i] : d.strokeOpacity, pointStrokeDashArray: Array.isArray(d.strokeDashArray) ? d.strokeDashArray[i] : d.strokeDashArray, pointFillOpacity: Array.isArray(d.fillOpacity) ? d.fillOpacity[i] : d.fillOpacity, seriesIndex: i }; 67037 } }, { key: "addEvents", value: function(e) { 67038 var t = this.w, i = new M(this.ctx); 67039 e.node.addEventListener("mouseenter", i.pathMouseEnter.bind(this.ctx, e)), e.node.addEventListener("mouseleave", i.pathMouseLeave.bind(this.ctx, e)), e.node.addEventListener("mousedown", i.pathMouseDown.bind(this.ctx, e)), e.node.addEventListener("click", t.config.markers.onClick), e.node.addEventListener("dblclick", t.config.markers.onDblClick), e.node.addEventListener("touchstart", i.pathMouseDown.bind(this.ctx, e), { passive: !0 }); 67040 } }, { key: "getMarkerStyle", value: function(e) { 67041 var t = this.w, i = t.globals.markers.colors, a = t.config.markers.strokeColor || t.config.markers.strokeColors; 67042 return { pointStrokeColor: Array.isArray(a) ? a[e] : a, pointFillColor: Array.isArray(i) ? i[e] : i }; 67043 } }]), y; 67044 }(), $e = function() { 67045 function y(e) { 67046 F(this, y), this.ctx = e, this.w = e.w, this.initialAnim = this.w.config.chart.animations.enabled, this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled; 67047 } 67048 return Y(y, [{ key: "draw", value: function(e, t, i) { 67049 var a = this.w, s = new M(this.ctx), r = i.realIndex, n = i.pointsPos, o = i.zRatio, h = i.elParent, c = s.group({ class: "apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type) }); 67050 if (c.attr("clip-path", "url(#gridRectMarkerMask".concat(a.globals.cuid, ")")), Array.isArray(n.x)) 67051 for (var d = 0; d < n.x.length; d++) { 67052 var g = t + 1, p = !0; 67053 t === 0 && d === 0 && (g = 0), t === 0 && d === 1 && (g = 1); 67054 var f = 0, b = a.globals.markers.size[r]; 67055 if (o !== 1 / 0) { 67056 var m = a.config.plotOptions.bubble; 67057 b = a.globals.seriesZ[r][g], m.zScaling && (b /= o), m.minBubbleRadius && b < m.minBubbleRadius && (b = m.minBubbleRadius), m.maxBubbleRadius && b > m.maxBubbleRadius && (b = m.maxBubbleRadius); 67058 } 67059 a.config.chart.animations.enabled || (f = b); 67060 var w = n.x[d], A = n.y[d]; 67061 if (f = f || 0, A !== null && a.globals.series[r][g] !== void 0 || (p = !1), p) { 67062 var l = this.drawPoint(w, A, f, b, r, g, t); 67063 c.add(l); 67064 } 67065 h.add(c); 67066 } 67067 } }, { key: "drawPoint", value: function(e, t, i, a, s, r, n) { 67068 var o = this.w, h = s, c = new de(this.ctx), d = new Z(this.ctx), g = new ae(this.ctx), p = new Pe(this.ctx), f = new M(this.ctx), b = p.getMarkerConfig({ cssClass: "apexcharts-marker", seriesIndex: h, dataPointIndex: r, finishRadius: o.config.chart.type === "bubble" || o.globals.comboCharts && o.config.series[s] && o.config.series[s].type === "bubble" ? a : null }); 67069 a = b.pSize; 67070 var m, w = g.fillPath({ seriesNumber: s, dataPointIndex: r, color: b.pointFillColor, patternUnits: "objectBoundingBox", value: o.globals.series[s][n] }); 67071 if (b.shape === "circle" ? m = f.drawCircle(i) : b.shape !== "square" && b.shape !== "rect" || (m = f.drawRect(0, 0, b.width - b.pointStrokeWidth / 2, b.height - b.pointStrokeWidth / 2, b.pRadius)), o.config.series[h].data[r] && o.config.series[h].data[r].fillColor && (w = o.config.series[h].data[r].fillColor), m.attr({ x: e - b.width / 2 - b.pointStrokeWidth / 2, y: t - b.height / 2 - b.pointStrokeWidth / 2, cx: e, cy: t, fill: w, "fill-opacity": b.pointFillOpacity, stroke: b.pointStrokeColor, r: a, "stroke-width": b.pointStrokeWidth, "stroke-dasharray": b.pointStrokeDashArray, "stroke-opacity": b.pointStrokeOpacity }), o.config.chart.dropShadow.enabled) { 67072 var A = o.config.chart.dropShadow; 67073 d.dropShadow(m, A, s); 67074 } 67075 if (!this.initialAnim || o.globals.dataChanged || o.globals.resized) 67076 o.globals.animationEnded = !0; 67077 else { 67078 var l = o.config.chart.animations.speed; 67079 c.animateMarker(m, 0, b.shape === "circle" ? a : { width: b.width, height: b.height }, l, o.globals.easing, function() { 67080 window.setTimeout(function() { 67081 c.animationCompleted(m); 67082 }, 100); 67083 }); 67084 } 67085 if (o.globals.dataChanged && b.shape === "circle") 67086 if (this.dynamicAnim) { 67087 var u, x, v, k, S = o.config.chart.animations.dynamicAnimation.speed; 67088 (k = o.globals.previousPaths[s] && o.globals.previousPaths[s][n]) != null && (u = k.x, x = k.y, v = k.r !== void 0 ? k.r : a); 67089 for (var C = 0; C < o.globals.collapsedSeries.length; C++) 67090 o.globals.collapsedSeries[C].index === s && (S = 1, a = 0); 67091 e === 0 && t === 0 && (a = 0), c.animateCircle(m, { cx: u, cy: x, r: v }, { cx: e, cy: t, r: a }, S, o.globals.easing); 67092 } else 67093 m.attr({ r: a }); 67094 return m.attr({ rel: r, j: r, index: s, "default-marker-size": a }), d.setSelectionFilter(m, s, r), p.addEvents(m), m.node.classList.add("apexcharts-marker"), m; 67095 } }, { key: "centerTextInBubble", value: function(e) { 67096 var t = this.w; 67097 return { y: e += parseInt(t.config.dataLabels.style.fontSize, 10) / 4 }; 67098 } }]), y; 67099 }(), ye = function() { 67100 function y(e) { 67101 F(this, y), this.ctx = e, this.w = e.w; 67102 } 67103 return Y(y, [{ key: "dataLabelsCorrection", value: function(e, t, i, a, s, r, n) { 67104 var o = this.w, h = !1, c = new M(this.ctx).getTextRects(i, n), d = c.width, g = c.height; 67105 t < 0 && (t = 0), t > o.globals.gridHeight + g && (t = o.globals.gridHeight + g / 2), o.globals.dataLabelsRects[a] === void 0 && (o.globals.dataLabelsRects[a] = []), o.globals.dataLabelsRects[a].push({ x: e, y: t, width: d, height: g }); 67106 var p = o.globals.dataLabelsRects[a].length - 2, f = o.globals.lastDrawnDataLabelsIndexes[a] !== void 0 ? o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length - 1] : 0; 67107 if (o.globals.dataLabelsRects[a][p] !== void 0) { 67108 var b = o.globals.dataLabelsRects[a][f]; 67109 (e > b.x + b.width || t > b.y + b.height || t + g < b.y || e + d < b.x) && (h = !0); 67110 } 67111 return (s === 0 || r) && (h = !0), { x: e, y: t, textRects: c, drawnextLabel: h }; 67112 } }, { key: "drawDataLabel", value: function(e) { 67113 var t = this, i = e.type, a = e.pos, s = e.i, r = e.j, n = e.isRangeStart, o = e.strokeWidth, h = o === void 0 ? 2 : o, c = this.w, d = new M(this.ctx), g = c.config.dataLabels, p = 0, f = 0, b = r, m = null; 67114 if (!g.enabled || !Array.isArray(a.x)) 67115 return m; 67116 m = d.group({ class: "apexcharts-data-labels" }); 67117 for (var w = 0; w < a.x.length; w++) 67118 if (p = a.x[w] + g.offsetX, f = a.y[w] + g.offsetY + h, !isNaN(p)) { 67119 r === 1 && w === 0 && (b = 0), r === 1 && w === 1 && (b = 1); 67120 var A = c.globals.series[s][b]; 67121 i === "rangeArea" && (A = n ? c.globals.seriesRangeStart[s][b] : c.globals.seriesRangeEnd[s][b]); 67122 var l = "", u = function(x) { 67123 return c.config.dataLabels.formatter(x, { ctx: t.ctx, seriesIndex: s, dataPointIndex: b, w: c }); 67124 }; 67125 c.config.chart.type === "bubble" ? (l = u(A = c.globals.seriesZ[s][b]), f = a.y[w], f = new $e(this.ctx).centerTextInBubble(f, s, b).y) : A !== void 0 && (l = u(A)), this.plotDataLabelsText({ x: p, y: f, text: l, i: s, j: b, parent: m, offsetCorrection: !0, dataLabelsConfig: c.config.dataLabels }); 67126 } 67127 return m; 67128 } }, { key: "plotDataLabelsText", value: function(e) { 67129 var t = this.w, i = new M(this.ctx), a = e.x, s = e.y, r = e.i, n = e.j, o = e.text, h = e.textAnchor, c = e.fontSize, d = e.parent, g = e.dataLabelsConfig, p = e.color, f = e.alwaysDrawDataLabel, b = e.offsetCorrection; 67130 if (!(Array.isArray(t.config.dataLabels.enabledOnSeries) && t.config.dataLabels.enabledOnSeries.indexOf(r) < 0)) { 67131 var m = { x: a, y: s, drawnextLabel: !0, textRects: null }; 67132 b && (m = this.dataLabelsCorrection(a, s, o, r, n, f, parseInt(g.style.fontSize, 10))), t.globals.zoomed || (a = m.x, s = m.y), m.textRects && (a < -20 - m.textRects.width || a > t.globals.gridWidth + m.textRects.width + 30) && (o = ""); 67133 var w = t.globals.dataLabels.style.colors[r]; 67134 ((t.config.chart.type === "bar" || t.config.chart.type === "rangeBar") && t.config.plotOptions.bar.distributed || t.config.dataLabels.distributed) && (w = t.globals.dataLabels.style.colors[n]), typeof w == "function" && (w = w({ series: t.globals.series, seriesIndex: r, dataPointIndex: n, w: t })), p && (w = p); 67135 var A = g.offsetX, l = g.offsetY; 67136 if (t.config.chart.type !== "bar" && t.config.chart.type !== "rangeBar" || (A = 0, l = 0), m.drawnextLabel) { 67137 var u = i.drawText({ width: 100, height: parseInt(g.style.fontSize, 10), x: a + A, y: s + l, foreColor: w, textAnchor: h || g.textAnchor, text: o, fontSize: c || g.style.fontSize, fontFamily: g.style.fontFamily, fontWeight: g.style.fontWeight || "normal" }); 67138 if (u.attr({ class: "apexcharts-datalabel", cx: a, cy: s }), g.dropShadow.enabled) { 67139 var x = g.dropShadow; 67140 new Z(this.ctx).dropShadow(u, x); 67141 } 67142 d.add(u), t.globals.lastDrawnDataLabelsIndexes[r] === void 0 && (t.globals.lastDrawnDataLabelsIndexes[r] = []), t.globals.lastDrawnDataLabelsIndexes[r].push(n); 67143 } 67144 } 67145 } }, { key: "addBackgroundToDataLabel", value: function(e, t) { 67146 var i = this.w, a = i.config.dataLabels.background, s = a.padding, r = a.padding / 2, n = t.width, o = t.height, h = new M(this.ctx).drawRect(t.x - s, t.y - r / 2, n + 2 * s, o + r, a.borderRadius, i.config.chart.background === "transparent" ? "#fff" : i.config.chart.background, a.opacity, a.borderWidth, a.borderColor); 67147 return a.dropShadow.enabled && new Z(this.ctx).dropShadow(h, a.dropShadow), h; 67148 } }, { key: "dataLabelsBackground", value: function() { 67149 var e = this.w; 67150 if (e.config.chart.type !== "bubble") 67151 for (var t = e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"), i = 0; i < t.length; i++) { 67152 var a = t[i], s = a.getBBox(), r = null; 67153 if (s.width && s.height && (r = this.addBackgroundToDataLabel(a, s)), r) { 67154 a.parentNode.insertBefore(r.node, a); 67155 var n = a.getAttribute("fill"); 67156 e.config.chart.animations.enabled && !e.globals.resized && !e.globals.dataChanged ? r.animate().attr({ fill: n }) : r.attr({ fill: n }), a.setAttribute("fill", e.config.dataLabels.background.foreColor); 67157 } 67158 } 67159 } }, { key: "bringForward", value: function() { 67160 for (var e = this.w, t = e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"), i = e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"), a = 0; a < t.length; a++) 67161 i && i.insertBefore(t[a], i.nextSibling); 67162 } }]), y; 67163 }(), te = function() { 67164 function y(e) { 67165 F(this, y), this.ctx = e, this.w = e.w, this.legendInactiveClass = "legend-mouseover-inactive"; 67166 } 67167 return Y(y, [{ key: "getAllSeriesEls", value: function() { 67168 return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series"); 67169 } }, { key: "getSeriesByName", value: function(e) { 67170 return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(P.escapeString(e), "']")); 67171 } }, { key: "isSeriesHidden", value: function(e) { 67172 var t = this.getSeriesByName(e), i = parseInt(t.getAttribute("data:realIndex"), 10); 67173 return { isHidden: t.classList.contains("apexcharts-series-collapsed"), realIndex: i }; 67174 } }, { key: "addCollapsedClassToSeries", value: function(e, t) { 67175 var i = this.w; 67176 function a(s) { 67177 for (var r = 0; r < s.length; r++) 67178 s[r].index === t && e.node.classList.add("apexcharts-series-collapsed"); 67179 } 67180 a(i.globals.collapsedSeries), a(i.globals.ancillaryCollapsedSeries); 67181 } }, { key: "toggleSeries", value: function(e) { 67182 var t = this.isSeriesHidden(e); 67183 return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex, t.isHidden), t.isHidden; 67184 } }, { key: "showSeries", value: function(e) { 67185 var t = this.isSeriesHidden(e); 67186 t.isHidden && this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex, !0); 67187 } }, { key: "hideSeries", value: function(e) { 67188 var t = this.isSeriesHidden(e); 67189 t.isHidden || this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex, !1); 67190 } }, { key: "resetSeries", value: function() { 67191 var e = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], a = this.w, s = P.clone(a.globals.initialSeries); 67192 a.globals.previousPaths = [], i ? (a.globals.collapsedSeries = [], a.globals.ancillaryCollapsedSeries = [], a.globals.collapsedSeriesIndices = [], a.globals.ancillaryCollapsedSeriesIndices = []) : s = this.emptyCollapsedSeries(s), a.config.series = s, e && (t && (a.globals.zoomed = !1, this.ctx.updateHelpers.revertDefaultAxisMinMax()), this.ctx.updateHelpers._updateSeries(s, a.config.chart.animations.dynamicAnimation.enabled)); 67193 } }, { key: "emptyCollapsedSeries", value: function(e) { 67194 for (var t = this.w, i = 0; i < e.length; i++) 67195 t.globals.collapsedSeriesIndices.indexOf(i) > -1 && (e[i].data = []); 67196 return e; 67197 } }, { key: "toggleSeriesOnHover", value: function(e, t) { 67198 var i = this.w; 67199 t || (t = e.target); 67200 var a = i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels"); 67201 if (e.type === "mousemove") { 67202 var s = parseInt(t.getAttribute("rel"), 10) - 1, r = null, n = null; 67203 i.globals.axisCharts || i.config.chart.type === "radialBar" ? i.globals.axisCharts ? (r = i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s, "']")), n = i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s, "']"))) : r = i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s + 1, "']")) : r = i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s + 1, "'] path")); 67204 for (var o = 0; o < a.length; o++) 67205 a[o].classList.add(this.legendInactiveClass); 67206 r !== null && (i.globals.axisCharts || r.parentNode.classList.remove(this.legendInactiveClass), r.classList.remove(this.legendInactiveClass), n !== null && n.classList.remove(this.legendInactiveClass)); 67207 } else if (e.type === "mouseout") 67208 for (var h = 0; h < a.length; h++) 67209 a[h].classList.remove(this.legendInactiveClass); 67210 } }, { key: "highlightRangeInSeries", value: function(e, t) { 67211 var i = this, a = this.w, s = a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"), r = function(o) { 67212 for (var h = 0; h < s.length; h++) 67213 s[h].classList[o](i.legendInactiveClass); 67214 }; 67215 if (e.type === "mousemove") { 67216 var n = parseInt(t.getAttribute("rel"), 10) - 1; 67217 r("add"), function(o) { 67218 for (var h = 0; h < s.length; h++) { 67219 var c = parseInt(s[h].getAttribute("val"), 10); 67220 c >= o.from && c <= o.to && s[h].classList.remove(i.legendInactiveClass); 67221 } 67222 }(a.config.plotOptions.heatmap.colorScale.ranges[n]); 67223 } else 67224 e.type === "mouseout" && r("remove"); 67225 } }, { key: "getActiveConfigSeriesIndex", value: function() { 67226 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "asc", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = this.w, a = 0; 67227 if (i.config.series.length > 1) { 67228 for (var s = i.config.series.map(function(n, o) { 67229 return n.data && n.data.length > 0 && i.globals.collapsedSeriesIndices.indexOf(o) === -1 && (!i.globals.comboCharts || t.length === 0 || t.length && t.indexOf(i.config.series[o].type) > -1) ? o : -1; 67230 }), r = e === "asc" ? 0 : s.length - 1; e === "asc" ? r < s.length : r >= 0; e === "asc" ? r++ : r--) 67231 if (s[r] !== -1) { 67232 a = s[r]; 67233 break; 67234 } 67235 } 67236 return a; 67237 } }, { key: "getBarSeriesIndices", value: function() { 67238 return this.w.globals.comboCharts ? this.w.config.series.map(function(e, t) { 67239 return e.type === "bar" || e.type === "column" ? t : -1; 67240 }).filter(function(e) { 67241 return e !== -1; 67242 }) : this.w.config.series.map(function(e, t) { 67243 return t; 67244 }); 67245 } }, { key: "getPreviousPaths", value: function() { 67246 var e = this.w; 67247 function t(r, n, o) { 67248 for (var h = r[n].childNodes, c = { type: o, paths: [], realIndex: r[n].getAttribute("data:realIndex") }, d = 0; d < h.length; d++) 67249 if (h[d].hasAttribute("pathTo")) { 67250 var g = h[d].getAttribute("pathTo"); 67251 c.paths.push({ d: g }); 67252 } 67253 e.globals.previousPaths.push(c); 67254 } 67255 e.globals.previousPaths = [], ["line", "area", "bar", "rangebar", "rangeArea", "candlestick", "radar"].forEach(function(r) { 67256 for (var n, o = (n = r, e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(n, "-series .apexcharts-series"))), h = 0; h < o.length; h++) 67257 t(o, h, r); 67258 }), this.handlePrevBubbleScatterPaths("bubble"), this.handlePrevBubbleScatterPaths("scatter"); 67259 var i = e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type, " .apexcharts-series")); 67260 if (i.length > 0) 67261 for (var a = function(r) { 67262 for (var n = e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type, " .apexcharts-series[data\\:realIndex='").concat(r, "'] rect")), o = [], h = function(d) { 67263 var g = function(f) { 67264 return n[d].getAttribute(f); 67265 }, p = { x: parseFloat(g("x")), y: parseFloat(g("y")), width: parseFloat(g("width")), height: parseFloat(g("height")) }; 67266 o.push({ rect: p, color: n[d].getAttribute("color") }); 67267 }, c = 0; c < n.length; c++) 67268 h(c); 67269 e.globals.previousPaths.push(o); 67270 }, s = 0; s < i.length; s++) 67271 a(s); 67272 e.globals.axisCharts || (e.globals.previousPaths = e.globals.series); 67273 } }, { key: "handlePrevBubbleScatterPaths", value: function(e) { 67274 var t = this.w, i = t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e, "-series .apexcharts-series")); 67275 if (i.length > 0) 67276 for (var a = 0; a < i.length; a++) { 67277 for (var s = t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e, "-series .apexcharts-series[data\\:realIndex='").concat(a, "'] circle")), r = [], n = 0; n < s.length; n++) 67278 r.push({ x: s[n].getAttribute("cx"), y: s[n].getAttribute("cy"), r: s[n].getAttribute("r") }); 67279 t.globals.previousPaths.push(r); 67280 } 67281 } }, { key: "clearPreviousPaths", value: function() { 67282 var e = this.w; 67283 e.globals.previousPaths = [], e.globals.allSeriesCollapsed = !1; 67284 } }, { key: "handleNoData", value: function() { 67285 var e = this.w, t = e.config.noData, i = new M(this.ctx), a = e.globals.svgWidth / 2, s = e.globals.svgHeight / 2, r = "middle"; 67286 if (e.globals.noData = !0, e.globals.animationEnded = !0, t.align === "left" ? (a = 10, r = "start") : t.align === "right" && (a = e.globals.svgWidth - 10, r = "end"), t.verticalAlign === "top" ? s = 50 : t.verticalAlign === "bottom" && (s = e.globals.svgHeight - 50), a += t.offsetX, s = s + parseInt(t.style.fontSize, 10) + 2 + t.offsetY, t.text !== void 0 && t.text !== "") { 67287 var n = i.drawText({ x: a, y: s, text: t.text, textAnchor: r, fontSize: t.style.fontSize, fontFamily: t.style.fontFamily, foreColor: t.style.color, opacity: 1, class: "apexcharts-text-nodata" }); 67288 e.globals.dom.Paper.add(n); 67289 } 67290 } }, { key: "setNullSeriesToZeroValues", value: function(e) { 67291 for (var t = this.w, i = 0; i < e.length; i++) 67292 if (e[i].length === 0) 67293 for (var a = 0; a < e[t.globals.maxValsInArrayIndex].length; a++) 67294 e[i].push(0); 67295 return e; 67296 } }, { key: "hasAllSeriesEqualX", value: function() { 67297 for (var e = !0, t = this.w, i = this.filteredSeriesX(), a = 0; a < i.length - 1; a++) 67298 if (i[a][0] !== i[a + 1][0]) { 67299 e = !1; 67300 break; 67301 } 67302 return t.globals.allSeriesHasEqualX = e, e; 67303 } }, { key: "filteredSeriesX", value: function() { 67304 var e = this.w.globals.seriesX.map(function(t) { 67305 return t.length > 0 ? t : []; 67306 }); 67307 return e; 67308 } }]), y; 67309 }(), Je = function() { 67310 function y(e) { 67311 F(this, y), this.ctx = e, this.w = e.w, this.twoDSeries = [], this.threeDSeries = [], this.twoDSeriesX = [], this.seriesGoals = [], this.coreUtils = new q(this.ctx); 67312 } 67313 return Y(y, [{ key: "isMultiFormat", value: function() { 67314 return this.isFormatXY() || this.isFormat2DArray(); 67315 } }, { key: "isFormatXY", value: function() { 67316 var e = this.w.config.series.slice(), t = new te(this.ctx); 67317 if (this.activeSeriesIndex = t.getActiveConfigSeriesIndex(), e[this.activeSeriesIndex].data !== void 0 && e[this.activeSeriesIndex].data.length > 0 && e[this.activeSeriesIndex].data[0] !== null && e[this.activeSeriesIndex].data[0].x !== void 0 && e[this.activeSeriesIndex].data[0] !== null) 67318 return !0; 67319 } }, { key: "isFormat2DArray", value: function() { 67320 var e = this.w.config.series.slice(), t = new te(this.ctx); 67321 if (this.activeSeriesIndex = t.getActiveConfigSeriesIndex(), e[this.activeSeriesIndex].data !== void 0 && e[this.activeSeriesIndex].data.length > 0 && e[this.activeSeriesIndex].data[0] !== void 0 && e[this.activeSeriesIndex].data[0] !== null && e[this.activeSeriesIndex].data[0].constructor === Array) 67322 return !0; 67323 } }, { key: "handleFormat2DArray", value: function(e, t) { 67324 for (var i = this.w.config, a = this.w.globals, s = i.chart.type === "boxPlot" || i.series[t].type === "boxPlot", r = 0; r < e[t].data.length; r++) 67325 if (e[t].data[r][1] !== void 0 && (Array.isArray(e[t].data[r][1]) && e[t].data[r][1].length === 4 && !s ? this.twoDSeries.push(P.parseNumber(e[t].data[r][1][3])) : e[t].data[r].length >= 5 ? this.twoDSeries.push(P.parseNumber(e[t].data[r][4])) : this.twoDSeries.push(P.parseNumber(e[t].data[r][1])), a.dataFormatXNumeric = !0), i.xaxis.type === "datetime") { 67326 var n = new Date(e[t].data[r][0]); 67327 n = new Date(n).getTime(), this.twoDSeriesX.push(n); 67328 } else 67329 this.twoDSeriesX.push(e[t].data[r][0]); 67330 for (var o = 0; o < e[t].data.length; o++) 67331 e[t].data[o][2] !== void 0 && (this.threeDSeries.push(e[t].data[o][2]), a.isDataXYZ = !0); 67332 } }, { key: "handleFormatXY", value: function(e, t) { 67333 var i = this.w.config, a = this.w.globals, s = new B(this.ctx), r = t; 67334 a.collapsedSeriesIndices.indexOf(t) > -1 && (r = this.activeSeriesIndex); 67335 for (var n = 0; n < e[t].data.length; n++) 67336 e[t].data[n].y !== void 0 && (Array.isArray(e[t].data[n].y) ? this.twoDSeries.push(P.parseNumber(e[t].data[n].y[e[t].data[n].y.length - 1])) : this.twoDSeries.push(P.parseNumber(e[t].data[n].y))), e[t].data[n].goals !== void 0 && Array.isArray(e[t].data[n].goals) ? (this.seriesGoals[t] === void 0 && (this.seriesGoals[t] = []), this.seriesGoals[t].push(e[t].data[n].goals)) : (this.seriesGoals[t] === void 0 && (this.seriesGoals[t] = []), this.seriesGoals[t].push(null)); 67337 for (var o = 0; o < e[r].data.length; o++) { 67338 var h = typeof e[r].data[o].x == "string", c = Array.isArray(e[r].data[o].x), d = !c && !!s.isValidDate(e[r].data[o].x); 67339 if (h || d) 67340 if (h || i.xaxis.convertedCatToNumeric) { 67341 var g = a.isBarHorizontal && a.isRangeData; 67342 i.xaxis.type !== "datetime" || g ? (this.fallbackToCategory = !0, this.twoDSeriesX.push(e[r].data[o].x), isNaN(e[r].data[o].x) || this.w.config.xaxis.type === "category" || typeof e[r].data[o].x == "string" || (a.isXNumeric = !0)) : this.twoDSeriesX.push(s.parseDate(e[r].data[o].x)); 67343 } else 67344 i.xaxis.type === "datetime" ? this.twoDSeriesX.push(s.parseDate(e[r].data[o].x.toString())) : (a.dataFormatXNumeric = !0, a.isXNumeric = !0, this.twoDSeriesX.push(parseFloat(e[r].data[o].x))); 67345 else 67346 c ? (this.fallbackToCategory = !0, this.twoDSeriesX.push(e[r].data[o].x)) : (a.isXNumeric = !0, a.dataFormatXNumeric = !0, this.twoDSeriesX.push(e[r].data[o].x)); 67347 } 67348 if (e[t].data[0] && e[t].data[0].z !== void 0) { 67349 for (var p = 0; p < e[t].data.length; p++) 67350 this.threeDSeries.push(e[t].data[p].z); 67351 a.isDataXYZ = !0; 67352 } 67353 } }, { key: "handleRangeData", value: function(e, t) { 67354 var i = this.w.globals, a = {}; 67355 return this.isFormat2DArray() ? a = this.handleRangeDataFormat("array", e, t) : this.isFormatXY() && (a = this.handleRangeDataFormat("xy", e, t)), i.seriesRangeStart.push(a.start), i.seriesRangeEnd.push(a.end), i.seriesRange.push(a.rangeUniques), i.seriesRange.forEach(function(s, r) { 67356 s && s.forEach(function(n, o) { 67357 n.y.forEach(function(h, c) { 67358 for (var d = 0; d < n.y.length; d++) 67359 if (c !== d) { 67360 var g = h.y1, p = h.y2, f = n.y[d].y1; 67361 g <= n.y[d].y2 && f <= p && (n.overlaps.indexOf(h.rangeName) < 0 && n.overlaps.push(h.rangeName), n.overlaps.indexOf(n.y[d].rangeName) < 0 && n.overlaps.push(n.y[d].rangeName)); 67362 } 67363 }); 67364 }); 67365 }), a; 67366 } }, { key: "handleCandleStickBoxData", value: function(e, t) { 67367 var i = this.w.globals, a = {}; 67368 return this.isFormat2DArray() ? a = this.handleCandleStickBoxDataFormat("array", e, t) : this.isFormatXY() && (a = this.handleCandleStickBoxDataFormat("xy", e, t)), i.seriesCandleO[t] = a.o, i.seriesCandleH[t] = a.h, i.seriesCandleM[t] = a.m, i.seriesCandleL[t] = a.l, i.seriesCandleC[t] = a.c, a; 67369 } }, { key: "handleRangeDataFormat", value: function(e, t, i) { 67370 var a = [], s = [], r = t[i].data.filter(function(c, d, g) { 67371 return d === g.findIndex(function(p) { 67372 return p.x === c.x; 67373 }); 67374 }).map(function(c, d) { 67375 return { x: c.x, overlaps: [], y: [] }; 67376 }); 67377 if (e === "array") 67378 for (var n = 0; n < t[i].data.length; n++) 67379 Array.isArray(t[i].data[n]) ? (a.push(t[i].data[n][1][0]), s.push(t[i].data[n][1][1])) : (a.push(t[i].data[n]), s.push(t[i].data[n])); 67380 else if (e === "xy") 67381 for (var o = function(c) { 67382 var d = Array.isArray(t[i].data[c].y), g = P.randomId(), p = t[i].data[c].x, f = { y1: d ? t[i].data[c].y[0] : t[i].data[c].y, y2: d ? t[i].data[c].y[1] : t[i].data[c].y, rangeName: g }; 67383 t[i].data[c].rangeName = g; 67384 var b = r.findIndex(function(m) { 67385 return m.x === p; 67386 }); 67387 r[b].y.push(f), a.push(f.y1), s.push(f.y2); 67388 }, h = 0; h < t[i].data.length; h++) 67389 o(h); 67390 return { start: a, end: s, rangeUniques: r }; 67391 } }, { key: "handleCandleStickBoxDataFormat", value: function(e, t, i) { 67392 var a = this.w, s = a.config.chart.type === "boxPlot" || a.config.series[i].type === "boxPlot", r = [], n = [], o = [], h = [], c = []; 67393 if (e === "array") 67394 if (s && t[i].data[0].length === 6 || !s && t[i].data[0].length === 5) 67395 for (var d = 0; d < t[i].data.length; d++) 67396 r.push(t[i].data[d][1]), n.push(t[i].data[d][2]), s ? (o.push(t[i].data[d][3]), h.push(t[i].data[d][4]), c.push(t[i].data[d][5])) : (h.push(t[i].data[d][3]), c.push(t[i].data[d][4])); 67397 else 67398 for (var g = 0; g < t[i].data.length; g++) 67399 Array.isArray(t[i].data[g][1]) && (r.push(t[i].data[g][1][0]), n.push(t[i].data[g][1][1]), s ? (o.push(t[i].data[g][1][2]), h.push(t[i].data[g][1][3]), c.push(t[i].data[g][1][4])) : (h.push(t[i].data[g][1][2]), c.push(t[i].data[g][1][3]))); 67400 else if (e === "xy") 67401 for (var p = 0; p < t[i].data.length; p++) 67402 Array.isArray(t[i].data[p].y) && (r.push(t[i].data[p].y[0]), n.push(t[i].data[p].y[1]), s ? (o.push(t[i].data[p].y[2]), h.push(t[i].data[p].y[3]), c.push(t[i].data[p].y[4])) : (h.push(t[i].data[p].y[2]), c.push(t[i].data[p].y[3]))); 67403 return { o: r, h: n, m: o, l: h, c }; 67404 } }, { key: "parseDataAxisCharts", value: function(e) { 67405 var t, i = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.ctx, s = this.w.config, r = this.w.globals, n = new B(a), o = s.labels.length > 0 ? s.labels.slice() : s.xaxis.categories.slice(); 67406 if (r.isRangeBar = s.chart.type === "rangeBar" && r.isBarHorizontal, r.hasXaxisGroups = s.xaxis.type === "category" && s.xaxis.group.groups.length > 0, r.hasXaxisGroups && (r.groups = s.xaxis.group.groups), r.hasSeriesGroups = (t = e[0]) === null || t === void 0 ? void 0 : t.group, r.hasSeriesGroups) { 67407 var h = [], c = J(new Set(e.map(function(f) { 67408 return f.group; 67409 }))); 67410 e.forEach(function(f, b) { 67411 var m = c.indexOf(f.group); 67412 h[m] || (h[m] = []), h[m].push(f.name); 67413 }), r.seriesGroups = h; 67414 } 67415 for (var d = function() { 67416 for (var f = 0; f < o.length; f++) 67417 if (typeof o[f] == "string") { 67418 if (!n.isValidDate(o[f])) 67419 throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date"); 67420 i.twoDSeriesX.push(n.parseDate(o[f])); 67421 } else 67422 i.twoDSeriesX.push(o[f]); 67423 }, g = 0; g < e.length; g++) { 67424 if (this.twoDSeries = [], this.twoDSeriesX = [], this.threeDSeries = [], e[g].data === void 0) 67425 return void console.error("It is a possibility that you may have not included 'data' property in series."); 67426 if (s.chart.type !== "rangeBar" && s.chart.type !== "rangeArea" && e[g].type !== "rangeBar" && e[g].type !== "rangeArea" || (r.isRangeData = !0, s.chart.type !== "rangeBar" && s.chart.type !== "rangeArea" || this.handleRangeData(e, g)), this.isMultiFormat()) 67427 this.isFormat2DArray() ? this.handleFormat2DArray(e, g) : this.isFormatXY() && this.handleFormatXY(e, g), s.chart.type !== "candlestick" && e[g].type !== "candlestick" && s.chart.type !== "boxPlot" && e[g].type !== "boxPlot" || this.handleCandleStickBoxData(e, g), r.series.push(this.twoDSeries), r.labels.push(this.twoDSeriesX), r.seriesX.push(this.twoDSeriesX), r.seriesGoals = this.seriesGoals, g !== this.activeSeriesIndex || this.fallbackToCategory || (r.isXNumeric = !0); 67428 else { 67429 s.xaxis.type === "datetime" ? (r.isXNumeric = !0, d(), r.seriesX.push(this.twoDSeriesX)) : s.xaxis.type === "numeric" && (r.isXNumeric = !0, o.length > 0 && (this.twoDSeriesX = o, r.seriesX.push(this.twoDSeriesX))), r.labels.push(this.twoDSeriesX); 67430 var p = e[g].data.map(function(f) { 67431 return P.parseNumber(f); 67432 }); 67433 r.series.push(p); 67434 } 67435 r.seriesZ.push(this.threeDSeries), e[g].name !== void 0 ? r.seriesNames.push(e[g].name) : r.seriesNames.push("series-" + parseInt(g + 1, 10)), e[g].color !== void 0 ? r.seriesColors.push(e[g].color) : r.seriesColors.push(void 0); 67436 } 67437 return this.w; 67438 } }, { key: "parseDataNonAxisCharts", value: function(e) { 67439 var t = this.w.globals, i = this.w.config; 67440 t.series = e.slice(), t.seriesNames = i.labels.slice(); 67441 for (var a = 0; a < t.series.length; a++) 67442 t.seriesNames[a] === void 0 && t.seriesNames.push("series-" + (a + 1)); 67443 return this.w; 67444 } }, { key: "handleExternalLabelsData", value: function(e) { 67445 var t = this.w.config, i = this.w.globals; 67446 t.xaxis.categories.length > 0 ? i.labels = t.xaxis.categories : t.labels.length > 0 ? i.labels = t.labels.slice() : this.fallbackToCategory ? (i.labels = i.labels[0], i.seriesRange.length && (i.seriesRange.map(function(a) { 67447 a.forEach(function(s) { 67448 i.labels.indexOf(s.x) < 0 && s.x && i.labels.push(s.x); 67449 }); 67450 }), i.labels = Array.from(new Set(i.labels.map(JSON.stringify)), JSON.parse)), t.xaxis.convertedCatToNumeric && (new oe(t).convertCatToNumericXaxis(t, this.ctx, i.seriesX[0]), this._generateExternalLabels(e))) : this._generateExternalLabels(e); 67451 } }, { key: "_generateExternalLabels", value: function(e) { 67452 var t = this.w.globals, i = this.w.config, a = []; 67453 if (t.axisCharts) { 67454 if (t.series.length > 0) 67455 if (this.isFormatXY()) 67456 for (var s = i.series.map(function(d, g) { 67457 return d.data.filter(function(p, f, b) { 67458 return b.findIndex(function(m) { 67459 return m.x === p.x; 67460 }) === f; 67461 }); 67462 }), r = s.reduce(function(d, g, p, f) { 67463 return f[d].length > g.length ? d : p; 67464 }, 0), n = 0; n < s[r].length; n++) 67465 a.push(n + 1); 67466 else 67467 for (var o = 0; o < t.series[t.maxValsInArrayIndex].length; o++) 67468 a.push(o + 1); 67469 t.seriesX = []; 67470 for (var h = 0; h < e.length; h++) 67471 t.seriesX.push(a); 67472 this.w.globals.isBarHorizontal || (t.isXNumeric = !0); 67473 } 67474 if (a.length === 0) { 67475 a = t.axisCharts ? [] : t.series.map(function(d, g) { 67476 return g + 1; 67477 }); 67478 for (var c = 0; c < e.length; c++) 67479 t.seriesX.push(a); 67480 } 67481 t.labels = a, i.xaxis.convertedCatToNumeric && (t.categoryLabels = a.map(function(d) { 67482 return i.xaxis.labels.formatter(d); 67483 })), t.noLabelsProvided = !0; 67484 } }, { key: "parseData", value: function(e) { 67485 var t = this.w, i = t.config, a = t.globals; 67486 if (this.excludeCollapsedSeriesInYAxis(), this.fallbackToCategory = !1, this.ctx.core.resetGlobals(), this.ctx.core.isMultipleY(), a.axisCharts ? (this.parseDataAxisCharts(e), this.coreUtils.getLargestSeries()) : this.parseDataNonAxisCharts(e), i.chart.stacked) { 67487 var s = new te(this.ctx); 67488 a.series = s.setNullSeriesToZeroValues(a.series); 67489 } 67490 this.coreUtils.getSeriesTotals(), a.axisCharts && (a.stackedSeriesTotals = this.coreUtils.getStackedSeriesTotals(), a.stackedSeriesTotalsByGroups = this.coreUtils.getStackedSeriesTotalsByGroups()), this.coreUtils.getPercentSeries(), a.dataFormatXNumeric || a.isXNumeric && (i.xaxis.type !== "numeric" || i.labels.length !== 0 || i.xaxis.categories.length !== 0) || this.handleExternalLabelsData(e); 67491 for (var r = this.coreUtils.getCategoryLabels(a.labels), n = 0; n < r.length; n++) 67492 if (Array.isArray(r[n])) { 67493 a.isMultiLineX = !0; 67494 break; 67495 } 67496 } }, { key: "excludeCollapsedSeriesInYAxis", value: function() { 67497 var e = this, t = this.w; 67498 t.globals.ignoreYAxisIndexes = t.globals.collapsedSeries.map(function(i, a) { 67499 if (e.w.globals.isMultipleYAxis && !t.config.chart.stacked) 67500 return i.index; 67501 }); 67502 } }]), y; 67503 }(), xe = function() { 67504 function y(e) { 67505 F(this, y), this.ctx = e, this.w = e.w; 67506 } 67507 return Y(y, [{ key: "getLabel", value: function(e, t, i, a) { 67508 var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [], r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "12px", n = !(arguments.length > 6 && arguments[6] !== void 0) || arguments[6], o = this.w, h = e[a] === void 0 ? "" : e[a], c = h, d = o.globals.xLabelFormatter, g = o.config.xaxis.labels.formatter, p = !1, f = new re(this.ctx), b = h; 67509 n && (c = f.xLabelFormat(d, h, b, { i: a, dateFormatter: new B(this.ctx).formatDate, w: o }), g !== void 0 && (c = g(h, e[a], { i: a, dateFormatter: new B(this.ctx).formatDate, w: o }))); 67510 var m, w; 67511 t.length > 0 ? (m = t[a].unit, w = null, t.forEach(function(x) { 67512 x.unit === "month" ? w = "year" : x.unit === "day" ? w = "month" : x.unit === "hour" ? w = "day" : x.unit === "minute" && (w = "hour"); 67513 }), p = w === m, i = t[a].position, c = t[a].value) : o.config.xaxis.type === "datetime" && g === void 0 && (c = ""), c === void 0 && (c = ""), c = Array.isArray(c) ? c : c.toString(); 67514 var A = new M(this.ctx), l = {}; 67515 l = o.globals.rotateXLabels && n ? A.getTextRects(c, parseInt(r, 10), null, "rotate(".concat(o.config.xaxis.labels.rotate, " 0 0)"), !1) : A.getTextRects(c, parseInt(r, 10)); 67516 var u = !o.config.xaxis.labels.showDuplicates && this.ctx.timeScale; 67517 return !Array.isArray(c) && (c.indexOf("NaN") === 0 || c.toLowerCase().indexOf("invalid") === 0 || c.toLowerCase().indexOf("infinity") >= 0 || s.indexOf(c) >= 0 && u) && (c = ""), { x: i, text: c, textRect: l, isBold: p }; 67518 } }, { key: "checkLabelBasedOnTickamount", value: function(e, t, i) { 67519 var a = this.w, s = a.config.xaxis.tickAmount; 67520 return s === "dataPoints" && (s = Math.round(a.globals.gridWidth / 120)), s > i || e % Math.round(i / (s + 1)) == 0 || (t.text = ""), t; 67521 } }, { key: "checkForOverflowingLabels", value: function(e, t, i, a, s) { 67522 var r = this.w; 67523 if (e === 0 && r.globals.skipFirstTimelinelabel && (t.text = ""), e === i - 1 && r.globals.skipLastTimelinelabel && (t.text = ""), r.config.xaxis.labels.hideOverlappingLabels && a.length > 0) { 67524 var n = s[s.length - 1]; 67525 t.x < n.textRect.width / (r.globals.rotateXLabels ? Math.abs(r.config.xaxis.labels.rotate) / 12 : 1.01) + n.x && (t.text = ""); 67526 } 67527 return t; 67528 } }, { key: "checkForReversedLabels", value: function(e, t) { 67529 var i = this.w; 67530 return i.config.yaxis[e] && i.config.yaxis[e].reversed && t.reverse(), t; 67531 } }, { key: "isYAxisHidden", value: function(e) { 67532 var t = this.w, i = new q(this.ctx); 67533 return !t.config.yaxis[e].show || !t.config.yaxis[e].showForNullSeries && i.isSeriesNull(e) && t.globals.collapsedSeriesIndices.indexOf(e) === -1; 67534 } }, { key: "getYAxisForeColor", value: function(e, t) { 67535 var i = this.w; 67536 return Array.isArray(e) && i.globals.yAxisScale[t] && this.ctx.theme.pushExtraColors(e, i.globals.yAxisScale[t].result.length, !1), e; 67537 } }, { key: "drawYAxisTicks", value: function(e, t, i, a, s, r, n) { 67538 var o = this.w, h = new M(this.ctx), c = o.globals.translateY; 67539 if (a.show && t > 0) { 67540 o.config.yaxis[s].opposite === !0 && (e += a.width); 67541 for (var d = t; d >= 0; d--) { 67542 var g = c + t / 10 + o.config.yaxis[s].labels.offsetY - 1; 67543 o.globals.isBarHorizontal && (g = r * d), o.config.chart.type === "heatmap" && (g += r / 2); 67544 var p = h.drawLine(e + i.offsetX - a.width + a.offsetX, g + a.offsetY, e + i.offsetX + a.offsetX, g + a.offsetY, a.color); 67545 n.add(p), c += r; 67546 } 67547 } 67548 } }]), y; 67549 }(), Ee = function() { 67550 function y(e) { 67551 F(this, y), this.ctx = e, this.w = e.w; 67552 } 67553 return Y(y, [{ key: "scaleSvgNode", value: function(e, t) { 67554 var i = parseFloat(e.getAttributeNS(null, "width")), a = parseFloat(e.getAttributeNS(null, "height")); 67555 e.setAttributeNS(null, "width", i * t), e.setAttributeNS(null, "height", a * t), e.setAttributeNS(null, "viewBox", "0 0 " + i + " " + a); 67556 } }, { key: "fixSvgStringForIe11", value: function(e) { 67557 if (!P.isIE11()) 67558 return e.replace(/ /g, " "); 67559 var t = 0, i = e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g, function(a) { 67560 return ++t === 2 ? 'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"' : a; 67561 }); 67562 return i = (i = i.replace(/xmlns:NS\d+=""/g, "")).replace(/NS\d+:(\w+:\w+=")/g, "$1"); 67563 } }, { key: "getSvgString", value: function(e) { 67564 e == null && (e = 1); 67565 var t = this.w.globals.dom.Paper.svg(); 67566 if (e !== 1) { 67567 var i = this.w.globals.dom.Paper.node.cloneNode(!0); 67568 this.scaleSvgNode(i, e), t = new XMLSerializer().serializeToString(i); 67569 } 67570 return this.fixSvgStringForIe11(t); 67571 } }, { key: "cleanup", value: function() { 67572 var e = this.w, t = e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"), i = e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"), a = e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect"); 67573 Array.prototype.forEach.call(a, function(s) { 67574 s.setAttribute("width", 0); 67575 }), t && t[0] && (t[0].setAttribute("x", -500), t[0].setAttribute("x1", -500), t[0].setAttribute("x2", -500)), i && i[0] && (i[0].setAttribute("y", -100), i[0].setAttribute("y1", -100), i[0].setAttribute("y2", -100)); 67576 } }, { key: "svgUrl", value: function() { 67577 this.cleanup(); 67578 var e = this.getSvgString(), t = new Blob([e], { type: "image/svg+xml;charset=utf-8" }); 67579 return URL.createObjectURL(t); 67580 } }, { key: "dataURI", value: function(e) { 67581 var t = this; 67582 return new Promise(function(i) { 67583 var a = t.w, s = e ? e.scale || e.width / a.globals.svgWidth : 1; 67584 t.cleanup(); 67585 var r = document.createElement("canvas"); 67586 r.width = a.globals.svgWidth * s, r.height = parseInt(a.globals.dom.elWrap.style.height, 10) * s; 67587 var n = a.config.chart.background === "transparent" ? "#fff" : a.config.chart.background, o = r.getContext("2d"); 67588 o.fillStyle = n, o.fillRect(0, 0, r.width * s, r.height * s); 67589 var h = t.getSvgString(s); 67590 if (window.canvg && P.isIE11()) { 67591 var c = window.canvg.Canvg.fromString(o, h, { ignoreClear: !0, ignoreDimensions: !0 }); 67592 c.start(); 67593 var d = r.msToBlob(); 67594 c.stop(), i({ blob: d }); 67595 } else { 67596 var g = "data:image/svg+xml," + encodeURIComponent(h), p = new Image(); 67597 p.crossOrigin = "anonymous", p.onload = function() { 67598 if (o.drawImage(p, 0, 0), r.msToBlob) { 67599 var f = r.msToBlob(); 67600 i({ blob: f }); 67601 } else { 67602 var b = r.toDataURL("image/png"); 67603 i({ imgURI: b }); 67604 } 67605 }, p.src = g; 67606 } 67607 }); 67608 } }, { key: "exportToSVG", value: function() { 67609 this.triggerDownload(this.svgUrl(), this.w.config.chart.toolbar.export.svg.filename, ".svg"); 67610 } }, { key: "exportToPng", value: function() { 67611 var e = this; 67612 this.dataURI().then(function(t) { 67613 var i = t.imgURI, a = t.blob; 67614 a ? navigator.msSaveOrOpenBlob(a, e.w.globals.chartID + ".png") : e.triggerDownload(i, e.w.config.chart.toolbar.export.png.filename, ".png"); 67615 }); 67616 } }, { key: "exportToCSV", value: function(e) { 67617 var t = this, i = e.series, a = e.fileName, s = e.columnDelimiter, r = s === void 0 ? "," : s, n = e.lineDelimiter, o = n === void 0 ? ` 67618` : n, h = this.w; 67619 i || (i = h.config.series); 67620 var c, d, g = [], p = [], f = "", b = h.globals.series.map(function(v, k) { 67621 return h.globals.collapsedSeriesIndices.indexOf(k) === -1 ? v : []; 67622 }), m = function(v) { 67623 return h.config.xaxis.type === "datetime" && String(v).length >= 10; 67624 }, w = Math.max.apply(Math, J(i.map(function(v) { 67625 return v.data ? v.data.length : 0; 67626 }))), A = new Je(this.ctx), l = new xe(this.ctx), u = function(v) { 67627 var k = ""; 67628 if (h.globals.axisCharts) { 67629 if (h.config.xaxis.type === "category" || h.config.xaxis.convertedCatToNumeric) 67630 if (h.globals.isBarHorizontal) { 67631 var S = h.globals.yLabelFormatters[0], C = new te(t.ctx).getActiveConfigSeriesIndex(); 67632 k = S(h.globals.labels[v], { seriesIndex: C, dataPointIndex: v, w: h }); 67633 } else 67634 k = l.getLabel(h.globals.labels, h.globals.timescaleLabels, 0, v).text; 67635 h.config.xaxis.type === "datetime" && (h.config.xaxis.categories.length ? k = h.config.xaxis.categories[v] : h.config.labels.length && (k = h.config.labels[v])); 67636 } else 67637 k = h.config.labels[v]; 67638 return Array.isArray(k) && (k = k.join(" ")), P.isNumber(k) ? k : k.split(r).join(""); 67639 }, x = function(v, k) { 67640 if (g.length && k === 0 && p.push(g.join(r)), v.data) { 67641 v.data = v.data.length && v.data || J(Array(w)).map(function() { 67642 return ""; 67643 }); 67644 for (var S = 0; S < v.data.length; S++) { 67645 g = []; 67646 var C = u(S); 67647 if (C || (A.isFormatXY() ? C = i[k].data[S].x : A.isFormat2DArray() && (C = i[k].data[S] ? i[k].data[S][0] : "")), k === 0) { 67648 g.push(m(C) ? h.config.chart.toolbar.export.csv.dateFormatter(C) : P.isNumber(C) ? C : C.split(r).join("")); 67649 for (var L = 0; L < h.globals.series.length; L++) { 67650 var I; 67651 A.isFormatXY() ? g.push((I = i[L].data[S]) === null || I === void 0 ? void 0 : I.y) : g.push(b[L][S]); 67652 } 67653 } 67654 (h.config.chart.type === "candlestick" || v.type && v.type === "candlestick") && (g.pop(), g.push(h.globals.seriesCandleO[k][S]), g.push(h.globals.seriesCandleH[k][S]), g.push(h.globals.seriesCandleL[k][S]), g.push(h.globals.seriesCandleC[k][S])), (h.config.chart.type === "boxPlot" || v.type && v.type === "boxPlot") && (g.pop(), g.push(h.globals.seriesCandleO[k][S]), g.push(h.globals.seriesCandleH[k][S]), g.push(h.globals.seriesCandleM[k][S]), g.push(h.globals.seriesCandleL[k][S]), g.push(h.globals.seriesCandleC[k][S])), h.config.chart.type === "rangeBar" && (g.pop(), g.push(h.globals.seriesRangeStart[k][S]), g.push(h.globals.seriesRangeEnd[k][S])), g.length && p.push(g.join(r)); 67655 } 67656 } 67657 }; 67658 g.push(h.config.chart.toolbar.export.csv.headerCategory), h.config.chart.type === "boxPlot" ? (g.push("minimum"), g.push("q1"), g.push("median"), g.push("q3"), g.push("maximum")) : h.config.chart.type === "candlestick" ? (g.push("open"), g.push("high"), g.push("low"), g.push("close")) : h.config.chart.type === "rangeBar" ? (g.push("minimum"), g.push("maximum")) : i.map(function(v, k) { 67659 var S = (v.name ? v.name : "series-".concat(k)) + ""; 67660 h.globals.axisCharts && g.push(S.split(r).join("") ? S.split(r).join("") : "series-".concat(k)); 67661 }), h.globals.axisCharts || (g.push(h.config.chart.toolbar.export.csv.headerValue), p.push(g.join(r))), h.globals.allSeriesHasEqualX || !h.globals.axisCharts || h.config.xaxis.categories.length || h.config.labels.length ? i.map(function(v, k) { 67662 h.globals.axisCharts ? x(v, k) : ((g = []).push(h.globals.labels[k].split(r).join("")), g.push(b[k]), p.push(g.join(r))); 67663 }) : (c = /* @__PURE__ */ new Set(), d = {}, i.forEach(function(v, k) { 67664 v == null || v.data.forEach(function(S) { 67665 var C, L; 67666 if (A.isFormatXY()) 67667 C = S.x, L = S.y; 67668 else { 67669 if (!A.isFormat2DArray()) 67670 return; 67671 C = S[0], L = S[1]; 67672 } 67673 d[C] || (d[C] = Array(i.length).fill("")), d[C][k] = L, c.add(C); 67674 }); 67675 }), g.length && p.push(g.join(r)), Array.from(c).sort().forEach(function(v) { 67676 p.push([m(v) && h.config.xaxis.type === "datetime" ? h.config.chart.toolbar.export.csv.dateFormatter(v) : P.isNumber(v) ? v : v.split(r).join(""), d[v].join(r)]); 67677 })), f += p.join(o), this.triggerDownload("data:text/csv; charset=utf-8," + encodeURIComponent("\uFEFF" + f), a || h.config.chart.toolbar.export.csv.filename, ".csv"); 67678 } }, { key: "triggerDownload", value: function(e, t, i) { 67679 var a = document.createElement("a"); 67680 a.href = e, a.download = (t || this.w.globals.chartID) + i, document.body.appendChild(a), a.click(), document.body.removeChild(a); 67681 } }]), y; 67682 }(), Ie = function() { 67683 function y(e, t) { 67684 F(this, y), this.ctx = e, this.elgrid = t, this.w = e.w; 67685 var i = this.w; 67686 this.axesUtils = new xe(e), this.xaxisLabels = i.globals.labels.slice(), i.globals.timescaleLabels.length > 0 && !i.globals.isBarHorizontal && (this.xaxisLabels = i.globals.timescaleLabels.slice()), i.config.xaxis.overwriteCategories && (this.xaxisLabels = i.config.xaxis.overwriteCategories), this.drawnLabels = [], this.drawnLabelsRects = [], i.config.xaxis.position === "top" ? this.offY = 0 : this.offY = i.globals.gridHeight + 1, this.offY = this.offY + i.config.xaxis.axisBorder.offsetY, this.isCategoryBarHorizontal = i.config.chart.type === "bar" && i.config.plotOptions.bar.horizontal, this.xaxisFontSize = i.config.xaxis.labels.style.fontSize, this.xaxisFontFamily = i.config.xaxis.labels.style.fontFamily, this.xaxisForeColors = i.config.xaxis.labels.style.colors, this.xaxisBorderWidth = i.config.xaxis.axisBorder.width, this.isCategoryBarHorizontal && (this.xaxisBorderWidth = i.config.yaxis[0].axisBorder.width.toString()), this.xaxisBorderWidth.indexOf("%") > -1 ? this.xaxisBorderWidth = i.globals.gridWidth * parseInt(this.xaxisBorderWidth, 10) / 100 : this.xaxisBorderWidth = parseInt(this.xaxisBorderWidth, 10), this.xaxisBorderHeight = i.config.xaxis.axisBorder.height, this.yaxis = i.config.yaxis[0]; 67687 } 67688 return Y(y, [{ key: "drawXaxis", value: function() { 67689 var e = this.w, t = new M(this.ctx), i = t.group({ class: "apexcharts-xaxis", transform: "translate(".concat(e.config.xaxis.offsetX, ", ").concat(e.config.xaxis.offsetY, ")") }), a = t.group({ class: "apexcharts-xaxis-texts-g", transform: "translate(".concat(e.globals.translateXAxisX, ", ").concat(e.globals.translateXAxisY, ")") }); 67690 i.add(a); 67691 for (var s = [], r = 0; r < this.xaxisLabels.length; r++) 67692 s.push(this.xaxisLabels[r]); 67693 if (this.drawXAxisLabelAndGroup(!0, t, a, s, e.globals.isXNumeric, function(f, b) { 67694 return b; 67695 }), e.globals.hasXaxisGroups) { 67696 var n = e.globals.groups; 67697 s = []; 67698 for (var o = 0; o < n.length; o++) 67699 s.push(n[o].title); 67700 var h = {}; 67701 e.config.xaxis.group.style && (h.xaxisFontSize = e.config.xaxis.group.style.fontSize, h.xaxisFontFamily = e.config.xaxis.group.style.fontFamily, h.xaxisForeColors = e.config.xaxis.group.style.colors, h.fontWeight = e.config.xaxis.group.style.fontWeight, h.cssClass = e.config.xaxis.group.style.cssClass), this.drawXAxisLabelAndGroup(!1, t, a, s, !1, function(f, b) { 67702 return n[f].cols * b; 67703 }, h); 67704 } 67705 if (e.config.xaxis.title.text !== void 0) { 67706 var c = t.group({ class: "apexcharts-xaxis-title" }), d = t.drawText({ x: e.globals.gridWidth / 2 + e.config.xaxis.title.offsetX, y: this.offY + parseFloat(this.xaxisFontSize) + (e.config.xaxis.position === "bottom" ? e.globals.xAxisLabelsHeight : -e.globals.xAxisLabelsHeight - 10) + e.config.xaxis.title.offsetY, text: e.config.xaxis.title.text, textAnchor: "middle", fontSize: e.config.xaxis.title.style.fontSize, fontFamily: e.config.xaxis.title.style.fontFamily, fontWeight: e.config.xaxis.title.style.fontWeight, foreColor: e.config.xaxis.title.style.color, cssClass: "apexcharts-xaxis-title-text " + e.config.xaxis.title.style.cssClass }); 67707 c.add(d), i.add(c); 67708 } 67709 if (e.config.xaxis.axisBorder.show) { 67710 var g = e.globals.barPadForNumericAxis, p = t.drawLine(e.globals.padHorizontal + e.config.xaxis.axisBorder.offsetX - g, this.offY, this.xaxisBorderWidth + g, this.offY, e.config.xaxis.axisBorder.color, 0, this.xaxisBorderHeight); 67711 this.elgrid && this.elgrid.elGridBorders && e.config.grid.show ? this.elgrid.elGridBorders.add(p) : i.add(p); 67712 } 67713 return i; 67714 } }, { key: "drawXAxisLabelAndGroup", value: function(e, t, i, a, s, r) { 67715 var n, o = this, h = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : {}, c = [], d = [], g = this.w, p = h.xaxisFontSize || this.xaxisFontSize, f = h.xaxisFontFamily || this.xaxisFontFamily, b = h.xaxisForeColors || this.xaxisForeColors, m = h.fontWeight || g.config.xaxis.labels.style.fontWeight, w = h.cssClass || g.config.xaxis.labels.style.cssClass, A = g.globals.padHorizontal, l = a.length, u = g.config.xaxis.type === "category" ? g.globals.dataPoints : l; 67716 if (u === 0 && l > u && (u = l), s) { 67717 var x = u > 1 ? u - 1 : u; 67718 n = g.globals.gridWidth / Math.min(x, l - 1), A = A + r(0, n) / 2 + g.config.xaxis.labels.offsetX; 67719 } else 67720 n = g.globals.gridWidth / u, A = A + r(0, n) + g.config.xaxis.labels.offsetX; 67721 for (var v = function(S) { 67722 var C = A - r(S, n) / 2 + g.config.xaxis.labels.offsetX; 67723 S === 0 && l === 1 && n / 2 === A && u === 1 && (C = g.globals.gridWidth / 2); 67724 var L = o.axesUtils.getLabel(a, g.globals.timescaleLabels, C, S, c, p, e), I = 28; 67725 if (g.globals.rotateXLabels && e && (I = 22), g.config.xaxis.title.text && g.config.xaxis.position === "top" && (I += parseFloat(g.config.xaxis.title.style.fontSize) + 2), e || (I = I + parseFloat(p) + (g.globals.xAxisLabelsHeight - g.globals.xAxisGroupLabelsHeight) + (g.globals.rotateXLabels ? 10 : 0)), L = g.config.xaxis.tickAmount !== void 0 && g.config.xaxis.tickAmount !== "dataPoints" && g.config.xaxis.type !== "datetime" ? o.axesUtils.checkLabelBasedOnTickamount(S, L, l) : o.axesUtils.checkForOverflowingLabels(S, L, l, c, d), g.config.xaxis.labels.show) { 67726 var z = t.drawText({ x: L.x, y: o.offY + g.config.xaxis.labels.offsetY + I - (g.config.xaxis.position === "top" ? g.globals.xAxisHeight + g.config.xaxis.axisTicks.height - 2 : 0), text: L.text, textAnchor: "middle", fontWeight: L.isBold ? 600 : m, fontSize: p, fontFamily: f, foreColor: Array.isArray(b) ? e && g.config.xaxis.convertedCatToNumeric ? b[g.globals.minX + S - 1] : b[S] : b, isPlainText: !1, cssClass: (e ? "apexcharts-xaxis-label " : "apexcharts-xaxis-group-label ") + w }); 67727 if (i.add(z), z.on("click", function(E) { 67728 if (typeof g.config.chart.events.xAxisLabelClick == "function") { 67729 var R = Object.assign({}, g, { labelIndex: S }); 67730 g.config.chart.events.xAxisLabelClick(E, o.ctx, R); 67731 } 67732 }), e) { 67733 var T = document.createElementNS(g.globals.SVGNS, "title"); 67734 T.textContent = Array.isArray(L.text) ? L.text.join(" ") : L.text, z.node.appendChild(T), L.text !== "" && (c.push(L.text), d.push(L)); 67735 } 67736 } 67737 S < l - 1 && (A += r(S + 1, n)); 67738 }, k = 0; k <= l - 1; k++) 67739 v(k); 67740 } }, { key: "drawXaxisInversed", value: function(e) { 67741 var t, i, a = this, s = this.w, r = new M(this.ctx), n = s.config.yaxis[0].opposite ? s.globals.translateYAxisX[e] : 0, o = r.group({ class: "apexcharts-yaxis apexcharts-xaxis-inversed", rel: e }), h = r.group({ class: "apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g", transform: "translate(" + n + ", 0)" }); 67742 o.add(h); 67743 var c = []; 67744 if (s.config.yaxis[e].show) 67745 for (var d = 0; d < this.xaxisLabels.length; d++) 67746 c.push(this.xaxisLabels[d]); 67747 t = s.globals.gridHeight / c.length, i = -t / 2.2; 67748 var g = s.globals.yLabelFormatters[0], p = s.config.yaxis[0].labels; 67749 if (p.show) 67750 for (var f = function(x) { 67751 var v = c[x] === void 0 ? "" : c[x]; 67752 v = g(v, { seriesIndex: e, dataPointIndex: x, w: s }); 67753 var k = a.axesUtils.getYAxisForeColor(p.style.colors, e), S = 0; 67754 Array.isArray(v) && (S = v.length / 2 * parseInt(p.style.fontSize, 10)); 67755 var C = p.offsetX - 15, L = "end"; 67756 a.yaxis.opposite && (L = "start"), s.config.yaxis[0].labels.align === "left" ? (C = p.offsetX, L = "start") : s.config.yaxis[0].labels.align === "center" ? (C = p.offsetX, L = "middle") : s.config.yaxis[0].labels.align === "right" && (L = "end"); 67757 var I = r.drawText({ x: C, y: i + t + p.offsetY - S, text: v, textAnchor: L, foreColor: Array.isArray(k) ? k[x] : k, fontSize: p.style.fontSize, fontFamily: p.style.fontFamily, fontWeight: p.style.fontWeight, isPlainText: !1, cssClass: "apexcharts-yaxis-label " + p.style.cssClass, maxWidth: p.maxWidth }); 67758 h.add(I), I.on("click", function(E) { 67759 if (typeof s.config.chart.events.xAxisLabelClick == "function") { 67760 var R = Object.assign({}, s, { labelIndex: x }); 67761 s.config.chart.events.xAxisLabelClick(E, a.ctx, R); 67762 } 67763 }); 67764 var z = document.createElementNS(s.globals.SVGNS, "title"); 67765 if (z.textContent = Array.isArray(v) ? v.join(" ") : v, I.node.appendChild(z), s.config.yaxis[e].labels.rotate !== 0) { 67766 var T = r.rotateAroundCenter(I.node); 67767 I.node.setAttribute("transform", "rotate(".concat(s.config.yaxis[e].labels.rotate, " 0 ").concat(T.y, ")")); 67768 } 67769 i += t; 67770 }, b = 0; b <= c.length - 1; b++) 67771 f(b); 67772 if (s.config.yaxis[0].title.text !== void 0) { 67773 var m = r.group({ class: "apexcharts-yaxis-title apexcharts-xaxis-title-inversed", transform: "translate(" + n + ", 0)" }), w = r.drawText({ x: s.config.yaxis[0].title.offsetX, y: s.globals.gridHeight / 2 + s.config.yaxis[0].title.offsetY, text: s.config.yaxis[0].title.text, textAnchor: "middle", foreColor: s.config.yaxis[0].title.style.color, fontSize: s.config.yaxis[0].title.style.fontSize, fontWeight: s.config.yaxis[0].title.style.fontWeight, fontFamily: s.config.yaxis[0].title.style.fontFamily, cssClass: "apexcharts-yaxis-title-text " + s.config.yaxis[0].title.style.cssClass }); 67774 m.add(w), o.add(m); 67775 } 67776 var A = 0; 67777 this.isCategoryBarHorizontal && s.config.yaxis[0].opposite && (A = s.globals.gridWidth); 67778 var l = s.config.xaxis.axisBorder; 67779 if (l.show) { 67780 var u = r.drawLine(s.globals.padHorizontal + l.offsetX + A, 1 + l.offsetY, s.globals.padHorizontal + l.offsetX + A, s.globals.gridHeight + l.offsetY, l.color, 0); 67781 this.elgrid && this.elgrid.elGridBorders && s.config.grid.show ? this.elgrid.elGridBorders.add(u) : o.add(u); 67782 } 67783 return s.config.yaxis[0].axisTicks.show && this.axesUtils.drawYAxisTicks(A, c.length, s.config.yaxis[0].axisBorder, s.config.yaxis[0].axisTicks, 0, t, o), o; 67784 } }, { key: "drawXaxisTicks", value: function(e, t, i) { 67785 var a = this.w, s = e; 67786 if (!(e < 0 || e - 2 > a.globals.gridWidth)) { 67787 var r = this.offY + a.config.xaxis.axisTicks.offsetY; 67788 if (t = t + r + a.config.xaxis.axisTicks.height, a.config.xaxis.position === "top" && (t = r - a.config.xaxis.axisTicks.height), a.config.xaxis.axisTicks.show) { 67789 var n = new M(this.ctx).drawLine(e + a.config.xaxis.axisTicks.offsetX, r + a.config.xaxis.offsetY, s + a.config.xaxis.axisTicks.offsetX, t + a.config.xaxis.offsetY, a.config.xaxis.axisTicks.color); 67790 i.add(n), n.node.classList.add("apexcharts-xaxis-tick"); 67791 } 67792 } 67793 } }, { key: "getXAxisTicksPositions", value: function() { 67794 var e = this.w, t = [], i = this.xaxisLabels.length, a = e.globals.padHorizontal; 67795 if (e.globals.timescaleLabels.length > 0) 67796 for (var s = 0; s < i; s++) 67797 a = this.xaxisLabels[s].position, t.push(a); 67798 else 67799 for (var r = i, n = 0; n < r; n++) { 67800 var o = r; 67801 e.globals.isXNumeric && e.config.chart.type !== "bar" && (o -= 1), a += e.globals.gridWidth / o, t.push(a); 67802 } 67803 return t; 67804 } }, { key: "xAxisLabelCorrections", value: function() { 67805 var e = this.w, t = new M(this.ctx), i = e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"), a = e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"), s = e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"), r = e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan"); 67806 if (e.globals.rotateXLabels || e.config.xaxis.labels.rotateAlways) 67807 for (var n = 0; n < a.length; n++) { 67808 var o = t.rotateAroundCenter(a[n]); 67809 o.y = o.y - 1, o.x = o.x + 1, a[n].setAttribute("transform", "rotate(".concat(e.config.xaxis.labels.rotate, " ").concat(o.x, " ").concat(o.y, ")")), a[n].setAttribute("text-anchor", "end"), i.setAttribute("transform", "translate(0, ".concat(-10, ")")); 67810 var h = a[n].childNodes; 67811 e.config.xaxis.labels.trim && Array.prototype.forEach.call(h, function(p) { 67812 t.placeTextWithEllipsis(p, p.textContent, e.globals.xAxisLabelsHeight - (e.config.legend.position === "bottom" ? 20 : 10)); 67813 }); 67814 } 67815 else 67816 (function() { 67817 for (var p = e.globals.gridWidth / (e.globals.labels.length + 1), f = 0; f < a.length; f++) { 67818 var b = a[f].childNodes; 67819 e.config.xaxis.labels.trim && e.config.xaxis.type !== "datetime" && Array.prototype.forEach.call(b, function(m) { 67820 t.placeTextWithEllipsis(m, m.textContent, p); 67821 }); 67822 } 67823 })(); 67824 if (s.length > 0) { 67825 var c = s[s.length - 1].getBBox(), d = s[0].getBBox(); 67826 c.x < -20 && s[s.length - 1].parentNode.removeChild(s[s.length - 1]), d.x + d.width > e.globals.gridWidth && !e.globals.isBarHorizontal && s[0].parentNode.removeChild(s[0]); 67827 for (var g = 0; g < r.length; g++) 67828 t.placeTextWithEllipsis(r[g], r[g].textContent, e.config.yaxis[0].labels.maxWidth - (e.config.yaxis[0].title.text ? 2 * parseFloat(e.config.yaxis[0].title.style.fontSize) : 0) - 15); 67829 } 67830 } }]), y; 67831 }(), Qe = function() { 67832 function y(e) { 67833 F(this, y), this.ctx = e, this.w = e.w; 67834 var t = this.w; 67835 this.xaxisLabels = t.globals.labels.slice(), this.axesUtils = new xe(e), this.isRangeBar = t.globals.seriesRange.length && t.globals.isBarHorizontal, t.globals.timescaleLabels.length > 0 && (this.xaxisLabels = t.globals.timescaleLabels.slice()); 67836 } 67837 return Y(y, [{ key: "drawGridArea", value: function() { 67838 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, t = this.w, i = new M(this.ctx); 67839 e === null && (e = i.group({ class: "apexcharts-grid" })); 67840 var a = i.drawLine(t.globals.padHorizontal, 1, t.globals.padHorizontal, t.globals.gridHeight, "transparent"), s = i.drawLine(t.globals.padHorizontal, t.globals.gridHeight, t.globals.gridWidth, t.globals.gridHeight, "transparent"); 67841 return e.add(s), e.add(a), e; 67842 } }, { key: "drawGrid", value: function() { 67843 var e = null; 67844 return this.w.globals.axisCharts && (e = this.renderGrid(), this.drawGridArea(e.el)), e; 67845 } }, { key: "createGridMask", value: function() { 67846 var e = this.w, t = e.globals, i = new M(this.ctx), a = Array.isArray(e.config.stroke.width) ? 0 : e.config.stroke.width; 67847 if (Array.isArray(e.config.stroke.width)) { 67848 var s = 0; 67849 e.config.stroke.width.forEach(function(d) { 67850 s = Math.max(s, d); 67851 }), a = s; 67852 } 67853 t.dom.elGridRectMask = document.createElementNS(t.SVGNS, "clipPath"), t.dom.elGridRectMask.setAttribute("id", "gridRectMask".concat(t.cuid)), t.dom.elGridRectMarkerMask = document.createElementNS(t.SVGNS, "clipPath"), t.dom.elGridRectMarkerMask.setAttribute("id", "gridRectMarkerMask".concat(t.cuid)), t.dom.elForecastMask = document.createElementNS(t.SVGNS, "clipPath"), t.dom.elForecastMask.setAttribute("id", "forecastMask".concat(t.cuid)), t.dom.elNonForecastMask = document.createElementNS(t.SVGNS, "clipPath"), t.dom.elNonForecastMask.setAttribute("id", "nonForecastMask".concat(t.cuid)); 67854 var r = e.config.chart.type, n = 0, o = 0; 67855 (r === "bar" || r === "rangeBar" || r === "candlestick" || r === "boxPlot" || e.globals.comboBarCount > 0) && e.globals.isXNumeric && !e.globals.isBarHorizontal && (n = e.config.grid.padding.left, o = e.config.grid.padding.right, t.barPadForNumericAxis > n && (n = t.barPadForNumericAxis, o = t.barPadForNumericAxis)), t.dom.elGridRect = i.drawRect(-a - n - 2, 2 * -a - 2, t.gridWidth + a + o + n + 4, t.gridHeight + 4 * a + 4, 0, "#fff"); 67856 var h = e.globals.markers.largestSize + 1; 67857 t.dom.elGridRectMarker = i.drawRect(2 * -h, 2 * -h, t.gridWidth + 4 * h, t.gridHeight + 4 * h, 0, "#fff"), t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node), t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node); 67858 var c = t.dom.baseEl.querySelector("defs"); 67859 c.appendChild(t.dom.elGridRectMask), c.appendChild(t.dom.elForecastMask), c.appendChild(t.dom.elNonForecastMask), c.appendChild(t.dom.elGridRectMarkerMask); 67860 } }, { key: "_drawGridLines", value: function(e) { 67861 var t = e.i, i = e.x1, a = e.y1, s = e.x2, r = e.y2, n = e.xCount, o = e.parent, h = this.w; 67862 if (!(t === 0 && h.globals.skipFirstTimelinelabel || t === n - 1 && h.globals.skipLastTimelinelabel && !h.config.xaxis.labels.formatter || h.config.chart.type === "radar")) { 67863 h.config.grid.xaxis.lines.show && this._drawGridLine({ i: t, x1: i, y1: a, x2: s, y2: r, xCount: n, parent: o }); 67864 var c = 0; 67865 if (h.globals.hasXaxisGroups && h.config.xaxis.tickPlacement === "between") { 67866 var d = h.globals.groups; 67867 if (d) { 67868 for (var g = 0, p = 0; g < t && p < d.length; p++) 67869 g += d[p].cols; 67870 g === t && (c = 0.6 * h.globals.xAxisLabelsHeight); 67871 } 67872 } 67873 new Ie(this.ctx).drawXaxisTicks(i, c, h.globals.dom.elGraphical); 67874 } 67875 } }, { key: "_drawGridLine", value: function(e) { 67876 var t = e.i, i = e.x1, a = e.y1, s = e.x2, r = e.y2, n = e.xCount, o = e.parent, h = this.w, c = !1, d = o.node.classList.contains("apexcharts-gridlines-horizontal"), g = h.config.grid.strokeDashArray, p = h.globals.barPadForNumericAxis; 67877 (a === 0 && r === 0 || i === 0 && s === 0) && (c = !0), a === h.globals.gridHeight && r === h.globals.gridHeight && (c = !0), !h.globals.isBarHorizontal || t !== 0 && t !== n - 1 || (c = !0); 67878 var f = new M(this).drawLine(i - (d ? p : 0), a, s + (d ? p : 0), r, h.config.grid.borderColor, g); 67879 f.node.classList.add("apexcharts-gridline"), c && h.config.grid.show ? this.elGridBorders.add(f) : o.add(f); 67880 } }, { key: "_drawGridBandRect", value: function(e) { 67881 var t = e.c, i = e.x1, a = e.y1, s = e.x2, r = e.y2, n = e.type, o = this.w, h = new M(this.ctx), c = o.globals.barPadForNumericAxis; 67882 if (n !== "column" || o.config.xaxis.type !== "datetime") { 67883 var d = o.config.grid[n].colors[t], g = h.drawRect(i - (n === "row" ? c : 0), a, s + (n === "row" ? 2 * c : 0), r, 0, d, o.config.grid[n].opacity); 67884 this.elg.add(g), g.attr("clip-path", "url(#gridRectMask".concat(o.globals.cuid, ")")), g.node.classList.add("apexcharts-grid-".concat(n)); 67885 } 67886 } }, { key: "_drawXYLines", value: function(e) { 67887 var t = this, i = e.xCount, a = e.tickAmount, s = this.w; 67888 if (s.config.grid.xaxis.lines.show || s.config.xaxis.axisTicks.show) { 67889 var r, n = s.globals.padHorizontal, o = s.globals.gridHeight; 67890 s.globals.timescaleLabels.length ? function(f) { 67891 for (var b = f.xC, m = f.x1, w = f.y1, A = f.x2, l = f.y2, u = 0; u < b; u++) 67892 m = t.xaxisLabels[u].position, A = t.xaxisLabels[u].position, t._drawGridLines({ i: u, x1: m, y1: w, x2: A, y2: l, xCount: i, parent: t.elgridLinesV }); 67893 }({ xC: i, x1: n, y1: 0, x2: r, y2: o }) : (s.globals.isXNumeric && (i = s.globals.xAxisScale.result.length), function(f) { 67894 for (var b = f.xC, m = f.x1, w = f.y1, A = f.x2, l = f.y2, u = 0; u < b + (s.globals.isXNumeric ? 0 : 1); u++) 67895 u === 0 && b === 1 && s.globals.dataPoints === 1 && (A = m = s.globals.gridWidth / 2), t._drawGridLines({ i: u, x1: m, y1: w, x2: A, y2: l, xCount: i, parent: t.elgridLinesV }), A = m += s.globals.gridWidth / (s.globals.isXNumeric ? b - 1 : b); 67896 }({ xC: i, x1: n, y1: 0, x2: r, y2: o })); 67897 } 67898 if (s.config.grid.yaxis.lines.show) { 67899 var h = 0, c = 0, d = s.globals.gridWidth, g = a + 1; 67900 this.isRangeBar && (g = s.globals.labels.length); 67901 for (var p = 0; p < g + (this.isRangeBar ? 1 : 0); p++) 67902 this._drawGridLine({ i: p, xCount: g + (this.isRangeBar ? 1 : 0), x1: 0, y1: h, x2: d, y2: c, parent: this.elgridLinesH }), c = h += s.globals.gridHeight / (this.isRangeBar ? g : a); 67903 } 67904 } }, { key: "_drawInvertedXYLines", value: function(e) { 67905 var t = e.xCount, i = this.w; 67906 if (i.config.grid.xaxis.lines.show || i.config.xaxis.axisTicks.show) 67907 for (var a, s = i.globals.padHorizontal, r = i.globals.gridHeight, n = 0; n < t + 1; n++) 67908 i.config.grid.xaxis.lines.show && this._drawGridLine({ i: n, xCount: t + 1, x1: s, y1: 0, x2: a, y2: r, parent: this.elgridLinesV }), new Ie(this.ctx).drawXaxisTicks(s, 0, i.globals.dom.elGraphical), a = s = s + i.globals.gridWidth / t + 0.3; 67909 if (i.config.grid.yaxis.lines.show) 67910 for (var o = 0, h = 0, c = i.globals.gridWidth, d = 0; d < i.globals.dataPoints + 1; d++) 67911 this._drawGridLine({ i: d, xCount: i.globals.dataPoints + 1, x1: 0, y1: o, x2: c, y2: h, parent: this.elgridLinesH }), h = o += i.globals.gridHeight / i.globals.dataPoints; 67912 } }, { key: "renderGrid", value: function() { 67913 var e = this.w, t = new M(this.ctx); 67914 this.elg = t.group({ class: "apexcharts-grid" }), this.elgridLinesH = t.group({ class: "apexcharts-gridlines-horizontal" }), this.elgridLinesV = t.group({ class: "apexcharts-gridlines-vertical" }), this.elGridBorders = t.group({ class: "apexcharts-grid-borders" }), this.elg.add(this.elgridLinesH), this.elg.add(this.elgridLinesV), e.config.grid.show || (this.elgridLinesV.hide(), this.elgridLinesH.hide(), this.elGridBorders.hide()); 67915 for (var i, a = e.globals.yAxisScale.length ? e.globals.yAxisScale[0].result.length - 1 : 5, s = 0; s < e.globals.series.length && (e.globals.yAxisScale[s] !== void 0 && (a = e.globals.yAxisScale[s].result.length - 1), !(a > 2)); s++) 67916 ; 67917 if (!e.globals.isBarHorizontal || this.isRangeBar) { 67918 var r, n, o; 67919 i = this.xaxisLabels.length, this.isRangeBar && (i--, a = e.globals.labels.length, e.config.xaxis.tickAmount && e.config.xaxis.labels.formatter && (i = e.config.xaxis.tickAmount), ((r = e.globals.yAxisScale) === null || r === void 0 || (n = r[0]) === null || n === void 0 || (o = n.result) === null || o === void 0 ? void 0 : o.length) > 0 && e.config.xaxis.type !== "datetime" && (i = e.globals.yAxisScale[0].result.length - 1)), this._drawXYLines({ xCount: i, tickAmount: a }); 67920 } else 67921 i = a, a = e.globals.xTickAmount, this._drawInvertedXYLines({ xCount: i, tickAmount: a }); 67922 return this.drawGridBands(i, a), { el: this.elg, elGridBorders: this.elGridBorders, xAxisTickWidth: e.globals.gridWidth / i }; 67923 } }, { key: "drawGridBands", value: function(e, t) { 67924 var i = this.w; 67925 if (i.config.grid.row.colors !== void 0 && i.config.grid.row.colors.length > 0) 67926 for (var a = 0, s = i.globals.gridHeight / t, r = i.globals.gridWidth, n = 0, o = 0; n < t; n++, o++) 67927 o >= i.config.grid.row.colors.length && (o = 0), this._drawGridBandRect({ c: o, x1: 0, y1: a, x2: r, y2: s, type: "row" }), a += i.globals.gridHeight / t; 67928 if (i.config.grid.column.colors !== void 0 && i.config.grid.column.colors.length > 0) 67929 for (var h = i.globals.isBarHorizontal || i.config.xaxis.tickPlacement !== "on" || i.config.xaxis.type !== "category" && !i.config.xaxis.convertedCatToNumeric ? e : e - 1, c = i.globals.padHorizontal, d = i.globals.padHorizontal + i.globals.gridWidth / h, g = i.globals.gridHeight, p = 0, f = 0; p < e; p++, f++) 67930 f >= i.config.grid.column.colors.length && (f = 0), this._drawGridBandRect({ c: f, x1: c, y1: 0, x2: d, y2: g, type: "column" }), c += i.globals.gridWidth / h; 67931 } }]), y; 67932 }(), we = function() { 67933 function y(e) { 67934 F(this, y), this.ctx = e, this.w = e.w; 67935 } 67936 return Y(y, [{ key: "niceScale", value: function(e, t) { 67937 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 5, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 ? arguments[4] : void 0, r = this.w, n = Math.abs(t - e); 67938 if ((i = this._adjustTicksForSmallRange(i, a, n)) === "dataPoints" && (i = r.globals.dataPoints - 1), e === Number.MIN_VALUE && t === 0 || !P.isNumber(e) && !P.isNumber(t) || e === Number.MIN_VALUE && t === -Number.MAX_VALUE) 67939 return e = 0, t = i, this.linearScale(e, t, i, a, r.config.yaxis[a].stepSize); 67940 e > t ? (console.warn("axis.min cannot be greater than axis.max"), t = e + 0.1) : e === t && (e = e === 0 ? 0 : e - 0.5, t = t === 0 ? 2 : t + 0.5); 67941 var o = []; 67942 n < 1 && s && (r.config.chart.type === "candlestick" || r.config.series[a].type === "candlestick" || r.config.chart.type === "boxPlot" || r.config.series[a].type === "boxPlot" || r.globals.isRangeData) && (t *= 1.01); 67943 var h = i + 1; 67944 h < 2 ? h = 2 : h > 2 && (h -= 2); 67945 var c = n / h, d = Math.floor(P.log10(c)), g = Math.pow(10, d), p = Math.round(c / g); 67946 p < 1 && (p = 1); 67947 var f = p * g; 67948 r.config.yaxis[a].stepSize && (f = r.config.yaxis[a].stepSize), r.globals.isBarHorizontal && r.config.xaxis.stepSize && r.config.xaxis.type !== "datetime" && (f = r.config.xaxis.stepSize); 67949 var b = f * Math.floor(e / f), m = f * Math.ceil(t / f), w = b; 67950 if (s && n > 2) { 67951 for (; o.push(P.stripNumber(w, 7)), !((w += f) > m); ) 67952 ; 67953 return { result: o, niceMin: o[0], niceMax: o[o.length - 1] }; 67954 } 67955 var A = e; 67956 (o = []).push(P.stripNumber(A, 7)); 67957 for (var l = Math.abs(t - e) / i, u = 0; u <= i; u++) 67958 A += l, o.push(A); 67959 return o[o.length - 2] >= t && o.pop(), { result: o, niceMin: o[0], niceMax: o[o.length - 1] }; 67960 } }, { key: "linearScale", value: function(e, t) { 67961 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 5, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, r = Math.abs(t - e); 67962 (i = this._adjustTicksForSmallRange(i, a, r)) === "dataPoints" && (i = this.w.globals.dataPoints - 1), s || (s = r / i), i === Number.MAX_VALUE && (i = 5, s = 1); 67963 for (var n = [], o = e; i >= 0; ) 67964 n.push(o), o += s, i -= 1; 67965 return { result: n, niceMin: n[0], niceMax: n[n.length - 1] }; 67966 } }, { key: "logarithmicScaleNice", value: function(e, t, i) { 67967 t <= 0 && (t = Math.max(e, i)), e <= 0 && (e = Math.min(t, i)); 67968 for (var a = [], s = Math.ceil(Math.log(t) / Math.log(i) + 1), r = Math.floor(Math.log(e) / Math.log(i)); r < s; r++) 67969 a.push(Math.pow(i, r)); 67970 return { result: a, niceMin: a[0], niceMax: a[a.length - 1] }; 67971 } }, { key: "logarithmicScale", value: function(e, t, i) { 67972 t <= 0 && (t = Math.max(e, i)), e <= 0 && (e = Math.min(t, i)); 67973 for (var a = [], s = Math.log(t) / Math.log(i), r = Math.log(e) / Math.log(i), n = s - r, o = Math.round(n), h = n / o, c = 0, d = r; c < o; c++, d += h) 67974 a.push(Math.pow(i, d)); 67975 return a.push(Math.pow(i, s)), { result: a, niceMin: e, niceMax: t }; 67976 } }, { key: "_adjustTicksForSmallRange", value: function(e, t, i) { 67977 var a = e; 67978 if (t !== void 0 && this.w.config.yaxis[t].labels.formatter && this.w.config.yaxis[t].tickAmount === void 0) { 67979 var s = Number(this.w.config.yaxis[t].labels.formatter(1)); 67980 P.isNumber(s) && this.w.globals.yValueDecimal === 0 && (a = Math.ceil(i)); 67981 } 67982 return a < e ? a : e; 67983 } }, { key: "setYScaleForIndex", value: function(e, t, i) { 67984 var a = this.w.globals, s = this.w.config, r = a.isBarHorizontal ? s.xaxis : s.yaxis[e]; 67985 a.yAxisScale[e] === void 0 && (a.yAxisScale[e] = []); 67986 var n = Math.abs(i - t); 67987 if (r.logarithmic && n <= 5 && (a.invalidLogScale = !0), r.logarithmic && n > 5) 67988 a.allSeriesCollapsed = !1, a.yAxisScale[e] = this.logarithmicScale(t, i, r.logBase), a.yAxisScale[e] = r.forceNiceScale ? this.logarithmicScaleNice(t, i, r.logBase) : this.logarithmicScale(t, i, r.logBase); 67989 else if (i !== -Number.MAX_VALUE && P.isNumber(i)) 67990 if (a.allSeriesCollapsed = !1, r.min === void 0 && r.max === void 0 || r.forceNiceScale) { 67991 var o = s.yaxis[e].max === void 0 && s.yaxis[e].min === void 0 || s.yaxis[e].forceNiceScale; 67992 a.yAxisScale[e] = this.niceScale(t, i, r.tickAmount ? r.tickAmount : n < 5 && n > 1 ? n + 1 : 5, e, o); 67993 } else 67994 a.yAxisScale[e] = this.linearScale(t, i, r.tickAmount, e, s.yaxis[e].stepSize); 67995 else 67996 a.yAxisScale[e] = this.linearScale(0, 5, 5, e, s.yaxis[e].stepSize); 67997 } }, { key: "setXScale", value: function(e, t) { 67998 var i = this.w, a = i.globals, s = Math.abs(t - e); 67999 return t !== -Number.MAX_VALUE && P.isNumber(t) ? a.xAxisScale = this.linearScale(e, t, i.config.xaxis.tickAmount ? i.config.xaxis.tickAmount : s < 5 && s > 1 ? s + 1 : 5, 0, i.config.xaxis.stepSize) : a.xAxisScale = this.linearScale(0, 5, 5), a.xAxisScale; 68000 } }, { key: "setMultipleYScales", value: function() { 68001 var e = this, t = this.w.globals, i = this.w.config, a = t.minYArr.concat([]), s = t.maxYArr.concat([]), r = []; 68002 i.yaxis.forEach(function(n, o) { 68003 var h = o; 68004 i.series.forEach(function(g, p) { 68005 g.name === n.seriesName && (h = p, o !== p ? r.push({ index: p, similarIndex: o, alreadyExists: !0 }) : r.push({ index: p })); 68006 }); 68007 var c = a[h], d = s[h]; 68008 e.setYScaleForIndex(o, c, d); 68009 }), this.sameScaleInMultipleAxes(a, s, r); 68010 } }, { key: "sameScaleInMultipleAxes", value: function(e, t, i) { 68011 var a = this, s = this.w.config, r = this.w.globals, n = []; 68012 i.forEach(function(b) { 68013 b.alreadyExists && (n[b.index] === void 0 && (n[b.index] = []), n[b.index].push(b.index), n[b.index].push(b.similarIndex)); 68014 }), r.yAxisSameScaleIndices = n, n.forEach(function(b, m) { 68015 n.forEach(function(w, A) { 68016 var l, u; 68017 m !== A && (l = b, u = w, l.filter(function(x) { 68018 return u.indexOf(x) !== -1; 68019 })).length > 0 && (n[m] = n[m].concat(n[A])); 68020 }); 68021 }); 68022 var o = n.map(function(b) { 68023 return b.filter(function(m, w) { 68024 return b.indexOf(m) === w; 68025 }); 68026 }).map(function(b) { 68027 return b.sort(); 68028 }); 68029 n = n.filter(function(b) { 68030 return !!b; 68031 }); 68032 var h = o.slice(), c = h.map(function(b) { 68033 return JSON.stringify(b); 68034 }); 68035 h = h.filter(function(b, m) { 68036 return c.indexOf(JSON.stringify(b)) === m; 68037 }); 68038 var d = [], g = []; 68039 e.forEach(function(b, m) { 68040 h.forEach(function(w, A) { 68041 w.indexOf(m) > -1 && (d[A] === void 0 && (d[A] = [], g[A] = []), d[A].push({ key: m, value: b }), g[A].push({ key: m, value: t[m] })); 68042 }); 68043 }); 68044 var p = Array.apply(null, Array(h.length)).map(Number.prototype.valueOf, Number.MIN_VALUE), f = Array.apply(null, Array(h.length)).map(Number.prototype.valueOf, -Number.MAX_VALUE); 68045 d.forEach(function(b, m) { 68046 b.forEach(function(w, A) { 68047 p[m] = Math.min(w.value, p[m]); 68048 }); 68049 }), g.forEach(function(b, m) { 68050 b.forEach(function(w, A) { 68051 f[m] = Math.max(w.value, f[m]); 68052 }); 68053 }), e.forEach(function(b, m) { 68054 g.forEach(function(w, A) { 68055 var l = p[A], u = f[A]; 68056 s.chart.stacked && (u = 0, w.forEach(function(x, v) { 68057 x.value !== -Number.MAX_VALUE && (u += x.value), l !== Number.MIN_VALUE && (l += d[A][v].value); 68058 })), w.forEach(function(x, v) { 68059 w[v].key === m && (s.yaxis[m].min !== void 0 && (l = typeof s.yaxis[m].min == "function" ? s.yaxis[m].min(r.minY) : s.yaxis[m].min), s.yaxis[m].max !== void 0 && (u = typeof s.yaxis[m].max == "function" ? s.yaxis[m].max(r.maxY) : s.yaxis[m].max), a.setYScaleForIndex(m, l, u)); 68060 }); 68061 }); 68062 }); 68063 } }, { key: "autoScaleY", value: function(e, t, i) { 68064 e || (e = this); 68065 var a = e.w; 68066 if (a.globals.isMultipleYAxis || a.globals.collapsedSeries.length) 68067 return console.warn("autoScaleYaxis not supported in a multi-yaxis chart."), t; 68068 var s = a.globals.seriesX[0], r = a.config.chart.stacked; 68069 return t.forEach(function(n, o) { 68070 for (var h = 0, c = 0; c < s.length; c++) 68071 if (s[c] >= i.xaxis.min) { 68072 h = c; 68073 break; 68074 } 68075 var d, g, p = a.globals.minYArr[o], f = a.globals.maxYArr[o], b = a.globals.stackedSeriesTotals; 68076 a.globals.series.forEach(function(m, w) { 68077 var A = m[h]; 68078 r ? (A = b[h], d = g = A, b.forEach(function(l, u) { 68079 s[u] <= i.xaxis.max && s[u] >= i.xaxis.min && (l > g && l !== null && (g = l), m[u] < d && m[u] !== null && (d = m[u])); 68080 })) : (d = g = A, m.forEach(function(l, u) { 68081 if (s[u] <= i.xaxis.max && s[u] >= i.xaxis.min) { 68082 var x = l, v = l; 68083 a.globals.series.forEach(function(k, S) { 68084 l !== null && (x = Math.min(k[u], x), v = Math.max(k[u], v)); 68085 }), v > g && v !== null && (g = v), x < d && x !== null && (d = x); 68086 } 68087 })), d === void 0 && g === void 0 && (d = p, g = f), g *= g < 0 ? 0.9 : 1.1, (d *= d < 0 ? 1.1 : 0.9) === 0 && g === 0 && (d = -1, g = 1), g < 0 && g < f && (g = f), d < 0 && d > p && (d = p), t.length > 1 ? (t[w].min = n.min === void 0 ? d : n.min, t[w].max = n.max === void 0 ? g : n.max) : (t[0].min = n.min === void 0 ? d : n.min, t[0].max = n.max === void 0 ? g : n.max); 68088 }); 68089 }), t; 68090 } }]), y; 68091 }(), De = function() { 68092 function y(e) { 68093 F(this, y), this.ctx = e, this.w = e.w, this.scales = new we(e); 68094 } 68095 return Y(y, [{ key: "init", value: function() { 68096 this.setYRange(), this.setXRange(), this.setZRange(); 68097 } }, { key: "getMinYMaxY", value: function(e) { 68098 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -Number.MAX_VALUE, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = this.w.config, r = this.w.globals, n = -Number.MAX_VALUE, o = Number.MIN_VALUE; 68099 a === null && (a = e + 1); 68100 var h = r.series, c = h, d = h; 68101 s.chart.type === "candlestick" ? (c = r.seriesCandleL, d = r.seriesCandleH) : s.chart.type === "boxPlot" ? (c = r.seriesCandleO, d = r.seriesCandleC) : r.isRangeData && (c = r.seriesRangeStart, d = r.seriesRangeEnd); 68102 for (var g = e; g < a; g++) { 68103 r.dataPoints = Math.max(r.dataPoints, h[g].length), r.categoryLabels.length && (r.dataPoints = r.categoryLabels.filter(function(b) { 68104 return b !== void 0; 68105 }).length), r.labels.length && s.xaxis.type !== "datetime" && r.series.reduce(function(b, m) { 68106 return b + m.length; 68107 }, 0) !== 0 && (r.dataPoints = Math.max(r.dataPoints, r.labels.length)); 68108 for (var p = 0; p < r.series[g].length; p++) { 68109 var f = h[g][p]; 68110 f !== null && P.isNumber(f) ? (d[g][p] !== void 0 && (n = Math.max(n, d[g][p]), t = Math.min(t, d[g][p])), c[g][p] !== void 0 && (t = Math.min(t, c[g][p]), i = Math.max(i, c[g][p])), this.w.config.chart.type !== "candlestick" && this.w.config.chart.type !== "boxPlot" && this.w.config.chart.type === "rangeArea" && this.w.config.chart.type === "rangeBar" || (this.w.config.chart.type !== "candlestick" && this.w.config.chart.type !== "boxPlot" || r.seriesCandleC[g][p] !== void 0 && (n = Math.max(n, r.seriesCandleO[g][p]), n = Math.max(n, r.seriesCandleH[g][p]), n = Math.max(n, r.seriesCandleL[g][p]), n = Math.max(n, r.seriesCandleC[g][p]), this.w.config.chart.type === "boxPlot" && (n = Math.max(n, r.seriesCandleM[g][p]))), !s.series[g].type || s.series[g].type === "candlestick" && s.series[g].type === "boxPlot" && s.series[g].type === "rangeArea" && s.series[g].type === "rangeBar" || (n = Math.max(n, r.series[g][p]), t = Math.min(t, r.series[g][p])), i = n), r.seriesGoals[g] && r.seriesGoals[g][p] && Array.isArray(r.seriesGoals[g][p]) && r.seriesGoals[g][p].forEach(function(b) { 68111 o !== Number.MIN_VALUE && (o = Math.min(o, b.value), t = o), n = Math.max(n, b.value), i = n; 68112 }), P.isFloat(f) && (f = P.noExponents(f), r.yValueDecimal = Math.max(r.yValueDecimal, f.toString().split(".")[1].length)), o > c[g][p] && c[g][p] < 0 && (o = c[g][p])) : r.hasNullValues = !0; 68113 } 68114 } 68115 return s.chart.type === "rangeBar" && r.seriesRangeStart.length && r.isBarHorizontal && (o = t), s.chart.type === "bar" && (o < 0 && n < 0 && (n = 0), o === Number.MIN_VALUE && (o = 0)), { minY: o, maxY: n, lowestY: t, highestY: i }; 68116 } }, { key: "setYRange", value: function() { 68117 var e = this.w.globals, t = this.w.config; 68118 e.maxY = -Number.MAX_VALUE, e.minY = Number.MIN_VALUE; 68119 var i = Number.MAX_VALUE; 68120 if (e.isMultipleYAxis) 68121 for (var a = 0; a < e.series.length; a++) { 68122 var s = this.getMinYMaxY(a, i, null, a + 1); 68123 e.minYArr.push(s.minY), e.maxYArr.push(s.maxY), i = s.lowestY; 68124 } 68125 var r = this.getMinYMaxY(0, i, null, e.series.length); 68126 if (e.minY = r.minY, e.maxY = r.maxY, i = r.lowestY, t.chart.stacked && this._setStackedMinMax(), (t.chart.type === "line" || t.chart.type === "area" || t.chart.type === "candlestick" || t.chart.type === "boxPlot" || t.chart.type === "rangeBar" && !e.isBarHorizontal) && e.minY === Number.MIN_VALUE && i !== -Number.MAX_VALUE && i !== e.maxY) { 68127 var n = e.maxY - i; 68128 (i >= 0 && i <= 10 || t.yaxis[0].min !== void 0 || t.yaxis[0].max !== void 0) && (n = 0), e.minY = i - 5 * n / 100, i > 0 && e.minY < 0 && (e.minY = 0), e.maxY = e.maxY + 5 * n / 100; 68129 } 68130 return t.yaxis.forEach(function(o, h) { 68131 o.max !== void 0 && (typeof o.max == "number" ? e.maxYArr[h] = o.max : typeof o.max == "function" && (e.maxYArr[h] = o.max(e.isMultipleYAxis ? e.maxYArr[h] : e.maxY)), e.maxY = e.maxYArr[h]), o.min !== void 0 && (typeof o.min == "number" ? e.minYArr[h] = o.min : typeof o.min == "function" && (e.minYArr[h] = o.min(e.isMultipleYAxis ? e.minYArr[h] === Number.MIN_VALUE ? 0 : e.minYArr[h] : e.minY)), e.minY = e.minYArr[h]); 68132 }), e.isBarHorizontal && ["min", "max"].forEach(function(o) { 68133 t.xaxis[o] !== void 0 && typeof t.xaxis[o] == "number" && (o === "min" ? e.minY = t.xaxis[o] : e.maxY = t.xaxis[o]); 68134 }), e.isMultipleYAxis ? (this.scales.setMultipleYScales(), e.minY = i, e.yAxisScale.forEach(function(o, h) { 68135 e.minYArr[h] = o.niceMin, e.maxYArr[h] = o.niceMax; 68136 })) : (this.scales.setYScaleForIndex(0, e.minY, e.maxY), e.minY = e.yAxisScale[0].niceMin, e.maxY = e.yAxisScale[0].niceMax, e.minYArr[0] = e.yAxisScale[0].niceMin, e.maxYArr[0] = e.yAxisScale[0].niceMax), { minY: e.minY, maxY: e.maxY, minYArr: e.minYArr, maxYArr: e.maxYArr, yAxisScale: e.yAxisScale }; 68137 } }, { key: "setXRange", value: function() { 68138 var e = this.w.globals, t = this.w.config, i = t.xaxis.type === "numeric" || t.xaxis.type === "datetime" || t.xaxis.type === "category" && !e.noLabelsProvided || e.noLabelsProvided || e.isXNumeric; 68139 if (e.isXNumeric && function() { 68140 for (var n = 0; n < e.series.length; n++) 68141 if (e.labels[n]) 68142 for (var o = 0; o < e.labels[n].length; o++) 68143 e.labels[n][o] !== null && P.isNumber(e.labels[n][o]) && (e.maxX = Math.max(e.maxX, e.labels[n][o]), e.initialMaxX = Math.max(e.maxX, e.labels[n][o]), e.minX = Math.min(e.minX, e.labels[n][o]), e.initialMinX = Math.min(e.minX, e.labels[n][o])); 68144 }(), e.noLabelsProvided && t.xaxis.categories.length === 0 && (e.maxX = e.labels[e.labels.length - 1], e.initialMaxX = e.labels[e.labels.length - 1], e.minX = 1, e.initialMinX = 1), e.isXNumeric || e.noLabelsProvided || e.dataFormatXNumeric) { 68145 var a; 68146 if (t.xaxis.tickAmount === void 0 ? (a = Math.round(e.svgWidth / 150), t.xaxis.type === "numeric" && e.dataPoints < 30 && (a = e.dataPoints - 1), a > e.dataPoints && e.dataPoints !== 0 && (a = e.dataPoints - 1)) : t.xaxis.tickAmount === "dataPoints" ? (e.series.length > 1 && (a = e.series[e.maxValsInArrayIndex].length - 1), e.isXNumeric && (a = e.maxX - e.minX - 1)) : a = t.xaxis.tickAmount, e.xTickAmount = a, t.xaxis.max !== void 0 && typeof t.xaxis.max == "number" && (e.maxX = t.xaxis.max), t.xaxis.min !== void 0 && typeof t.xaxis.min == "number" && (e.minX = t.xaxis.min), t.xaxis.range !== void 0 && (e.minX = e.maxX - t.xaxis.range), e.minX !== Number.MAX_VALUE && e.maxX !== -Number.MAX_VALUE) 68147 if (t.xaxis.convertedCatToNumeric && !e.dataFormatXNumeric) { 68148 for (var s = [], r = e.minX - 1; r < e.maxX; r++) 68149 s.push(r + 1); 68150 e.xAxisScale = { result: s, niceMin: s[0], niceMax: s[s.length - 1] }; 68151 } else 68152 e.xAxisScale = this.scales.setXScale(e.minX, e.maxX); 68153 else 68154 e.xAxisScale = this.scales.linearScale(0, a, a, 0, t.xaxis.stepSize), e.noLabelsProvided && e.labels.length > 0 && (e.xAxisScale = this.scales.linearScale(1, e.labels.length, a - 1, 0, t.xaxis.stepSize), e.seriesX = e.labels.slice()); 68155 i && (e.labels = e.xAxisScale.result.slice()); 68156 } 68157 return e.isBarHorizontal && e.labels.length && (e.xTickAmount = e.labels.length), this._handleSingleDataPoint(), this._getMinXDiff(), { minX: e.minX, maxX: e.maxX }; 68158 } }, { key: "setZRange", value: function() { 68159 var e = this.w.globals; 68160 if (e.isDataXYZ) { 68161 for (var t = 0; t < e.series.length; t++) 68162 if (e.seriesZ[t] !== void 0) 68163 for (var i = 0; i < e.seriesZ[t].length; i++) 68164 e.seriesZ[t][i] !== null && P.isNumber(e.seriesZ[t][i]) && (e.maxZ = Math.max(e.maxZ, e.seriesZ[t][i]), e.minZ = Math.min(e.minZ, e.seriesZ[t][i])); 68165 } 68166 } }, { key: "_handleSingleDataPoint", value: function() { 68167 var e = this.w.globals, t = this.w.config; 68168 if (e.minX === e.maxX) { 68169 var i = new B(this.ctx); 68170 if (t.xaxis.type === "datetime") { 68171 var a = i.getDate(e.minX); 68172 t.xaxis.labels.datetimeUTC ? a.setUTCDate(a.getUTCDate() - 2) : a.setDate(a.getDate() - 2), e.minX = new Date(a).getTime(); 68173 var s = i.getDate(e.maxX); 68174 t.xaxis.labels.datetimeUTC ? s.setUTCDate(s.getUTCDate() + 2) : s.setDate(s.getDate() + 2), e.maxX = new Date(s).getTime(); 68175 } else 68176 (t.xaxis.type === "numeric" || t.xaxis.type === "category" && !e.noLabelsProvided) && (e.minX = e.minX - 2, e.initialMinX = e.minX, e.maxX = e.maxX + 2, e.initialMaxX = e.maxX); 68177 } 68178 } }, { key: "_getMinXDiff", value: function() { 68179 var e = this.w.globals; 68180 e.isXNumeric && e.seriesX.forEach(function(t, i) { 68181 t.length === 1 && t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length - 1]); 68182 var a = t.slice(); 68183 a.sort(function(s, r) { 68184 return s - r; 68185 }), a.forEach(function(s, r) { 68186 if (r > 0) { 68187 var n = s - a[r - 1]; 68188 n > 0 && (e.minXDiff = Math.min(n, e.minXDiff)); 68189 } 68190 }), e.dataPoints !== 1 && e.minXDiff !== Number.MAX_VALUE || (e.minXDiff = 0.5); 68191 }); 68192 } }, { key: "_setStackedMinMax", value: function() { 68193 var e = this, t = this.w.globals; 68194 if (t.series.length) { 68195 var i = t.seriesGroups; 68196 i.length || (i = [this.w.config.series.map(function(r) { 68197 return r.name; 68198 })]); 68199 var a = {}, s = {}; 68200 i.forEach(function(r) { 68201 a[r] = [], s[r] = [], e.w.config.series.map(function(n, o) { 68202 return r.indexOf(n.name) > -1 ? o : null; 68203 }).filter(function(n) { 68204 return n !== null; 68205 }).forEach(function(n) { 68206 for (var o = 0; o < t.series[t.maxValsInArrayIndex].length; o++) { 68207 var h, c; 68208 a[r][o] === void 0 && (a[r][o] = 0, s[r][o] = 0), (e.w.config.chart.stacked && !t.comboCharts || e.w.config.chart.stacked && t.comboCharts && (!e.w.config.chart.stackOnlyBar || ((h = e.w.config.series) === null || h === void 0 || (c = h[n]) === null || c === void 0 ? void 0 : c.type) === "bar")) && t.series[n][o] !== null && P.isNumber(t.series[n][o]) && (t.series[n][o] > 0 ? a[r][o] += parseFloat(t.series[n][o]) + 1e-4 : s[r][o] += parseFloat(t.series[n][o])); 68209 } 68210 }); 68211 }), Object.entries(a).forEach(function(r) { 68212 var n = Me(r, 1)[0]; 68213 a[n].forEach(function(o, h) { 68214 t.maxY = Math.max(t.maxY, a[n][h]), t.minY = Math.min(t.minY, s[n][h]); 68215 }); 68216 }); 68217 } 68218 } }]), y; 68219 }(), Ne = function() { 68220 function y(e, t) { 68221 F(this, y), this.ctx = e, this.elgrid = t, this.w = e.w; 68222 var i = this.w; 68223 this.xaxisFontSize = i.config.xaxis.labels.style.fontSize, this.axisFontFamily = i.config.xaxis.labels.style.fontFamily, this.xaxisForeColors = i.config.xaxis.labels.style.colors, this.isCategoryBarHorizontal = i.config.chart.type === "bar" && i.config.plotOptions.bar.horizontal, this.xAxisoffX = 0, i.config.xaxis.position === "bottom" && (this.xAxisoffX = i.globals.gridHeight), this.drawnLabels = [], this.axesUtils = new xe(e); 68224 } 68225 return Y(y, [{ key: "drawYaxis", value: function(e) { 68226 var t = this, i = this.w, a = new M(this.ctx), s = i.config.yaxis[e].labels.style, r = s.fontSize, n = s.fontFamily, o = s.fontWeight, h = a.group({ class: "apexcharts-yaxis", rel: e, transform: "translate(" + i.globals.translateYAxisX[e] + ", 0)" }); 68227 if (this.axesUtils.isYAxisHidden(e)) 68228 return h; 68229 var c = a.group({ class: "apexcharts-yaxis-texts-g" }); 68230 h.add(c); 68231 var d = i.globals.yAxisScale[e].result.length - 1, g = i.globals.gridHeight / d, p = i.globals.translateY, f = i.globals.yLabelFormatters[e], b = i.globals.yAxisScale[e].result.slice(); 68232 b = this.axesUtils.checkForReversedLabels(e, b); 68233 var m = ""; 68234 if (i.config.yaxis[e].labels.show) 68235 for (var w = function(C) { 68236 var L = b[C]; 68237 L = f(L, C, i); 68238 var I = i.config.yaxis[e].labels.padding; 68239 i.config.yaxis[e].opposite && i.config.yaxis.length !== 0 && (I *= -1); 68240 var z = "end"; 68241 i.config.yaxis[e].opposite && (z = "start"), i.config.yaxis[e].labels.align === "left" ? z = "start" : i.config.yaxis[e].labels.align === "center" ? z = "middle" : i.config.yaxis[e].labels.align === "right" && (z = "end"); 68242 var T = t.axesUtils.getYAxisForeColor(s.colors, e), E = i.config.yaxis[e].labels.offsetY; 68243 i.config.chart.type === "heatmap" && (E -= (i.globals.gridHeight / i.globals.series.length - 1) / 2); 68244 var R = a.drawText({ x: I, y: p + d / 10 + E + 1, text: L, textAnchor: z, fontSize: r, fontFamily: n, fontWeight: o, maxWidth: i.config.yaxis[e].labels.maxWidth, foreColor: Array.isArray(T) ? T[C] : T, isPlainText: !1, cssClass: "apexcharts-yaxis-label " + s.cssClass }); 68245 C === d && (m = R), c.add(R); 68246 var O = document.createElementNS(i.globals.SVGNS, "title"); 68247 if (O.textContent = Array.isArray(L) ? L.join(" ") : L, R.node.appendChild(O), i.config.yaxis[e].labels.rotate !== 0) { 68248 var D = a.rotateAroundCenter(m.node), W = a.rotateAroundCenter(R.node); 68249 R.node.setAttribute("transform", "rotate(".concat(i.config.yaxis[e].labels.rotate, " ").concat(D.x, " ").concat(W.y, ")")); 68250 } 68251 p += g; 68252 }, A = d; A >= 0; A--) 68253 w(A); 68254 if (i.config.yaxis[e].title.text !== void 0) { 68255 var l = a.group({ class: "apexcharts-yaxis-title" }), u = 0; 68256 i.config.yaxis[e].opposite && (u = i.globals.translateYAxisX[e]); 68257 var x = a.drawText({ x: u, y: i.globals.gridHeight / 2 + i.globals.translateY + i.config.yaxis[e].title.offsetY, text: i.config.yaxis[e].title.text, textAnchor: "end", foreColor: i.config.yaxis[e].title.style.color, fontSize: i.config.yaxis[e].title.style.fontSize, fontWeight: i.config.yaxis[e].title.style.fontWeight, fontFamily: i.config.yaxis[e].title.style.fontFamily, cssClass: "apexcharts-yaxis-title-text " + i.config.yaxis[e].title.style.cssClass }); 68258 l.add(x), h.add(l); 68259 } 68260 var v = i.config.yaxis[e].axisBorder, k = 31 + v.offsetX; 68261 if (i.config.yaxis[e].opposite && (k = -31 - v.offsetX), v.show) { 68262 var S = a.drawLine(k, i.globals.translateY + v.offsetY - 2, k, i.globals.gridHeight + i.globals.translateY + v.offsetY + 2, v.color, 0, v.width); 68263 h.add(S); 68264 } 68265 return i.config.yaxis[e].axisTicks.show && this.axesUtils.drawYAxisTicks(k, d, v, i.config.yaxis[e].axisTicks, e, g, h), h; 68266 } }, { key: "drawYaxisInversed", value: function(e) { 68267 var t = this.w, i = new M(this.ctx), a = i.group({ class: "apexcharts-xaxis apexcharts-yaxis-inversed" }), s = i.group({ class: "apexcharts-xaxis-texts-g", transform: "translate(".concat(t.globals.translateXAxisX, ", ").concat(t.globals.translateXAxisY, ")") }); 68268 a.add(s); 68269 var r = t.globals.yAxisScale[e].result.length - 1, n = t.globals.gridWidth / r + 0.1, o = n + t.config.xaxis.labels.offsetX, h = t.globals.xLabelFormatter, c = t.globals.yAxisScale[e].result.slice(), d = t.globals.timescaleLabels; 68270 d.length > 0 && (this.xaxisLabels = d.slice(), r = (c = d.slice()).length), c = this.axesUtils.checkForReversedLabels(e, c); 68271 var g = d.length; 68272 if (t.config.xaxis.labels.show) 68273 for (var p = g ? 0 : r; g ? p < g : p >= 0; g ? p++ : p--) { 68274 var f = c[p]; 68275 f = h(f, p, t); 68276 var b = t.globals.gridWidth + t.globals.padHorizontal - (o - n + t.config.xaxis.labels.offsetX); 68277 if (d.length) { 68278 var m = this.axesUtils.getLabel(c, d, b, p, this.drawnLabels, this.xaxisFontSize); 68279 b = m.x, f = m.text, this.drawnLabels.push(m.text), p === 0 && t.globals.skipFirstTimelinelabel && (f = ""), p === c.length - 1 && t.globals.skipLastTimelinelabel && (f = ""); 68280 } 68281 var w = i.drawText({ x: b, y: this.xAxisoffX + t.config.xaxis.labels.offsetY + 30 - (t.config.xaxis.position === "top" ? t.globals.xAxisHeight + t.config.xaxis.axisTicks.height - 2 : 0), text: f, textAnchor: "middle", foreColor: Array.isArray(this.xaxisForeColors) ? this.xaxisForeColors[e] : this.xaxisForeColors, fontSize: this.xaxisFontSize, fontFamily: this.xaxisFontFamily, fontWeight: t.config.xaxis.labels.style.fontWeight, isPlainText: !1, cssClass: "apexcharts-xaxis-label " + t.config.xaxis.labels.style.cssClass }); 68282 s.add(w), w.tspan(f); 68283 var A = document.createElementNS(t.globals.SVGNS, "title"); 68284 A.textContent = f, w.node.appendChild(A), o += n; 68285 } 68286 return this.inversedYAxisTitleText(a), this.inversedYAxisBorder(a), a; 68287 } }, { key: "inversedYAxisBorder", value: function(e) { 68288 var t = this.w, i = new M(this.ctx), a = t.config.xaxis.axisBorder; 68289 if (a.show) { 68290 var s = 0; 68291 t.config.chart.type === "bar" && t.globals.isXNumeric && (s -= 15); 68292 var r = i.drawLine(t.globals.padHorizontal + s + a.offsetX, this.xAxisoffX, t.globals.gridWidth, this.xAxisoffX, a.color, 0, a.height); 68293 this.elgrid && this.elgrid.elGridBorders && t.config.grid.show ? this.elgrid.elGridBorders.add(r) : e.add(r); 68294 } 68295 } }, { key: "inversedYAxisTitleText", value: function(e) { 68296 var t = this.w, i = new M(this.ctx); 68297 if (t.config.xaxis.title.text !== void 0) { 68298 var a = i.group({ class: "apexcharts-xaxis-title apexcharts-yaxis-title-inversed" }), s = i.drawText({ x: t.globals.gridWidth / 2 + t.config.xaxis.title.offsetX, y: this.xAxisoffX + parseFloat(this.xaxisFontSize) + parseFloat(t.config.xaxis.title.style.fontSize) + t.config.xaxis.title.offsetY + 20, text: t.config.xaxis.title.text, textAnchor: "middle", fontSize: t.config.xaxis.title.style.fontSize, fontFamily: t.config.xaxis.title.style.fontFamily, fontWeight: t.config.xaxis.title.style.fontWeight, foreColor: t.config.xaxis.title.style.color, cssClass: "apexcharts-xaxis-title-text " + t.config.xaxis.title.style.cssClass }); 68299 a.add(s), e.add(a); 68300 } 68301 } }, { key: "yAxisTitleRotate", value: function(e, t) { 68302 var i = this.w, a = new M(this.ctx), s = { width: 0, height: 0 }, r = { width: 0, height: 0 }, n = i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e, "'] .apexcharts-yaxis-texts-g")); 68303 n !== null && (s = n.getBoundingClientRect()); 68304 var o = i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e, "'] .apexcharts-yaxis-title text")); 68305 if (o !== null && (r = o.getBoundingClientRect()), o !== null) { 68306 var h = this.xPaddingForYAxisTitle(e, s, r, t); 68307 o.setAttribute("x", h.xPos - (t ? 10 : 0)); 68308 } 68309 if (o !== null) { 68310 var c = a.rotateAroundCenter(o); 68311 o.setAttribute("transform", "rotate(".concat(t ? -1 * i.config.yaxis[e].title.rotate : i.config.yaxis[e].title.rotate, " ").concat(c.x, " ").concat(c.y, ")")); 68312 } 68313 } }, { key: "xPaddingForYAxisTitle", value: function(e, t, i, a) { 68314 var s = this.w, r = 0, n = 0, o = 10; 68315 return s.config.yaxis[e].title.text === void 0 || e < 0 ? { xPos: n, padd: 0 } : (a ? (n = t.width + s.config.yaxis[e].title.offsetX + i.width / 2 + o / 2, (r += 1) === 0 && (n -= o / 2)) : (n = -1 * t.width + s.config.yaxis[e].title.offsetX + o / 2 + i.width / 2, s.globals.isBarHorizontal && (o = 25, n = -1 * t.width - s.config.yaxis[e].title.offsetX - o)), { xPos: n, padd: o }); 68316 } }, { key: "setYAxisXPosition", value: function(e, t) { 68317 var i = this.w, a = 0, s = 0, r = 18, n = 1; 68318 i.config.yaxis.length > 1 && (this.multipleYs = !0), i.config.yaxis.map(function(o, h) { 68319 var c = i.globals.ignoreYAxisIndexes.indexOf(h) > -1 || !o.show || o.floating || e[h].width === 0, d = e[h].width + t[h].width; 68320 o.opposite ? i.globals.isBarHorizontal ? (s = i.globals.gridWidth + i.globals.translateX - 1, i.globals.translateYAxisX[h] = s - o.labels.offsetX) : (s = i.globals.gridWidth + i.globals.translateX + n, c || (n = n + d + 20), i.globals.translateYAxisX[h] = s - o.labels.offsetX + 20) : (a = i.globals.translateX - r, c || (r = r + d + 20), i.globals.translateYAxisX[h] = a + o.labels.offsetX); 68321 }); 68322 } }, { key: "setYAxisTextAlignments", value: function() { 68323 var e = this.w, t = e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis"); 68324 (t = P.listToArray(t)).forEach(function(i, a) { 68325 var s = e.config.yaxis[a]; 68326 if (s && !s.floating && s.labels.align !== void 0) { 68327 var r = e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a, "'] .apexcharts-yaxis-texts-g")), n = e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a, "'] .apexcharts-yaxis-label")); 68328 n = P.listToArray(n); 68329 var o = r.getBoundingClientRect(); 68330 s.labels.align === "left" ? (n.forEach(function(h, c) { 68331 h.setAttribute("text-anchor", "start"); 68332 }), s.opposite || r.setAttribute("transform", "translate(-".concat(o.width, ", 0)"))) : s.labels.align === "center" ? (n.forEach(function(h, c) { 68333 h.setAttribute("text-anchor", "middle"); 68334 }), r.setAttribute("transform", "translate(".concat(o.width / 2 * (s.opposite ? 1 : -1), ", 0)"))) : s.labels.align === "right" && (n.forEach(function(h, c) { 68335 h.setAttribute("text-anchor", "end"); 68336 }), s.opposite && r.setAttribute("transform", "translate(".concat(o.width, ", 0)"))); 68337 } 68338 }); 68339 } }]), y; 68340 }(), xt = function() { 68341 function y(e) { 68342 F(this, y), this.ctx = e, this.w = e.w, this.documentEvent = P.bind(this.documentEvent, this); 68343 } 68344 return Y(y, [{ key: "addEventListener", value: function(e, t) { 68345 var i = this.w; 68346 i.globals.events.hasOwnProperty(e) ? i.globals.events[e].push(t) : i.globals.events[e] = [t]; 68347 } }, { key: "removeEventListener", value: function(e, t) { 68348 var i = this.w; 68349 if (i.globals.events.hasOwnProperty(e)) { 68350 var a = i.globals.events[e].indexOf(t); 68351 a !== -1 && i.globals.events[e].splice(a, 1); 68352 } 68353 } }, { key: "fireEvent", value: function(e, t) { 68354 var i = this.w; 68355 if (i.globals.events.hasOwnProperty(e)) { 68356 t && t.length || (t = []); 68357 for (var a = i.globals.events[e], s = a.length, r = 0; r < s; r++) 68358 a[r].apply(null, t); 68359 } 68360 } }, { key: "setupEventHandlers", value: function() { 68361 var e = this, t = this.w, i = this.ctx, a = t.globals.dom.baseEl.querySelector(t.globals.chartClass); 68362 this.ctx.eventList.forEach(function(s) { 68363 a.addEventListener(s, function(r) { 68364 var n = Object.assign({}, t, { seriesIndex: t.globals.capturedSeriesIndex, dataPointIndex: t.globals.capturedDataPointIndex }); 68365 r.type === "mousemove" || r.type === "touchmove" ? typeof t.config.chart.events.mouseMove == "function" && t.config.chart.events.mouseMove(r, i, n) : r.type === "mouseleave" || r.type === "touchleave" ? typeof t.config.chart.events.mouseLeave == "function" && t.config.chart.events.mouseLeave(r, i, n) : (r.type === "mouseup" && r.which === 1 || r.type === "touchend") && (typeof t.config.chart.events.click == "function" && t.config.chart.events.click(r, i, n), i.ctx.events.fireEvent("click", [r, i, n])); 68366 }, { capture: !1, passive: !0 }); 68367 }), this.ctx.eventList.forEach(function(s) { 68368 t.globals.dom.baseEl.addEventListener(s, e.documentEvent, { passive: !0 }); 68369 }), this.ctx.core.setupBrushHandler(); 68370 } }, { key: "documentEvent", value: function(e) { 68371 var t = this.w, i = e.target.className; 68372 if (e.type === "click") { 68373 var a = t.globals.dom.baseEl.querySelector(".apexcharts-menu"); 68374 a && a.classList.contains("apexcharts-menu-open") && i !== "apexcharts-menu-icon" && a.classList.remove("apexcharts-menu-open"); 68375 } 68376 t.globals.clientX = e.type === "touchmove" ? e.touches[0].clientX : e.clientX, t.globals.clientY = e.type === "touchmove" ? e.touches[0].clientY : e.clientY; 68377 } }]), y; 68378 }(), bt = function() { 68379 function y(e) { 68380 F(this, y), this.ctx = e, this.w = e.w; 68381 } 68382 return Y(y, [{ key: "setCurrentLocaleValues", value: function(e) { 68383 var t = this.w.config.chart.locales; 68384 window.Apex.chart && window.Apex.chart.locales && window.Apex.chart.locales.length > 0 && (t = this.w.config.chart.locales.concat(window.Apex.chart.locales)); 68385 var i = t.filter(function(s) { 68386 return s.name === e; 68387 })[0]; 68388 if (!i) 68389 throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options"); 68390 var a = P.extend(H, i); 68391 this.w.globals.locale = a.options; 68392 } }]), y; 68393 }(), mt = function() { 68394 function y(e) { 68395 F(this, y), this.ctx = e, this.w = e.w; 68396 } 68397 return Y(y, [{ key: "drawAxis", value: function(e, t) { 68398 var i, a, s = this, r = this.w.globals, n = this.w.config, o = new Ie(this.ctx, t), h = new Ne(this.ctx, t); 68399 r.axisCharts && e !== "radar" && (r.isBarHorizontal ? (a = h.drawYaxisInversed(0), i = o.drawXaxisInversed(0), r.dom.elGraphical.add(i), r.dom.elGraphical.add(a)) : (i = o.drawXaxis(), r.dom.elGraphical.add(i), n.yaxis.map(function(c, d) { 68400 if (r.ignoreYAxisIndexes.indexOf(d) === -1 && (a = h.drawYaxis(d), r.dom.Paper.add(a), s.w.config.grid.position === "back")) { 68401 var g = r.dom.Paper.children()[1]; 68402 g.remove(), r.dom.Paper.add(g); 68403 } 68404 }))); 68405 } }]), y; 68406 }(), We = function() { 68407 function y(e) { 68408 F(this, y), this.ctx = e, this.w = e.w; 68409 } 68410 return Y(y, [{ key: "drawXCrosshairs", value: function() { 68411 var e = this.w, t = new M(this.ctx), i = new Z(this.ctx), a = e.config.xaxis.crosshairs.fill.gradient, s = e.config.xaxis.crosshairs.dropShadow, r = e.config.xaxis.crosshairs.fill.type, n = a.colorFrom, o = a.colorTo, h = a.opacityFrom, c = a.opacityTo, d = a.stops, g = s.enabled, p = s.left, f = s.top, b = s.blur, m = s.color, w = s.opacity, A = e.config.xaxis.crosshairs.fill.color; 68412 if (e.config.xaxis.crosshairs.show) { 68413 r === "gradient" && (A = t.drawGradient("vertical", n, o, h, c, null, d, null)); 68414 var l = t.drawRect(); 68415 e.config.xaxis.crosshairs.width === 1 && (l = t.drawLine()); 68416 var u = e.globals.gridHeight; 68417 (!P.isNumber(u) || u < 0) && (u = 0); 68418 var x = e.config.xaxis.crosshairs.width; 68419 (!P.isNumber(x) || x < 0) && (x = 0), l.attr({ class: "apexcharts-xcrosshairs", x: 0, y: 0, y2: u, width: x, height: u, fill: A, filter: "none", "fill-opacity": e.config.xaxis.crosshairs.opacity, stroke: e.config.xaxis.crosshairs.stroke.color, "stroke-width": e.config.xaxis.crosshairs.stroke.width, "stroke-dasharray": e.config.xaxis.crosshairs.stroke.dashArray }), g && (l = i.dropShadow(l, { left: p, top: f, blur: b, color: m, opacity: w })), e.globals.dom.elGraphical.add(l); 68420 } 68421 } }, { key: "drawYCrosshairs", value: function() { 68422 var e = this.w, t = new M(this.ctx), i = e.config.yaxis[0].crosshairs, a = e.globals.barPadForNumericAxis; 68423 if (e.config.yaxis[0].crosshairs.show) { 68424 var s = t.drawLine(-a, 0, e.globals.gridWidth + a, 0, i.stroke.color, i.stroke.dashArray, i.stroke.width); 68425 s.attr({ class: "apexcharts-ycrosshairs" }), e.globals.dom.elGraphical.add(s); 68426 } 68427 var r = t.drawLine(-a, 0, e.globals.gridWidth + a, 0, i.stroke.color, 0, 0); 68428 r.attr({ class: "apexcharts-ycrosshairs-hidden" }), e.globals.dom.elGraphical.add(r); 68429 } }]), y; 68430 }(), vt = function() { 68431 function y(e) { 68432 F(this, y), this.ctx = e, this.w = e.w; 68433 } 68434 return Y(y, [{ key: "checkResponsiveConfig", value: function(e) { 68435 var t = this, i = this.w, a = i.config; 68436 if (a.responsive.length !== 0) { 68437 var s = a.responsive.slice(); 68438 s.sort(function(h, c) { 68439 return h.breakpoint > c.breakpoint ? 1 : c.breakpoint > h.breakpoint ? -1 : 0; 68440 }).reverse(); 68441 var r = new Le({}), n = function() { 68442 var h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = s[0].breakpoint, d = window.innerWidth > 0 ? window.innerWidth : screen.width; 68443 if (d > c) { 68444 var g = q.extendArrayProps(r, i.globals.initialConfig, i); 68445 h = P.extend(g, h), h = P.extend(i.config, h), t.overrideResponsiveOptions(h); 68446 } else 68447 for (var p = 0; p < s.length; p++) 68448 d < s[p].breakpoint && (h = q.extendArrayProps(r, s[p].options, i), h = P.extend(i.config, h), t.overrideResponsiveOptions(h)); 68449 }; 68450 if (e) { 68451 var o = q.extendArrayProps(r, e, i); 68452 o = P.extend(i.config, o), n(o = P.extend(o, e)); 68453 } else 68454 n({}); 68455 } 68456 } }, { key: "overrideResponsiveOptions", value: function(e) { 68457 var t = new Le(e).init({ responsiveOverride: !0 }); 68458 this.w.config = t; 68459 } }]), y; 68460 }(), yt = function() { 68461 function y(e) { 68462 F(this, y), this.ctx = e, this.colors = [], this.w = e.w; 68463 var t = this.w; 68464 this.isColorFn = !1, this.isHeatmapDistributed = t.config.chart.type === "treemap" && t.config.plotOptions.treemap.distributed || t.config.chart.type === "heatmap" && t.config.plotOptions.heatmap.distributed, this.isBarDistributed = t.config.plotOptions.bar.distributed && (t.config.chart.type === "bar" || t.config.chart.type === "rangeBar"); 68465 } 68466 return Y(y, [{ key: "init", value: function() { 68467 this.setDefaultColors(); 68468 } }, { key: "setDefaultColors", value: function() { 68469 var e, t = this, i = this.w, a = new P(); 68470 if (i.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(i.config.theme.mode)), i.config.colors === void 0 || ((e = i.config.colors) === null || e === void 0 ? void 0 : e.length) === 0 ? i.globals.colors = this.predefined() : (i.globals.colors = i.config.colors, Array.isArray(i.config.colors) && i.config.colors.length > 0 && typeof i.config.colors[0] == "function" && (i.globals.colors = i.config.series.map(function(f, b) { 68471 var m = i.config.colors[b]; 68472 return m || (m = i.config.colors[0]), typeof m == "function" ? (t.isColorFn = !0, m({ value: i.globals.axisCharts ? i.globals.series[b][0] ? i.globals.series[b][0] : 0 : i.globals.series[b], seriesIndex: b, dataPointIndex: b, w: i })) : m; 68473 }))), i.globals.seriesColors.map(function(f, b) { 68474 f && (i.globals.colors[b] = f); 68475 }), i.config.theme.monochrome.enabled) { 68476 var s = [], r = i.globals.series.length; 68477 (this.isBarDistributed || this.isHeatmapDistributed) && (r = i.globals.series[0].length * i.globals.series.length); 68478 for (var n = i.config.theme.monochrome.color, o = 1 / (r / i.config.theme.monochrome.shadeIntensity), h = i.config.theme.monochrome.shadeTo, c = 0, d = 0; d < r; d++) { 68479 var g = void 0; 68480 h === "dark" ? (g = a.shadeColor(-1 * c, n), c += o) : (g = a.shadeColor(c, n), c += o), s.push(g); 68481 } 68482 i.globals.colors = s.slice(); 68483 } 68484 var p = i.globals.colors.slice(); 68485 this.pushExtraColors(i.globals.colors), ["fill", "stroke"].forEach(function(f) { 68486 i.config[f].colors === void 0 ? i.globals[f].colors = t.isColorFn ? i.config.colors : p : i.globals[f].colors = i.config[f].colors.slice(), t.pushExtraColors(i.globals[f].colors); 68487 }), i.config.dataLabels.style.colors === void 0 ? i.globals.dataLabels.style.colors = p : i.globals.dataLabels.style.colors = i.config.dataLabels.style.colors.slice(), this.pushExtraColors(i.globals.dataLabels.style.colors, 50), i.config.plotOptions.radar.polygons.fill.colors === void 0 ? i.globals.radarPolygons.fill.colors = [i.config.theme.mode === "dark" ? "#424242" : "none"] : i.globals.radarPolygons.fill.colors = i.config.plotOptions.radar.polygons.fill.colors.slice(), this.pushExtraColors(i.globals.radarPolygons.fill.colors, 20), i.config.markers.colors === void 0 ? i.globals.markers.colors = p : i.globals.markers.colors = i.config.markers.colors.slice(), this.pushExtraColors(i.globals.markers.colors); 68488 } }, { key: "pushExtraColors", value: function(e, t) { 68489 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = this.w, s = t || a.globals.series.length; 68490 if (i === null && (i = this.isBarDistributed || this.isHeatmapDistributed || a.config.chart.type === "heatmap" && a.config.plotOptions.heatmap.colorScale.inverse), i && a.globals.series.length && (s = a.globals.series[a.globals.maxValsInArrayIndex].length * a.globals.series.length), e.length < s) 68491 for (var r = s - e.length, n = 0; n < r; n++) 68492 e.push(e[n]); 68493 } }, { key: "updateThemeOptions", value: function(e) { 68494 e.chart = e.chart || {}, e.tooltip = e.tooltip || {}; 68495 var t = e.theme.mode || "light", i = e.theme.palette ? e.theme.palette : t === "dark" ? "palette4" : "palette1", a = e.chart.foreColor ? e.chart.foreColor : t === "dark" ? "#f6f7f8" : "#373d3f"; 68496 return e.tooltip.theme = t, e.chart.foreColor = a, e.theme.palette = i, e; 68497 } }, { key: "predefined", value: function() { 68498 switch (this.w.config.theme.palette) { 68499 case "palette1": 68500 default: 68501 this.colors = ["#008FFB", "#00E396", "#FEB019", "#FF4560", "#775DD0"]; 68502 break; 68503 case "palette2": 68504 this.colors = ["#3f51b5", "#03a9f4", "#4caf50", "#f9ce1d", "#FF9800"]; 68505 break; 68506 case "palette3": 68507 this.colors = ["#33b2df", "#546E7A", "#d4526e", "#13d8aa", "#A5978B"]; 68508 break; 68509 case "palette4": 68510 this.colors = ["#4ecdc4", "#c7f464", "#81D4FA", "#fd6a6a", "#546E7A"]; 68511 break; 68512 case "palette5": 68513 this.colors = ["#2b908f", "#f9a3a4", "#90ee7e", "#fa4443", "#69d2e7"]; 68514 break; 68515 case "palette6": 68516 this.colors = ["#449DD1", "#F86624", "#EA3546", "#662E9B", "#C5D86D"]; 68517 break; 68518 case "palette7": 68519 this.colors = ["#D7263D", "#1B998B", "#2E294E", "#F46036", "#E2C044"]; 68520 break; 68521 case "palette8": 68522 this.colors = ["#662E9B", "#F86624", "#F9C80E", "#EA3546", "#43BCCD"]; 68523 break; 68524 case "palette9": 68525 this.colors = ["#5C4742", "#A5978B", "#8D5B4C", "#5A2A27", "#C4BBAF"]; 68526 break; 68527 case "palette10": 68528 this.colors = ["#A300D6", "#7D02EB", "#5653FE", "#2983FF", "#00B1F2"]; 68529 } 68530 return this.colors; 68531 } }]), y; 68532 }(), wt = function() { 68533 function y(e) { 68534 F(this, y), this.ctx = e, this.w = e.w; 68535 } 68536 return Y(y, [{ key: "draw", value: function() { 68537 this.drawTitleSubtitle("title"), this.drawTitleSubtitle("subtitle"); 68538 } }, { key: "drawTitleSubtitle", value: function(e) { 68539 var t = this.w, i = e === "title" ? t.config.title : t.config.subtitle, a = t.globals.svgWidth / 2, s = i.offsetY, r = "middle"; 68540 if (i.align === "left" ? (a = 10, r = "start") : i.align === "right" && (a = t.globals.svgWidth - 10, r = "end"), a += i.offsetX, s = s + parseInt(i.style.fontSize, 10) + i.margin / 2, i.text !== void 0) { 68541 var n = new M(this.ctx).drawText({ x: a, y: s, text: i.text, textAnchor: r, fontSize: i.style.fontSize, fontFamily: i.style.fontFamily, fontWeight: i.style.fontWeight, foreColor: i.style.color, opacity: 1 }); 68542 n.node.setAttribute("class", "apexcharts-".concat(e, "-text")), t.globals.dom.Paper.add(n); 68543 } 68544 } }]), y; 68545 }(), kt = function() { 68546 function y(e) { 68547 F(this, y), this.w = e.w, this.dCtx = e; 68548 } 68549 return Y(y, [{ key: "getTitleSubtitleCoords", value: function(e) { 68550 var t = this.w, i = 0, a = 0, s = e === "title" ? t.config.title.floating : t.config.subtitle.floating, r = t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e, "-text")); 68551 if (r !== null && !s) { 68552 var n = r.getBoundingClientRect(); 68553 i = n.width, a = t.globals.axisCharts ? n.height + 5 : n.height; 68554 } 68555 return { width: i, height: a }; 68556 } }, { key: "getLegendsRect", value: function() { 68557 var e = this.w, t = e.globals.dom.elLegendWrap; 68558 e.config.legend.height || e.config.legend.position !== "top" && e.config.legend.position !== "bottom" || (t.style.maxHeight = e.globals.svgHeight / 2 + "px"); 68559 var i = Object.assign({}, P.getBoundingClientRect(t)); 68560 return t !== null && !e.config.legend.floating && e.config.legend.show ? this.dCtx.lgRect = { x: i.x, y: i.y, height: i.height, width: i.height === 0 ? 0 : i.width } : this.dCtx.lgRect = { x: 0, y: 0, height: 0, width: 0 }, e.config.legend.position !== "left" && e.config.legend.position !== "right" || 1.5 * this.dCtx.lgRect.width > e.globals.svgWidth && (this.dCtx.lgRect.width = e.globals.svgWidth / 1.5), this.dCtx.lgRect; 68561 } }, { key: "getLargestStringFromMultiArr", value: function(e, t) { 68562 var i = e; 68563 if (this.w.globals.isMultiLineX) { 68564 var a = t.map(function(r, n) { 68565 return Array.isArray(r) ? r.length : 1; 68566 }), s = Math.max.apply(Math, J(a)); 68567 i = t[a.indexOf(s)]; 68568 } 68569 return i; 68570 } }]), y; 68571 }(), At = function() { 68572 function y(e) { 68573 F(this, y), this.w = e.w, this.dCtx = e; 68574 } 68575 return Y(y, [{ key: "getxAxisLabelsCoords", value: function() { 68576 var e, t = this.w, i = t.globals.labels.slice(); 68577 if (t.config.xaxis.convertedCatToNumeric && i.length === 0 && (i = t.globals.categoryLabels), t.globals.timescaleLabels.length > 0) { 68578 var a = this.getxAxisTimeScaleLabelsCoords(); 68579 e = { width: a.width, height: a.height }, t.globals.rotateXLabels = !1; 68580 } else { 68581 this.dCtx.lgWidthForSideLegends = t.config.legend.position !== "left" && t.config.legend.position !== "right" || t.config.legend.floating ? 0 : this.dCtx.lgRect.width; 68582 var s = t.globals.xLabelFormatter, r = P.getLargestStringFromArr(i), n = this.dCtx.dimHelpers.getLargestStringFromMultiArr(r, i); 68583 t.globals.isBarHorizontal && (n = r = t.globals.yAxisScale[0].result.reduce(function(f, b) { 68584 return f.length > b.length ? f : b; 68585 }, 0)); 68586 var o = new re(this.dCtx.ctx), h = r; 68587 r = o.xLabelFormat(s, r, h, { i: void 0, dateFormatter: new B(this.dCtx.ctx).formatDate, w: t }), n = o.xLabelFormat(s, n, h, { i: void 0, dateFormatter: new B(this.dCtx.ctx).formatDate, w: t }), (t.config.xaxis.convertedCatToNumeric && r === void 0 || String(r).trim() === "") && (n = r = "1"); 68588 var c = new M(this.dCtx.ctx), d = c.getTextRects(r, t.config.xaxis.labels.style.fontSize), g = d; 68589 if (r !== n && (g = c.getTextRects(n, t.config.xaxis.labels.style.fontSize)), (e = { width: d.width >= g.width ? d.width : g.width, height: d.height >= g.height ? d.height : g.height }).width * i.length > t.globals.svgWidth - this.dCtx.lgWidthForSideLegends - this.dCtx.yAxisWidth - this.dCtx.gridPad.left - this.dCtx.gridPad.right && t.config.xaxis.labels.rotate !== 0 || t.config.xaxis.labels.rotateAlways) { 68590 if (!t.globals.isBarHorizontal) { 68591 t.globals.rotateXLabels = !0; 68592 var p = function(f) { 68593 return c.getTextRects(f, t.config.xaxis.labels.style.fontSize, t.config.xaxis.labels.style.fontFamily, "rotate(".concat(t.config.xaxis.labels.rotate, " 0 0)"), !1); 68594 }; 68595 d = p(r), r !== n && (g = p(n)), e.height = (d.height > g.height ? d.height : g.height) / 1.5, e.width = d.width > g.width ? d.width : g.width; 68596 } 68597 } else 68598 t.globals.rotateXLabels = !1; 68599 } 68600 return t.config.xaxis.labels.show || (e = { width: 0, height: 0 }), { width: e.width, height: e.height }; 68601 } }, { key: "getxAxisGroupLabelsCoords", value: function() { 68602 var e, t = this.w; 68603 if (!t.globals.hasXaxisGroups) 68604 return { width: 0, height: 0 }; 68605 var i, a = ((e = t.config.xaxis.group.style) === null || e === void 0 ? void 0 : e.fontSize) || t.config.xaxis.labels.style.fontSize, s = t.globals.groups.map(function(d) { 68606 return d.title; 68607 }), r = P.getLargestStringFromArr(s), n = this.dCtx.dimHelpers.getLargestStringFromMultiArr(r, s), o = new M(this.dCtx.ctx), h = o.getTextRects(r, a), c = h; 68608 return r !== n && (c = o.getTextRects(n, a)), i = { width: h.width >= c.width ? h.width : c.width, height: h.height >= c.height ? h.height : c.height }, t.config.xaxis.labels.show || (i = { width: 0, height: 0 }), { width: i.width, height: i.height }; 68609 } }, { key: "getxAxisTitleCoords", value: function() { 68610 var e = this.w, t = 0, i = 0; 68611 if (e.config.xaxis.title.text !== void 0) { 68612 var a = new M(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text, e.config.xaxis.title.style.fontSize); 68613 t = a.width, i = a.height; 68614 } 68615 return { width: t, height: i }; 68616 } }, { key: "getxAxisTimeScaleLabelsCoords", value: function() { 68617 var e, t = this.w; 68618 this.dCtx.timescaleLabels = t.globals.timescaleLabels.slice(); 68619 var i = this.dCtx.timescaleLabels.map(function(s) { 68620 return s.value; 68621 }), a = i.reduce(function(s, r) { 68622 return s === void 0 ? (console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"), 0) : s.length > r.length ? s : r; 68623 }, 0); 68624 return 1.05 * (e = new M(this.dCtx.ctx).getTextRects(a, t.config.xaxis.labels.style.fontSize)).width * i.length > t.globals.gridWidth && t.config.xaxis.labels.rotate !== 0 && (t.globals.overlappingXLabels = !0), e; 68625 } }, { key: "additionalPaddingXLabels", value: function(e) { 68626 var t = this, i = this.w, a = i.globals, s = i.config, r = s.xaxis.type, n = e.width; 68627 a.skipLastTimelinelabel = !1, a.skipFirstTimelinelabel = !1; 68628 var o = i.config.yaxis[0].opposite && i.globals.isBarHorizontal, h = function(c, d) { 68629 s.yaxis.length > 1 && function(g) { 68630 return a.collapsedSeriesIndices.indexOf(g) !== -1; 68631 }(d) || function(g) { 68632 if (t.dCtx.timescaleLabels && t.dCtx.timescaleLabels.length) { 68633 var p = t.dCtx.timescaleLabels[0], f = t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length - 1].position + n / 1.75 - t.dCtx.yAxisWidthRight, b = p.position - n / 1.75 + t.dCtx.yAxisWidthLeft, m = i.config.legend.position === "right" && t.dCtx.lgRect.width > 0 ? t.dCtx.lgRect.width : 0; 68634 f > a.svgWidth - a.translateX - m && (a.skipLastTimelinelabel = !0), b < -(g.show && !g.floating || s.chart.type !== "bar" && s.chart.type !== "candlestick" && s.chart.type !== "rangeBar" && s.chart.type !== "boxPlot" ? 10 : n / 1.75) && (a.skipFirstTimelinelabel = !0); 68635 } else 68636 r === "datetime" ? t.dCtx.gridPad.right < n && !a.rotateXLabels && (a.skipLastTimelinelabel = !0) : r !== "datetime" && t.dCtx.gridPad.right < n / 2 - t.dCtx.yAxisWidthRight && !a.rotateXLabels && !i.config.xaxis.labels.trim && (i.config.xaxis.tickPlacement !== "between" || i.globals.isBarHorizontal) && (t.dCtx.xPadRight = n / 2 + 1); 68637 }(c); 68638 }; 68639 s.yaxis.forEach(function(c, d) { 68640 o ? (t.dCtx.gridPad.left < n && (t.dCtx.xPadLeft = n / 2 + 1), t.dCtx.xPadRight = n / 2 + 1) : h(c, d); 68641 }); 68642 } }]), y; 68643 }(), St = function() { 68644 function y(e) { 68645 F(this, y), this.w = e.w, this.dCtx = e; 68646 } 68647 return Y(y, [{ key: "getyAxisLabelsCoords", value: function() { 68648 var e = this, t = this.w, i = [], a = 10, s = new xe(this.dCtx.ctx); 68649 return t.config.yaxis.map(function(r, n) { 68650 var o = { seriesIndex: n, dataPointIndex: -1, w: t }, h = t.globals.yAxisScale[n], c = 0; 68651 if (!s.isYAxisHidden(n) && r.labels.show && r.labels.minWidth !== void 0 && (c = r.labels.minWidth), !s.isYAxisHidden(n) && r.labels.show && h.result.length) { 68652 var d = t.globals.yLabelFormatters[n], g = h.niceMin === Number.MIN_VALUE ? 0 : h.niceMin, p = h.result.reduce(function(u, x) { 68653 var v, k; 68654 return ((v = String(d(u, o))) === null || v === void 0 ? void 0 : v.length) > ((k = String(d(x, o))) === null || k === void 0 ? void 0 : k.length) ? u : x; 68655 }, g), f = p = d(p, o); 68656 if (p !== void 0 && p.length !== 0 || (p = h.niceMax), t.globals.isBarHorizontal) { 68657 a = 0; 68658 var b = t.globals.labels.slice(); 68659 p = P.getLargestStringFromArr(b), p = d(p, { seriesIndex: n, dataPointIndex: -1, w: t }), f = e.dCtx.dimHelpers.getLargestStringFromMultiArr(p, b); 68660 } 68661 var m = new M(e.dCtx.ctx), w = "rotate(".concat(r.labels.rotate, " 0 0)"), A = m.getTextRects(p, r.labels.style.fontSize, r.labels.style.fontFamily, w, !1), l = A; 68662 p !== f && (l = m.getTextRects(f, r.labels.style.fontSize, r.labels.style.fontFamily, w, !1)), i.push({ width: (c > l.width || c > A.width ? c : l.width > A.width ? l.width : A.width) + a, height: l.height > A.height ? l.height : A.height }); 68663 } else 68664 i.push({ width: 0, height: 0 }); 68665 }), i; 68666 } }, { key: "getyAxisTitleCoords", value: function() { 68667 var e = this, t = this.w, i = []; 68668 return t.config.yaxis.map(function(a, s) { 68669 if (a.show && a.title.text !== void 0) { 68670 var r = new M(e.dCtx.ctx), n = "rotate(".concat(a.title.rotate, " 0 0)"), o = r.getTextRects(a.title.text, a.title.style.fontSize, a.title.style.fontFamily, n, !1); 68671 i.push({ width: o.width, height: o.height }); 68672 } else 68673 i.push({ width: 0, height: 0 }); 68674 }), i; 68675 } }, { key: "getTotalYAxisWidth", value: function() { 68676 var e = this.w, t = 0, i = 0, a = 0, s = e.globals.yAxisScale.length > 1 ? 10 : 0, r = new xe(this.dCtx.ctx), n = function(o, h) { 68677 var c = e.config.yaxis[h].floating, d = 0; 68678 o.width > 0 && !c ? (d = o.width + s, function(g) { 68679 return e.globals.ignoreYAxisIndexes.indexOf(g) > -1; 68680 }(h) && (d = d - o.width - s)) : d = c || r.isYAxisHidden(h) ? 0 : 5, e.config.yaxis[h].opposite ? a += d : i += d, t += d; 68681 }; 68682 return e.globals.yLabelsCoords.map(function(o, h) { 68683 n(o, h); 68684 }), e.globals.yTitleCoords.map(function(o, h) { 68685 n(o, h); 68686 }), e.globals.isBarHorizontal && !e.config.yaxis[0].floating && (t = e.globals.yLabelsCoords[0].width + e.globals.yTitleCoords[0].width + 15), this.dCtx.yAxisWidthLeft = i, this.dCtx.yAxisWidthRight = a, t; 68687 } }]), y; 68688 }(), Ct = function() { 68689 function y(e) { 68690 F(this, y), this.w = e.w, this.dCtx = e; 68691 } 68692 return Y(y, [{ key: "gridPadForColumnsInNumericAxis", value: function(e) { 68693 var t = this.w; 68694 if (t.globals.noData || t.globals.allSeriesCollapsed) 68695 return 0; 68696 var i = function(c) { 68697 return c === "bar" || c === "rangeBar" || c === "candlestick" || c === "boxPlot"; 68698 }, a = t.config.chart.type, s = 0, r = i(a) ? t.config.series.length : 1; 68699 if (t.globals.comboBarCount > 0 && (r = t.globals.comboBarCount), t.globals.collapsedSeries.forEach(function(c) { 68700 i(c.type) && (r -= 1); 68701 }), t.config.chart.stacked && (r = 1), (i(a) || t.globals.comboBarCount > 0) && t.globals.isXNumeric && !t.globals.isBarHorizontal && r > 0) { 68702 var n, o, h = Math.abs(t.globals.initialMaxX - t.globals.initialMinX); 68703 h <= 3 && (h = t.globals.dataPoints), n = h / e, t.globals.minXDiff && t.globals.minXDiff / n > 0 && (o = t.globals.minXDiff / n), o > e / 2 && (o /= 2), (s = o / r * parseInt(t.config.plotOptions.bar.columnWidth, 10) / 100) < 1 && (s = 1), s = s / (r > 1 ? 1 : 1.5) + 5, t.globals.barPadForNumericAxis = s; 68704 } 68705 return s; 68706 } }, { key: "gridPadFortitleSubtitle", value: function() { 68707 var e = this, t = this.w, i = t.globals, a = this.dCtx.isSparkline || !t.globals.axisCharts ? 0 : 10; 68708 ["title", "subtitle"].forEach(function(n) { 68709 t.config[n].text !== void 0 ? a += t.config[n].margin : a += e.dCtx.isSparkline || !t.globals.axisCharts ? 0 : 5; 68710 }), !t.config.legend.show || t.config.legend.position !== "bottom" || t.config.legend.floating || t.globals.axisCharts || (a += 10); 68711 var s = this.dCtx.dimHelpers.getTitleSubtitleCoords("title"), r = this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle"); 68712 i.gridHeight = i.gridHeight - s.height - r.height - a, i.translateY = i.translateY + s.height + r.height + a; 68713 } }, { key: "setGridXPosForDualYAxis", value: function(e, t) { 68714 var i = this.w, a = new xe(this.dCtx.ctx); 68715 i.config.yaxis.map(function(s, r) { 68716 i.globals.ignoreYAxisIndexes.indexOf(r) !== -1 || s.floating || a.isYAxisHidden(r) || (s.opposite && (i.globals.translateX = i.globals.translateX - (t[r].width + e[r].width) - parseInt(i.config.yaxis[r].labels.style.fontSize, 10) / 1.2 - 12), i.globals.translateX < 2 && (i.globals.translateX = 2)); 68717 }); 68718 } }]), y; 68719 }(), Ye = function() { 68720 function y(e) { 68721 F(this, y), this.ctx = e, this.w = e.w, this.lgRect = {}, this.yAxisWidth = 0, this.yAxisWidthLeft = 0, this.yAxisWidthRight = 0, this.xAxisHeight = 0, this.isSparkline = this.w.config.chart.sparkline.enabled, this.dimHelpers = new kt(this), this.dimYAxis = new St(this), this.dimXAxis = new At(this), this.dimGrid = new Ct(this), this.lgWidthForSideLegends = 0, this.gridPad = this.w.config.grid.padding, this.xPadRight = 0, this.xPadLeft = 0; 68722 } 68723 return Y(y, [{ key: "plotCoords", value: function() { 68724 var e = this, t = this.w, i = t.globals; 68725 this.lgRect = this.dimHelpers.getLegendsRect(), this.isSparkline && ((t.config.markers.discrete.length > 0 || t.config.markers.size > 0) && Object.entries(this.gridPad).forEach(function(s) { 68726 var r = Me(s, 2), n = r[0], o = r[1]; 68727 e.gridPad[n] = Math.max(o, e.w.globals.markers.largestSize / 1.5); 68728 }), this.gridPad.top = Math.max(t.config.stroke.width / 2, this.gridPad.top), this.gridPad.bottom = Math.max(t.config.stroke.width / 2, this.gridPad.bottom)), i.axisCharts ? this.setDimensionsForAxisCharts() : this.setDimensionsForNonAxisCharts(), this.dimGrid.gridPadFortitleSubtitle(), i.gridHeight = i.gridHeight - this.gridPad.top - this.gridPad.bottom, i.gridWidth = i.gridWidth - this.gridPad.left - this.gridPad.right - this.xPadRight - this.xPadLeft; 68729 var a = this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth); 68730 i.gridWidth = i.gridWidth - 2 * a, i.translateX = i.translateX + this.gridPad.left + this.xPadLeft + (a > 0 ? a + 4 : 0), i.translateY = i.translateY + this.gridPad.top; 68731 } }, { key: "setDimensionsForAxisCharts", value: function() { 68732 var e = this, t = this.w, i = t.globals, a = this.dimYAxis.getyAxisLabelsCoords(), s = this.dimYAxis.getyAxisTitleCoords(); 68733 t.globals.yLabelsCoords = [], t.globals.yTitleCoords = [], t.config.yaxis.map(function(p, f) { 68734 t.globals.yLabelsCoords.push({ width: a[f].width, index: f }), t.globals.yTitleCoords.push({ width: s[f].width, index: f }); 68735 }), this.yAxisWidth = this.dimYAxis.getTotalYAxisWidth(); 68736 var r = this.dimXAxis.getxAxisLabelsCoords(), n = this.dimXAxis.getxAxisGroupLabelsCoords(), o = this.dimXAxis.getxAxisTitleCoords(); 68737 this.conditionalChecksForAxisCoords(r, o, n), i.translateXAxisY = t.globals.rotateXLabels ? this.xAxisHeight / 8 : -4, i.translateXAxisX = t.globals.rotateXLabels && t.globals.isXNumeric && t.config.xaxis.labels.rotate <= -45 ? -this.xAxisWidth / 4 : 0, t.globals.isBarHorizontal && (i.rotateXLabels = !1, i.translateXAxisY = parseInt(t.config.xaxis.labels.style.fontSize, 10) / 1.5 * -1), i.translateXAxisY = i.translateXAxisY + t.config.xaxis.labels.offsetY, i.translateXAxisX = i.translateXAxisX + t.config.xaxis.labels.offsetX; 68738 var h = this.yAxisWidth, c = this.xAxisHeight; 68739 i.xAxisLabelsHeight = this.xAxisHeight - o.height, i.xAxisGroupLabelsHeight = i.xAxisLabelsHeight - r.height, i.xAxisLabelsWidth = this.xAxisWidth, i.xAxisHeight = this.xAxisHeight; 68740 var d = 10; 68741 (t.config.chart.type === "radar" || this.isSparkline) && (h = 0, c = i.goldenPadding), this.isSparkline && (this.lgRect = { height: 0, width: 0 }), (this.isSparkline || t.config.chart.type === "treemap") && (h = 0, c = 0, d = 0), this.isSparkline || this.dimXAxis.additionalPaddingXLabels(r); 68742 var g = function() { 68743 i.translateX = h, i.gridHeight = i.svgHeight - e.lgRect.height - c - (e.isSparkline || t.config.chart.type === "treemap" ? 0 : t.globals.rotateXLabels ? 10 : 15), i.gridWidth = i.svgWidth - h; 68744 }; 68745 switch (t.config.xaxis.position === "top" && (d = i.xAxisHeight - t.config.xaxis.axisTicks.height - 5), t.config.legend.position) { 68746 case "bottom": 68747 i.translateY = d, g(); 68748 break; 68749 case "top": 68750 i.translateY = this.lgRect.height + d, g(); 68751 break; 68752 case "left": 68753 i.translateY = d, i.translateX = this.lgRect.width + h, i.gridHeight = i.svgHeight - c - 12, i.gridWidth = i.svgWidth - this.lgRect.width - h; 68754 break; 68755 case "right": 68756 i.translateY = d, i.translateX = h, i.gridHeight = i.svgHeight - c - 12, i.gridWidth = i.svgWidth - this.lgRect.width - h - 5; 68757 break; 68758 default: 68759 throw new Error("Legend position not supported"); 68760 } 68761 this.dimGrid.setGridXPosForDualYAxis(s, a), new Ne(this.ctx).setYAxisXPosition(a, s); 68762 } }, { key: "setDimensionsForNonAxisCharts", value: function() { 68763 var e = this.w, t = e.globals, i = e.config, a = 0; 68764 e.config.legend.show && !e.config.legend.floating && (a = 20); 68765 var s = i.chart.type === "pie" || i.chart.type === "polarArea" || i.chart.type === "donut" ? "pie" : "radialBar", r = i.plotOptions[s].offsetY, n = i.plotOptions[s].offsetX; 68766 if (!i.legend.show || i.legend.floating) 68767 return t.gridHeight = t.svgHeight - i.grid.padding.left + i.grid.padding.right, t.gridWidth = t.gridHeight, t.translateY = r, void (t.translateX = n + (t.svgWidth - t.gridWidth) / 2); 68768 switch (i.legend.position) { 68769 case "bottom": 68770 t.gridHeight = t.svgHeight - this.lgRect.height - t.goldenPadding, t.gridWidth = t.svgWidth, t.translateY = r - 10, t.translateX = n + (t.svgWidth - t.gridWidth) / 2; 68771 break; 68772 case "top": 68773 t.gridHeight = t.svgHeight - this.lgRect.height - t.goldenPadding, t.gridWidth = t.svgWidth, t.translateY = this.lgRect.height + r + 10, t.translateX = n + (t.svgWidth - t.gridWidth) / 2; 68774 break; 68775 case "left": 68776 t.gridWidth = t.svgWidth - this.lgRect.width - a, t.gridHeight = i.chart.height !== "auto" ? t.svgHeight : t.gridWidth, t.translateY = r, t.translateX = n + this.lgRect.width + a; 68777 break; 68778 case "right": 68779 t.gridWidth = t.svgWidth - this.lgRect.width - a - 5, t.gridHeight = i.chart.height !== "auto" ? t.svgHeight : t.gridWidth, t.translateY = r, t.translateX = n + 10; 68780 break; 68781 default: 68782 throw new Error("Legend position not supported"); 68783 } 68784 } }, { key: "conditionalChecksForAxisCoords", value: function(e, t, i) { 68785 var a = this.w, s = a.globals.hasXaxisGroups ? 2 : 1, r = i.height + e.height + t.height, n = a.globals.isMultiLineX ? 1.2 : a.globals.LINE_HEIGHT_RATIO, o = a.globals.rotateXLabels ? 22 : 10, h = a.globals.rotateXLabels && a.config.legend.position === "bottom" ? 10 : 0; 68786 this.xAxisHeight = r * n + s * o + h, this.xAxisWidth = e.width, this.xAxisHeight - t.height > a.config.xaxis.labels.maxHeight && (this.xAxisHeight = a.config.xaxis.labels.maxHeight), a.config.xaxis.labels.minHeight && this.xAxisHeight < a.config.xaxis.labels.minHeight && (this.xAxisHeight = a.config.xaxis.labels.minHeight), a.config.xaxis.floating && (this.xAxisHeight = 0); 68787 var c = 0, d = 0; 68788 a.config.yaxis.forEach(function(g) { 68789 c += g.labels.minWidth, d += g.labels.maxWidth; 68790 }), this.yAxisWidth < c && (this.yAxisWidth = c), this.yAxisWidth > d && (this.yAxisWidth = d); 68791 } }]), y; 68792 }(), Lt = function() { 68793 function y(e) { 68794 F(this, y), this.w = e.w, this.lgCtx = e; 68795 } 68796 return Y(y, [{ key: "getLegendStyles", value: function() { 68797 var e, t, i, a = document.createElement("style"); 68798 a.setAttribute("type", "text/css"); 68799 var s = ((e = this.lgCtx.ctx) === null || e === void 0 || (t = e.opts) === null || t === void 0 || (i = t.chart) === null || i === void 0 ? void 0 : i.nonce) || this.w.config.chart.nonce; 68800 s && a.setAttribute("nonce", s); 68801 var r = document.createTextNode(` 68802 .apexcharts-legend { 68803 display: flex; 68804 overflow: auto; 68805 padding: 0 10px; 68806 } 68807 .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { 68808 flex-wrap: wrap 68809 } 68810 .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 68811 flex-direction: column; 68812 bottom: 0; 68813 } 68814 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 68815 justify-content: flex-start; 68816 } 68817 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { 68818 justify-content: center; 68819 } 68820 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { 68821 justify-content: flex-end; 68822 } 68823 .apexcharts-legend-series { 68824 cursor: pointer; 68825 line-height: normal; 68826 } 68827 .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{ 68828 display: flex; 68829 align-items: center; 68830 } 68831 .apexcharts-legend-text { 68832 position: relative; 68833 font-size: 14px; 68834 } 68835 .apexcharts-legend-text *, .apexcharts-legend-marker * { 68836 pointer-events: none; 68837 } 68838 .apexcharts-legend-marker { 68839 position: relative; 68840 display: inline-block; 68841 cursor: pointer; 68842 margin-right: 3px; 68843 border-style: solid; 68844 } 68845 68846 .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{ 68847 display: inline-block; 68848 } 68849 .apexcharts-legend-series.apexcharts-no-click { 68850 cursor: auto; 68851 } 68852 .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { 68853 display: none !important; 68854 } 68855 .apexcharts-inactive-legend { 68856 opacity: 0.45; 68857 }`); 68858 return a.appendChild(r), a; 68859 } }, { key: "getLegendBBox", value: function() { 68860 var e = this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(), t = e.width; 68861 return { clwh: e.height, clww: t }; 68862 } }, { key: "appendToForeignObject", value: function() { 68863 this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles()); 68864 } }, { key: "toggleDataSeries", value: function(e, t) { 68865 var i = this, a = this.w; 68866 if (a.globals.axisCharts || a.config.chart.type === "radialBar") { 68867 a.globals.resized = !0; 68868 var s = null, r = null; 68869 a.globals.risingSeries = [], a.globals.axisCharts ? (s = a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e, "']")), r = parseInt(s.getAttribute("data:realIndex"), 10)) : (s = a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e + 1, "']")), r = parseInt(s.getAttribute("rel"), 10) - 1), t ? [{ cs: a.globals.collapsedSeries, csi: a.globals.collapsedSeriesIndices }, { cs: a.globals.ancillaryCollapsedSeries, csi: a.globals.ancillaryCollapsedSeriesIndices }].forEach(function(c) { 68870 i.riseCollapsedSeries(c.cs, c.csi, r); 68871 }) : this.hideSeries({ seriesEl: s, realIndex: r }); 68872 } else { 68873 var n = a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e + 1, "'] path")), o = a.config.chart.type; 68874 if (o === "pie" || o === "polarArea" || o === "donut") { 68875 var h = a.config.plotOptions.pie.donut.labels; 68876 new M(this.lgCtx.ctx).pathMouseDown(n.members[0], null), this.lgCtx.ctx.pie.printDataLabelsInner(n.members[0].node, h); 68877 } 68878 n.fire("click"); 68879 } 68880 } }, { key: "hideSeries", value: function(e) { 68881 var t = e.seriesEl, i = e.realIndex, a = this.w, s = P.clone(a.config.series); 68882 if (a.globals.axisCharts) { 68883 var r = !1; 68884 if (a.config.yaxis[i] && a.config.yaxis[i].show && a.config.yaxis[i].showAlways && (r = !0, a.globals.ancillaryCollapsedSeriesIndices.indexOf(i) < 0 && (a.globals.ancillaryCollapsedSeries.push({ index: i, data: s[i].data.slice(), type: t.parentNode.className.baseVal.split("-")[1] }), a.globals.ancillaryCollapsedSeriesIndices.push(i))), !r) { 68885 a.globals.collapsedSeries.push({ index: i, data: s[i].data.slice(), type: t.parentNode.className.baseVal.split("-")[1] }), a.globals.collapsedSeriesIndices.push(i); 68886 var n = a.globals.risingSeries.indexOf(i); 68887 a.globals.risingSeries.splice(n, 1); 68888 } 68889 } else 68890 a.globals.collapsedSeries.push({ index: i, data: s[i] }), a.globals.collapsedSeriesIndices.push(i); 68891 for (var o = t.childNodes, h = 0; h < o.length; h++) 68892 o[h].classList.contains("apexcharts-series-markers-wrap") && (o[h].classList.contains("apexcharts-hide") ? o[h].classList.remove("apexcharts-hide") : o[h].classList.add("apexcharts-hide")); 68893 a.globals.allSeriesCollapsed = a.globals.collapsedSeries.length === a.config.series.length, s = this._getSeriesBasedOnCollapsedState(s), this.lgCtx.ctx.updateHelpers._updateSeries(s, a.config.chart.animations.dynamicAnimation.enabled); 68894 } }, { key: "riseCollapsedSeries", value: function(e, t, i) { 68895 var a = this.w, s = P.clone(a.config.series); 68896 if (e.length > 0) { 68897 for (var r = 0; r < e.length; r++) 68898 e[r].index === i && (a.globals.axisCharts ? (s[i].data = e[r].data.slice(), e.splice(r, 1), t.splice(r, 1), a.globals.risingSeries.push(i)) : (s[i] = e[r].data, e.splice(r, 1), t.splice(r, 1), a.globals.risingSeries.push(i))); 68899 s = this._getSeriesBasedOnCollapsedState(s), this.lgCtx.ctx.updateHelpers._updateSeries(s, a.config.chart.animations.dynamicAnimation.enabled); 68900 } 68901 } }, { key: "_getSeriesBasedOnCollapsedState", value: function(e) { 68902 var t = this.w; 68903 return t.globals.axisCharts ? e.forEach(function(i, a) { 68904 t.globals.collapsedSeriesIndices.indexOf(a) > -1 && (e[a].data = []); 68905 }) : e.forEach(function(i, a) { 68906 t.globals.collapsedSeriesIndices.indexOf(a) > -1 && (e[a] = 0); 68907 }), e; 68908 } }]), y; 68909 }(), Ke = function() { 68910 function y(e) { 68911 F(this, y), this.ctx = e, this.w = e.w, this.onLegendClick = this.onLegendClick.bind(this), this.onLegendHovered = this.onLegendHovered.bind(this), this.isBarsDistributed = this.w.config.chart.type === "bar" && this.w.config.plotOptions.bar.distributed && this.w.config.series.length === 1, this.legendHelpers = new Lt(this); 68912 } 68913 return Y(y, [{ key: "init", value: function() { 68914 var e = this.w, t = e.globals, i = e.config; 68915 if ((i.legend.showForSingleSeries && t.series.length === 1 || this.isBarsDistributed || t.series.length > 1 || !t.axisCharts) && i.legend.show) { 68916 for (; t.dom.elLegendWrap.firstChild; ) 68917 t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild); 68918 this.drawLegends(), P.isIE11() ? document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()) : this.legendHelpers.appendToForeignObject(), i.legend.position === "bottom" || i.legend.position === "top" ? this.legendAlignHorizontal() : i.legend.position !== "right" && i.legend.position !== "left" || this.legendAlignVertical(); 68919 } 68920 } }, { key: "drawLegends", value: function() { 68921 var e = this, t = this.w, i = t.config.legend.fontFamily, a = t.globals.seriesNames, s = t.globals.colors.slice(); 68922 if (t.config.chart.type === "heatmap") { 68923 var r = t.config.plotOptions.heatmap.colorScale.ranges; 68924 a = r.map(function(T) { 68925 return T.name ? T.name : T.from + " - " + T.to; 68926 }), s = r.map(function(T) { 68927 return T.color; 68928 }); 68929 } else 68930 this.isBarsDistributed && (a = t.globals.labels.slice()); 68931 t.config.legend.customLegendItems.length && (a = t.config.legend.customLegendItems); 68932 for (var n = t.globals.legendFormatter, o = t.config.legend.inverseOrder, h = o ? a.length - 1 : 0; o ? h >= 0 : h <= a.length - 1; o ? h-- : h++) { 68933 var c, d = n(a[h], { seriesIndex: h, w: t }), g = !1, p = !1; 68934 if (t.globals.collapsedSeries.length > 0) 68935 for (var f = 0; f < t.globals.collapsedSeries.length; f++) 68936 t.globals.collapsedSeries[f].index === h && (g = !0); 68937 if (t.globals.ancillaryCollapsedSeriesIndices.length > 0) 68938 for (var b = 0; b < t.globals.ancillaryCollapsedSeriesIndices.length; b++) 68939 t.globals.ancillaryCollapsedSeriesIndices[b] === h && (p = !0); 68940 var m = document.createElement("span"); 68941 m.classList.add("apexcharts-legend-marker"); 68942 var w = t.config.legend.markers.offsetX, A = t.config.legend.markers.offsetY, l = t.config.legend.markers.height, u = t.config.legend.markers.width, x = t.config.legend.markers.strokeWidth, v = t.config.legend.markers.strokeColor, k = t.config.legend.markers.radius, S = m.style; 68943 S.background = s[h], S.color = s[h], S.setProperty("background", s[h], "important"), t.config.legend.markers.fillColors && t.config.legend.markers.fillColors[h] && (S.background = t.config.legend.markers.fillColors[h]), t.globals.seriesColors[h] !== void 0 && (S.background = t.globals.seriesColors[h], S.color = t.globals.seriesColors[h]), S.height = Array.isArray(l) ? parseFloat(l[h]) + "px" : parseFloat(l) + "px", S.width = Array.isArray(u) ? parseFloat(u[h]) + "px" : parseFloat(u) + "px", S.left = (Array.isArray(w) ? parseFloat(w[h]) : parseFloat(w)) + "px", S.top = (Array.isArray(A) ? parseFloat(A[h]) : parseFloat(A)) + "px", S.borderWidth = Array.isArray(x) ? x[h] : x, S.borderColor = Array.isArray(v) ? v[h] : v, S.borderRadius = Array.isArray(k) ? parseFloat(k[h]) + "px" : parseFloat(k) + "px", t.config.legend.markers.customHTML && (Array.isArray(t.config.legend.markers.customHTML) ? t.config.legend.markers.customHTML[h] && (m.innerHTML = t.config.legend.markers.customHTML[h]()) : m.innerHTML = t.config.legend.markers.customHTML()), M.setAttrs(m, { rel: h + 1, "data:collapsed": g || p }), (g || p) && m.classList.add("apexcharts-inactive-legend"); 68944 var C = document.createElement("div"), L = document.createElement("span"); 68945 L.classList.add("apexcharts-legend-text"), L.innerHTML = Array.isArray(d) ? d.join(" ") : d; 68946 var I = t.config.legend.labels.useSeriesColors ? t.globals.colors[h] : Array.isArray(t.config.legend.labels.colors) ? (c = t.config.legend.labels.colors) === null || c === void 0 ? void 0 : c[h] : t.config.legend.labels.colors; 68947 I || (I = t.config.chart.foreColor), L.style.color = I, L.style.fontSize = parseFloat(t.config.legend.fontSize) + "px", L.style.fontWeight = t.config.legend.fontWeight, L.style.fontFamily = i || t.config.chart.fontFamily, M.setAttrs(L, { rel: h + 1, i: h, "data:default-text": encodeURIComponent(d), "data:collapsed": g || p }), C.appendChild(m), C.appendChild(L); 68948 var z = new q(this.ctx); 68949 t.config.legend.showForZeroSeries || z.getSeriesTotalByIndex(h) === 0 && z.seriesHaveSameValues(h) && !z.isSeriesNull(h) && t.globals.collapsedSeriesIndices.indexOf(h) === -1 && t.globals.ancillaryCollapsedSeriesIndices.indexOf(h) === -1 && C.classList.add("apexcharts-hidden-zero-series"), t.config.legend.showForNullSeries || z.isSeriesNull(h) && t.globals.collapsedSeriesIndices.indexOf(h) === -1 && t.globals.ancillaryCollapsedSeriesIndices.indexOf(h) === -1 && C.classList.add("apexcharts-hidden-null-series"), t.globals.dom.elLegendWrap.appendChild(C), t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)), t.globals.dom.elLegendWrap.classList.add("apx-legend-position-" + t.config.legend.position), C.classList.add("apexcharts-legend-series"), C.style.margin = "".concat(t.config.legend.itemMargin.vertical, "px ").concat(t.config.legend.itemMargin.horizontal, "px"), t.globals.dom.elLegendWrap.style.width = t.config.legend.width ? t.config.legend.width + "px" : "", t.globals.dom.elLegendWrap.style.height = t.config.legend.height ? t.config.legend.height + "px" : "", M.setAttrs(C, { rel: h + 1, seriesName: P.escapeString(a[h]), "data:collapsed": g || p }), (g || p) && C.classList.add("apexcharts-inactive-legend"), t.config.legend.onItemClick.toggleDataSeries || C.classList.add("apexcharts-no-click"); 68950 } 68951 t.globals.dom.elWrap.addEventListener("click", e.onLegendClick, !0), t.config.legend.onItemHover.highlightDataSeries && t.config.legend.customLegendItems.length === 0 && (t.globals.dom.elWrap.addEventListener("mousemove", e.onLegendHovered, !0), t.globals.dom.elWrap.addEventListener("mouseout", e.onLegendHovered, !0)); 68952 } }, { key: "setLegendWrapXY", value: function(e, t) { 68953 var i = this.w, a = i.globals.dom.elLegendWrap, s = a.getBoundingClientRect(), r = 0, n = 0; 68954 if (i.config.legend.position === "bottom") 68955 n += i.globals.svgHeight - s.height / 2; 68956 else if (i.config.legend.position === "top") { 68957 var o = new Ye(this.ctx), h = o.dimHelpers.getTitleSubtitleCoords("title").height, c = o.dimHelpers.getTitleSubtitleCoords("subtitle").height; 68958 n = n + (h > 0 ? h - 10 : 0) + (c > 0 ? c - 10 : 0); 68959 } 68960 a.style.position = "absolute", r = r + e + i.config.legend.offsetX, n = n + t + i.config.legend.offsetY, a.style.left = r + "px", a.style.top = n + "px", i.config.legend.position === "bottom" ? (a.style.top = "auto", a.style.bottom = 5 - i.config.legend.offsetY + "px") : i.config.legend.position === "right" && (a.style.left = "auto", a.style.right = 25 + i.config.legend.offsetX + "px"), ["width", "height"].forEach(function(d) { 68961 a.style[d] && (a.style[d] = parseInt(i.config.legend[d], 10) + "px"); 68962 }); 68963 } }, { key: "legendAlignHorizontal", value: function() { 68964 var e = this.w; 68965 e.globals.dom.elLegendWrap.style.right = 0; 68966 var t = this.legendHelpers.getLegendBBox(), i = new Ye(this.ctx), a = i.dimHelpers.getTitleSubtitleCoords("title"), s = i.dimHelpers.getTitleSubtitleCoords("subtitle"), r = 0; 68967 e.config.legend.position === "bottom" ? r = -t.clwh / 1.8 : e.config.legend.position === "top" && (r = a.height + s.height + e.config.title.margin + e.config.subtitle.margin - 10), this.setLegendWrapXY(20, r); 68968 } }, { key: "legendAlignVertical", value: function() { 68969 var e = this.w, t = this.legendHelpers.getLegendBBox(), i = 0; 68970 e.config.legend.position === "left" && (i = 20), e.config.legend.position === "right" && (i = e.globals.svgWidth - t.clww - 10), this.setLegendWrapXY(i, 20); 68971 } }, { key: "onLegendHovered", value: function(e) { 68972 var t = this.w, i = e.target.classList.contains("apexcharts-legend-series") || e.target.classList.contains("apexcharts-legend-text") || e.target.classList.contains("apexcharts-legend-marker"); 68973 if (t.config.chart.type === "heatmap" || this.isBarsDistributed) { 68974 if (i) { 68975 var a = parseInt(e.target.getAttribute("rel"), 10) - 1; 68976 this.ctx.events.fireEvent("legendHover", [this.ctx, a, this.w]), new te(this.ctx).highlightRangeInSeries(e, e.target); 68977 } 68978 } else 68979 !e.target.classList.contains("apexcharts-inactive-legend") && i && new te(this.ctx).toggleSeriesOnHover(e, e.target); 68980 } }, { key: "onLegendClick", value: function(e) { 68981 var t = this.w; 68982 if (!t.config.legend.customLegendItems.length && (e.target.classList.contains("apexcharts-legend-series") || e.target.classList.contains("apexcharts-legend-text") || e.target.classList.contains("apexcharts-legend-marker"))) { 68983 var i = parseInt(e.target.getAttribute("rel"), 10) - 1, a = e.target.getAttribute("data:collapsed") === "true", s = this.w.config.chart.events.legendClick; 68984 typeof s == "function" && s(this.ctx, i, this.w), this.ctx.events.fireEvent("legendClick", [this.ctx, i, this.w]); 68985 var r = this.w.config.legend.markers.onClick; 68986 typeof r == "function" && e.target.classList.contains("apexcharts-legend-marker") && (r(this.ctx, i, this.w), this.ctx.events.fireEvent("legendMarkerClick", [this.ctx, i, this.w])), t.config.chart.type !== "treemap" && t.config.chart.type !== "heatmap" && !this.isBarsDistributed && t.config.legend.onItemClick.toggleDataSeries && this.legendHelpers.toggleDataSeries(i, a); 68987 } 68988 } }]), y; 68989 }(), et = function() { 68990 function y(e) { 68991 F(this, y), this.ctx = e, this.w = e.w; 68992 var t = this.w; 68993 this.ev = this.w.config.chart.events, this.selectedClass = "apexcharts-selected", this.localeValues = this.w.globals.locale.toolbar, this.minX = t.globals.minX, this.maxX = t.globals.maxX; 68994 } 68995 return Y(y, [{ key: "createToolbar", value: function() { 68996 var e = this, t = this.w, i = function() { 68997 return document.createElement("div"); 68998 }, a = i(); 68999 if (a.setAttribute("class", "apexcharts-toolbar"), a.style.top = t.config.chart.toolbar.offsetY + "px", a.style.right = 3 - t.config.chart.toolbar.offsetX + "px", t.globals.dom.elWrap.appendChild(a), this.elZoom = i(), this.elZoomIn = i(), this.elZoomOut = i(), this.elPan = i(), this.elSelection = i(), this.elZoomReset = i(), this.elMenuIcon = i(), this.elMenu = i(), this.elCustomIcons = [], this.t = t.config.chart.toolbar.tools, Array.isArray(this.t.customIcons)) 69000 for (var s = 0; s < this.t.customIcons.length; s++) 69001 this.elCustomIcons.push(i()); 69002 var r = [], n = function(d, g, p) { 69003 var f = d.toLowerCase(); 69004 e.t[f] && t.config.chart.zoom.enabled && r.push({ el: g, icon: typeof e.t[f] == "string" ? e.t[f] : p, title: e.localeValues[d], class: "apexcharts-".concat(f, "-icon") }); 69005 }; 69006 n("zoomIn", this.elZoomIn, `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> 69007 <path d="M0 0h24v24H0z" fill="none"/> 69008 <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/> 69009</svg> 69010`), n("zoomOut", this.elZoomOut, `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> 69011 <path d="M0 0h24v24H0z" fill="none"/> 69012 <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/> 69013</svg> 69014`); 69015 var o = function(d) { 69016 e.t[d] && t.config.chart[d].enabled && r.push({ el: d === "zoom" ? e.elZoom : e.elSelection, icon: typeof e.t[d] == "string" ? e.t[d] : d === "zoom" ? `<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24"> 69017 <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/> 69018 <path d="M0 0h24v24H0V0z" fill="none"/> 69019 <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/> 69020</svg>` : `<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> 69021 <path d="M0 0h24v24H0z" fill="none"/> 69022 <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/> 69023</svg>`, title: e.localeValues[d === "zoom" ? "selectionZoom" : "selection"], class: t.globals.isTouchDevice ? "apexcharts-element-hidden" : "apexcharts-".concat(d, "-icon") }); 69024 }; 69025 o("zoom"), o("selection"), this.t.pan && t.config.chart.zoom.enabled && r.push({ el: this.elPan, icon: typeof this.t.pan == "string" ? this.t.pan : `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24"> 69026 <defs> 69027 <path d="M0 0h24v24H0z" id="a"/> 69028 </defs> 69029 <clipPath id="b"> 69030 <use overflow="visible" xlink:href="#a"/> 69031 </clipPath> 69032 <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/> 69033</svg>`, title: this.localeValues.pan, class: t.globals.isTouchDevice ? "apexcharts-element-hidden" : "apexcharts-pan-icon" }), n("reset", this.elZoomReset, `<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> 69034 <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/> 69035 <path d="M0 0h24v24H0z" fill="none"/> 69036</svg>`), this.t.download && r.push({ el: this.elMenuIcon, icon: typeof this.t.download == "string" ? this.t.download : '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>', title: this.localeValues.menu, class: "apexcharts-menu-icon" }); 69037 for (var h = 0; h < this.elCustomIcons.length; h++) 69038 r.push({ el: this.elCustomIcons[h], icon: this.t.customIcons[h].icon, title: this.t.customIcons[h].title, index: this.t.customIcons[h].index, class: "apexcharts-toolbar-custom-icon " + this.t.customIcons[h].class }); 69039 r.forEach(function(d, g) { 69040 d.index && P.moveIndexInArray(r, g, d.index); 69041 }); 69042 for (var c = 0; c < r.length; c++) 69043 M.setAttrs(r[c].el, { class: r[c].class, title: r[c].title }), r[c].el.innerHTML = r[c].icon, a.appendChild(r[c].el); 69044 this._createHamburgerMenu(a), t.globals.zoomEnabled ? this.elZoom.classList.add(this.selectedClass) : t.globals.panEnabled ? this.elPan.classList.add(this.selectedClass) : t.globals.selectionEnabled && this.elSelection.classList.add(this.selectedClass), this.addToolbarEventListeners(); 69045 } }, { key: "_createHamburgerMenu", value: function(e) { 69046 this.elMenuItems = [], e.appendChild(this.elMenu), M.setAttrs(this.elMenu, { class: "apexcharts-menu" }); 69047 for (var t = [{ name: "exportSVG", title: this.localeValues.exportToSVG }, { name: "exportPNG", title: this.localeValues.exportToPNG }, { name: "exportCSV", title: this.localeValues.exportToCSV }], i = 0; i < t.length; i++) 69048 this.elMenuItems.push(document.createElement("div")), this.elMenuItems[i].innerHTML = t[i].title, M.setAttrs(this.elMenuItems[i], { class: "apexcharts-menu-item ".concat(t[i].name), title: t[i].title }), this.elMenu.appendChild(this.elMenuItems[i]); 69049 } }, { key: "addToolbarEventListeners", value: function() { 69050 var e = this; 69051 this.elZoomReset.addEventListener("click", this.handleZoomReset.bind(this)), this.elSelection.addEventListener("click", this.toggleZoomSelection.bind(this, "selection")), this.elZoom.addEventListener("click", this.toggleZoomSelection.bind(this, "zoom")), this.elZoomIn.addEventListener("click", this.handleZoomIn.bind(this)), this.elZoomOut.addEventListener("click", this.handleZoomOut.bind(this)), this.elPan.addEventListener("click", this.togglePanning.bind(this)), this.elMenuIcon.addEventListener("click", this.toggleMenu.bind(this)), this.elMenuItems.forEach(function(i) { 69052 i.classList.contains("exportSVG") ? i.addEventListener("click", e.handleDownload.bind(e, "svg")) : i.classList.contains("exportPNG") ? i.addEventListener("click", e.handleDownload.bind(e, "png")) : i.classList.contains("exportCSV") && i.addEventListener("click", e.handleDownload.bind(e, "csv")); 69053 }); 69054 for (var t = 0; t < this.t.customIcons.length; t++) 69055 this.elCustomIcons[t].addEventListener("click", this.t.customIcons[t].click.bind(this, this.ctx, this.ctx.w)); 69056 } }, { key: "toggleZoomSelection", value: function(e) { 69057 this.ctx.getSyncedCharts().forEach(function(t) { 69058 t.ctx.toolbar.toggleOtherControls(); 69059 var i = e === "selection" ? t.ctx.toolbar.elSelection : t.ctx.toolbar.elZoom, a = e === "selection" ? "selectionEnabled" : "zoomEnabled"; 69060 t.w.globals[a] = !t.w.globals[a], i.classList.contains(t.ctx.toolbar.selectedClass) ? i.classList.remove(t.ctx.toolbar.selectedClass) : i.classList.add(t.ctx.toolbar.selectedClass); 69061 }); 69062 } }, { key: "getToolbarIconsReference", value: function() { 69063 var e = this.w; 69064 this.elZoom || (this.elZoom = e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")), this.elPan || (this.elPan = e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")), this.elSelection || (this.elSelection = e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon")); 69065 } }, { key: "enableZoomPanFromToolbar", value: function(e) { 69066 this.toggleOtherControls(), e === "pan" ? this.w.globals.panEnabled = !0 : this.w.globals.zoomEnabled = !0; 69067 var t = e === "pan" ? this.elPan : this.elZoom, i = e === "pan" ? this.elZoom : this.elPan; 69068 t && t.classList.add(this.selectedClass), i && i.classList.remove(this.selectedClass); 69069 } }, { key: "togglePanning", value: function() { 69070 this.ctx.getSyncedCharts().forEach(function(e) { 69071 e.ctx.toolbar.toggleOtherControls(), e.w.globals.panEnabled = !e.w.globals.panEnabled, e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass) ? e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass) : e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass); 69072 }); 69073 } }, { key: "toggleOtherControls", value: function() { 69074 var e = this, t = this.w; 69075 t.globals.panEnabled = !1, t.globals.zoomEnabled = !1, t.globals.selectionEnabled = !1, this.getToolbarIconsReference(), [this.elPan, this.elSelection, this.elZoom].forEach(function(i) { 69076 i && i.classList.remove(e.selectedClass); 69077 }); 69078 } }, { key: "handleZoomIn", value: function() { 69079 var e = this.w; 69080 e.globals.isRangeBar && (this.minX = e.globals.minY, this.maxX = e.globals.maxY); 69081 var t = (this.minX + this.maxX) / 2, i = (this.minX + t) / 2, a = (this.maxX + t) / 2, s = this._getNewMinXMaxX(i, a); 69082 e.globals.disableZoomIn || this.zoomUpdateOptions(s.minX, s.maxX); 69083 } }, { key: "handleZoomOut", value: function() { 69084 var e = this.w; 69085 if (e.globals.isRangeBar && (this.minX = e.globals.minY, this.maxX = e.globals.maxY), !(e.config.xaxis.type === "datetime" && new Date(this.minX).getUTCFullYear() < 1e3)) { 69086 var t = (this.minX + this.maxX) / 2, i = this.minX - (t - this.minX), a = this.maxX - (t - this.maxX), s = this._getNewMinXMaxX(i, a); 69087 e.globals.disableZoomOut || this.zoomUpdateOptions(s.minX, s.maxX); 69088 } 69089 } }, { key: "_getNewMinXMaxX", value: function(e, t) { 69090 var i = this.w.config.xaxis.convertedCatToNumeric; 69091 return { minX: i ? Math.floor(e) : e, maxX: i ? Math.floor(t) : t }; 69092 } }, { key: "zoomUpdateOptions", value: function(e, t) { 69093 var i = this.w; 69094 if (e !== void 0 || t !== void 0) { 69095 if (!(i.config.xaxis.convertedCatToNumeric && (e < 1 && (e = 1, t = i.globals.dataPoints), t - e < 2))) { 69096 var a = { min: e, max: t }, s = this.getBeforeZoomRange(a); 69097 s && (a = s.xaxis); 69098 var r = { xaxis: a }, n = P.clone(i.globals.initialConfig.yaxis); 69099 i.config.chart.zoom.autoScaleYaxis && (n = new we(this.ctx).autoScaleY(this.ctx, n, { xaxis: a })), i.config.chart.group || (r.yaxis = n), this.w.globals.zoomed = !0, this.ctx.updateHelpers._updateOptions(r, !1, this.w.config.chart.animations.dynamicAnimation.enabled), this.zoomCallback(a, n); 69100 } 69101 } else 69102 this.handleZoomReset(); 69103 } }, { key: "zoomCallback", value: function(e, t) { 69104 typeof this.ev.zoomed == "function" && this.ev.zoomed(this.ctx, { xaxis: e, yaxis: t }); 69105 } }, { key: "getBeforeZoomRange", value: function(e, t) { 69106 var i = null; 69107 return typeof this.ev.beforeZoom == "function" && (i = this.ev.beforeZoom(this, { xaxis: e, yaxis: t })), i; 69108 } }, { key: "toggleMenu", value: function() { 69109 var e = this; 69110 window.setTimeout(function() { 69111 e.elMenu.classList.contains("apexcharts-menu-open") ? e.elMenu.classList.remove("apexcharts-menu-open") : e.elMenu.classList.add("apexcharts-menu-open"); 69112 }, 0); 69113 } }, { key: "handleDownload", value: function(e) { 69114 var t = this.w, i = new Ee(this.ctx); 69115 switch (e) { 69116 case "svg": 69117 i.exportToSVG(this.ctx); 69118 break; 69119 case "png": 69120 i.exportToPng(this.ctx); 69121 break; 69122 case "csv": 69123 i.exportToCSV({ series: t.config.series, columnDelimiter: t.config.chart.toolbar.export.csv.columnDelimiter }); 69124 } 69125 } }, { key: "handleZoomReset", value: function(e) { 69126 this.ctx.getSyncedCharts().forEach(function(t) { 69127 var i = t.w; 69128 if (i.globals.lastXAxis.min = i.globals.initialConfig.xaxis.min, i.globals.lastXAxis.max = i.globals.initialConfig.xaxis.max, t.updateHelpers.revertDefaultAxisMinMax(), typeof i.config.chart.events.beforeResetZoom == "function") { 69129 var a = i.config.chart.events.beforeResetZoom(t, i); 69130 a && t.updateHelpers.revertDefaultAxisMinMax(a); 69131 } 69132 typeof i.config.chart.events.zoomed == "function" && t.ctx.toolbar.zoomCallback({ min: i.config.xaxis.min, max: i.config.xaxis.max }), i.globals.zoomed = !1; 69133 var s = t.ctx.series.emptyCollapsedSeries(P.clone(i.globals.initialSeries)); 69134 t.updateHelpers._updateSeries(s, i.config.chart.animations.dynamicAnimation.enabled); 69135 }); 69136 } }, { key: "destroy", value: function() { 69137 this.elZoom = null, this.elZoomIn = null, this.elZoomOut = null, this.elPan = null, this.elSelection = null, this.elZoomReset = null, this.elMenuIcon = null; 69138 } }]), y; 69139 }(), Pt = function(y) { 69140 ge(t, et); 69141 var e = ue(t); 69142 function t(i) { 69143 var a; 69144 return F(this, t), (a = e.call(this, i)).ctx = i, a.w = i.w, a.dragged = !1, a.graphics = new M(a.ctx), a.eventList = ["mousedown", "mouseleave", "mousemove", "touchstart", "touchmove", "mouseup", "touchend"], a.clientX = 0, a.clientY = 0, a.startX = 0, a.endX = 0, a.dragX = 0, a.startY = 0, a.endY = 0, a.dragY = 0, a.moveDirection = "none", a; 69145 } 69146 return Y(t, [{ key: "init", value: function(i) { 69147 var a = this, s = i.xyRatios, r = this.w, n = this; 69148 this.xyRatios = s, this.zoomRect = this.graphics.drawRect(0, 0, 0, 0), this.selectionRect = this.graphics.drawRect(0, 0, 0, 0), this.gridRect = r.globals.dom.baseEl.querySelector(".apexcharts-grid"), this.zoomRect.node.classList.add("apexcharts-zoom-rect"), this.selectionRect.node.classList.add("apexcharts-selection-rect"), r.globals.dom.elGraphical.add(this.zoomRect), r.globals.dom.elGraphical.add(this.selectionRect), r.config.chart.selection.type === "x" ? this.slDraggableRect = this.selectionRect.draggable({ minX: 0, minY: 0, maxX: r.globals.gridWidth, maxY: r.globals.gridHeight }).on("dragmove", this.selectionDragging.bind(this, "dragging")) : r.config.chart.selection.type === "y" ? this.slDraggableRect = this.selectionRect.draggable({ minX: 0, maxX: r.globals.gridWidth }).on("dragmove", this.selectionDragging.bind(this, "dragging")) : this.slDraggableRect = this.selectionRect.draggable().on("dragmove", this.selectionDragging.bind(this, "dragging")), this.preselectedSelection(), this.hoverArea = r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass, " .apexcharts-svg")), this.hoverArea.classList.add("apexcharts-zoomable"), this.eventList.forEach(function(o) { 69149 a.hoverArea.addEventListener(o, n.svgMouseEvents.bind(n, s), { capture: !1, passive: !0 }); 69150 }); 69151 } }, { key: "destroy", value: function() { 69152 this.slDraggableRect && (this.slDraggableRect.draggable(!1), this.slDraggableRect.off(), this.selectionRect.off()), this.selectionRect = null, this.zoomRect = null, this.gridRect = null; 69153 } }, { key: "svgMouseEvents", value: function(i, a) { 69154 var s = this.w, r = this, n = this.ctx.toolbar, o = s.globals.zoomEnabled ? s.config.chart.zoom.type : s.config.chart.selection.type, h = s.config.chart.toolbar.autoSelected; 69155 if (a.shiftKey ? (this.shiftWasPressed = !0, n.enableZoomPanFromToolbar(h === "pan" ? "zoom" : "pan")) : this.shiftWasPressed && (n.enableZoomPanFromToolbar(h), this.shiftWasPressed = !1), a.target) { 69156 var c, d = a.target.classList; 69157 if (a.target.parentNode && a.target.parentNode !== null && (c = a.target.parentNode.classList), !(d.contains("apexcharts-selection-rect") || d.contains("apexcharts-legend-marker") || d.contains("apexcharts-legend-text") || c && c.contains("apexcharts-toolbar"))) { 69158 if (r.clientX = a.type === "touchmove" || a.type === "touchstart" ? a.touches[0].clientX : a.type === "touchend" ? a.changedTouches[0].clientX : a.clientX, r.clientY = a.type === "touchmove" || a.type === "touchstart" ? a.touches[0].clientY : a.type === "touchend" ? a.changedTouches[0].clientY : a.clientY, a.type === "mousedown" && a.which === 1) { 69159 var g = r.gridRect.getBoundingClientRect(); 69160 r.startX = r.clientX - g.left, r.startY = r.clientY - g.top, r.dragged = !1, r.w.globals.mousedown = !0; 69161 } 69162 if ((a.type === "mousemove" && a.which === 1 || a.type === "touchmove") && (r.dragged = !0, s.globals.panEnabled ? (s.globals.selection = null, r.w.globals.mousedown && r.panDragging({ context: r, zoomtype: o, xyRatios: i })) : (r.w.globals.mousedown && s.globals.zoomEnabled || r.w.globals.mousedown && s.globals.selectionEnabled) && (r.selection = r.selectionDrawing({ context: r, zoomtype: o }))), a.type === "mouseup" || a.type === "touchend" || a.type === "mouseleave") { 69163 var p = r.gridRect.getBoundingClientRect(); 69164 r.w.globals.mousedown && (r.endX = r.clientX - p.left, r.endY = r.clientY - p.top, r.dragX = Math.abs(r.endX - r.startX), r.dragY = Math.abs(r.endY - r.startY), (s.globals.zoomEnabled || s.globals.selectionEnabled) && r.selectionDrawn({ context: r, zoomtype: o }), s.globals.panEnabled && s.config.xaxis.convertedCatToNumeric && r.delayedPanScrolled()), s.globals.zoomEnabled && r.hideSelectionRect(this.selectionRect), r.dragged = !1, r.w.globals.mousedown = !1; 69165 } 69166 this.makeSelectionRectDraggable(); 69167 } 69168 } 69169 } }, { key: "makeSelectionRectDraggable", value: function() { 69170 var i = this.w; 69171 if (this.selectionRect) { 69172 var a = this.selectionRect.node.getBoundingClientRect(); 69173 a.width > 0 && a.height > 0 && this.slDraggableRect.selectize({ points: "l, r", pointSize: 8, pointType: "rect" }).resize({ constraint: { minX: 0, minY: 0, maxX: i.globals.gridWidth, maxY: i.globals.gridHeight } }).on("resizing", this.selectionDragging.bind(this, "resizing")); 69174 } 69175 } }, { key: "preselectedSelection", value: function() { 69176 var i = this.w, a = this.xyRatios; 69177 if (!i.globals.zoomEnabled) { 69178 if (i.globals.selection !== void 0 && i.globals.selection !== null) 69179 this.drawSelectionRect(i.globals.selection); 69180 else if (i.config.chart.selection.xaxis.min !== void 0 && i.config.chart.selection.xaxis.max !== void 0) { 69181 var s = (i.config.chart.selection.xaxis.min - i.globals.minX) / a.xRatio, r = i.globals.gridWidth - (i.globals.maxX - i.config.chart.selection.xaxis.max) / a.xRatio - s; 69182 i.globals.isRangeBar && (s = (i.config.chart.selection.xaxis.min - i.globals.yAxisScale[0].niceMin) / a.invertedYRatio, r = (i.config.chart.selection.xaxis.max - i.config.chart.selection.xaxis.min) / a.invertedYRatio); 69183 var n = { x: s, y: 0, width: r, height: i.globals.gridHeight, translateX: 0, translateY: 0, selectionEnabled: !0 }; 69184 this.drawSelectionRect(n), this.makeSelectionRectDraggable(), typeof i.config.chart.events.selection == "function" && i.config.chart.events.selection(this.ctx, { xaxis: { min: i.config.chart.selection.xaxis.min, max: i.config.chart.selection.xaxis.max }, yaxis: {} }); 69185 } 69186 } 69187 } }, { key: "drawSelectionRect", value: function(i) { 69188 var a = i.x, s = i.y, r = i.width, n = i.height, o = i.translateX, h = o === void 0 ? 0 : o, c = i.translateY, d = c === void 0 ? 0 : c, g = this.w, p = this.zoomRect, f = this.selectionRect; 69189 if (this.dragged || g.globals.selection !== null) { 69190 var b = { transform: "translate(" + h + ", " + d + ")" }; 69191 g.globals.zoomEnabled && this.dragged && (r < 0 && (r = 1), p.attr({ x: a, y: s, width: r, height: n, fill: g.config.chart.zoom.zoomedArea.fill.color, "fill-opacity": g.config.chart.zoom.zoomedArea.fill.opacity, stroke: g.config.chart.zoom.zoomedArea.stroke.color, "stroke-width": g.config.chart.zoom.zoomedArea.stroke.width, "stroke-opacity": g.config.chart.zoom.zoomedArea.stroke.opacity }), M.setAttrs(p.node, b)), g.globals.selectionEnabled && (f.attr({ x: a, y: s, width: r > 0 ? r : 0, height: n > 0 ? n : 0, fill: g.config.chart.selection.fill.color, "fill-opacity": g.config.chart.selection.fill.opacity, stroke: g.config.chart.selection.stroke.color, "stroke-width": g.config.chart.selection.stroke.width, "stroke-dasharray": g.config.chart.selection.stroke.dashArray, "stroke-opacity": g.config.chart.selection.stroke.opacity }), M.setAttrs(f.node, b)); 69192 } 69193 } }, { key: "hideSelectionRect", value: function(i) { 69194 i && i.attr({ x: 0, y: 0, width: 0, height: 0 }); 69195 } }, { key: "selectionDrawing", value: function(i) { 69196 var a = i.context, s = i.zoomtype, r = this.w, n = a, o = this.gridRect.getBoundingClientRect(), h = n.startX - 1, c = n.startY, d = !1, g = !1, p = n.clientX - o.left - h, f = n.clientY - o.top - c, b = {}; 69197 return Math.abs(p + h) > r.globals.gridWidth ? p = r.globals.gridWidth - h : n.clientX - o.left < 0 && (p = h), h > n.clientX - o.left && (d = !0, p = Math.abs(p)), c > n.clientY - o.top && (g = !0, f = Math.abs(f)), b = s === "x" ? { x: d ? h - p : h, y: 0, width: p, height: r.globals.gridHeight } : s === "y" ? { x: 0, y: g ? c - f : c, width: r.globals.gridWidth, height: f } : { x: d ? h - p : h, y: g ? c - f : c, width: p, height: f }, n.drawSelectionRect(b), n.selectionDragging("resizing"), b; 69198 } }, { key: "selectionDragging", value: function(i, a) { 69199 var s = this, r = this.w, n = this.xyRatios, o = this.selectionRect, h = 0; 69200 i === "resizing" && (h = 30); 69201 var c = function(g) { 69202 return parseFloat(o.node.getAttribute(g)); 69203 }, d = { x: c("x"), y: c("y"), width: c("width"), height: c("height") }; 69204 r.globals.selection = d, typeof r.config.chart.events.selection == "function" && r.globals.selectionEnabled && (clearTimeout(this.w.globals.selectionResizeTimer), this.w.globals.selectionResizeTimer = window.setTimeout(function() { 69205 var g, p, f, b, m = s.gridRect.getBoundingClientRect(), w = o.node.getBoundingClientRect(); 69206 r.globals.isRangeBar ? (g = r.globals.yAxisScale[0].niceMin + (w.left - m.left) * n.invertedYRatio, p = r.globals.yAxisScale[0].niceMin + (w.right - m.left) * n.invertedYRatio, f = 0, b = 1) : (g = r.globals.xAxisScale.niceMin + (w.left - m.left) * n.xRatio, p = r.globals.xAxisScale.niceMin + (w.right - m.left) * n.xRatio, f = r.globals.yAxisScale[0].niceMin + (m.bottom - w.bottom) * n.yRatio[0], b = r.globals.yAxisScale[0].niceMax - (w.top - m.top) * n.yRatio[0]); 69207 var A = { xaxis: { min: g, max: p }, yaxis: { min: f, max: b } }; 69208 r.config.chart.events.selection(s.ctx, A), r.config.chart.brush.enabled && r.config.chart.events.brushScrolled !== void 0 && r.config.chart.events.brushScrolled(s.ctx, A); 69209 }, h)); 69210 } }, { key: "selectionDrawn", value: function(i) { 69211 var a = i.context, s = i.zoomtype, r = this.w, n = a, o = this.xyRatios, h = this.ctx.toolbar; 69212 if (n.startX > n.endX) { 69213 var c = n.startX; 69214 n.startX = n.endX, n.endX = c; 69215 } 69216 if (n.startY > n.endY) { 69217 var d = n.startY; 69218 n.startY = n.endY, n.endY = d; 69219 } 69220 var g = void 0, p = void 0; 69221 r.globals.isRangeBar ? (g = r.globals.yAxisScale[0].niceMin + n.startX * o.invertedYRatio, p = r.globals.yAxisScale[0].niceMin + n.endX * o.invertedYRatio) : (g = r.globals.xAxisScale.niceMin + n.startX * o.xRatio, p = r.globals.xAxisScale.niceMin + n.endX * o.xRatio); 69222 var f = [], b = []; 69223 if (r.config.yaxis.forEach(function(k, S) { 69224 f.push(r.globals.yAxisScale[S].niceMax - o.yRatio[S] * n.startY), b.push(r.globals.yAxisScale[S].niceMax - o.yRatio[S] * n.endY); 69225 }), n.dragged && (n.dragX > 10 || n.dragY > 10) && g !== p) { 69226 if (r.globals.zoomEnabled) { 69227 var m = P.clone(r.globals.initialConfig.yaxis), w = P.clone(r.globals.initialConfig.xaxis); 69228 if (r.globals.zoomed = !0, r.config.xaxis.convertedCatToNumeric && (g = Math.floor(g), p = Math.floor(p), g < 1 && (g = 1, p = r.globals.dataPoints), p - g < 2 && (p = g + 1)), s !== "xy" && s !== "x" || (w = { min: g, max: p }), s !== "xy" && s !== "y" || m.forEach(function(k, S) { 69229 m[S].min = b[S], m[S].max = f[S]; 69230 }), r.config.chart.zoom.autoScaleYaxis) { 69231 var A = new we(n.ctx); 69232 m = A.autoScaleY(n.ctx, m, { xaxis: w }); 69233 } 69234 if (h) { 69235 var l = h.getBeforeZoomRange(w, m); 69236 l && (w = l.xaxis ? l.xaxis : w, m = l.yaxis ? l.yaxis : m); 69237 } 69238 var u = { xaxis: w }; 69239 r.config.chart.group || (u.yaxis = m), n.ctx.updateHelpers._updateOptions(u, !1, n.w.config.chart.animations.dynamicAnimation.enabled), typeof r.config.chart.events.zoomed == "function" && h.zoomCallback(w, m); 69240 } else if (r.globals.selectionEnabled) { 69241 var x, v = null; 69242 x = { min: g, max: p }, s !== "xy" && s !== "y" || (v = P.clone(r.config.yaxis)).forEach(function(k, S) { 69243 v[S].min = b[S], v[S].max = f[S]; 69244 }), r.globals.selection = n.selection, typeof r.config.chart.events.selection == "function" && r.config.chart.events.selection(n.ctx, { xaxis: x, yaxis: v }); 69245 } 69246 } 69247 } }, { key: "panDragging", value: function(i) { 69248 var a = i.context, s = this.w, r = a; 69249 if (s.globals.lastClientPosition.x !== void 0) { 69250 var n = s.globals.lastClientPosition.x - r.clientX, o = s.globals.lastClientPosition.y - r.clientY; 69251 Math.abs(n) > Math.abs(o) && n > 0 ? this.moveDirection = "left" : Math.abs(n) > Math.abs(o) && n < 0 ? this.moveDirection = "right" : Math.abs(o) > Math.abs(n) && o > 0 ? this.moveDirection = "up" : Math.abs(o) > Math.abs(n) && o < 0 && (this.moveDirection = "down"); 69252 } 69253 s.globals.lastClientPosition = { x: r.clientX, y: r.clientY }; 69254 var h = s.globals.isRangeBar ? s.globals.minY : s.globals.minX, c = s.globals.isRangeBar ? s.globals.maxY : s.globals.maxX; 69255 s.config.xaxis.convertedCatToNumeric || r.panScrolled(h, c); 69256 } }, { key: "delayedPanScrolled", value: function() { 69257 var i = this.w, a = i.globals.minX, s = i.globals.maxX, r = (i.globals.maxX - i.globals.minX) / 2; 69258 this.moveDirection === "left" ? (a = i.globals.minX + r, s = i.globals.maxX + r) : this.moveDirection === "right" && (a = i.globals.minX - r, s = i.globals.maxX - r), a = Math.floor(a), s = Math.floor(s), this.updateScrolledChart({ xaxis: { min: a, max: s } }, a, s); 69259 } }, { key: "panScrolled", value: function(i, a) { 69260 var s = this.w, r = this.xyRatios, n = P.clone(s.globals.initialConfig.yaxis), o = r.xRatio, h = s.globals.minX, c = s.globals.maxX; 69261 s.globals.isRangeBar && (o = r.invertedYRatio, h = s.globals.minY, c = s.globals.maxY), this.moveDirection === "left" ? (i = h + s.globals.gridWidth / 15 * o, a = c + s.globals.gridWidth / 15 * o) : this.moveDirection === "right" && (i = h - s.globals.gridWidth / 15 * o, a = c - s.globals.gridWidth / 15 * o), s.globals.isRangeBar || (i < s.globals.initialMinX || a > s.globals.initialMaxX) && (i = h, a = c); 69262 var d = { min: i, max: a }; 69263 s.config.chart.zoom.autoScaleYaxis && (n = new we(this.ctx).autoScaleY(this.ctx, n, { xaxis: d })); 69264 var g = { xaxis: { min: i, max: a } }; 69265 s.config.chart.group || (g.yaxis = n), this.updateScrolledChart(g, i, a); 69266 } }, { key: "updateScrolledChart", value: function(i, a, s) { 69267 var r = this.w; 69268 this.ctx.updateHelpers._updateOptions(i, !1, !1), typeof r.config.chart.events.scrolled == "function" && r.config.chart.events.scrolled(this.ctx, { xaxis: { min: a, max: s } }); 69269 } }]), t; 69270 }(), tt = function() { 69271 function y(e) { 69272 F(this, y), this.w = e.w, this.ttCtx = e, this.ctx = e.ctx; 69273 } 69274 return Y(y, [{ key: "getNearestValues", value: function(e) { 69275 var t = e.hoverArea, i = e.elGrid, a = e.clientX, s = e.clientY, r = this.w, n = i.getBoundingClientRect(), o = n.width, h = n.height, c = o / (r.globals.dataPoints - 1), d = h / r.globals.dataPoints, g = this.hasBars(); 69276 !r.globals.comboCharts && !g || r.config.xaxis.convertedCatToNumeric || (c = o / r.globals.dataPoints); 69277 var p = a - n.left - r.globals.barPadForNumericAxis, f = s - n.top; 69278 p < 0 || f < 0 || p > o || f > h ? (t.classList.remove("hovering-zoom"), t.classList.remove("hovering-pan")) : r.globals.zoomEnabled ? (t.classList.remove("hovering-pan"), t.classList.add("hovering-zoom")) : r.globals.panEnabled && (t.classList.remove("hovering-zoom"), t.classList.add("hovering-pan")); 69279 var b = Math.round(p / c), m = Math.floor(f / d); 69280 g && !r.config.xaxis.convertedCatToNumeric && (b = Math.ceil(p / c), b -= 1); 69281 var w = null, A = null, l = r.globals.seriesXvalues.map(function(S) { 69282 return S.filter(function(C) { 69283 return P.isNumber(C); 69284 }); 69285 }), u = r.globals.seriesYvalues.map(function(S) { 69286 return S.filter(function(C) { 69287 return P.isNumber(C); 69288 }); 69289 }); 69290 if (r.globals.isXNumeric) { 69291 var x = this.ttCtx.getElGrid().getBoundingClientRect(), v = p * (x.width / o), k = f * (x.height / h); 69292 w = (A = this.closestInMultiArray(v, k, l, u)).index, b = A.j, w !== null && (l = r.globals.seriesXvalues[w], b = (A = this.closestInArray(v, l)).index); 69293 } 69294 return r.globals.capturedSeriesIndex = w === null ? -1 : w, (!b || b < 1) && (b = 0), r.globals.isBarHorizontal ? r.globals.capturedDataPointIndex = m : r.globals.capturedDataPointIndex = b, { capturedSeries: w, j: r.globals.isBarHorizontal ? m : b, hoverX: p, hoverY: f }; 69295 } }, { key: "closestInMultiArray", value: function(e, t, i, a) { 69296 var s = this.w, r = 0, n = null, o = -1; 69297 s.globals.series.length > 1 ? r = this.getFirstActiveXArray(i) : n = 0; 69298 var h = i[r][0], c = Math.abs(e - h); 69299 if (i.forEach(function(p) { 69300 p.forEach(function(f, b) { 69301 var m = Math.abs(e - f); 69302 m <= c && (c = m, o = b); 69303 }); 69304 }), o !== -1) { 69305 var d = a[r][o], g = Math.abs(t - d); 69306 n = r, a.forEach(function(p, f) { 69307 var b = Math.abs(t - p[o]); 69308 b <= g && (g = b, n = f); 69309 }); 69310 } 69311 return { index: n, j: o }; 69312 } }, { key: "getFirstActiveXArray", value: function(e) { 69313 for (var t = this.w, i = 0, a = e.map(function(r, n) { 69314 return r.length > 0 ? n : -1; 69315 }), s = 0; s < a.length; s++) 69316 if (a[s] !== -1 && t.globals.collapsedSeriesIndices.indexOf(s) === -1 && t.globals.ancillaryCollapsedSeriesIndices.indexOf(s) === -1) { 69317 i = a[s]; 69318 break; 69319 } 69320 return i; 69321 } }, { key: "closestInArray", value: function(e, t) { 69322 for (var i = t[0], a = null, s = Math.abs(e - i), r = 0; r < t.length; r++) { 69323 var n = Math.abs(e - t[r]); 69324 n < s && (s = n, a = r); 69325 } 69326 return { index: a }; 69327 } }, { key: "isXoverlap", value: function(e) { 69328 var t = [], i = this.w.globals.seriesX.filter(function(s) { 69329 return s[0] !== void 0; 69330 }); 69331 if (i.length > 0) 69332 for (var a = 0; a < i.length - 1; a++) 69333 i[a][e] !== void 0 && i[a + 1][e] !== void 0 && i[a][e] !== i[a + 1][e] && t.push("unEqual"); 69334 return t.length === 0; 69335 } }, { key: "isInitialSeriesSameLen", value: function() { 69336 for (var e = !0, t = this.w.globals.initialSeries, i = 0; i < t.length - 1; i++) 69337 if (t[i].data.length !== t[i + 1].data.length) { 69338 e = !1; 69339 break; 69340 } 69341 return e; 69342 } }, { key: "getBarsHeight", value: function(e) { 69343 return J(e).reduce(function(t, i) { 69344 return t + i.getBBox().height; 69345 }, 0); 69346 } }, { key: "getElMarkers", value: function(e) { 69347 return typeof e == "number" ? this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e, "'] .apexcharts-series-markers-wrap > *")) : this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *"); 69348 } }, { key: "getAllMarkers", value: function() { 69349 var e = this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap"); 69350 (e = J(e)).sort(function(i, a) { 69351 var s = Number(i.getAttribute("data:realIndex")), r = Number(a.getAttribute("data:realIndex")); 69352 return r < s ? 1 : r > s ? -1 : 0; 69353 }); 69354 var t = []; 69355 return e.forEach(function(i) { 69356 t.push(i.querySelector(".apexcharts-marker")); 69357 }), t; 69358 } }, { key: "hasMarkers", value: function(e) { 69359 return this.getElMarkers(e).length > 0; 69360 } }, { key: "getElBars", value: function() { 69361 return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series"); 69362 } }, { key: "hasBars", value: function() { 69363 return this.getElBars().length > 0; 69364 } }, { key: "getHoverMarkerSize", value: function(e) { 69365 var t = this.w, i = t.config.markers.hover.size; 69366 return i === void 0 && (i = t.globals.markers.size[e] + t.config.markers.hover.sizeOffset), i; 69367 } }, { key: "toggleAllTooltipSeriesGroups", value: function(e) { 69368 var t = this.w, i = this.ttCtx; 69369 i.allTooltipSeriesGroups.length === 0 && (i.allTooltipSeriesGroups = t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group")); 69370 for (var a = i.allTooltipSeriesGroups, s = 0; s < a.length; s++) 69371 e === "enable" ? (a[s].classList.add("apexcharts-active"), a[s].style.display = t.config.tooltip.items.display) : (a[s].classList.remove("apexcharts-active"), a[s].style.display = "none"); 69372 } }]), y; 69373 }(), It = function() { 69374 function y(e) { 69375 F(this, y), this.w = e.w, this.ctx = e.ctx, this.ttCtx = e, this.tooltipUtil = new tt(e); 69376 } 69377 return Y(y, [{ key: "drawSeriesTexts", value: function(e) { 69378 var t = e.shared, i = t === void 0 || t, a = e.ttItems, s = e.i, r = s === void 0 ? 0 : s, n = e.j, o = n === void 0 ? null : n, h = e.y1, c = e.y2, d = e.e, g = this.w; 69379 g.config.tooltip.custom !== void 0 ? this.handleCustomTooltip({ i: r, j: o, y1: h, y2: c, w: g }) : this.toggleActiveInactiveSeries(i); 69380 var p = this.getValuesToPrint({ i: r, j: o }); 69381 this.printLabels({ i: r, j: o, values: p, ttItems: a, shared: i, e: d }); 69382 var f = this.ttCtx.getElTooltip(); 69383 this.ttCtx.tooltipRect.ttWidth = f.getBoundingClientRect().width, this.ttCtx.tooltipRect.ttHeight = f.getBoundingClientRect().height; 69384 } }, { key: "printLabels", value: function(e) { 69385 var t, i = this, a = e.i, s = e.j, r = e.values, n = e.ttItems, o = e.shared, h = e.e, c = this.w, d = [], g = function(x) { 69386 return c.globals.seriesGoals[x] && c.globals.seriesGoals[x][s] && Array.isArray(c.globals.seriesGoals[x][s]); 69387 }, p = r.xVal, f = r.zVal, b = r.xAxisTTVal, m = "", w = c.globals.colors[a]; 69388 s !== null && c.config.plotOptions.bar.distributed && (w = c.globals.colors[s]); 69389 for (var A = function(x, v) { 69390 var k = i.getFormatters(a); 69391 m = i.getSeriesName({ fn: k.yLbTitleFormatter, index: a, seriesIndex: a, j: s }), c.config.chart.type === "treemap" && (m = k.yLbTitleFormatter(String(c.config.series[a].data[s].x), { series: c.globals.series, seriesIndex: a, dataPointIndex: s, w: c })); 69392 var S = c.config.tooltip.inverseOrder ? v : x; 69393 if (c.globals.axisCharts) { 69394 var C = function(z) { 69395 var T, E, R, O; 69396 return c.globals.isRangeData ? k.yLbFormatter((T = c.globals.seriesRangeStart) === null || T === void 0 || (E = T[z]) === null || E === void 0 ? void 0 : E[s], { series: c.globals.seriesRangeStart, seriesIndex: z, dataPointIndex: s, w: c }) + " - " + k.yLbFormatter((R = c.globals.seriesRangeEnd) === null || R === void 0 || (O = R[z]) === null || O === void 0 ? void 0 : O[s], { series: c.globals.seriesRangeEnd, seriesIndex: z, dataPointIndex: s, w: c }) : k.yLbFormatter(c.globals.series[z][s], { series: c.globals.series, seriesIndex: z, dataPointIndex: s, w: c }); 69397 }; 69398 if (o) 69399 k = i.getFormatters(S), m = i.getSeriesName({ fn: k.yLbTitleFormatter, index: S, seriesIndex: a, j: s }), w = c.globals.colors[S], t = C(S), g(S) && (d = c.globals.seriesGoals[S][s].map(function(z) { 69400 return { attrs: z, val: k.yLbFormatter(z.value, { seriesIndex: S, dataPointIndex: s, w: c }) }; 69401 })); 69402 else { 69403 var L, I = h == null || (L = h.target) === null || L === void 0 ? void 0 : L.getAttribute("fill"); 69404 I && (w = I.indexOf("url") !== -1 ? document.querySelector(I.substr(4).slice(0, -1)).childNodes[0].getAttribute("stroke") : I), t = C(a), g(a) && Array.isArray(c.globals.seriesGoals[a][s]) && (d = c.globals.seriesGoals[a][s].map(function(z) { 69405 return { attrs: z, val: k.yLbFormatter(z.value, { seriesIndex: a, dataPointIndex: s, w: c }) }; 69406 })); 69407 } 69408 } 69409 s === null && (t = k.yLbFormatter(c.globals.series[a], X(X({}, c), {}, { seriesIndex: a, dataPointIndex: a }))), i.DOMHandling({ i: a, t: S, j: s, ttItems: n, values: { val: t, goalVals: d, xVal: p, xAxisTTVal: b, zVal: f }, seriesName: m, shared: o, pColor: w }); 69410 }, l = 0, u = c.globals.series.length - 1; l < c.globals.series.length; l++, u--) 69411 A(l, u); 69412 } }, { key: "getFormatters", value: function(e) { 69413 var t, i = this.w, a = i.globals.yLabelFormatters[e]; 69414 return i.globals.ttVal !== void 0 ? Array.isArray(i.globals.ttVal) ? (a = i.globals.ttVal[e] && i.globals.ttVal[e].formatter, t = i.globals.ttVal[e] && i.globals.ttVal[e].title && i.globals.ttVal[e].title.formatter) : (a = i.globals.ttVal.formatter, typeof i.globals.ttVal.title.formatter == "function" && (t = i.globals.ttVal.title.formatter)) : t = i.config.tooltip.y.title.formatter, typeof a != "function" && (a = i.globals.yLabelFormatters[0] ? i.globals.yLabelFormatters[0] : function(s) { 69415 return s; 69416 }), typeof t != "function" && (t = function(s) { 69417 return s; 69418 }), { yLbFormatter: a, yLbTitleFormatter: t }; 69419 } }, { key: "getSeriesName", value: function(e) { 69420 var t = e.fn, i = e.index, a = e.seriesIndex, s = e.j, r = this.w; 69421 return t(String(r.globals.seriesNames[i]), { series: r.globals.series, seriesIndex: a, dataPointIndex: s, w: r }); 69422 } }, { key: "DOMHandling", value: function(e) { 69423 e.i; 69424 var t = e.t, i = e.j, a = e.ttItems, s = e.values, r = e.seriesName, n = e.shared, o = e.pColor, h = this.w, c = this.ttCtx, d = s.val, g = s.goalVals, p = s.xVal, f = s.xAxisTTVal, b = s.zVal, m = null; 69425 m = a[t].children, h.config.tooltip.fillSeriesColor && (a[t].style.backgroundColor = o, m[0].style.display = "none"), c.showTooltipTitle && (c.tooltipTitle === null && (c.tooltipTitle = h.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")), c.tooltipTitle.innerHTML = p), c.isXAxisTooltipEnabled && (c.xaxisTooltipText.innerHTML = f !== "" ? f : p); 69426 var w = a[t].querySelector(".apexcharts-tooltip-text-y-label"); 69427 w && (w.innerHTML = r || ""); 69428 var A = a[t].querySelector(".apexcharts-tooltip-text-y-value"); 69429 A && (A.innerHTML = d !== void 0 ? d : ""), m[0] && m[0].classList.contains("apexcharts-tooltip-marker") && (h.config.tooltip.marker.fillColors && Array.isArray(h.config.tooltip.marker.fillColors) && (o = h.config.tooltip.marker.fillColors[t]), m[0].style.backgroundColor = o), h.config.tooltip.marker.show || (m[0].style.display = "none"); 69430 var l = a[t].querySelector(".apexcharts-tooltip-text-goals-label"), u = a[t].querySelector(".apexcharts-tooltip-text-goals-value"); 69431 if (g.length && h.globals.seriesGoals[t]) { 69432 var x = function() { 69433 var S = "<div >", C = "<div>"; 69434 g.forEach(function(L, I) { 69435 S += ' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(L.attrs.strokeColor, '; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(L.attrs.name, "</div>"), C += "<div>".concat(L.val, "</div>"); 69436 }), l.innerHTML = S + "</div>", u.innerHTML = C + "</div>"; 69437 }; 69438 n ? h.globals.seriesGoals[t][i] && Array.isArray(h.globals.seriesGoals[t][i]) ? x() : (l.innerHTML = "", u.innerHTML = "") : x(); 69439 } else 69440 l.innerHTML = "", u.innerHTML = ""; 69441 if (b !== null && (a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML = h.config.tooltip.z.title, a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML = b !== void 0 ? b : ""), n && m[0]) { 69442 if (h.config.tooltip.hideEmptySeries) { 69443 var v = a[t].querySelector(".apexcharts-tooltip-marker"), k = a[t].querySelector(".apexcharts-tooltip-text"); 69444 parseFloat(d) == 0 ? (v.style.display = "none", k.style.display = "none") : (v.style.display = "block", k.style.display = "block"); 69445 } 69446 d == null || h.globals.ancillaryCollapsedSeriesIndices.indexOf(t) > -1 || h.globals.collapsedSeriesIndices.indexOf(t) > -1 ? m[0].parentNode.style.display = "none" : m[0].parentNode.style.display = h.config.tooltip.items.display; 69447 } 69448 } }, { key: "toggleActiveInactiveSeries", value: function(e) { 69449 var t = this.w; 69450 if (e) 69451 this.tooltipUtil.toggleAllTooltipSeriesGroups("enable"); 69452 else { 69453 this.tooltipUtil.toggleAllTooltipSeriesGroups("disable"); 69454 var i = t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group"); 69455 i && (i.classList.add("apexcharts-active"), i.style.display = t.config.tooltip.items.display); 69456 } 69457 } }, { key: "getValuesToPrint", value: function(e) { 69458 var t = e.i, i = e.j, a = this.w, s = this.ctx.series.filteredSeriesX(), r = "", n = "", o = null, h = null, c = { series: a.globals.series, seriesIndex: t, dataPointIndex: i, w: a }, d = a.globals.ttZFormatter; 69459 i === null ? h = a.globals.series[t] : a.globals.isXNumeric && a.config.chart.type !== "treemap" ? (r = s[t][i], s[t].length === 0 && (r = s[this.tooltipUtil.getFirstActiveXArray(s)][i])) : r = a.globals.labels[i] !== void 0 ? a.globals.labels[i] : ""; 69460 var g = r; 69461 return a.globals.isXNumeric && a.config.xaxis.type === "datetime" ? r = new re(this.ctx).xLabelFormat(a.globals.ttKeyFormatter, g, g, { i: void 0, dateFormatter: new B(this.ctx).formatDate, w: this.w }) : r = a.globals.isBarHorizontal ? a.globals.yLabelFormatters[0](g, c) : a.globals.xLabelFormatter(g, c), a.config.tooltip.x.formatter !== void 0 && (r = a.globals.ttKeyFormatter(g, c)), a.globals.seriesZ.length > 0 && a.globals.seriesZ[t].length > 0 && (o = d(a.globals.seriesZ[t][i], a)), n = typeof a.config.xaxis.tooltip.formatter == "function" ? a.globals.xaxisTooltipFormatter(g, c) : r, { val: Array.isArray(h) ? h.join(" ") : h, xVal: Array.isArray(r) ? r.join(" ") : r, xAxisTTVal: Array.isArray(n) ? n.join(" ") : n, zVal: o }; 69462 } }, { key: "handleCustomTooltip", value: function(e) { 69463 var t = e.i, i = e.j, a = e.y1, s = e.y2, r = e.w, n = this.ttCtx.getElTooltip(), o = r.config.tooltip.custom; 69464 Array.isArray(o) && o[t] && (o = o[t]), n.innerHTML = o({ ctx: this.ctx, series: r.globals.series, seriesIndex: t, dataPointIndex: i, y1: a, y2: s, w: r }); 69465 } }]), y; 69466 }(), it = function() { 69467 function y(e) { 69468 F(this, y), this.ttCtx = e, this.ctx = e.ctx, this.w = e.w; 69469 } 69470 return Y(y, [{ key: "moveXCrosshairs", value: function(e) { 69471 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, i = this.ttCtx, a = this.w, s = i.getElXCrosshairs(), r = e - i.xcrosshairsWidth / 2, n = a.globals.labels.slice().length; 69472 if (t !== null && (r = a.globals.gridWidth / n * t), s === null || a.globals.isBarHorizontal || (s.setAttribute("x", r), s.setAttribute("x1", r), s.setAttribute("x2", r), s.setAttribute("y2", a.globals.gridHeight), s.classList.add("apexcharts-active")), r < 0 && (r = 0), r > a.globals.gridWidth && (r = a.globals.gridWidth), i.isXAxisTooltipEnabled) { 69473 var o = r; 69474 a.config.xaxis.crosshairs.width !== "tickWidth" && a.config.xaxis.crosshairs.width !== "barWidth" || (o = r + i.xcrosshairsWidth / 2), this.moveXAxisTooltip(o); 69475 } 69476 } }, { key: "moveYCrosshairs", value: function(e) { 69477 var t = this.ttCtx; 69478 t.ycrosshairs !== null && M.setAttrs(t.ycrosshairs, { y1: e, y2: e }), t.ycrosshairsHidden !== null && M.setAttrs(t.ycrosshairsHidden, { y1: e, y2: e }); 69479 } }, { key: "moveXAxisTooltip", value: function(e) { 69480 var t = this.w, i = this.ttCtx; 69481 if (i.xaxisTooltip !== null && i.xcrosshairsWidth !== 0) { 69482 i.xaxisTooltip.classList.add("apexcharts-active"); 69483 var a = i.xaxisOffY + t.config.xaxis.tooltip.offsetY + t.globals.translateY + 1 + t.config.xaxis.offsetY; 69484 if (e -= i.xaxisTooltip.getBoundingClientRect().width / 2, !isNaN(e)) { 69485 e += t.globals.translateX; 69486 var s; 69487 s = new M(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML), i.xaxisTooltipText.style.minWidth = s.width + "px", i.xaxisTooltip.style.left = e + "px", i.xaxisTooltip.style.top = a + "px"; 69488 } 69489 } 69490 } }, { key: "moveYAxisTooltip", value: function(e) { 69491 var t = this.w, i = this.ttCtx; 69492 i.yaxisTTEls === null && (i.yaxisTTEls = t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")); 69493 var a = parseInt(i.ycrosshairsHidden.getAttribute("y1"), 10), s = t.globals.translateY + a, r = i.yaxisTTEls[e].getBoundingClientRect().height, n = t.globals.translateYAxisX[e] - 2; 69494 t.config.yaxis[e].opposite && (n -= 26), s -= r / 2, t.globals.ignoreYAxisIndexes.indexOf(e) === -1 ? (i.yaxisTTEls[e].classList.add("apexcharts-active"), i.yaxisTTEls[e].style.top = s + "px", i.yaxisTTEls[e].style.left = n + t.config.yaxis[e].tooltip.offsetX + "px") : i.yaxisTTEls[e].classList.remove("apexcharts-active"); 69495 } }, { key: "moveTooltip", value: function(e, t) { 69496 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = this.w, s = this.ttCtx, r = s.getElTooltip(), n = s.tooltipRect, o = i !== null ? parseFloat(i) : 1, h = parseFloat(e) + o + 5, c = parseFloat(t) + o / 2; 69497 if (h > a.globals.gridWidth / 2 && (h = h - n.ttWidth - o - 10), h > a.globals.gridWidth - n.ttWidth - 10 && (h = a.globals.gridWidth - n.ttWidth), h < -20 && (h = -20), a.config.tooltip.followCursor) { 69498 var d = s.getElGrid().getBoundingClientRect(); 69499 (h = s.e.clientX - d.left) > a.globals.gridWidth / 2 && (h -= s.tooltipRect.ttWidth), (c = s.e.clientY + a.globals.translateY - d.top) > a.globals.gridHeight / 2 && (c -= s.tooltipRect.ttHeight); 69500 } else 69501 a.globals.isBarHorizontal || n.ttHeight / 2 + c > a.globals.gridHeight && (c = a.globals.gridHeight - n.ttHeight + a.globals.translateY); 69502 isNaN(h) || (h += a.globals.translateX, r.style.left = h + "px", r.style.top = c + "px"); 69503 } }, { key: "moveMarkers", value: function(e, t) { 69504 var i = this.w, a = this.ttCtx; 69505 if (i.globals.markers.size[e] > 0) 69506 for (var s = i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e, "'] .apexcharts-marker")), r = 0; r < s.length; r++) 69507 parseInt(s[r].getAttribute("rel"), 10) === t && (a.marker.resetPointsSize(), a.marker.enlargeCurrentPoint(t, s[r])); 69508 else 69509 a.marker.resetPointsSize(), this.moveDynamicPointOnHover(t, e); 69510 } }, { key: "moveDynamicPointOnHover", value: function(e, t) { 69511 var i, a, s = this.w, r = this.ttCtx, n = s.globals.pointsArray, o = r.tooltipUtil.getHoverMarkerSize(t), h = s.config.series[t].type; 69512 if (!h || h !== "column" && h !== "candlestick" && h !== "boxPlot") { 69513 i = n[t][e][0], a = n[t][e][1] ? n[t][e][1] : 0; 69514 var c = s.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t, "'] .apexcharts-series-markers circle")); 69515 c && a < s.globals.gridHeight && a > 0 && (c.setAttribute("r", o), c.setAttribute("cx", i), c.setAttribute("cy", a)), this.moveXCrosshairs(i), r.fixedTooltip || this.moveTooltip(i, a, o); 69516 } 69517 } }, { key: "moveDynamicPointsOnHover", value: function(e) { 69518 var t, i = this.ttCtx, a = i.w, s = 0, r = 0, n = a.globals.pointsArray; 69519 t = new te(this.ctx).getActiveConfigSeriesIndex("asc", ["line", "area", "scatter", "bubble"]); 69520 var o = i.tooltipUtil.getHoverMarkerSize(t); 69521 n[t] && (s = n[t][e][0], r = n[t][e][1]); 69522 var h = i.tooltipUtil.getAllMarkers(); 69523 if (h !== null) 69524 for (var c = 0; c < a.globals.series.length; c++) { 69525 var d = n[c]; 69526 if (a.globals.comboCharts && d === void 0 && h.splice(c, 0, null), d && d.length) { 69527 var g = n[c][e][1], p = void 0; 69528 if (h[c].setAttribute("cx", s), a.config.chart.type === "rangeArea" && !a.globals.comboCharts) { 69529 var f = e + a.globals.series[c].length; 69530 p = n[c][f][1], g -= Math.abs(g - p) / 2; 69531 } 69532 g !== null && !isNaN(g) && g < a.globals.gridHeight + o && g + o > 0 ? (h[c] && h[c].setAttribute("r", o), h[c] && h[c].setAttribute("cy", g)) : h[c] && h[c].setAttribute("r", 0); 69533 } 69534 } 69535 this.moveXCrosshairs(s), i.fixedTooltip || this.moveTooltip(s, r || a.globals.gridHeight, o); 69536 } }, { key: "moveStickyTooltipOverBars", value: function(e, t) { 69537 var i = this.w, a = this.ttCtx, s = i.globals.columnSeries ? i.globals.columnSeries.length : i.globals.series.length, r = s >= 2 && s % 2 == 0 ? Math.floor(s / 2) : Math.floor(s / 2) + 1; 69538 i.globals.isBarHorizontal && (r = new te(this.ctx).getActiveConfigSeriesIndex("desc") + 1); 69539 var n = i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r, "'] path[j='").concat(e, "'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r, "'] path[j='").concat(e, "'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r, "'] path[j='").concat(e, "'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r, "'] path[j='").concat(e, "']")); 69540 n || typeof t != "number" || (n = i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t, "'] path[j='").concat(e, `'], 69541 .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(t, "'] path[j='").concat(e, `'], 69542 .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(t, "'] path[j='").concat(e, `'], 69543 .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(t, "'] path[j='").concat(e, "']"))); 69544 var o = n ? parseFloat(n.getAttribute("cx")) : 0, h = n ? parseFloat(n.getAttribute("cy")) : 0, c = n ? parseFloat(n.getAttribute("barWidth")) : 0, d = a.getElGrid().getBoundingClientRect(), g = n && (n.classList.contains("apexcharts-candlestick-area") || n.classList.contains("apexcharts-boxPlot-area")); 69545 i.globals.isXNumeric ? (n && !g && (o -= s % 2 != 0 ? c / 2 : 0), n && g && i.globals.comboCharts && (o -= c / 2)) : i.globals.isBarHorizontal || (o = a.xAxisTicksPositions[e - 1] + a.dataPointsDividedWidth / 2, isNaN(o) && (o = a.xAxisTicksPositions[e] - a.dataPointsDividedWidth / 2)), i.globals.isBarHorizontal ? h -= a.tooltipRect.ttHeight : i.config.tooltip.followCursor ? h = a.e.clientY - d.top - a.tooltipRect.ttHeight / 2 : h + a.tooltipRect.ttHeight + 15 > i.globals.gridHeight && (h = i.globals.gridHeight), i.globals.isBarHorizontal || this.moveXCrosshairs(o), a.fixedTooltip || this.moveTooltip(o, h || i.globals.gridHeight); 69546 } }]), y; 69547 }(), Tt = function() { 69548 function y(e) { 69549 F(this, y), this.w = e.w, this.ttCtx = e, this.ctx = e.ctx, this.tooltipPosition = new it(e); 69550 } 69551 return Y(y, [{ key: "drawDynamicPoints", value: function() { 69552 var e = this.w, t = new M(this.ctx), i = new Pe(this.ctx), a = e.globals.dom.baseEl.querySelectorAll(".apexcharts-series"); 69553 a = J(a), e.config.chart.stacked && a.sort(function(d, g) { 69554 return parseFloat(d.getAttribute("data:realIndex")) - parseFloat(g.getAttribute("data:realIndex")); 69555 }); 69556 for (var s = 0; s < a.length; s++) { 69557 var r = a[s].querySelector(".apexcharts-series-markers-wrap"); 69558 if (r !== null) { 69559 var n = void 0, o = "apexcharts-marker w".concat((Math.random() + 1).toString(36).substring(4)); 69560 e.config.chart.type !== "line" && e.config.chart.type !== "area" || e.globals.comboCharts || e.config.tooltip.intersect || (o += " no-pointer-events"); 69561 var h = i.getMarkerConfig({ cssClass: o, seriesIndex: Number(r.getAttribute("data:realIndex")) }); 69562 (n = t.drawMarker(0, 0, h)).node.setAttribute("default-marker-size", 0); 69563 var c = document.createElementNS(e.globals.SVGNS, "g"); 69564 c.classList.add("apexcharts-series-markers"), c.appendChild(n.node), r.appendChild(c); 69565 } 69566 } 69567 } }, { key: "enlargeCurrentPoint", value: function(e, t) { 69568 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = this.w; 69569 s.config.chart.type !== "bubble" && this.newPointSize(e, t); 69570 var r = t.getAttribute("cx"), n = t.getAttribute("cy"); 69571 if (i !== null && a !== null && (r = i, n = a), this.tooltipPosition.moveXCrosshairs(r), !this.fixedTooltip) { 69572 if (s.config.chart.type === "radar") { 69573 var o = this.ttCtx.getElGrid().getBoundingClientRect(); 69574 r = this.ttCtx.e.clientX - o.left; 69575 } 69576 this.tooltipPosition.moveTooltip(r, n, s.config.markers.hover.size); 69577 } 69578 } }, { key: "enlargePoints", value: function(e) { 69579 for (var t = this.w, i = this, a = this.ttCtx, s = e, r = t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"), n = t.config.markers.hover.size, o = 0; o < r.length; o++) { 69580 var h = r[o].getAttribute("rel"), c = r[o].getAttribute("index"); 69581 if (n === void 0 && (n = t.globals.markers.size[c] + t.config.markers.hover.sizeOffset), s === parseInt(h, 10)) { 69582 i.newPointSize(s, r[o]); 69583 var d = r[o].getAttribute("cx"), g = r[o].getAttribute("cy"); 69584 i.tooltipPosition.moveXCrosshairs(d), a.fixedTooltip || i.tooltipPosition.moveTooltip(d, g, n); 69585 } else 69586 i.oldPointSize(r[o]); 69587 } 69588 } }, { key: "newPointSize", value: function(e, t) { 69589 var i = this.w, a = i.config.markers.hover.size, s = e === 0 ? t.parentNode.firstChild : t.parentNode.lastChild; 69590 if (s.getAttribute("default-marker-size") !== "0") { 69591 var r = parseInt(s.getAttribute("index"), 10); 69592 a === void 0 && (a = i.globals.markers.size[r] + i.config.markers.hover.sizeOffset), a < 0 && (a = 0), s.setAttribute("r", a); 69593 } 69594 } }, { key: "oldPointSize", value: function(e) { 69595 var t = parseFloat(e.getAttribute("default-marker-size")); 69596 e.setAttribute("r", t); 69597 } }, { key: "resetPointsSize", value: function() { 69598 for (var e = this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"), t = 0; t < e.length; t++) { 69599 var i = parseFloat(e[t].getAttribute("default-marker-size")); 69600 P.isNumber(i) && i >= 0 ? e[t].setAttribute("r", i) : e[t].setAttribute("r", 0); 69601 } 69602 } }]), y; 69603 }(), zt = function() { 69604 function y(e) { 69605 F(this, y), this.w = e.w; 69606 var t = this.w; 69607 this.ttCtx = e, this.isVerticalGroupedRangeBar = !t.globals.isBarHorizontal && t.config.chart.type === "rangeBar" && t.config.plotOptions.bar.rangeBarGroupRows; 69608 } 69609 return Y(y, [{ key: "getAttr", value: function(e, t) { 69610 return parseFloat(e.target.getAttribute(t)); 69611 } }, { key: "handleHeatTreeTooltip", value: function(e) { 69612 var t = e.e, i = e.opt, a = e.x, s = e.y, r = e.type, n = this.ttCtx, o = this.w; 69613 if (t.target.classList.contains("apexcharts-".concat(r, "-rect"))) { 69614 var h = this.getAttr(t, "i"), c = this.getAttr(t, "j"), d = this.getAttr(t, "cx"), g = this.getAttr(t, "cy"), p = this.getAttr(t, "width"), f = this.getAttr(t, "height"); 69615 if (n.tooltipLabels.drawSeriesTexts({ ttItems: i.ttItems, i: h, j: c, shared: !1, e: t }), o.globals.capturedSeriesIndex = h, o.globals.capturedDataPointIndex = c, a = d + n.tooltipRect.ttWidth / 2 + p, s = g + n.tooltipRect.ttHeight / 2 - f / 2, n.tooltipPosition.moveXCrosshairs(d + p / 2), a > o.globals.gridWidth / 2 && (a = d - n.tooltipRect.ttWidth / 2 + p), n.w.config.tooltip.followCursor) { 69616 var b = o.globals.dom.elWrap.getBoundingClientRect(); 69617 a = o.globals.clientX - b.left - (a > o.globals.gridWidth / 2 ? n.tooltipRect.ttWidth : 0), s = o.globals.clientY - b.top - (s > o.globals.gridHeight / 2 ? n.tooltipRect.ttHeight : 0); 69618 } 69619 } 69620 return { x: a, y: s }; 69621 } }, { key: "handleMarkerTooltip", value: function(e) { 69622 var t, i, a = e.e, s = e.opt, r = e.x, n = e.y, o = this.w, h = this.ttCtx; 69623 if (a.target.classList.contains("apexcharts-marker")) { 69624 var c = parseInt(s.paths.getAttribute("cx"), 10), d = parseInt(s.paths.getAttribute("cy"), 10), g = parseFloat(s.paths.getAttribute("val")); 69625 if (i = parseInt(s.paths.getAttribute("rel"), 10), t = parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"), 10) - 1, h.intersect) { 69626 var p = P.findAncestor(s.paths, "apexcharts-series"); 69627 p && (t = parseInt(p.getAttribute("data:realIndex"), 10)); 69628 } 69629 if (h.tooltipLabels.drawSeriesTexts({ ttItems: s.ttItems, i: t, j: i, shared: !h.showOnIntersect && o.config.tooltip.shared, e: a }), a.type === "mouseup" && h.markerClick(a, t, i), o.globals.capturedSeriesIndex = t, o.globals.capturedDataPointIndex = i, r = c, n = d + o.globals.translateY - 1.4 * h.tooltipRect.ttHeight, h.w.config.tooltip.followCursor) { 69630 var f = h.getElGrid().getBoundingClientRect(); 69631 n = h.e.clientY + o.globals.translateY - f.top; 69632 } 69633 g < 0 && (n = d), h.marker.enlargeCurrentPoint(i, s.paths, r, n); 69634 } 69635 return { x: r, y: n }; 69636 } }, { key: "handleBarTooltip", value: function(e) { 69637 var t, i, a = e.e, s = e.opt, r = this.w, n = this.ttCtx, o = n.getElTooltip(), h = 0, c = 0, d = 0, g = this.getBarTooltipXY({ e: a, opt: s }); 69638 t = g.i; 69639 var p = g.barHeight, f = g.j; 69640 r.globals.capturedSeriesIndex = t, r.globals.capturedDataPointIndex = f, r.globals.isBarHorizontal && n.tooltipUtil.hasBars() || !r.config.tooltip.shared ? (c = g.x, d = g.y, i = Array.isArray(r.config.stroke.width) ? r.config.stroke.width[t] : r.config.stroke.width, h = c) : r.globals.comboCharts || r.config.tooltip.shared || (h /= 2), isNaN(d) && (d = r.globals.svgHeight - n.tooltipRect.ttHeight); 69641 var b = parseInt(s.paths.parentNode.getAttribute("data:realIndex"), 10), m = r.globals.isMultipleYAxis ? r.config.yaxis[b] && r.config.yaxis[b].reversed : r.config.yaxis[0].reversed; 69642 if (c + n.tooltipRect.ttWidth > r.globals.gridWidth && !m ? c -= n.tooltipRect.ttWidth : c < 0 && (c = 0), n.w.config.tooltip.followCursor) { 69643 var w = n.getElGrid().getBoundingClientRect(); 69644 d = n.e.clientY - w.top; 69645 } 69646 n.tooltip === null && (n.tooltip = r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")), r.config.tooltip.shared || (r.globals.comboBarCount > 0 ? n.tooltipPosition.moveXCrosshairs(h + i / 2) : n.tooltipPosition.moveXCrosshairs(h)), !n.fixedTooltip && (!r.config.tooltip.shared || r.globals.isBarHorizontal && n.tooltipUtil.hasBars()) && (m && (c -= n.tooltipRect.ttWidth) < 0 && (c = 0), !m || r.globals.isBarHorizontal && n.tooltipUtil.hasBars() || (d = d + p - 2 * (r.globals.series[t][f] < 0 ? p : 0)), d = d + r.globals.translateY - n.tooltipRect.ttHeight / 2, o.style.left = c + r.globals.translateX + "px", o.style.top = d + "px"); 69647 } }, { key: "getBarTooltipXY", value: function(e) { 69648 var t = this, i = e.e, a = e.opt, s = this.w, r = null, n = this.ttCtx, o = 0, h = 0, c = 0, d = 0, g = 0, p = i.target.classList; 69649 if (p.contains("apexcharts-bar-area") || p.contains("apexcharts-candlestick-area") || p.contains("apexcharts-boxPlot-area") || p.contains("apexcharts-rangebar-area")) { 69650 var f = i.target, b = f.getBoundingClientRect(), m = a.elGrid.getBoundingClientRect(), w = b.height; 69651 g = b.height; 69652 var A = b.width, l = parseInt(f.getAttribute("cx"), 10), u = parseInt(f.getAttribute("cy"), 10); 69653 d = parseFloat(f.getAttribute("barWidth")); 69654 var x = i.type === "touchmove" ? i.touches[0].clientX : i.clientX; 69655 r = parseInt(f.getAttribute("j"), 10), o = parseInt(f.parentNode.getAttribute("rel"), 10) - 1; 69656 var v = f.getAttribute("data-range-y1"), k = f.getAttribute("data-range-y2"); 69657 s.globals.comboCharts && (o = parseInt(f.parentNode.getAttribute("data:realIndex"), 10)); 69658 var S = function(L) { 69659 return s.globals.isXNumeric ? l - A / 2 : t.isVerticalGroupedRangeBar ? l + A / 2 : l - n.dataPointsDividedWidth + A / 2; 69660 }, C = function() { 69661 return u - n.dataPointsDividedHeight + w / 2 - n.tooltipRect.ttHeight / 2; 69662 }; 69663 n.tooltipLabels.drawSeriesTexts({ ttItems: a.ttItems, i: o, j: r, y1: v ? parseInt(v, 10) : null, y2: k ? parseInt(k, 10) : null, shared: !n.showOnIntersect && s.config.tooltip.shared, e: i }), s.config.tooltip.followCursor ? s.globals.isBarHorizontal ? (h = x - m.left + 15, c = C()) : (h = S(), c = i.clientY - m.top - n.tooltipRect.ttHeight / 2 - 15) : s.globals.isBarHorizontal ? ((h = l) < n.xyRatios.baseLineInvertedY && (h = l - n.tooltipRect.ttWidth), c = C()) : (h = S(), c = u); 69664 } 69665 return { x: h, y: c, barHeight: g, barWidth: d, i: o, j: r }; 69666 } }]), y; 69667 }(), Mt = function() { 69668 function y(e) { 69669 F(this, y), this.w = e.w, this.ttCtx = e; 69670 } 69671 return Y(y, [{ key: "drawXaxisTooltip", value: function() { 69672 var e = this.w, t = this.ttCtx, i = e.config.xaxis.position === "bottom"; 69673 t.xaxisOffY = i ? e.globals.gridHeight + 1 : -e.globals.xAxisHeight - e.config.xaxis.axisTicks.height + 3; 69674 var a = i ? "apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom" : "apexcharts-xaxistooltip apexcharts-xaxistooltip-top", s = e.globals.dom.elWrap; 69675 t.isXAxisTooltipEnabled && e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip") === null && (t.xaxisTooltip = document.createElement("div"), t.xaxisTooltip.setAttribute("class", a + " apexcharts-theme-" + e.config.tooltip.theme), s.appendChild(t.xaxisTooltip), t.xaxisTooltipText = document.createElement("div"), t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"), t.xaxisTooltipText.style.fontFamily = e.config.xaxis.tooltip.style.fontFamily || e.config.chart.fontFamily, t.xaxisTooltipText.style.fontSize = e.config.xaxis.tooltip.style.fontSize, t.xaxisTooltip.appendChild(t.xaxisTooltipText)); 69676 } }, { key: "drawYaxisTooltip", value: function() { 69677 for (var e = this.w, t = this.ttCtx, i = function(s) { 69678 var r = e.config.yaxis[s].opposite || e.config.yaxis[s].crosshairs.opposite; 69679 t.yaxisOffX = r ? e.globals.gridWidth + 1 : 1; 69680 var n = "apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s, r ? " apexcharts-yaxistooltip-right" : " apexcharts-yaxistooltip-left"); 69681 e.globals.yAxisSameScaleIndices.map(function(h, c) { 69682 h.map(function(d, g) { 69683 g === s && (n += e.config.yaxis[g].show ? " " : " apexcharts-yaxistooltip-hidden"); 69684 }); 69685 }); 69686 var o = e.globals.dom.elWrap; 69687 e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s)) === null && (t.yaxisTooltip = document.createElement("div"), t.yaxisTooltip.setAttribute("class", n + " apexcharts-theme-" + e.config.tooltip.theme), o.appendChild(t.yaxisTooltip), s === 0 && (t.yaxisTooltipText = []), t.yaxisTooltipText[s] = document.createElement("div"), t.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"), t.yaxisTooltip.appendChild(t.yaxisTooltipText[s])); 69688 }, a = 0; a < e.config.yaxis.length; a++) 69689 i(a); 69690 } }, { key: "setXCrosshairWidth", value: function() { 69691 var e = this.w, t = this.ttCtx, i = t.getElXCrosshairs(); 69692 if (t.xcrosshairsWidth = parseInt(e.config.xaxis.crosshairs.width, 10), e.globals.comboCharts) { 69693 var a = e.globals.dom.baseEl.querySelector(".apexcharts-bar-area"); 69694 if (a !== null && e.config.xaxis.crosshairs.width === "barWidth") { 69695 var s = parseFloat(a.getAttribute("barWidth")); 69696 t.xcrosshairsWidth = s; 69697 } else if (e.config.xaxis.crosshairs.width === "tickWidth") { 69698 var r = e.globals.labels.length; 69699 t.xcrosshairsWidth = e.globals.gridWidth / r; 69700 } 69701 } else if (e.config.xaxis.crosshairs.width === "tickWidth") { 69702 var n = e.globals.labels.length; 69703 t.xcrosshairsWidth = e.globals.gridWidth / n; 69704 } else if (e.config.xaxis.crosshairs.width === "barWidth") { 69705 var o = e.globals.dom.baseEl.querySelector(".apexcharts-bar-area"); 69706 if (o !== null) { 69707 var h = parseFloat(o.getAttribute("barWidth")); 69708 t.xcrosshairsWidth = h; 69709 } else 69710 t.xcrosshairsWidth = 1; 69711 } 69712 e.globals.isBarHorizontal && (t.xcrosshairsWidth = 0), i !== null && t.xcrosshairsWidth > 0 && i.setAttribute("width", t.xcrosshairsWidth); 69713 } }, { key: "handleYCrosshair", value: function() { 69714 var e = this.w, t = this.ttCtx; 69715 t.ycrosshairs = e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"), t.ycrosshairsHidden = e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden"); 69716 } }, { key: "drawYaxisTooltipText", value: function(e, t, i) { 69717 var a = this.ttCtx, s = this.w, r = s.globals.yLabelFormatters[e]; 69718 if (a.yaxisTooltips[e]) { 69719 var n = a.getElGrid().getBoundingClientRect(), o = (t - n.top) * i.yRatio[e], h = s.globals.maxYArr[e] - s.globals.minYArr[e], c = s.globals.minYArr[e] + (h - o); 69720 a.tooltipPosition.moveYCrosshairs(t - n.top), a.yaxisTooltipText[e].innerHTML = r(c), a.tooltipPosition.moveYAxisTooltip(e); 69721 } 69722 } }]), y; 69723 }(), at = function() { 69724 function y(e) { 69725 F(this, y), this.ctx = e, this.w = e.w; 69726 var t = this.w; 69727 this.tConfig = t.config.tooltip, this.tooltipUtil = new tt(this), this.tooltipLabels = new It(this), this.tooltipPosition = new it(this), this.marker = new Tt(this), this.intersect = new zt(this), this.axesTooltip = new Mt(this), this.showOnIntersect = this.tConfig.intersect, this.showTooltipTitle = this.tConfig.x.show, this.fixedTooltip = this.tConfig.fixed.enabled, this.xaxisTooltip = null, this.yaxisTTEls = null, this.isBarShared = !t.globals.isBarHorizontal && this.tConfig.shared, this.lastHoverTime = Date.now(); 69728 } 69729 return Y(y, [{ key: "getElTooltip", value: function(e) { 69730 return e || (e = this), e.w.globals.dom.baseEl ? e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip") : null; 69731 } }, { key: "getElXCrosshairs", value: function() { 69732 return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs"); 69733 } }, { key: "getElGrid", value: function() { 69734 return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid"); 69735 } }, { key: "drawTooltip", value: function(e) { 69736 var t = this.w; 69737 this.xyRatios = e, this.isXAxisTooltipEnabled = t.config.xaxis.tooltip.enabled && t.globals.axisCharts, this.yaxisTooltips = t.config.yaxis.map(function(r, n) { 69738 return !!(r.show && r.tooltip.enabled && t.globals.axisCharts); 69739 }), this.allTooltipSeriesGroups = [], t.globals.axisCharts || (this.showTooltipTitle = !1); 69740 var i = document.createElement("div"); 69741 if (i.classList.add("apexcharts-tooltip"), t.config.tooltip.cssClass && i.classList.add(t.config.tooltip.cssClass), i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)), t.globals.dom.elWrap.appendChild(i), t.globals.axisCharts) { 69742 this.axesTooltip.drawXaxisTooltip(), this.axesTooltip.drawYaxisTooltip(), this.axesTooltip.setXCrosshairWidth(), this.axesTooltip.handleYCrosshair(); 69743 var a = new Ie(this.ctx); 69744 this.xAxisTicksPositions = a.getXAxisTicksPositions(); 69745 } 69746 if (!t.globals.comboCharts && !this.tConfig.intersect && t.config.chart.type !== "rangeBar" || this.tConfig.shared || (this.showOnIntersect = !0), t.config.markers.size !== 0 && t.globals.markers.largestSize !== 0 || this.marker.drawDynamicPoints(this), t.globals.collapsedSeries.length !== t.globals.series.length) { 69747 this.dataPointsDividedHeight = t.globals.gridHeight / t.globals.dataPoints, this.dataPointsDividedWidth = t.globals.gridWidth / t.globals.dataPoints, this.showTooltipTitle && (this.tooltipTitle = document.createElement("div"), this.tooltipTitle.classList.add("apexcharts-tooltip-title"), this.tooltipTitle.style.fontFamily = this.tConfig.style.fontFamily || t.config.chart.fontFamily, this.tooltipTitle.style.fontSize = this.tConfig.style.fontSize, i.appendChild(this.tooltipTitle)); 69748 var s = t.globals.series.length; 69749 (t.globals.xyCharts || t.globals.comboCharts) && this.tConfig.shared && (s = this.showOnIntersect ? 1 : t.globals.series.length), this.legendLabels = t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"), this.ttItems = this.createTTElements(s), this.addSVGEvents(); 69750 } 69751 } }, { key: "createTTElements", value: function(e) { 69752 for (var t = this, i = this.w, a = [], s = this.getElTooltip(), r = function(o) { 69753 var h = document.createElement("div"); 69754 h.classList.add("apexcharts-tooltip-series-group"), h.style.order = i.config.tooltip.inverseOrder ? e - o : o + 1, t.tConfig.shared && t.tConfig.enabledOnSeries && Array.isArray(t.tConfig.enabledOnSeries) && t.tConfig.enabledOnSeries.indexOf(o) < 0 && h.classList.add("apexcharts-tooltip-series-group-hidden"); 69755 var c = document.createElement("span"); 69756 c.classList.add("apexcharts-tooltip-marker"), c.style.backgroundColor = i.globals.colors[o], h.appendChild(c); 69757 var d = document.createElement("div"); 69758 d.classList.add("apexcharts-tooltip-text"), d.style.fontFamily = t.tConfig.style.fontFamily || i.config.chart.fontFamily, d.style.fontSize = t.tConfig.style.fontSize, ["y", "goals", "z"].forEach(function(g) { 69759 var p = document.createElement("div"); 69760 p.classList.add("apexcharts-tooltip-".concat(g, "-group")); 69761 var f = document.createElement("span"); 69762 f.classList.add("apexcharts-tooltip-text-".concat(g, "-label")), p.appendChild(f); 69763 var b = document.createElement("span"); 69764 b.classList.add("apexcharts-tooltip-text-".concat(g, "-value")), p.appendChild(b), d.appendChild(p); 69765 }), h.appendChild(d), s.appendChild(h), a.push(h); 69766 }, n = 0; n < e; n++) 69767 r(n); 69768 return a; 69769 } }, { key: "addSVGEvents", value: function() { 69770 var e = this.w, t = e.config.chart.type, i = this.getElTooltip(), a = !(t !== "bar" && t !== "candlestick" && t !== "boxPlot" && t !== "rangeBar"), s = t === "area" || t === "line" || t === "scatter" || t === "bubble" || t === "radar", r = e.globals.dom.Paper.node, n = this.getElGrid(); 69771 n && (this.seriesBound = n.getBoundingClientRect()); 69772 var o, h = [], c = [], d = { hoverArea: r, elGrid: n, tooltipEl: i, tooltipY: h, tooltipX: c, ttItems: this.ttItems }; 69773 if (e.globals.axisCharts && (s ? o = e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker") : a ? o = e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area") : t !== "heatmap" && t !== "treemap" || (o = e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")), o && o.length)) 69774 for (var g = 0; g < o.length; g++) 69775 h.push(o[g].getAttribute("cy")), c.push(o[g].getAttribute("cx")); 69776 if (e.globals.xyCharts && !this.showOnIntersect || e.globals.comboCharts && !this.showOnIntersect || a && this.tooltipUtil.hasBars() && this.tConfig.shared) 69777 this.addPathsEventListeners([r], d); 69778 else if (a && !e.globals.comboCharts || s && this.showOnIntersect) 69779 this.addDatapointEventsListeners(d); 69780 else if (!e.globals.axisCharts || t === "heatmap" || t === "treemap") { 69781 var p = e.globals.dom.baseEl.querySelectorAll(".apexcharts-series"); 69782 this.addPathsEventListeners(p, d); 69783 } 69784 if (this.showOnIntersect) { 69785 var f = e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker"); 69786 f.length > 0 && this.addPathsEventListeners(f, d), this.tooltipUtil.hasBars() && !this.tConfig.shared && this.addDatapointEventsListeners(d); 69787 } 69788 } }, { key: "drawFixedTooltipRect", value: function() { 69789 var e = this.w, t = this.getElTooltip(), i = t.getBoundingClientRect(), a = i.width + 10, s = i.height + 10, r = this.tConfig.fixed.offsetX, n = this.tConfig.fixed.offsetY, o = this.tConfig.fixed.position.toLowerCase(); 69790 return o.indexOf("right") > -1 && (r = r + e.globals.svgWidth - a + 10), o.indexOf("bottom") > -1 && (n = n + e.globals.svgHeight - s - 10), t.style.left = r + "px", t.style.top = n + "px", { x: r, y: n, ttWidth: a, ttHeight: s }; 69791 } }, { key: "addDatapointEventsListeners", value: function(e) { 69792 var t = this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area"); 69793 this.addPathsEventListeners(t, e); 69794 } }, { key: "addPathsEventListeners", value: function(e, t) { 69795 for (var i = this, a = function(r) { 69796 var n = { paths: e[r], tooltipEl: t.tooltipEl, tooltipY: t.tooltipY, tooltipX: t.tooltipX, elGrid: t.elGrid, hoverArea: t.hoverArea, ttItems: t.ttItems }; 69797 ["mousemove", "mouseup", "touchmove", "mouseout", "touchend"].map(function(o) { 69798 return e[r].addEventListener(o, i.onSeriesHover.bind(i, n), { capture: !1, passive: !0 }); 69799 }); 69800 }, s = 0; s < e.length; s++) 69801 a(s); 69802 } }, { key: "onSeriesHover", value: function(e, t) { 69803 var i = this, a = Date.now() - this.lastHoverTime; 69804 a >= 100 ? this.seriesHover(e, t) : (clearTimeout(this.seriesHoverTimeout), this.seriesHoverTimeout = setTimeout(function() { 69805 i.seriesHover(e, t); 69806 }, 100 - a)); 69807 } }, { key: "seriesHover", value: function(e, t) { 69808 var i = this; 69809 this.lastHoverTime = Date.now(); 69810 var a = [], s = this.w; 69811 s.config.chart.group && (a = this.ctx.getGroupedCharts()), s.globals.axisCharts && (s.globals.minX === -1 / 0 && s.globals.maxX === 1 / 0 || s.globals.dataPoints === 0) || (a.length ? a.forEach(function(r) { 69812 var n = i.getElTooltip(r), o = { paths: e.paths, tooltipEl: n, tooltipY: e.tooltipY, tooltipX: e.tooltipX, elGrid: e.elGrid, hoverArea: e.hoverArea, ttItems: r.w.globals.tooltip.ttItems }; 69813 r.w.globals.minX === i.w.globals.minX && r.w.globals.maxX === i.w.globals.maxX && r.w.globals.tooltip.seriesHoverByContext({ chartCtx: r, ttCtx: r.w.globals.tooltip, opt: o, e: t }); 69814 }) : this.seriesHoverByContext({ chartCtx: this.ctx, ttCtx: this.w.globals.tooltip, opt: e, e: t })); 69815 } }, { key: "seriesHoverByContext", value: function(e) { 69816 var t = e.chartCtx, i = e.ttCtx, a = e.opt, s = e.e, r = t.w, n = this.getElTooltip(); 69817 n && (i.tooltipRect = { x: 0, y: 0, ttWidth: n.getBoundingClientRect().width, ttHeight: n.getBoundingClientRect().height }, i.e = s, i.tooltipUtil.hasBars() && !r.globals.comboCharts && !i.isBarShared && this.tConfig.onDatasetHover.highlightDataSeries && new te(t).toggleSeriesOnHover(s, s.target.parentNode), i.fixedTooltip && i.drawFixedTooltipRect(), r.globals.axisCharts ? i.axisChartsTooltips({ e: s, opt: a, tooltipRect: i.tooltipRect }) : i.nonAxisChartsTooltips({ e: s, opt: a, tooltipRect: i.tooltipRect })); 69818 } }, { key: "axisChartsTooltips", value: function(e) { 69819 var t, i, a = e.e, s = e.opt, r = this.w, n = s.elGrid.getBoundingClientRect(), o = a.type === "touchmove" ? a.touches[0].clientX : a.clientX, h = a.type === "touchmove" ? a.touches[0].clientY : a.clientY; 69820 if (this.clientY = h, this.clientX = o, r.globals.capturedSeriesIndex = -1, r.globals.capturedDataPointIndex = -1, h < n.top || h > n.top + n.height) 69821 this.handleMouseOut(s); 69822 else { 69823 if (Array.isArray(this.tConfig.enabledOnSeries) && !r.config.tooltip.shared) { 69824 var c = parseInt(s.paths.getAttribute("index"), 10); 69825 if (this.tConfig.enabledOnSeries.indexOf(c) < 0) 69826 return void this.handleMouseOut(s); 69827 } 69828 var d = this.getElTooltip(), g = this.getElXCrosshairs(), p = r.globals.xyCharts || r.config.chart.type === "bar" && !r.globals.isBarHorizontal && this.tooltipUtil.hasBars() && this.tConfig.shared || r.globals.comboCharts && this.tooltipUtil.hasBars(); 69829 if (a.type === "mousemove" || a.type === "touchmove" || a.type === "mouseup") { 69830 if (r.globals.collapsedSeries.length + r.globals.ancillaryCollapsedSeries.length === r.globals.series.length) 69831 return; 69832 g !== null && g.classList.add("apexcharts-active"); 69833 var f = this.yaxisTooltips.filter(function(w) { 69834 return w === !0; 69835 }); 69836 if (this.ycrosshairs !== null && f.length && this.ycrosshairs.classList.add("apexcharts-active"), p && !this.showOnIntersect) 69837 this.handleStickyTooltip(a, o, h, s); 69838 else if (r.config.chart.type === "heatmap" || r.config.chart.type === "treemap") { 69839 var b = this.intersect.handleHeatTreeTooltip({ e: a, opt: s, x: t, y: i, type: r.config.chart.type }); 69840 t = b.x, i = b.y, d.style.left = t + "px", d.style.top = i + "px"; 69841 } else 69842 this.tooltipUtil.hasBars() && this.intersect.handleBarTooltip({ e: a, opt: s }), this.tooltipUtil.hasMarkers() && this.intersect.handleMarkerTooltip({ e: a, opt: s, x: t, y: i }); 69843 if (this.yaxisTooltips.length) 69844 for (var m = 0; m < r.config.yaxis.length; m++) 69845 this.axesTooltip.drawYaxisTooltipText(m, h, this.xyRatios); 69846 s.tooltipEl.classList.add("apexcharts-active"); 69847 } else 69848 a.type !== "mouseout" && a.type !== "touchend" || this.handleMouseOut(s); 69849 } 69850 } }, { key: "nonAxisChartsTooltips", value: function(e) { 69851 var t = e.e, i = e.opt, a = e.tooltipRect, s = this.w, r = i.paths.getAttribute("rel"), n = this.getElTooltip(), o = s.globals.dom.elWrap.getBoundingClientRect(); 69852 if (t.type === "mousemove" || t.type === "touchmove") { 69853 n.classList.add("apexcharts-active"), this.tooltipLabels.drawSeriesTexts({ ttItems: i.ttItems, i: parseInt(r, 10) - 1, shared: !1 }); 69854 var h = s.globals.clientX - o.left - a.ttWidth / 2, c = s.globals.clientY - o.top - a.ttHeight - 10; 69855 if (n.style.left = h + "px", n.style.top = c + "px", s.config.legend.tooltipHoverFormatter) { 69856 var d = r - 1, g = (0, s.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"), { seriesIndex: d, dataPointIndex: d, w: s }); 69857 this.legendLabels[d].innerHTML = g; 69858 } 69859 } else 69860 t.type !== "mouseout" && t.type !== "touchend" || (n.classList.remove("apexcharts-active"), s.config.legend.tooltipHoverFormatter && this.legendLabels.forEach(function(p) { 69861 var f = p.getAttribute("data:default-text"); 69862 p.innerHTML = decodeURIComponent(f); 69863 })); 69864 } }, { key: "handleStickyTooltip", value: function(e, t, i, a) { 69865 var s = this.w, r = this.tooltipUtil.getNearestValues({ context: this, hoverArea: a.hoverArea, elGrid: a.elGrid, clientX: t, clientY: i }), n = r.j, o = r.capturedSeries; 69866 s.globals.collapsedSeriesIndices.includes(o) && (o = null); 69867 var h = a.elGrid.getBoundingClientRect(); 69868 if (r.hoverX < 0 || r.hoverX > h.width) 69869 this.handleMouseOut(a); 69870 else if (o !== null) 69871 this.handleStickyCapturedSeries(e, o, a, n); 69872 else if (this.tooltipUtil.isXoverlap(n) || s.globals.isBarHorizontal) { 69873 var c = s.globals.series.findIndex(function(d, g) { 69874 return !s.globals.collapsedSeriesIndices.includes(g); 69875 }); 69876 this.create(e, this, c, n, a.ttItems); 69877 } 69878 } }, { key: "handleStickyCapturedSeries", value: function(e, t, i, a) { 69879 var s = this.w; 69880 if (!this.tConfig.shared && s.globals.series[t][a] === null) 69881 return void this.handleMouseOut(i); 69882 if (s.globals.series[t][a] !== void 0) 69883 this.tConfig.shared && this.tooltipUtil.isXoverlap(a) && this.tooltipUtil.isInitialSeriesSameLen() ? this.create(e, this, t, a, i.ttItems) : this.create(e, this, t, a, i.ttItems, !1); 69884 else if (this.tooltipUtil.isXoverlap(a)) { 69885 var r = s.globals.series.findIndex(function(n, o) { 69886 return !s.globals.collapsedSeriesIndices.includes(o); 69887 }); 69888 this.create(e, this, r, a, i.ttItems); 69889 } 69890 } }, { key: "deactivateHoverFilter", value: function() { 69891 for (var e = this.w, t = new M(this.ctx), i = e.globals.dom.Paper.select(".apexcharts-bar-area"), a = 0; a < i.length; a++) 69892 t.pathMouseLeave(i[a]); 69893 } }, { key: "handleMouseOut", value: function(e) { 69894 var t = this.w, i = this.getElXCrosshairs(); 69895 if (e.tooltipEl.classList.remove("apexcharts-active"), this.deactivateHoverFilter(), t.config.chart.type !== "bubble" && this.marker.resetPointsSize(), i !== null && i.classList.remove("apexcharts-active"), this.ycrosshairs !== null && this.ycrosshairs.classList.remove("apexcharts-active"), this.isXAxisTooltipEnabled && this.xaxisTooltip.classList.remove("apexcharts-active"), this.yaxisTooltips.length) { 69896 this.yaxisTTEls === null && (this.yaxisTTEls = t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")); 69897 for (var a = 0; a < this.yaxisTTEls.length; a++) 69898 this.yaxisTTEls[a].classList.remove("apexcharts-active"); 69899 } 69900 t.config.legend.tooltipHoverFormatter && this.legendLabels.forEach(function(s) { 69901 var r = s.getAttribute("data:default-text"); 69902 s.innerHTML = decodeURIComponent(r); 69903 }); 69904 } }, { key: "markerClick", value: function(e, t, i) { 69905 var a = this.w; 69906 typeof a.config.chart.events.markerClick == "function" && a.config.chart.events.markerClick(e, this.ctx, { seriesIndex: t, dataPointIndex: i, w: a }), this.ctx.events.fireEvent("markerClick", [e, this.ctx, { seriesIndex: t, dataPointIndex: i, w: a }]); 69907 } }, { key: "create", value: function(e, t, i, a, s) { 69908 var r, n, o, h, c, d, g, p, f, b, m, w, A, l, u, x, v = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : null, k = this.w, S = t; 69909 e.type === "mouseup" && this.markerClick(e, i, a), v === null && (v = this.tConfig.shared); 69910 var C = this.tooltipUtil.hasMarkers(i), L = this.tooltipUtil.getElBars(); 69911 if (k.config.legend.tooltipHoverFormatter) { 69912 var I = k.config.legend.tooltipHoverFormatter, z = Array.from(this.legendLabels); 69913 z.forEach(function(se) { 69914 var K = se.getAttribute("data:default-text"); 69915 se.innerHTML = decodeURIComponent(K); 69916 }); 69917 for (var T = 0; T < z.length; T++) { 69918 var E = z[T], R = parseInt(E.getAttribute("i"), 10), O = decodeURIComponent(E.getAttribute("data:default-text")), D = I(O, { seriesIndex: v ? R : i, dataPointIndex: a, w: k }); 69919 if (v) 69920 E.innerHTML = k.globals.collapsedSeriesIndices.indexOf(R) < 0 ? D : O; 69921 else if (E.innerHTML = R === i ? D : O, i === R) 69922 break; 69923 } 69924 } 69925 var W = X(X({ ttItems: s, i, j: a }, ((r = k.globals.seriesRange) === null || r === void 0 || (n = r[i]) === null || n === void 0 || (o = n[a]) === null || o === void 0 || (h = o.y[0]) === null || h === void 0 ? void 0 : h.y1) !== void 0 && { y1: (c = k.globals.seriesRange) === null || c === void 0 || (d = c[i]) === null || d === void 0 || (g = d[a]) === null || g === void 0 || (p = g.y[0]) === null || p === void 0 ? void 0 : p.y1 }), ((f = k.globals.seriesRange) === null || f === void 0 || (b = f[i]) === null || b === void 0 || (m = b[a]) === null || m === void 0 || (w = m.y[0]) === null || w === void 0 ? void 0 : w.y2) !== void 0 && { y2: (A = k.globals.seriesRange) === null || A === void 0 || (l = A[i]) === null || l === void 0 || (u = l[a]) === null || u === void 0 || (x = u.y[0]) === null || x === void 0 ? void 0 : x.y2 }); 69926 if (v) { 69927 if (S.tooltipLabels.drawSeriesTexts(X(X({}, W), {}, { shared: !this.showOnIntersect && this.tConfig.shared })), C) 69928 k.globals.markers.largestSize > 0 ? S.marker.enlargePoints(a) : S.tooltipPosition.moveDynamicPointsOnHover(a); 69929 else if (this.tooltipUtil.hasBars() && (this.barSeriesHeight = this.tooltipUtil.getBarsHeight(L), this.barSeriesHeight > 0)) { 69930 var N = new M(this.ctx), V = k.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a, "']")); 69931 this.deactivateHoverFilter(), this.tooltipPosition.moveStickyTooltipOverBars(a, i); 69932 for (var j = 0; j < V.length; j++) 69933 N.pathMouseEnter(V[j]); 69934 } 69935 } else 69936 S.tooltipLabels.drawSeriesTexts(X({ shared: !1 }, W)), this.tooltipUtil.hasBars() && S.tooltipPosition.moveStickyTooltipOverBars(a, i), C && S.tooltipPosition.moveMarkers(i, a); 69937 } }]), y; 69938 }(), Xt = function() { 69939 function y(e) { 69940 F(this, y), this.w = e.w, this.barCtx = e, this.totalFormatter = this.w.config.plotOptions.bar.dataLabels.total.formatter, this.totalFormatter || (this.totalFormatter = this.w.config.dataLabels.formatter); 69941 } 69942 return Y(y, [{ key: "handleBarDataLabels", value: function(e) { 69943 var t = e.x, i = e.y, a = e.y1, s = e.y2, r = e.i, n = e.j, o = e.realIndex, h = e.groupIndex, c = e.series, d = e.barHeight, g = e.barWidth, p = e.barXPosition, f = e.barYPosition, b = e.visibleSeries, m = e.renderedPath, w = this.w, A = new M(this.barCtx.ctx), l = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[o] : this.barCtx.strokeWidth, u = t + parseFloat(g * b), x = i + parseFloat(d * b); 69944 w.globals.isXNumeric && !w.globals.isBarHorizontal && (u = t + parseFloat(g * (b + 1)), x = i + parseFloat(d * (b + 1)) - l); 69945 var v, k = null, S = t, C = i, L = {}, I = w.config.dataLabels, z = this.barCtx.barOptions.dataLabels, T = this.barCtx.barOptions.dataLabels.total; 69946 f !== void 0 && this.barCtx.isRangeBar && (x = f, C = f), p !== void 0 && this.barCtx.isVerticalGroupedRangeBar && (u = p, S = p); 69947 var E = I.offsetX, R = I.offsetY, O = { width: 0, height: 0 }; 69948 if (w.config.dataLabels.enabled) { 69949 var D = this.barCtx.series[r][n]; 69950 O = A.getTextRects(w.globals.yLabelFormatters[0](D), parseFloat(I.style.fontSize)); 69951 } 69952 var W = { x: t, y: i, i: r, j: n, realIndex: o, groupIndex: h || -1, renderedPath: m, bcx: u, bcy: x, barHeight: d, barWidth: g, textRects: O, strokeWidth: l, dataLabelsX: S, dataLabelsY: C, dataLabelsConfig: I, barDataLabelsConfig: z, barTotalDataLabelsConfig: T, offX: E, offY: R }; 69953 return L = this.barCtx.isHorizontal ? this.calculateBarsDataLabelsPosition(W) : this.calculateColumnsDataLabelsPosition(W), m.attr({ cy: L.bcy, cx: L.bcx, j: n, val: c[r][n], barHeight: d, barWidth: g }), v = this.drawCalculatedDataLabels({ x: L.dataLabelsX, y: L.dataLabelsY, val: this.barCtx.isRangeBar ? [a, s] : c[r][n], i: o, j: n, barWidth: g, barHeight: d, textRects: O, dataLabelsConfig: I }), w.config.chart.stacked && T.enabled && (k = this.drawTotalDataLabels({ x: L.totalDataLabelsX, y: L.totalDataLabelsY, barWidth: g, barHeight: d, realIndex: o, textAnchor: L.totalDataLabelsAnchor, val: this.getStackedTotalDataLabel({ realIndex: o, j: n }), dataLabelsConfig: I, barTotalDataLabelsConfig: T })), { dataLabels: v, totalDataLabels: k }; 69954 } }, { key: "getStackedTotalDataLabel", value: function(e) { 69955 var t = e.realIndex, i = e.j, a = this.w, s = this.barCtx.stackedSeriesTotals[i]; 69956 return this.totalFormatter && (s = this.totalFormatter(s, X(X({}, a), {}, { seriesIndex: t, dataPointIndex: i, w: a }))), s; 69957 } }, { key: "calculateColumnsDataLabelsPosition", value: function(e) { 69958 var t, i, a = this.w, s = e.i, r = e.j, n = e.realIndex, o = e.groupIndex, h = e.y, c = e.bcx, d = e.barWidth, g = e.barHeight, p = e.textRects, f = e.dataLabelsX, b = e.dataLabelsY, m = e.dataLabelsConfig, w = e.barDataLabelsConfig, A = e.barTotalDataLabelsConfig, l = e.strokeWidth, u = e.offX, x = e.offY; 69959 g = Math.abs(g); 69960 var v = a.config.plotOptions.bar.dataLabels.orientation === "vertical", k = this.barCtx.barHelpers.getZeroValueEncounters({ i: s, j: r }).zeroEncounters; 69961 c = c - l / 2 + (o !== -1 ? o * d : 0); 69962 var S = a.globals.gridWidth / a.globals.dataPoints; 69963 this.barCtx.isVerticalGroupedRangeBar ? f += d / 2 : (f = a.globals.isXNumeric ? c - d / 2 + u : c - S + d / 2 + u, k > 0 && a.config.plotOptions.bar.hideZeroBarsWhenGrouped && (f -= d * k)), v && (f = f + p.height / 2 - l / 2 - 2); 69964 var C = this.barCtx.series[s][r] < 0, L = h; 69965 switch (this.barCtx.isReversed && (L = h - g + (C ? 2 * g : 0), h -= g), w.position) { 69966 case "center": 69967 b = v ? C ? L - g / 2 + x : L + g / 2 - x : C ? L - g / 2 + p.height / 2 + x : L + g / 2 + p.height / 2 - x; 69968 break; 69969 case "bottom": 69970 b = v ? C ? L - g + x : L + g - x : C ? L - g + p.height + l + x : L + g - p.height / 2 + l - x; 69971 break; 69972 case "top": 69973 b = v ? C ? L + x : L - x : C ? L - p.height / 2 - x : L + p.height + x; 69974 } 69975 if (this.barCtx.lastActiveBarSerieIndex === n && A.enabled) { 69976 var I = new M(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({ realIndex: n, j: r }), m.fontSize); 69977 t = C ? L - I.height / 2 - x - A.offsetY + 18 : L + I.height + x + A.offsetY - 18, i = f + A.offsetX; 69978 } 69979 return a.config.chart.stacked || (b < 0 ? b = 0 + l : b + p.height / 3 > a.globals.gridHeight && (b = a.globals.gridHeight - l)), { bcx: c, bcy: h, dataLabelsX: f, dataLabelsY: b, totalDataLabelsX: i, totalDataLabelsY: t, totalDataLabelsAnchor: "middle" }; 69980 } }, { key: "calculateBarsDataLabelsPosition", value: function(e) { 69981 var t = this.w, i = e.x, a = e.i, s = e.j, r = e.realIndex, n = e.groupIndex, o = e.bcy, h = e.barHeight, c = e.barWidth, d = e.textRects, g = e.dataLabelsX, p = e.strokeWidth, f = e.dataLabelsConfig, b = e.barDataLabelsConfig, m = e.barTotalDataLabelsConfig, w = e.offX, A = e.offY, l = t.globals.gridHeight / t.globals.dataPoints; 69982 c = Math.abs(c); 69983 var u, x, v = (o += n !== -1 ? n * h : 0) - (this.barCtx.isRangeBar ? 0 : l) + h / 2 + d.height / 2 + A - 3, k = "start", S = this.barCtx.series[a][s] < 0, C = i; 69984 switch (this.barCtx.isReversed && (C = i + c - (S ? 2 * c : 0), i = t.globals.gridWidth - c), b.position) { 69985 case "center": 69986 g = S ? C + c / 2 - w : Math.max(d.width / 2, C - c / 2) + w; 69987 break; 69988 case "bottom": 69989 g = S ? C + c - p - Math.round(d.width / 2) - w : C - c + p + Math.round(d.width / 2) + w; 69990 break; 69991 case "top": 69992 g = S ? C - p + Math.round(d.width / 2) - w : C - p - Math.round(d.width / 2) + w; 69993 } 69994 if (this.barCtx.lastActiveBarSerieIndex === r && m.enabled) { 69995 var L = new M(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({ realIndex: r, j: s }), f.fontSize); 69996 S ? (u = C - p + Math.round(L.width / 2) - w - m.offsetX - 15, k = "end") : u = C - p - Math.round(L.width / 2) + w + m.offsetX + 15, x = v + m.offsetY; 69997 } 69998 return t.config.chart.stacked || (g < 0 ? g = g + d.width + p : g + d.width / 2 > t.globals.gridWidth && (g = t.globals.gridWidth - d.width - p)), { bcx: i, bcy: o, dataLabelsX: g, dataLabelsY: v, totalDataLabelsX: u, totalDataLabelsY: x, totalDataLabelsAnchor: k }; 69999 } }, { key: "drawCalculatedDataLabels", value: function(e) { 70000 var t = e.x, i = e.y, a = e.val, s = e.i, r = e.j, n = e.textRects, o = e.barHeight, h = e.barWidth, c = e.dataLabelsConfig, d = this.w, g = "rotate(0)"; 70001 d.config.plotOptions.bar.dataLabels.orientation === "vertical" && (g = "rotate(-90, ".concat(t, ", ").concat(i, ")")); 70002 var p = new ye(this.barCtx.ctx), f = new M(this.barCtx.ctx), b = c.formatter, m = null, w = d.globals.collapsedSeriesIndices.indexOf(s) > -1; 70003 if (c.enabled && !w) { 70004 m = f.group({ class: "apexcharts-data-labels", transform: g }); 70005 var A = ""; 70006 a !== void 0 && (A = b(a, X(X({}, d), {}, { seriesIndex: s, dataPointIndex: r, w: d }))), !a && d.config.plotOptions.bar.hideZeroBarsWhenGrouped && (A = ""); 70007 var l = d.globals.series[s][r] < 0, u = d.config.plotOptions.bar.dataLabels.position; 70008 d.config.plotOptions.bar.dataLabels.orientation === "vertical" && (u === "top" && (c.textAnchor = l ? "end" : "start"), u === "center" && (c.textAnchor = "middle"), u === "bottom" && (c.textAnchor = l ? "end" : "start")), this.barCtx.isRangeBar && this.barCtx.barOptions.dataLabels.hideOverflowingLabels && h < f.getTextRects(A, parseFloat(c.style.fontSize)).width && (A = ""), d.config.chart.stacked && this.barCtx.barOptions.dataLabels.hideOverflowingLabels && (this.barCtx.isHorizontal ? n.width / 1.6 > Math.abs(h) && (A = "") : n.height / 1.6 > Math.abs(o) && (A = "")); 70009 var x = X({}, c); 70010 this.barCtx.isHorizontal && a < 0 && (c.textAnchor === "start" ? x.textAnchor = "end" : c.textAnchor === "end" && (x.textAnchor = "start")), p.plotDataLabelsText({ x: t, y: i, text: A, i: s, j: r, parent: m, dataLabelsConfig: x, alwaysDrawDataLabel: !0, offsetCorrection: !0 }); 70011 } 70012 return m; 70013 } }, { key: "drawTotalDataLabels", value: function(e) { 70014 var t, i = e.x, a = e.y, s = e.val, r = e.barWidth, n = e.barHeight, o = e.realIndex, h = e.textAnchor, c = e.barTotalDataLabelsConfig, d = this.w, g = new M(this.barCtx.ctx); 70015 return c.enabled && i !== void 0 && a !== void 0 && this.barCtx.lastActiveBarSerieIndex === o && (t = g.drawText({ x: i - (!d.globals.isBarHorizontal && d.globals.seriesGroups.length ? r / d.globals.seriesGroups.length : 0), y: a - (d.globals.isBarHorizontal && d.globals.seriesGroups.length ? n / d.globals.seriesGroups.length : 0), foreColor: c.style.color, text: s, textAnchor: h, fontFamily: c.style.fontFamily, fontSize: c.style.fontSize, fontWeight: c.style.fontWeight })), t; 70016 } }]), y; 70017 }(), Et = function() { 70018 function y(e) { 70019 F(this, y), this.w = e.w, this.barCtx = e; 70020 } 70021 return Y(y, [{ key: "initVariables", value: function(e) { 70022 var t = this.w; 70023 this.barCtx.series = e, this.barCtx.totalItems = 0, this.barCtx.seriesLen = 0, this.barCtx.visibleI = -1, this.barCtx.visibleItems = 1; 70024 for (var i = 0; i < e.length; i++) 70025 if (e[i].length > 0 && (this.barCtx.seriesLen = this.barCtx.seriesLen + 1, this.barCtx.totalItems += e[i].length), t.globals.isXNumeric) 70026 for (var a = 0; a < e[i].length; a++) 70027 t.globals.seriesX[i][a] > t.globals.minX && t.globals.seriesX[i][a] < t.globals.maxX && this.barCtx.visibleItems++; 70028 else 70029 this.barCtx.visibleItems = t.globals.dataPoints; 70030 this.barCtx.seriesLen === 0 && (this.barCtx.seriesLen = 1), this.barCtx.zeroSerieses = [], t.globals.comboCharts || this.checkZeroSeries({ series: e }); 70031 } }, { key: "initialPositions", value: function() { 70032 var e, t, i, a, s, r, n, o, h = this.w, c = h.globals.dataPoints; 70033 this.barCtx.isRangeBar && (c = h.globals.labels.length); 70034 var d = this.barCtx.seriesLen; 70035 if (h.config.plotOptions.bar.rangeBarGroupRows && (d = 1), this.barCtx.isHorizontal) 70036 s = (i = h.globals.gridHeight / c) / d, h.globals.isXNumeric && (s = (i = h.globals.gridHeight / this.barCtx.totalItems) / this.barCtx.seriesLen), s = s * parseInt(this.barCtx.barOptions.barHeight, 10) / 100, String(this.barCtx.barOptions.barHeight).indexOf("%") === -1 && (s = parseInt(this.barCtx.barOptions.barHeight, 10)), o = this.barCtx.baseLineInvertedY + h.globals.padHorizontal + (this.barCtx.isReversed ? h.globals.gridWidth : 0) - (this.barCtx.isReversed ? 2 * this.barCtx.baseLineInvertedY : 0), this.barCtx.isFunnel && (o = h.globals.gridWidth / 2), t = (i - s * this.barCtx.seriesLen) / 2; 70037 else { 70038 if (a = h.globals.gridWidth / this.barCtx.visibleItems, h.config.xaxis.convertedCatToNumeric && (a = h.globals.gridWidth / h.globals.dataPoints), r = a / d * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100, h.globals.isXNumeric) { 70039 var g = this.barCtx.xRatio; 70040 h.globals.minXDiff && h.globals.minXDiff !== 0.5 && h.globals.minXDiff / g > 0 && (a = h.globals.minXDiff / g), (r = a / d * parseInt(this.barCtx.barOptions.columnWidth, 10) / 100) < 1 && (r = 1); 70041 } 70042 String(this.barCtx.barOptions.columnWidth).indexOf("%") === -1 && (r = parseInt(this.barCtx.barOptions.columnWidth, 10)), n = h.globals.gridHeight - this.barCtx.baseLineY[this.barCtx.yaxisIndex] - (this.barCtx.isReversed ? h.globals.gridHeight : 0) + (this.barCtx.isReversed ? 2 * this.barCtx.baseLineY[this.barCtx.yaxisIndex] : 0), e = h.globals.padHorizontal + (a - r * this.barCtx.seriesLen) / 2; 70043 } 70044 return h.globals.barHeight = s, h.globals.barWidth = r, { x: e, y: t, yDivision: i, xDivision: a, barHeight: s, barWidth: r, zeroH: n, zeroW: o }; 70045 } }, { key: "initializeStackedPrevVars", value: function(e) { 70046 var t = e.w; 70047 t.globals.hasSeriesGroups ? t.globals.seriesGroups.forEach(function(i) { 70048 e[i] || (e[i] = {}), e[i].prevY = [], e[i].prevX = [], e[i].prevYF = [], e[i].prevXF = [], e[i].prevYVal = [], e[i].prevXVal = []; 70049 }) : (e.prevY = [], e.prevX = [], e.prevYF = [], e.prevXF = [], e.prevYVal = [], e.prevXVal = []); 70050 } }, { key: "initializeStackedXYVars", value: function(e) { 70051 var t = e.w; 70052 t.globals.hasSeriesGroups ? t.globals.seriesGroups.forEach(function(i) { 70053 e[i] || (e[i] = {}), e[i].xArrj = [], e[i].xArrjF = [], e[i].xArrjVal = [], e[i].yArrj = [], e[i].yArrjF = [], e[i].yArrjVal = []; 70054 }) : (e.xArrj = [], e.xArrjF = [], e.xArrjVal = [], e.yArrj = [], e.yArrjF = [], e.yArrjVal = []); 70055 } }, { key: "getPathFillColor", value: function(e, t, i, a) { 70056 var s, r, n, o, h = this.w, c = new ae(this.barCtx.ctx), d = null, g = this.barCtx.barOptions.distributed ? i : t; 70057 return this.barCtx.barOptions.colors.ranges.length > 0 && this.barCtx.barOptions.colors.ranges.map(function(p) { 70058 e[t][i] >= p.from && e[t][i] <= p.to && (d = p.color); 70059 }), h.config.series[t].data[i] && h.config.series[t].data[i].fillColor && (d = h.config.series[t].data[i].fillColor), c.fillPath({ seriesNumber: this.barCtx.barOptions.distributed ? g : a, dataPointIndex: i, color: d, value: e[t][i], fillConfig: (s = h.config.series[t].data[i]) === null || s === void 0 ? void 0 : s.fill, fillType: (r = h.config.series[t].data[i]) !== null && r !== void 0 && (n = r.fill) !== null && n !== void 0 && n.type ? (o = h.config.series[t].data[i]) === null || o === void 0 ? void 0 : o.fill.type : Array.isArray(h.config.fill.type) ? h.config.fill.type[t] : h.config.fill.type }); 70060 } }, { key: "getStrokeWidth", value: function(e, t, i) { 70061 var a = 0, s = this.w; 70062 return this.barCtx.series[e][t] === void 0 || this.barCtx.series[e][t] === null ? this.barCtx.isNullValue = !0 : this.barCtx.isNullValue = !1, s.config.stroke.show && (this.barCtx.isNullValue || (a = Array.isArray(this.barCtx.strokeWidth) ? this.barCtx.strokeWidth[i] : this.barCtx.strokeWidth)), a; 70063 } }, { key: "shouldApplyRadius", value: function(e) { 70064 var t = this.w, i = !1; 70065 return t.config.plotOptions.bar.borderRadius > 0 && (t.config.chart.stacked && t.config.plotOptions.bar.borderRadiusWhenStacked === "last" ? this.barCtx.lastActiveBarSerieIndex === e && (i = !0) : i = !0), i; 70066 } }, { key: "barBackground", value: function(e) { 70067 var t = e.j, i = e.i, a = e.x1, s = e.x2, r = e.y1, n = e.y2, o = e.elSeries, h = this.w, c = new M(this.barCtx.ctx), d = new te(this.barCtx.ctx).getActiveConfigSeriesIndex(); 70068 if (this.barCtx.barOptions.colors.backgroundBarColors.length > 0 && d === i) { 70069 t >= this.barCtx.barOptions.colors.backgroundBarColors.length && (t %= this.barCtx.barOptions.colors.backgroundBarColors.length); 70070 var g = this.barCtx.barOptions.colors.backgroundBarColors[t], p = c.drawRect(a !== void 0 ? a : 0, r !== void 0 ? r : 0, s !== void 0 ? s : h.globals.gridWidth, n !== void 0 ? n : h.globals.gridHeight, this.barCtx.barOptions.colors.backgroundBarRadius, g, this.barCtx.barOptions.colors.backgroundBarOpacity); 70071 o.add(p), p.node.classList.add("apexcharts-backgroundBar"); 70072 } 70073 } }, { key: "getColumnPaths", value: function(e) { 70074 var t, i = e.barWidth, a = e.barXPosition, s = e.y1, r = e.y2, n = e.strokeWidth, o = e.seriesGroup, h = e.realIndex, c = e.i, d = e.j, g = e.w, p = new M(this.barCtx.ctx); 70075 (n = Array.isArray(n) ? n[h] : n) || (n = 0); 70076 var f = i, b = a; 70077 (t = g.config.series[h].data[d]) !== null && t !== void 0 && t.columnWidthOffset && (b = a - g.config.series[h].data[d].columnWidthOffset / 2, f = i + g.config.series[h].data[d].columnWidthOffset); 70078 var m = b, w = b + f; 70079 s += 1e-3, r += 1e-3; 70080 var A = p.move(m, s), l = p.move(m, s), u = p.line(w - n, s); 70081 if (g.globals.previousPaths.length > 0 && (l = this.barCtx.getPreviousPath(h, d, !1)), A = A + p.line(m, r) + p.line(w - n, r) + p.line(w - n, s) + (g.config.plotOptions.bar.borderRadiusApplication === "around" ? " Z" : " z"), l = l + p.line(m, s) + u + u + u + u + u + p.line(m, s) + (g.config.plotOptions.bar.borderRadiusApplication === "around" ? " Z" : " z"), this.shouldApplyRadius(h) && (A = p.roundPathCorners(A, g.config.plotOptions.bar.borderRadius)), g.config.chart.stacked) { 70082 var x = this.barCtx; 70083 g.globals.hasSeriesGroups && o && (x = this.barCtx[o]), x.yArrj.push(r), x.yArrjF.push(Math.abs(s - r)), x.yArrjVal.push(this.barCtx.series[c][d]); 70084 } 70085 return { pathTo: A, pathFrom: l }; 70086 } }, { key: "getBarpaths", value: function(e) { 70087 var t, i = e.barYPosition, a = e.barHeight, s = e.x1, r = e.x2, n = e.strokeWidth, o = e.seriesGroup, h = e.realIndex, c = e.i, d = e.j, g = e.w, p = new M(this.barCtx.ctx); 70088 (n = Array.isArray(n) ? n[h] : n) || (n = 0); 70089 var f = i, b = a; 70090 (t = g.config.series[h].data[d]) !== null && t !== void 0 && t.barHeightOffset && (f = i - g.config.series[h].data[d].barHeightOffset / 2, b = a + g.config.series[h].data[d].barHeightOffset); 70091 var m = f, w = f + b; 70092 s += 1e-3, r += 1e-3; 70093 var A = p.move(s, m), l = p.move(s, m); 70094 g.globals.previousPaths.length > 0 && (l = this.barCtx.getPreviousPath(h, d, !1)); 70095 var u = p.line(s, w - n); 70096 if (A = A + p.line(r, m) + p.line(r, w - n) + u + (g.config.plotOptions.bar.borderRadiusApplication === "around" ? " Z" : " z"), l = l + p.line(s, m) + u + u + u + u + u + p.line(s, m) + (g.config.plotOptions.bar.borderRadiusApplication === "around" ? " Z" : " z"), this.shouldApplyRadius(h) && (A = p.roundPathCorners(A, g.config.plotOptions.bar.borderRadius)), g.config.chart.stacked) { 70097 var x = this.barCtx; 70098 g.globals.hasSeriesGroups && o && (x = this.barCtx[o]), x.xArrj.push(r), x.xArrjF.push(Math.abs(s - r)), x.xArrjVal.push(this.barCtx.series[c][d]); 70099 } 70100 return { pathTo: A, pathFrom: l }; 70101 } }, { key: "checkZeroSeries", value: function(e) { 70102 for (var t = e.series, i = this.w, a = 0; a < t.length; a++) { 70103 for (var s = 0, r = 0; r < t[i.globals.maxValsInArrayIndex].length; r++) 70104 s += t[a][r]; 70105 s === 0 && this.barCtx.zeroSerieses.push(a); 70106 } 70107 } }, { key: "getXForValue", value: function(e, t) { 70108 var i = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2] ? t : null; 70109 return e != null && (i = t + e / this.barCtx.invertedYRatio - 2 * (this.barCtx.isReversed ? e / this.barCtx.invertedYRatio : 0)), i; 70110 } }, { key: "getYForValue", value: function(e, t) { 70111 var i = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2] ? t : null; 70112 return e != null && (i = t - e / this.barCtx.yRatio[this.barCtx.yaxisIndex] + 2 * (this.barCtx.isReversed ? e / this.barCtx.yRatio[this.barCtx.yaxisIndex] : 0)), i; 70113 } }, { key: "getGoalValues", value: function(e, t, i, a, s) { 70114 var r = this, n = this.w, o = [], h = function(g, p) { 70115 var f; 70116 o.push((ee(f = {}, e, e === "x" ? r.getXForValue(g, t, !1) : r.getYForValue(g, i, !1)), ee(f, "attrs", p), f)); 70117 }; 70118 if (n.globals.seriesGoals[a] && n.globals.seriesGoals[a][s] && Array.isArray(n.globals.seriesGoals[a][s]) && n.globals.seriesGoals[a][s].forEach(function(g) { 70119 h(g.value, g); 70120 }), this.barCtx.barOptions.isDumbbell && n.globals.seriesRange.length) { 70121 var c = this.barCtx.barOptions.dumbbellColors ? this.barCtx.barOptions.dumbbellColors : n.globals.colors, d = { strokeHeight: e === "x" ? 0 : n.globals.markers.size[a], strokeWidth: e === "x" ? n.globals.markers.size[a] : 0, strokeDashArray: 0, strokeLineCap: "round", strokeColor: Array.isArray(c[a]) ? c[a][0] : c[a] }; 70122 h(n.globals.seriesRangeStart[a][s], d), h(n.globals.seriesRangeEnd[a][s], X(X({}, d), {}, { strokeColor: Array.isArray(c[a]) ? c[a][1] : c[a] })); 70123 } 70124 return o; 70125 } }, { key: "drawGoalLine", value: function(e) { 70126 var t = e.barXPosition, i = e.barYPosition, a = e.goalX, s = e.goalY, r = e.barWidth, n = e.barHeight, o = new M(this.barCtx.ctx), h = o.group({ className: "apexcharts-bar-goals-groups" }); 70127 h.node.classList.add("apexcharts-element-hidden"), this.barCtx.w.globals.delayedElements.push({ el: h.node }), h.attr("clip-path", "url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid, ")")); 70128 var c = null; 70129 return this.barCtx.isHorizontal ? Array.isArray(a) && a.forEach(function(d) { 70130 var g = d.attrs.strokeHeight !== void 0 ? d.attrs.strokeHeight : n / 2, p = i + g + n / 2; 70131 c = o.drawLine(d.x, p - 2 * g, d.x, p, d.attrs.strokeColor ? d.attrs.strokeColor : void 0, d.attrs.strokeDashArray, d.attrs.strokeWidth ? d.attrs.strokeWidth : 2, d.attrs.strokeLineCap), h.add(c); 70132 }) : Array.isArray(s) && s.forEach(function(d) { 70133 var g = d.attrs.strokeWidth !== void 0 ? d.attrs.strokeWidth : r / 2, p = t + g + r / 2; 70134 c = o.drawLine(p - 2 * g, d.y, p, d.y, d.attrs.strokeColor ? d.attrs.strokeColor : void 0, d.attrs.strokeDashArray, d.attrs.strokeHeight ? d.attrs.strokeHeight : 2, d.attrs.strokeLineCap), h.add(c); 70135 }), h; 70136 } }, { key: "drawBarShadow", value: function(e) { 70137 var t = e.prevPaths, i = e.currPaths, a = e.color, s = this.w, r = t.x, n = t.x1, o = t.barYPosition, h = i.x, c = i.x1, d = i.barYPosition, g = o + i.barHeight, p = new M(this.barCtx.ctx), f = new P(), b = p.move(n, g) + p.line(r, g) + p.line(h, d) + p.line(c, d) + p.line(n, g) + (s.config.plotOptions.bar.borderRadiusApplication === "around" ? " Z" : " z"); 70138 return p.drawPath({ d: b, fill: f.shadeColor(0.5, P.rgb2hex(a)), stroke: "none", strokeWidth: 0, fillOpacity: 1, classes: "apexcharts-bar-shadows" }); 70139 } }, { key: "getZeroValueEncounters", value: function(e) { 70140 var t = e.i, i = e.j, a = this.w, s = 0, r = 0; 70141 return a.globals.seriesPercent.forEach(function(n, o) { 70142 n[i] && s++, o < t && n[i] === 0 && r++; 70143 }), { nonZeroColumns: s, zeroEncounters: r }; 70144 } }]), y; 70145 }(), ke = function() { 70146 function y(e, t) { 70147 F(this, y), this.ctx = e, this.w = e.w; 70148 var i = this.w; 70149 this.barOptions = i.config.plotOptions.bar, this.isHorizontal = this.barOptions.horizontal, this.strokeWidth = i.config.stroke.width, this.isNullValue = !1, this.isRangeBar = i.globals.seriesRange.length && this.isHorizontal, this.isVerticalGroupedRangeBar = !i.globals.isBarHorizontal && i.globals.seriesRange.length && i.config.plotOptions.bar.rangeBarGroupRows, this.isFunnel = this.barOptions.isFunnel, this.xyRatios = t, this.xyRatios !== null && (this.xRatio = t.xRatio, this.yRatio = t.yRatio, this.invertedXRatio = t.invertedXRatio, this.invertedYRatio = t.invertedYRatio, this.baseLineY = t.baseLineY, this.baseLineInvertedY = t.baseLineInvertedY), this.yaxisIndex = 0, this.seriesLen = 0, this.pathArr = []; 70150 var a = new te(this.ctx); 70151 this.lastActiveBarSerieIndex = a.getActiveConfigSeriesIndex("desc", ["bar", "column"]); 70152 var s = a.getBarSeriesIndices(), r = new q(this.ctx); 70153 this.stackedSeriesTotals = r.getStackedSeriesTotals(this.w.config.series.map(function(n, o) { 70154 return s.indexOf(o) === -1 ? o : -1; 70155 }).filter(function(n) { 70156 return n !== -1; 70157 })), this.barHelpers = new Et(this); 70158 } 70159 return Y(y, [{ key: "draw", value: function(e, t) { 70160 var i = this.w, a = new M(this.ctx), s = new q(this.ctx, i); 70161 e = s.getLogSeries(e), this.series = e, this.yRatio = s.getLogYRatios(this.yRatio), this.barHelpers.initVariables(e); 70162 var r = a.group({ class: "apexcharts-bar-series apexcharts-plot-series" }); 70163 i.config.dataLabels.enabled && this.totalItems > this.barOptions.dataLabels.maxItems && console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts"); 70164 for (var n = 0, o = 0; n < e.length; n++, o++) { 70165 var h, c, d, g, p = void 0, f = void 0, b = [], m = [], w = i.globals.comboCharts ? t[n] : n, A = a.group({ class: "apexcharts-series", rel: n + 1, seriesName: P.escapeString(i.globals.seriesNames[w]), "data:realIndex": w }); 70166 this.ctx.series.addCollapsedClassToSeries(A, w), e[n].length > 0 && (this.visibleI = this.visibleI + 1); 70167 var l = 0, u = 0; 70168 this.yRatio.length > 1 && (this.yaxisIndex = w), this.isReversed = i.config.yaxis[this.yaxisIndex] && i.config.yaxis[this.yaxisIndex].reversed; 70169 var x = this.barHelpers.initialPositions(); 70170 f = x.y, l = x.barHeight, c = x.yDivision, g = x.zeroW, p = x.x, u = x.barWidth, h = x.xDivision, d = x.zeroH, this.horizontal || m.push(p + u / 2); 70171 var v = a.group({ class: "apexcharts-datalabels", "data:realIndex": w }); 70172 i.globals.delayedElements.push({ el: v.node }), v.node.classList.add("apexcharts-element-hidden"); 70173 var k = a.group({ class: "apexcharts-bar-goals-markers" }), S = a.group({ class: "apexcharts-bar-shadows" }); 70174 i.globals.delayedElements.push({ el: S.node }), S.node.classList.add("apexcharts-element-hidden"); 70175 for (var C = 0; C < i.globals.dataPoints; C++) { 70176 var L = this.barHelpers.getStrokeWidth(n, C, w), I = null, z = { indexes: { i: n, j: C, realIndex: w, bc: o }, x: p, y: f, strokeWidth: L, elSeries: A }; 70177 this.isHorizontal ? (I = this.drawBarPaths(X(X({}, z), {}, { barHeight: l, zeroW: g, yDivision: c })), u = this.series[n][C] / this.invertedYRatio) : (I = this.drawColumnPaths(X(X({}, z), {}, { xDivision: h, barWidth: u, zeroH: d })), l = this.series[n][C] / this.yRatio[this.yaxisIndex]); 70178 var T = this.barHelpers.getPathFillColor(e, n, C, w); 70179 if (this.isFunnel && this.barOptions.isFunnel3d && this.pathArr.length && C > 0) { 70180 var E = this.barHelpers.drawBarShadow({ color: typeof T == "string" && (T == null ? void 0 : T.indexOf("url")) === -1 ? T : P.hexToRgba(i.globals.colors[n]), prevPaths: this.pathArr[this.pathArr.length - 1], currPaths: I }); 70181 E && S.add(E); 70182 } 70183 this.pathArr.push(I); 70184 var R = this.barHelpers.drawGoalLine({ barXPosition: I.barXPosition, barYPosition: I.barYPosition, goalX: I.goalX, goalY: I.goalY, barHeight: l, barWidth: u }); 70185 R && k.add(R), f = I.y, p = I.x, C > 0 && m.push(p + u / 2), b.push(f), this.renderSeries({ realIndex: w, pathFill: T, j: C, i: n, pathFrom: I.pathFrom, pathTo: I.pathTo, strokeWidth: L, elSeries: A, x: p, y: f, series: e, barHeight: I.barHeight ? I.barHeight : l, barWidth: I.barWidth ? I.barWidth : u, elDataLabelsWrap: v, elGoalsMarkers: k, elBarShadows: S, visibleSeries: this.visibleI, type: "bar" }); 70186 } 70187 i.globals.seriesXvalues[w] = m, i.globals.seriesYvalues[w] = b, r.add(A); 70188 } 70189 return r; 70190 } }, { key: "renderSeries", value: function(e) { 70191 var t = e.realIndex, i = e.pathFill, a = e.lineFill, s = e.j, r = e.i, n = e.groupIndex, o = e.pathFrom, h = e.pathTo, c = e.strokeWidth, d = e.elSeries, g = e.x, p = e.y, f = e.y1, b = e.y2, m = e.series, w = e.barHeight, A = e.barWidth, l = e.barXPosition, u = e.barYPosition, x = e.elDataLabelsWrap, v = e.elGoalsMarkers, k = e.elBarShadows, S = e.visibleSeries, C = e.type, L = this.w, I = new M(this.ctx); 70192 a || (a = this.barOptions.distributed ? L.globals.stroke.colors[s] : L.globals.stroke.colors[t]), L.config.series[r].data[s] && L.config.series[r].data[s].strokeColor && (a = L.config.series[r].data[s].strokeColor), this.isNullValue && (i = "none"); 70193 var z = s / L.config.chart.animations.animateGradually.delay * (L.config.chart.animations.speed / L.globals.dataPoints) / 2.4, T = I.renderPaths({ i: r, j: s, realIndex: t, pathFrom: o, pathTo: h, stroke: a, strokeWidth: c, strokeLineCap: L.config.stroke.lineCap, fill: i, animationDelay: z, initialSpeed: L.config.chart.animations.speed, dataChangeSpeed: L.config.chart.animations.dynamicAnimation.speed, className: "apexcharts-".concat(C, "-area") }); 70194 T.attr("clip-path", "url(#gridRectMask".concat(L.globals.cuid, ")")); 70195 var E = L.config.forecastDataPoints; 70196 E.count > 0 && s >= L.globals.dataPoints - E.count && (T.node.setAttribute("stroke-dasharray", E.dashArray), T.node.setAttribute("stroke-width", E.strokeWidth), T.node.setAttribute("fill-opacity", E.fillOpacity)), f !== void 0 && b !== void 0 && (T.attr("data-range-y1", f), T.attr("data-range-y2", b)), new Z(this.ctx).setSelectionFilter(T, t, s), d.add(T); 70197 var R = new Xt(this).handleBarDataLabels({ x: g, y: p, y1: f, y2: b, i: r, j: s, series: m, realIndex: t, groupIndex: n, barHeight: w, barWidth: A, barXPosition: l, barYPosition: u, renderedPath: T, visibleSeries: S }); 70198 return R.dataLabels !== null && x.add(R.dataLabels), R.totalDataLabels && x.add(R.totalDataLabels), d.add(x), v && d.add(v), k && d.add(k), d; 70199 } }, { key: "drawBarPaths", value: function(e) { 70200 var t, i = e.indexes, a = e.barHeight, s = e.strokeWidth, r = e.zeroW, n = e.x, o = e.y, h = e.yDivision, c = e.elSeries, d = this.w, g = i.i, p = i.j; 70201 if (d.globals.isXNumeric) 70202 t = (o = (d.globals.seriesX[g][p] - d.globals.minX) / this.invertedXRatio - a) + a * this.visibleI; 70203 else if (d.config.plotOptions.bar.hideZeroBarsWhenGrouped) { 70204 var f = 0, b = 0; 70205 d.globals.seriesPercent.forEach(function(w, A) { 70206 w[p] && f++, A < g && w[p] === 0 && b++; 70207 }), f > 0 && (a = this.seriesLen * a / f), t = o + a * this.visibleI, t -= a * b; 70208 } else 70209 t = o + a * this.visibleI; 70210 this.isFunnel && (r -= (this.barHelpers.getXForValue(this.series[g][p], r) - r) / 2), n = this.barHelpers.getXForValue(this.series[g][p], r); 70211 var m = this.barHelpers.getBarpaths({ barYPosition: t, barHeight: a, x1: r, x2: n, strokeWidth: s, series: this.series, realIndex: i.realIndex, i: g, j: p, w: d }); 70212 return d.globals.isXNumeric || (o += h), this.barHelpers.barBackground({ j: p, i: g, y1: t - a * this.visibleI, y2: a * this.seriesLen, elSeries: c }), { pathTo: m.pathTo, pathFrom: m.pathFrom, x1: r, x: n, y: o, goalX: this.barHelpers.getGoalValues("x", r, null, g, p), barYPosition: t, barHeight: a }; 70213 } }, { key: "drawColumnPaths", value: function(e) { 70214 var t, i = e.indexes, a = e.x, s = e.y, r = e.xDivision, n = e.barWidth, o = e.zeroH, h = e.strokeWidth, c = e.elSeries, d = this.w, g = i.realIndex, p = i.i, f = i.j, b = i.bc; 70215 if (d.globals.isXNumeric) { 70216 var m = this.getBarXForNumericXAxis({ x: a, j: f, realIndex: g, barWidth: n }); 70217 a = m.x, t = m.barXPosition; 70218 } else if (d.config.plotOptions.bar.hideZeroBarsWhenGrouped) { 70219 var w = this.barHelpers.getZeroValueEncounters({ i: p, j: f }), A = w.nonZeroColumns, l = w.zeroEncounters; 70220 A > 0 && (n = this.seriesLen * n / A), t = a + n * this.visibleI, t -= n * l; 70221 } else 70222 t = a + n * this.visibleI; 70223 s = this.barHelpers.getYForValue(this.series[p][f], o); 70224 var u = this.barHelpers.getColumnPaths({ barXPosition: t, barWidth: n, y1: o, y2: s, strokeWidth: h, series: this.series, realIndex: i.realIndex, i: p, j: f, w: d }); 70225 return d.globals.isXNumeric || (a += r), this.barHelpers.barBackground({ bc: b, j: f, i: p, x1: t - h / 2 - n * this.visibleI, x2: n * this.seriesLen + h / 2, elSeries: c }), { pathTo: u.pathTo, pathFrom: u.pathFrom, x: a, y: s, goalY: this.barHelpers.getGoalValues("y", null, o, p, f), barXPosition: t, barWidth: n }; 70226 } }, { key: "getBarXForNumericXAxis", value: function(e) { 70227 var t = e.x, i = e.barWidth, a = e.realIndex, s = e.j, r = this.w, n = a; 70228 return r.globals.seriesX[a].length || (n = r.globals.maxValsInArrayIndex), r.globals.seriesX[n][s] && (t = (r.globals.seriesX[n][s] - r.globals.minX) / this.xRatio - i * this.seriesLen / 2), { barXPosition: t + i * this.visibleI, x: t }; 70229 } }, { key: "getPreviousPath", value: function(e, t) { 70230 for (var i, a = this.w, s = 0; s < a.globals.previousPaths.length; s++) { 70231 var r = a.globals.previousPaths[s]; 70232 r.paths && r.paths.length > 0 && parseInt(r.realIndex, 10) === parseInt(e, 10) && a.globals.previousPaths[s].paths[t] !== void 0 && (i = a.globals.previousPaths[s].paths[t].d); 70233 } 70234 return i; 70235 } }]), y; 70236 }(), st = function(y) { 70237 ge(t, ke); 70238 var e = ue(t); 70239 function t() { 70240 return F(this, t), e.apply(this, arguments); 70241 } 70242 return Y(t, [{ key: "draw", value: function(i, a) { 70243 var s = this, r = this.w; 70244 this.graphics = new M(this.ctx), this.bar = new ke(this.ctx, this.xyRatios); 70245 var n = new q(this.ctx, r); 70246 i = n.getLogSeries(i), this.yRatio = n.getLogYRatios(this.yRatio), this.barHelpers.initVariables(i), r.config.chart.stackType === "100%" && (i = r.globals.seriesPercent.slice()), this.series = i, this.barHelpers.initializeStackedPrevVars(this); 70247 for (var o = this.graphics.group({ class: "apexcharts-bar-series apexcharts-plot-series" }), h = 0, c = 0, d = function(f, b) { 70248 var m = void 0, w = void 0, A = void 0, l = void 0, u = -1; 70249 s.groupCtx = s, r.globals.seriesGroups.forEach(function(V, j) { 70250 V.indexOf(r.config.series[f].name) > -1 && (u = j); 70251 }), u !== -1 && (s.groupCtx = s[r.globals.seriesGroups[u]]); 70252 var x = [], v = [], k = r.globals.comboCharts ? a[f] : f; 70253 s.yRatio.length > 1 && (s.yaxisIndex = k), s.isReversed = r.config.yaxis[s.yaxisIndex] && r.config.yaxis[s.yaxisIndex].reversed; 70254 var S = s.graphics.group({ class: "apexcharts-series", seriesName: P.escapeString(r.globals.seriesNames[k]), rel: f + 1, "data:realIndex": k }); 70255 s.ctx.series.addCollapsedClassToSeries(S, k); 70256 var C = s.graphics.group({ class: "apexcharts-datalabels", "data:realIndex": k }), L = s.graphics.group({ class: "apexcharts-bar-goals-markers" }), I = 0, z = 0, T = s.initialPositions(h, c, m, w, A, l); 70257 c = T.y, I = T.barHeight, w = T.yDivision, l = T.zeroW, h = T.x, z = T.barWidth, m = T.xDivision, A = T.zeroH, r.globals.barHeight = I, r.globals.barWidth = z, s.barHelpers.initializeStackedXYVars(s), s.groupCtx.prevY.length === 1 && s.groupCtx.prevY[0].every(function(V) { 70258 return isNaN(V); 70259 }) && (s.groupCtx.prevY[0] = s.groupCtx.prevY[0].map(function(V) { 70260 return A; 70261 }), s.groupCtx.prevYF[0] = s.groupCtx.prevYF[0].map(function(V) { 70262 return 0; 70263 })); 70264 for (var E = 0; E < r.globals.dataPoints; E++) { 70265 var R = s.barHelpers.getStrokeWidth(f, E, k), O = { indexes: { i: f, j: E, realIndex: k, bc: b }, strokeWidth: R, x: h, y: c, elSeries: S, groupIndex: u, seriesGroup: r.globals.seriesGroups[u] }, D = null; 70266 s.isHorizontal ? (D = s.drawStackedBarPaths(X(X({}, O), {}, { zeroW: l, barHeight: I, yDivision: w })), z = s.series[f][E] / s.invertedYRatio) : (D = s.drawStackedColumnPaths(X(X({}, O), {}, { xDivision: m, barWidth: z, zeroH: A })), I = s.series[f][E] / s.yRatio[s.yaxisIndex]); 70267 var W = s.barHelpers.drawGoalLine({ barXPosition: D.barXPosition, barYPosition: D.barYPosition, goalX: D.goalX, goalY: D.goalY, barHeight: I, barWidth: z }); 70268 W && L.add(W), c = D.y, h = D.x, x.push(h), v.push(c); 70269 var N = s.barHelpers.getPathFillColor(i, f, E, k); 70270 S = s.renderSeries({ realIndex: k, pathFill: N, j: E, i: f, groupIndex: u, pathFrom: D.pathFrom, pathTo: D.pathTo, strokeWidth: R, elSeries: S, x: h, y: c, series: i, barHeight: I, barWidth: z, elDataLabelsWrap: C, elGoalsMarkers: L, type: "bar", visibleSeries: 0 }); 70271 } 70272 r.globals.seriesXvalues[k] = x, r.globals.seriesYvalues[k] = v, s.groupCtx.prevY.push(s.groupCtx.yArrj), s.groupCtx.prevYF.push(s.groupCtx.yArrjF), s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal), s.groupCtx.prevX.push(s.groupCtx.xArrj), s.groupCtx.prevXF.push(s.groupCtx.xArrjF), s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal), o.add(S); 70273 }, g = 0, p = 0; g < i.length; g++, p++) 70274 d(g, p); 70275 return o; 70276 } }, { key: "initialPositions", value: function(i, a, s, r, n, o) { 70277 var h, c, d, g, p = this.w; 70278 return this.isHorizontal ? (d = (d = r = p.globals.gridHeight / p.globals.dataPoints) * parseInt(p.config.plotOptions.bar.barHeight, 10) / 100, String(p.config.plotOptions.bar.barHeight).indexOf("%") === -1 && (d = parseInt(p.config.plotOptions.bar.barHeight, 10)), o = this.baseLineInvertedY + p.globals.padHorizontal + (this.isReversed ? p.globals.gridWidth : 0) - (this.isReversed ? 2 * this.baseLineInvertedY : 0), a = (r - d) / 2) : (g = s = p.globals.gridWidth / p.globals.dataPoints, g = p.globals.isXNumeric && p.globals.dataPoints > 1 ? (s = p.globals.minXDiff / this.xRatio) * parseInt(this.barOptions.columnWidth, 10) / 100 : g * parseInt(p.config.plotOptions.bar.columnWidth, 10) / 100, String(p.config.plotOptions.bar.columnWidth).indexOf("%") === -1 && (g = parseInt(p.config.plotOptions.bar.columnWidth, 10)), n = p.globals.gridHeight - this.baseLineY[this.yaxisIndex] - (this.isReversed ? p.globals.gridHeight : 0) + (this.isReversed ? 2 * this.baseLineY[this.yaxisIndex] : 0), i = p.globals.padHorizontal + (s - g) / 2), { x: i, y: a, yDivision: r, xDivision: s, barHeight: (h = p.globals.seriesGroups) !== null && h !== void 0 && h.length ? d / p.globals.seriesGroups.length : d, barWidth: (c = p.globals.seriesGroups) !== null && c !== void 0 && c.length ? g / p.globals.seriesGroups.length : g, zeroH: n, zeroW: o }; 70279 } }, { key: "drawStackedBarPaths", value: function(i) { 70280 for (var a, s = i.indexes, r = i.barHeight, n = i.strokeWidth, o = i.zeroW, h = i.x, c = i.y, d = i.groupIndex, g = i.seriesGroup, p = i.yDivision, f = i.elSeries, b = this.w, m = c + (d !== -1 ? d * r : 0), w = s.i, A = s.j, l = 0, u = 0; u < this.groupCtx.prevXF.length; u++) 70281 l += this.groupCtx.prevXF[u][A]; 70282 var x = w; 70283 if (g && (x = g.indexOf(b.config.series[w].name)), x > 0) { 70284 var v = o; 70285 this.groupCtx.prevXVal[x - 1][A] < 0 ? v = this.series[w][A] >= 0 ? this.groupCtx.prevX[x - 1][A] + l - 2 * (this.isReversed ? l : 0) : this.groupCtx.prevX[x - 1][A] : this.groupCtx.prevXVal[x - 1][A] >= 0 && (v = this.series[w][A] >= 0 ? this.groupCtx.prevX[x - 1][A] : this.groupCtx.prevX[x - 1][A] - l + 2 * (this.isReversed ? l : 0)), a = v; 70286 } else 70287 a = o; 70288 h = this.series[w][A] === null ? a : a + this.series[w][A] / this.invertedYRatio - 2 * (this.isReversed ? this.series[w][A] / this.invertedYRatio : 0); 70289 var k = this.barHelpers.getBarpaths({ barYPosition: m, barHeight: r, x1: a, x2: h, strokeWidth: n, series: this.series, realIndex: s.realIndex, seriesGroup: g, i: w, j: A, w: b }); 70290 return this.barHelpers.barBackground({ j: A, i: w, y1: m, y2: r, elSeries: f }), c += p, { pathTo: k.pathTo, pathFrom: k.pathFrom, goalX: this.barHelpers.getGoalValues("x", o, null, w, A), barYPosition: m, x: h, y: c }; 70291 } }, { key: "drawStackedColumnPaths", value: function(i) { 70292 var a = i.indexes, s = i.x, r = i.y, n = i.xDivision, o = i.barWidth, h = i.zeroH, c = i.groupIndex, d = i.seriesGroup, g = i.elSeries, p = this.w, f = a.i, b = a.j, m = a.bc; 70293 if (p.globals.isXNumeric) { 70294 var w = p.globals.seriesX[f][b]; 70295 w || (w = 0), s = (w - p.globals.minX) / this.xRatio - o / 2, p.globals.seriesGroups.length && (s = (w - p.globals.minX) / this.xRatio - o / 2 * p.globals.seriesGroups.length); 70296 } 70297 for (var A, l = s + (c !== -1 ? c * o : 0), u = 0, x = 0; x < this.groupCtx.prevYF.length; x++) 70298 u += isNaN(this.groupCtx.prevYF[x][b]) ? 0 : this.groupCtx.prevYF[x][b]; 70299 var v = f; 70300 if (d && (v = d.indexOf(p.config.series[f].name)), v > 0 && !p.globals.isXNumeric || v > 0 && p.globals.isXNumeric && p.globals.seriesX[f - 1][b] === p.globals.seriesX[f][b]) { 70301 var k, S, C, L = Math.min(this.yRatio.length + 1, f + 1); 70302 if (this.groupCtx.prevY[v - 1] !== void 0 && this.groupCtx.prevY[v - 1].length) 70303 for (var I = 1; I < L; I++) { 70304 var z; 70305 if (!isNaN((z = this.groupCtx.prevY[v - I]) === null || z === void 0 ? void 0 : z[b])) { 70306 C = this.groupCtx.prevY[v - I][b]; 70307 break; 70308 } 70309 } 70310 for (var T = 1; T < L; T++) { 70311 var E, R; 70312 if (((E = this.groupCtx.prevYVal[v - T]) === null || E === void 0 ? void 0 : E[b]) < 0) { 70313 S = this.series[f][b] >= 0 ? C - u + 2 * (this.isReversed ? u : 0) : C; 70314 break; 70315 } 70316 if (((R = this.groupCtx.prevYVal[v - T]) === null || R === void 0 ? void 0 : R[b]) >= 0) { 70317 S = this.series[f][b] >= 0 ? C : C + u - 2 * (this.isReversed ? u : 0); 70318 break; 70319 } 70320 } 70321 S === void 0 && (S = p.globals.gridHeight), A = (k = this.groupCtx.prevYF[0]) !== null && k !== void 0 && k.every(function(D) { 70322 return D === 0; 70323 }) && this.groupCtx.prevYF.slice(1, v).every(function(D) { 70324 return D.every(function(W) { 70325 return isNaN(W); 70326 }); 70327 }) ? h : S; 70328 } else 70329 A = h; 70330 r = this.series[f][b] ? A - this.series[f][b] / this.yRatio[this.yaxisIndex] + 2 * (this.isReversed ? this.series[f][b] / this.yRatio[this.yaxisIndex] : 0) : A; 70331 var O = this.barHelpers.getColumnPaths({ barXPosition: l, barWidth: o, y1: A, y2: r, yRatio: this.yRatio[this.yaxisIndex], strokeWidth: this.strokeWidth, series: this.series, seriesGroup: d, realIndex: a.realIndex, i: f, j: b, w: p }); 70332 return this.barHelpers.barBackground({ bc: m, j: b, i: f, x1: l, x2: o, elSeries: g }), s += n, { pathTo: O.pathTo, pathFrom: O.pathFrom, goalY: this.barHelpers.getGoalValues("y", null, h, f, b), barXPosition: l, x: p.globals.isXNumeric ? s - n : s, y: r }; 70333 } }]), t; 70334 }(), Be = function(y) { 70335 ge(t, ke); 70336 var e = ue(t); 70337 function t() { 70338 return F(this, t), e.apply(this, arguments); 70339 } 70340 return Y(t, [{ key: "draw", value: function(i, a, s) { 70341 var r = this, n = this.w, o = new M(this.ctx), h = n.globals.comboCharts ? a : n.config.chart.type, c = new ae(this.ctx); 70342 this.candlestickOptions = this.w.config.plotOptions.candlestick, this.boxOptions = this.w.config.plotOptions.boxPlot, this.isHorizontal = n.config.plotOptions.bar.horizontal; 70343 var d = new q(this.ctx, n); 70344 i = d.getLogSeries(i), this.series = i, this.yRatio = d.getLogYRatios(this.yRatio), this.barHelpers.initVariables(i); 70345 for (var g = o.group({ class: "apexcharts-".concat(h, "-series apexcharts-plot-series") }), p = function(b) { 70346 r.isBoxPlot = n.config.chart.type === "boxPlot" || n.config.series[b].type === "boxPlot"; 70347 var m, w, A, l, u = void 0, x = void 0, v = [], k = [], S = n.globals.comboCharts ? s[b] : b, C = o.group({ class: "apexcharts-series", seriesName: P.escapeString(n.globals.seriesNames[S]), rel: b + 1, "data:realIndex": S }); 70348 r.ctx.series.addCollapsedClassToSeries(C, S), i[b].length > 0 && (r.visibleI = r.visibleI + 1); 70349 var L, I; 70350 r.yRatio.length > 1 && (r.yaxisIndex = S); 70351 var z = r.barHelpers.initialPositions(); 70352 x = z.y, L = z.barHeight, w = z.yDivision, l = z.zeroW, u = z.x, I = z.barWidth, m = z.xDivision, A = z.zeroH, k.push(u + I / 2); 70353 for (var T = o.group({ class: "apexcharts-datalabels", "data:realIndex": S }), E = function(O) { 70354 var D = r.barHelpers.getStrokeWidth(b, O, S), W = null, N = { indexes: { i: b, j: O, realIndex: S }, x: u, y: x, strokeWidth: D, elSeries: C }; 70355 W = r.isHorizontal ? r.drawHorizontalBoxPaths(X(X({}, N), {}, { yDivision: w, barHeight: L, zeroW: l })) : r.drawVerticalBoxPaths(X(X({}, N), {}, { xDivision: m, barWidth: I, zeroH: A })), x = W.y, u = W.x, O > 0 && k.push(u + I / 2), v.push(x), W.pathTo.forEach(function(V, j) { 70356 var se = !r.isBoxPlot && r.candlestickOptions.wick.useFillColor ? W.color[j] : n.globals.stroke.colors[b], K = c.fillPath({ seriesNumber: S, dataPointIndex: O, color: W.color[j], value: i[b][O] }); 70357 r.renderSeries({ realIndex: S, pathFill: K, lineFill: se, j: O, i: b, pathFrom: W.pathFrom, pathTo: V, strokeWidth: D, elSeries: C, x: u, y: x, series: i, barHeight: L, barWidth: I, elDataLabelsWrap: T, visibleSeries: r.visibleI, type: n.config.chart.type }); 70358 }); 70359 }, R = 0; R < n.globals.dataPoints; R++) 70360 E(R); 70361 n.globals.seriesXvalues[S] = k, n.globals.seriesYvalues[S] = v, g.add(C); 70362 }, f = 0; f < i.length; f++) 70363 p(f); 70364 return g; 70365 } }, { key: "drawVerticalBoxPaths", value: function(i) { 70366 var a = i.indexes, s = i.x; 70367 i.y; 70368 var r = i.xDivision, n = i.barWidth, o = i.zeroH, h = i.strokeWidth, c = this.w, d = new M(this.ctx), g = a.i, p = a.j, f = !0, b = c.config.plotOptions.candlestick.colors.upward, m = c.config.plotOptions.candlestick.colors.downward, w = ""; 70369 this.isBoxPlot && (w = [this.boxOptions.colors.lower, this.boxOptions.colors.upper]); 70370 var A = this.yRatio[this.yaxisIndex], l = a.realIndex, u = this.getOHLCValue(l, p), x = o, v = o; 70371 u.o > u.c && (f = !1); 70372 var k = Math.min(u.o, u.c), S = Math.max(u.o, u.c), C = u.m; 70373 c.globals.isXNumeric && (s = (c.globals.seriesX[l][p] - c.globals.minX) / this.xRatio - n / 2); 70374 var L = s + n * this.visibleI; 70375 this.series[g][p] === void 0 || this.series[g][p] === null ? (k = o, S = o) : (k = o - k / A, S = o - S / A, x = o - u.h / A, v = o - u.l / A, C = o - u.m / A); 70376 var I = d.move(L, o), z = d.move(L + n / 2, k); 70377 return c.globals.previousPaths.length > 0 && (z = this.getPreviousPath(l, p, !0)), I = this.isBoxPlot ? [d.move(L, k) + d.line(L + n / 2, k) + d.line(L + n / 2, x) + d.line(L + n / 4, x) + d.line(L + n - n / 4, x) + d.line(L + n / 2, x) + d.line(L + n / 2, k) + d.line(L + n, k) + d.line(L + n, C) + d.line(L, C) + d.line(L, k + h / 2), d.move(L, C) + d.line(L + n, C) + d.line(L + n, S) + d.line(L + n / 2, S) + d.line(L + n / 2, v) + d.line(L + n - n / 4, v) + d.line(L + n / 4, v) + d.line(L + n / 2, v) + d.line(L + n / 2, S) + d.line(L, S) + d.line(L, C) + "z"] : [d.move(L, S) + d.line(L + n / 2, S) + d.line(L + n / 2, x) + d.line(L + n / 2, S) + d.line(L + n, S) + d.line(L + n, k) + d.line(L + n / 2, k) + d.line(L + n / 2, v) + d.line(L + n / 2, k) + d.line(L, k) + d.line(L, S - h / 2)], z += d.move(L, k), c.globals.isXNumeric || (s += r), { pathTo: I, pathFrom: z, x: s, y: S, barXPosition: L, color: this.isBoxPlot ? w : f ? [b] : [m] }; 70378 } }, { key: "drawHorizontalBoxPaths", value: function(i) { 70379 var a = i.indexes; 70380 i.x; 70381 var s = i.y, r = i.yDivision, n = i.barHeight, o = i.zeroW, h = i.strokeWidth, c = this.w, d = new M(this.ctx), g = a.i, p = a.j, f = this.boxOptions.colors.lower; 70382 this.isBoxPlot && (f = [this.boxOptions.colors.lower, this.boxOptions.colors.upper]); 70383 var b = this.invertedYRatio, m = a.realIndex, w = this.getOHLCValue(m, p), A = o, l = o, u = Math.min(w.o, w.c), x = Math.max(w.o, w.c), v = w.m; 70384 c.globals.isXNumeric && (s = (c.globals.seriesX[m][p] - c.globals.minX) / this.invertedXRatio - n / 2); 70385 var k = s + n * this.visibleI; 70386 this.series[g][p] === void 0 || this.series[g][p] === null ? (u = o, x = o) : (u = o + u / b, x = o + x / b, A = o + w.h / b, l = o + w.l / b, v = o + w.m / b); 70387 var S = d.move(o, k), C = d.move(u, k + n / 2); 70388 return c.globals.previousPaths.length > 0 && (C = this.getPreviousPath(m, p, !0)), S = [d.move(u, k) + d.line(u, k + n / 2) + d.line(A, k + n / 2) + d.line(A, k + n / 2 - n / 4) + d.line(A, k + n / 2 + n / 4) + d.line(A, k + n / 2) + d.line(u, k + n / 2) + d.line(u, k + n) + d.line(v, k + n) + d.line(v, k) + d.line(u + h / 2, k), d.move(v, k) + d.line(v, k + n) + d.line(x, k + n) + d.line(x, k + n / 2) + d.line(l, k + n / 2) + d.line(l, k + n - n / 4) + d.line(l, k + n / 4) + d.line(l, k + n / 2) + d.line(x, k + n / 2) + d.line(x, k) + d.line(v, k) + "z"], C += d.move(u, k), c.globals.isXNumeric || (s += r), { pathTo: S, pathFrom: C, x, y: s, barYPosition: k, color: f }; 70389 } }, { key: "getOHLCValue", value: function(i, a) { 70390 var s = this.w; 70391 return { o: this.isBoxPlot ? s.globals.seriesCandleH[i][a] : s.globals.seriesCandleO[i][a], h: this.isBoxPlot ? s.globals.seriesCandleO[i][a] : s.globals.seriesCandleH[i][a], m: s.globals.seriesCandleM[i][a], l: this.isBoxPlot ? s.globals.seriesCandleC[i][a] : s.globals.seriesCandleL[i][a], c: this.isBoxPlot ? s.globals.seriesCandleL[i][a] : s.globals.seriesCandleC[i][a] }; 70392 } }]), t; 70393 }(), rt = function() { 70394 function y(e) { 70395 F(this, y), this.ctx = e, this.w = e.w; 70396 } 70397 return Y(y, [{ key: "checkColorRange", value: function() { 70398 var e = this.w, t = !1, i = e.config.plotOptions[e.config.chart.type]; 70399 return i.colorScale.ranges.length > 0 && i.colorScale.ranges.map(function(a, s) { 70400 a.from <= 0 && (t = !0); 70401 }), t; 70402 } }, { key: "getShadeColor", value: function(e, t, i, a) { 70403 var s = this.w, r = 1, n = s.config.plotOptions[e].shadeIntensity, o = this.determineColor(e, t, i); 70404 s.globals.hasNegs || a ? r = s.config.plotOptions[e].reverseNegativeShade ? o.percent < 0 ? o.percent / 100 * (1.25 * n) : (1 - o.percent / 100) * (1.25 * n) : o.percent <= 0 ? 1 - (1 + o.percent / 100) * n : (1 - o.percent / 100) * n : (r = 1 - o.percent / 100, e === "treemap" && (r = (1 - o.percent / 100) * (1.25 * n))); 70405 var h = o.color, c = new P(); 70406 return s.config.plotOptions[e].enableShades && (h = this.w.config.theme.mode === "dark" ? P.hexToRgba(c.shadeColor(-1 * r, o.color), s.config.fill.opacity) : P.hexToRgba(c.shadeColor(r, o.color), s.config.fill.opacity)), { color: h, colorProps: o }; 70407 } }, { key: "determineColor", value: function(e, t, i) { 70408 var a = this.w, s = a.globals.series[t][i], r = a.config.plotOptions[e], n = r.colorScale.inverse ? i : t; 70409 r.distributed && a.config.chart.type === "treemap" && (n = i); 70410 var o = a.globals.colors[n], h = null, c = Math.min.apply(Math, J(a.globals.series[t])), d = Math.max.apply(Math, J(a.globals.series[t])); 70411 r.distributed || e !== "heatmap" || (c = a.globals.minY, d = a.globals.maxY), r.colorScale.min !== void 0 && (c = r.colorScale.min < a.globals.minY ? r.colorScale.min : a.globals.minY, d = r.colorScale.max > a.globals.maxY ? r.colorScale.max : a.globals.maxY); 70412 var g = Math.abs(d) + Math.abs(c), p = 100 * s / (g === 0 ? g - 1e-6 : g); 70413 return r.colorScale.ranges.length > 0 && r.colorScale.ranges.map(function(f, b) { 70414 if (s >= f.from && s <= f.to) { 70415 o = f.color, h = f.foreColor ? f.foreColor : null, c = f.from, d = f.to; 70416 var m = Math.abs(d) + Math.abs(c); 70417 p = 100 * s / (m === 0 ? m - 1e-6 : m); 70418 } 70419 }), { color: o, foreColor: h, percent: p }; 70420 } }, { key: "calculateDataLabels", value: function(e) { 70421 var t = e.text, i = e.x, a = e.y, s = e.i, r = e.j, n = e.colorProps, o = e.fontSize, h = this.w.config.dataLabels, c = new M(this.ctx), d = new ye(this.ctx), g = null; 70422 if (h.enabled) { 70423 g = c.group({ class: "apexcharts-data-labels" }); 70424 var p = h.offsetX, f = h.offsetY, b = i + p, m = a + parseFloat(h.style.fontSize) / 3 + f; 70425 d.plotDataLabelsText({ x: b, y: m, text: t, i: s, j: r, color: n.foreColor, parent: g, fontSize: o, dataLabelsConfig: h }); 70426 } 70427 return g; 70428 } }, { key: "addListeners", value: function(e) { 70429 var t = new M(this.ctx); 70430 e.node.addEventListener("mouseenter", t.pathMouseEnter.bind(this, e)), e.node.addEventListener("mouseleave", t.pathMouseLeave.bind(this, e)), e.node.addEventListener("mousedown", t.pathMouseDown.bind(this, e)); 70431 } }]), y; 70432 }(), Yt = function() { 70433 function y(e, t) { 70434 F(this, y), this.ctx = e, this.w = e.w, this.xRatio = t.xRatio, this.yRatio = t.yRatio, this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation, this.helpers = new rt(e), this.rectRadius = this.w.config.plotOptions.heatmap.radius, this.strokeWidth = this.w.config.stroke.show ? this.w.config.stroke.width : 0; 70435 } 70436 return Y(y, [{ key: "draw", value: function(e) { 70437 var t = this.w, i = new M(this.ctx), a = i.group({ class: "apexcharts-heatmap" }); 70438 a.attr("clip-path", "url(#gridRectMask".concat(t.globals.cuid, ")")); 70439 var s = t.globals.gridWidth / t.globals.dataPoints, r = t.globals.gridHeight / t.globals.series.length, n = 0, o = !1; 70440 this.negRange = this.helpers.checkColorRange(); 70441 var h = e.slice(); 70442 t.config.yaxis[0].reversed && (o = !0, h.reverse()); 70443 for (var c = o ? 0 : h.length - 1; o ? c < h.length : c >= 0; o ? c++ : c--) { 70444 var d = i.group({ class: "apexcharts-series apexcharts-heatmap-series", seriesName: P.escapeString(t.globals.seriesNames[c]), rel: c + 1, "data:realIndex": c }); 70445 if (this.ctx.series.addCollapsedClassToSeries(d, c), t.config.chart.dropShadow.enabled) { 70446 var g = t.config.chart.dropShadow; 70447 new Z(this.ctx).dropShadow(d, g, c); 70448 } 70449 for (var p = 0, f = t.config.plotOptions.heatmap.shadeIntensity, b = 0; b < h[c].length; b++) { 70450 var m = this.helpers.getShadeColor(t.config.chart.type, c, b, this.negRange), w = m.color, A = m.colorProps; 70451 t.config.fill.type === "image" && (w = new ae(this.ctx).fillPath({ seriesNumber: c, dataPointIndex: b, opacity: t.globals.hasNegs ? A.percent < 0 ? 1 - (1 + A.percent / 100) : f + A.percent / 100 : A.percent / 100, patternID: P.randomId(), width: t.config.fill.image.width ? t.config.fill.image.width : s, height: t.config.fill.image.height ? t.config.fill.image.height : r })); 70452 var l = this.rectRadius, u = i.drawRect(p, n, s, r, l); 70453 if (u.attr({ cx: p, cy: n }), u.node.classList.add("apexcharts-heatmap-rect"), d.add(u), u.attr({ fill: w, i: c, index: c, j: b, val: e[c][b], "stroke-width": this.strokeWidth, stroke: t.config.plotOptions.heatmap.useFillColorAsStroke ? w : t.globals.stroke.colors[0], color: w }), this.helpers.addListeners(u), t.config.chart.animations.enabled && !t.globals.dataChanged) { 70454 var x = 1; 70455 t.globals.resized || (x = t.config.chart.animations.speed), this.animateHeatMap(u, p, n, s, r, x); 70456 } 70457 if (t.globals.dataChanged) { 70458 var v = 1; 70459 if (this.dynamicAnim.enabled && t.globals.shouldAnimate) { 70460 v = this.dynamicAnim.speed; 70461 var k = t.globals.previousPaths[c] && t.globals.previousPaths[c][b] && t.globals.previousPaths[c][b].color; 70462 k || (k = "rgba(255, 255, 255, 0)"), this.animateHeatColor(u, P.isColorHex(k) ? k : P.rgb2hex(k), P.isColorHex(w) ? w : P.rgb2hex(w), v); 70463 } 70464 } 70465 var S = (0, t.config.dataLabels.formatter)(t.globals.series[c][b], { value: t.globals.series[c][b], seriesIndex: c, dataPointIndex: b, w: t }), C = this.helpers.calculateDataLabels({ text: S, x: p + s / 2, y: n + r / 2, i: c, j: b, colorProps: A, series: h }); 70466 C !== null && d.add(C), p += s; 70467 } 70468 n += r, a.add(d); 70469 } 70470 var L = t.globals.yAxisScale[0].result.slice(); 70471 return t.config.yaxis[0].reversed ? L.unshift("") : L.push(""), t.globals.yAxisScale[0].result = L, a; 70472 } }, { key: "animateHeatMap", value: function(e, t, i, a, s, r) { 70473 var n = new de(this.ctx); 70474 n.animateRect(e, { x: t + a / 2, y: i + s / 2, width: 0, height: 0 }, { x: t, y: i, width: a, height: s }, r, function() { 70475 n.animationCompleted(e); 70476 }); 70477 } }, { key: "animateHeatColor", value: function(e, t, i, a) { 70478 e.attr({ fill: t }).animate(a).attr({ fill: i }); 70479 } }]), y; 70480 }(), nt = function() { 70481 function y(e) { 70482 F(this, y), this.ctx = e, this.w = e.w; 70483 } 70484 return Y(y, [{ key: "drawYAxisTexts", value: function(e, t, i, a) { 70485 var s = this.w, r = s.config.yaxis[0], n = s.globals.yLabelFormatters[0]; 70486 return new M(this.ctx).drawText({ x: e + r.labels.offsetX, y: t + r.labels.offsetY, text: n(a, i), textAnchor: "middle", fontSize: r.labels.style.fontSize, fontFamily: r.labels.style.fontFamily, foreColor: Array.isArray(r.labels.style.colors) ? r.labels.style.colors[i] : r.labels.style.colors }); 70487 } }]), y; 70488 }(), ot = function() { 70489 function y(e) { 70490 F(this, y), this.ctx = e, this.w = e.w; 70491 var t = this.w; 70492 this.chartType = this.w.config.chart.type, this.initialAnim = this.w.config.chart.animations.enabled, this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled, this.animBeginArr = [0], this.animDur = 0, this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels, this.lineColorArr = t.globals.stroke.colors !== void 0 ? t.globals.stroke.colors : t.globals.colors, this.defaultSize = Math.min(t.globals.gridWidth, t.globals.gridHeight), this.centerY = this.defaultSize / 2, this.centerX = t.globals.gridWidth / 2, t.config.chart.type === "radialBar" ? this.fullAngle = 360 : this.fullAngle = Math.abs(t.config.plotOptions.pie.endAngle - t.config.plotOptions.pie.startAngle), this.initialAngle = t.config.plotOptions.pie.startAngle % this.fullAngle, t.globals.radialSize = this.defaultSize / 2.05 - t.config.stroke.width - (t.config.chart.sparkline.enabled ? 0 : t.config.chart.dropShadow.blur), this.donutSize = t.globals.radialSize * parseInt(t.config.plotOptions.pie.donut.size, 10) / 100, this.maxY = 0, this.sliceLabels = [], this.sliceSizes = [], this.prevSectorAngleArr = []; 70493 } 70494 return Y(y, [{ key: "draw", value: function(e) { 70495 var t = this, i = this.w, a = new M(this.ctx); 70496 if (this.ret = a.group({ class: "apexcharts-pie" }), i.globals.noData) 70497 return this.ret; 70498 for (var s = 0, r = 0; r < e.length; r++) 70499 s += P.negToZero(e[r]); 70500 var n = [], o = a.group(); 70501 s === 0 && (s = 1e-5), e.forEach(function(k) { 70502 t.maxY = Math.max(t.maxY, k); 70503 }), i.config.yaxis[0].max && (this.maxY = i.config.yaxis[0].max), i.config.grid.position === "back" && this.chartType === "polarArea" && this.drawPolarElements(this.ret); 70504 for (var h = 0; h < e.length; h++) { 70505 var c = this.fullAngle * P.negToZero(e[h]) / s; 70506 n.push(c), this.chartType === "polarArea" ? (n[h] = this.fullAngle / e.length, this.sliceSizes.push(i.globals.radialSize * e[h] / this.maxY)) : this.sliceSizes.push(i.globals.radialSize); 70507 } 70508 if (i.globals.dataChanged) { 70509 for (var d, g = 0, p = 0; p < i.globals.previousPaths.length; p++) 70510 g += P.negToZero(i.globals.previousPaths[p]); 70511 for (var f = 0; f < i.globals.previousPaths.length; f++) 70512 d = this.fullAngle * P.negToZero(i.globals.previousPaths[f]) / g, this.prevSectorAngleArr.push(d); 70513 } 70514 this.donutSize < 0 && (this.donutSize = 0); 70515 var b = i.config.plotOptions.pie.customScale, m = i.globals.gridWidth / 2, w = i.globals.gridHeight / 2, A = m - i.globals.gridWidth / 2 * b, l = w - i.globals.gridHeight / 2 * b; 70516 if (this.chartType === "donut") { 70517 var u = a.drawCircle(this.donutSize); 70518 u.attr({ cx: this.centerX, cy: this.centerY, fill: i.config.plotOptions.pie.donut.background ? i.config.plotOptions.pie.donut.background : "transparent" }), o.add(u); 70519 } 70520 var x = this.drawArcs(n, e); 70521 if (this.sliceLabels.forEach(function(k) { 70522 x.add(k); 70523 }), o.attr({ transform: "translate(".concat(A, ", ").concat(l, ") scale(").concat(b, ")") }), o.add(x), this.ret.add(o), this.donutDataLabels.show) { 70524 var v = this.renderInnerDataLabels(this.donutDataLabels, { hollowSize: this.donutSize, centerX: this.centerX, centerY: this.centerY, opacity: this.donutDataLabels.show, translateX: A, translateY: l }); 70525 this.ret.add(v); 70526 } 70527 return i.config.grid.position === "front" && this.chartType === "polarArea" && this.drawPolarElements(this.ret), this.ret; 70528 } }, { key: "drawArcs", value: function(e, t) { 70529 var i = this.w, a = new Z(this.ctx), s = new M(this.ctx), r = new ae(this.ctx), n = s.group({ class: "apexcharts-slices" }), o = this.initialAngle, h = this.initialAngle, c = this.initialAngle, d = this.initialAngle; 70530 this.strokeWidth = i.config.stroke.show ? i.config.stroke.width : 0; 70531 for (var g = 0; g < e.length; g++) { 70532 var p = s.group({ class: "apexcharts-series apexcharts-pie-series", seriesName: P.escapeString(i.globals.seriesNames[g]), rel: g + 1, "data:realIndex": g }); 70533 n.add(p), h = d, c = (o = c) + e[g], d = h + this.prevSectorAngleArr[g]; 70534 var f = c < o ? this.fullAngle + c - o : c - o, b = r.fillPath({ seriesNumber: g, size: this.sliceSizes[g], value: t[g] }), m = this.getChangedPath(h, d), w = s.drawPath({ d: m, stroke: Array.isArray(this.lineColorArr) ? this.lineColorArr[g] : this.lineColorArr, strokeWidth: 0, fill: b, fillOpacity: i.config.fill.opacity, classes: "apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(), "-slice-").concat(g) }); 70535 if (w.attr({ index: 0, j: g }), a.setSelectionFilter(w, 0, g), i.config.chart.dropShadow.enabled) { 70536 var A = i.config.chart.dropShadow; 70537 a.dropShadow(w, A, g); 70538 } 70539 this.addListeners(w, this.donutDataLabels), M.setAttrs(w.node, { "data:angle": f, "data:startAngle": o, "data:strokeWidth": this.strokeWidth, "data:value": t[g] }); 70540 var l = { x: 0, y: 0 }; 70541 this.chartType === "pie" || this.chartType === "polarArea" ? l = P.polarToCartesian(this.centerX, this.centerY, i.globals.radialSize / 1.25 + i.config.plotOptions.pie.dataLabels.offset, (o + f / 2) % this.fullAngle) : this.chartType === "donut" && (l = P.polarToCartesian(this.centerX, this.centerY, (i.globals.radialSize + this.donutSize) / 2 + i.config.plotOptions.pie.dataLabels.offset, (o + f / 2) % this.fullAngle)), p.add(w); 70542 var u = 0; 70543 if (!this.initialAnim || i.globals.resized || i.globals.dataChanged ? this.animBeginArr.push(0) : ((u = f / this.fullAngle * i.config.chart.animations.speed) === 0 && (u = 1), this.animDur = u + this.animDur, this.animBeginArr.push(this.animDur)), this.dynamicAnim && i.globals.dataChanged ? this.animatePaths(w, { size: this.sliceSizes[g], endAngle: c, startAngle: o, prevStartAngle: h, prevEndAngle: d, animateStartingPos: !0, i: g, animBeginArr: this.animBeginArr, shouldSetPrevPaths: !0, dur: i.config.chart.animations.dynamicAnimation.speed }) : this.animatePaths(w, { size: this.sliceSizes[g], endAngle: c, startAngle: o, i: g, totalItems: e.length - 1, animBeginArr: this.animBeginArr, dur: u }), i.config.plotOptions.pie.expandOnClick && this.chartType !== "polarArea" && w.click(this.pieClicked.bind(this, g)), i.globals.selectedDataPoints[0] !== void 0 && i.globals.selectedDataPoints[0].indexOf(g) > -1 && this.pieClicked(g), i.config.dataLabels.enabled) { 70544 var x = l.x, v = l.y, k = 100 * f / this.fullAngle + "%"; 70545 if (f !== 0 && i.config.plotOptions.pie.dataLabels.minAngleToShowLabel < e[g]) { 70546 var S = i.config.dataLabels.formatter; 70547 S !== void 0 && (k = S(i.globals.seriesPercent[g][0], { seriesIndex: g, w: i })); 70548 var C = i.globals.dataLabels.style.colors[g], L = s.group({ class: "apexcharts-datalabels" }), I = s.drawText({ x, y: v, text: k, textAnchor: "middle", fontSize: i.config.dataLabels.style.fontSize, fontFamily: i.config.dataLabels.style.fontFamily, fontWeight: i.config.dataLabels.style.fontWeight, foreColor: C }); 70549 if (L.add(I), i.config.dataLabels.dropShadow.enabled) { 70550 var z = i.config.dataLabels.dropShadow; 70551 a.dropShadow(I, z); 70552 } 70553 I.node.classList.add("apexcharts-pie-label"), i.config.chart.animations.animate && i.globals.resized === !1 && (I.node.classList.add("apexcharts-pie-label-delay"), I.node.style.animationDelay = i.config.chart.animations.speed / 940 + "s"), this.sliceLabels.push(L); 70554 } 70555 } 70556 } 70557 return n; 70558 } }, { key: "addListeners", value: function(e, t) { 70559 var i = new M(this.ctx); 70560 e.node.addEventListener("mouseenter", i.pathMouseEnter.bind(this, e)), e.node.addEventListener("mouseleave", i.pathMouseLeave.bind(this, e)), e.node.addEventListener("mouseleave", this.revertDataLabelsInner.bind(this, e.node, t)), e.node.addEventListener("mousedown", i.pathMouseDown.bind(this, e)), this.donutDataLabels.total.showAlways || (e.node.addEventListener("mouseenter", this.printDataLabelsInner.bind(this, e.node, t)), e.node.addEventListener("mousedown", this.printDataLabelsInner.bind(this, e.node, t))); 70561 } }, { key: "animatePaths", value: function(e, t) { 70562 var i = this.w, a = t.endAngle < t.startAngle ? this.fullAngle + t.endAngle - t.startAngle : t.endAngle - t.startAngle, s = a, r = t.startAngle, n = t.startAngle; 70563 t.prevStartAngle !== void 0 && t.prevEndAngle !== void 0 && (r = t.prevEndAngle, s = t.prevEndAngle < t.prevStartAngle ? this.fullAngle + t.prevEndAngle - t.prevStartAngle : t.prevEndAngle - t.prevStartAngle), t.i === i.config.series.length - 1 && (a + n > this.fullAngle ? t.endAngle = t.endAngle - (a + n) : a + n < this.fullAngle && (t.endAngle = t.endAngle + (this.fullAngle - (a + n)))), a === this.fullAngle && (a = this.fullAngle - 0.01), this.animateArc(e, r, n, a, s, t); 70564 } }, { key: "animateArc", value: function(e, t, i, a, s, r) { 70565 var n, o = this, h = this.w, c = new de(this.ctx), d = r.size; 70566 (isNaN(t) || isNaN(s)) && (t = i, s = a, r.dur = 0); 70567 var g = a, p = i, f = t < i ? this.fullAngle + t - i : t - i; 70568 h.globals.dataChanged && r.shouldSetPrevPaths && r.prevEndAngle && (n = o.getPiePath({ me: o, startAngle: r.prevStartAngle, angle: r.prevEndAngle < r.prevStartAngle ? this.fullAngle + r.prevEndAngle - r.prevStartAngle : r.prevEndAngle - r.prevStartAngle, size: d }), e.attr({ d: n })), r.dur !== 0 ? e.animate(r.dur, h.globals.easing, r.animBeginArr[r.i]).afterAll(function() { 70569 o.chartType !== "pie" && o.chartType !== "donut" && o.chartType !== "polarArea" || this.animate(h.config.chart.animations.dynamicAnimation.speed).attr({ "stroke-width": o.strokeWidth }), r.i === h.config.series.length - 1 && c.animationCompleted(e); 70570 }).during(function(b) { 70571 g = f + (a - f) * b, r.animateStartingPos && (g = s + (a - s) * b, p = t - s + (i - (t - s)) * b), n = o.getPiePath({ me: o, startAngle: p, angle: g, size: d }), e.node.setAttribute("data:pathOrig", n), e.attr({ d: n }); 70572 }) : (n = o.getPiePath({ me: o, startAngle: p, angle: a, size: d }), r.isTrack || (h.globals.animationEnded = !0), e.node.setAttribute("data:pathOrig", n), e.attr({ d: n, "stroke-width": o.strokeWidth })); 70573 } }, { key: "pieClicked", value: function(e) { 70574 var t, i = this.w, a = this, s = a.sliceSizes[e] + (i.config.plotOptions.pie.expandOnClick ? 4 : 0), r = i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(), "-slice-").concat(e)).members[0]; 70575 if (r.attr("data:pieClicked") !== "true") { 70576 var n = i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"); 70577 Array.prototype.forEach.call(n, function(d) { 70578 d.setAttribute("data:pieClicked", "false"); 70579 var g = d.getAttribute("data:pathOrig"); 70580 g && d.setAttribute("d", g); 70581 }), r.attr("data:pieClicked", "true"); 70582 var o = parseInt(r.attr("data:startAngle"), 10), h = parseInt(r.attr("data:angle"), 10); 70583 t = a.getPiePath({ me: a, startAngle: o, angle: h, size: s }), h !== 360 && r.plot(t); 70584 } else { 70585 r.attr({ "data:pieClicked": "false" }), this.revertDataLabelsInner(r.node, this.donutDataLabels); 70586 var c = r.attr("data:pathOrig"); 70587 r.attr({ d: c }); 70588 } 70589 } }, { key: "getChangedPath", value: function(e, t) { 70590 var i = ""; 70591 return this.dynamicAnim && this.w.globals.dataChanged && (i = this.getPiePath({ me: this, startAngle: e, angle: t - e, size: this.size })), i; 70592 } }, { key: "getPiePath", value: function(e) { 70593 var t, i = e.me, a = e.startAngle, s = e.angle, r = e.size, n = new M(this.ctx), o = a, h = Math.PI * (o - 90) / 180, c = s + a; 70594 Math.ceil(c) >= this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle && (c = this.fullAngle + this.w.config.plotOptions.pie.startAngle % this.fullAngle - 0.01), Math.ceil(c) > this.fullAngle && (c -= this.fullAngle); 70595 var d = Math.PI * (c - 90) / 180, g = i.centerX + r * Math.cos(h), p = i.centerY + r * Math.sin(h), f = i.centerX + r * Math.cos(d), b = i.centerY + r * Math.sin(d), m = P.polarToCartesian(i.centerX, i.centerY, i.donutSize, c), w = P.polarToCartesian(i.centerX, i.centerY, i.donutSize, o), A = s > 180 ? 1 : 0, l = ["M", g, p, "A", r, r, 0, A, 1, f, b]; 70596 return t = i.chartType === "donut" ? [].concat(l, ["L", m.x, m.y, "A", i.donutSize, i.donutSize, 0, A, 0, w.x, w.y, "L", g, p, "z"]).join(" ") : i.chartType === "pie" || i.chartType === "polarArea" ? [].concat(l, ["L", i.centerX, i.centerY, "L", g, p]).join(" ") : [].concat(l).join(" "), n.roundPathCorners(t, 2 * this.strokeWidth); 70597 } }, { key: "drawPolarElements", value: function(e) { 70598 var t = this.w, i = new we(this.ctx), a = new M(this.ctx), s = new nt(this.ctx), r = a.group(), n = a.group(), o = i.niceScale(0, Math.ceil(this.maxY), t.config.yaxis[0].tickAmount, 0, !0), h = o.result.reverse(), c = o.result.length; 70599 this.maxY = o.niceMax; 70600 for (var d = t.globals.radialSize, g = d / (c - 1), p = 0; p < c - 1; p++) { 70601 var f = a.drawCircle(d); 70602 if (f.attr({ cx: this.centerX, cy: this.centerY, fill: "none", "stroke-width": t.config.plotOptions.polarArea.rings.strokeWidth, stroke: t.config.plotOptions.polarArea.rings.strokeColor }), t.config.yaxis[0].show) { 70603 var b = s.drawYAxisTexts(this.centerX, this.centerY - d + parseInt(t.config.yaxis[0].labels.style.fontSize, 10) / 2, p, h[p]); 70604 n.add(b); 70605 } 70606 r.add(f), d -= g; 70607 } 70608 this.drawSpokes(e), e.add(r), e.add(n); 70609 } }, { key: "renderInnerDataLabels", value: function(e, t) { 70610 var i = this.w, a = new M(this.ctx), s = a.group({ class: "apexcharts-datalabels-group", transform: "translate(".concat(t.translateX ? t.translateX : 0, ", ").concat(t.translateY ? t.translateY : 0, ") scale(").concat(i.config.plotOptions.pie.customScale, ")") }), r = e.total.show; 70611 s.node.style.opacity = t.opacity; 70612 var n, o, h = t.centerX, c = t.centerY; 70613 n = e.name.color === void 0 ? i.globals.colors[0] : e.name.color; 70614 var d = e.name.fontSize, g = e.name.fontFamily, p = e.name.fontWeight; 70615 o = e.value.color === void 0 ? i.config.chart.foreColor : e.value.color; 70616 var f = e.value.formatter, b = "", m = ""; 70617 if (r ? (n = e.total.color, d = e.total.fontSize, g = e.total.fontFamily, p = e.total.fontWeight, m = e.total.label, b = e.total.formatter(i)) : i.globals.series.length === 1 && (b = f(i.globals.series[0], i), m = i.globals.seriesNames[0]), m && (m = e.name.formatter(m, e.total.show, i)), e.name.show) { 70618 var w = a.drawText({ x: h, y: c + parseFloat(e.name.offsetY), text: m, textAnchor: "middle", foreColor: n, fontSize: d, fontWeight: p, fontFamily: g }); 70619 w.node.classList.add("apexcharts-datalabel-label"), s.add(w); 70620 } 70621 if (e.value.show) { 70622 var A = e.name.show ? parseFloat(e.value.offsetY) + 16 : e.value.offsetY, l = a.drawText({ x: h, y: c + A, text: b, textAnchor: "middle", foreColor: o, fontWeight: e.value.fontWeight, fontSize: e.value.fontSize, fontFamily: e.value.fontFamily }); 70623 l.node.classList.add("apexcharts-datalabel-value"), s.add(l); 70624 } 70625 return s; 70626 } }, { key: "printInnerLabels", value: function(e, t, i, a) { 70627 var s, r = this.w; 70628 a ? s = e.name.color === void 0 ? r.globals.colors[parseInt(a.parentNode.getAttribute("rel"), 10) - 1] : e.name.color : r.globals.series.length > 1 && e.total.show && (s = e.total.color); 70629 var n = r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"), o = r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value"); 70630 i = (0, e.value.formatter)(i, r), a || typeof e.total.formatter != "function" || (i = e.total.formatter(r)); 70631 var h = t === e.total.label; 70632 t = e.name.formatter(t, h, r), n !== null && (n.textContent = t), o !== null && (o.textContent = i), n !== null && (n.style.fill = s); 70633 } }, { key: "printDataLabelsInner", value: function(e, t) { 70634 var i = this.w, a = e.getAttribute("data:value"), s = i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"), 10) - 1]; 70635 i.globals.series.length > 1 && this.printInnerLabels(t, s, a, e); 70636 var r = i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"); 70637 r !== null && (r.style.opacity = 1); 70638 } }, { key: "drawSpokes", value: function(e) { 70639 var t = this, i = this.w, a = new M(this.ctx), s = i.config.plotOptions.polarArea.spokes; 70640 if (s.strokeWidth !== 0) { 70641 for (var r = [], n = 360 / i.globals.series.length, o = 0; o < i.globals.series.length; o++) 70642 r.push(P.polarToCartesian(this.centerX, this.centerY, i.globals.radialSize, i.config.plotOptions.pie.startAngle + n * o)); 70643 r.forEach(function(h, c) { 70644 var d = a.drawLine(h.x, h.y, t.centerX, t.centerY, Array.isArray(s.connectorColors) ? s.connectorColors[c] : s.connectorColors); 70645 e.add(d); 70646 }); 70647 } 70648 } }, { key: "revertDataLabelsInner", value: function(e, t, i) { 70649 var a = this, s = this.w, r = s.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"), n = !1, o = s.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"), h = function(g) { 70650 var p = g.makeSliceOut, f = g.printLabel; 70651 Array.prototype.forEach.call(o, function(b) { 70652 b.getAttribute("data:pieClicked") === "true" && (p && (n = !0), f && a.printDataLabelsInner(b, t)); 70653 }); 70654 }; 70655 if (h({ makeSliceOut: !0, printLabel: !1 }), t.total.show && s.globals.series.length > 1) 70656 n && !t.total.showAlways ? h({ makeSliceOut: !1, printLabel: !0 }) : this.printInnerLabels(t, t.total.label, t.total.formatter(s)); 70657 else if (h({ makeSliceOut: !1, printLabel: !0 }), !n) 70658 if (s.globals.selectedDataPoints.length && s.globals.series.length > 1) 70659 if (s.globals.selectedDataPoints[0].length > 0) { 70660 var c = s.globals.selectedDataPoints[0], d = s.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(), "-slice-").concat(c)); 70661 this.printDataLabelsInner(d, t); 70662 } else 70663 r && s.globals.selectedDataPoints.length && s.globals.selectedDataPoints[0].length === 0 && (r.style.opacity = 0); 70664 else 70665 r && s.globals.series.length > 1 && (r.style.opacity = 0); 70666 } }]), y; 70667 }(), Ft = function() { 70668 function y(e) { 70669 F(this, y), this.ctx = e, this.w = e.w, this.chartType = this.w.config.chart.type, this.initialAnim = this.w.config.chart.animations.enabled, this.dynamicAnim = this.initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled, this.animDur = 0; 70670 var t = this.w; 70671 this.graphics = new M(this.ctx), this.lineColorArr = t.globals.stroke.colors !== void 0 ? t.globals.stroke.colors : t.globals.colors, this.defaultSize = t.globals.svgHeight < t.globals.svgWidth ? t.globals.gridHeight + 1.5 * t.globals.goldenPadding : t.globals.gridWidth, this.isLog = t.config.yaxis[0].logarithmic, this.coreUtils = new q(this.ctx), this.maxValue = this.isLog ? this.coreUtils.getLogVal(t.globals.maxY, 0) : t.globals.maxY, this.minValue = this.isLog ? this.coreUtils.getLogVal(this.w.globals.minY, 0) : t.globals.minY, this.polygons = t.config.plotOptions.radar.polygons, this.strokeWidth = t.config.stroke.show ? t.config.stroke.width : 0, this.size = this.defaultSize / 2.1 - this.strokeWidth - t.config.chart.dropShadow.blur, t.config.xaxis.labels.show && (this.size = this.size - t.globals.xAxisLabelsWidth / 1.75), t.config.plotOptions.radar.size !== void 0 && (this.size = t.config.plotOptions.radar.size), this.dataRadiusOfPercent = [], this.dataRadius = [], this.angleArr = [], this.yaxisLabelsTextsPos = []; 70672 } 70673 return Y(y, [{ key: "draw", value: function(e) { 70674 var t = this, i = this.w, a = new ae(this.ctx), s = [], r = new ye(this.ctx); 70675 e.length && (this.dataPointsLen = e[i.globals.maxValsInArrayIndex].length), this.disAngle = 2 * Math.PI / this.dataPointsLen; 70676 var n = i.globals.gridWidth / 2, o = i.globals.gridHeight / 2, h = n + i.config.plotOptions.radar.offsetX, c = o + i.config.plotOptions.radar.offsetY, d = this.graphics.group({ class: "apexcharts-radar-series apexcharts-plot-series", transform: "translate(".concat(h || 0, ", ").concat(c || 0, ")") }), g = [], p = null, f = null; 70677 if (this.yaxisLabels = this.graphics.group({ class: "apexcharts-yaxis" }), e.forEach(function(m, w) { 70678 var A = m.length === i.globals.dataPoints, l = t.graphics.group().attr({ class: "apexcharts-series", "data:longestSeries": A, seriesName: P.escapeString(i.globals.seriesNames[w]), rel: w + 1, "data:realIndex": w }); 70679 t.dataRadiusOfPercent[w] = [], t.dataRadius[w] = [], t.angleArr[w] = [], m.forEach(function(T, E) { 70680 var R = Math.abs(t.maxValue - t.minValue); 70681 T += Math.abs(t.minValue), t.isLog && (T = t.coreUtils.getLogVal(T, 0)), t.dataRadiusOfPercent[w][E] = T / R, t.dataRadius[w][E] = t.dataRadiusOfPercent[w][E] * t.size, t.angleArr[w][E] = E * t.disAngle; 70682 }), g = t.getDataPointsPos(t.dataRadius[w], t.angleArr[w]); 70683 var u = t.createPaths(g, { x: 0, y: 0 }); 70684 p = t.graphics.group({ class: "apexcharts-series-markers-wrap apexcharts-element-hidden" }), f = t.graphics.group({ class: "apexcharts-datalabels", "data:realIndex": w }), i.globals.delayedElements.push({ el: p.node, index: w }); 70685 var x = { i: w, realIndex: w, animationDelay: w, initialSpeed: i.config.chart.animations.speed, dataChangeSpeed: i.config.chart.animations.dynamicAnimation.speed, className: "apexcharts-radar", shouldClipToGrid: !1, bindEventsOnPaths: !1, stroke: i.globals.stroke.colors[w], strokeLineCap: i.config.stroke.lineCap }, v = null; 70686 i.globals.previousPaths.length > 0 && (v = t.getPreviousPath(w)); 70687 for (var k = 0; k < u.linePathsTo.length; k++) { 70688 var S = t.graphics.renderPaths(X(X({}, x), {}, { pathFrom: v === null ? u.linePathsFrom[k] : v, pathTo: u.linePathsTo[k], strokeWidth: Array.isArray(t.strokeWidth) ? t.strokeWidth[w] : t.strokeWidth, fill: "none", drawShadow: !1 })); 70689 l.add(S); 70690 var C = a.fillPath({ seriesNumber: w }), L = t.graphics.renderPaths(X(X({}, x), {}, { pathFrom: v === null ? u.areaPathsFrom[k] : v, pathTo: u.areaPathsTo[k], strokeWidth: 0, fill: C, drawShadow: !1 })); 70691 if (i.config.chart.dropShadow.enabled) { 70692 var I = new Z(t.ctx), z = i.config.chart.dropShadow; 70693 I.dropShadow(L, Object.assign({}, z, { noUserSpaceOnUse: !0 }), w); 70694 } 70695 l.add(L); 70696 } 70697 m.forEach(function(T, E) { 70698 var R = new Pe(t.ctx).getMarkerConfig({ cssClass: "apexcharts-marker", seriesIndex: w, dataPointIndex: E }), O = t.graphics.drawMarker(g[E].x, g[E].y, R); 70699 O.attr("rel", E), O.attr("j", E), O.attr("index", w), O.node.setAttribute("default-marker-size", R.pSize); 70700 var D = t.graphics.group({ class: "apexcharts-series-markers" }); 70701 D && D.add(O), p.add(D), l.add(p); 70702 var W = i.config.dataLabels; 70703 if (W.enabled) { 70704 var N = W.formatter(i.globals.series[w][E], { seriesIndex: w, dataPointIndex: E, w: i }); 70705 r.plotDataLabelsText({ x: g[E].x, y: g[E].y, text: N, textAnchor: "middle", i: w, j: w, parent: f, offsetCorrection: !1, dataLabelsConfig: X({}, W) }); 70706 } 70707 l.add(f); 70708 }), s.push(l); 70709 }), this.drawPolygons({ parent: d }), i.config.xaxis.labels.show) { 70710 var b = this.drawXAxisTexts(); 70711 d.add(b); 70712 } 70713 return s.forEach(function(m) { 70714 d.add(m); 70715 }), d.add(this.yaxisLabels), d; 70716 } }, { key: "drawPolygons", value: function(e) { 70717 for (var t = this, i = this.w, a = e.parent, s = new nt(this.ctx), r = i.globals.yAxisScale[0].result.reverse(), n = r.length, o = [], h = this.size / (n - 1), c = 0; c < n; c++) 70718 o[c] = h * c; 70719 o.reverse(); 70720 var d = [], g = []; 70721 o.forEach(function(p, f) { 70722 var b = P.getPolygonPos(p, t.dataPointsLen), m = ""; 70723 b.forEach(function(w, A) { 70724 if (f === 0) { 70725 var l = t.graphics.drawLine(w.x, w.y, 0, 0, Array.isArray(t.polygons.connectorColors) ? t.polygons.connectorColors[A] : t.polygons.connectorColors); 70726 g.push(l); 70727 } 70728 A === 0 && t.yaxisLabelsTextsPos.push({ x: w.x, y: w.y }), m += w.x + "," + w.y + " "; 70729 }), d.push(m); 70730 }), d.forEach(function(p, f) { 70731 var b = t.polygons.strokeColors, m = t.polygons.strokeWidth, w = t.graphics.drawPolygon(p, Array.isArray(b) ? b[f] : b, Array.isArray(m) ? m[f] : m, i.globals.radarPolygons.fill.colors[f]); 70732 a.add(w); 70733 }), g.forEach(function(p) { 70734 a.add(p); 70735 }), i.config.yaxis[0].show && this.yaxisLabelsTextsPos.forEach(function(p, f) { 70736 var b = s.drawYAxisTexts(p.x, p.y, f, r[f]); 70737 t.yaxisLabels.add(b); 70738 }); 70739 } }, { key: "drawXAxisTexts", value: function() { 70740 var e = this, t = this.w, i = t.config.xaxis.labels, a = this.graphics.group({ class: "apexcharts-xaxis" }), s = P.getPolygonPos(this.size, this.dataPointsLen); 70741 return t.globals.labels.forEach(function(r, n) { 70742 var o = t.config.xaxis.labels.formatter, h = new ye(e.ctx); 70743 if (s[n]) { 70744 var c = e.getTextPos(s[n], e.size), d = o(r, { seriesIndex: -1, dataPointIndex: n, w: t }); 70745 h.plotDataLabelsText({ x: c.newX, y: c.newY, text: d, textAnchor: c.textAnchor, i: n, j: n, parent: a, color: Array.isArray(i.style.colors) && i.style.colors[n] ? i.style.colors[n] : "#a8a8a8", dataLabelsConfig: X({ textAnchor: c.textAnchor, dropShadow: { enabled: !1 } }, i), offsetCorrection: !1 }); 70746 } 70747 }), a; 70748 } }, { key: "createPaths", value: function(e, t) { 70749 var i = this, a = [], s = [], r = [], n = []; 70750 if (e.length) { 70751 s = [this.graphics.move(t.x, t.y)], n = [this.graphics.move(t.x, t.y)]; 70752 var o = this.graphics.move(e[0].x, e[0].y), h = this.graphics.move(e[0].x, e[0].y); 70753 e.forEach(function(c, d) { 70754 o += i.graphics.line(c.x, c.y), h += i.graphics.line(c.x, c.y), d === e.length - 1 && (o += "Z", h += "Z"); 70755 }), a.push(o), r.push(h); 70756 } 70757 return { linePathsFrom: s, linePathsTo: a, areaPathsFrom: n, areaPathsTo: r }; 70758 } }, { key: "getTextPos", value: function(e, t) { 70759 var i = "middle", a = e.x, s = e.y; 70760 return Math.abs(e.x) >= 10 ? e.x > 0 ? (i = "start", a += 10) : e.x < 0 && (i = "end", a -= 10) : i = "middle", Math.abs(e.y) >= t - 10 && (e.y < 0 ? s -= 10 : e.y > 0 && (s += 10)), { textAnchor: i, newX: a, newY: s }; 70761 } }, { key: "getPreviousPath", value: function(e) { 70762 for (var t = this.w, i = null, a = 0; a < t.globals.previousPaths.length; a++) { 70763 var s = t.globals.previousPaths[a]; 70764 s.paths.length > 0 && parseInt(s.realIndex, 10) === parseInt(e, 10) && t.globals.previousPaths[a].paths[0] !== void 0 && (i = t.globals.previousPaths[a].paths[0].d); 70765 } 70766 return i; 70767 } }, { key: "getDataPointsPos", value: function(e, t) { 70768 var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.dataPointsLen; 70769 e = e || [], t = t || []; 70770 for (var a = [], s = 0; s < i; s++) { 70771 var r = {}; 70772 r.x = e[s] * Math.sin(t[s]), r.y = -e[s] * Math.cos(t[s]), a.push(r); 70773 } 70774 return a; 70775 } }]), y; 70776 }(), Rt = function(y) { 70777 ge(t, ot); 70778 var e = ue(t); 70779 function t(i) { 70780 var a; 70781 F(this, t), (a = e.call(this, i)).ctx = i, a.w = i.w, a.animBeginArr = [0], a.animDur = 0; 70782 var s = a.w; 70783 return a.startAngle = s.config.plotOptions.radialBar.startAngle, a.endAngle = s.config.plotOptions.radialBar.endAngle, a.totalAngle = Math.abs(s.config.plotOptions.radialBar.endAngle - s.config.plotOptions.radialBar.startAngle), a.trackStartAngle = s.config.plotOptions.radialBar.track.startAngle, a.trackEndAngle = s.config.plotOptions.radialBar.track.endAngle, a.barLabels = a.w.config.plotOptions.radialBar.barLabels, a.donutDataLabels = a.w.config.plotOptions.radialBar.dataLabels, a.radialDataLabels = a.donutDataLabels, a.trackStartAngle || (a.trackStartAngle = a.startAngle), a.trackEndAngle || (a.trackEndAngle = a.endAngle), a.endAngle === 360 && (a.endAngle = 359.99), a.margin = parseInt(s.config.plotOptions.radialBar.track.margin, 10), a.onBarLabelClick = a.onBarLabelClick.bind(ze(a)), a; 70784 } 70785 return Y(t, [{ key: "draw", value: function(i) { 70786 var a = this.w, s = new M(this.ctx), r = s.group({ class: "apexcharts-radialbar" }); 70787 if (a.globals.noData) 70788 return r; 70789 var n = s.group(), o = this.defaultSize / 2, h = a.globals.gridWidth / 2, c = this.defaultSize / 2.05; 70790 a.config.chart.sparkline.enabled || (c = c - a.config.stroke.width - a.config.chart.dropShadow.blur); 70791 var d = a.globals.fill.colors; 70792 if (a.config.plotOptions.radialBar.track.show) { 70793 var g = this.drawTracks({ size: c, centerX: h, centerY: o, colorArr: d, series: i }); 70794 n.add(g); 70795 } 70796 var p = this.drawArcs({ size: c, centerX: h, centerY: o, colorArr: d, series: i }), f = 360; 70797 a.config.plotOptions.radialBar.startAngle < 0 && (f = this.totalAngle); 70798 var b = (360 - f) / 360; 70799 if (a.globals.radialSize = c - c * b, this.radialDataLabels.value.show) { 70800 var m = Math.max(this.radialDataLabels.value.offsetY, this.radialDataLabels.name.offsetY); 70801 a.globals.radialSize += m * b; 70802 } 70803 return n.add(p.g), a.config.plotOptions.radialBar.hollow.position === "front" && (p.g.add(p.elHollow), p.dataLabels && p.g.add(p.dataLabels)), r.add(n), r; 70804 } }, { key: "drawTracks", value: function(i) { 70805 var a = this.w, s = new M(this.ctx), r = s.group({ class: "apexcharts-tracks" }), n = new Z(this.ctx), o = new ae(this.ctx), h = this.getStrokeWidth(i); 70806 i.size = i.size - h / 2; 70807 for (var c = 0; c < i.series.length; c++) { 70808 var d = s.group({ class: "apexcharts-radialbar-track apexcharts-track" }); 70809 r.add(d), d.attr({ rel: c + 1 }), i.size = i.size - h - this.margin; 70810 var g = a.config.plotOptions.radialBar.track, p = o.fillPath({ seriesNumber: 0, size: i.size, fillColors: Array.isArray(g.background) ? g.background[c] : g.background, solid: !0 }), f = this.trackStartAngle, b = this.trackEndAngle; 70811 Math.abs(b) + Math.abs(f) >= 360 && (b = 360 - Math.abs(this.startAngle) - 0.1); 70812 var m = s.drawPath({ d: "", stroke: p, strokeWidth: h * parseInt(g.strokeWidth, 10) / 100, fill: "none", strokeOpacity: g.opacity, classes: "apexcharts-radialbar-area" }); 70813 if (g.dropShadow.enabled) { 70814 var w = g.dropShadow; 70815 n.dropShadow(m, w); 70816 } 70817 d.add(m), m.attr("id", "apexcharts-radialbarTrack-" + c), this.animatePaths(m, { centerX: i.centerX, centerY: i.centerY, endAngle: b, startAngle: f, size: i.size, i: c, totalItems: 2, animBeginArr: 0, dur: 0, isTrack: !0, easing: a.globals.easing }); 70818 } 70819 return r; 70820 } }, { key: "drawArcs", value: function(i) { 70821 var a = this.w, s = new M(this.ctx), r = new ae(this.ctx), n = new Z(this.ctx), o = s.group(), h = this.getStrokeWidth(i); 70822 i.size = i.size - h / 2; 70823 var c = a.config.plotOptions.radialBar.hollow.background, d = i.size - h * i.series.length - this.margin * i.series.length - h * parseInt(a.config.plotOptions.radialBar.track.strokeWidth, 10) / 100 / 2, g = d - a.config.plotOptions.radialBar.hollow.margin; 70824 a.config.plotOptions.radialBar.hollow.image !== void 0 && (c = this.drawHollowImage(i, o, d, c)); 70825 var p = this.drawHollow({ size: g, centerX: i.centerX, centerY: i.centerY, fill: c || "transparent" }); 70826 if (a.config.plotOptions.radialBar.hollow.dropShadow.enabled) { 70827 var f = a.config.plotOptions.radialBar.hollow.dropShadow; 70828 n.dropShadow(p, f); 70829 } 70830 var b = 1; 70831 !this.radialDataLabels.total.show && a.globals.series.length > 1 && (b = 0); 70832 var m = null; 70833 this.radialDataLabels.show && (m = this.renderInnerDataLabels(this.radialDataLabels, { hollowSize: d, centerX: i.centerX, centerY: i.centerY, opacity: b })), a.config.plotOptions.radialBar.hollow.position === "back" && (o.add(p), m && o.add(m)); 70834 var w = !1; 70835 a.config.plotOptions.radialBar.inverseOrder && (w = !0); 70836 for (var A = w ? i.series.length - 1 : 0; w ? A >= 0 : A < i.series.length; w ? A-- : A++) { 70837 var l = s.group({ class: "apexcharts-series apexcharts-radial-series", seriesName: P.escapeString(a.globals.seriesNames[A]) }); 70838 o.add(l), l.attr({ rel: A + 1, "data:realIndex": A }), this.ctx.series.addCollapsedClassToSeries(l, A), i.size = i.size - h - this.margin; 70839 var u = r.fillPath({ seriesNumber: A, size: i.size, value: i.series[A] }), x = this.startAngle, v = void 0, k = P.negToZero(i.series[A] > 100 ? 100 : i.series[A]) / 100, S = Math.round(this.totalAngle * k) + this.startAngle, C = void 0; 70840 a.globals.dataChanged && (v = this.startAngle, C = Math.round(this.totalAngle * P.negToZero(a.globals.previousPaths[A]) / 100) + v), Math.abs(S) + Math.abs(x) >= 360 && (S -= 0.01), Math.abs(C) + Math.abs(v) >= 360 && (C -= 0.01); 70841 var L = S - x, I = Array.isArray(a.config.stroke.dashArray) ? a.config.stroke.dashArray[A] : a.config.stroke.dashArray, z = s.drawPath({ d: "", stroke: u, strokeWidth: h, fill: "none", fillOpacity: a.config.fill.opacity, classes: "apexcharts-radialbar-area apexcharts-radialbar-slice-" + A, strokeDashArray: I }); 70842 if (M.setAttrs(z.node, { "data:angle": L, "data:value": i.series[A] }), a.config.chart.dropShadow.enabled) { 70843 var T = a.config.chart.dropShadow; 70844 n.dropShadow(z, T, A); 70845 } 70846 if (n.setSelectionFilter(z, 0, A), this.addListeners(z, this.radialDataLabels), l.add(z), z.attr({ index: 0, j: A }), this.barLabels.enabled) { 70847 var E = P.polarToCartesian(i.centerX, i.centerY, i.size, x), R = this.barLabels.formatter(a.globals.seriesNames[A], { seriesIndex: A, w: a }), O = ["apexcharts-radialbar-label"]; 70848 this.barLabels.onClick || O.push("apexcharts-no-click"); 70849 var D = this.barLabels.useSeriesColors ? a.globals.colors[A] : a.config.chart.foreColor; 70850 D || (D = a.config.chart.foreColor); 70851 var W = E.x - this.barLabels.margin, N = E.y, V = s.drawText({ x: W, y: N, text: R, textAnchor: "end", dominantBaseline: "middle", fontFamily: this.barLabels.fontFamily, fontWeight: this.barLabels.fontWeight, fontSize: this.barLabels.fontSize, foreColor: D, cssClass: O.join(" ") }); 70852 V.on("click", this.onBarLabelClick), V.attr({ rel: A + 1 }), x !== 0 && V.attr({ "transform-origin": "".concat(W, " ").concat(N), transform: "rotate(".concat(x, " 0 0)") }), l.add(V); 70853 } 70854 var j = 0; 70855 !this.initialAnim || a.globals.resized || a.globals.dataChanged || (j = a.config.chart.animations.speed), a.globals.dataChanged && (j = a.config.chart.animations.dynamicAnimation.speed), this.animDur = j / (1.2 * i.series.length) + this.animDur, this.animBeginArr.push(this.animDur), this.animatePaths(z, { centerX: i.centerX, centerY: i.centerY, endAngle: S, startAngle: x, prevEndAngle: C, prevStartAngle: v, size: i.size, i: A, totalItems: 2, animBeginArr: this.animBeginArr, dur: j, shouldSetPrevPaths: !0, easing: a.globals.easing }); 70856 } 70857 return { g: o, elHollow: p, dataLabels: m }; 70858 } }, { key: "drawHollow", value: function(i) { 70859 var a = new M(this.ctx).drawCircle(2 * i.size); 70860 return a.attr({ class: "apexcharts-radialbar-hollow", cx: i.centerX, cy: i.centerY, r: i.size, fill: i.fill }), a; 70861 } }, { key: "drawHollowImage", value: function(i, a, s, r) { 70862 var n = this.w, o = new ae(this.ctx), h = P.randomId(), c = n.config.plotOptions.radialBar.hollow.image; 70863 if (n.config.plotOptions.radialBar.hollow.imageClipped) 70864 o.clippedImgArea({ width: s, height: s, image: c, patternID: "pattern".concat(n.globals.cuid).concat(h) }), r = "url(#pattern".concat(n.globals.cuid).concat(h, ")"); 70865 else { 70866 var d = n.config.plotOptions.radialBar.hollow.imageWidth, g = n.config.plotOptions.radialBar.hollow.imageHeight; 70867 if (d === void 0 && g === void 0) { 70868 var p = n.globals.dom.Paper.image(c).loaded(function(b) { 70869 this.move(i.centerX - b.width / 2 + n.config.plotOptions.radialBar.hollow.imageOffsetX, i.centerY - b.height / 2 + n.config.plotOptions.radialBar.hollow.imageOffsetY); 70870 }); 70871 a.add(p); 70872 } else { 70873 var f = n.globals.dom.Paper.image(c).loaded(function(b) { 70874 this.move(i.centerX - d / 2 + n.config.plotOptions.radialBar.hollow.imageOffsetX, i.centerY - g / 2 + n.config.plotOptions.radialBar.hollow.imageOffsetY), this.size(d, g); 70875 }); 70876 a.add(f); 70877 } 70878 } 70879 return r; 70880 } }, { key: "getStrokeWidth", value: function(i) { 70881 var a = this.w; 70882 return i.size * (100 - parseInt(a.config.plotOptions.radialBar.hollow.size, 10)) / 100 / (i.series.length + 1) - this.margin; 70883 } }, { key: "onBarLabelClick", value: function(i) { 70884 var a = parseInt(i.target.getAttribute("rel"), 10) - 1, s = this.barLabels.onClick, r = this.w; 70885 s && s(r.globals.seriesNames[a], { w: r, seriesIndex: a }); 70886 } }]), t; 70887 }(), Ot = function(y) { 70888 ge(t, ke); 70889 var e = ue(t); 70890 function t() { 70891 return F(this, t), e.apply(this, arguments); 70892 } 70893 return Y(t, [{ key: "draw", value: function(i, a) { 70894 var s = this.w, r = new M(this.ctx); 70895 this.rangeBarOptions = this.w.config.plotOptions.rangeBar, this.series = i, this.seriesRangeStart = s.globals.seriesRangeStart, this.seriesRangeEnd = s.globals.seriesRangeEnd, this.barHelpers.initVariables(i); 70896 for (var n = r.group({ class: "apexcharts-rangebar-series apexcharts-plot-series" }), o = 0; o < i.length; o++) { 70897 var h, c, d, g, p = void 0, f = void 0, b = s.globals.comboCharts ? a[o] : o, m = r.group({ class: "apexcharts-series", seriesName: P.escapeString(s.globals.seriesNames[b]), rel: o + 1, "data:realIndex": b }); 70898 this.ctx.series.addCollapsedClassToSeries(m, b), i[o].length > 0 && (this.visibleI = this.visibleI + 1); 70899 var w = 0, A = 0; 70900 this.yRatio.length > 1 && (this.yaxisIndex = b); 70901 var l = this.barHelpers.initialPositions(); 70902 f = l.y, g = l.zeroW, p = l.x, A = l.barWidth, w = l.barHeight, h = l.xDivision, c = l.yDivision, d = l.zeroH; 70903 for (var u = r.group({ class: "apexcharts-datalabels", "data:realIndex": b }), x = r.group({ class: "apexcharts-rangebar-goals-markers" }), v = 0; v < s.globals.dataPoints; v++) { 70904 var k, S = this.barHelpers.getStrokeWidth(o, v, b), C = this.seriesRangeStart[o][v], L = this.seriesRangeEnd[o][v], I = null, z = null, T = null, E = { x: p, y: f, strokeWidth: S, elSeries: m }, R = this.seriesLen; 70905 if (s.config.plotOptions.bar.rangeBarGroupRows && (R = 1), s.config.series[o].data[v] === void 0) 70906 break; 70907 if (this.isHorizontal) { 70908 T = f + w * this.visibleI; 70909 var O = (c - w * R) / 2; 70910 if (s.config.series[o].data[v].x) { 70911 var D = this.detectOverlappingBars({ i: o, j: v, barYPosition: T, srty: O, barHeight: w, yDivision: c, initPositions: l }); 70912 w = D.barHeight, T = D.barYPosition; 70913 } 70914 A = (I = this.drawRangeBarPaths(X({ indexes: { i: o, j: v, realIndex: b }, barHeight: w, barYPosition: T, zeroW: g, yDivision: c, y1: C, y2: L }, E))).barWidth; 70915 } else { 70916 s.globals.isXNumeric && (p = (s.globals.seriesX[o][v] - s.globals.minX) / this.xRatio - A / 2), z = p + A * this.visibleI; 70917 var W = (h - A * R) / 2; 70918 if (s.config.series[o].data[v].x) { 70919 var N = this.detectOverlappingBars({ i: o, j: v, barXPosition: z, srtx: W, barWidth: A, xDivision: h, initPositions: l }); 70920 A = N.barWidth, z = N.barXPosition; 70921 } 70922 w = (I = this.drawRangeColumnPaths(X({ indexes: { i: o, j: v, realIndex: b }, barWidth: A, barXPosition: z, zeroH: d, xDivision: h }, E))).barHeight; 70923 } 70924 var V = this.barHelpers.drawGoalLine({ barXPosition: I.barXPosition, barYPosition: T, goalX: I.goalX, goalY: I.goalY, barHeight: w, barWidth: A }); 70925 V && x.add(V), f = I.y, p = I.x; 70926 var j = this.barHelpers.getPathFillColor(i, o, v, b), se = s.globals.stroke.colors[b]; 70927 this.renderSeries((ee(k = { realIndex: b, pathFill: j, lineFill: se, j: v, i: o, x: p, y: f, y1: C, y2: L, pathFrom: I.pathFrom, pathTo: I.pathTo, strokeWidth: S, elSeries: m, series: i, barHeight: w, barWidth: A, barXPosition: z, barYPosition: T }, "barWidth", A), ee(k, "elDataLabelsWrap", u), ee(k, "elGoalsMarkers", x), ee(k, "visibleSeries", this.visibleI), ee(k, "type", "rangebar"), k)); 70928 } 70929 n.add(m); 70930 } 70931 return n; 70932 } }, { key: "detectOverlappingBars", value: function(i) { 70933 var a = i.i, s = i.j, r = i.barYPosition, n = i.barXPosition, o = i.srty, h = i.srtx, c = i.barHeight, d = i.barWidth, g = i.yDivision, p = i.xDivision, f = i.initPositions, b = this.w, m = [], w = b.config.series[a].data[s].rangeName, A = b.config.series[a].data[s].x, l = Array.isArray(A) ? A.join(" ") : A, u = b.globals.labels.map(function(v) { 70934 return Array.isArray(v) ? v.join(" ") : v; 70935 }).indexOf(l), x = b.globals.seriesRange[a].findIndex(function(v) { 70936 return v.x === l && v.overlaps.length > 0; 70937 }); 70938 return this.isHorizontal ? (r = b.config.plotOptions.bar.rangeBarGroupRows ? o + g * u : o + c * this.visibleI + g * u, x > -1 && !b.config.plotOptions.bar.rangeBarOverlap && (m = b.globals.seriesRange[a][x].overlaps).indexOf(w) > -1 && (r = (c = f.barHeight / m.length) * this.visibleI + g * (100 - parseInt(this.barOptions.barHeight, 10)) / 100 / 2 + c * (this.visibleI + m.indexOf(w)) + g * u)) : (u > -1 && (n = b.config.plotOptions.bar.rangeBarGroupRows ? h + p * u : h + d * this.visibleI + p * u), x > -1 && !b.config.plotOptions.bar.rangeBarOverlap && (m = b.globals.seriesRange[a][x].overlaps).indexOf(w) > -1 && (n = (d = f.barWidth / m.length) * this.visibleI + p * (100 - parseInt(this.barOptions.barWidth, 10)) / 100 / 2 + d * (this.visibleI + m.indexOf(w)) + p * u)), { barYPosition: r, barXPosition: n, barHeight: c, barWidth: d }; 70939 } }, { key: "drawRangeColumnPaths", value: function(i) { 70940 var a = i.indexes, s = i.x, r = i.xDivision, n = i.barWidth, o = i.barXPosition, h = i.zeroH, c = this.w, d = a.i, g = a.j, p = this.yRatio[this.yaxisIndex], f = a.realIndex, b = this.getRangeValue(f, g), m = Math.min(b.start, b.end), w = Math.max(b.start, b.end); 70941 this.series[d][g] === void 0 || this.series[d][g] === null ? m = h : (m = h - m / p, w = h - w / p); 70942 var A = Math.abs(w - m), l = this.barHelpers.getColumnPaths({ barXPosition: o, barWidth: n, y1: m, y2: w, strokeWidth: this.strokeWidth, series: this.seriesRangeEnd, realIndex: a.realIndex, i: f, j: g, w: c }); 70943 if (c.globals.isXNumeric) { 70944 var u = this.getBarXForNumericXAxis({ x: s, j: g, realIndex: f, barWidth: n }); 70945 s = u.x, o = u.barXPosition; 70946 } else 70947 s += r; 70948 return { pathTo: l.pathTo, pathFrom: l.pathFrom, barHeight: A, x: s, y: w, goalY: this.barHelpers.getGoalValues("y", null, h, d, g), barXPosition: o }; 70949 } }, { key: "drawRangeBarPaths", value: function(i) { 70950 var a = i.indexes, s = i.y, r = i.y1, n = i.y2, o = i.yDivision, h = i.barHeight, c = i.barYPosition, d = i.zeroW, g = this.w, p = d + r / this.invertedYRatio, f = d + n / this.invertedYRatio, b = Math.abs(f - p), m = this.barHelpers.getBarpaths({ barYPosition: c, barHeight: h, x1: p, x2: f, strokeWidth: this.strokeWidth, series: this.seriesRangeEnd, i: a.realIndex, realIndex: a.realIndex, j: a.j, w: g }); 70951 return g.globals.isXNumeric || (s += o), { pathTo: m.pathTo, pathFrom: m.pathFrom, barWidth: b, x: f, goalX: this.barHelpers.getGoalValues("x", d, null, a.realIndex, a.j), y: s }; 70952 } }, { key: "getRangeValue", value: function(i, a) { 70953 var s = this.w; 70954 return { start: s.globals.seriesRangeStart[i][a], end: s.globals.seriesRangeEnd[i][a] }; 70955 } }]), t; 70956 }(), Ht = function() { 70957 function y(e) { 70958 F(this, y), this.w = e.w, this.lineCtx = e; 70959 } 70960 return Y(y, [{ key: "sameValueSeriesFix", value: function(e, t) { 70961 var i = this.w; 70962 if ((i.config.fill.type === "gradient" || i.config.fill.type[e] === "gradient") && new q(this.lineCtx.ctx, i).seriesHaveSameValues(e)) { 70963 var a = t[e].slice(); 70964 a[a.length - 1] = a[a.length - 1] + 1e-6, t[e] = a; 70965 } 70966 return t; 70967 } }, { key: "calculatePoints", value: function(e) { 70968 var t = e.series, i = e.realIndex, a = e.x, s = e.y, r = e.i, n = e.j, o = e.prevY, h = this.w, c = [], d = []; 70969 if (n === 0) { 70970 var g = this.lineCtx.categoryAxisCorrection + h.config.markers.offsetX; 70971 h.globals.isXNumeric && (g = (h.globals.seriesX[i][0] - h.globals.minX) / this.lineCtx.xRatio + h.config.markers.offsetX), c.push(g), d.push(P.isNumber(t[r][0]) ? o + h.config.markers.offsetY : null), c.push(a + h.config.markers.offsetX), d.push(P.isNumber(t[r][n + 1]) ? s + h.config.markers.offsetY : null); 70972 } else 70973 c.push(a + h.config.markers.offsetX), d.push(P.isNumber(t[r][n + 1]) ? s + h.config.markers.offsetY : null); 70974 return { x: c, y: d }; 70975 } }, { key: "checkPreviousPaths", value: function(e) { 70976 for (var t = e.pathFromLine, i = e.pathFromArea, a = e.realIndex, s = this.w, r = 0; r < s.globals.previousPaths.length; r++) { 70977 var n = s.globals.previousPaths[r]; 70978 (n.type === "line" || n.type === "area") && n.paths.length > 0 && parseInt(n.realIndex, 10) === parseInt(a, 10) && (n.type === "line" ? (this.lineCtx.appendPathFrom = !1, t = s.globals.previousPaths[r].paths[0].d) : n.type === "area" && (this.lineCtx.appendPathFrom = !1, i = s.globals.previousPaths[r].paths[0].d, s.config.stroke.show && s.globals.previousPaths[r].paths[1] && (t = s.globals.previousPaths[r].paths[1].d))); 70979 } 70980 return { pathFromLine: t, pathFromArea: i }; 70981 } }, { key: "determineFirstPrevY", value: function(e) { 70982 var t, i, a = e.i, s = e.series, r = e.prevY, n = e.lineYPosition, o = this.w, h = o.config.chart.stacked && !o.globals.comboCharts || o.config.chart.stacked && o.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || ((t = this.w.config.series[a]) === null || t === void 0 ? void 0 : t.type) === "bar"); 70983 if (((i = s[a]) === null || i === void 0 ? void 0 : i[0]) !== void 0) 70984 r = (n = h && a > 0 ? this.lineCtx.prevSeriesY[a - 1][0] : this.lineCtx.zeroY) - s[a][0] / this.lineCtx.yRatio[this.lineCtx.yaxisIndex] + 2 * (this.lineCtx.isReversed ? s[a][0] / this.lineCtx.yRatio[this.lineCtx.yaxisIndex] : 0); 70985 else if (h && a > 0 && s[a][0] === void 0) { 70986 for (var c = a - 1; c >= 0; c--) 70987 if (s[c][0] !== null && s[c][0] !== void 0) { 70988 r = n = this.lineCtx.prevSeriesY[c][0]; 70989 break; 70990 } 70991 } 70992 return { prevY: r, lineYPosition: n }; 70993 } }]), y; 70994 }(), Dt = function(y) { 70995 for (var e, t, i, a, s = function(c) { 70996 for (var d = [], g = c[0], p = c[1], f = d[0] = Ve(g, p), b = 1, m = c.length - 1; b < m; b++) 70997 g = p, p = c[b + 1], d[b] = 0.5 * (f + (f = Ve(g, p))); 70998 return d[b] = f, d; 70999 }(y), r = y.length - 1, n = [], o = 0; o < r; o++) 71000 i = Ve(y[o], y[o + 1]), Math.abs(i) < 1e-6 ? s[o] = s[o + 1] = 0 : (a = (e = s[o] / i) * e + (t = s[o + 1] / i) * t) > 9 && (a = 3 * i / Math.sqrt(a), s[o] = a * e, s[o + 1] = a * t); 71001 for (var h = 0; h <= r; h++) 71002 a = (y[Math.min(r, h + 1)][0] - y[Math.max(0, h - 1)][0]) / (6 * (1 + s[h] * s[h])), n.push([a || 0, s[h] * a || 0]); 71003 return n; 71004 }, Ge = function(y) { 71005 for (var e = "", t = 0; t < y.length; t++) { 71006 var i = y[t], a = i.length; 71007 a > 4 ? (e += "C".concat(i[0], ", ").concat(i[1]), e += ", ".concat(i[2], ", ").concat(i[3]), e += ", ".concat(i[4], ", ").concat(i[5])) : a > 2 && (e += "S".concat(i[0], ", ").concat(i[1]), e += ", ".concat(i[2], ", ").concat(i[3])); 71008 } 71009 return e; 71010 }, lt = function(y) { 71011 var e = Dt(y), t = y[1], i = y[0], a = [], s = e[1], r = e[0]; 71012 a.push(i, [i[0] + r[0], i[1] + r[1], t[0] - s[0], t[1] - s[1], t[0], t[1]]); 71013 for (var n = 2, o = e.length; n < o; n++) { 71014 var h = y[n], c = e[n]; 71015 a.push([h[0] - c[0], h[1] - c[1], h[0], h[1]]); 71016 } 71017 return a; 71018 }; 71019 function Ve(y, e) { 71020 return (e[1] - y[1]) / (e[0] - y[0]); 71021 } 71022 var je = function() { 71023 function y(e, t, i) { 71024 F(this, y), this.ctx = e, this.w = e.w, this.xyRatios = t, this.pointsChart = !(this.w.config.chart.type !== "bubble" && this.w.config.chart.type !== "scatter") || i, this.scatter = new $e(this.ctx), this.noNegatives = this.w.globals.minX === Number.MAX_VALUE, this.lineHelpers = new Ht(this), this.markers = new Pe(this.ctx), this.prevSeriesY = [], this.categoryAxisCorrection = 0, this.yaxisIndex = 0; 71025 } 71026 return Y(y, [{ key: "draw", value: function(e, t, i, a) { 71027 var s, r = this.w, n = new M(this.ctx), o = r.globals.comboCharts ? t : r.config.chart.type, h = n.group({ class: "apexcharts-".concat(o, "-series apexcharts-plot-series") }), c = new q(this.ctx, r); 71028 this.yRatio = this.xyRatios.yRatio, this.zRatio = this.xyRatios.zRatio, this.xRatio = this.xyRatios.xRatio, this.baseLineY = this.xyRatios.baseLineY, e = c.getLogSeries(e), this.yRatio = c.getLogYRatios(this.yRatio); 71029 for (var d = [], g = 0; g < e.length; g++) { 71030 e = this.lineHelpers.sameValueSeriesFix(g, e); 71031 var p = r.globals.comboCharts ? i[g] : g; 71032 this._initSerieVariables(e, g, p); 71033 var f = [], b = [], m = [], w = r.globals.padHorizontal + this.categoryAxisCorrection; 71034 this.ctx.series.addCollapsedClassToSeries(this.elSeries, p), r.globals.isXNumeric && r.globals.seriesX.length > 0 && (w = (r.globals.seriesX[p][0] - r.globals.minX) / this.xRatio), m.push(w); 71035 var A, l = w, u = void 0, x = l, v = this.zeroY, k = this.zeroY; 71036 v = this.lineHelpers.determineFirstPrevY({ i: g, series: e, prevY: v, lineYPosition: 0 }).prevY, r.config.stroke.curve === "monotonCubic" && e[g][0] === null ? f.push(null) : f.push(v), A = v, o === "rangeArea" && (u = k = this.lineHelpers.determineFirstPrevY({ i: g, series: a, prevY: k, lineYPosition: 0 }).prevY, b.push(k)); 71037 var S = { type: o, series: e, realIndex: p, i: g, x: w, y: 1, pX: l, pY: A, pathsFrom: this._calculatePathsFrom({ type: o, series: e, i: g, realIndex: p, prevX: x, prevY: v, prevY2: k }), linePaths: [], areaPaths: [], seriesIndex: i, lineYPosition: 0, xArrj: m, yArrj: f, y2Arrj: b, seriesRangeEnd: a }, C = this._iterateOverDataPoints(X(X({}, S), {}, { iterations: o === "rangeArea" ? e[g].length - 1 : void 0, isRangeStart: !0 })); 71038 if (o === "rangeArea") { 71039 var L = this._calculatePathsFrom({ series: a, i: g, realIndex: p, prevX: x, prevY: k }), I = this._iterateOverDataPoints(X(X({}, S), {}, { series: a, pY: u, pathsFrom: L, iterations: a[g].length - 1, isRangeStart: !1 })); 71040 C.linePaths[0] = I.linePath + C.linePath, C.pathFromLine = I.pathFromLine + C.pathFromLine; 71041 } 71042 this._handlePaths({ type: o, realIndex: p, i: g, paths: C }), this.elSeries.add(this.elPointsMain), this.elSeries.add(this.elDataLabelsWrap), d.push(this.elSeries); 71043 } 71044 if (((s = r.config.series[0]) === null || s === void 0 ? void 0 : s.zIndex) !== void 0 && d.sort(function(E, R) { 71045 return Number(E.node.getAttribute("zIndex")) - Number(R.node.getAttribute("zIndex")); 71046 }), r.config.chart.stacked) 71047 for (var z = d.length; z > 0; z--) 71048 h.add(d[z - 1]); 71049 else 71050 for (var T = 0; T < d.length; T++) 71051 h.add(d[T]); 71052 return h; 71053 } }, { key: "_initSerieVariables", value: function(e, t, i) { 71054 var a = this.w, s = new M(this.ctx); 71055 this.xDivision = a.globals.gridWidth / (a.globals.dataPoints - (a.config.xaxis.tickPlacement === "on" ? 1 : 0)), this.strokeWidth = Array.isArray(a.config.stroke.width) ? a.config.stroke.width[i] : a.config.stroke.width, this.yRatio.length > 1 && (this.yaxisIndex = i), this.isReversed = a.config.yaxis[this.yaxisIndex] && a.config.yaxis[this.yaxisIndex].reversed, this.zeroY = a.globals.gridHeight - this.baseLineY[this.yaxisIndex] - (this.isReversed ? a.globals.gridHeight : 0) + (this.isReversed ? 2 * this.baseLineY[this.yaxisIndex] : 0), this.areaBottomY = this.zeroY, (this.zeroY > a.globals.gridHeight || a.config.plotOptions.area.fillTo === "end") && (this.areaBottomY = a.globals.gridHeight), this.categoryAxisCorrection = this.xDivision / 2, this.elSeries = s.group({ class: "apexcharts-series", zIndex: a.config.series[i].zIndex !== void 0 ? a.config.series[i].zIndex : i, seriesName: P.escapeString(a.globals.seriesNames[i]) }), this.elPointsMain = s.group({ class: "apexcharts-series-markers-wrap", "data:realIndex": i }), this.elDataLabelsWrap = s.group({ class: "apexcharts-datalabels", "data:realIndex": i }); 71056 var r = e[t].length === a.globals.dataPoints; 71057 this.elSeries.attr({ "data:longestSeries": r, rel: t + 1, "data:realIndex": i }), this.appendPathFrom = !0; 71058 } }, { key: "_calculatePathsFrom", value: function(e) { 71059 var t, i, a, s, r = e.type, n = e.series, o = e.i, h = e.realIndex, c = e.prevX, d = e.prevY, g = e.prevY2, p = this.w, f = new M(this.ctx); 71060 if (n[o][0] === null) { 71061 for (var b = 0; b < n[o].length; b++) 71062 if (n[o][b] !== null) { 71063 c = this.xDivision * b, d = this.zeroY - n[o][b] / this.yRatio[this.yaxisIndex], t = f.move(c, d), i = f.move(c, this.areaBottomY); 71064 break; 71065 } 71066 } else 71067 t = f.move(c, d), r === "rangeArea" && (t = f.move(c, g) + f.line(c, d)), i = f.move(c, this.areaBottomY) + f.line(c, d); 71068 if (a = f.move(-1, this.zeroY) + f.line(-1, this.zeroY), s = f.move(-1, this.zeroY) + f.line(-1, this.zeroY), p.globals.previousPaths.length > 0) { 71069 var m = this.lineHelpers.checkPreviousPaths({ pathFromLine: a, pathFromArea: s, realIndex: h }); 71070 a = m.pathFromLine, s = m.pathFromArea; 71071 } 71072 return { prevX: c, prevY: d, linePath: t, areaPath: i, pathFromLine: a, pathFromArea: s }; 71073 } }, { key: "_handlePaths", value: function(e) { 71074 var t = e.type, i = e.realIndex, a = e.i, s = e.paths, r = this.w, n = new M(this.ctx), o = new ae(this.ctx); 71075 this.prevSeriesY.push(s.yArrj), r.globals.seriesXvalues[i] = s.xArrj, r.globals.seriesYvalues[i] = s.yArrj; 71076 var h = r.config.forecastDataPoints; 71077 if (h.count > 0 && t !== "rangeArea") { 71078 var c = r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length - h.count - 1], d = n.drawRect(c, 0, r.globals.gridWidth, r.globals.gridHeight, 0); 71079 r.globals.dom.elForecastMask.appendChild(d.node); 71080 var g = n.drawRect(0, 0, c, r.globals.gridHeight, 0); 71081 r.globals.dom.elNonForecastMask.appendChild(g.node); 71082 } 71083 this.pointsChart || r.globals.delayedElements.push({ el: this.elPointsMain.node, index: i }); 71084 var p = { i: a, realIndex: i, animationDelay: a, initialSpeed: r.config.chart.animations.speed, dataChangeSpeed: r.config.chart.animations.dynamicAnimation.speed, className: "apexcharts-".concat(t) }; 71085 if (t === "area") 71086 for (var f = o.fillPath({ seriesNumber: i }), b = 0; b < s.areaPaths.length; b++) { 71087 var m = n.renderPaths(X(X({}, p), {}, { pathFrom: s.pathFromArea, pathTo: s.areaPaths[b], stroke: "none", strokeWidth: 0, strokeLineCap: null, fill: f })); 71088 this.elSeries.add(m); 71089 } 71090 if (r.config.stroke.show && !this.pointsChart) { 71091 var w = null; 71092 if (t === "line") 71093 w = o.fillPath({ seriesNumber: i, i: a }); 71094 else if (r.config.stroke.fill.type === "solid") 71095 w = r.globals.stroke.colors[i]; 71096 else { 71097 var A = r.config.fill; 71098 r.config.fill = r.config.stroke.fill, w = o.fillPath({ seriesNumber: i, i: a }), r.config.fill = A; 71099 } 71100 for (var l = 0; l < s.linePaths.length; l++) { 71101 var u = w; 71102 t === "rangeArea" && (u = o.fillPath({ seriesNumber: i })); 71103 var x = X(X({}, p), {}, { pathFrom: s.pathFromLine, pathTo: s.linePaths[l], stroke: w, strokeWidth: this.strokeWidth, strokeLineCap: r.config.stroke.lineCap, fill: t === "rangeArea" ? u : "none" }), v = n.renderPaths(x); 71104 if (this.elSeries.add(v), v.attr("fill-rule", "evenodd"), h.count > 0 && t !== "rangeArea") { 71105 var k = n.renderPaths(x); 71106 k.node.setAttribute("stroke-dasharray", h.dashArray), h.strokeWidth && k.node.setAttribute("stroke-width", h.strokeWidth), this.elSeries.add(k), k.attr("clip-path", "url(#forecastMask".concat(r.globals.cuid, ")")), v.attr("clip-path", "url(#nonForecastMask".concat(r.globals.cuid, ")")); 71107 } 71108 } 71109 } 71110 } }, { key: "_iterateOverDataPoints", value: function(e) { 71111 var t, i = this, a = e.type, s = e.series, r = e.iterations, n = e.realIndex, o = e.i, h = e.x, c = e.y, d = e.pX, g = e.pY, p = e.pathsFrom, f = e.linePaths, b = e.areaPaths, m = e.seriesIndex, w = e.lineYPosition, A = e.xArrj, l = e.yArrj, u = e.y2Arrj, x = e.isRangeStart, v = e.seriesRangeEnd, k = this.w, S = new M(this.ctx), C = this.yRatio, L = p.prevY, I = p.linePath, z = p.areaPath, T = p.pathFromLine, E = p.pathFromArea, R = P.isNumber(k.globals.minYArr[n]) ? k.globals.minYArr[n] : k.globals.minY; 71112 r || (r = k.globals.dataPoints > 1 ? k.globals.dataPoints - 1 : k.globals.dataPoints); 71113 for (var O = function(le, he) { 71114 return he - le / C[i.yaxisIndex] + 2 * (i.isReversed ? le / C[i.yaxisIndex] : 0); 71115 }, D = c, W = k.config.chart.stacked && !k.globals.comboCharts || k.config.chart.stacked && k.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || ((t = this.w.config.series[n]) === null || t === void 0 ? void 0 : t.type) === "bar"), N = 0; N < r; N++) { 71116 var V = s[o][N + 1] === void 0 || s[o][N + 1] === null; 71117 if (k.globals.isXNumeric) { 71118 var j = k.globals.seriesX[n][N + 1]; 71119 k.globals.seriesX[n][N + 1] === void 0 && (j = k.globals.seriesX[n][r - 1]), h = (j - k.globals.minX) / this.xRatio; 71120 } else 71121 h += this.xDivision; 71122 W ? o > 0 && k.globals.collapsedSeries.length < k.config.series.length - 1 ? w = this.prevSeriesY[function(le) { 71123 for (var he = le, $ = 0; $ < k.globals.series.length; $++) 71124 if (k.globals.collapsedSeriesIndices.indexOf(le) > -1) { 71125 he--; 71126 break; 71127 } 71128 return he >= 0 ? he : 0; 71129 }(o - 1)][N + 1] : w = this.zeroY : w = this.zeroY, V ? c = O(R, w) : (c = O(s[o][N + 1], w), a === "rangeArea" && (D = O(v[o][N + 1], w))), A.push(h), V && k.config.stroke.curve === "smooth" ? l.push(null) : l.push(c), u.push(D); 71130 var se = this.lineHelpers.calculatePoints({ series: s, x: h, y: c, realIndex: n, i: o, j: N, prevY: L }), K = this._createPaths({ type: a, series: s, i: o, realIndex: n, j: N, x: h, y: c, y2: D, xArrj: A, yArrj: l, y2Arrj: u, pX: d, pY: g, linePath: I, areaPath: z, linePaths: f, areaPaths: b, seriesIndex: m, isRangeStart: x }); 71131 b = K.areaPaths, f = K.linePaths, d = K.pX, g = K.pY, z = K.areaPath, I = K.linePath, !this.appendPathFrom || k.config.stroke.curve === "monotoneCubic" && a === "rangeArea" || (T += S.line(h, this.zeroY), E += S.line(h, this.zeroY)), this.handleNullDataPoints(s, se, o, N, n), this._handleMarkersAndLabels({ type: a, pointsPos: se, i: o, j: N, realIndex: n, isRangeStart: x }); 71132 } 71133 return { yArrj: l, xArrj: A, pathFromArea: E, areaPaths: b, pathFromLine: T, linePaths: f, linePath: I, areaPath: z }; 71134 } }, { key: "_handleMarkersAndLabels", value: function(e) { 71135 var t = e.type, i = e.pointsPos, a = e.isRangeStart, s = e.i, r = e.j, n = e.realIndex, o = this.w, h = new ye(this.ctx); 71136 if (this.pointsChart) 71137 this.scatter.draw(this.elSeries, r, { realIndex: n, pointsPos: i, zRatio: this.zRatio, elParent: this.elPointsMain }); 71138 else { 71139 o.globals.series[s].length > 1 && this.elPointsMain.node.classList.add("apexcharts-element-hidden"); 71140 var c = this.markers.plotChartMarkers(i, n, r + 1); 71141 c !== null && this.elPointsMain.add(c); 71142 } 71143 var d = h.drawDataLabel({ type: t, isRangeStart: a, pos: i, i: n, j: r + 1 }); 71144 d !== null && this.elDataLabelsWrap.add(d); 71145 } }, { key: "_createPaths", value: function(e) { 71146 var t = e.type, i = e.series, a = e.i, s = e.realIndex, r = e.j, n = e.x, o = e.y, h = e.xArrj, c = e.yArrj, d = e.y2, g = e.y2Arrj, p = e.pX, f = e.pY, b = e.linePath, m = e.areaPath, w = e.linePaths, A = e.areaPaths, l = e.seriesIndex, u = e.isRangeStart, x = this.w, v = new M(this.ctx), k = x.config.stroke.curve, S = this.areaBottomY; 71147 if (Array.isArray(x.config.stroke.curve) && (k = Array.isArray(l) ? x.config.stroke.curve[l[a]] : x.config.stroke.curve[a]), t === "rangeArea" && (x.globals.hasNullValues || x.config.forecastDataPoints.count > 0) && k === "monotoneCubic" && (k = "straight"), k === "monotoneCubic") { 71148 var C = t === "rangeArea" ? h.length === x.globals.dataPoints : r === i[a].length - 2, L = h.map(function(W, N) { 71149 return [h[N], c[N]]; 71150 }).filter(function(W) { 71151 return W[1] !== null; 71152 }); 71153 if (C && L.length > 1) { 71154 var I = lt(L); 71155 if (b += Ge(I), i[a][0] === null ? m = b : m += Ge(I), t === "rangeArea" && u) { 71156 b += v.line(h[h.length - 1], g[g.length - 1]); 71157 var z = h.slice().reverse(), T = g.slice().reverse(), E = z.map(function(W, N) { 71158 return [z[N], T[N]]; 71159 }), R = lt(E); 71160 m = b += Ge(R); 71161 } else 71162 m += v.line(L[L.length - 1][0], S) + v.line(L[0][0], S) + v.move(L[0][0], L[0][1]) + "z"; 71163 w.push(b), A.push(m); 71164 } 71165 } else if (k === "smooth") { 71166 var O = 0.35 * (n - p); 71167 x.globals.hasNullValues ? (i[a][r] !== null && (i[a][r + 1] !== null ? (b = v.move(p, f) + v.curve(p + O, f, n - O, o, n + 1, o), m = v.move(p + 1, f) + v.curve(p + O, f, n - O, o, n + 1, o) + v.line(n, S) + v.line(p, S) + "z") : (b = v.move(p, f), m = v.move(p, f) + "z")), w.push(b), A.push(m)) : (b += v.curve(p + O, f, n - O, o, n, o), m += v.curve(p + O, f, n - O, o, n, o)), p = n, f = o, r === i[a].length - 2 && (m = m + v.curve(p, f, n, o, n, S) + v.move(n, o) + "z", t === "rangeArea" && u ? b = b + v.curve(p, f, n, o, n, d) + v.move(n, d) + "z" : x.globals.hasNullValues || (w.push(b), A.push(m))); 71168 } else { 71169 if (i[a][r + 1] === null) { 71170 b += v.move(n, o); 71171 var D = x.globals.isXNumeric ? (x.globals.seriesX[s][r] - x.globals.minX) / this.xRatio : n - this.xDivision; 71172 m = m + v.line(D, S) + v.move(n, o) + "z"; 71173 } 71174 i[a][r] === null && (b += v.move(n, o), m += v.move(n, S)), k === "stepline" ? (b = b + v.line(n, null, "H") + v.line(null, o, "V"), m = m + v.line(n, null, "H") + v.line(null, o, "V")) : k === "straight" && (b += v.line(n, o), m += v.line(n, o)), r === i[a].length - 2 && (m = m + v.line(n, S) + v.move(n, o) + "z", t === "rangeArea" && u ? b = b + v.line(n, d) + v.move(n, d) + "z" : (w.push(b), A.push(m))); 71175 } 71176 return { linePaths: w, areaPaths: A, pX: p, pY: f, linePath: b, areaPath: m }; 71177 } }, { key: "handleNullDataPoints", value: function(e, t, i, a, s) { 71178 var r = this.w; 71179 if (e[i][a] === null && r.config.markers.showNullDataPoints || e[i].length === 1) { 71180 var n = this.markers.plotChartMarkers(t, s, a + 1, this.strokeWidth - r.config.markers.strokeWidth / 2, !0); 71181 n !== null && this.elPointsMain.add(n); 71182 } 71183 } }]), y; 71184 }(); 71185 window.TreemapSquared = {}, window.TreemapSquared.generate = function() { 71186 function y(n, o, h, c) { 71187 this.xoffset = n, this.yoffset = o, this.height = c, this.width = h, this.shortestEdge = function() { 71188 return Math.min(this.height, this.width); 71189 }, this.getCoordinates = function(d) { 71190 var g, p = [], f = this.xoffset, b = this.yoffset, m = s(d) / this.height, w = s(d) / this.width; 71191 if (this.width >= this.height) 71192 for (g = 0; g < d.length; g++) 71193 p.push([f, b, f + m, b + d[g] / m]), b += d[g] / m; 71194 else 71195 for (g = 0; g < d.length; g++) 71196 p.push([f, b, f + d[g] / w, b + w]), f += d[g] / w; 71197 return p; 71198 }, this.cutArea = function(d) { 71199 var g; 71200 if (this.width >= this.height) { 71201 var p = d / this.height, f = this.width - p; 71202 g = new y(this.xoffset + p, this.yoffset, f, this.height); 71203 } else { 71204 var b = d / this.width, m = this.height - b; 71205 g = new y(this.xoffset, this.yoffset + b, this.width, m); 71206 } 71207 return g; 71208 }; 71209 } 71210 function e(n, o, h, c, d) { 71211 c = c === void 0 ? 0 : c, d = d === void 0 ? 0 : d; 71212 var g = t(function(p, f) { 71213 var b, m = [], w = f / s(p); 71214 for (b = 0; b < p.length; b++) 71215 m[b] = p[b] * w; 71216 return m; 71217 }(n, o * h), [], new y(c, d, o, h), []); 71218 return function(p) { 71219 var f, b, m = []; 71220 for (f = 0; f < p.length; f++) 71221 for (b = 0; b < p[f].length; b++) 71222 m.push(p[f][b]); 71223 return m; 71224 }(g); 71225 } 71226 function t(n, o, h, c) { 71227 var d, g, p; 71228 if (n.length !== 0) 71229 return d = h.shortestEdge(), function(f, b, m) { 71230 var w; 71231 if (f.length === 0) 71232 return !0; 71233 (w = f.slice()).push(b); 71234 var A = i(f, m), l = i(w, m); 71235 return A >= l; 71236 }(o, g = n[0], d) ? (o.push(g), t(n.slice(1), o, h, c)) : (p = h.cutArea(s(o), c), c.push(h.getCoordinates(o)), t(n, [], p, c)), c; 71237 c.push(h.getCoordinates(o)); 71238 } 71239 function i(n, o) { 71240 var h = Math.min.apply(Math, n), c = Math.max.apply(Math, n), d = s(n); 71241 return Math.max(Math.pow(o, 2) * c / Math.pow(d, 2), Math.pow(d, 2) / (Math.pow(o, 2) * h)); 71242 } 71243 function a(n) { 71244 return n && n.constructor === Array; 71245 } 71246 function s(n) { 71247 var o, h = 0; 71248 for (o = 0; o < n.length; o++) 71249 h += n[o]; 71250 return h; 71251 } 71252 function r(n) { 71253 var o, h = 0; 71254 if (a(n[0])) 71255 for (o = 0; o < n.length; o++) 71256 h += r(n[o]); 71257 else 71258 h = s(n); 71259 return h; 71260 } 71261 return function n(o, h, c, d, g) { 71262 d = d === void 0 ? 0 : d, g = g === void 0 ? 0 : g; 71263 var p, f, b = [], m = []; 71264 if (a(o[0])) { 71265 for (f = 0; f < o.length; f++) 71266 b[f] = r(o[f]); 71267 for (p = e(b, h, c, d, g), f = 0; f < o.length; f++) 71268 m.push(n(o[f], p[f][2] - p[f][0], p[f][3] - p[f][1], p[f][0], p[f][1])); 71269 } else 71270 m = e(o, h, c, d, g); 71271 return m; 71272 }; 71273 }(); 71274 var be, Fe, Nt = function() { 71275 function y(e, t) { 71276 F(this, y), this.ctx = e, this.w = e.w, this.strokeWidth = this.w.config.stroke.width, this.helpers = new rt(e), this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation, this.labels = []; 71277 } 71278 return Y(y, [{ key: "draw", value: function(e) { 71279 var t = this, i = this.w, a = new M(this.ctx), s = new ae(this.ctx), r = a.group({ class: "apexcharts-treemap" }); 71280 if (i.globals.noData) 71281 return r; 71282 var n = []; 71283 return e.forEach(function(o) { 71284 var h = o.map(function(c) { 71285 return Math.abs(c); 71286 }); 71287 n.push(h); 71288 }), this.negRange = this.helpers.checkColorRange(), i.config.series.forEach(function(o, h) { 71289 o.data.forEach(function(c) { 71290 Array.isArray(t.labels[h]) || (t.labels[h] = []), t.labels[h].push(c.x); 71291 }); 71292 }), window.TreemapSquared.generate(n, i.globals.gridWidth, i.globals.gridHeight).forEach(function(o, h) { 71293 var c = a.group({ class: "apexcharts-series apexcharts-treemap-series", seriesName: P.escapeString(i.globals.seriesNames[h]), rel: h + 1, "data:realIndex": h }); 71294 if (i.config.chart.dropShadow.enabled) { 71295 var d = i.config.chart.dropShadow; 71296 new Z(t.ctx).dropShadow(r, d, h); 71297 } 71298 var g = a.group({ class: "apexcharts-data-labels" }); 71299 o.forEach(function(p, f) { 71300 var b = p[0], m = p[1], w = p[2], A = p[3], l = a.drawRect(b, m, w - b, A - m, i.config.plotOptions.treemap.borderRadius, "#fff", 1, t.strokeWidth, i.config.plotOptions.treemap.useFillColorAsStroke ? x : i.globals.stroke.colors[h]); 71301 l.attr({ cx: b, cy: m, index: h, i: h, j: f, width: w - b, height: A - m }); 71302 var u = t.helpers.getShadeColor(i.config.chart.type, h, f, t.negRange), x = u.color; 71303 i.config.series[h].data[f] !== void 0 && i.config.series[h].data[f].fillColor && (x = i.config.series[h].data[f].fillColor); 71304 var v = s.fillPath({ color: x, seriesNumber: h, dataPointIndex: f }); 71305 l.node.classList.add("apexcharts-treemap-rect"), l.attr({ fill: v }), t.helpers.addListeners(l); 71306 var k = { x: b + (w - b) / 2, y: m + (A - m) / 2, width: 0, height: 0 }, S = { x: b, y: m, width: w - b, height: A - m }; 71307 if (i.config.chart.animations.enabled && !i.globals.dataChanged) { 71308 var C = 1; 71309 i.globals.resized || (C = i.config.chart.animations.speed), t.animateTreemap(l, k, S, C); 71310 } 71311 if (i.globals.dataChanged) { 71312 var L = 1; 71313 t.dynamicAnim.enabled && i.globals.shouldAnimate && (L = t.dynamicAnim.speed, i.globals.previousPaths[h] && i.globals.previousPaths[h][f] && i.globals.previousPaths[h][f].rect && (k = i.globals.previousPaths[h][f].rect), t.animateTreemap(l, k, S, L)); 71314 } 71315 var I = t.getFontSize(p), z = i.config.dataLabels.formatter(t.labels[h][f], { value: i.globals.series[h][f], seriesIndex: h, dataPointIndex: f, w: i }); 71316 i.config.plotOptions.treemap.dataLabels.format === "truncate" && (I = parseInt(i.config.dataLabels.style.fontSize, 10), z = t.truncateLabels(z, I, b, m, w, A)); 71317 var T = t.helpers.calculateDataLabels({ text: z, x: (b + w) / 2, y: (m + A) / 2 + t.strokeWidth / 2 + I / 3, i: h, j: f, colorProps: u, fontSize: I, series: e }); 71318 i.config.dataLabels.enabled && T && t.rotateToFitLabel(T, I, z, b, m, w, A), c.add(l), T !== null && c.add(T); 71319 }), c.add(g), r.add(c); 71320 }), r; 71321 } }, { key: "getFontSize", value: function(e) { 71322 var t = this.w, i, a, s, r, n = function o(h) { 71323 var c, d = 0; 71324 if (Array.isArray(h[0])) 71325 for (c = 0; c < h.length; c++) 71326 d += o(h[c]); 71327 else 71328 for (c = 0; c < h.length; c++) 71329 d += h[c].length; 71330 return d; 71331 }(this.labels) / function o(h) { 71332 var c, d = 0; 71333 if (Array.isArray(h[0])) 71334 for (c = 0; c < h.length; c++) 71335 d += o(h[c]); 71336 else 71337 for (c = 0; c < h.length; c++) 71338 d += 1; 71339 return d; 71340 }(this.labels); 71341 return i = e[2] - e[0], a = e[3] - e[1], s = i * a, r = Math.pow(s, 0.5), Math.min(r / n, parseInt(t.config.dataLabels.style.fontSize, 10)); 71342 } }, { key: "rotateToFitLabel", value: function(e, t, i, a, s, r, n) { 71343 var o = new M(this.ctx), h = o.getTextRects(i, t); 71344 if (h.width + this.w.config.stroke.width + 5 > r - a && h.width <= n - s) { 71345 var c = o.rotateAroundCenter(e.node); 71346 e.node.setAttribute("transform", "rotate(-90 ".concat(c.x, " ").concat(c.y, ") translate(").concat(h.height / 3, ")")); 71347 } 71348 } }, { key: "truncateLabels", value: function(e, t, i, a, s, r) { 71349 var n = new M(this.ctx), o = n.getTextRects(e, t).width + this.w.config.stroke.width + 5 > s - i && r - a > s - i ? r - a : s - i, h = n.getTextBasedOnMaxWidth({ text: e, maxWidth: o, fontSize: t }); 71350 return e.length !== h.length && o / t < 5 ? "" : h; 71351 } }, { key: "animateTreemap", value: function(e, t, i, a) { 71352 var s = new de(this.ctx); 71353 s.animateRect(e, { x: t.x, y: t.y, width: t.width, height: t.height }, { x: i.x, y: i.y, width: i.width, height: i.height }, a, function() { 71354 s.animationCompleted(e); 71355 }); 71356 } }]), y; 71357 }(), Wt = 86400, Bt = function() { 71358 function y(e) { 71359 F(this, y), this.ctx = e, this.w = e.w, this.timeScaleArray = [], this.utc = this.w.config.xaxis.labels.datetimeUTC; 71360 } 71361 return Y(y, [{ key: "calculateTimeScaleTicks", value: function(e, t) { 71362 var i = this, a = this.w; 71363 if (a.globals.allSeriesCollapsed) 71364 return a.globals.labels = [], a.globals.timescaleLabels = [], []; 71365 var s = new B(this.ctx), r = (t - e) / 864e5; 71366 this.determineInterval(r), a.globals.disableZoomIn = !1, a.globals.disableZoomOut = !1, r < 11574074074074075e-20 ? a.globals.disableZoomIn = !0 : r > 5e4 && (a.globals.disableZoomOut = !0); 71367 var n = s.getTimeUnitsfromTimestamp(e, t, this.utc), o = a.globals.gridWidth / r, h = o / 24, c = h / 60, d = c / 60, g = Math.floor(24 * r), p = Math.floor(1440 * r), f = Math.floor(r * Wt), b = Math.floor(r), m = Math.floor(r / 30), w = Math.floor(r / 365), A = { minMillisecond: n.minMillisecond, minSecond: n.minSecond, minMinute: n.minMinute, minHour: n.minHour, minDate: n.minDate, minMonth: n.minMonth, minYear: n.minYear }, l = { firstVal: A, currentMillisecond: A.minMillisecond, currentSecond: A.minSecond, currentMinute: A.minMinute, currentHour: A.minHour, currentMonthDate: A.minDate, currentDate: A.minDate, currentMonth: A.minMonth, currentYear: A.minYear, daysWidthOnXAxis: o, hoursWidthOnXAxis: h, minutesWidthOnXAxis: c, secondsWidthOnXAxis: d, numberOfSeconds: f, numberOfMinutes: p, numberOfHours: g, numberOfDays: b, numberOfMonths: m, numberOfYears: w }; 71368 switch (this.tickInterval) { 71369 case "years": 71370 this.generateYearScale(l); 71371 break; 71372 case "months": 71373 case "half_year": 71374 this.generateMonthScale(l); 71375 break; 71376 case "months_days": 71377 case "months_fortnight": 71378 case "days": 71379 case "week_days": 71380 this.generateDayScale(l); 71381 break; 71382 case "hours": 71383 this.generateHourScale(l); 71384 break; 71385 case "minutes_fives": 71386 case "minutes": 71387 this.generateMinuteScale(l); 71388 break; 71389 case "seconds_tens": 71390 case "seconds_fives": 71391 case "seconds": 71392 this.generateSecondScale(l); 71393 } 71394 var u = this.timeScaleArray.map(function(x) { 71395 var v = { position: x.position, unit: x.unit, year: x.year, day: x.day ? x.day : 1, hour: x.hour ? x.hour : 0, month: x.month + 1 }; 71396 return x.unit === "month" ? X(X({}, v), {}, { day: 1, value: x.value + 1 }) : x.unit === "day" || x.unit === "hour" ? X(X({}, v), {}, { value: x.value }) : x.unit === "minute" ? X(X({}, v), {}, { value: x.value, minute: x.value }) : x.unit === "second" ? X(X({}, v), {}, { value: x.value, minute: x.minute, second: x.second }) : x; 71397 }); 71398 return u.filter(function(x) { 71399 var v = 1, k = Math.ceil(a.globals.gridWidth / 120), S = x.value; 71400 a.config.xaxis.tickAmount !== void 0 && (k = a.config.xaxis.tickAmount), u.length > k && (v = Math.floor(u.length / k)); 71401 var C = !1, L = !1; 71402 switch (i.tickInterval) { 71403 case "years": 71404 x.unit === "year" && (C = !0); 71405 break; 71406 case "half_year": 71407 v = 7, x.unit === "year" && (C = !0); 71408 break; 71409 case "months": 71410 v = 1, x.unit === "year" && (C = !0); 71411 break; 71412 case "months_fortnight": 71413 v = 15, x.unit !== "year" && x.unit !== "month" || (C = !0), S === 30 && (L = !0); 71414 break; 71415 case "months_days": 71416 v = 10, x.unit === "month" && (C = !0), S === 30 && (L = !0); 71417 break; 71418 case "week_days": 71419 v = 8, x.unit === "month" && (C = !0); 71420 break; 71421 case "days": 71422 v = 1, x.unit === "month" && (C = !0); 71423 break; 71424 case "hours": 71425 x.unit === "day" && (C = !0); 71426 break; 71427 case "minutes_fives": 71428 case "seconds_fives": 71429 S % 5 != 0 && (L = !0); 71430 break; 71431 case "seconds_tens": 71432 S % 10 != 0 && (L = !0); 71433 } 71434 if (i.tickInterval === "hours" || i.tickInterval === "minutes_fives" || i.tickInterval === "seconds_tens" || i.tickInterval === "seconds_fives") { 71435 if (!L) 71436 return !0; 71437 } else if ((S % v == 0 || C) && !L) 71438 return !0; 71439 }); 71440 } }, { key: "recalcDimensionsBasedOnFormat", value: function(e, t) { 71441 var i = this.w, a = this.formatDates(e), s = this.removeOverlappingTS(a); 71442 i.globals.timescaleLabels = s.slice(), new Ye(this.ctx).plotCoords(); 71443 } }, { key: "determineInterval", value: function(e) { 71444 var t = 24 * e, i = 60 * t; 71445 switch (!0) { 71446 case e / 365 > 5: 71447 this.tickInterval = "years"; 71448 break; 71449 case e > 800: 71450 this.tickInterval = "half_year"; 71451 break; 71452 case e > 180: 71453 this.tickInterval = "months"; 71454 break; 71455 case e > 90: 71456 this.tickInterval = "months_fortnight"; 71457 break; 71458 case e > 60: 71459 this.tickInterval = "months_days"; 71460 break; 71461 case e > 30: 71462 this.tickInterval = "week_days"; 71463 break; 71464 case e > 2: 71465 this.tickInterval = "days"; 71466 break; 71467 case t > 2.4: 71468 this.tickInterval = "hours"; 71469 break; 71470 case i > 15: 71471 this.tickInterval = "minutes_fives"; 71472 break; 71473 case i > 5: 71474 this.tickInterval = "minutes"; 71475 break; 71476 case i > 1: 71477 this.tickInterval = "seconds_tens"; 71478 break; 71479 case 60 * i > 20: 71480 this.tickInterval = "seconds_fives"; 71481 break; 71482 default: 71483 this.tickInterval = "seconds"; 71484 } 71485 } }, { key: "generateYearScale", value: function(e) { 71486 var t = e.firstVal, i = e.currentMonth, a = e.currentYear, s = e.daysWidthOnXAxis, r = e.numberOfYears, n = t.minYear, o = 0, h = new B(this.ctx), c = "year"; 71487 if (t.minDate > 1 || t.minMonth > 0) { 71488 var d = h.determineRemainingDaysOfYear(t.minYear, t.minMonth, t.minDate); 71489 o = (h.determineDaysOfYear(t.minYear) - d + 1) * s, n = t.minYear + 1, this.timeScaleArray.push({ position: o, value: n, unit: c, year: n, month: P.monthMod(i + 1) }); 71490 } else 71491 t.minDate === 1 && t.minMonth === 0 && this.timeScaleArray.push({ position: o, value: n, unit: c, year: a, month: P.monthMod(i + 1) }); 71492 for (var g = n, p = o, f = 0; f < r; f++) 71493 g++, p = h.determineDaysOfYear(g - 1) * s + p, this.timeScaleArray.push({ position: p, value: g, unit: c, year: g, month: 1 }); 71494 } }, { key: "generateMonthScale", value: function(e) { 71495 var t = e.firstVal, i = e.currentMonthDate, a = e.currentMonth, s = e.currentYear, r = e.daysWidthOnXAxis, n = e.numberOfMonths, o = a, h = 0, c = new B(this.ctx), d = "month", g = 0; 71496 if (t.minDate > 1) { 71497 h = (c.determineDaysOfMonths(a + 1, t.minYear) - i + 1) * r, o = P.monthMod(a + 1); 71498 var p = s + g, f = P.monthMod(o), b = o; 71499 o === 0 && (d = "year", b = p, f = 1, p += g += 1), this.timeScaleArray.push({ position: h, value: b, unit: d, year: p, month: f }); 71500 } else 71501 this.timeScaleArray.push({ position: h, value: o, unit: d, year: s, month: P.monthMod(a) }); 71502 for (var m = o + 1, w = h, A = 0, l = 1; A < n; A++, l++) { 71503 (m = P.monthMod(m)) === 0 ? (d = "year", g += 1) : d = "month"; 71504 var u = this._getYear(s, m, g); 71505 w = c.determineDaysOfMonths(m, u) * r + w; 71506 var x = m === 0 ? u : m; 71507 this.timeScaleArray.push({ position: w, value: x, unit: d, year: u, month: m === 0 ? 1 : m }), m++; 71508 } 71509 } }, { key: "generateDayScale", value: function(e) { 71510 var t = e.firstVal, i = e.currentMonth, a = e.currentYear, s = e.hoursWidthOnXAxis, r = e.numberOfDays, n = new B(this.ctx), o = "day", h = t.minDate + 1, c = h, d = function(l, u, x) { 71511 return l > n.determineDaysOfMonths(u + 1, x) && (c = 1, o = "month", p = u += 1), u; 71512 }, g = (24 - t.minHour) * s, p = h, f = d(c, i, a); 71513 t.minHour === 0 && t.minDate === 1 ? (g = 0, p = P.monthMod(t.minMonth), o = "month", c = t.minDate) : t.minDate !== 1 && t.minHour === 0 && t.minMinute === 0 && (g = 0, h = t.minDate, p = h, f = d(c = h, i, a)), this.timeScaleArray.push({ position: g, value: p, unit: o, year: this._getYear(a, f, 0), month: P.monthMod(f), day: c }); 71514 for (var b = g, m = 0; m < r; m++) { 71515 o = "day", f = d(c += 1, f, this._getYear(a, f, 0)); 71516 var w = this._getYear(a, f, 0); 71517 b = 24 * s + b; 71518 var A = c === 1 ? P.monthMod(f) : c; 71519 this.timeScaleArray.push({ position: b, value: A, unit: o, year: w, month: P.monthMod(f), day: A }); 71520 } 71521 } }, { key: "generateHourScale", value: function(e) { 71522 var t = e.firstVal, i = e.currentDate, a = e.currentMonth, s = e.currentYear, r = e.minutesWidthOnXAxis, n = e.numberOfHours, o = new B(this.ctx), h = "hour", c = function(v, k) { 71523 return v > o.determineDaysOfMonths(k + 1, s) && (m = 1, k += 1), { month: k, date: m }; 71524 }, d = function(v, k) { 71525 return v > o.determineDaysOfMonths(k + 1, s) ? k += 1 : k; 71526 }, g = 60 - (t.minMinute + t.minSecond / 60), p = g * r, f = t.minHour + 1, b = f; 71527 g === 60 && (p = 0, b = f = t.minHour); 71528 var m = i; 71529 b >= 24 && (b = 0, m += 1, h = "day"); 71530 var w = c(m, a).month; 71531 w = d(m, w), this.timeScaleArray.push({ position: p, value: f, unit: h, day: m, hour: b, year: s, month: P.monthMod(w) }), b++; 71532 for (var A = p, l = 0; l < n; l++) { 71533 h = "hour", b >= 24 && (b = 0, h = "day", w = c(m += 1, w).month, w = d(m, w)); 71534 var u = this._getYear(s, w, 0); 71535 A = 60 * r + A; 71536 var x = b === 0 ? m : b; 71537 this.timeScaleArray.push({ position: A, value: x, unit: h, hour: b, day: m, year: u, month: P.monthMod(w) }), b++; 71538 } 71539 } }, { key: "generateMinuteScale", value: function(e) { 71540 for (var t = e.currentMillisecond, i = e.currentSecond, a = e.currentMinute, s = e.currentHour, r = e.currentDate, n = e.currentMonth, o = e.currentYear, h = e.minutesWidthOnXAxis, c = e.secondsWidthOnXAxis, d = e.numberOfMinutes, g = a + 1, p = r, f = n, b = o, m = s, w = (60 - i - t / 1e3) * c, A = 0; A < d; A++) 71541 g >= 60 && (g = 0, (m += 1) === 24 && (m = 0)), this.timeScaleArray.push({ position: w, value: g, unit: "minute", hour: m, minute: g, day: p, year: this._getYear(b, f, 0), month: P.monthMod(f) }), w += h, g++; 71542 } }, { key: "generateSecondScale", value: function(e) { 71543 for (var t = e.currentMillisecond, i = e.currentSecond, a = e.currentMinute, s = e.currentHour, r = e.currentDate, n = e.currentMonth, o = e.currentYear, h = e.secondsWidthOnXAxis, c = e.numberOfSeconds, d = i + 1, g = a, p = r, f = n, b = o, m = s, w = (1e3 - t) / 1e3 * h, A = 0; A < c; A++) 71544 d >= 60 && (d = 0, ++g >= 60 && (g = 0, ++m === 24 && (m = 0))), this.timeScaleArray.push({ position: w, value: d, unit: "second", hour: m, minute: g, second: d, day: p, year: this._getYear(b, f, 0), month: P.monthMod(f) }), w += h, d++; 71545 } }, { key: "createRawDateString", value: function(e, t) { 71546 var i = e.year; 71547 return e.month === 0 && (e.month = 1), i += "-" + ("0" + e.month.toString()).slice(-2), e.unit === "day" ? i += e.unit === "day" ? "-" + ("0" + t).slice(-2) : "-01" : i += "-" + ("0" + (e.day ? e.day : "1")).slice(-2), e.unit === "hour" ? i += e.unit === "hour" ? "T" + ("0" + t).slice(-2) : "T00" : i += "T" + ("0" + (e.hour ? e.hour : "0")).slice(-2), e.unit === "minute" ? i += ":" + ("0" + t).slice(-2) : i += ":" + (e.minute ? ("0" + e.minute).slice(-2) : "00"), e.unit === "second" ? i += ":" + ("0" + t).slice(-2) : i += ":00", this.utc && (i += ".000Z"), i; 71548 } }, { key: "formatDates", value: function(e) { 71549 var t = this, i = this.w; 71550 return e.map(function(a) { 71551 var s = a.value.toString(), r = new B(t.ctx), n = t.createRawDateString(a, s), o = r.getDate(r.parseDate(n)); 71552 if (t.utc || (o = r.getDate(r.parseDateWithTimezone(n))), i.config.xaxis.labels.format === void 0) { 71553 var h = "dd MMM", c = i.config.xaxis.labels.datetimeFormatter; 71554 a.unit === "year" && (h = c.year), a.unit === "month" && (h = c.month), a.unit === "day" && (h = c.day), a.unit === "hour" && (h = c.hour), a.unit === "minute" && (h = c.minute), a.unit === "second" && (h = c.second), s = r.formatDate(o, h); 71555 } else 71556 s = r.formatDate(o, i.config.xaxis.labels.format); 71557 return { dateString: n, position: a.position, value: s, unit: a.unit, year: a.year, month: a.month }; 71558 }); 71559 } }, { key: "removeOverlappingTS", value: function(e) { 71560 var t, i = this, a = new M(this.ctx), s = !1; 71561 e.length > 0 && e[0].value && e.every(function(o) { 71562 return o.value.length === e[0].value.length; 71563 }) && (s = !0, t = a.getTextRects(e[0].value).width); 71564 var r = 0, n = e.map(function(o, h) { 71565 if (h > 0 && i.w.config.xaxis.labels.hideOverlappingLabels) { 71566 var c = s ? t : a.getTextRects(e[r].value).width, d = e[r].position; 71567 return o.position > d + c + 10 ? (r = h, o) : null; 71568 } 71569 return o; 71570 }); 71571 return n = n.filter(function(o) { 71572 return o !== null; 71573 }); 71574 } }, { key: "_getYear", value: function(e, t, i) { 71575 return e + Math.floor(t / 12) + i; 71576 } }]), y; 71577 }(), Gt = function() { 71578 function y(e, t) { 71579 F(this, y), this.ctx = t, this.w = t.w, this.el = e; 71580 } 71581 return Y(y, [{ key: "setupElements", value: function() { 71582 var e = this.w.globals, t = this.w.config, i = t.chart.type; 71583 e.axisCharts = ["line", "area", "bar", "rangeBar", "rangeArea", "candlestick", "boxPlot", "scatter", "bubble", "radar", "heatmap", "treemap"].indexOf(i) > -1, e.xyCharts = ["line", "area", "bar", "rangeBar", "rangeArea", "candlestick", "boxPlot", "scatter", "bubble"].indexOf(i) > -1, e.isBarHorizontal = (t.chart.type === "bar" || t.chart.type === "rangeBar" || t.chart.type === "boxPlot") && t.plotOptions.bar.horizontal, e.chartClass = ".apexcharts" + e.chartID, e.dom.baseEl = this.el, e.dom.elWrap = document.createElement("div"), M.setAttrs(e.dom.elWrap, { id: e.chartClass.substring(1), class: "apexcharts-canvas " + e.chartClass.substring(1) }), this.el.appendChild(e.dom.elWrap), e.dom.Paper = new window.SVG.Doc(e.dom.elWrap), e.dom.Paper.attr({ class: "apexcharts-svg", "xmlns:data": "ApexChartsNS", transform: "translate(".concat(t.chart.offsetX, ", ").concat(t.chart.offsetY, ")") }), e.dom.Paper.node.style.background = t.theme.mode !== "dark" || t.chart.background ? t.chart.background : "rgba(0, 0, 0, 0.8)", this.setSVGDimensions(), e.dom.elLegendForeign = document.createElementNS(e.SVGNS, "foreignObject"), M.setAttrs(e.dom.elLegendForeign, { x: 0, y: 0, width: e.svgWidth, height: e.svgHeight }), e.dom.elLegendWrap = document.createElement("div"), e.dom.elLegendWrap.classList.add("apexcharts-legend"), e.dom.elLegendWrap.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap), e.dom.Paper.node.appendChild(e.dom.elLegendForeign), e.dom.elGraphical = e.dom.Paper.group().attr({ class: "apexcharts-inner apexcharts-graphical" }), e.dom.elDefs = e.dom.Paper.defs(), e.dom.Paper.add(e.dom.elGraphical), e.dom.elGraphical.add(e.dom.elDefs); 71584 } }, { key: "plotChartType", value: function(e, t) { 71585 var i = this.w, a = i.config, s = i.globals, r = { series: [], i: [] }, n = { series: [], i: [] }, o = { series: [], i: [] }, h = { series: [], i: [] }, c = { series: [], i: [] }, d = { series: [], i: [] }, g = { series: [], i: [] }, p = { series: [], i: [] }, f = { series: [], seriesRangeEnd: [], i: [] }; 71586 s.series.map(function(k, S) { 71587 var C = 0; 71588 e[S].type !== void 0 ? (e[S].type === "column" || e[S].type === "bar" ? (s.series.length > 1 && a.plotOptions.bar.horizontal && console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"), c.series.push(k), c.i.push(S), C++, i.globals.columnSeries = c.series) : e[S].type === "area" ? (n.series.push(k), n.i.push(S), C++) : e[S].type === "line" ? (r.series.push(k), r.i.push(S), C++) : e[S].type === "scatter" ? (o.series.push(k), o.i.push(S)) : e[S].type === "bubble" ? (h.series.push(k), h.i.push(S), C++) : e[S].type === "candlestick" ? (d.series.push(k), d.i.push(S), C++) : e[S].type === "boxPlot" ? (g.series.push(k), g.i.push(S), C++) : e[S].type === "rangeBar" ? (p.series.push(k), p.i.push(S), C++) : e[S].type === "rangeArea" ? (f.series.push(s.seriesRangeStart[S]), f.seriesRangeEnd.push(s.seriesRangeEnd[S]), f.i.push(S), C++) : console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"), C > 1 && (s.comboCharts = !0)) : (r.series.push(k), r.i.push(S)); 71589 }); 71590 var b = new je(this.ctx, t), m = new Be(this.ctx, t); 71591 this.ctx.pie = new ot(this.ctx); 71592 var w = new Rt(this.ctx); 71593 this.ctx.rangeBar = new Ot(this.ctx, t); 71594 var A = new Ft(this.ctx), l = []; 71595 if (s.comboCharts) { 71596 if (n.series.length > 0 && l.push(b.draw(n.series, "area", n.i)), c.series.length > 0) 71597 if (i.config.chart.stacked) { 71598 var u = new st(this.ctx, t); 71599 l.push(u.draw(c.series, c.i)); 71600 } else 71601 this.ctx.bar = new ke(this.ctx, t), l.push(this.ctx.bar.draw(c.series, c.i)); 71602 if (f.series.length > 0 && l.push(b.draw(f.series, "rangeArea", f.i, f.seriesRangeEnd)), r.series.length > 0 && l.push(b.draw(r.series, "line", r.i)), d.series.length > 0 && l.push(m.draw(d.series, "candlestick", d.i)), g.series.length > 0 && l.push(m.draw(g.series, "boxPlot", g.i)), p.series.length > 0 && l.push(this.ctx.rangeBar.draw(p.series, p.i)), o.series.length > 0) { 71603 var x = new je(this.ctx, t, !0); 71604 l.push(x.draw(o.series, "scatter", o.i)); 71605 } 71606 if (h.series.length > 0) { 71607 var v = new je(this.ctx, t, !0); 71608 l.push(v.draw(h.series, "bubble", h.i)); 71609 } 71610 } else 71611 switch (a.chart.type) { 71612 case "line": 71613 l = b.draw(s.series, "line"); 71614 break; 71615 case "area": 71616 l = b.draw(s.series, "area"); 71617 break; 71618 case "bar": 71619 a.chart.stacked ? l = new st(this.ctx, t).draw(s.series) : (this.ctx.bar = new ke(this.ctx, t), l = this.ctx.bar.draw(s.series)); 71620 break; 71621 case "candlestick": 71622 l = new Be(this.ctx, t).draw(s.series, "candlestick"); 71623 break; 71624 case "boxPlot": 71625 l = new Be(this.ctx, t).draw(s.series, a.chart.type); 71626 break; 71627 case "rangeBar": 71628 l = this.ctx.rangeBar.draw(s.series); 71629 break; 71630 case "rangeArea": 71631 l = b.draw(s.seriesRangeStart, "rangeArea", void 0, s.seriesRangeEnd); 71632 break; 71633 case "heatmap": 71634 l = new Yt(this.ctx, t).draw(s.series); 71635 break; 71636 case "treemap": 71637 l = new Nt(this.ctx, t).draw(s.series); 71638 break; 71639 case "pie": 71640 case "donut": 71641 case "polarArea": 71642 l = this.ctx.pie.draw(s.series); 71643 break; 71644 case "radialBar": 71645 l = w.draw(s.series); 71646 break; 71647 case "radar": 71648 l = A.draw(s.series); 71649 break; 71650 default: 71651 l = b.draw(s.series); 71652 } 71653 return l; 71654 } }, { key: "setSVGDimensions", value: function() { 71655 var e = this.w.globals, t = this.w.config; 71656 e.svgWidth = t.chart.width, e.svgHeight = t.chart.height; 71657 var i = P.getDimensions(this.el), a = t.chart.width.toString().split(/[0-9]+/g).pop(); 71658 a === "%" ? P.isNumber(i[0]) && (i[0].width === 0 && (i = P.getDimensions(this.el.parentNode)), e.svgWidth = i[0] * parseInt(t.chart.width, 10) / 100) : a !== "px" && a !== "" || (e.svgWidth = parseInt(t.chart.width, 10)); 71659 var s = t.chart.height.toString().split(/[0-9]+/g).pop(); 71660 if (e.svgHeight !== "auto" && e.svgHeight !== "") 71661 if (s === "%") { 71662 var r = P.getDimensions(this.el.parentNode); 71663 e.svgHeight = r[1] * parseInt(t.chart.height, 10) / 100; 71664 } else 71665 e.svgHeight = parseInt(t.chart.height, 10); 71666 else 71667 e.axisCharts ? e.svgHeight = e.svgWidth / 1.61 : e.svgHeight = e.svgWidth / 1.2; 71668 if (e.svgWidth < 0 && (e.svgWidth = 0), e.svgHeight < 0 && (e.svgHeight = 0), M.setAttrs(e.dom.Paper.node, { width: e.svgWidth, height: e.svgHeight }), s !== "%") { 71669 var n = t.chart.sparkline.enabled ? 0 : e.axisCharts ? t.chart.parentHeightOffset : 0; 71670 e.dom.Paper.node.parentNode.parentNode.style.minHeight = e.svgHeight + n + "px"; 71671 } 71672 e.dom.elWrap.style.width = e.svgWidth + "px", e.dom.elWrap.style.height = e.svgHeight + "px"; 71673 } }, { key: "shiftGraphPosition", value: function() { 71674 var e = this.w.globals, t = e.translateY, i = { transform: "translate(" + e.translateX + ", " + t + ")" }; 71675 M.setAttrs(e.dom.elGraphical.node, i); 71676 } }, { key: "resizeNonAxisCharts", value: function() { 71677 var e = this.w, t = e.globals, i = 0, a = e.config.chart.sparkline.enabled ? 1 : 15; 71678 a += e.config.grid.padding.bottom, e.config.legend.position !== "top" && e.config.legend.position !== "bottom" || !e.config.legend.show || e.config.legend.floating || (i = new Ke(this.ctx).legendHelpers.getLegendBBox().clwh + 10); 71679 var s = e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"), r = 2.05 * e.globals.radialSize; 71680 if (s && !e.config.chart.sparkline.enabled && e.config.plotOptions.radialBar.startAngle !== 0) { 71681 var n = P.getBoundingClientRect(s); 71682 r = n.bottom; 71683 var o = n.bottom - n.top; 71684 r = Math.max(2.05 * e.globals.radialSize, o); 71685 } 71686 var h = r + t.translateY + i + a; 71687 t.dom.elLegendForeign && t.dom.elLegendForeign.setAttribute("height", h), e.config.chart.height && String(e.config.chart.height).indexOf("%") > 0 || (t.dom.elWrap.style.height = h + "px", M.setAttrs(t.dom.Paper.node, { height: h }), t.dom.Paper.node.parentNode.parentNode.style.minHeight = h + "px"); 71688 } }, { key: "coreCalculations", value: function() { 71689 new De(this.ctx).init(); 71690 } }, { key: "resetGlobals", value: function() { 71691 var e = this, t = function() { 71692 return e.w.config.series.map(function(s) { 71693 return []; 71694 }); 71695 }, i = new Ze(), a = this.w.globals; 71696 i.initGlobalVars(a), a.seriesXvalues = t(), a.seriesYvalues = t(); 71697 } }, { key: "isMultipleY", value: function() { 71698 if (this.w.config.yaxis.constructor === Array && this.w.config.yaxis.length > 1) 71699 return this.w.globals.isMultipleYAxis = !0, !0; 71700 } }, { key: "xySettings", value: function() { 71701 var e = null, t = this.w; 71702 if (t.globals.axisCharts) { 71703 if (t.config.xaxis.crosshairs.position === "back" && new We(this.ctx).drawXCrosshairs(), t.config.yaxis[0].crosshairs.position === "back" && new We(this.ctx).drawYCrosshairs(), t.config.xaxis.type === "datetime" && t.config.xaxis.labels.formatter === void 0) { 71704 this.ctx.timeScale = new Bt(this.ctx); 71705 var i = []; 71706 isFinite(t.globals.minX) && isFinite(t.globals.maxX) && !t.globals.isBarHorizontal ? i = this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX, t.globals.maxX) : t.globals.isBarHorizontal && (i = this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY, t.globals.maxY)), this.ctx.timeScale.recalcDimensionsBasedOnFormat(i); 71707 } 71708 e = new q(this.ctx).getCalculatedRatios(); 71709 } 71710 return e; 71711 } }, { key: "updateSourceChart", value: function(e) { 71712 this.ctx.w.globals.selection = void 0, this.ctx.updateHelpers._updateOptions({ chart: { selection: { xaxis: { min: e.w.globals.minX, max: e.w.globals.maxX } } } }, !1, !1); 71713 } }, { key: "setupBrushHandler", value: function() { 71714 var e = this, t = this.w; 71715 if (t.config.chart.brush.enabled && typeof t.config.chart.events.selection != "function") { 71716 var i = Array.isArray(t.config.chart.brush.targets) ? t.config.chart.brush.targets : [t.config.chart.brush.target]; 71717 i.forEach(function(a) { 71718 var s = ApexCharts.getChartByID(a); 71719 s.w.globals.brushSource = e.ctx, typeof s.w.config.chart.events.zoomed != "function" && (s.w.config.chart.events.zoomed = function() { 71720 e.updateSourceChart(s); 71721 }), typeof s.w.config.chart.events.scrolled != "function" && (s.w.config.chart.events.scrolled = function() { 71722 e.updateSourceChart(s); 71723 }); 71724 }), t.config.chart.events.selection = function(a, s) { 71725 i.forEach(function(r) { 71726 var n = ApexCharts.getChartByID(r), o = P.clone(t.config.yaxis); 71727 if (t.config.chart.brush.autoScaleYaxis && n.w.globals.series.length === 1) { 71728 var h = new we(n); 71729 o = h.autoScaleY(n, o, s); 71730 } 71731 var c = n.w.config.yaxis.reduce(function(d, g, p) { 71732 return [].concat(J(d), [X(X({}, n.w.config.yaxis[p]), {}, { min: o[0].min, max: o[0].max })]); 71733 }, []); 71734 n.ctx.updateHelpers._updateOptions({ xaxis: { min: s.xaxis.min, max: s.xaxis.max }, yaxis: c }, !1, !1, !1, !1); 71735 }); 71736 }; 71737 } 71738 } }]), y; 71739 }(), Vt = function() { 71740 function y(e) { 71741 F(this, y), this.ctx = e, this.w = e.w; 71742 } 71743 return Y(y, [{ key: "_updateOptions", value: function(e) { 71744 var t = this, i = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], a = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], s = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], r = arguments.length > 4 && arguments[4] !== void 0 && arguments[4]; 71745 return new Promise(function(n) { 71746 var o = [t.ctx]; 71747 s && (o = t.ctx.getSyncedCharts()), t.ctx.w.globals.isExecCalled && (o = [t.ctx], t.ctx.w.globals.isExecCalled = !1), o.forEach(function(h, c) { 71748 var d = h.w; 71749 if (d.globals.shouldAnimate = a, i || (d.globals.resized = !0, d.globals.dataChanged = !0, a && h.series.getPreviousPaths()), e && U(e) === "object" && (h.config = new Le(e), e = q.extendArrayProps(h.config, e, d), h.w.globals.chartID !== t.ctx.w.globals.chartID && delete e.series, d.config = P.extend(d.config, e), r && (d.globals.lastXAxis = e.xaxis ? P.clone(e.xaxis) : [], d.globals.lastYAxis = e.yaxis ? P.clone(e.yaxis) : [], d.globals.initialConfig = P.extend({}, d.config), d.globals.initialSeries = P.clone(d.config.series), e.series))) { 71750 for (var g = 0; g < d.globals.collapsedSeriesIndices.length; g++) { 71751 var p = d.config.series[d.globals.collapsedSeriesIndices[g]]; 71752 d.globals.collapsedSeries[g].data = d.globals.axisCharts ? p.data.slice() : p; 71753 } 71754 for (var f = 0; f < d.globals.ancillaryCollapsedSeriesIndices.length; f++) { 71755 var b = d.config.series[d.globals.ancillaryCollapsedSeriesIndices[f]]; 71756 d.globals.ancillaryCollapsedSeries[f].data = d.globals.axisCharts ? b.data.slice() : b; 71757 } 71758 h.series.emptyCollapsedSeries(d.config.series); 71759 } 71760 return h.update(e).then(function() { 71761 c === o.length - 1 && n(h); 71762 }); 71763 }); 71764 }); 71765 } }, { key: "_updateSeries", value: function(e, t) { 71766 var i = this, a = arguments.length > 2 && arguments[2] !== void 0 && arguments[2]; 71767 return new Promise(function(s) { 71768 var r, n = i.w; 71769 return n.globals.shouldAnimate = t, n.globals.dataChanged = !0, t && i.ctx.series.getPreviousPaths(), n.globals.axisCharts ? ((r = e.map(function(o, h) { 71770 return i._extendSeries(o, h); 71771 })).length === 0 && (r = [{ data: [] }]), n.config.series = r) : n.config.series = e.slice(), a && (n.globals.initialConfig.series = P.clone(n.config.series), n.globals.initialSeries = P.clone(n.config.series)), i.ctx.update().then(function() { 71772 s(i.ctx); 71773 }); 71774 }); 71775 } }, { key: "_extendSeries", value: function(e, t) { 71776 var i = this.w, a = i.config.series[t]; 71777 return X(X({}, i.config.series[t]), {}, { name: e.name ? e.name : a == null ? void 0 : a.name, color: e.color ? e.color : a == null ? void 0 : a.color, type: e.type ? e.type : a == null ? void 0 : a.type, group: e.group ? e.group : a == null ? void 0 : a.group, data: e.data ? e.data : a == null ? void 0 : a.data, zIndex: e.zIndex !== void 0 ? e.zIndex : t }); 71778 } }, { key: "toggleDataPointSelection", value: function(e, t) { 71779 var i = this.w, a = null, s = ".apexcharts-series[data\\:realIndex='".concat(e, "']"); 71780 return i.globals.axisCharts ? a = i.globals.dom.Paper.select("".concat(s, " path[j='").concat(t, "'], ").concat(s, " circle[j='").concat(t, "'], ").concat(s, " rect[j='").concat(t, "']")).members[0] : t === void 0 && (a = i.globals.dom.Paper.select("".concat(s, " path[j='").concat(e, "']")).members[0], i.config.chart.type !== "pie" && i.config.chart.type !== "polarArea" && i.config.chart.type !== "donut" || this.ctx.pie.pieClicked(e)), a ? (new M(this.ctx).pathMouseDown(a, null), a.node ? a.node : null) : (console.warn("toggleDataPointSelection: Element not found"), null); 71781 } }, { key: "forceXAxisUpdate", value: function(e) { 71782 var t = this.w; 71783 if (["min", "max"].forEach(function(a) { 71784 e.xaxis[a] !== void 0 && (t.config.xaxis[a] = e.xaxis[a], t.globals.lastXAxis[a] = e.xaxis[a]); 71785 }), e.xaxis.categories && e.xaxis.categories.length && (t.config.xaxis.categories = e.xaxis.categories), t.config.xaxis.convertedCatToNumeric) { 71786 var i = new oe(e); 71787 e = i.convertCatToNumericXaxis(e, this.ctx); 71788 } 71789 return e; 71790 } }, { key: "forceYAxisUpdate", value: function(e) { 71791 return e.chart && e.chart.stacked && e.chart.stackType === "100%" && (Array.isArray(e.yaxis) ? e.yaxis.forEach(function(t, i) { 71792 e.yaxis[i].min = 0, e.yaxis[i].max = 100; 71793 }) : (e.yaxis.min = 0, e.yaxis.max = 100)), e; 71794 } }, { key: "revertDefaultAxisMinMax", value: function(e) { 71795 var t = this, i = this.w, a = i.globals.lastXAxis, s = i.globals.lastYAxis; 71796 e && e.xaxis && (a = e.xaxis), e && e.yaxis && (s = e.yaxis), i.config.xaxis.min = a.min, i.config.xaxis.max = a.max; 71797 var r = function(n) { 71798 s[n] !== void 0 && (i.config.yaxis[n].min = s[n].min, i.config.yaxis[n].max = s[n].max); 71799 }; 71800 i.config.yaxis.map(function(n, o) { 71801 i.globals.zoomed || s[o] !== void 0 ? r(o) : t.ctx.opts.yaxis[o] !== void 0 && (n.min = t.ctx.opts.yaxis[o].min, n.max = t.ctx.opts.yaxis[o].max); 71802 }); 71803 } }]), y; 71804 }(); 71805 be = typeof window < "u" ? window : void 0, Fe = function(y, e) { 71806 var t = (this !== void 0 ? this : y).SVG = function(l) { 71807 if (t.supported) 71808 return l = new t.Doc(l), t.parser.draw || t.prepare(), l; 71809 }; 71810 if (t.ns = "http://www.w3.org/2000/svg", t.xmlns = "http://www.w3.org/2000/xmlns/", t.xlink = "http://www.w3.org/1999/xlink", t.svgjs = "http://svgjs.dev", t.supported = !0, !t.supported) 71811 return !1; 71812 t.did = 1e3, t.eid = function(l) { 71813 return "Svgjs" + c(l) + t.did++; 71814 }, t.create = function(l) { 71815 var u = e.createElementNS(this.ns, l); 71816 return u.setAttribute("id", this.eid(l)), u; 71817 }, t.extend = function() { 71818 var l, u; 71819 u = (l = [].slice.call(arguments)).pop(); 71820 for (var x = l.length - 1; x >= 0; x--) 71821 if (l[x]) 71822 for (var v in u) 71823 l[x].prototype[v] = u[v]; 71824 t.Set && t.Set.inherit && t.Set.inherit(); 71825 }, t.invent = function(l) { 71826 var u = typeof l.create == "function" ? l.create : function() { 71827 this.constructor.call(this, t.create(l.create)); 71828 }; 71829 return l.inherit && (u.prototype = new l.inherit()), l.extend && t.extend(u, l.extend), l.construct && t.extend(l.parent || t.Container, l.construct), u; 71830 }, t.adopt = function(l) { 71831 return l ? l.instance ? l.instance : ((u = l.nodeName == "svg" ? l.parentNode instanceof y.SVGElement ? new t.Nested() : new t.Doc() : l.nodeName == "linearGradient" ? new t.Gradient("linear") : l.nodeName == "radialGradient" ? new t.Gradient("radial") : t[c(l.nodeName)] ? new t[c(l.nodeName)]() : new t.Element(l)).type = l.nodeName, u.node = l, l.instance = u, u instanceof t.Doc && u.namespace().defs(), u.setData(JSON.parse(l.getAttribute("svgjs:data")) || {}), u) : null; 71832 var u; 71833 }, t.prepare = function() { 71834 var l = e.getElementsByTagName("body")[0], u = (l ? new t.Doc(l) : t.adopt(e.documentElement).nested()).size(2, 0); 71835 t.parser = { body: l || e.documentElement, draw: u.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node, poly: u.polyline().node, path: u.path().node, native: t.create("svg") }; 71836 }, t.parser = { native: t.create("svg") }, e.addEventListener("DOMContentLoaded", function() { 71837 t.parser.draw || t.prepare(); 71838 }, !1), t.regex = { numberAndUnit: /^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i, hex: /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, rgb: /rgb\((\d+),(\d+),(\d+)\)/, reference: /#([a-z0-9\-_]+)/i, transforms: /\)\s*,?\s*/, whitespace: /\s/g, isHex: /^#[a-f0-9]{3,6}$/i, isRgb: /^rgb\(/, isCss: /[^:]+:[^;]+;?/, isBlank: /^(\s+)?$/, isNumber: /^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, isPercent: /^-?[\d\.]+%$/, isImage: /\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i, delimiter: /[\s,]+/, hyphen: /([^e])\-/gi, pathLetters: /[MLHVCSQTAZ]/gi, isPathLetter: /[MLHVCSQTAZ]/i, numbersWithDots: /((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi, dots: /\./g }, t.utils = { map: function(l, u) { 71839 for (var x = l.length, v = [], k = 0; k < x; k++) 71840 v.push(u(l[k])); 71841 return v; 71842 }, filter: function(l, u) { 71843 for (var x = l.length, v = [], k = 0; k < x; k++) 71844 u(l[k]) && v.push(l[k]); 71845 return v; 71846 }, filterSVGElements: function(l) { 71847 return this.filter(l, function(u) { 71848 return u instanceof y.SVGElement; 71849 }); 71850 } }, t.defaults = { attrs: { "fill-opacity": 1, "stroke-opacity": 1, "stroke-width": 0, "stroke-linejoin": "miter", "stroke-linecap": "butt", fill: "#000000", stroke: "#000000", opacity: 1, x: 0, y: 0, cx: 0, cy: 0, width: 0, height: 0, r: 0, rx: 0, ry: 0, offset: 0, "stop-opacity": 1, "stop-color": "#000000", "font-size": 16, "font-family": "Helvetica, Arial, sans-serif", "text-anchor": "start" } }, t.Color = function(l) { 71851 var u, x; 71852 this.r = 0, this.g = 0, this.b = 0, l && (typeof l == "string" ? t.regex.isRgb.test(l) ? (u = t.regex.rgb.exec(l.replace(t.regex.whitespace, "")), this.r = parseInt(u[1]), this.g = parseInt(u[2]), this.b = parseInt(u[3])) : t.regex.isHex.test(l) && (u = t.regex.hex.exec((x = l).length == 4 ? ["#", x.substring(1, 2), x.substring(1, 2), x.substring(2, 3), x.substring(2, 3), x.substring(3, 4), x.substring(3, 4)].join("") : x), this.r = parseInt(u[1], 16), this.g = parseInt(u[2], 16), this.b = parseInt(u[3], 16)) : U(l) === "object" && (this.r = l.r, this.g = l.g, this.b = l.b)); 71853 }, t.extend(t.Color, { toString: function() { 71854 return this.toHex(); 71855 }, toHex: function() { 71856 return "#" + d(this.r) + d(this.g) + d(this.b); 71857 }, toRgb: function() { 71858 return "rgb(" + [this.r, this.g, this.b].join() + ")"; 71859 }, brightness: function() { 71860 return this.r / 255 * 0.3 + this.g / 255 * 0.59 + this.b / 255 * 0.11; 71861 }, morph: function(l) { 71862 return this.destination = new t.Color(l), this; 71863 }, at: function(l) { 71864 return this.destination ? (l = l < 0 ? 0 : l > 1 ? 1 : l, new t.Color({ r: ~~(this.r + (this.destination.r - this.r) * l), g: ~~(this.g + (this.destination.g - this.g) * l), b: ~~(this.b + (this.destination.b - this.b) * l) })) : this; 71865 } }), t.Color.test = function(l) { 71866 return l += "", t.regex.isHex.test(l) || t.regex.isRgb.test(l); 71867 }, t.Color.isRgb = function(l) { 71868 return l && typeof l.r == "number" && typeof l.g == "number" && typeof l.b == "number"; 71869 }, t.Color.isColor = function(l) { 71870 return t.Color.isRgb(l) || t.Color.test(l); 71871 }, t.Array = function(l, u) { 71872 (l = (l || []).valueOf()).length == 0 && u && (l = u.valueOf()), this.value = this.parse(l); 71873 }, t.extend(t.Array, { toString: function() { 71874 return this.value.join(" "); 71875 }, valueOf: function() { 71876 return this.value; 71877 }, parse: function(l) { 71878 return l = l.valueOf(), Array.isArray(l) ? l : this.split(l); 71879 } }), t.PointArray = function(l, u) { 71880 t.Array.call(this, l, u || [[0, 0]]); 71881 }, t.PointArray.prototype = new t.Array(), t.PointArray.prototype.constructor = t.PointArray; 71882 for (var i = { M: function(l, u, x) { 71883 return u.x = x.x = l[0], u.y = x.y = l[1], ["M", u.x, u.y]; 71884 }, L: function(l, u) { 71885 return u.x = l[0], u.y = l[1], ["L", l[0], l[1]]; 71886 }, H: function(l, u) { 71887 return u.x = l[0], ["H", l[0]]; 71888 }, V: function(l, u) { 71889 return u.y = l[0], ["V", l[0]]; 71890 }, C: function(l, u) { 71891 return u.x = l[4], u.y = l[5], ["C", l[0], l[1], l[2], l[3], l[4], l[5]]; 71892 }, Q: function(l, u) { 71893 return u.x = l[2], u.y = l[3], ["Q", l[0], l[1], l[2], l[3]]; 71894 }, S: function(l, u) { 71895 return u.x = l[2], u.y = l[3], ["S", l[0], l[1], l[2], l[3]]; 71896 }, Z: function(l, u, x) { 71897 return u.x = x.x, u.y = x.y, ["Z"]; 71898 } }, a = "mlhvqtcsaz".split(""), s = 0, r = a.length; s < r; ++s) 71899 i[a[s]] = function(l) { 71900 return function(u, x, v) { 71901 if (l == "H") 71902 u[0] = u[0] + x.x; 71903 else if (l == "V") 71904 u[0] = u[0] + x.y; 71905 else if (l == "A") 71906 u[5] = u[5] + x.x, u[6] = u[6] + x.y; 71907 else 71908 for (var k = 0, S = u.length; k < S; ++k) 71909 u[k] = u[k] + (k % 2 ? x.y : x.x); 71910 if (i && typeof i[l] == "function") 71911 return i[l](u, x, v); 71912 }; 71913 }(a[s].toUpperCase()); 71914 t.PathArray = function(l, u) { 71915 t.Array.call(this, l, u || [["M", 0, 0]]); 71916 }, t.PathArray.prototype = new t.Array(), t.PathArray.prototype.constructor = t.PathArray, t.extend(t.PathArray, { toString: function() { 71917 return function(l) { 71918 for (var u = 0, x = l.length, v = ""; u < x; u++) 71919 v += l[u][0], l[u][1] != null && (v += l[u][1], l[u][2] != null && (v += " ", v += l[u][2], l[u][3] != null && (v += " ", v += l[u][3], v += " ", v += l[u][4], l[u][5] != null && (v += " ", v += l[u][5], v += " ", v += l[u][6], l[u][7] != null && (v += " ", v += l[u][7]))))); 71920 return v + " "; 71921 }(this.value); 71922 }, move: function(l, u) { 71923 var x = this.bbox(); 71924 return x.x, x.y, this; 71925 }, at: function(l) { 71926 if (!this.destination) 71927 return this; 71928 for (var u = this.value, x = this.destination.value, v = [], k = new t.PathArray(), S = 0, C = u.length; S < C; S++) { 71929 v[S] = [u[S][0]]; 71930 for (var L = 1, I = u[S].length; L < I; L++) 71931 v[S][L] = u[S][L] + (x[S][L] - u[S][L]) * l; 71932 v[S][0] === "A" && (v[S][4] = +(v[S][4] != 0), v[S][5] = +(v[S][5] != 0)); 71933 } 71934 return k.value = v, k; 71935 }, parse: function(l) { 71936 if (l instanceof t.PathArray) 71937 return l.valueOf(); 71938 var u, x = { M: 2, L: 2, H: 1, V: 1, C: 6, S: 4, Q: 4, T: 2, A: 7, Z: 0 }; 71939 l = typeof l == "string" ? l.replace(t.regex.numbersWithDots, o).replace(t.regex.pathLetters, " $& ").replace(t.regex.hyphen, "$1 -").trim().split(t.regex.delimiter) : l.reduce(function(I, z) { 71940 return [].concat.call(I, z); 71941 }, []); 71942 var v = [], k = new t.Point(), S = new t.Point(), C = 0, L = l.length; 71943 do 71944 t.regex.isPathLetter.test(l[C]) ? (u = l[C], ++C) : u == "M" ? u = "L" : u == "m" && (u = "l"), v.push(i[u].call(null, l.slice(C, C += x[u.toUpperCase()]).map(parseFloat), k, S)); 71945 while (L > C); 71946 return v; 71947 }, bbox: function() { 71948 return t.parser.draw || t.prepare(), t.parser.path.setAttribute("d", this.toString()), t.parser.path.getBBox(); 71949 } }), t.Number = t.invent({ create: function(l, u) { 71950 this.value = 0, this.unit = u || "", typeof l == "number" ? this.value = isNaN(l) ? 0 : isFinite(l) ? l : l < 0 ? -34e37 : 34e37 : typeof l == "string" ? (u = l.match(t.regex.numberAndUnit)) && (this.value = parseFloat(u[1]), u[5] == "%" ? this.value /= 100 : u[5] == "s" && (this.value *= 1e3), this.unit = u[5]) : l instanceof t.Number && (this.value = l.valueOf(), this.unit = l.unit); 71951 }, extend: { toString: function() { 71952 return (this.unit == "%" ? ~~(1e8 * this.value) / 1e6 : this.unit == "s" ? this.value / 1e3 : this.value) + this.unit; 71953 }, toJSON: function() { 71954 return this.toString(); 71955 }, valueOf: function() { 71956 return this.value; 71957 }, plus: function(l) { 71958 return l = new t.Number(l), new t.Number(this + l, this.unit || l.unit); 71959 }, minus: function(l) { 71960 return l = new t.Number(l), new t.Number(this - l, this.unit || l.unit); 71961 }, times: function(l) { 71962 return l = new t.Number(l), new t.Number(this * l, this.unit || l.unit); 71963 }, divide: function(l) { 71964 return l = new t.Number(l), new t.Number(this / l, this.unit || l.unit); 71965 }, to: function(l) { 71966 var u = new t.Number(this); 71967 return typeof l == "string" && (u.unit = l), u; 71968 }, morph: function(l) { 71969 return this.destination = new t.Number(l), l.relative && (this.destination.value += this.value), this; 71970 }, at: function(l) { 71971 return this.destination ? new t.Number(this.destination).minus(this).times(l).plus(this) : this; 71972 } } }), t.Element = t.invent({ create: function(l) { 71973 this._stroke = t.defaults.attrs.stroke, this._event = null, this.dom = {}, (this.node = l) && (this.type = l.nodeName, this.node.instance = this, this._stroke = l.getAttribute("stroke") || this._stroke); 71974 }, extend: { x: function(l) { 71975 return this.attr("x", l); 71976 }, y: function(l) { 71977 return this.attr("y", l); 71978 }, cx: function(l) { 71979 return l == null ? this.x() + this.width() / 2 : this.x(l - this.width() / 2); 71980 }, cy: function(l) { 71981 return l == null ? this.y() + this.height() / 2 : this.y(l - this.height() / 2); 71982 }, move: function(l, u) { 71983 return this.x(l).y(u); 71984 }, center: function(l, u) { 71985 return this.cx(l).cy(u); 71986 }, width: function(l) { 71987 return this.attr("width", l); 71988 }, height: function(l) { 71989 return this.attr("height", l); 71990 }, size: function(l, u) { 71991 var x = g(this, l, u); 71992 return this.width(new t.Number(x.width)).height(new t.Number(x.height)); 71993 }, clone: function(l) { 71994 this.writeDataToDom(); 71995 var u = b(this.node.cloneNode(!0)); 71996 return l ? l.add(u) : this.after(u), u; 71997 }, remove: function() { 71998 return this.parent() && this.parent().removeElement(this), this; 71999 }, replace: function(l) { 72000 return this.after(l).remove(), l; 72001 }, addTo: function(l) { 72002 return l.put(this); 72003 }, putIn: function(l) { 72004 return l.add(this); 72005 }, id: function(l) { 72006 return this.attr("id", l); 72007 }, show: function() { 72008 return this.style("display", ""); 72009 }, hide: function() { 72010 return this.style("display", "none"); 72011 }, visible: function() { 72012 return this.style("display") != "none"; 72013 }, toString: function() { 72014 return this.attr("id"); 72015 }, classes: function() { 72016 var l = this.attr("class"); 72017 return l == null ? [] : l.trim().split(t.regex.delimiter); 72018 }, hasClass: function(l) { 72019 return this.classes().indexOf(l) != -1; 72020 }, addClass: function(l) { 72021 if (!this.hasClass(l)) { 72022 var u = this.classes(); 72023 u.push(l), this.attr("class", u.join(" ")); 72024 } 72025 return this; 72026 }, removeClass: function(l) { 72027 return this.hasClass(l) && this.attr("class", this.classes().filter(function(u) { 72028 return u != l; 72029 }).join(" ")), this; 72030 }, toggleClass: function(l) { 72031 return this.hasClass(l) ? this.removeClass(l) : this.addClass(l); 72032 }, reference: function(l) { 72033 return t.get(this.attr(l)); 72034 }, parent: function(l) { 72035 var u = this; 72036 if (!u.node.parentNode) 72037 return null; 72038 if (u = t.adopt(u.node.parentNode), !l) 72039 return u; 72040 for (; u && u.node instanceof y.SVGElement; ) { 72041 if (typeof l == "string" ? u.matches(l) : u instanceof l) 72042 return u; 72043 if (!u.node.parentNode || u.node.parentNode.nodeName == "#document") 72044 return null; 72045 u = t.adopt(u.node.parentNode); 72046 } 72047 }, doc: function() { 72048 return this instanceof t.Doc ? this : this.parent(t.Doc); 72049 }, parents: function(l) { 72050 var u = [], x = this; 72051 do { 72052 if (!(x = x.parent(l)) || !x.node) 72053 break; 72054 u.push(x); 72055 } while (x.parent); 72056 return u; 72057 }, matches: function(l) { 72058 return function(u, x) { 72059 return (u.matches || u.matchesSelector || u.msMatchesSelector || u.mozMatchesSelector || u.webkitMatchesSelector || u.oMatchesSelector).call(u, x); 72060 }(this.node, l); 72061 }, native: function() { 72062 return this.node; 72063 }, svg: function(l) { 72064 var u = e.createElement("svg"); 72065 if (!(l && this instanceof t.Parent)) 72066 return u.appendChild(l = e.createElement("svg")), this.writeDataToDom(), l.appendChild(this.node.cloneNode(!0)), u.innerHTML.replace(/^<svg>/, "").replace(/<\/svg>$/, ""); 72067 u.innerHTML = "<svg>" + l.replace(/\n/, "").replace(/<([\w:-]+)([^<]+?)\/>/g, "<$1$2></$1>") + "</svg>"; 72068 for (var x = 0, v = u.firstChild.childNodes.length; x < v; x++) 72069 this.node.appendChild(u.firstChild.firstChild); 72070 return this; 72071 }, writeDataToDom: function() { 72072 return (this.each || this.lines) && (this.each ? this : this.lines()).each(function() { 72073 this.writeDataToDom(); 72074 }), this.node.removeAttribute("svgjs:data"), Object.keys(this.dom).length && this.node.setAttribute("svgjs:data", JSON.stringify(this.dom)), this; 72075 }, setData: function(l) { 72076 return this.dom = l, this; 72077 }, is: function(l) { 72078 return function(u, x) { 72079 return u instanceof x; 72080 }(this, l); 72081 } } }), t.easing = { "-": function(l) { 72082 return l; 72083 }, "<>": function(l) { 72084 return -Math.cos(l * Math.PI) / 2 + 0.5; 72085 }, ">": function(l) { 72086 return Math.sin(l * Math.PI / 2); 72087 }, "<": function(l) { 72088 return 1 - Math.cos(l * Math.PI / 2); 72089 } }, t.morph = function(l) { 72090 return function(u, x) { 72091 return new t.MorphObj(u, x).at(l); 72092 }; 72093 }, t.Situation = t.invent({ create: function(l) { 72094 this.init = !1, this.reversed = !1, this.reversing = !1, this.duration = new t.Number(l.duration).valueOf(), this.delay = new t.Number(l.delay).valueOf(), this.start = +/* @__PURE__ */ new Date() + this.delay, this.finish = this.start + this.duration, this.ease = l.ease, this.loop = 0, this.loops = !1, this.animations = {}, this.attrs = {}, this.styles = {}, this.transforms = [], this.once = {}; 72095 } }), t.FX = t.invent({ create: function(l) { 72096 this._target = l, this.situations = [], this.active = !1, this.situation = null, this.paused = !1, this.lastPos = 0, this.pos = 0, this.absPos = 0, this._speed = 1; 72097 }, extend: { animate: function(l, u, x) { 72098 U(l) === "object" && (u = l.ease, x = l.delay, l = l.duration); 72099 var v = new t.Situation({ duration: l || 1e3, delay: x || 0, ease: t.easing[u || "-"] || u }); 72100 return this.queue(v), this; 72101 }, target: function(l) { 72102 return l && l instanceof t.Element ? (this._target = l, this) : this._target; 72103 }, timeToAbsPos: function(l) { 72104 return (l - this.situation.start) / (this.situation.duration / this._speed); 72105 }, absPosToTime: function(l) { 72106 return this.situation.duration / this._speed * l + this.situation.start; 72107 }, startAnimFrame: function() { 72108 this.stopAnimFrame(), this.animationFrame = y.requestAnimationFrame((function() { 72109 this.step(); 72110 }).bind(this)); 72111 }, stopAnimFrame: function() { 72112 y.cancelAnimationFrame(this.animationFrame); 72113 }, start: function() { 72114 return !this.active && this.situation && (this.active = !0, this.startCurrent()), this; 72115 }, startCurrent: function() { 72116 return this.situation.start = +/* @__PURE__ */ new Date() + this.situation.delay / this._speed, this.situation.finish = this.situation.start + this.situation.duration / this._speed, this.initAnimations().step(); 72117 }, queue: function(l) { 72118 return (typeof l == "function" || l instanceof t.Situation) && this.situations.push(l), this.situation || (this.situation = this.situations.shift()), this; 72119 }, dequeue: function() { 72120 return this.stop(), this.situation = this.situations.shift(), this.situation && (this.situation instanceof t.Situation ? this.start() : this.situation.call(this)), this; 72121 }, initAnimations: function() { 72122 var l, u = this.situation; 72123 if (u.init) 72124 return this; 72125 for (var x in u.animations) { 72126 l = this.target()[x](), Array.isArray(l) || (l = [l]), Array.isArray(u.animations[x]) || (u.animations[x] = [u.animations[x]]); 72127 for (var v = l.length; v--; ) 72128 u.animations[x][v] instanceof t.Number && (l[v] = new t.Number(l[v])), u.animations[x][v] = l[v].morph(u.animations[x][v]); 72129 } 72130 for (var x in u.attrs) 72131 u.attrs[x] = new t.MorphObj(this.target().attr(x), u.attrs[x]); 72132 for (var x in u.styles) 72133 u.styles[x] = new t.MorphObj(this.target().style(x), u.styles[x]); 72134 return u.initialTransformation = this.target().matrixify(), u.init = !0, this; 72135 }, clearQueue: function() { 72136 return this.situations = [], this; 72137 }, clearCurrent: function() { 72138 return this.situation = null, this; 72139 }, stop: function(l, u) { 72140 var x = this.active; 72141 return this.active = !1, u && this.clearQueue(), l && this.situation && (!x && this.startCurrent(), this.atEnd()), this.stopAnimFrame(), this.clearCurrent(); 72142 }, after: function(l) { 72143 var u = this.last(); 72144 return this.target().on("finished.fx", function x(v) { 72145 v.detail.situation == u && (l.call(this, u), this.off("finished.fx", x)); 72146 }), this._callStart(); 72147 }, during: function(l) { 72148 var u = this.last(), x = function(v) { 72149 v.detail.situation == u && l.call(this, v.detail.pos, t.morph(v.detail.pos), v.detail.eased, u); 72150 }; 72151 return this.target().off("during.fx", x).on("during.fx", x), this.after(function() { 72152 this.off("during.fx", x); 72153 }), this._callStart(); 72154 }, afterAll: function(l) { 72155 var u = function x(v) { 72156 l.call(this), this.off("allfinished.fx", x); 72157 }; 72158 return this.target().off("allfinished.fx", u).on("allfinished.fx", u), this._callStart(); 72159 }, last: function() { 72160 return this.situations.length ? this.situations[this.situations.length - 1] : this.situation; 72161 }, add: function(l, u, x) { 72162 return this.last()[x || "animations"][l] = u, this._callStart(); 72163 }, step: function(l) { 72164 var u, x, v; 72165 l || (this.absPos = this.timeToAbsPos(+/* @__PURE__ */ new Date())), this.situation.loops !== !1 ? (u = Math.max(this.absPos, 0), x = Math.floor(u), this.situation.loops === !0 || x < this.situation.loops ? (this.pos = u - x, v = this.situation.loop, this.situation.loop = x) : (this.absPos = this.situation.loops, this.pos = 1, v = this.situation.loop - 1, this.situation.loop = this.situation.loops), this.situation.reversing && (this.situation.reversed = this.situation.reversed != !!((this.situation.loop - v) % 2))) : (this.absPos = Math.min(this.absPos, 1), this.pos = this.absPos), this.pos < 0 && (this.pos = 0), this.situation.reversed && (this.pos = 1 - this.pos); 72166 var k = this.situation.ease(this.pos); 72167 for (var S in this.situation.once) 72168 S > this.lastPos && S <= k && (this.situation.once[S].call(this.target(), this.pos, k), delete this.situation.once[S]); 72169 return this.active && this.target().fire("during", { pos: this.pos, eased: k, fx: this, situation: this.situation }), this.situation ? (this.eachAt(), this.pos == 1 && !this.situation.reversed || this.situation.reversed && this.pos == 0 ? (this.stopAnimFrame(), this.target().fire("finished", { fx: this, situation: this.situation }), this.situations.length || (this.target().fire("allfinished"), this.situations.length || (this.target().off(".fx"), this.active = !1)), this.active ? this.dequeue() : this.clearCurrent()) : !this.paused && this.active && this.startAnimFrame(), this.lastPos = k, this) : this; 72170 }, eachAt: function() { 72171 var l, u = this, x = this.target(), v = this.situation; 72172 for (var k in v.animations) 72173 l = [].concat(v.animations[k]).map(function(L) { 72174 return typeof L != "string" && L.at ? L.at(v.ease(u.pos), u.pos) : L; 72175 }), x[k].apply(x, l); 72176 for (var k in v.attrs) 72177 l = [k].concat(v.attrs[k]).map(function(I) { 72178 return typeof I != "string" && I.at ? I.at(v.ease(u.pos), u.pos) : I; 72179 }), x.attr.apply(x, l); 72180 for (var k in v.styles) 72181 l = [k].concat(v.styles[k]).map(function(I) { 72182 return typeof I != "string" && I.at ? I.at(v.ease(u.pos), u.pos) : I; 72183 }), x.style.apply(x, l); 72184 if (v.transforms.length) { 72185 l = v.initialTransformation, k = 0; 72186 for (var S = v.transforms.length; k < S; k++) { 72187 var C = v.transforms[k]; 72188 C instanceof t.Matrix ? l = C.relative ? l.multiply(new t.Matrix().morph(C).at(v.ease(this.pos))) : l.morph(C).at(v.ease(this.pos)) : (C.relative || C.undo(l.extract()), l = l.multiply(C.at(v.ease(this.pos)))); 72189 } 72190 x.matrix(l); 72191 } 72192 return this; 72193 }, once: function(l, u, x) { 72194 var v = this.last(); 72195 return x || (l = v.ease(l)), v.once[l] = u, this; 72196 }, _callStart: function() { 72197 return setTimeout((function() { 72198 this.start(); 72199 }).bind(this), 0), this; 72200 } }, parent: t.Element, construct: { animate: function(l, u, x) { 72201 return (this.fx || (this.fx = new t.FX(this))).animate(l, u, x); 72202 }, delay: function(l) { 72203 return (this.fx || (this.fx = new t.FX(this))).delay(l); 72204 }, stop: function(l, u) { 72205 return this.fx && this.fx.stop(l, u), this; 72206 }, finish: function() { 72207 return this.fx && this.fx.finish(), this; 72208 } } }), t.MorphObj = t.invent({ create: function(l, u) { 72209 return t.Color.isColor(u) ? new t.Color(l).morph(u) : t.regex.delimiter.test(l) ? t.regex.pathLetters.test(l) ? new t.PathArray(l).morph(u) : new t.Array(l).morph(u) : t.regex.numberAndUnit.test(u) ? new t.Number(l).morph(u) : (this.value = l, void (this.destination = u)); 72210 }, extend: { at: function(l, u) { 72211 return u < 1 ? this.value : this.destination; 72212 }, valueOf: function() { 72213 return this.value; 72214 } } }), t.extend(t.FX, { attr: function(l, u, x) { 72215 if (U(l) === "object") 72216 for (var v in l) 72217 this.attr(v, l[v]); 72218 else 72219 this.add(l, u, "attrs"); 72220 return this; 72221 }, plot: function(l, u, x, v) { 72222 return arguments.length == 4 ? this.plot([l, u, x, v]) : this.add("plot", new (this.target()).morphArray(l)); 72223 } }), t.Box = t.invent({ create: function(l, u, x, v) { 72224 if (!(U(l) !== "object" || l instanceof t.Element)) 72225 return t.Box.call(this, l.left != null ? l.left : l.x, l.top != null ? l.top : l.y, l.width, l.height); 72226 var k; 72227 arguments.length == 4 && (this.x = l, this.y = u, this.width = x, this.height = v), (k = this).x == null && (k.x = 0, k.y = 0, k.width = 0, k.height = 0), k.w = k.width, k.h = k.height, k.x2 = k.x + k.width, k.y2 = k.y + k.height, k.cx = k.x + k.width / 2, k.cy = k.y + k.height / 2; 72228 } }), t.BBox = t.invent({ create: function(l) { 72229 if (t.Box.apply(this, [].slice.call(arguments)), l instanceof t.Element) { 72230 var u; 72231 try { 72232 if (!e.documentElement.contains) { 72233 for (var x = l.node; x.parentNode; ) 72234 x = x.parentNode; 72235 if (x != e) 72236 throw new Error("Element not in the dom"); 72237 } 72238 u = l.node.getBBox(); 72239 } catch { 72240 if (l instanceof t.Shape) { 72241 t.parser.draw || t.prepare(); 72242 var v = l.clone(t.parser.draw.instance).show(); 72243 v && v.node && typeof v.node.getBBox == "function" && (u = v.node.getBBox()), v && typeof v.remove == "function" && v.remove(); 72244 } else 72245 u = { x: l.node.clientLeft, y: l.node.clientTop, width: l.node.clientWidth, height: l.node.clientHeight }; 72246 } 72247 t.Box.call(this, u); 72248 } 72249 }, inherit: t.Box, parent: t.Element, construct: { bbox: function() { 72250 return new t.BBox(this); 72251 } } }), t.BBox.prototype.constructor = t.BBox, t.Matrix = t.invent({ create: function(l) { 72252 var u = f([1, 0, 0, 1, 0, 0]); 72253 l = l === null ? u : l instanceof t.Element ? l.matrixify() : typeof l == "string" ? f(l.split(t.regex.delimiter).map(parseFloat)) : arguments.length == 6 ? f([].slice.call(arguments)) : Array.isArray(l) ? f(l) : l && U(l) === "object" ? l : u; 72254 for (var x = w.length - 1; x >= 0; --x) 72255 this[w[x]] = l[w[x]] != null ? l[w[x]] : u[w[x]]; 72256 }, extend: { extract: function() { 72257 var l = p(this, 0, 1); 72258 p(this, 1, 0); 72259 var u = 180 / Math.PI * Math.atan2(l.y, l.x) - 90; 72260 return { x: this.e, y: this.f, transformedX: (this.e * Math.cos(u * Math.PI / 180) + this.f * Math.sin(u * Math.PI / 180)) / Math.sqrt(this.a * this.a + this.b * this.b), transformedY: (this.f * Math.cos(u * Math.PI / 180) + this.e * Math.sin(-u * Math.PI / 180)) / Math.sqrt(this.c * this.c + this.d * this.d), rotation: u, a: this.a, b: this.b, c: this.c, d: this.d, e: this.e, f: this.f, matrix: new t.Matrix(this) }; 72261 }, clone: function() { 72262 return new t.Matrix(this); 72263 }, morph: function(l) { 72264 return this.destination = new t.Matrix(l), this; 72265 }, multiply: function(l) { 72266 return new t.Matrix(this.native().multiply(function(u) { 72267 return u instanceof t.Matrix || (u = new t.Matrix(u)), u; 72268 }(l).native())); 72269 }, inverse: function() { 72270 return new t.Matrix(this.native().inverse()); 72271 }, translate: function(l, u) { 72272 return new t.Matrix(this.native().translate(l || 0, u || 0)); 72273 }, native: function() { 72274 for (var l = t.parser.native.createSVGMatrix(), u = w.length - 1; u >= 0; u--) 72275 l[w[u]] = this[w[u]]; 72276 return l; 72277 }, toString: function() { 72278 return "matrix(" + m(this.a) + "," + m(this.b) + "," + m(this.c) + "," + m(this.d) + "," + m(this.e) + "," + m(this.f) + ")"; 72279 } }, parent: t.Element, construct: { ctm: function() { 72280 return new t.Matrix(this.node.getCTM()); 72281 }, screenCTM: function() { 72282 if (this instanceof t.Nested) { 72283 var l = this.rect(1, 1), u = l.node.getScreenCTM(); 72284 return l.remove(), new t.Matrix(u); 72285 } 72286 return new t.Matrix(this.node.getScreenCTM()); 72287 } } }), t.Point = t.invent({ create: function(l, u) { 72288 var x; 72289 x = Array.isArray(l) ? { x: l[0], y: l[1] } : U(l) === "object" ? { x: l.x, y: l.y } : l != null ? { x: l, y: u ?? l } : { x: 0, y: 0 }, this.x = x.x, this.y = x.y; 72290 }, extend: { clone: function() { 72291 return new t.Point(this); 72292 }, morph: function(l, u) { 72293 return this.destination = new t.Point(l, u), this; 72294 } } }), t.extend(t.Element, { point: function(l, u) { 72295 return new t.Point(l, u).transform(this.screenCTM().inverse()); 72296 } }), t.extend(t.Element, { attr: function(l, u, x) { 72297 if (l == null) { 72298 for (l = {}, x = (u = this.node.attributes).length - 1; x >= 0; x--) 72299 l[u[x].nodeName] = t.regex.isNumber.test(u[x].nodeValue) ? parseFloat(u[x].nodeValue) : u[x].nodeValue; 72300 return l; 72301 } 72302 if (U(l) === "object") 72303 for (var v in l) 72304 this.attr(v, l[v]); 72305 else if (u === null) 72306 this.node.removeAttribute(l); 72307 else { 72308 if (u == null) 72309 return (u = this.node.getAttribute(l)) == null ? t.defaults.attrs[l] : t.regex.isNumber.test(u) ? parseFloat(u) : u; 72310 l == "stroke-width" ? this.attr("stroke", parseFloat(u) > 0 ? this._stroke : null) : l == "stroke" && (this._stroke = u), l != "fill" && l != "stroke" || (t.regex.isImage.test(u) && (u = this.doc().defs().image(u, 0, 0)), u instanceof t.Image && (u = this.doc().defs().pattern(0, 0, function() { 72311 this.add(u); 72312 }))), typeof u == "number" ? u = new t.Number(u) : t.Color.isColor(u) ? u = new t.Color(u) : Array.isArray(u) && (u = new t.Array(u)), l == "leading" ? this.leading && this.leading(u) : typeof x == "string" ? this.node.setAttributeNS(x, l, u.toString()) : this.node.setAttribute(l, u.toString()), !this.rebuild || l != "font-size" && l != "x" || this.rebuild(l, u); 72313 } 72314 return this; 72315 } }), t.extend(t.Element, { transform: function(l, u) { 72316 var x; 72317 return U(l) !== "object" ? (x = new t.Matrix(this).extract(), typeof l == "string" ? x[l] : x) : (x = new t.Matrix(this), u = !!u || !!l.relative, l.a != null && (x = u ? x.multiply(new t.Matrix(l)) : new t.Matrix(l)), this.attr("transform", x)); 72318 } }), t.extend(t.Element, { untransform: function() { 72319 return this.attr("transform", null); 72320 }, matrixify: function() { 72321 return (this.attr("transform") || "").split(t.regex.transforms).slice(0, -1).map(function(l) { 72322 var u = l.trim().split("("); 72323 return [u[0], u[1].split(t.regex.delimiter).map(function(x) { 72324 return parseFloat(x); 72325 })]; 72326 }).reduce(function(l, u) { 72327 return u[0] == "matrix" ? l.multiply(f(u[1])) : l[u[0]].apply(l, u[1]); 72328 }, new t.Matrix()); 72329 }, toParent: function(l) { 72330 if (this == l) 72331 return this; 72332 var u = this.screenCTM(), x = l.screenCTM().inverse(); 72333 return this.addTo(l).untransform().transform(x.multiply(u)), this; 72334 }, toDoc: function() { 72335 return this.toParent(this.doc()); 72336 } }), t.Transformation = t.invent({ create: function(l, u) { 72337 if (arguments.length > 1 && typeof u != "boolean") 72338 return this.constructor.call(this, [].slice.call(arguments)); 72339 if (Array.isArray(l)) 72340 for (var x = 0, v = this.arguments.length; x < v; ++x) 72341 this[this.arguments[x]] = l[x]; 72342 else if (l && U(l) === "object") 72343 for (x = 0, v = this.arguments.length; x < v; ++x) 72344 this[this.arguments[x]] = l[this.arguments[x]]; 72345 this.inversed = !1, u === !0 && (this.inversed = !0); 72346 } }), t.Translate = t.invent({ parent: t.Matrix, inherit: t.Transformation, create: function(l, u) { 72347 this.constructor.apply(this, [].slice.call(arguments)); 72348 }, extend: { arguments: ["transformedX", "transformedY"], method: "translate" } }), t.extend(t.Element, { style: function(l, u) { 72349 if (arguments.length == 0) 72350 return this.node.style.cssText || ""; 72351 if (arguments.length < 2) 72352 if (U(l) === "object") 72353 for (var x in l) 72354 this.style(x, l[x]); 72355 else { 72356 if (!t.regex.isCss.test(l)) 72357 return this.node.style[h(l)]; 72358 for (l = l.split(/\s*;\s*/).filter(function(v) { 72359 return !!v; 72360 }).map(function(v) { 72361 return v.split(/\s*:\s*/); 72362 }); u = l.pop(); ) 72363 this.style(u[0], u[1]); 72364 } 72365 else 72366 this.node.style[h(l)] = u === null || t.regex.isBlank.test(u) ? "" : u; 72367 return this; 72368 } }), t.Parent = t.invent({ create: function(l) { 72369 this.constructor.call(this, l); 72370 }, inherit: t.Element, extend: { children: function() { 72371 return t.utils.map(t.utils.filterSVGElements(this.node.childNodes), function(l) { 72372 return t.adopt(l); 72373 }); 72374 }, add: function(l, u) { 72375 return u == null ? this.node.appendChild(l.node) : l.node != this.node.childNodes[u] && this.node.insertBefore(l.node, this.node.childNodes[u]), this; 72376 }, put: function(l, u) { 72377 return this.add(l, u), l; 72378 }, has: function(l) { 72379 return this.index(l) >= 0; 72380 }, index: function(l) { 72381 return [].slice.call(this.node.childNodes).indexOf(l.node); 72382 }, get: function(l) { 72383 return t.adopt(this.node.childNodes[l]); 72384 }, first: function() { 72385 return this.get(0); 72386 }, last: function() { 72387 return this.get(this.node.childNodes.length - 1); 72388 }, each: function(l, u) { 72389 for (var x = this.children(), v = 0, k = x.length; v < k; v++) 72390 x[v] instanceof t.Element && l.apply(x[v], [v, x]), u && x[v] instanceof t.Container && x[v].each(l, u); 72391 return this; 72392 }, removeElement: function(l) { 72393 return this.node.removeChild(l.node), this; 72394 }, clear: function() { 72395 for (; this.node.hasChildNodes(); ) 72396 this.node.removeChild(this.node.lastChild); 72397 return delete this._defs, this; 72398 }, defs: function() { 72399 return this.doc().defs(); 72400 } } }), t.extend(t.Parent, { ungroup: function(l, u) { 72401 return u === 0 || this instanceof t.Defs || this.node == t.parser.draw || (l = l || (this instanceof t.Doc ? this : this.parent(t.Parent)), u = u || 1 / 0, this.each(function() { 72402 return this instanceof t.Defs ? this : this instanceof t.Parent ? this.ungroup(l, u - 1) : this.toParent(l); 72403 }), this.node.firstChild || this.remove()), this; 72404 }, flatten: function(l, u) { 72405 return this.ungroup(l, u); 72406 } }), t.Container = t.invent({ create: function(l) { 72407 this.constructor.call(this, l); 72408 }, inherit: t.Parent }), t.ViewBox = t.invent({ parent: t.Container, construct: {} }), ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mouseout", "mousemove", "touchstart", "touchmove", "touchleave", "touchend", "touchcancel"].forEach(function(l) { 72409 t.Element.prototype[l] = function(u) { 72410 return t.on(this.node, l, u), this; 72411 }; 72412 }), t.listeners = [], t.handlerMap = [], t.listenerId = 0, t.on = function(l, u, x, v, k) { 72413 var S = x.bind(v || l.instance || l), C = (t.handlerMap.indexOf(l) + 1 || t.handlerMap.push(l)) - 1, L = u.split(".")[0], I = u.split(".")[1] || "*"; 72414 t.listeners[C] = t.listeners[C] || {}, t.listeners[C][L] = t.listeners[C][L] || {}, t.listeners[C][L][I] = t.listeners[C][L][I] || {}, x._svgjsListenerId || (x._svgjsListenerId = ++t.listenerId), t.listeners[C][L][I][x._svgjsListenerId] = S, l.addEventListener(L, S, k || { passive: !0 }); 72415 }, t.off = function(l, u, x) { 72416 var v = t.handlerMap.indexOf(l), k = u && u.split(".")[0], S = u && u.split(".")[1], C = ""; 72417 if (v != -1) 72418 if (x) { 72419 if (typeof x == "function" && (x = x._svgjsListenerId), !x) 72420 return; 72421 t.listeners[v][k] && t.listeners[v][k][S || "*"] && (l.removeEventListener(k, t.listeners[v][k][S || "*"][x], !1), delete t.listeners[v][k][S || "*"][x]); 72422 } else if (S && k) { 72423 if (t.listeners[v][k] && t.listeners[v][k][S]) { 72424 for (var L in t.listeners[v][k][S]) 72425 t.off(l, [k, S].join("."), L); 72426 delete t.listeners[v][k][S]; 72427 } 72428 } else if (S) 72429 for (var I in t.listeners[v]) 72430 for (var C in t.listeners[v][I]) 72431 S === C && t.off(l, [I, S].join(".")); 72432 else if (k) { 72433 if (t.listeners[v][k]) { 72434 for (var C in t.listeners[v][k]) 72435 t.off(l, [k, C].join(".")); 72436 delete t.listeners[v][k]; 72437 } 72438 } else { 72439 for (var I in t.listeners[v]) 72440 t.off(l, I); 72441 delete t.listeners[v], delete t.handlerMap[v]; 72442 } 72443 }, t.extend(t.Element, { on: function(l, u, x, v) { 72444 return t.on(this.node, l, u, x, v), this; 72445 }, off: function(l, u) { 72446 return t.off(this.node, l, u), this; 72447 }, fire: function(l, u) { 72448 return l instanceof y.Event ? this.node.dispatchEvent(l) : this.node.dispatchEvent(l = new t.CustomEvent(l, { detail: u, cancelable: !0 })), this._event = l, this; 72449 }, event: function() { 72450 return this._event; 72451 } }), t.Defs = t.invent({ create: "defs", inherit: t.Container }), t.G = t.invent({ create: "g", inherit: t.Container, extend: { x: function(l) { 72452 return l == null ? this.transform("x") : this.transform({ x: l - this.x() }, !0); 72453 } }, construct: { group: function() { 72454 return this.put(new t.G()); 72455 } } }), t.Doc = t.invent({ create: function(l) { 72456 l && ((l = typeof l == "string" ? e.getElementById(l) : l).nodeName == "svg" ? this.constructor.call(this, l) : (this.constructor.call(this, t.create("svg")), l.appendChild(this.node), this.size("100%", "100%")), this.namespace().defs()); 72457 }, inherit: t.Container, extend: { namespace: function() { 72458 return this.attr({ xmlns: t.ns, version: "1.1" }).attr("xmlns:xlink", t.xlink, t.xmlns).attr("xmlns:svgjs", t.svgjs, t.xmlns); 72459 }, defs: function() { 72460 var l; 72461 return this._defs || ((l = this.node.getElementsByTagName("defs")[0]) ? this._defs = t.adopt(l) : this._defs = new t.Defs(), this.node.appendChild(this._defs.node)), this._defs; 72462 }, parent: function() { 72463 return this.node.parentNode && this.node.parentNode.nodeName != "#document" ? this.node.parentNode : null; 72464 }, remove: function() { 72465 return this.parent() && this.parent().removeChild(this.node), this; 72466 }, clear: function() { 72467 for (; this.node.hasChildNodes(); ) 72468 this.node.removeChild(this.node.lastChild); 72469 return delete this._defs, t.parser.draw && !t.parser.draw.parentNode && this.node.appendChild(t.parser.draw), this; 72470 }, clone: function(l) { 72471 this.writeDataToDom(); 72472 var u = this.node, x = b(u.cloneNode(!0)); 72473 return l ? (l.node || l).appendChild(x.node) : u.parentNode.insertBefore(x.node, u.nextSibling), x; 72474 } } }), t.extend(t.Element, {}), t.Gradient = t.invent({ create: function(l) { 72475 this.constructor.call(this, t.create(l + "Gradient")), this.type = l; 72476 }, inherit: t.Container, extend: { at: function(l, u, x) { 72477 return this.put(new t.Stop()).update(l, u, x); 72478 }, update: function(l) { 72479 return this.clear(), typeof l == "function" && l.call(this, this), this; 72480 }, fill: function() { 72481 return "url(#" + this.id() + ")"; 72482 }, toString: function() { 72483 return this.fill(); 72484 }, attr: function(l, u, x) { 72485 return l == "transform" && (l = "gradientTransform"), t.Container.prototype.attr.call(this, l, u, x); 72486 } }, construct: { gradient: function(l, u) { 72487 return this.defs().gradient(l, u); 72488 } } }), t.extend(t.Gradient, t.FX, { from: function(l, u) { 72489 return (this._target || this).type == "radial" ? this.attr({ fx: new t.Number(l), fy: new t.Number(u) }) : this.attr({ x1: new t.Number(l), y1: new t.Number(u) }); 72490 }, to: function(l, u) { 72491 return (this._target || this).type == "radial" ? this.attr({ cx: new t.Number(l), cy: new t.Number(u) }) : this.attr({ x2: new t.Number(l), y2: new t.Number(u) }); 72492 } }), t.extend(t.Defs, { gradient: function(l, u) { 72493 return this.put(new t.Gradient(l)).update(u); 72494 } }), t.Stop = t.invent({ create: "stop", inherit: t.Element, extend: { update: function(l) { 72495 return (typeof l == "number" || l instanceof t.Number) && (l = { offset: arguments[0], color: arguments[1], opacity: arguments[2] }), l.opacity != null && this.attr("stop-opacity", l.opacity), l.color != null && this.attr("stop-color", l.color), l.offset != null && this.attr("offset", new t.Number(l.offset)), this; 72496 } } }), t.Pattern = t.invent({ create: "pattern", inherit: t.Container, extend: { fill: function() { 72497 return "url(#" + this.id() + ")"; 72498 }, update: function(l) { 72499 return this.clear(), typeof l == "function" && l.call(this, this), this; 72500 }, toString: function() { 72501 return this.fill(); 72502 }, attr: function(l, u, x) { 72503 return l == "transform" && (l = "patternTransform"), t.Container.prototype.attr.call(this, l, u, x); 72504 } }, construct: { pattern: function(l, u, x) { 72505 return this.defs().pattern(l, u, x); 72506 } } }), t.extend(t.Defs, { pattern: function(l, u, x) { 72507 return this.put(new t.Pattern()).update(x).attr({ x: 0, y: 0, width: l, height: u, patternUnits: "userSpaceOnUse" }); 72508 } }), t.Shape = t.invent({ create: function(l) { 72509 this.constructor.call(this, l); 72510 }, inherit: t.Element }), t.Symbol = t.invent({ create: "symbol", inherit: t.Container, construct: { symbol: function() { 72511 return this.put(new t.Symbol()); 72512 } } }), t.Use = t.invent({ create: "use", inherit: t.Shape, extend: { element: function(l, u) { 72513 return this.attr("href", (u || "") + "#" + l, t.xlink); 72514 } }, construct: { use: function(l, u) { 72515 return this.put(new t.Use()).element(l, u); 72516 } } }), t.Rect = t.invent({ create: "rect", inherit: t.Shape, construct: { rect: function(l, u) { 72517 return this.put(new t.Rect()).size(l, u); 72518 } } }), t.Circle = t.invent({ create: "circle", inherit: t.Shape, construct: { circle: function(l) { 72519 return this.put(new t.Circle()).rx(new t.Number(l).divide(2)).move(0, 0); 72520 } } }), t.extend(t.Circle, t.FX, { rx: function(l) { 72521 return this.attr("r", l); 72522 }, ry: function(l) { 72523 return this.rx(l); 72524 } }), t.Ellipse = t.invent({ create: "ellipse", inherit: t.Shape, construct: { ellipse: function(l, u) { 72525 return this.put(new t.Ellipse()).size(l, u).move(0, 0); 72526 } } }), t.extend(t.Ellipse, t.Rect, t.FX, { rx: function(l) { 72527 return this.attr("rx", l); 72528 }, ry: function(l) { 72529 return this.attr("ry", l); 72530 } }), t.extend(t.Circle, t.Ellipse, { x: function(l) { 72531 return l == null ? this.cx() - this.rx() : this.cx(l + this.rx()); 72532 }, y: function(l) { 72533 return l == null ? this.cy() - this.ry() : this.cy(l + this.ry()); 72534 }, cx: function(l) { 72535 return l == null ? this.attr("cx") : this.attr("cx", l); 72536 }, cy: function(l) { 72537 return l == null ? this.attr("cy") : this.attr("cy", l); 72538 }, width: function(l) { 72539 return l == null ? 2 * this.rx() : this.rx(new t.Number(l).divide(2)); 72540 }, height: function(l) { 72541 return l == null ? 2 * this.ry() : this.ry(new t.Number(l).divide(2)); 72542 }, size: function(l, u) { 72543 var x = g(this, l, u); 72544 return this.rx(new t.Number(x.width).divide(2)).ry(new t.Number(x.height).divide(2)); 72545 } }), t.Line = t.invent({ create: "line", inherit: t.Shape, extend: { array: function() { 72546 return new t.PointArray([[this.attr("x1"), this.attr("y1")], [this.attr("x2"), this.attr("y2")]]); 72547 }, plot: function(l, u, x, v) { 72548 return l == null ? this.array() : (l = u !== void 0 ? { x1: l, y1: u, x2: x, y2: v } : new t.PointArray(l).toLine(), this.attr(l)); 72549 }, move: function(l, u) { 72550 return this.attr(this.array().move(l, u).toLine()); 72551 }, size: function(l, u) { 72552 var x = g(this, l, u); 72553 return this.attr(this.array().size(x.width, x.height).toLine()); 72554 } }, construct: { line: function(l, u, x, v) { 72555 return t.Line.prototype.plot.apply(this.put(new t.Line()), l != null ? [l, u, x, v] : [0, 0, 0, 0]); 72556 } } }), t.Polyline = t.invent({ create: "polyline", inherit: t.Shape, construct: { polyline: function(l) { 72557 return this.put(new t.Polyline()).plot(l || new t.PointArray()); 72558 } } }), t.Polygon = t.invent({ create: "polygon", inherit: t.Shape, construct: { polygon: function(l) { 72559 return this.put(new t.Polygon()).plot(l || new t.PointArray()); 72560 } } }), t.extend(t.Polyline, t.Polygon, { array: function() { 72561 return this._array || (this._array = new t.PointArray(this.attr("points"))); 72562 }, plot: function(l) { 72563 return l == null ? this.array() : this.clear().attr("points", typeof l == "string" ? l : this._array = new t.PointArray(l)); 72564 }, clear: function() { 72565 return delete this._array, this; 72566 }, move: function(l, u) { 72567 return this.attr("points", this.array().move(l, u)); 72568 }, size: function(l, u) { 72569 var x = g(this, l, u); 72570 return this.attr("points", this.array().size(x.width, x.height)); 72571 } }), t.extend(t.Line, t.Polyline, t.Polygon, { morphArray: t.PointArray, x: function(l) { 72572 return l == null ? this.bbox().x : this.move(l, this.bbox().y); 72573 }, y: function(l) { 72574 return l == null ? this.bbox().y : this.move(this.bbox().x, l); 72575 }, width: function(l) { 72576 var u = this.bbox(); 72577 return l == null ? u.width : this.size(l, u.height); 72578 }, height: function(l) { 72579 var u = this.bbox(); 72580 return l == null ? u.height : this.size(u.width, l); 72581 } }), t.Path = t.invent({ create: "path", inherit: t.Shape, extend: { morphArray: t.PathArray, array: function() { 72582 return this._array || (this._array = new t.PathArray(this.attr("d"))); 72583 }, plot: function(l) { 72584 return l == null ? this.array() : this.clear().attr("d", typeof l == "string" ? l : this._array = new t.PathArray(l)); 72585 }, clear: function() { 72586 return delete this._array, this; 72587 } }, construct: { path: function(l) { 72588 return this.put(new t.Path()).plot(l || new t.PathArray()); 72589 } } }), t.Image = t.invent({ create: "image", inherit: t.Shape, extend: { load: function(l) { 72590 if (!l) 72591 return this; 72592 var u = this, x = new y.Image(); 72593 return t.on(x, "load", function() { 72594 t.off(x); 72595 var v = u.parent(t.Pattern); 72596 v !== null && (u.width() == 0 && u.height() == 0 && u.size(x.width, x.height), v && v.width() == 0 && v.height() == 0 && v.size(u.width(), u.height()), typeof u._loaded == "function" && u._loaded.call(u, { width: x.width, height: x.height, ratio: x.width / x.height, url: l })); 72597 }), t.on(x, "error", function(v) { 72598 t.off(x), typeof u._error == "function" && u._error.call(u, v); 72599 }), this.attr("href", x.src = this.src = l, t.xlink); 72600 }, loaded: function(l) { 72601 return this._loaded = l, this; 72602 }, error: function(l) { 72603 return this._error = l, this; 72604 } }, construct: { image: function(l, u, x) { 72605 return this.put(new t.Image()).load(l).size(u || 0, x || u || 0); 72606 } } }), t.Text = t.invent({ create: function() { 72607 this.constructor.call(this, t.create("text")), this.dom.leading = new t.Number(1.3), this._rebuild = !0, this._build = !1, this.attr("font-family", t.defaults.attrs["font-family"]); 72608 }, inherit: t.Shape, extend: { x: function(l) { 72609 return l == null ? this.attr("x") : this.attr("x", l); 72610 }, text: function(l) { 72611 if (l === void 0) { 72612 l = ""; 72613 for (var u = this.node.childNodes, x = 0, v = u.length; x < v; ++x) 72614 x != 0 && u[x].nodeType != 3 && t.adopt(u[x]).dom.newLined == 1 && (l += ` 72615`), l += u[x].textContent; 72616 return l; 72617 } 72618 if (this.clear().build(!0), typeof l == "function") 72619 l.call(this, this); 72620 else { 72621 x = 0; 72622 for (var k = (l = l.split(` 72623`)).length; x < k; x++) 72624 this.tspan(l[x]).newLine(); 72625 } 72626 return this.build(!1).rebuild(); 72627 }, size: function(l) { 72628 return this.attr("font-size", l).rebuild(); 72629 }, leading: function(l) { 72630 return l == null ? this.dom.leading : (this.dom.leading = new t.Number(l), this.rebuild()); 72631 }, lines: function() { 72632 var l = (this.textPath && this.textPath() || this).node, u = t.utils.map(t.utils.filterSVGElements(l.childNodes), function(x) { 72633 return t.adopt(x); 72634 }); 72635 return new t.Set(u); 72636 }, rebuild: function(l) { 72637 if (typeof l == "boolean" && (this._rebuild = l), this._rebuild) { 72638 var u = this, x = 0, v = this.dom.leading * new t.Number(this.attr("font-size")); 72639 this.lines().each(function() { 72640 this.dom.newLined && (u.textPath() || this.attr("x", u.attr("x")), this.text() == ` 72641` ? x += v : (this.attr("dy", v + x), x = 0)); 72642 }), this.fire("rebuild"); 72643 } 72644 return this; 72645 }, build: function(l) { 72646 return this._build = !!l, this; 72647 }, setData: function(l) { 72648 return this.dom = l, this.dom.leading = new t.Number(l.leading || 1.3), this; 72649 } }, construct: { text: function(l) { 72650 return this.put(new t.Text()).text(l); 72651 }, plain: function(l) { 72652 return this.put(new t.Text()).plain(l); 72653 } } }), t.Tspan = t.invent({ create: "tspan", inherit: t.Shape, extend: { text: function(l) { 72654 return l == null ? this.node.textContent + (this.dom.newLined ? ` 72655` : "") : (typeof l == "function" ? l.call(this, this) : this.plain(l), this); 72656 }, dx: function(l) { 72657 return this.attr("dx", l); 72658 }, dy: function(l) { 72659 return this.attr("dy", l); 72660 }, newLine: function() { 72661 var l = this.parent(t.Text); 72662 return this.dom.newLined = !0, this.dy(l.dom.leading * l.attr("font-size")).attr("x", l.x()); 72663 } } }), t.extend(t.Text, t.Tspan, { plain: function(l) { 72664 return this._build === !1 && this.clear(), this.node.appendChild(e.createTextNode(l)), this; 72665 }, tspan: function(l) { 72666 var u = (this.textPath && this.textPath() || this).node, x = new t.Tspan(); 72667 return this._build === !1 && this.clear(), u.appendChild(x.node), x.text(l); 72668 }, clear: function() { 72669 for (var l = (this.textPath && this.textPath() || this).node; l.hasChildNodes(); ) 72670 l.removeChild(l.lastChild); 72671 return this; 72672 }, length: function() { 72673 return this.node.getComputedTextLength(); 72674 } }), t.TextPath = t.invent({ create: "textPath", inherit: t.Parent, parent: t.Text, construct: { morphArray: t.PathArray, array: function() { 72675 var l = this.track(); 72676 return l ? l.array() : null; 72677 }, plot: function(l) { 72678 var u = this.track(), x = null; 72679 return u && (x = u.plot(l)), l == null ? x : this; 72680 }, track: function() { 72681 var l = this.textPath(); 72682 if (l) 72683 return l.reference("href"); 72684 }, textPath: function() { 72685 if (this.node.firstChild && this.node.firstChild.nodeName == "textPath") 72686 return t.adopt(this.node.firstChild); 72687 } } }), t.Nested = t.invent({ create: function() { 72688 this.constructor.call(this, t.create("svg")), this.style("overflow", "visible"); 72689 }, inherit: t.Container, construct: { nested: function() { 72690 return this.put(new t.Nested()); 72691 } } }); 72692 var n = { stroke: ["color", "width", "opacity", "linecap", "linejoin", "miterlimit", "dasharray", "dashoffset"], fill: ["color", "opacity", "rule"], prefix: function(l, u) { 72693 return u == "color" ? l : l + "-" + u; 72694 } }; 72695 function o(l, u, x, v) { 72696 return x + v.replace(t.regex.dots, " ."); 72697 } 72698 function h(l) { 72699 return l.toLowerCase().replace(/-(.)/g, function(u, x) { 72700 return x.toUpperCase(); 72701 }); 72702 } 72703 function c(l) { 72704 return l.charAt(0).toUpperCase() + l.slice(1); 72705 } 72706 function d(l) { 72707 var u = l.toString(16); 72708 return u.length == 1 ? "0" + u : u; 72709 } 72710 function g(l, u, x) { 72711 if (u == null || x == null) { 72712 var v = l.bbox(); 72713 u == null ? u = v.width / v.height * x : x == null && (x = v.height / v.width * u); 72714 } 72715 return { width: u, height: x }; 72716 } 72717 function p(l, u, x) { 72718 return { x: u * l.a + x * l.c + 0, y: u * l.b + x * l.d + 0 }; 72719 } 72720 function f(l) { 72721 return { a: l[0], b: l[1], c: l[2], d: l[3], e: l[4], f: l[5] }; 72722 } 72723 function b(l) { 72724 for (var u = l.childNodes.length - 1; u >= 0; u--) 72725 l.childNodes[u] instanceof y.SVGElement && b(l.childNodes[u]); 72726 return t.adopt(l).id(t.eid(l.nodeName)); 72727 } 72728 function m(l) { 72729 return Math.abs(l) > 1e-37 ? l : 0; 72730 } 72731 ["fill", "stroke"].forEach(function(l) { 72732 var u = {}; 72733 u[l] = function(x) { 72734 if (x === void 0) 72735 return this; 72736 if (typeof x == "string" || t.Color.isRgb(x) || x && typeof x.fill == "function") 72737 this.attr(l, x); 72738 else 72739 for (var v = n[l].length - 1; v >= 0; v--) 72740 x[n[l][v]] != null && this.attr(n.prefix(l, n[l][v]), x[n[l][v]]); 72741 return this; 72742 }, t.extend(t.Element, t.FX, u); 72743 }), t.extend(t.Element, t.FX, { translate: function(l, u) { 72744 return this.transform({ x: l, y: u }); 72745 }, matrix: function(l) { 72746 return this.attr("transform", new t.Matrix(arguments.length == 6 ? [].slice.call(arguments) : l)); 72747 }, opacity: function(l) { 72748 return this.attr("opacity", l); 72749 }, dx: function(l) { 72750 return this.x(new t.Number(l).plus(this instanceof t.FX ? 0 : this.x()), !0); 72751 }, dy: function(l) { 72752 return this.y(new t.Number(l).plus(this instanceof t.FX ? 0 : this.y()), !0); 72753 } }), t.extend(t.Path, { length: function() { 72754 return this.node.getTotalLength(); 72755 }, pointAt: function(l) { 72756 return this.node.getPointAtLength(l); 72757 } }), t.Set = t.invent({ create: function(l) { 72758 Array.isArray(l) ? this.members = l : this.clear(); 72759 }, extend: { add: function() { 72760 for (var l = [].slice.call(arguments), u = 0, x = l.length; u < x; u++) 72761 this.members.push(l[u]); 72762 return this; 72763 }, remove: function(l) { 72764 var u = this.index(l); 72765 return u > -1 && this.members.splice(u, 1), this; 72766 }, each: function(l) { 72767 for (var u = 0, x = this.members.length; u < x; u++) 72768 l.apply(this.members[u], [u, this.members]); 72769 return this; 72770 }, clear: function() { 72771 return this.members = [], this; 72772 }, length: function() { 72773 return this.members.length; 72774 }, has: function(l) { 72775 return this.index(l) >= 0; 72776 }, index: function(l) { 72777 return this.members.indexOf(l); 72778 }, get: function(l) { 72779 return this.members[l]; 72780 }, first: function() { 72781 return this.get(0); 72782 }, last: function() { 72783 return this.get(this.members.length - 1); 72784 }, valueOf: function() { 72785 return this.members; 72786 } }, construct: { set: function(l) { 72787 return new t.Set(l); 72788 } } }), t.FX.Set = t.invent({ create: function(l) { 72789 this.set = l; 72790 } }), t.Set.inherit = function() { 72791 var l = []; 72792 for (var u in t.Shape.prototype) 72793 typeof t.Shape.prototype[u] == "function" && typeof t.Set.prototype[u] != "function" && l.push(u); 72794 for (var u in l.forEach(function(v) { 72795 t.Set.prototype[v] = function() { 72796 for (var k = 0, S = this.members.length; k < S; k++) 72797 this.members[k] && typeof this.members[k][v] == "function" && this.members[k][v].apply(this.members[k], arguments); 72798 return v == "animate" ? this.fx || (this.fx = new t.FX.Set(this)) : this; 72799 }; 72800 }), l = [], t.FX.prototype) 72801 typeof t.FX.prototype[u] == "function" && typeof t.FX.Set.prototype[u] != "function" && l.push(u); 72802 l.forEach(function(x) { 72803 t.FX.Set.prototype[x] = function() { 72804 for (var v = 0, k = this.set.members.length; v < k; v++) 72805 this.set.members[v].fx[x].apply(this.set.members[v].fx, arguments); 72806 return this; 72807 }; 72808 }); 72809 }, t.extend(t.Element, {}), t.extend(t.Element, { remember: function(l, u) { 72810 if (U(arguments[0]) === "object") 72811 for (var x in l) 72812 this.remember(x, l[x]); 72813 else { 72814 if (arguments.length == 1) 72815 return this.memory()[l]; 72816 this.memory()[l] = u; 72817 } 72818 return this; 72819 }, forget: function() { 72820 if (arguments.length == 0) 72821 this._memory = {}; 72822 else 72823 for (var l = arguments.length - 1; l >= 0; l--) 72824 delete this.memory()[arguments[l]]; 72825 return this; 72826 }, memory: function() { 72827 return this._memory || (this._memory = {}); 72828 } }), t.get = function(l) { 72829 var u = e.getElementById(function(x) { 72830 var v = (x || "").toString().match(t.regex.reference); 72831 if (v) 72832 return v[1]; 72833 }(l) || l); 72834 return t.adopt(u); 72835 }, t.select = function(l, u) { 72836 return new t.Set(t.utils.map((u || e).querySelectorAll(l), function(x) { 72837 return t.adopt(x); 72838 })); 72839 }, t.extend(t.Parent, { select: function(l) { 72840 return t.select(l, this.node); 72841 } }); 72842 var w = "abcdef".split(""); 72843 if (typeof y.CustomEvent != "function") { 72844 var A = function(l, u) { 72845 u = u || { bubbles: !1, cancelable: !1, detail: void 0 }; 72846 var x = e.createEvent("CustomEvent"); 72847 return x.initCustomEvent(l, u.bubbles, u.cancelable, u.detail), x; 72848 }; 72849 A.prototype = y.Event.prototype, t.CustomEvent = A; 72850 } else 72851 t.CustomEvent = y.CustomEvent; 72852 return t; 72853 }, U(Re) === "object" ? _.exports = be.document ? Fe(be, be.document) : function(y) { 72854 return Fe(y, y.document); 72855 } : be.SVG = Fe(be, be.document), /*! svg.filter.js - v2.0.2 - 2016-02-24 72856 * https://github.com/wout/svg.filter.js 72857 * Copyright (c) 2016 Wout Fierens; Licensed MIT */ 72858 (function() { 72859 SVG.Filter = SVG.invent({ create: "filter", inherit: SVG.Parent, extend: { source: "SourceGraphic", sourceAlpha: "SourceAlpha", background: "BackgroundImage", backgroundAlpha: "BackgroundAlpha", fill: "FillPaint", stroke: "StrokePaint", autoSetIn: !0, put: function(r, n) { 72860 return this.add(r, n), !r.attr("in") && this.autoSetIn && r.attr("in", this.source), r.attr("result") || r.attr("result", r), r; 72861 }, blend: function(r, n, o) { 72862 return this.put(new SVG.BlendEffect(r, n, o)); 72863 }, colorMatrix: function(r, n) { 72864 return this.put(new SVG.ColorMatrixEffect(r, n)); 72865 }, convolveMatrix: function(r) { 72866 return this.put(new SVG.ConvolveMatrixEffect(r)); 72867 }, componentTransfer: function(r) { 72868 return this.put(new SVG.ComponentTransferEffect(r)); 72869 }, composite: function(r, n, o) { 72870 return this.put(new SVG.CompositeEffect(r, n, o)); 72871 }, flood: function(r, n) { 72872 return this.put(new SVG.FloodEffect(r, n)); 72873 }, offset: function(r, n) { 72874 return this.put(new SVG.OffsetEffect(r, n)); 72875 }, image: function(r) { 72876 return this.put(new SVG.ImageEffect(r)); 72877 }, merge: function() { 72878 var r = [void 0]; 72879 for (var n in arguments) 72880 r.push(arguments[n]); 72881 return this.put(new (SVG.MergeEffect.bind.apply(SVG.MergeEffect, r))()); 72882 }, gaussianBlur: function(r, n) { 72883 return this.put(new SVG.GaussianBlurEffect(r, n)); 72884 }, morphology: function(r, n) { 72885 return this.put(new SVG.MorphologyEffect(r, n)); 72886 }, diffuseLighting: function(r, n, o) { 72887 return this.put(new SVG.DiffuseLightingEffect(r, n, o)); 72888 }, displacementMap: function(r, n, o, h, c) { 72889 return this.put(new SVG.DisplacementMapEffect(r, n, o, h, c)); 72890 }, specularLighting: function(r, n, o, h) { 72891 return this.put(new SVG.SpecularLightingEffect(r, n, o, h)); 72892 }, tile: function() { 72893 return this.put(new SVG.TileEffect()); 72894 }, turbulence: function(r, n, o, h, c) { 72895 return this.put(new SVG.TurbulenceEffect(r, n, o, h, c)); 72896 }, toString: function() { 72897 return "url(#" + this.attr("id") + ")"; 72898 } } }), SVG.extend(SVG.Defs, { filter: function(r) { 72899 var n = this.put(new SVG.Filter()); 72900 return typeof r == "function" && r.call(n, n), n; 72901 } }), SVG.extend(SVG.Container, { filter: function(r) { 72902 return this.defs().filter(r); 72903 } }), SVG.extend(SVG.Element, SVG.G, SVG.Nested, { filter: function(r) { 72904 return this.filterer = r instanceof SVG.Element ? r : this.doc().filter(r), this.doc() && this.filterer.doc() !== this.doc() && this.doc().defs().add(this.filterer), this.attr("filter", this.filterer), this.filterer; 72905 }, unfilter: function(r) { 72906 return this.filterer && r === !0 && this.filterer.remove(), delete this.filterer, this.attr("filter", null); 72907 } }), SVG.Effect = SVG.invent({ create: function() { 72908 this.constructor.call(this); 72909 }, inherit: SVG.Element, extend: { in: function(r) { 72910 return r == null ? this.parent() && this.parent().select('[result="' + this.attr("in") + '"]').get(0) || this.attr("in") : this.attr("in", r); 72911 }, result: function(r) { 72912 return r == null ? this.attr("result") : this.attr("result", r); 72913 }, toString: function() { 72914 return this.result(); 72915 } } }), SVG.ParentEffect = SVG.invent({ create: function() { 72916 this.constructor.call(this); 72917 }, inherit: SVG.Parent, extend: { in: function(r) { 72918 return r == null ? this.parent() && this.parent().select('[result="' + this.attr("in") + '"]').get(0) || this.attr("in") : this.attr("in", r); 72919 }, result: function(r) { 72920 return r == null ? this.attr("result") : this.attr("result", r); 72921 }, toString: function() { 72922 return this.result(); 72923 } } }); 72924 var y = { blend: function(r, n) { 72925 return this.parent() && this.parent().blend(this, r, n); 72926 }, colorMatrix: function(r, n) { 72927 return this.parent() && this.parent().colorMatrix(r, n).in(this); 72928 }, convolveMatrix: function(r) { 72929 return this.parent() && this.parent().convolveMatrix(r).in(this); 72930 }, componentTransfer: function(r) { 72931 return this.parent() && this.parent().componentTransfer(r).in(this); 72932 }, composite: function(r, n) { 72933 return this.parent() && this.parent().composite(this, r, n); 72934 }, flood: function(r, n) { 72935 return this.parent() && this.parent().flood(r, n); 72936 }, offset: function(r, n) { 72937 return this.parent() && this.parent().offset(r, n).in(this); 72938 }, image: function(r) { 72939 return this.parent() && this.parent().image(r); 72940 }, merge: function() { 72941 return this.parent() && this.parent().merge.apply(this.parent(), [this].concat(arguments)); 72942 }, gaussianBlur: function(r, n) { 72943 return this.parent() && this.parent().gaussianBlur(r, n).in(this); 72944 }, morphology: function(r, n) { 72945 return this.parent() && this.parent().morphology(r, n).in(this); 72946 }, diffuseLighting: function(r, n, o) { 72947 return this.parent() && this.parent().diffuseLighting(r, n, o).in(this); 72948 }, displacementMap: function(r, n, o, h) { 72949 return this.parent() && this.parent().displacementMap(this, r, n, o, h); 72950 }, specularLighting: function(r, n, o, h) { 72951 return this.parent() && this.parent().specularLighting(r, n, o, h).in(this); 72952 }, tile: function() { 72953 return this.parent() && this.parent().tile().in(this); 72954 }, turbulence: function(r, n, o, h, c) { 72955 return this.parent() && this.parent().turbulence(r, n, o, h, c).in(this); 72956 } }; 72957 SVG.extend(SVG.Effect, y), SVG.extend(SVG.ParentEffect, y), SVG.ChildEffect = SVG.invent({ create: function() { 72958 this.constructor.call(this); 72959 }, inherit: SVG.Element, extend: { in: function(r) { 72960 this.attr("in", r); 72961 } } }); 72962 var e = { blend: function(r, n, o) { 72963 this.attr({ in: r, in2: n, mode: o || "normal" }); 72964 }, colorMatrix: function(r, n) { 72965 r == "matrix" && (n = a(n)), this.attr({ type: r, values: n === void 0 ? null : n }); 72966 }, convolveMatrix: function(r) { 72967 r = a(r), this.attr({ order: Math.sqrt(r.split(" ").length), kernelMatrix: r }); 72968 }, composite: function(r, n, o) { 72969 this.attr({ in: r, in2: n, operator: o }); 72970 }, flood: function(r, n) { 72971 this.attr("flood-color", r), n != null && this.attr("flood-opacity", n); 72972 }, offset: function(r, n) { 72973 this.attr({ dx: r, dy: n }); 72974 }, image: function(r) { 72975 this.attr("href", r, SVG.xlink); 72976 }, displacementMap: function(r, n, o, h, c) { 72977 this.attr({ in: r, in2: n, scale: o, xChannelSelector: h, yChannelSelector: c }); 72978 }, gaussianBlur: function(r, n) { 72979 r != null || n != null ? this.attr("stdDeviation", function(o) { 72980 if (!Array.isArray(o)) 72981 return o; 72982 for (var h = 0, c = o.length, d = []; h < c; h++) 72983 d.push(o[h]); 72984 return d.join(" "); 72985 }(Array.prototype.slice.call(arguments))) : this.attr("stdDeviation", "0 0"); 72986 }, morphology: function(r, n) { 72987 this.attr({ operator: r, radius: n }); 72988 }, tile: function() { 72989 }, turbulence: function(r, n, o, h, c) { 72990 this.attr({ numOctaves: n, seed: o, stitchTiles: h, baseFrequency: r, type: c }); 72991 } }, t = { merge: function() { 72992 var r; 72993 if (arguments[0] instanceof SVG.Set) { 72994 var n = this; 72995 arguments[0].each(function(h) { 72996 this instanceof SVG.MergeNode ? n.put(this) : (this instanceof SVG.Effect || this instanceof SVG.ParentEffect) && n.put(new SVG.MergeNode(this)); 72997 }); 72998 } else { 72999 r = Array.isArray(arguments[0]) ? arguments[0] : arguments; 73000 for (var o = 0; o < r.length; o++) 73001 r[o] instanceof SVG.MergeNode ? this.put(r[o]) : this.put(new SVG.MergeNode(r[o])); 73002 } 73003 }, componentTransfer: function(r) { 73004 if (this.rgb = new SVG.Set(), ["r", "g", "b", "a"].forEach((function(o) { 73005 this[o] = new SVG["Func" + o.toUpperCase()]("identity"), this.rgb.add(this[o]), this.node.appendChild(this[o].node); 73006 }).bind(this)), r) 73007 for (var n in r.rgb && (["r", "g", "b"].forEach((function(o) { 73008 this[o].attr(r.rgb); 73009 }).bind(this)), delete r.rgb), r) 73010 this[n].attr(r[n]); 73011 }, diffuseLighting: function(r, n, o) { 73012 this.attr({ surfaceScale: r, diffuseConstant: n, kernelUnitLength: o }); 73013 }, specularLighting: function(r, n, o, h) { 73014 this.attr({ surfaceScale: r, diffuseConstant: n, specularExponent: o, kernelUnitLength: h }); 73015 } }, i = { distantLight: function(r, n) { 73016 this.attr({ azimuth: r, elevation: n }); 73017 }, pointLight: function(r, n, o) { 73018 this.attr({ x: r, y: n, z: o }); 73019 }, spotLight: function(r, n, o, h, c, d) { 73020 this.attr({ x: r, y: n, z: o, pointsAtX: h, pointsAtY: c, pointsAtZ: d }); 73021 }, mergeNode: function(r) { 73022 this.attr("in", r); 73023 } }; 73024 function a(r) { 73025 return Array.isArray(r) && (r = new SVG.Array(r)), r.toString().replace(/^\s+/, "").replace(/\s+$/, "").replace(/\s+/g, " "); 73026 } 73027 function s() { 73028 var r = function() { 73029 }; 73030 for (var n in typeof arguments[arguments.length - 1] == "function" && (r = arguments[arguments.length - 1], Array.prototype.splice.call(arguments, arguments.length - 1, 1)), arguments) 73031 for (var o in arguments[n]) 73032 r(arguments[n][o], o, arguments[n]); 73033 } 73034 ["r", "g", "b", "a"].forEach(function(r) { 73035 i["Func" + r.toUpperCase()] = function(n) { 73036 switch (this.attr("type", n), n) { 73037 case "table": 73038 this.attr("tableValues", arguments[1]); 73039 break; 73040 case "linear": 73041 this.attr("slope", arguments[1]), this.attr("intercept", arguments[2]); 73042 break; 73043 case "gamma": 73044 this.attr("amplitude", arguments[1]), this.attr("exponent", arguments[2]), this.attr("offset", arguments[2]); 73045 } 73046 }; 73047 }), s(e, function(r, n) { 73048 var o = n.charAt(0).toUpperCase() + n.slice(1); 73049 SVG[o + "Effect"] = SVG.invent({ create: function() { 73050 this.constructor.call(this, SVG.create("fe" + o)), r.apply(this, arguments), this.result(this.attr("id") + "Out"); 73051 }, inherit: SVG.Effect, extend: {} }); 73052 }), s(t, function(r, n) { 73053 var o = n.charAt(0).toUpperCase() + n.slice(1); 73054 SVG[o + "Effect"] = SVG.invent({ create: function() { 73055 this.constructor.call(this, SVG.create("fe" + o)), r.apply(this, arguments), this.result(this.attr("id") + "Out"); 73056 }, inherit: SVG.ParentEffect, extend: {} }); 73057 }), s(i, function(r, n) { 73058 var o = n.charAt(0).toUpperCase() + n.slice(1); 73059 SVG[o] = SVG.invent({ create: function() { 73060 this.constructor.call(this, SVG.create("fe" + o)), r.apply(this, arguments); 73061 }, inherit: SVG.ChildEffect, extend: {} }); 73062 }), SVG.extend(SVG.MergeEffect, { in: function(r) { 73063 return r instanceof SVG.MergeNode ? this.add(r, 0) : this.add(new SVG.MergeNode(r), 0), this; 73064 } }), SVG.extend(SVG.CompositeEffect, SVG.BlendEffect, SVG.DisplacementMapEffect, { in2: function(r) { 73065 return r == null ? this.parent() && this.parent().select('[result="' + this.attr("in2") + '"]').get(0) || this.attr("in2") : this.attr("in2", r); 73066 } }), SVG.filter = { sepiatone: [0.343, 0.669, 0.119, 0, 0, 0.249, 0.626, 0.13, 0, 0, 0.172, 0.334, 0.111, 0, 0, 0, 0, 0, 1, 0] }; 73067 }).call(void 0), function() { 73068 function y(s, r, n, o, h, c, d) { 73069 for (var g = s.slice(r, n || d), p = o.slice(h, c || d), f = 0, b = { pos: [0, 0], start: [0, 0] }, m = { pos: [0, 0], start: [0, 0] }; g[f] = e.call(b, g[f]), p[f] = e.call(m, p[f]), g[f][0] != p[f][0] || g[f][0] == "M" || g[f][0] == "A" && (g[f][4] != p[f][4] || g[f][5] != p[f][5]) ? (Array.prototype.splice.apply(g, [f, 1].concat(i.call(b, g[f]))), Array.prototype.splice.apply(p, [f, 1].concat(i.call(m, p[f])))) : (g[f] = t.call(b, g[f]), p[f] = t.call(m, p[f])), !(++f == g.length && f == p.length); ) 73070 f == g.length && g.push(["C", b.pos[0], b.pos[1], b.pos[0], b.pos[1], b.pos[0], b.pos[1]]), f == p.length && p.push(["C", m.pos[0], m.pos[1], m.pos[0], m.pos[1], m.pos[0], m.pos[1]]); 73071 return { start: g, dest: p }; 73072 } 73073 function e(s) { 73074 switch (s[0]) { 73075 case "z": 73076 case "Z": 73077 s[0] = "L", s[1] = this.start[0], s[2] = this.start[1]; 73078 break; 73079 case "H": 73080 s[0] = "L", s[2] = this.pos[1]; 73081 break; 73082 case "V": 73083 s[0] = "L", s[2] = s[1], s[1] = this.pos[0]; 73084 break; 73085 case "T": 73086 s[0] = "Q", s[3] = s[1], s[4] = s[2], s[1] = this.reflection[1], s[2] = this.reflection[0]; 73087 break; 73088 case "S": 73089 s[0] = "C", s[6] = s[4], s[5] = s[3], s[4] = s[2], s[3] = s[1], s[2] = this.reflection[1], s[1] = this.reflection[0]; 73090 } 73091 return s; 73092 } 73093 function t(s) { 73094 var r = s.length; 73095 return this.pos = [s[r - 2], s[r - 1]], "SCQT".indexOf(s[0]) != -1 && (this.reflection = [2 * this.pos[0] - s[r - 4], 2 * this.pos[1] - s[r - 3]]), s; 73096 } 73097 function i(s) { 73098 var r = [s]; 73099 switch (s[0]) { 73100 case "M": 73101 return this.pos = this.start = [s[1], s[2]], r; 73102 case "L": 73103 s[5] = s[3] = s[1], s[6] = s[4] = s[2], s[1] = this.pos[0], s[2] = this.pos[1]; 73104 break; 73105 case "Q": 73106 s[6] = s[4], s[5] = s[3], s[4] = 1 * s[4] / 3 + 2 * s[2] / 3, s[3] = 1 * s[3] / 3 + 2 * s[1] / 3, s[2] = 1 * this.pos[1] / 3 + 2 * s[2] / 3, s[1] = 1 * this.pos[0] / 3 + 2 * s[1] / 3; 73107 break; 73108 case "A": 73109 r = function(n, o) { 73110 var h, c, d, g, p, f, b, m, w, A, l, u, x, v, k, S, C, L, I, z, T, E, R, O, D, W, N = Math.abs(o[1]), V = Math.abs(o[2]), j = o[3] % 360, se = o[4], K = o[5], le = o[6], he = o[7], $ = new SVG.Point(n), Q = new SVG.Point(le, he), dt = []; 73111 if (N === 0 || V === 0 || $.x === Q.x && $.y === Q.y) 73112 return [["C", $.x, $.y, Q.x, Q.y, Q.x, Q.y]]; 73113 for (h = new SVG.Point(($.x - Q.x) / 2, ($.y - Q.y) / 2).transform(new SVG.Matrix().rotate(j)), (c = h.x * h.x / (N * N) + h.y * h.y / (V * V)) > 1 && (N *= c = Math.sqrt(c), V *= c), d = new SVG.Matrix().rotate(j).scale(1 / N, 1 / V).rotate(-j), $ = $.transform(d), Q = Q.transform(d), g = [Q.x - $.x, Q.y - $.y], f = g[0] * g[0] + g[1] * g[1], p = Math.sqrt(f), g[0] /= p, g[1] /= p, b = f < 4 ? Math.sqrt(1 - f / 4) : 0, se === K && (b *= -1), m = new SVG.Point((Q.x + $.x) / 2 + b * -g[1], (Q.y + $.y) / 2 + b * g[0]), w = new SVG.Point($.x - m.x, $.y - m.y), A = new SVG.Point(Q.x - m.x, Q.y - m.y), l = Math.acos(w.x / Math.sqrt(w.x * w.x + w.y * w.y)), w.y < 0 && (l *= -1), u = Math.acos(A.x / Math.sqrt(A.x * A.x + A.y * A.y)), A.y < 0 && (u *= -1), K && l > u && (u += 2 * Math.PI), !K && l < u && (u -= 2 * Math.PI), v = Math.ceil(2 * Math.abs(l - u) / Math.PI), S = [], C = l, x = (u - l) / v, k = 4 * Math.tan(x / 4) / 3, T = 0; T <= v; T++) 73114 I = Math.cos(C), L = Math.sin(C), z = new SVG.Point(m.x + I, m.y + L), S[T] = [new SVG.Point(z.x + k * L, z.y - k * I), z, new SVG.Point(z.x - k * L, z.y + k * I)], C += x; 73115 for (S[0][0] = S[0][1].clone(), S[S.length - 1][2] = S[S.length - 1][1].clone(), d = new SVG.Matrix().rotate(j).scale(N, V).rotate(-j), T = 0, E = S.length; T < E; T++) 73116 S[T][0] = S[T][0].transform(d), S[T][1] = S[T][1].transform(d), S[T][2] = S[T][2].transform(d); 73117 for (T = 1, E = S.length; T < E; T++) 73118 R = (z = S[T - 1][2]).x, O = z.y, D = (z = S[T][0]).x, W = z.y, le = (z = S[T][1]).x, he = z.y, dt.push(["C", R, O, D, W, le, he]); 73119 return dt; 73120 }(this.pos, s), s = r[0]; 73121 } 73122 return s[0] = "C", this.pos = [s[5], s[6]], this.reflection = [2 * s[5] - s[3], 2 * s[6] - s[4]], r; 73123 } 73124 function a(s, r) { 73125 if (r === !1) 73126 return !1; 73127 for (var n = r, o = s.length; n < o; ++n) 73128 if (s[n][0] == "M") 73129 return n; 73130 return !1; 73131 } 73132 SVG.extend(SVG.PathArray, { morph: function(s) { 73133 for (var r = this.value, n = this.parse(s), o = 0, h = 0, c = !1, d = !1; o !== !1 || h !== !1; ) { 73134 var g; 73135 c = a(r, o !== !1 && o + 1), d = a(n, h !== !1 && h + 1), o === !1 && (o = (g = new SVG.PathArray(p.start).bbox()).height == 0 || g.width == 0 ? r.push(r[0]) - 1 : r.push(["M", g.x + g.width / 2, g.y + g.height / 2]) - 1), h === !1 && (h = (g = new SVG.PathArray(p.dest).bbox()).height == 0 || g.width == 0 ? n.push(n[0]) - 1 : n.push(["M", g.x + g.width / 2, g.y + g.height / 2]) - 1); 73136 var p = y(r, o, c, n, h, d); 73137 r = r.slice(0, o).concat(p.start, c === !1 ? [] : r.slice(c)), n = n.slice(0, h).concat(p.dest, d === !1 ? [] : n.slice(d)), o = c !== !1 && o + p.start.length, h = d !== !1 && h + p.dest.length; 73138 } 73139 return this.value = r, this.destination = new SVG.PathArray(), this.destination.value = n, this; 73140 } }); 73141 }(), /*! svg.draggable.js - v2.2.2 - 2019-01-08 73142 * https://github.com/svgdotjs/svg.draggable.js 73143 * Copyright (c) 2019 Wout Fierens; Licensed MIT */ 73144 (function() { 73145 function y(e) { 73146 e.remember("_draggable", this), this.el = e; 73147 } 73148 y.prototype.init = function(e, t) { 73149 var i = this; 73150 this.constraint = e, this.value = t, this.el.on("mousedown.drag", function(a) { 73151 i.start(a); 73152 }), this.el.on("touchstart.drag", function(a) { 73153 i.start(a); 73154 }); 73155 }, y.prototype.transformPoint = function(e, t) { 73156 var i = (e = e || window.event).changedTouches && e.changedTouches[0] || e; 73157 return this.p.x = i.clientX - (t || 0), this.p.y = i.clientY, this.p.matrixTransform(this.m); 73158 }, y.prototype.getBBox = function() { 73159 var e = this.el.bbox(); 73160 return this.el instanceof SVG.Nested && (e = this.el.rbox()), (this.el instanceof SVG.G || this.el instanceof SVG.Use || this.el instanceof SVG.Nested) && (e.x = this.el.x(), e.y = this.el.y()), e; 73161 }, y.prototype.start = function(e) { 73162 if (e.type != "click" && e.type != "mousedown" && e.type != "mousemove" || (e.which || e.buttons) == 1) { 73163 var t = this; 73164 if (this.el.fire("beforedrag", { event: e, handler: this }), !this.el.event().defaultPrevented) { 73165 e.preventDefault(), e.stopPropagation(), this.parent = this.parent || this.el.parent(SVG.Nested) || this.el.parent(SVG.Doc), this.p = this.parent.node.createSVGPoint(), this.m = this.el.node.getScreenCTM().inverse(); 73166 var i, a = this.getBBox(); 73167 if (this.el instanceof SVG.Text) 73168 switch (i = this.el.node.getComputedTextLength(), this.el.attr("text-anchor")) { 73169 case "middle": 73170 i /= 2; 73171 break; 73172 case "start": 73173 i = 0; 73174 } 73175 this.startPoints = { point: this.transformPoint(e, i), box: a, transform: this.el.transform() }, SVG.on(window, "mousemove.drag", function(s) { 73176 t.drag(s); 73177 }), SVG.on(window, "touchmove.drag", function(s) { 73178 t.drag(s); 73179 }), SVG.on(window, "mouseup.drag", function(s) { 73180 t.end(s); 73181 }), SVG.on(window, "touchend.drag", function(s) { 73182 t.end(s); 73183 }), this.el.fire("dragstart", { event: e, p: this.startPoints.point, m: this.m, handler: this }); 73184 } 73185 } 73186 }, y.prototype.drag = function(e) { 73187 var t = this.getBBox(), i = this.transformPoint(e), a = this.startPoints.box.x + i.x - this.startPoints.point.x, s = this.startPoints.box.y + i.y - this.startPoints.point.y, r = this.constraint, n = i.x - this.startPoints.point.x, o = i.y - this.startPoints.point.y; 73188 if (this.el.fire("dragmove", { event: e, p: i, m: this.m, handler: this }), this.el.event().defaultPrevented) 73189 return i; 73190 if (typeof r == "function") { 73191 var h = r.call(this.el, a, s, this.m); 73192 typeof h == "boolean" && (h = { x: h, y: h }), h.x === !0 ? this.el.x(a) : h.x !== !1 && this.el.x(h.x), h.y === !0 ? this.el.y(s) : h.y !== !1 && this.el.y(h.y); 73193 } else 73194 typeof r == "object" && (r.minX != null && a < r.minX ? n = (a = r.minX) - this.startPoints.box.x : r.maxX != null && a > r.maxX - t.width && (n = (a = r.maxX - t.width) - this.startPoints.box.x), r.minY != null && s < r.minY ? o = (s = r.minY) - this.startPoints.box.y : r.maxY != null && s > r.maxY - t.height && (o = (s = r.maxY - t.height) - this.startPoints.box.y), r.snapToGrid != null && (a -= a % r.snapToGrid, s -= s % r.snapToGrid, n -= n % r.snapToGrid, o -= o % r.snapToGrid), this.el instanceof SVG.G ? this.el.matrix(this.startPoints.transform).transform({ x: n, y: o }, !0) : this.el.move(a, s)); 73195 return i; 73196 }, y.prototype.end = function(e) { 73197 var t = this.drag(e); 73198 this.el.fire("dragend", { event: e, p: t, m: this.m, handler: this }), SVG.off(window, "mousemove.drag"), SVG.off(window, "touchmove.drag"), SVG.off(window, "mouseup.drag"), SVG.off(window, "touchend.drag"); 73199 }, SVG.extend(SVG.Element, { draggable: function(e, t) { 73200 typeof e != "function" && typeof e != "object" || (t = e, e = !0); 73201 var i = this.remember("_draggable") || new y(this); 73202 return (e = e === void 0 || e) ? i.init(t || {}, e) : (this.off("mousedown.drag"), this.off("touchstart.drag")), this; 73203 } }); 73204 }).call(void 0), function() { 73205 function y(e) { 73206 this.el = e, e.remember("_selectHandler", this), this.pointSelection = { isSelected: !1 }, this.rectSelection = { isSelected: !1 }, this.pointsList = { lt: [0, 0], rt: ["width", 0], rb: ["width", "height"], lb: [0, "height"], t: ["width", 0], r: ["width", "height"], b: ["width", "height"], l: [0, "height"] }, this.pointCoord = function(t, i, a) { 73207 var s = typeof t != "string" ? t : i[t]; 73208 return a ? s / 2 : s; 73209 }, this.pointCoords = function(t, i) { 73210 var a = this.pointsList[t]; 73211 return { x: this.pointCoord(a[0], i, t === "t" || t === "b"), y: this.pointCoord(a[1], i, t === "r" || t === "l") }; 73212 }; 73213 } 73214 y.prototype.init = function(e, t) { 73215 var i = this.el.bbox(); 73216 this.options = {}; 73217 var a = this.el.selectize.defaults.points; 73218 for (var s in this.el.selectize.defaults) 73219 this.options[s] = this.el.selectize.defaults[s], t[s] !== void 0 && (this.options[s] = t[s]); 73220 var r = ["points", "pointsExclude"]; 73221 for (var s in r) { 73222 var n = this.options[r[s]]; 73223 typeof n == "string" ? n = n.length > 0 ? n.split(/\s*,\s*/i) : [] : typeof n == "boolean" && r[s] === "points" && (n = n ? a : []), this.options[r[s]] = n; 73224 } 73225 this.options.points = [a, this.options.points].reduce(function(o, h) { 73226 return o.filter(function(c) { 73227 return h.indexOf(c) > -1; 73228 }); 73229 }), this.options.points = [this.options.points, this.options.pointsExclude].reduce(function(o, h) { 73230 return o.filter(function(c) { 73231 return h.indexOf(c) < 0; 73232 }); 73233 }), this.parent = this.el.parent(), this.nested = this.nested || this.parent.group(), this.nested.matrix(new SVG.Matrix(this.el).translate(i.x, i.y)), this.options.deepSelect && ["line", "polyline", "polygon"].indexOf(this.el.type) !== -1 ? this.selectPoints(e) : this.selectRect(e), this.observe(), this.cleanup(); 73234 }, y.prototype.selectPoints = function(e) { 73235 return this.pointSelection.isSelected = e, this.pointSelection.set || (this.pointSelection.set = this.parent.set(), this.drawPoints()), this; 73236 }, y.prototype.getPointArray = function() { 73237 var e = this.el.bbox(); 73238 return this.el.array().valueOf().map(function(t) { 73239 return [t[0] - e.x, t[1] - e.y]; 73240 }); 73241 }, y.prototype.drawPoints = function() { 73242 for (var e = this, t = this.getPointArray(), i = 0, a = t.length; i < a; ++i) { 73243 var s = function(n) { 73244 return function(o) { 73245 (o = o || window.event).preventDefault ? o.preventDefault() : o.returnValue = !1, o.stopPropagation(); 73246 var h = o.pageX || o.touches[0].pageX, c = o.pageY || o.touches[0].pageY; 73247 e.el.fire("point", { x: h, y: c, i: n, event: o }); 73248 }; 73249 }(i), r = this.drawPoint(t[i][0], t[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints + "_point").on("touchstart", s).on("mousedown", s); 73250 this.pointSelection.set.add(r); 73251 } 73252 }, y.prototype.drawPoint = function(e, t) { 73253 var i = this.options.pointType; 73254 switch (i) { 73255 case "circle": 73256 return this.drawCircle(e, t); 73257 case "rect": 73258 return this.drawRect(e, t); 73259 default: 73260 if (typeof i == "function") 73261 return i.call(this, e, t); 73262 throw new Error("Unknown " + i + " point type!"); 73263 } 73264 }, y.prototype.drawCircle = function(e, t) { 73265 return this.nested.circle(this.options.pointSize).center(e, t); 73266 }, y.prototype.drawRect = function(e, t) { 73267 return this.nested.rect(this.options.pointSize, this.options.pointSize).center(e, t); 73268 }, y.prototype.updatePointSelection = function() { 73269 var e = this.getPointArray(); 73270 this.pointSelection.set.each(function(t) { 73271 this.cx() === e[t][0] && this.cy() === e[t][1] || this.center(e[t][0], e[t][1]); 73272 }); 73273 }, y.prototype.updateRectSelection = function() { 73274 var e = this, t = this.el.bbox(); 73275 if (this.rectSelection.set.get(0).attr({ width: t.width, height: t.height }), this.options.points.length && this.options.points.map(function(a, s) { 73276 var r = e.pointCoords(a, t); 73277 e.rectSelection.set.get(s + 1).center(r.x, r.y); 73278 }), this.options.rotationPoint) { 73279 var i = this.rectSelection.set.length(); 73280 this.rectSelection.set.get(i - 1).center(t.width / 2, 20); 73281 } 73282 }, y.prototype.selectRect = function(e) { 73283 var t = this, i = this.el.bbox(); 73284 function a(n) { 73285 return function(o) { 73286 (o = o || window.event).preventDefault ? o.preventDefault() : o.returnValue = !1, o.stopPropagation(); 73287 var h = o.pageX || o.touches[0].pageX, c = o.pageY || o.touches[0].pageY; 73288 t.el.fire(n, { x: h, y: c, event: o }); 73289 }; 73290 } 73291 if (this.rectSelection.isSelected = e, this.rectSelection.set = this.rectSelection.set || this.parent.set(), this.rectSelection.set.get(0) || this.rectSelection.set.add(this.nested.rect(i.width, i.height).addClass(this.options.classRect)), this.options.points.length && this.rectSelection.set.length() < 2 && (this.options.points.map(function(n, o) { 73292 var h = t.pointCoords(n, i), c = t.drawPoint(h.x, h.y).attr("class", t.options.classPoints + "_" + n).on("mousedown", a(n)).on("touchstart", a(n)); 73293 t.rectSelection.set.add(c); 73294 }), this.rectSelection.set.each(function() { 73295 this.addClass(t.options.classPoints); 73296 })), this.options.rotationPoint && (this.options.points && !this.rectSelection.set.get(9) || !this.options.points && !this.rectSelection.set.get(1))) { 73297 var s = function(n) { 73298 (n = n || window.event).preventDefault ? n.preventDefault() : n.returnValue = !1, n.stopPropagation(); 73299 var o = n.pageX || n.touches[0].pageX, h = n.pageY || n.touches[0].pageY; 73300 t.el.fire("rot", { x: o, y: h, event: n }); 73301 }, r = this.drawPoint(i.width / 2, 20).attr("class", this.options.classPoints + "_rot").on("touchstart", s).on("mousedown", s); 73302 this.rectSelection.set.add(r); 73303 } 73304 }, y.prototype.handler = function() { 73305 var e = this.el.bbox(); 73306 this.nested.matrix(new SVG.Matrix(this.el).translate(e.x, e.y)), this.rectSelection.isSelected && this.updateRectSelection(), this.pointSelection.isSelected && this.updatePointSelection(); 73307 }, y.prototype.observe = function() { 73308 var e = this; 73309 if (MutationObserver) 73310 if (this.rectSelection.isSelected || this.pointSelection.isSelected) 73311 this.observerInst = this.observerInst || new MutationObserver(function() { 73312 e.handler(); 73313 }), this.observerInst.observe(this.el.node, { attributes: !0 }); 73314 else 73315 try { 73316 this.observerInst.disconnect(), delete this.observerInst; 73317 } catch { 73318 } 73319 else 73320 this.el.off("DOMAttrModified.select"), (this.rectSelection.isSelected || this.pointSelection.isSelected) && this.el.on("DOMAttrModified.select", function() { 73321 e.handler(); 73322 }); 73323 }, y.prototype.cleanup = function() { 73324 !this.rectSelection.isSelected && this.rectSelection.set && (this.rectSelection.set.each(function() { 73325 this.remove(); 73326 }), this.rectSelection.set.clear(), delete this.rectSelection.set), !this.pointSelection.isSelected && this.pointSelection.set && (this.pointSelection.set.each(function() { 73327 this.remove(); 73328 }), this.pointSelection.set.clear(), delete this.pointSelection.set), this.pointSelection.isSelected || this.rectSelection.isSelected || (this.nested.remove(), delete this.nested); 73329 }, SVG.extend(SVG.Element, { selectize: function(e, t) { 73330 return typeof e == "object" && (t = e, e = !0), (this.remember("_selectHandler") || new y(this)).init(e === void 0 || e, t || {}), this; 73331 } }), SVG.Element.prototype.selectize.defaults = { points: ["lt", "rt", "rb", "lb", "t", "r", "b", "l"], pointsExclude: [], classRect: "svg_select_boundingRect", classPoints: "svg_select_points", pointSize: 7, rotationPoint: !0, deepSelect: !1, pointType: "circle" }; 73332 }(), function() { 73333 (function() { 73334 function y(e) { 73335 e.remember("_resizeHandler", this), this.el = e, this.parameters = {}, this.lastUpdateCall = null, this.p = e.doc().node.createSVGPoint(); 73336 } 73337 y.prototype.transformPoint = function(e, t, i) { 73338 return this.p.x = e - (this.offset.x - window.pageXOffset), this.p.y = t - (this.offset.y - window.pageYOffset), this.p.matrixTransform(i || this.m); 73339 }, y.prototype._extractPosition = function(e) { 73340 return { x: e.clientX != null ? e.clientX : e.touches[0].clientX, y: e.clientY != null ? e.clientY : e.touches[0].clientY }; 73341 }, y.prototype.init = function(e) { 73342 var t = this; 73343 if (this.stop(), e !== "stop") { 73344 for (var i in this.options = {}, this.el.resize.defaults) 73345 this.options[i] = this.el.resize.defaults[i], e[i] !== void 0 && (this.options[i] = e[i]); 73346 this.el.on("lt.resize", function(a) { 73347 t.resize(a || window.event); 73348 }), this.el.on("rt.resize", function(a) { 73349 t.resize(a || window.event); 73350 }), this.el.on("rb.resize", function(a) { 73351 t.resize(a || window.event); 73352 }), this.el.on("lb.resize", function(a) { 73353 t.resize(a || window.event); 73354 }), this.el.on("t.resize", function(a) { 73355 t.resize(a || window.event); 73356 }), this.el.on("r.resize", function(a) { 73357 t.resize(a || window.event); 73358 }), this.el.on("b.resize", function(a) { 73359 t.resize(a || window.event); 73360 }), this.el.on("l.resize", function(a) { 73361 t.resize(a || window.event); 73362 }), this.el.on("rot.resize", function(a) { 73363 t.resize(a || window.event); 73364 }), this.el.on("point.resize", function(a) { 73365 t.resize(a || window.event); 73366 }), this.update(); 73367 } 73368 }, y.prototype.stop = function() { 73369 return this.el.off("lt.resize"), this.el.off("rt.resize"), this.el.off("rb.resize"), this.el.off("lb.resize"), this.el.off("t.resize"), this.el.off("r.resize"), this.el.off("b.resize"), this.el.off("l.resize"), this.el.off("rot.resize"), this.el.off("point.resize"), this; 73370 }, y.prototype.resize = function(e) { 73371 var t = this; 73372 this.m = this.el.node.getScreenCTM().inverse(), this.offset = { x: window.pageXOffset, y: window.pageYOffset }; 73373 var i = this._extractPosition(e.detail.event); 73374 if (this.parameters = { type: this.el.type, p: this.transformPoint(i.x, i.y), x: e.detail.x, y: e.detail.y, box: this.el.bbox(), rotation: this.el.transform().rotation }, this.el.type === "text" && (this.parameters.fontSize = this.el.attr()["font-size"]), e.detail.i !== void 0) { 73375 var a = this.el.array().valueOf(); 73376 this.parameters.i = e.detail.i, this.parameters.pointCoords = [a[e.detail.i][0], a[e.detail.i][1]]; 73377 } 73378 switch (e.type) { 73379 case "lt": 73380 this.calc = function(s, r) { 73381 var n = this.snapToGrid(s, r); 73382 if (this.parameters.box.width - n[0] > 0 && this.parameters.box.height - n[1] > 0) { 73383 if (this.parameters.type === "text") 73384 return this.el.move(this.parameters.box.x + n[0], this.parameters.box.y), void this.el.attr("font-size", this.parameters.fontSize - n[0]); 73385 n = this.checkAspectRatio(n), this.el.move(this.parameters.box.x + n[0], this.parameters.box.y + n[1]).size(this.parameters.box.width - n[0], this.parameters.box.height - n[1]); 73386 } 73387 }; 73388 break; 73389 case "rt": 73390 this.calc = function(s, r) { 73391 var n = this.snapToGrid(s, r, 2); 73392 if (this.parameters.box.width + n[0] > 0 && this.parameters.box.height - n[1] > 0) { 73393 if (this.parameters.type === "text") 73394 return this.el.move(this.parameters.box.x - n[0], this.parameters.box.y), void this.el.attr("font-size", this.parameters.fontSize + n[0]); 73395 n = this.checkAspectRatio(n, !0), this.el.move(this.parameters.box.x, this.parameters.box.y + n[1]).size(this.parameters.box.width + n[0], this.parameters.box.height - n[1]); 73396 } 73397 }; 73398 break; 73399 case "rb": 73400 this.calc = function(s, r) { 73401 var n = this.snapToGrid(s, r, 0); 73402 if (this.parameters.box.width + n[0] > 0 && this.parameters.box.height + n[1] > 0) { 73403 if (this.parameters.type === "text") 73404 return this.el.move(this.parameters.box.x - n[0], this.parameters.box.y), void this.el.attr("font-size", this.parameters.fontSize + n[0]); 73405 n = this.checkAspectRatio(n), this.el.move(this.parameters.box.x, this.parameters.box.y).size(this.parameters.box.width + n[0], this.parameters.box.height + n[1]); 73406 } 73407 }; 73408 break; 73409 case "lb": 73410 this.calc = function(s, r) { 73411 var n = this.snapToGrid(s, r, 1); 73412 if (this.parameters.box.width - n[0] > 0 && this.parameters.box.height + n[1] > 0) { 73413 if (this.parameters.type === "text") 73414 return this.el.move(this.parameters.box.x + n[0], this.parameters.box.y), void this.el.attr("font-size", this.parameters.fontSize - n[0]); 73415 n = this.checkAspectRatio(n, !0), this.el.move(this.parameters.box.x + n[0], this.parameters.box.y).size(this.parameters.box.width - n[0], this.parameters.box.height + n[1]); 73416 } 73417 }; 73418 break; 73419 case "t": 73420 this.calc = function(s, r) { 73421 var n = this.snapToGrid(s, r, 2); 73422 if (this.parameters.box.height - n[1] > 0) { 73423 if (this.parameters.type === "text") 73424 return; 73425 this.el.move(this.parameters.box.x, this.parameters.box.y + n[1]).height(this.parameters.box.height - n[1]); 73426 } 73427 }; 73428 break; 73429 case "r": 73430 this.calc = function(s, r) { 73431 var n = this.snapToGrid(s, r, 0); 73432 if (this.parameters.box.width + n[0] > 0) { 73433 if (this.parameters.type === "text") 73434 return; 73435 this.el.move(this.parameters.box.x, this.parameters.box.y).width(this.parameters.box.width + n[0]); 73436 } 73437 }; 73438 break; 73439 case "b": 73440 this.calc = function(s, r) { 73441 var n = this.snapToGrid(s, r, 0); 73442 if (this.parameters.box.height + n[1] > 0) { 73443 if (this.parameters.type === "text") 73444 return; 73445 this.el.move(this.parameters.box.x, this.parameters.box.y).height(this.parameters.box.height + n[1]); 73446 } 73447 }; 73448 break; 73449 case "l": 73450 this.calc = function(s, r) { 73451 var n = this.snapToGrid(s, r, 1); 73452 if (this.parameters.box.width - n[0] > 0) { 73453 if (this.parameters.type === "text") 73454 return; 73455 this.el.move(this.parameters.box.x + n[0], this.parameters.box.y).width(this.parameters.box.width - n[0]); 73456 } 73457 }; 73458 break; 73459 case "rot": 73460 this.calc = function(s, r) { 73461 var n = s + this.parameters.p.x, o = r + this.parameters.p.y, h = Math.atan2(this.parameters.p.y - this.parameters.box.y - this.parameters.box.height / 2, this.parameters.p.x - this.parameters.box.x - this.parameters.box.width / 2), c = Math.atan2(o - this.parameters.box.y - this.parameters.box.height / 2, n - this.parameters.box.x - this.parameters.box.width / 2), d = this.parameters.rotation + 180 * (c - h) / Math.PI + this.options.snapToAngle / 2; 73462 this.el.center(this.parameters.box.cx, this.parameters.box.cy).rotate(d - d % this.options.snapToAngle, this.parameters.box.cx, this.parameters.box.cy); 73463 }; 73464 break; 73465 case "point": 73466 this.calc = function(s, r) { 73467 var n = this.snapToGrid(s, r, this.parameters.pointCoords[0], this.parameters.pointCoords[1]), o = this.el.array().valueOf(); 73468 o[this.parameters.i][0] = this.parameters.pointCoords[0] + n[0], o[this.parameters.i][1] = this.parameters.pointCoords[1] + n[1], this.el.plot(o); 73469 }; 73470 } 73471 this.el.fire("resizestart", { dx: this.parameters.x, dy: this.parameters.y, event: e }), SVG.on(window, "touchmove.resize", function(s) { 73472 t.update(s || window.event); 73473 }), SVG.on(window, "touchend.resize", function() { 73474 t.done(); 73475 }), SVG.on(window, "mousemove.resize", function(s) { 73476 t.update(s || window.event); 73477 }), SVG.on(window, "mouseup.resize", function() { 73478 t.done(); 73479 }); 73480 }, y.prototype.update = function(e) { 73481 if (e) { 73482 var t = this._extractPosition(e), i = this.transformPoint(t.x, t.y), a = i.x - this.parameters.p.x, s = i.y - this.parameters.p.y; 73483 this.lastUpdateCall = [a, s], this.calc(a, s), this.el.fire("resizing", { dx: a, dy: s, event: e }); 73484 } else 73485 this.lastUpdateCall && this.calc(this.lastUpdateCall[0], this.lastUpdateCall[1]); 73486 }, y.prototype.done = function() { 73487 this.lastUpdateCall = null, SVG.off(window, "mousemove.resize"), SVG.off(window, "mouseup.resize"), SVG.off(window, "touchmove.resize"), SVG.off(window, "touchend.resize"), this.el.fire("resizedone"); 73488 }, y.prototype.snapToGrid = function(e, t, i, a) { 73489 var s; 73490 return a !== void 0 ? s = [(i + e) % this.options.snapToGrid, (a + t) % this.options.snapToGrid] : (i = i ?? 3, s = [(this.parameters.box.x + e + (1 & i ? 0 : this.parameters.box.width)) % this.options.snapToGrid, (this.parameters.box.y + t + (2 & i ? 0 : this.parameters.box.height)) % this.options.snapToGrid]), e < 0 && (s[0] -= this.options.snapToGrid), t < 0 && (s[1] -= this.options.snapToGrid), e -= Math.abs(s[0]) < this.options.snapToGrid / 2 ? s[0] : s[0] - (e < 0 ? -this.options.snapToGrid : this.options.snapToGrid), t -= Math.abs(s[1]) < this.options.snapToGrid / 2 ? s[1] : s[1] - (t < 0 ? -this.options.snapToGrid : this.options.snapToGrid), this.constraintToBox(e, t, i, a); 73491 }, y.prototype.constraintToBox = function(e, t, i, a) { 73492 var s, r, n = this.options.constraint || {}; 73493 return a !== void 0 ? (s = i, r = a) : (s = this.parameters.box.x + (1 & i ? 0 : this.parameters.box.width), r = this.parameters.box.y + (2 & i ? 0 : this.parameters.box.height)), n.minX !== void 0 && s + e < n.minX && (e = n.minX - s), n.maxX !== void 0 && s + e > n.maxX && (e = n.maxX - s), n.minY !== void 0 && r + t < n.minY && (t = n.minY - r), n.maxY !== void 0 && r + t > n.maxY && (t = n.maxY - r), [e, t]; 73494 }, y.prototype.checkAspectRatio = function(e, t) { 73495 if (!this.options.saveAspectRatio) 73496 return e; 73497 var i = e.slice(), a = this.parameters.box.width / this.parameters.box.height, s = this.parameters.box.width + e[0], r = this.parameters.box.height - e[1], n = s / r; 73498 return n < a ? (i[1] = s / a - this.parameters.box.height, t && (i[1] = -i[1])) : n > a && (i[0] = this.parameters.box.width - r * a, t && (i[0] = -i[0])), i; 73499 }, SVG.extend(SVG.Element, { resize: function(e) { 73500 return (this.remember("_resizeHandler") || new y(this)).init(e || {}), this; 73501 } }), SVG.Element.prototype.resize.defaults = { snapToAngle: 0.1, snapToGrid: 1, constraint: {}, saveAspectRatio: !1 }; 73502 }).call(this); 73503 }(), window.Apex === void 0 && (window.Apex = {}); 73504 var ht = function() { 73505 function y(e) { 73506 F(this, y), this.ctx = e, this.w = e.w; 73507 } 73508 return Y(y, [{ key: "initModules", value: function() { 73509 this.ctx.publicMethods = ["updateOptions", "updateSeries", "appendData", "appendSeries", "isSeriesHidden", "toggleSeries", "showSeries", "hideSeries", "setLocale", "resetSeries", "zoomX", "toggleDataPointSelection", "dataURI", "exportToCSV", "addXaxisAnnotation", "addYaxisAnnotation", "addPointAnnotation", "clearAnnotations", "removeAnnotation", "paper", "destroy"], this.ctx.eventList = ["click", "mousedown", "mousemove", "mouseleave", "touchstart", "touchmove", "touchleave", "mouseup", "touchend"], this.ctx.animations = new de(this.ctx), this.ctx.axes = new mt(this.ctx), this.ctx.core = new Gt(this.ctx.el, this.ctx), this.ctx.config = new Le({}), this.ctx.data = new Je(this.ctx), this.ctx.grid = new Qe(this.ctx), this.ctx.graphics = new M(this.ctx), this.ctx.coreUtils = new q(this.ctx), this.ctx.crosshairs = new We(this.ctx), this.ctx.events = new xt(this.ctx), this.ctx.exports = new Ee(this.ctx), this.ctx.localization = new bt(this.ctx), this.ctx.options = new G(), this.ctx.responsive = new vt(this.ctx), this.ctx.series = new te(this.ctx), this.ctx.theme = new yt(this.ctx), this.ctx.formatters = new re(this.ctx), this.ctx.titleSubtitle = new wt(this.ctx), this.ctx.legend = new Ke(this.ctx), this.ctx.toolbar = new et(this.ctx), this.ctx.tooltip = new at(this.ctx), this.ctx.dimensions = new Ye(this.ctx), this.ctx.updateHelpers = new Vt(this.ctx), this.ctx.zoomPanSelection = new Pt(this.ctx), this.ctx.w.globals.tooltip = new at(this.ctx); 73510 } }]), y; 73511 }(), ct = function() { 73512 function y(e) { 73513 F(this, y), this.ctx = e, this.w = e.w; 73514 } 73515 return Y(y, [{ key: "clear", value: function(e) { 73516 var t = e.isUpdating; 73517 this.ctx.zoomPanSelection && this.ctx.zoomPanSelection.destroy(), this.ctx.toolbar && this.ctx.toolbar.destroy(), this.ctx.animations = null, this.ctx.axes = null, this.ctx.annotations = null, this.ctx.core = null, this.ctx.data = null, this.ctx.grid = null, this.ctx.series = null, this.ctx.responsive = null, this.ctx.theme = null, this.ctx.formatters = null, this.ctx.titleSubtitle = null, this.ctx.legend = null, this.ctx.dimensions = null, this.ctx.options = null, this.ctx.crosshairs = null, this.ctx.zoomPanSelection = null, this.ctx.updateHelpers = null, this.ctx.toolbar = null, this.ctx.localization = null, this.ctx.w.globals.tooltip = null, this.clearDomElements({ isUpdating: t }); 73518 } }, { key: "killSVG", value: function(e) { 73519 e.each(function(t, i) { 73520 this.removeClass("*"), this.off(), this.stop(); 73521 }, !0), e.ungroup(), e.clear(); 73522 } }, { key: "clearDomElements", value: function(e) { 73523 var t = this, i = e.isUpdating, a = this.w.globals.dom.Paper.node; 73524 a.parentNode && a.parentNode.parentNode && !i && (a.parentNode.parentNode.style.minHeight = "unset"); 73525 var s = this.w.globals.dom.baseEl; 73526 s && this.ctx.eventList.forEach(function(n) { 73527 s.removeEventListener(n, t.ctx.events.documentEvent); 73528 }); 73529 var r = this.w.globals.dom; 73530 if (this.ctx.el !== null) 73531 for (; this.ctx.el.firstChild; ) 73532 this.ctx.el.removeChild(this.ctx.el.firstChild); 73533 this.killSVG(r.Paper), r.Paper.remove(), r.elWrap = null, r.elGraphical = null, r.elLegendWrap = null, r.elLegendForeign = null, r.baseEl = null, r.elGridRect = null, r.elGridRectMask = null, r.elGridRectMarkerMask = null, r.elForecastMask = null, r.elNonForecastMask = null, r.elDefs = null; 73534 } }]), y; 73535 }(), _e = /* @__PURE__ */ new WeakMap(), jt = function() { 73536 function y(e, t) { 73537 F(this, y), this.opts = t, this.ctx = this, this.w = new ft(t).init(), this.el = e, this.w.globals.cuid = P.randomId(), this.w.globals.chartID = this.w.config.chart.id ? P.escapeString(this.w.config.chart.id) : this.w.globals.cuid, new ht(this).initModules(), this.create = P.bind(this.create, this), this.windowResizeHandler = this._windowResizeHandler.bind(this), this.parentResizeHandler = this._parentResizeCallback.bind(this); 73538 } 73539 return Y(y, [{ key: "render", value: function() { 73540 var e = this; 73541 return new Promise(function(t, i) { 73542 if (e.el !== null) { 73543 Apex._chartInstances === void 0 && (Apex._chartInstances = []), e.w.config.chart.id && Apex._chartInstances.push({ id: e.w.globals.chartID, group: e.w.config.chart.group, chart: e }), e.setLocale(e.w.config.chart.defaultLocale); 73544 var a = e.w.config.chart.events.beforeMount; 73545 if (typeof a == "function" && a(e, e.w), e.events.fireEvent("beforeMount", [e, e.w]), window.addEventListener("resize", e.windowResizeHandler), function(g, p) { 73546 var f = !1; 73547 if (g.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) { 73548 var b = g.getBoundingClientRect(); 73549 g.style.display !== "none" && b.width !== 0 || (f = !0); 73550 } 73551 var m = new ResizeObserver(function(w) { 73552 f && p.call(g, w), f = !0; 73553 }); 73554 g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? Array.from(g.children).forEach(function(w) { 73555 return m.observe(w); 73556 }) : m.observe(g), _e.set(p, m); 73557 }(e.el.parentNode, e.parentResizeHandler), !e.css) { 73558 var s = e.el.getRootNode && e.el.getRootNode(), r = P.is("ShadowRoot", s), n = e.el.ownerDocument, o = n.getElementById("apexcharts-css"); 73559 if (r || !o) { 73560 var h; 73561 e.css = document.createElement("style"), e.css.id = "apexcharts-css", e.css.textContent = `@keyframes opaque { 73562 0% { 73563 opacity: 0 73564 } 73565 73566 to { 73567 opacity: 1 73568 } 73569} 73570 73571@keyframes resizeanim { 73572 0%,to { 73573 opacity: 0 73574 } 73575} 73576 73577.apexcharts-canvas { 73578 position: relative; 73579 user-select: none 73580} 73581 73582.apexcharts-canvas ::-webkit-scrollbar { 73583 -webkit-appearance: none; 73584 width: 6px 73585} 73586 73587.apexcharts-canvas ::-webkit-scrollbar-thumb { 73588 border-radius: 4px; 73589 background-color: rgba(0,0,0,.5); 73590 box-shadow: 0 0 1px rgba(255,255,255,.5); 73591 -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5) 73592} 73593 73594.apexcharts-inner { 73595 position: relative 73596} 73597 73598.apexcharts-text tspan { 73599 font-family: inherit 73600} 73601 73602.legend-mouseover-inactive { 73603 transition: .15s ease all; 73604 opacity: .2 73605} 73606 73607.apexcharts-legend-text { 73608 padding-left: 15px; 73609 margin-left: -15px; 73610} 73611 73612.apexcharts-series-collapsed { 73613 opacity: 0 73614} 73615 73616.apexcharts-tooltip { 73617 border-radius: 5px; 73618 box-shadow: 2px 2px 6px -4px #999; 73619 cursor: default; 73620 font-size: 14px; 73621 left: 62px; 73622 opacity: 0; 73623 pointer-events: none; 73624 position: absolute; 73625 top: 20px; 73626 display: flex; 73627 flex-direction: column; 73628 overflow: hidden; 73629 white-space: nowrap; 73630 z-index: 12; 73631 transition: .15s ease all 73632} 73633 73634.apexcharts-tooltip.apexcharts-active { 73635 opacity: 1; 73636 transition: .15s ease all 73637} 73638 73639.apexcharts-tooltip.apexcharts-theme-light { 73640 border: 1px solid #e3e3e3; 73641 background: rgba(255,255,255,.96) 73642} 73643 73644.apexcharts-tooltip.apexcharts-theme-dark { 73645 color: #fff; 73646 background: rgba(30,30,30,.8) 73647} 73648 73649.apexcharts-tooltip * { 73650 font-family: inherit 73651} 73652 73653.apexcharts-tooltip-title { 73654 padding: 6px; 73655 font-size: 15px; 73656 margin-bottom: 4px 73657} 73658 73659.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { 73660 background: #eceff1; 73661 border-bottom: 1px solid #ddd 73662} 73663 73664.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { 73665 background: rgba(0,0,0,.7); 73666 border-bottom: 1px solid #333 73667} 73668 73669.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value { 73670 display: inline-block; 73671 margin-left: 5px; 73672 font-weight: 600 73673} 73674 73675.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty { 73676 display: none 73677} 73678 73679.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value { 73680 padding: 6px 0 5px 73681} 73682 73683.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value { 73684 display: flex 73685} 73686 73687.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty) { 73688 margin-top: -6px 73689} 73690 73691.apexcharts-tooltip-marker { 73692 width: 12px; 73693 height: 12px; 73694 position: relative; 73695 top: 0; 73696 margin-right: 10px; 73697 border-radius: 50% 73698} 73699 73700.apexcharts-tooltip-series-group { 73701 padding: 0 10px; 73702 display: none; 73703 text-align: left; 73704 justify-content: left; 73705 align-items: center 73706} 73707 73708.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { 73709 opacity: 1 73710} 73711 73712.apexcharts-tooltip-series-group.apexcharts-active,.apexcharts-tooltip-series-group:last-child { 73713 padding-bottom: 4px 73714} 73715 73716.apexcharts-tooltip-series-group-hidden { 73717 opacity: 0; 73718 height: 0; 73719 line-height: 0; 73720 padding: 0!important 73721} 73722 73723.apexcharts-tooltip-y-group { 73724 padding: 6px 0 5px 73725} 73726 73727.apexcharts-custom-tooltip,.apexcharts-tooltip-box { 73728 padding: 4px 8px 73729} 73730 73731.apexcharts-tooltip-boxPlot { 73732 display: flex; 73733 flex-direction: column-reverse 73734} 73735 73736.apexcharts-tooltip-box>div { 73737 margin: 4px 0 73738} 73739 73740.apexcharts-tooltip-box span.value { 73741 font-weight: 700 73742} 73743 73744.apexcharts-tooltip-rangebar { 73745 padding: 5px 8px 73746} 73747 73748.apexcharts-tooltip-rangebar .category { 73749 font-weight: 600; 73750 color: #777 73751} 73752 73753.apexcharts-tooltip-rangebar .series-name { 73754 font-weight: 700; 73755 display: block; 73756 margin-bottom: 5px 73757} 73758 73759.apexcharts-xaxistooltip,.apexcharts-yaxistooltip { 73760 opacity: 0; 73761 pointer-events: none; 73762 color: #373d3f; 73763 font-size: 13px; 73764 text-align: center; 73765 border-radius: 2px; 73766 position: absolute; 73767 z-index: 10; 73768 background: #eceff1; 73769 border: 1px solid #90a4ae 73770} 73771 73772.apexcharts-xaxistooltip { 73773 padding: 9px 10px; 73774 transition: .15s ease all 73775} 73776 73777.apexcharts-xaxistooltip.apexcharts-theme-dark { 73778 background: rgba(0,0,0,.7); 73779 border: 1px solid rgba(0,0,0,.5); 73780 color: #fff 73781} 73782 73783.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before { 73784 left: 50%; 73785 border: solid transparent; 73786 content: " "; 73787 height: 0; 73788 width: 0; 73789 position: absolute; 73790 pointer-events: none 73791} 73792 73793.apexcharts-xaxistooltip:after { 73794 border-color: transparent; 73795 border-width: 6px; 73796 margin-left: -6px 73797} 73798 73799.apexcharts-xaxistooltip:before { 73800 border-color: transparent; 73801 border-width: 7px; 73802 margin-left: -7px 73803} 73804 73805.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before { 73806 bottom: 100% 73807} 73808 73809.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before { 73810 top: 100% 73811} 73812 73813.apexcharts-xaxistooltip-bottom:after { 73814 border-bottom-color: #eceff1 73815} 73816 73817.apexcharts-xaxistooltip-bottom:before { 73818 border-bottom-color: #90a4ae 73819} 73820 73821.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before { 73822 border-bottom-color: rgba(0,0,0,.5) 73823} 73824 73825.apexcharts-xaxistooltip-top:after { 73826 border-top-color: #eceff1 73827} 73828 73829.apexcharts-xaxistooltip-top:before { 73830 border-top-color: #90a4ae 73831} 73832 73833.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before { 73834 border-top-color: rgba(0,0,0,.5) 73835} 73836 73837.apexcharts-xaxistooltip.apexcharts-active { 73838 opacity: 1; 73839 transition: .15s ease all 73840} 73841 73842.apexcharts-yaxistooltip { 73843 padding: 4px 10px 73844} 73845 73846.apexcharts-yaxistooltip.apexcharts-theme-dark { 73847 background: rgba(0,0,0,.7); 73848 border: 1px solid rgba(0,0,0,.5); 73849 color: #fff 73850} 73851 73852.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before { 73853 top: 50%; 73854 border: solid transparent; 73855 content: " "; 73856 height: 0; 73857 width: 0; 73858 position: absolute; 73859 pointer-events: none 73860} 73861 73862.apexcharts-yaxistooltip:after { 73863 border-color: transparent; 73864 border-width: 6px; 73865 margin-top: -6px 73866} 73867 73868.apexcharts-yaxistooltip:before { 73869 border-color: transparent; 73870 border-width: 7px; 73871 margin-top: -7px 73872} 73873 73874.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before { 73875 left: 100% 73876} 73877 73878.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before { 73879 right: 100% 73880} 73881 73882.apexcharts-yaxistooltip-left:after { 73883 border-left-color: #eceff1 73884} 73885 73886.apexcharts-yaxistooltip-left:before { 73887 border-left-color: #90a4ae 73888} 73889 73890.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before { 73891 border-left-color: rgba(0,0,0,.5) 73892} 73893 73894.apexcharts-yaxistooltip-right:after { 73895 border-right-color: #eceff1 73896} 73897 73898.apexcharts-yaxistooltip-right:before { 73899 border-right-color: #90a4ae 73900} 73901 73902.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before { 73903 border-right-color: rgba(0,0,0,.5) 73904} 73905 73906.apexcharts-yaxistooltip.apexcharts-active { 73907 opacity: 1 73908} 73909 73910.apexcharts-yaxistooltip-hidden { 73911 display: none 73912} 73913 73914.apexcharts-xcrosshairs,.apexcharts-ycrosshairs { 73915 pointer-events: none; 73916 opacity: 0; 73917 transition: .15s ease all 73918} 73919 73920.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active { 73921 opacity: 1; 73922 transition: .15s ease all 73923} 73924 73925.apexcharts-ycrosshairs-hidden { 73926 opacity: 0 73927} 73928 73929.apexcharts-selection-rect { 73930 cursor: move 73931} 73932 73933.svg_select_boundingRect,.svg_select_points_rot { 73934 pointer-events: none; 73935 opacity: 0; 73936 visibility: hidden 73937} 73938 73939.apexcharts-selection-rect+g .svg_select_boundingRect,.apexcharts-selection-rect+g .svg_select_points_rot { 73940 opacity: 0; 73941 visibility: hidden 73942} 73943 73944.apexcharts-selection-rect+g .svg_select_points_l,.apexcharts-selection-rect+g .svg_select_points_r { 73945 cursor: ew-resize; 73946 opacity: 1; 73947 visibility: visible 73948} 73949 73950.svg_select_points { 73951 fill: #efefef; 73952 stroke: #333; 73953 rx: 2 73954} 73955 73956.apexcharts-svg.apexcharts-zoomable.hovering-zoom { 73957 cursor: crosshair 73958} 73959 73960.apexcharts-svg.apexcharts-zoomable.hovering-pan { 73961 cursor: move 73962} 73963 73964.apexcharts-menu-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon { 73965 cursor: pointer; 73966 width: 20px; 73967 height: 20px; 73968 line-height: 24px; 73969 color: #6e8192; 73970 text-align: center 73971} 73972 73973.apexcharts-menu-icon svg,.apexcharts-reset-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg { 73974 fill: #6e8192 73975} 73976 73977.apexcharts-selection-icon svg { 73978 fill: #444; 73979 transform: scale(.76) 73980} 73981 73982.apexcharts-theme-dark .apexcharts-menu-icon svg,.apexcharts-theme-dark .apexcharts-pan-icon svg,.apexcharts-theme-dark .apexcharts-reset-icon svg,.apexcharts-theme-dark .apexcharts-selection-icon svg,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,.apexcharts-theme-dark .apexcharts-zoom-icon svg,.apexcharts-theme-dark .apexcharts-zoomin-icon svg,.apexcharts-theme-dark .apexcharts-zoomout-icon svg { 73983 fill: #f3f4f5 73984} 73985 73986.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg { 73987 fill: #008ffb 73988} 73989 73990.apexcharts-theme-light .apexcharts-menu-icon:hover svg,.apexcharts-theme-light .apexcharts-reset-icon:hover svg,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg { 73991 fill: #333 73992} 73993 73994.apexcharts-menu-icon,.apexcharts-selection-icon { 73995 position: relative 73996} 73997 73998.apexcharts-reset-icon { 73999 margin-left: 5px 74000} 74001 74002.apexcharts-menu-icon,.apexcharts-reset-icon,.apexcharts-zoom-icon { 74003 transform: scale(.85) 74004} 74005 74006.apexcharts-zoomin-icon,.apexcharts-zoomout-icon { 74007 transform: scale(.7) 74008} 74009 74010.apexcharts-zoomout-icon { 74011 margin-right: 3px 74012} 74013 74014.apexcharts-pan-icon { 74015 transform: scale(.62); 74016 position: relative; 74017 left: 1px; 74018 top: 0 74019} 74020 74021.apexcharts-pan-icon svg { 74022 fill: #fff; 74023 stroke: #6e8192; 74024 stroke-width: 2 74025} 74026 74027.apexcharts-pan-icon.apexcharts-selected svg { 74028 stroke: #008ffb 74029} 74030 74031.apexcharts-pan-icon:not(.apexcharts-selected):hover svg { 74032 stroke: #333 74033} 74034 74035.apexcharts-toolbar { 74036 position: absolute; 74037 z-index: 11; 74038 max-width: 176px; 74039 text-align: right; 74040 border-radius: 3px; 74041 padding: 0 6px 2px; 74042 display: flex; 74043 justify-content: space-between; 74044 align-items: center 74045} 74046 74047.apexcharts-menu { 74048 background: #fff; 74049 position: absolute; 74050 top: 100%; 74051 border: 1px solid #ddd; 74052 border-radius: 3px; 74053 padding: 3px; 74054 right: 10px; 74055 opacity: 0; 74056 min-width: 110px; 74057 transition: .15s ease all; 74058 pointer-events: none 74059} 74060 74061.apexcharts-menu.apexcharts-menu-open { 74062 opacity: 1; 74063 pointer-events: all; 74064 transition: .15s ease all 74065} 74066 74067.apexcharts-menu-item { 74068 padding: 6px 7px; 74069 font-size: 12px; 74070 cursor: pointer 74071} 74072 74073.apexcharts-theme-light .apexcharts-menu-item:hover { 74074 background: #eee 74075} 74076 74077.apexcharts-theme-dark .apexcharts-menu { 74078 background: rgba(0,0,0,.7); 74079 color: #fff 74080} 74081 74082@media screen and (min-width:768px) { 74083 .apexcharts-canvas:hover .apexcharts-toolbar { 74084 opacity: 1 74085 } 74086} 74087 74088.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points { 74089 opacity: 0 74090} 74091 74092.apexcharts-hidden-element-shown { 74093 opacity: 1; 74094 transition: 0.25s ease all; 74095} 74096.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label { 74097 cursor: default; 74098 pointer-events: none 74099} 74100 74101.apexcharts-pie-label-delay { 74102 opacity: 0; 74103 animation-name: opaque; 74104 animation-duration: .3s; 74105 animation-fill-mode: forwards; 74106 animation-timing-function: ease 74107} 74108 74109.apexcharts-radialbar-label { 74110 cursor: pointer; 74111} 74112 74113.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-gridline,.apexcharts-line,.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-point-annotation-label,.apexcharts-radar-series path,.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect { 74114 pointer-events: none 74115} 74116 74117.apexcharts-marker { 74118 transition: .15s ease all 74119} 74120 74121.resize-triggers { 74122 animation: 1ms resizeanim; 74123 visibility: hidden; 74124 opacity: 0; 74125 height: 100%; 74126 width: 100%; 74127 overflow: hidden 74128} 74129 74130.contract-trigger:before,.resize-triggers,.resize-triggers>div { 74131 content: " "; 74132 display: block; 74133 position: absolute; 74134 top: 0; 74135 left: 0 74136} 74137 74138.resize-triggers>div { 74139 height: 100%; 74140 width: 100%; 74141 background: #eee; 74142 overflow: auto 74143} 74144 74145.contract-trigger:before { 74146 overflow: hidden; 74147 width: 200%; 74148 height: 200% 74149} 74150 74151.apexcharts-bar-goals-markers{ 74152 pointer-events: none 74153} 74154 74155.apexcharts-bar-shadows{ 74156 pointer-events: none 74157} 74158 74159.apexcharts-rangebar-goals-markers{ 74160 pointer-events: none 74161}`; 74162 var c = ((h = e.opts.chart) === null || h === void 0 ? void 0 : h.nonce) || e.w.config.chart.nonce; 74163 c && e.css.setAttribute("nonce", c), r ? s.prepend(e.css) : n.head.appendChild(e.css); 74164 } 74165 } 74166 var d = e.create(e.w.config.series, {}); 74167 if (!d) 74168 return t(e); 74169 e.mount(d).then(function() { 74170 typeof e.w.config.chart.events.mounted == "function" && e.w.config.chart.events.mounted(e, e.w), e.events.fireEvent("mounted", [e, e.w]), t(d); 74171 }).catch(function(g) { 74172 i(g); 74173 }); 74174 } else 74175 i(new Error("Element not found")); 74176 }); 74177 } }, { key: "create", value: function(e, t) { 74178 var i = this.w; 74179 new ht(this).initModules(); 74180 var a = this.w.globals; 74181 if (a.noData = !1, a.animationEnded = !1, this.responsive.checkResponsiveConfig(t), i.config.xaxis.convertedCatToNumeric && new oe(i.config).convertCatToNumericXaxis(i.config, this.ctx), this.el === null || (this.core.setupElements(), i.config.chart.type === "treemap" && (i.config.grid.show = !1, i.config.yaxis[0].show = !1), a.svgWidth === 0)) 74182 return a.animationEnded = !0, null; 74183 var s = q.checkComboSeries(e); 74184 a.comboCharts = s.comboCharts, a.comboBarCount = s.comboBarCount; 74185 var r = e.every(function(c) { 74186 return c.data && c.data.length === 0; 74187 }); 74188 (e.length === 0 || r) && this.series.handleNoData(), this.events.setupEventHandlers(), this.data.parseData(e), this.theme.init(), new Pe(this).setGlobalMarkerSize(), this.formatters.setLabelFormatters(), this.titleSubtitle.draw(), a.noData && a.collapsedSeries.length !== a.series.length && !i.config.legend.showForSingleSeries || this.legend.init(), this.series.hasAllSeriesEqualX(), a.axisCharts && (this.core.coreCalculations(), i.config.xaxis.type !== "category" && this.formatters.setLabelFormatters(), this.ctx.toolbar.minX = i.globals.minX, this.ctx.toolbar.maxX = i.globals.maxX), this.formatters.heatmapLabelFormatters(), new q(this).getLargestMarkerSize(), this.dimensions.plotCoords(); 74189 var n = this.core.xySettings(); 74190 this.grid.createGridMask(); 74191 var o = this.core.plotChartType(e, n), h = new ye(this); 74192 return h.bringForward(), i.config.dataLabels.background.enabled && h.dataLabelsBackground(), this.core.shiftGraphPosition(), { elGraph: o, xyRatios: n, dimensions: { plot: { left: i.globals.translateX, top: i.globals.translateY, width: i.globals.gridWidth, height: i.globals.gridHeight } } }; 74193 } }, { key: "mount", value: function() { 74194 var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, i = this, a = i.w; 74195 return new Promise(function(s, r) { 74196 if (i.el === null) 74197 return r(new Error("Not enough data to display or target element not found")); 74198 (t === null || a.globals.allSeriesCollapsed) && i.series.handleNoData(), i.grid = new Qe(i); 74199 var n, o, h = i.grid.drawGrid(); 74200 if (i.annotations = new ie(i), i.annotations.drawImageAnnos(), i.annotations.drawTextAnnos(), a.config.grid.position === "back" && (h && a.globals.dom.elGraphical.add(h.el), h != null && (n = h.elGridBorders) !== null && n !== void 0 && n.node && a.globals.dom.elGraphical.add(h.elGridBorders)), Array.isArray(t.elGraph)) 74201 for (var c = 0; c < t.elGraph.length; c++) 74202 a.globals.dom.elGraphical.add(t.elGraph[c]); 74203 else 74204 a.globals.dom.elGraphical.add(t.elGraph); 74205 a.config.grid.position === "front" && (h && a.globals.dom.elGraphical.add(h.el), h != null && (o = h.elGridBorders) !== null && o !== void 0 && o.node && a.globals.dom.elGraphical.add(h.elGridBorders)), a.config.xaxis.crosshairs.position === "front" && i.crosshairs.drawXCrosshairs(), a.config.yaxis[0].crosshairs.position === "front" && i.crosshairs.drawYCrosshairs(), a.config.chart.type !== "treemap" && i.axes.drawAxis(a.config.chart.type, h); 74206 var d = new Ie(e.ctx, h), g = new Ne(e.ctx, h); 74207 if (h !== null && (d.xAxisLabelCorrections(h.xAxisTickWidth), g.setYAxisTextAlignments(), a.config.yaxis.map(function(f, b) { 74208 a.globals.ignoreYAxisIndexes.indexOf(b) === -1 && g.yAxisTitleRotate(b, f.opposite); 74209 })), i.annotations.drawAxesAnnotations(), !a.globals.noData) { 74210 if (a.config.tooltip.enabled && !a.globals.noData && i.w.globals.tooltip.drawTooltip(t.xyRatios), a.globals.axisCharts && (a.globals.isXNumeric || a.config.xaxis.convertedCatToNumeric || a.globals.isRangeBar)) 74211 (a.config.chart.zoom.enabled || a.config.chart.selection && a.config.chart.selection.enabled || a.config.chart.pan && a.config.chart.pan.enabled) && i.zoomPanSelection.init({ xyRatios: t.xyRatios }); 74212 else { 74213 var p = a.config.chart.toolbar.tools; 74214 ["zoom", "zoomin", "zoomout", "selection", "pan", "reset"].forEach(function(f) { 74215 p[f] = !1; 74216 }); 74217 } 74218 a.config.chart.toolbar.show && !a.globals.allSeriesCollapsed && i.toolbar.createToolbar(); 74219 } 74220 a.globals.memory.methodsToExec.length > 0 && a.globals.memory.methodsToExec.forEach(function(f) { 74221 f.method(f.params, !1, f.context); 74222 }), a.globals.axisCharts || a.globals.noData || i.core.resizeNonAxisCharts(), s(i); 74223 }); 74224 } }, { key: "destroy", value: function() { 74225 var e, t; 74226 window.removeEventListener("resize", this.windowResizeHandler), this.el.parentNode, e = this.parentResizeHandler, (t = _e.get(e)) && (t.disconnect(), _e.delete(e)); 74227 var i = this.w.config.chart.id; 74228 i && Apex._chartInstances.forEach(function(a, s) { 74229 a.id === P.escapeString(i) && Apex._chartInstances.splice(s, 1); 74230 }), new ct(this.ctx).clear({ isUpdating: !1 }); 74231 } }, { key: "updateOptions", value: function(e) { 74232 var t = this, i = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], a = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], s = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], r = !(arguments.length > 4 && arguments[4] !== void 0) || arguments[4], n = this.w; 74233 return n.globals.selection = void 0, e.series && (this.series.resetSeries(!1, !0, !1), e.series.length && e.series[0].data && (e.series = e.series.map(function(o, h) { 74234 return t.updateHelpers._extendSeries(o, h); 74235 })), this.updateHelpers.revertDefaultAxisMinMax()), e.xaxis && (e = this.updateHelpers.forceXAxisUpdate(e)), e.yaxis && (e = this.updateHelpers.forceYAxisUpdate(e)), n.globals.collapsedSeriesIndices.length > 0 && this.series.clearPreviousPaths(), e.theme && (e = this.theme.updateThemeOptions(e)), this.updateHelpers._updateOptions(e, i, a, s, r); 74236 } }, { key: "updateSeries", value: function() { 74237 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2]; 74238 return this.series.resetSeries(!1), this.updateHelpers.revertDefaultAxisMinMax(), this.updateHelpers._updateSeries(e, t, i); 74239 } }, { key: "appendSeries", value: function(e) { 74240 var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], a = this.w.config.series.slice(); 74241 return a.push(e), this.series.resetSeries(!1), this.updateHelpers.revertDefaultAxisMinMax(), this.updateHelpers._updateSeries(a, t, i); 74242 } }, { key: "appendData", value: function(e) { 74243 var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = this; 74244 i.w.globals.dataChanged = !0, i.series.getPreviousPaths(); 74245 for (var a = i.w.config.series.slice(), s = 0; s < a.length; s++) 74246 if (e[s] !== null && e[s] !== void 0) 74247 for (var r = 0; r < e[s].data.length; r++) 74248 a[s].data.push(e[s].data[r]); 74249 return i.w.config.series = a, t && (i.w.globals.initialSeries = P.clone(i.w.config.series)), this.update(); 74250 } }, { key: "update", value: function(e) { 74251 var t = this; 74252 return new Promise(function(i, a) { 74253 new ct(t.ctx).clear({ isUpdating: !0 }); 74254 var s = t.create(t.w.config.series, e); 74255 if (!s) 74256 return i(t); 74257 t.mount(s).then(function() { 74258 typeof t.w.config.chart.events.updated == "function" && t.w.config.chart.events.updated(t, t.w), t.events.fireEvent("updated", [t, t.w]), t.w.globals.isDirty = !0, i(t); 74259 }).catch(function(r) { 74260 a(r); 74261 }); 74262 }); 74263 } }, { key: "getSyncedCharts", value: function() { 74264 var e = this.getGroupedCharts(), t = [this]; 74265 return e.length && (t = [], e.forEach(function(i) { 74266 t.push(i); 74267 })), t; 74268 } }, { key: "getGroupedCharts", value: function() { 74269 var e = this; 74270 return Apex._chartInstances.filter(function(t) { 74271 if (t.group) 74272 return !0; 74273 }).map(function(t) { 74274 return e.w.config.chart.group === t.group ? t.chart : e; 74275 }); 74276 } }, { key: "toggleSeries", value: function(e) { 74277 return this.series.toggleSeries(e); 74278 } }, { key: "highlightSeriesOnLegendHover", value: function(e, t) { 74279 return this.series.toggleSeriesOnHover(e, t); 74280 } }, { key: "showSeries", value: function(e) { 74281 this.series.showSeries(e); 74282 } }, { key: "hideSeries", value: function(e) { 74283 this.series.hideSeries(e); 74284 } }, { key: "isSeriesHidden", value: function(e) { 74285 this.series.isSeriesHidden(e); 74286 } }, { key: "resetSeries", value: function() { 74287 var e = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1]; 74288 this.series.resetSeries(e, t); 74289 } }, { key: "addEventListener", value: function(e, t) { 74290 this.events.addEventListener(e, t); 74291 } }, { key: "removeEventListener", value: function(e, t) { 74292 this.events.removeEventListener(e, t); 74293 } }, { key: "addXaxisAnnotation", value: function(e) { 74294 var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, a = this; 74295 i && (a = i), a.annotations.addXaxisAnnotationExternal(e, t, a); 74296 } }, { key: "addYaxisAnnotation", value: function(e) { 74297 var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, a = this; 74298 i && (a = i), a.annotations.addYaxisAnnotationExternal(e, t, a); 74299 } }, { key: "addPointAnnotation", value: function(e) { 74300 var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, a = this; 74301 i && (a = i), a.annotations.addPointAnnotationExternal(e, t, a); 74302 } }, { key: "clearAnnotations", value: function() { 74303 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0, t = this; 74304 e && (t = e), t.annotations.clearAnnotations(t); 74305 } }, { key: "removeAnnotation", value: function(e) { 74306 var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0, i = this; 74307 t && (i = t), i.annotations.removeAnnotation(i, e); 74308 } }, { key: "getChartArea", value: function() { 74309 return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner"); 74310 } }, { key: "getSeriesTotalXRange", value: function(e, t) { 74311 return this.coreUtils.getSeriesTotalsXRange(e, t); 74312 } }, { key: "getHighestValueInSeries", value: function() { 74313 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; 74314 return new De(this.ctx).getMinYMaxY(e).highestY; 74315 } }, { key: "getLowestValueInSeries", value: function() { 74316 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; 74317 return new De(this.ctx).getMinYMaxY(e).lowestY; 74318 } }, { key: "getSeriesTotal", value: function() { 74319 return this.w.globals.seriesTotals; 74320 } }, { key: "toggleDataPointSelection", value: function(e, t) { 74321 return this.updateHelpers.toggleDataPointSelection(e, t); 74322 } }, { key: "zoomX", value: function(e, t) { 74323 this.ctx.toolbar.zoomUpdateOptions(e, t); 74324 } }, { key: "setLocale", value: function(e) { 74325 this.localization.setCurrentLocaleValues(e); 74326 } }, { key: "dataURI", value: function(e) { 74327 return new Ee(this.ctx).dataURI(e); 74328 } }, { key: "exportToCSV", value: function() { 74329 var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; 74330 return new Ee(this.ctx).exportToCSV(e); 74331 } }, { key: "paper", value: function() { 74332 return this.w.globals.dom.Paper; 74333 } }, { key: "_parentResizeCallback", value: function() { 74334 this.w.globals.animationEnded && this.w.config.chart.redrawOnParentResize && this._windowResize(); 74335 } }, { key: "_windowResize", value: function() { 74336 var e = this; 74337 clearTimeout(this.w.globals.resizeTimer), this.w.globals.resizeTimer = window.setTimeout(function() { 74338 e.w.globals.resized = !0, e.w.globals.dataChanged = !1, e.ctx.update(); 74339 }, 150); 74340 } }, { key: "_windowResizeHandler", value: function() { 74341 var e = this.w.config.chart.redrawOnWindowResize; 74342 typeof e == "function" && (e = e()), e && this._windowResize(); 74343 } }], [{ key: "getChartByID", value: function(e) { 74344 var t = P.escapeString(e); 74345 if (Apex._chartInstances) { 74346 var i = Apex._chartInstances.filter(function(a) { 74347 return a.id === t; 74348 })[0]; 74349 return i && i.chart; 74350 } 74351 } }, { key: "initOnLoad", value: function() { 74352 for (var e = document.querySelectorAll("[data-apexcharts]"), t = 0; t < e.length; t++) 74353 new y(e[t], JSON.parse(e[t].getAttribute("data-options"))).render(); 74354 } }, { key: "exec", value: function(e, t) { 74355 var i = this.getChartByID(e); 74356 if (i) { 74357 i.w.globals.isExecCalled = !0; 74358 var a = null; 74359 if (i.publicMethods.indexOf(t) !== -1) { 74360 for (var s = arguments.length, r = new Array(s > 2 ? s - 2 : 0), n = 2; n < s; n++) 74361 r[n - 2] = arguments[n]; 74362 a = i[t].apply(i, r); 74363 } 74364 return a; 74365 } 74366 } }, { key: "merge", value: function(e, t) { 74367 return P.extend(e, t); 74368 } }]), y; 74369 }(); 74370 _.exports = jt; 74371})(Ue, Ue.exports); 74372var ti = Ue.exports; 74373const ut = /* @__PURE__ */ ei(ti), pt = [ 74374 "animationEnd", 74375 "beforeMount", 74376 "mounted", 74377 "updated", 74378 "click", 74379 "mouseMove", 74380 "mouseLeave", 74381 "legendClick", 74382 "markerClick", 74383 "selection", 74384 "dataPointSelection", 74385 "dataPointMouseEnter", 74386 "dataPointMouseLeave", 74387 "beforeZoom", 74388 "beforeResetZoom", 74389 "zoomed", 74390 "scrolled", 74391 "brushScrolled" 74392], qe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 74393 name: "apexchart", 74394 props: { 74395 options: { 74396 type: Object 74397 }, 74398 type: { 74399 type: String 74400 }, 74401 series: { 74402 type: Array, 74403 required: !0 74404 }, 74405 width: { 74406 default: "100%" 74407 }, 74408 height: { 74409 default: "auto" 74410 } 74411 }, 74412 // events emitted by this component 74413 emits: pt, 74414 setup(_, { emit: Re }) { 74415 const Ae = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), X = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), U = (H) => H && typeof H == "object" && !Array.isArray(H) && H != null, F = (H, G) => { 74416 typeof Object.assign != "function" && function() { 74417 Object.assign = function(B) { 74418 if (B == null) 74419 throw new TypeError("Cannot convert undefined or null to object"); 74420 let re = Object(B); 74421 for (let fe = 1; fe < arguments.length; fe++) { 74422 let ne = arguments[fe]; 74423 if (ne != null) 74424 for (let oe in ne) 74425 ne.hasOwnProperty(oe) && (re[oe] = ne[oe]); 74426 } 74427 return re; 74428 }; 74429 }(); 74430 let ie = Object.assign({}, H); 74431 return U(H) && U(G) && Object.keys(G).forEach((B) => { 74432 U(G[B]) ? B in H ? ie[B] = F(H[B], G[B]) : Object.assign(ie, { 74433 [B]: G[B] 74434 }) : Object.assign(ie, { 74435 [B]: G[B] 74436 }); 74437 }), ie; 74438 }, ce = async () => { 74439 if (await (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(), X.value) 74440 return; 74441 const H = { 74442 chart: { 74443 type: _.type || _.options.chart.type || "line", 74444 height: _.height, 74445 width: _.width, 74446 events: {} 74447 }, 74448 series: _.series 74449 }; 74450 pt.forEach((ie) => { 74451 let B = (...re) => Re(ie, ...re); 74452 H.chart.events[ie] = B; 74453 }); 74454 const G = F(_.options, H); 74455 return X.value = new ut(Ae.value, G), X.value.render(); 74456 }, Y = () => (ee(), ce()), ee = () => { 74457 X.value.destroy(); 74458 }, ge = (H, G) => X.value.updateSeries(H, G), me = (H, G, ie, B) => X.value.updateOptions(H, G, ie, B), Se = (H) => X.value.toggleSeries(H), ze = (H) => { 74459 X.value.showSeries(H); 74460 }, ue = (H) => { 74461 X.value.hideSeries(H); 74462 }, Me = (H, G) => X.value.appendSeries(H, G), J = () => { 74463 X.value.resetSeries(); 74464 }, Xe = (H, G) => { 74465 X.value.toggleDataPointSelection(H, G); 74466 }, Ce = (H) => X.value.appendData(H), P = (H, G) => X.value.zoomX(H, G), de = (H) => X.value.dataURI(H), Z = (H) => X.value.setLocale(H), M = (H, G) => { 74467 X.value.addXaxisAnnotation(H, G); 74468 }, q = (H, G) => { 74469 X.value.addYaxisAnnotation(H, G); 74470 }, ve = (H, G) => { 74471 X.value.addPointAnnotation(H, G); 74472 }, Oe = (H, G) => { 74473 X.value.removeAnnotation(H, G); 74474 }, He = () => { 74475 X.value.clearAnnotations(); 74476 }; 74477 (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(() => { 74478 window.ApexCharts = ut; 74479 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 74480 Ae.value = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)().proxy.$el, ce(); 74481 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(() => { 74482 X.value && ee(); 74483 }); 74484 const pe = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(_); 74485 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(pe.options, () => { 74486 !X.value && _.options ? ce() : X.value.updateOptions(_.options); 74487 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 74488 pe.series, 74489 () => { 74490 !X.value && _.series ? ce() : X.value.updateSeries(_.series); 74491 }, 74492 { deep: !0 } 74493 ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(pe.type, () => { 74494 Y(); 74495 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(pe.width, () => { 74496 Y(); 74497 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(pe.height, () => { 74498 Y(); 74499 }), { 74500 chart: X, 74501 init: ce, 74502 refresh: Y, 74503 destroy: ee, 74504 updateOptions: me, 74505 updateSeries: ge, 74506 toggleSeries: Se, 74507 showSeries: ze, 74508 hideSeries: ue, 74509 resetSeries: J, 74510 zoomX: P, 74511 toggleDataPointSelection: Xe, 74512 appendData: Ce, 74513 appendSeries: Me, 74514 addXaxisAnnotation: M, 74515 addYaxisAnnotation: q, 74516 addPointAnnotation: ve, 74517 removeAnnotation: Oe, 74518 clearAnnotations: He, 74519 setLocale: Z, 74520 dataURI: de 74521 }; 74522 }, 74523 render() { 74524 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)("div", { 74525 class: "vue-apexcharts" 74526 }); 74527 } 74528}), ii = (_) => { 74529 _.component(qe.name, qe); 74530}; 74531qe.install = ii; 74532 74533 74534 74535/***/ }), 74536
vendor: 22,737 bytes, lines 74537-74868
74537/***/ "./node_modules/vue3-select-component/dist/index.es.js": 74538/*!*************************************************************!*\ 74539 !*** ./node_modules/vue3-select-component/dist/index.es.js ***! 74540 \*************************************************************/ 74541/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 74542 74543"use strict"; 74544__webpack_require__.r(__webpack_exports__); 74545/* harmony export */ __webpack_require__.d(__webpack_exports__, { 74546/* harmony export */ "default": () => (/* binding */ Ce) 74547/* harmony export */ }); 74548/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm-bundler.js"); 74549(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(":root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 4px;--vs-multi-value-padding: 4px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-8ce3e5e3]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-8ce3e5e3] *{box-sizing:border-box}.vue-select.open .single-value[data-v-8ce3e5e3]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-8ce3e5e3]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-8ce3e5e3]{opacity:0}.control[data-v-8ce3e5e3]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-8ce3e5e3]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-8ce3e5e3]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1;padding:var(--vs-padding)}.value-container.multi[data-v-8ce3e5e3]{gap:var(--vs-multi-value-gap)}.single-value[data-v-8ce3e5e3]{display:flex;align-items:center;font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-8ce3e5e3]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:0;border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-8ce3e5e3]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-8ce3e5e3]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-8ce3e5e3]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-8ce3e5e3]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-8ce3e5e3]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);fill:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-8ce3e5e3]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);fill:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-8ce3e5e3]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-8ce3e5e3]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-8ce3e5e3]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-8ce3e5e3]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-8ce3e5e3]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-8ce3e5e3]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-8ce3e5e3]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); 74550 74551const T = (s, v) => { 74552 const l = s.__vccOpts || s; 74553 for (const [m, a] of v) 74554 l[m] = a; 74555 return l; 74556}, ie = {}, se = { 74557 xmlns: "http://www.w3.org/2000/svg", 74558 viewBox: "0 0 20 20", 74559 fill: "currentColor" 74560}, ue = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { 74561 "fill-rule": "evenodd", 74562 d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z", 74563 "clip-rule": "evenodd" 74564}, null, -1), re = [ 74565 ue 74566]; 74567function de(s, v) { 74568 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("svg", se, re); 74569} 74570const ce = /* @__PURE__ */ T(ie, [["render", de]]), ve = {}, pe = { 74571 xmlns: "http://www.w3.org/2000/svg", 74572 viewBox: "0 0 20 20", 74573 fill: "currentColor" 74574}, fe = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" }, null, -1), be = [ 74575 fe 74576]; 74577function me(s, v) { 74578 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("svg", pe, be); 74579} 74580const z = /* @__PURE__ */ T(ve, [["render", me]]), ye = ["aria-disabled", "aria-selected"], he = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 74581 __name: "MenuOption", 74582 props: { 74583 menu: {}, 74584 index: {}, 74585 isFocused: { type: Boolean }, 74586 isSelected: { type: Boolean }, 74587 isDisabled: { type: Boolean } 74588 }, 74589 emits: ["select"], 74590 setup(s, { emit: v }) { 74591 const l = s, m = v, a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null); 74592 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 74593 () => l.isFocused, 74594 () => { 74595 if (l.isFocused && l.menu) { 74596 const r = l.menu.children[l.index], d = r.offsetTop, k = d + r.clientHeight, i = l.menu.scrollTop, u = l.menu.clientHeight; 74597 d < i ? l.menu.scrollTop = d : k > i + u && (l.menu.scrollTop = k - u); 74598 } 74599 } 74600 ), (r, d) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 74601 ref_key: "option", 74602 ref: a, 74603 tabindex: "-1", 74604 role: "option", 74605 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({ focused: r.isFocused, selected: r.isSelected, disabled: r.isDisabled }), 74606 "aria-disabled": r.isDisabled, 74607 "aria-selected": r.isSelected, 74608 onClick: d[0] || (d[0] = (k) => m("select")), 74609 onKeydown: d[1] || (d[1] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withKeys)((k) => m("select"), ["enter"])) 74610 }, [ 74611 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(r.$slots, "default") 74612 ], 42, ye)); 74613 } 74614}), ge = ["aria-expanded", "aria-describedby", "aria-description", "aria-labelledby", "aria-label", "aria-required"], Me = ["onClick"], ke = ["id", "disabled", "placeholder"], we = { class: "indicators-container" }, $e = ["disabled"], De = ["disabled"], Oe = ["aria-label", "aria-multiselectable"], Le = { 74615 key: 0, 74616 class: "no-results" 74617}, Se = /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ 74618 __name: "Select", 74619 props: /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels)({ 74620 options: {}, 74621 displayedOptions: {}, 74622 placeholder: { default: "Select an option" }, 74623 isClearable: { type: Boolean, default: !0 }, 74624 isDisabled: { type: Boolean, default: !1 }, 74625 isSearchable: { type: Boolean, default: !0 }, 74626 isMulti: { type: Boolean, default: !1 }, 74627 closeOnSelect: { type: Boolean, default: !0 }, 74628 teleport: { default: void 0 }, 74629 inputId: { default: void 0 }, 74630 aria: { default: void 0 }, 74631 filterBy: { type: Function, default: (s, v, l) => v.toLowerCase().includes(l.toLowerCase()) }, 74632 getOptionLabel: { type: Function, default: (s) => s.label }, 74633 getMultiValueLabel: { type: Function, default: (s) => s.label } 74634 }, { 74635 modelValue: { 74636 required: !0, 74637 validator: (s, v) => v.isMulti ? Array.isArray(s) : !Array.isArray(s) 74638 }, 74639 modelModifiers: {} 74640 }), 74641 emits: /* @__PURE__ */ (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels)(["optionSelected", "optionDeselected", "search"], ["update:modelValue"]), 74642 setup(s, { emit: v }) { 74643 const l = s, m = v, a = (0,vue__WEBPACK_IMPORTED_MODULE_0__.useModel)(s, "modelValue"), r = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), d = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), k = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null), i = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(""), u = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(!1), O = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(-1), g = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 74644 const e = l.displayedOptions || l.options, t = (p) => p.filter( 74645 (n) => !a.value.includes(n.value) 74646 ); 74647 if (l.isSearchable && i.value) { 74648 const p = e.filter((n) => { 74649 const M = l.isMulti ? l.getMultiValueLabel(n) : l.getOptionLabel(n); 74650 return l.filterBy(n, M, i.value); 74651 }); 74652 return l.isMulti ? t(p) : p; 74653 } 74654 return l.isMulti ? t(e) : e; 74655 }), y = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { 74656 if (l.isMulti && Array.isArray(a.value)) 74657 return a.value.map( 74658 (t) => l.options.find((p) => p.value === t) 74659 ); 74660 l.isMulti && !Array.isArray(a.value) && console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${a.value}`); 74661 const e = l.options.find((t) => t.value === a.value); 74662 return e ? [e] : []; 74663 }), L = (e) => { 74664 u.value = !0, O.value = l.options.findIndex((t) => !t.disabled), e != null && e.focusInput && d.value && d.value.focus(); 74665 }, R = () => { 74666 u.value = !1, i.value = ""; 74667 }, I = (e) => { 74668 e.disabled || (l.isMulti ? a.value.push(e.value) : a.value = e.value, m("optionSelected", e), i.value = "", l.closeOnSelect && (u.value = !1), d.value && d.value.blur()); 74669 }, Z = (e) => { 74670 l.isMulti && !l.isDisabled && (a.value = a.value.filter((t) => t !== e.value), m("optionDeselected", e)); 74671 }, j = () => { 74672 l.isMulti ? (a.value = [], m("optionDeselected", null)) : (a.value = void 0, m("optionDeselected", y.value[0])), u.value = !1, i.value = "", d.value && d.value.blur(); 74673 }, A = (e) => { 74674 if (u.value) { 74675 const t = O.value; 74676 if (e.key === "ArrowDown") { 74677 e.preventDefault(); 74678 const n = g.value.findIndex((h, o) => !h.disabled && o > t), M = g.value.findIndex((h) => !h.disabled); 74679 O.value = n === -1 ? M : n; 74680 } 74681 if (e.key === "ArrowUp") { 74682 e.preventDefault(); 74683 const n = g.value.reduce( 74684 (h, o, f) => !o.disabled && f < t ? f : h, 74685 -1 74686 ), M = g.value.reduce( 74687 (h, o, f) => o.disabled ? h : f, 74688 -1 74689 ); 74690 O.value = n === -1 ? M : n; 74691 } 74692 if (e.key === "Enter") { 74693 const n = g.value[t]; 74694 e.preventDefault(), n && I(n); 74695 } 74696 if (e.code === "Space" && i.value.length === 0) { 74697 const n = g.value[t]; 74698 e.preventDefault(), n && I(n); 74699 } 74700 e.key === "Escape" && (e.preventDefault(), u.value = !1, i.value = ""); 74701 const p = l.isMulti ? a.value.length > 0 : !!a.value; 74702 e.key === "Backspace" && i.value.length === 0 && p && (e.preventDefault(), l.isMulti ? a.value = a.value.slice(0, -1) : a.value = void 0); 74703 } 74704 }, X = (e) => { 74705 !u.value && i.value.length === 0 && (e.preventDefault(), e.stopImmediatePropagation(), L()); 74706 }, G = (e) => { 74707 e.key === "Tab" ? R() : e.key === "Space" && X(e); 74708 }, E = (e) => { 74709 r.value && !r.value.contains(e.target) && (u.value = !1, i.value = ""); 74710 }, F = () => { 74711 if (r.value) { 74712 const e = r.value.getBoundingClientRect(); 74713 return { 74714 left: `${e.x}px`, 74715 top: `${e.y + e.height}px` 74716 }; 74717 } 74718 return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."), { top: "0px", left: "0px" }; 74719 }; 74720 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)( 74721 () => i.value, 74722 () => { 74723 m("search", i.value), i.value && !u.value && L(); 74724 } 74725 ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { 74726 document.addEventListener("click", E), document.addEventListener("keydown", A); 74727 }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(() => { 74728 document.removeEventListener("click", E), document.removeEventListener("keydown", A); 74729 }), (e, t) => { 74730 var p, n, M, h; 74731 return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 74732 ref_key: "container", 74733 ref: r, 74734 dir: "auto", 74735 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["vue-select", { open: u.value, typing: u.value && i.value.length > 0, disabled: e.isDisabled }]) 74736 }, [ 74737 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 74738 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["control", { focused: u.value }]) 74739 }, [ 74740 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { 74741 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["value-container", { multi: e.isMulti }]), 74742 role: "combobox", 74743 "aria-expanded": u.value, 74744 "aria-describedby": e.placeholder, 74745 "aria-description": e.placeholder, 74746 "aria-labelledby": (p = e.aria) == null ? void 0 : p.labelledby, 74747 "aria-label": y.value.length ? y.value.map(e.isMulti ? e.getMultiValueLabel : e.getOptionLabel).join(", ") : "", 74748 "aria-required": (n = e.aria) == null ? void 0 : n.required 74749 }, [ 74750 !l.isMulti && y.value[0] ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 74751 key: 0, 74752 class: "single-value", 74753 onClick: t[0] || (t[0] = (o) => l.isDisabled ? null : L({ focusInput: !0 })) 74754 }, [ 74755 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "value", { 74756 option: y.value[0] 74757 }, () => [ 74758 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(e.getOptionLabel(y.value[0])), 1) 74759 ], !0) 74760 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 74761 l.isMulti && y.value.length ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: 1 }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(y.value, (o, f) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 74762 key: f, 74763 type: "button", 74764 class: "multi-value", 74765 onClick: (J) => Z(o) 74766 }, [ 74767 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(e.getMultiValueLabel(o)), 1), 74768 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(z) 74769 ], 8, Me))), 128)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 74770 (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", { 74771 id: e.inputId, 74772 ref_key: "input", 74773 ref: d, 74774 "onUpdate:modelValue": t[1] || (t[1] = (o) => i.value = o), 74775 class: "search-input", 74776 type: "text", 74777 "aria-autocomplete": "list", 74778 autocapitalize: "none", 74779 autocomplete: "off", 74780 autocorrect: "off", 74781 spellcheck: "false", 74782 tabindex: "0", 74783 disabled: e.isDisabled, 74784 placeholder: y.value.length === 0 ? e.placeholder : "", 74785 onMousedown: t[2] || (t[2] = (o) => L()), 74786 onKeydown: G 74787 }, null, 40, ke), [ 74788 [vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, i.value] 74789 ]) 74790 ], 10, ge), 74791 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", we, [ 74792 y.value.length > 0 && e.isClearable ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", { 74793 key: 0, 74794 type: "button", 74795 class: "clear-button", 74796 tabindex: "-1", 74797 disabled: e.isDisabled, 74798 onClick: j 74799 }, [ 74800 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "clear", {}, () => [ 74801 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(z) 74802 ], !0) 74803 ], 8, $e)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0), 74804 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", { 74805 type: "button", 74806 class: "dropdown-icon", 74807 tabindex: "-1", 74808 disabled: e.isDisabled, 74809 onClick: t[3] || (t[3] = (o) => L({ focusInput: !0 })) 74810 }, [ 74811 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "dropdown", {}, () => [ 74812 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(ce) 74813 ], !0) 74814 ], 8, De) 74815 ]) 74816 ], 2), 74817 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Teleport, { 74818 to: e.teleport, 74819 disabled: !e.teleport 74820 }, [ 74821 u.value ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", { 74822 key: 0, 74823 ref_key: "menu", 74824 ref: k, 74825 class: "menu", 74826 role: "listbox", 74827 "aria-label": (M = e.aria) == null ? void 0 : M.labelledby, 74828 "aria-multiselectable": e.isMulti, 74829 style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({ 74830 width: l.teleport ? `${(h = r.value) == null ? void 0 : h.getBoundingClientRect().width}px` : "100%", 74831 top: l.teleport ? F().top : "unset", 74832 left: l.teleport ? F().left : "unset" 74833 }) 74834 }, [ 74835 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "menu-header", {}, void 0, !0), 74836 ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(!0), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(g.value, (o, f) => ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(he, { 74837 key: f, 74838 type: "button", 74839 class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["menu-option", { focused: O.value === f, selected: o.value === a.value }]), 74840 menu: k.value, 74841 index: f, 74842 "is-focused": O.value === f, 74843 "is-selected": o.value === a.value, 74844 "is-disabled": o.disabled || !1, 74845 onSelect: (J) => I(o) 74846 }, { 74847 default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [ 74848 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "option", { option: o }, () => [ 74849 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(e.getOptionLabel(o)), 1) 74850 ], !0) 74851 ]), 74852 _: 2 74853 }, 1032, ["class", "menu", "index", "is-focused", "is-selected", "is-disabled", "onSelect"]))), 128)), 74854 g.value.length === 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", Le, [ 74855 (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(e.$slots, "no-options", {}, () => [ 74856 (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" No results found ") 74857 ], !0) 74858 ])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 74859 ], 12, Oe)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("", !0) 74860 ], 8, ["to", "disabled"])) 74861 ], 2); 74862 }; 74863 } 74864}), Ce = /* @__PURE__ */ T(Se, [["__scopeId", "data-v-8ce3e5e3"]]); 74865 74866 74867 74868/***/ })
74868 74869 74870}]); 74871//# sourceMappingURL=vendor.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.