1/* eslint-disable */ 2/*! jQuery UI - v1.12.1 - 2019-07-31 3* http://jqueryui.com 4* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/mouse.js, widgets/slider.js, widgets/tooltip.js, effect.js, effects/effect-slide.js 5* Copyright jQuery Foundation and other contributors; Licensed MIT */ 6 7;(function(t) { 8 typeof define === 'function' && define.amd ? define(['jquery'], t) : t(jQuery) 9})(function(t) { 10 function e(t) { 11 for (var e = t.css('visibility'); e === 'inherit'; ) { 12 ;(t = t.parent()), (e = t.css('visibility')) 13 } 14 return e !== 'hidden' 15 } 16 ;(t.ui = t.ui || {}), (t.ui.version = '1.12.1') 17 let i = 0, 18 s = Array.prototype.slice 19 ;(t.cleanData = (function(e) { 20 return function(i) { 21 let s, n, o 22 for (o = 0; (n = i[o]) != null; o++) { 23 try { 24 ;(s = t._data(n, 'events')), 25 s && s.remove && t(n).triggerHandler('remove') 26 } catch (a) {} 27 } 28 e(i) 29 } 30 })(t.cleanData)), 31 (t.widget = function(e, i, s) { 32 let n, 33 o, 34 a, 35 r = {}, 36 l = e.split('.')[0] 37 e = e.split('.')[1] 38 const h = `${l}-${e}` 39 return ( 40 s || ((s = i), (i = t.Widget)), 41 t.isArray(s) && (s = t.extend.apply(null, [{}].concat(s))), 42 (t.expr[':'][h.toLowerCase()] = function(e) { 43 return !!t.data(e, h) 44 }), 45 (t[l] = t[l] || {}), 46 (n = t[l][e]), 47 (o = t[l][e] = function(t, e) { 48 return this._createWidget 49 ? (arguments.length && this._createWidget(t, e), void 0) 50 : new o(t, e) 51 }), 52 t.extend(o, n, { 53 version: s.version, 54 _proto: t.extend({}, s), 55 _childConstructors: [] 56 }), 57 (a = new i()), 58 (a.options = t.widget.extend({}, a.options)), 59 t.each(s, function(e, s) { 60 return t.isFunction(s) 61 ? ((r[e] = (function() { 62 function t() { 63 return i.prototype[e].apply(this, arguments) 64 } 65 function n(t) { 66 return i.prototype[e].apply(this, t) 67 } 68 return function() { 69 let e, 70 i = this._super, 71 o = this._superApply 72 return ( 73 (this._super = t), 74 (this._superApply = n), 75 (e = s.apply(this, arguments)), 76 (this._super = i), 77 (this._superApply = o), 78 e 79 ) 80 } 81 })()), 82 void 0) 83 : ((r[e] = s), void 0) 84 }), 85 (o.prototype = t.widget.extend( 86 a, 87 { widgetEventPrefix: n ? a.widgetEventPrefix || e : e }, 88 r, 89 { constructor: o, namespace: l, widgetName: e, widgetFullName: h } 90 )), 91 n 92 ? (t.each(n._childConstructors, function(e, i) { 93 const s = i.prototype 94 t.widget(`${s.namespace}.${s.widgetName}`, o, i._proto) 95 }), 96 delete n._childConstructors) 97 : i._childConstructors.push(o), 98 t.widget.bridge(e, o), 99 o 100 ) 101 }), 102 (t.widget.extend = function(e) { 103 for ( 104 var i, n, o = s.call(arguments, 1), a = 0, r = o.length; 105 r > a; 106 a++ 107 ) { 108 for (i in o[a]) { 109 ;(n = o[a][i]), 110 o[a].hasOwnProperty(i) && 111 void 0 !== n && 112 (e[i] = t.isPlainObject(n) 113 ? t.isPlainObject(e[i]) 114 ? t.widget.extend({}, e[i], n) 115 : t.widget.extend({}, n) 116 : n) 117 } 118 } 119 return e 120 }), 121 (t.widget.bridge = function(e, i) { 122 const n = i.prototype.widgetFullName || e 123 t.fn[e] = function(o) { 124 let a = typeof o === 'string', 125 r = s.call(arguments, 1), 126 l = this 127 return ( 128 a 129 ? this.length || o !== 'instance' 130 ? this.each(function() { 131 let i, 132 s = t.data(this, n) 133 return o === 'instance' 134 ? ((l = s), !1) 135 : s 136 ? t.isFunction(s[o]) && o.charAt(0) !== '_' 137 ? ((i = s[o].apply(s, r)), 138 i !== s && void 0 !== i 139 ? ((l = i && i.jquery ? l.pushStack(i.get()) : i), 140 !1) 141 : void 0) 142 : t.error( 143 `no such method '${o}' for ${e} widget instance` 144 ) 145 : t.error( 146 `cannot call methods on ${e} prior to initialization; ` + 147 `attempted to call method '${o}'` 148 ) 149 }) 150 : (l = void 0) 151 : (r.length && (o = t.widget.extend.apply(null, [o].concat(r))), 152 this.each(function() { 153 const e = t.data(this, n) 154 e 155 ? (e.option(o || {}), e._init && e._init()) 156 : t.data(this, n, new i(o, this)) 157 })), 158 l 159 ) 160 } 161 }), 162 (t.Widget = function() {}), 163 (t.Widget._childConstructors = []), 164 (t.Widget.prototype = { 165 widgetName: 'widget', 166 widgetEventPrefix: '', 167 defaultElement: '<div>', 168 options: { classes: {}, disabled: !1, create: null }, 169 _createWidget(e, s) { 170 ;(s = t(s || this.defaultElement || this)[0]), 171 (this.element = t(s)), 172 (this.uuid = i++), 173 (this.eventNamespace = `.${this.widgetName}${this.uuid}`),
174 (this.bindings = t()), 175 (this.hoverable = t()), 176 (this.focusable = t()), 177 (this.classesElementLookup = {}), 178 s !== this && 179 (t.data(s, this.widgetFullName, this), 180 this._on(!0, this.element, { 181 remove(t) { 182 t.target === s && this.destroy() 183 } 184 }), 185 (this.document = t(s.style ? s.ownerDocument : s.document || s)), 186 (this.window = t( 187 this.document[0].defaultView || this.document[0].parentWindow 188 ))), 189 (this.options = t.widget.extend( 190 {}, 191 this.options, 192 this._getCreateOptions(), 193 e 194 )), 195 this._create(), 196 this.options.disabled && 197 this._setOptionDisabled(this.options.disabled), 198 this._trigger('create', null, this._getCreateEventData()), 199 this._init() 200 }, 201 _getCreateOptions() { 202 return {} 203 }, 204 _getCreateEventData: t.noop, 205 _create: t.noop, 206 _init: t.noop, 207 destroy() { 208 const e = this 209 this._destroy(), 210 t.each(this.classesElementLookup, function(t, i) { 211 e._removeClass(i, t) 212 }), 213 this.element.off(this.eventNamespace).removeData(this.widgetFullName), 214 this.widget() 215 .off(this.eventNamespace) 216 .removeAttr('aria-disabled'), 217 this.bindings.off(this.eventNamespace) 218 }, 219 _destroy: t.noop, 220 widget() { 221 return this.element 222 }, 223 option(e, i) { 224 let s, 225 n, 226 o, 227 a = e 228 if (arguments.length === 0) return t.widget.extend({}, this.options) 229 if (typeof e === 'string') { 230 if (((a = {}), (s = e.split('.')), (e = s.shift()), s.length)) { 231 for ( 232 n = a[e] = t.widget.extend({}, this.options[e]), o = 0; 233 s.length - 1 > o; 234 o++ 235 ) { 236 ;(n[s[o]] = n[s[o]] || {}), (n = n[s[o]]) 237 } 238 if (((e = s.pop()), arguments.length === 1)) { 239 return void 0 === n[e] ? null : n[e] 240 } 241 n[e] = i 242 } else { 243 if (arguments.length === 1) { 244 return void 0 === this.options[e] ? null : this.options[e] 245 } 246 a[e] = i 247 } 248 } 249 return this._setOptions(a), this 250 }, 251 _setOptions(t) { 252 let e 253 for (e in t) this._setOption(e, t[e]) 254 return this 255 }, 256 _setOption(t, e) { 257 return ( 258 t === 'classes' && this._setOptionClasses(e), 259 (this.options[t] = e), 260 t === 'disabled' && this._setOptionDisabled(e), 261 this 262 ) 263 }, 264 _setOptionClasses(e) { 265 let i, s, n 266 for (i in e) { 267 ;(n = this.classesElementLookup[i]), 268 e[i] !== this.options.classes[i] && 269 n && 270 n.length && 271 ((s = t(n.get())), 272 this._removeClass(n, i), 273 s.addClass( 274 this._classes({ element: s, keys: i, classes: e, add: !0 }) 275 )) 276 } 277 }, 278 _setOptionDisabled(t) { 279 this._toggleClass( 280 this.widget(), 281 `${this.widgetFullName}-disabled`, 282 null, 283 !!t 284 ), 285 t && 286 (this._removeClass(this.hoverable, null, 'ui-state-hover'), 287 this._removeClass(this.focusable, null, 'ui-state-focus')) 288 }, 289 enable() { 290 return this._setOptions({ disabled: !1 }) 291 }, 292 disable() { 293 return this._setOptions({ disabled: !0 }) 294 }, 295 _classes(e) { 296 function i(i, o) { 297 let a, r 298 for (r = 0; i.length > r; r++) { 299 ;(a = n.classesElementLookup[i[r]] || t()), 300 (a = e.add 301 ? t(t.unique(a.get().concat(e.element.get()))) 302 : t(a.not(e.element).get())), 303 (n.classesElementLookup[i[r]] = a), 304 s.push(i[r]), 305 o && e.classes[i[r]] && s.push(e.classes[i[r]]) 306 } 307 } 308 var s = [], 309 n = this 310 return ( 311 (e = t.extend( 312 { element: this.element, classes: this.options.classes || {} }, 313 e 314 )), 315 this._on(e.element, { remove: '_untrackClassesElement' }), 316 e.keys && i(e.keys.match(/\S+/g) || [], !0), 317 e.extra && i(e.extra.match(/\S+/g) || []), 318 s.join(' ') 319 ) 320 }, 321 _untrackClassesElement(e) { 322 const i = this 323 t.each(i.classesElementLookup, function(s, n) { 324 t.inArray(e.target, n) !== -1 && 325 (i.classesElementLookup[s] = t(n.not(e.target).get())) 326 }) 327 }, 328 _removeClass(t, e, i) { 329 return this._toggleClass(t, e, i, !1) 330 }, 331 _addClass(t, e, i) { 332 return this._toggleClass(t, e, i, !0) 333 }, 334 _toggleClass(t, e, i, s) { 335 s = typeof s === 'boolean' ? s : i 336 let n = typeof t === 'string' || t === null, 337 o = {
338 extra: n ? e : i, 339 keys: n ? t : e, 340 element: n ? this.element : t, 341 add: s 342 } 343 return o.element.toggleClass(this._classes(o), s), this 344 }, 345 _on(e, i, s) { 346 let n, 347 o = this 348 typeof e !== 'boolean' && ((s = i), (i = e), (e = !1)), 349 s 350 ? ((i = n = t(i)), (this.bindings = this.bindings.add(i))) 351 : ((s = i), (i = this.element), (n = this.widget())), 352 t.each(s, function(s, a) { 353 function r() { 354 return e || 355 (o.options.disabled !== !0 && 356 !t(this).hasClass('ui-state-disabled')) 357 ? (typeof a === 'string' ? o[a] : a).apply(o, arguments) 358 : void 0 359 } 360 typeof a !== 'string' && 361 (r.guid = a.guid = a.guid || r.guid || t.guid++) 362 let l = s.match(/^([\w:-]*)\s*(.*)$/), 363 h = l[1] + o.eventNamespace, 364 c = l[2] 365 c ? n.on(h, c, r) : i.on(h, r) 366 }) 367 }, 368 _off(e, i) { 369 ;(i = 370 (i || '').split(' ').join(`${this.eventNamespace} `) + 371 this.eventNamespace), 372 e.off(i).off(i), 373 (this.bindings = t(this.bindings.not(e).get())), 374 (this.focusable = t(this.focusable.not(e).get())), 375 (this.hoverable = t(this.hoverable.not(e).get())) 376 }, 377 _delay(t, e) { 378 function i() { 379 return (typeof t === 'string' ? s[t] : t).apply(s, arguments) 380 } 381 var s = this 382 return setTimeout(i, e || 0) 383 }, 384 _hoverable(e) { 385 ;(this.hoverable = this.hoverable.add(e)), 386 this._on(e, { 387 mouseenter(e) { 388 this._addClass(t(e.currentTarget), null, 'ui-state-hover') 389 }, 390 mouseleave(e) { 391 this._removeClass(t(e.currentTarget), null, 'ui-state-hover') 392 } 393 }) 394 }, 395 _focusable(e) { 396 ;(this.focusable = this.focusable.add(e)), 397 this._on(e, { 398 focusin(e) { 399 this._addClass(t(e.currentTarget), null, 'ui-state-focus') 400 }, 401 focusout(e) { 402 this._removeClass(t(e.currentTarget), null, 'ui-state-focus') 403 } 404 }) 405 }, 406 _trigger(e, i, s) { 407 let n, 408 o, 409 a = this.options[e] 410 if ( 411 ((s = s || {}), 412 (i = t.Event(i)), 413 (i.type = (e === this.widgetEventPrefix 414 ? e 415 : this.widgetEventPrefix + e 416 ).toLowerCase()), 417 (i.target = this.element[0]), 418 (o = i.originalEvent)) 419 ) { 420 for (n in o) n in i || (i[n] = o[n]) 421 } 422 return ( 423 this.element.trigger(i, s), 424 !( 425 (t.isFunction(a) && 426 a.apply(this.element[0], [i].concat(s)) === !1) || 427 i.isDefaultPrevented() 428 ) 429 ) 430 } 431 }), 432 t.each({ show: 'fadeIn', hide: 'fadeOut' }, function(e, i) { 433 t.Widget.prototype[`_${e}`] = function(s, n, o) { 434 typeof n === 'string' && (n = { effect: n }) 435 let a, 436 r = n ? (n === !0 || typeof n === 'number' ? i : n.effect || i) : e 437 ;(n = n || {}), 438 typeof n === 'number' && (n = { duration: n }), 439 (a = !t.isEmptyObject(n)), 440 (n.complete = o), 441 n.delay && s.delay(n.delay), 442 a && t.effects && t.effects.effect[r] 443 ? s[e](n) 444 : r !== e && s[r] 445 ? s[r](n.duration, n.easing, o) 446 : s.queue(function(i) { 447 t(this)[e](), o && o.call(s[0]), i() 448 }) 449 } 450 }), 451 t.widget, 452 (function() { 453 function e(t, e, i) { 454 return [ 455 parseFloat(t[0]) * (u.test(t[0]) ? e / 100 : 1), 456 parseFloat(t[1]) * (u.test(t[1]) ? i / 100 : 1) 457 ] 458 } 459 function i(e, i) { 460 return parseInt(t.css(e, i), 10) || 0 461 } 462 function s(e) { 463 const i = e[0] 464 return i.nodeType === 9 465 ? { 466 width: e.width(), 467 height: e.height(), 468 offset: { top: 0, left: 0 } 469 } 470 : t.isWindow(i) 471 ? { 472 width: e.width(), 473 height: e.height(), 474 offset: { top: e.scrollTop(), left: e.scrollLeft() } 475 } 476 : i.preventDefault 477 ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } 478 : { 479 width: e.outerWidth(), 480 height: e.outerHeight(), 481 offset: e.offset() 482 } 483 } 484 var n, 485 o = Math.max, 486 a = Math.abs, 487 r = /left|center|right/, 488 l = /top|center|bottom/, 489 h = /[\+\-]\d+(\.[\d]+)?%?/, 490 c = /^\w+/, 491 u = /%$/, 492 d = t.fn.position 493 ;(t.position = { 494 scrollbarWidth() { 495 if (void 0 !== n) return n 496 let e, 497 i, 498 s = t( 499 "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" 500 ), 501 o = s.children()[0] 502 return ( 503 t('body').append(s), 504 (e = o.offsetWidth), 505 s.css('overflow', 'scroll'), 506 (i = o.offsetWidth), 507 e === i && (i = s[0].clientWidth), 508 s.remove(), 509 (n = e - i) 510 ) 511 }, 512 getScrollInfo(e) { 513 let i = e.isWindow || e.isDocument ? '' : e.element.css('overflow-x'), 514 s = e.isWindow || e.isDocument ? '' : e.element.css('overflow-y'), 515 n = 516 i === 'scroll' || 517 (i === 'auto' && e.width < e.element[0].scrollWidth), 518 o = 519 s === 'scroll' || 520 (s === 'auto' && e.height < e.element[0].scrollHeight) 521 return { 522 width: o ? t.position.scrollbarWidth() : 0, 523 height: n ? t.position.scrollbarWidth() : 0 524 } 525 }, 526 getWithinInfo(e) { 527 let i = t(e || window), 528 s = t.isWindow(i[0]), 529 n = !!i[0] && i[0].nodeType === 9, 530 o = !s && !n 531 return { 532 element: i, 533 isWindow: s, 534 isDocument: n, 535 offset: o ? t(e).offset() : { left: 0, top: 0 }, 536 scrollLeft: i.scrollLeft(), 537 scrollTop: i.scrollTop(), 538 width: i.outerWidth(), 539 height: i.outerHeight() 540 } 541 } 542 }), 543 (t.fn.position = function(n) { 544 if (!n || !n.of) return d.apply(this, arguments) 545 n = t.extend({}, n) 546 let u, 547 p, 548 f, 549 g, 550 m, 551 _, 552 v = t(n.of), 553 b = t.position.getWithinInfo(n.within), 554 y = t.position.getScrollInfo(b), 555 w = (n.collision || 'flip').split(' '), 556 k = {} 557 return ( 558 (_ = s(v)), 559 v[0].preventDefault && (n.at = 'left top'), 560 (p = _.width), 561 (f = _.height), 562 (g = _.offset), 563 (m = t.extend({}, g)), 564 t.each(['my', 'at'], function() { 565 let t, 566 e, 567 i = (n[this] || '').split(' ') 568 i.length === 1 && 569 (i = r.test(i[0]) 570 ? i.concat(['center']) 571 : l.test(i[0]) 572 ? ['center'].concat(i) 573 : ['center', 'center']), 574 (i[0] = r.test(i[0]) ? i[0] : 'center'), 575 (i[1] = l.test(i[1]) ? i[1] : 'center'), 576 (t = h.exec(i[0])), 577 (e = h.exec(i[1])), 578 (k[this] = [t ? t[0] : 0, e ? e[0] : 0]), 579 (n[this] = [c.exec(i[0])[0], c.exec(i[1])[0]]) 580 }), 581 w.length === 1 && (w[1] = w[0]), 582 n.at[0] === 'right' 583 ? (m.left += p) 584 : n.at[0] === 'center' && (m.left += p / 2), 585 n.at[1] === 'bottom' 586 ? (m.top += f) 587 : n.at[1] === 'center' && (m.top += f / 2), 588 (u = e(k.at, p, f)), 589 (m.left += u[0]), 590 (m.top += u[1]), 591 this.each(function() { 592 let s, 593 r, 594 l = t(this), 595 h = l.outerWidth(), 596 c = l.outerHeight(), 597 d = i(this, 'marginLeft'), 598 _ = i(this, 'marginTop'), 599 x = h + d + i(this, 'marginRight') + y.width, 600 C = c + _ + i(this, 'marginBottom') + y.height, 601 D = t.extend({}, m), 602 T = e(k.my, l.outerWidth(), l.outerHeight()) 603 n.my[0] === 'right' 604 ? (D.left -= h) 605 : n.my[0] === 'center' && (D.left -= h / 2), 606 n.my[1] === 'bottom' 607 ? (D.top -= c) 608 : n.my[1] === 'center' && (D.top -= c / 2), 609 (D.left += T[0]), 610 (D.top += T[1]), 611 (s = { marginLeft: d, marginTop: _ }), 612 t.each(['left', 'top'], function(e, i) { 613 t.ui.position[w[e]] && 614 t.ui.position[w[e]][i](D, { 615 targetWidth: p, 616 targetHeight: f, 617 elemWidth: h, 618 elemHeight: c, 619 collisionPosition: s, 620 collisionWidth: x, 621 collisionHeight: C, 622 offset: [u[0] + T[0], u[1] + T[1]], 623 my: n.my, 624 at: n.at, 625 within: b, 626 elem: l 627 }) 628 }), 629 n.using && 630 (r = function(t) { 631 let e = g.left - D.left, 632 i = e + p - h, 633 s = g.top - D.top, 634 r = s + f - c, 635 u = { 636 target: { 637 element: v, 638 left: g.left, 639 top: g.top, 640 width: p, 641 height: f 642 }, 643 element: { 644 element: l, 645 left: D.left, 646 top: D.top, 647 width: h, 648 height: c 649 }, 650 horizontal: i < 0 ? 'left' : e > 0 ? 'right' : 'center', 651 vertical: r < 0 ? 'top' : s > 0 ? 'bottom' : 'middle' 652 } 653 h > p && p > a(e + i) && (u.horizontal = 'center'), 654 c > f && f > a(s + r) && (u.vertical = 'middle'), 655 (u.important = 656 o(a(e), a(i)) > o(a(s), a(r)) 657 ? 'horizontal' 658 : 'vertical'), 659 n.using.call(this, t, u) 660 }), 661 l.offset(t.extend(D, { using: r })) 662 }) 663 ) 664 }), 665 (t.ui.position = { 666 fit: { 667 left(t, e) { 668 let i, 669 s = e.within, 670 n = s.isWindow ? s.scrollLeft : s.offset.left, 671 a = s.width, 672 r = t.left - e.collisionPosition.marginLeft, 673 l = n - r, 674 h = r + e.collisionWidth - a - n 675 e.collisionWidth > a 676 ? l > 0 && h <= 0 677 ? ((i = t.left + l + e.collisionWidth - a - n), 678 (t.left += l - i)) 679 : (t.left = 680 h > 0 && l <= 0 681 ? n 682 : l > h 683 ? n + a - e.collisionWidth 684 : n) 685 : l > 0 686 ? (t.left += l) 687 : h > 0 688 ? (t.left -= h) 689 : (t.left = o(t.left - r, t.left)) 690 }, 691 top(t, e) { 692 let i, 693 s = e.within, 694 n = s.isWindow ? s.scrollTop : s.offset.top, 695 a = e.within.height, 696 r = t.top - e.collisionPosition.marginTop, 697 l = n - r, 698 h = r + e.collisionHeight - a - n 699 e.collisionHeight > a 700 ? l > 0 && h <= 0 701 ? ((i = t.top + l + e.collisionHeight - a - n), 702 (t.top += l - i)) 703 : (t.top = 704 h > 0 && l <= 0 705 ? n 706 : l > h 707 ? n + a - e.collisionHeight 708 : n) 709 : l > 0 710 ? (t.top += l) 711 : h > 0 712 ? (t.top -= h) 713 : (t.top = o(t.top - r, t.top)) 714 } 715 }, 716 flip: { 717 left(t, e) { 718 let i, 719 s, 720 n = e.within, 721 o = n.offset.left + n.scrollLeft, 722 r = n.width, 723 l = n.isWindow ? n.scrollLeft : n.offset.left, 724 h = t.left - e.collisionPosition.marginLeft, 725 c = h - l, 726 u = h + e.collisionWidth - r - l, 727 d = 728 e.my[0] === 'left' 729 ? -e.elemWidth 730 : e.my[0] === 'right' 731 ? e.elemWidth 732 : 0, 733 p = 734 e.at[0] === 'left' 735 ? e.targetWidth 736 : e.at[0] === 'right' 737 ? -e.targetWidth 738 : 0, 739 f = -2 * e.offset[0] 740 c < 0 741 ? ((i = t.left + d + p + f + e.collisionWidth - r - o), 742 (i < 0 || a(c) > i) && (t.left += d + p + f)) 743 : u > 0 && 744 ((s = 745 t.left - e.collisionPosition.marginLeft + d + p + f - l), 746 (s > 0 || u > a(s)) && (t.left += d + p + f)) 747 }, 748 top(t, e) { 749 let i, 750 s, 751 n = e.within, 752 o = n.offset.top + n.scrollTop, 753 r = n.height, 754 l = n.isWindow ? n.scrollTop : n.offset.top, 755 h = t.top - e.collisionPosition.marginTop, 756 c = h - l, 757 u = h + e.collisionHeight - r - l, 758 d = e.my[1] === 'top', 759 p = d ? -e.elemHeight : e.my[1] === 'bottom' ? e.elemHeight : 0, 760 f = 761 e.at[1] === 'top' 762 ? e.targetHeight 763 : e.at[1] === 'bottom' 764 ? -e.targetHeight 765 : 0, 766 g = -2 * e.offset[1] 767 c < 0 768 ? ((s = t.top + p + f + g + e.collisionHeight - r - o), 769 (s < 0 || a(c) > s) && (t.top += p + f + g)) 770 : u > 0 && 771 ((i = t.top - e.collisionPosition.marginTop + p + f + g - l), 772 (i > 0 || u > a(i)) && (t.top += p + f + g)) 773 } 774 }, 775 flipfit: { 776 left() { 777 t.ui.position.flip.left.apply(this, arguments), 778 t.ui.position.fit.left.apply(this, arguments) 779 }, 780 top() { 781 t.ui.position.flip.top.apply(this, arguments), 782 t.ui.position.fit.top.apply(this, arguments) 783 } 784 } 785 }) 786 })(), 787 t.ui.position, 788 t.extend(t.expr[':'], { 789 data: t.expr.createPseudo 790 ? t.expr.createPseudo(function(e) { 791 return function(i) { 792 return !!t.data(i, e) 793 } 794 }) 795 : function(e, i, s) { 796 return !!t.data(e, s[3]) 797 } 798 }), 799 t.fn.extend({ 800 disableSelection: (function() { 801 const t = 802 'onselectstart' in document.createElement('div') 803 ? 'selectstart' 804 : 'mousedown' 805 return function() { 806 return this.on(`${t}.ui-disableSelection`, function(t) { 807 t.preventDefault() 808 }) 809 } 810 })(), 811 enableSelection() { 812 return this.off('.ui-disa
812bleSelection') 813 } 814 }), 815 (t.ui.focusable = function(i, s) { 816 let n, 817 o, 818 a, 819 r, 820 l, 821 h = i.nodeName.toLowerCase() 822 return h === 'area' 823 ? ((n = i.parentNode), 824 (o = n.name), 825 i.href && o && n.nodeName.toLowerCase() === 'map' 826 ? ((a = t(`img[usemap='#${o}']`)), a.length > 0 && a.is(':visible')) 827 : !1) 828 : (/^(input|select|textarea|button|object)$/.test(h) 829 ? ((r = !i.disabled), 830 r && ((l = t(i).closest('fieldset')[0]), l && (r = !l.disabled))) 831 : (r = h === 'a' ? i.href || s : s), 832 r && t(i).is(':visible') && e(t(i))) 833 }), 834 t.extend(t.expr[':'], { 835 focusable(e) { 836 return t.ui.focusable(e, t.attr(e, 'tabindex') != null) 837 } 838 }), 839 t.ui.focusable, 840 t.fn.jquery.substring(0, 3) === '1.7' && 841 (t.each(['Width', 'Height'], function(e, i) { 842 function s(e, i, s, o) { 843 return ( 844 t.each(n, function() { 845 ;(i -= parseFloat(t.css(e, `padding${this}`)) || 0), 846 s && (i -= parseFloat(t.css(e, `border${this}Width`)) || 0), 847 o && (i -= parseFloat(t.css(e, `margin${this}`)) || 0) 848 }), 849 i 850 ) 851 } 852 var n = i === 'Width' ? ['Left', 'Right'] : ['Top', 'Bottom'], 853 o = i.toLowerCase(), 854 a = { 855 innerWidth: t.fn.innerWidth, 856 innerHeight: t.fn.innerHeight, 857 outerWidth: t.fn.outerWidth, 858 outerHeight: t.fn.outerHeight 859 } 860 ;(t.fn[`inner${i}`] = function(e) { 861 return void 0 === e 862 ? a[`inner${i}`].call(this) 863 : this.each(function() { 864 t(this).css(o, `${s(this, e)}px`) 865 }) 866 }), 867 (t.fn[`outer${i}`] = function(e, n) { 868 return typeof e !== 'number' 869 ? a[`outer${i}`].call(this, e) 870 : this.each(function() { 871 t(this).css(o, `${s(this, e, !0, n)}px`) 872 }) 873 }) 874 }), 875 (t.fn.addBack = function(t) { 876 return this.add(t == null ? this.prevObject : this.prevObject.filter(t)) 877 })), 878 (t.ui.keyCode = { 879 BACKSPACE: 8, 880 COMMA: 188, 881 DELETE: 46, 882 DOWN: 40, 883 END: 35, 884 ENTER: 13, 885 ESCAPE: 27, 886 HOME: 36, 887 LEFT: 37, 888 PAGE_DOWN: 34, 889 PAGE_UP: 33, 890 PERIOD: 190, 891 RIGHT: 39, 892 SPACE: 32, 893 TAB: 9, 894 UP: 38 895 }), 896 (t.ui.escapeSelector = (function() { 897 const t = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g 898 return function(e) { 899 return e.replace(t, '\\$1') 900 } 901 })()), 902 (t.fn.labels = function() { 903 let e, i, s, n, o 904 return this[0].labels && this[0].labels.length 905 ? this.pushStack(this[0].labels) 906 : ((n = this.eq(0).parents('label')), 907 (s = this.attr('id')), 908 s && 909 ((e = this.eq(0) 910 .parents() 911 .last()), 912 (o = e.add(e.length ? e.siblings() : this.siblings())), 913 (i = `label[for='${t.ui.escapeSelector(s)}']`), 914 (n = n.add(o.find(i).addBack(i)))), 915 this.pushStack(n)) 916 }), 917 (t.fn.scrollParent = function(e) { 918 let i = this.css('position'), 919 s = i === 'absolute', 920 n = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 921 o = this.parents() 922 .filter(function() { 923 const e = t(this) 924 return s && e.css('position') === 'static' 925 ? !1 926 : n.test( 927 e.css('overflow') + e.css('overflow-y') + e.css('overflow-x') 928 ) 929 }) 930 .eq(0) 931 return i !== 'fixed' && o.length 932 ? o 933 : t(this[0].ownerDocument || document) 934 }), 935 t.extend(t.expr[':'], { 936 tabbable(e) { 937 let i = t.attr(e, 'tabindex'), 938 s = i != null 939 return (!s || i >= 0) && t.ui.focusable(e, s) 940 } 941 }), 942 t.fn.extend({ 943 uniqueId: (function() { 944 let t = 0 945 return function() { 946 return this.each(function() { 947 this.id || (this.id = `ui-id-${++t}`) 948 }) 949 } 950 })(), 951 removeUniqueId() { 952 return this.each(function() { 953 ;
vendor: 4,529 bytes, lines 953-1045
953/^ui-id-\d+$/.test(this.id) && t(this).removeAttr('id') 954 }) 955 } 956 }), 957 (t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())) 958 function d() { 959 this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = { 960 closeText: "Done", 961 prevText: "Prev", 962 nextText: "Next", 963 currentText: "Today", 964 monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 965 monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 966 dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 967 dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 968 dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], 969 weekHeader: "Wk", 970 dateFormat: "mm/dd/yy", 971 firstDay: 0, 972 isRTL: !1, 973 showMonthAfterYear: !1, 974 yearSuffix: "" 975 }, this._defaults = { 976 showOn: "focus", 977 showAnim: "fadeIn", 978 showOptions: {}, 979 defaultDate: null, 980 appendText: "", 981 buttonText: "...", 982 buttonImage: "", 983 buttonImageOnly: !1, 984 hideIfNoPrevNext: !1, 985 navigationAsDateFormat: !1, 986 gotoCurrent: !1, 987 changeMonth: !1, 988 changeYear: !1, 989 yearRange: "c-10:c+10", 990 showOtherMonths: !1, 991 selectOtherMonths: !1, 992 showWeek: !1, 993 calculateWeek: this.iso8601Week, 994 shortYearCutoff: "+10", 995 minDate: null, 996 maxDate: null, 997 duration: "fast", 998 beforeShowDay: null, 999 beforeShow: null, 1000 onSelect: null, 1001 onChangeMonthYear: null, 1002 onClose: null, 1003 numberOfMonths: 1, 1004 showCurrentAtPos: 0, 1005 stepMonths: 1, 1006 stepBigMonths: 12, 1007 altField: "", 1008 altFormat: "", 1009 constrainInput: !0, 1010 showButtonPanel: !1, 1011 autoSize: !1, 1012 disabled: !1 1013 }, t.extend(this._defaults, this.regional[""]), this.regional.en = t.extend(!0, {}, this.regional[""]), this.regional["en-US"] = t.extend(!0, {}, this.regional.en), this.dpDiv = p(t("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) 1014 } 1015 1016 function p(e) { 1017 var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 1018 return e.on("mouseout", i, function() { 1019 t(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && t(this).removeClass("ui-datepicker-next-hover") 1020 }).on("mouseover", i, f) 1021 } 1022 1023 function f() { 1024 t.datepicker._isDisabledDatepicker(u.inline ? u.dpDiv.parent()[0] : u.input[0]) || (t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), t(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && t(this).addClass("ui-datepicker-next-hover")) 1025 } 1026 1027 function g(e, i) { 1028 for (var s in t.extend(e, i), i) null == i[s] && (e[s] = i[s]); 1029 return e 1030 } 1031 t.extend(t.ui, { 1032 datepicker: { 1033 version: "1.12.1" 1034 } 1035 }), t.extend(d.prototype, { 1036 markerClassName: "hasDatepicker", 1037 maxRows: 4, 1038 _widgetDatepicker: function() { 1039 return this.dpDiv 1040 }, 1041 setDefaults: function(t) { 1042 return g(this._defaults, t || {}), this 1043 }, 1044 _attachDatepicker: function(e, i) { 1045 var s, n, o;
vendor: 28,872 bytes, lines 1046-1471
1046 n = "div" === (s = e.nodeName.toLowerCase()) || "span" === s, e.id || (this.uuid += 1, e.id = "dp" + this.uuid), (o = this._newInst(t(e), n)).settings = t.extend({}, i || {}), "input" === s ? this._connectDatepicker(e, o) : n && this._inlineDatepicker(e, o) 1047 }, 1048 _newInst: function(e, i) { 1049 return { 1050 id: e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"), 1051 input: e, 1052 selectedDay: 0, 1053 selectedMonth: 0, 1054 selectedYear: 0, 1055 drawMonth: 0, 1056 drawYear: 0, 1057 inline: i, 1058 dpDiv: i ? p(t("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv 1059 } 1060 }, 1061 _connectDatepicker: function(e, i) { 1062 var s = t(e); 1063 i.append = t([]), i.trigger = t([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(i), t.data(e, "datepicker", i), i.settings.disabled && this._disableDatepicker(e)) 1064 }, 1065 _attachments: function(e, i) { 1066 var s, n, o, a = this._get(i, "appendText"), 1067 r = this._get(i, "isRTL"); 1068 i.append && i.append.remove(), a && (i.append = t("<span class='" + this._appendClass + "'>" + a + "</span>"), e[r ? "before" : "after"](i.append)), e.off("focus", this._showDatepicker), i.trigger && i.trigger.remove(), "focus" !== (s = this._get(i, "showOn")) && "both" !== s || e.on("focus", this._showDatepicker), "button" !== s && "both" !== s || (n = this._get(i, "buttonText"), o = this._get(i, "buttonImage"), i.trigger = t(this._get(i, "buttonImageOnly") ? t("<img/>").addClass(this._triggerClass).attr({ 1069 src: o, 1070 alt: n, 1071 title: n 1072 }) : t("<button type='button'></button>").addClass(this._triggerClass).html(o ? t("<img/>").attr({ 1073 src: o, 1074 alt: n, 1075 title: n 1076 }) : n)), e[r ? "before" : "after"](i.trigger), i.trigger.on("click", function() { 1077 return t.datepicker._datepickerShowing && t.datepicker._lastInput === e[0] ? t.datepicker._hideDatepicker() : t.datepicker._datepickerShowing && t.datepicker._lastInput !== e[0] ? (t.datepicker._hideDatepicker(), t.datepicker._showDatepicker(e[0])) : t.datepicker._showDatepicker(e[0]), !1 1078 })) 1079 }, 1080 _autoSize: function(t) { 1081 if (this._get(t, "autoSize") && !t.inline) { 1082 var e, i, s, n, o = new Date(2009, 11, 20), 1083 a = this._get(t, "dateFormat"); 1084 a.match(/[DM]/) && (e = function(t) { 1085 for (i = 0, s = 0, n = 0; n < t.length; n++) t[n].length > i && (i = t[n].length, s = n); 1086 return s 1087 }, o.setMonth(e(this._get(t, a.match(/MM/) ? "monthNames" : "monthNamesShort"))), o.setDate(e(this._get(t, a.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - o.getDay())), t.input.attr("size", this._formatDate(t, o).length) 1088 } 1089 }, 1090 _inlineDatepicker: function(e, i) { 1091 var s = t(e); 1092 s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), t.data(e, "datepicker", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(e), i.dpDiv.css("display", "block")) 1093 }, 1094 _dialogDatepicker: function(e, i, s, n, o) { 1095 var a, r, h, l, c, u = this._dialogInst; 1096 return u || (this.uuid += 1, a = "dp" + this.uuid, this._dialogInput = t("<input type='text' id='" + a + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.on("keydown", this._doKeyDown), t("body").append(this._dialogInput), (u = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}, t.data(this._dialogInput[0], "datepicker", u)), g(u.settings, n || {}), i = i && i.constructor === Date ? this._formatDate(u, i) : i, this._dialogInput.val(i), this._pos = o ? o.length ? o : [o.pageX, o.pageY] : null, this._pos || (r = document.documentElement.clientWidth, h = document.documentElement.clientHeight, l = document.documentElement.scrollLeft || document.body.scrollLeft, c = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [r / 2 - 100 + l, h / 2 - 150 + c]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), u.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), t.blockUI && t.blockUI(this.dpDiv), t.data(this._dialogInput[0], "datepicker", u), this 1097 }, 1098 _destroyDatepicker: function(e) { 1099 var i, s = t(e), 1100 n = t.data(e, "datepicker"); 1101 s.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), t.removeData(e, "datepicker"), "input" === i ? (n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : "div" !== i && "span" !== i || s.removeClass(this.markerClassName).empty(), u === n && (u = null)) 1102 }, 1103 _enableDatepicker: function(e) { 1104 var i, s, n = t(e), 1105 o = t.data(e, "datepicker"); 1106 n.hasClass(this.markerClassName) && ("input" === (i = e.nodeName.toLowerCase()) ? (e.disabled = !1, o.trigger.filter("button").each(function() { 1107 this.disabled = !1 1108 }).end().filter("img").css({ 1109 opacity: "1.0", 1110 cursor: "" 1111 })) : "div" !== i && "span" !== i || ((s = n.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = t.map(this._disabledInputs, function(t) { 1112 return t === e ? null : t 1113 })) 1114 }, 1115 _disableDatepicker: function(e) { 1116 var i, s, n = t(e), 1117 o = t.data(e, "datepicker"); 1118 n.hasClass(this.markerClassName) && ("input" === (i = e.nodeName.toLowerCase()) ? (e.disabled = !0, o.trigger.filter("button").each(function() { 1119 this.disabled = !0 1120 }).end().filter("img").css({ 1121 opacity: "0.5", 1122 cursor: "default" 1123 })) : "div" !== i && "span" !== i || ((s = n.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = t.map(this._disabledInputs, function(t) { 1124 return t === e ? null : t 1125 }), this._disabledInputs[this._disabledInputs.length] = e) 1126 }, 1127 _isDisabledDatepicker: function(t) { 1128 if (!t) return !1; 1129 for (var e = 0; e < this._disabledInputs.length; e++) 1130 if (this._disabledInputs[e] === t) return !0; 1131 return !1 1132 }, 1133 _getInst: function(e) { 1134 try { 1135 return t.data(e, "datepicker") 1136 } catch (t) { 1137 throw "Missing instance data for this datepicker" 1138 } 1139 }, 1140 _optionDatepicker: function(e, i, s) { 1141 var n, o, a, r, h = this._getInst(e); 1142 if (2 === arguments.length && "string" == typeof i) return "defaults" === i ? t.extend({}, t.datepicker._defaults) : h ? "all" === i ? t.extend({}, h.settings) : this._get(h, i) : null; 1143 n = i || {}, "string" == typeof i && ((n = {})[i] = s), h && (this._curInst === h && this._hideDatepicker(), o = this._getDateDatepicker(e, !0), a = this._getMinMaxDate(h, "min"), r = this._getMinMaxDate(h, "max"), g(h.settings, n), null !== a && void 0 !== n.dateFormat && void 0 === n.minDate && (h.settings.minDate = this._formatDate(h, a)), null !== r && void 0 !== n.dateFormat && void 0 === n.maxDate && (h.settings.maxDate = this._formatDate(h, r)), "disabled" in n && (n.disabled ? this._disableDatepicker(e) : this._enableDatepicker(e)), this._attachments(t(e), h), this._autoSize(h), this._setDate(h, o), this._updateAlternate(h), this._updateDatepicker(h)) 1144 }, 1145 _changeDatepicker: function(t, e, i) { 1146 this._optionDatepicker(t, e, i) 1147 }, 1148 _refreshDatepicker: function(t) { 1149 var e = this._getInst(t); 1150 e && this._updateDatepicker(e) 1151 }, 1152 _setDateDatepicker: function(t, e) { 1153 var i = this._getInst(t); 1154 i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i)) 1155 }, 1156 _getDateDatepicker: function(t, e) { 1157 var i = this._getInst(t); 1158 return i && !i.inline && this._setDateFromField(i, e), i ? this._getDate(i) : null 1159 }, 1160 _doKeyDown: function(e) { 1161 var i, s, n, o = t.datepicker._getInst(e.target), 1162 a = !0, 1163 r = o.dpDiv.is(".ui-datepicker-rtl"); 1164 if (o._keyEvent = !0, t.datepicker._datepickerShowing) switch (e.keyCode) { 1165 case 9: 1166 t.datepicker._hideDatepicker(), a = !1; 1167 break; 1168 case 13: 1169 return (n = t("td." + t.datepicker._dayOverClass + ":not(." + t.datepicker._currentClass + ")", o.dpDiv))[0] && t.datepicker._selectDay(e.target, o.selectedMonth, o.selectedYear, n[0]), (i = t.datepicker._get(o, "onSelect")) ? (s = t.datepicker._formatDate(o), i.apply(o.input ? o.input[0] : null, [s, o])) : t.datepicker._hideDatepicker(), !1; 1170 case 27: 1171 t.datepicker._hideDatepicker(); 1172 break; 1173 case 33: 1174 t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, "stepBigMonths") : -t.datepicker._get(o, "stepMonths"), "M"); 1175 break; 1176 case 34: 1177 t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, "stepBigMonths") : +t.datepicker._get(o, "stepMonths"), "M"); 1178 break; 1179 case 35: 1180 (e.ctrlKey || e.metaKey) && t.datepicker._clearDate(e.target), a = e.ctrlKey || e.metaKey; 1181 break; 1182 case 36: 1183 (e.ctrlKey || e.metaKey) && t.datepicker._gotoToday(e.target), a = e.ctrlKey || e.metaKey; 1184 break; 1185 case 37: 1186 (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? 1 : -1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, "stepBigMonths") : -t.datepicker._get(o, "stepMonths"), "M"); 1187 break; 1188 case 38: 1189 (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, -7, "D"), a = e.ctrlKey || e.metaKey; 1190 break; 1191 case 39: 1192 (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? -1 : 1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, "stepBigMonths") : +t.datepicker._get(o, "stepMonths"), "M"); 1193 break; 1194 case 40: 1195 (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, 7, "D"), a = e.ctrlKey || e.metaKey; 1196 break; 1197 default: 1198 a = !1 1199 } else 36 === e.keyCode && e.ctrlKey ? t.datepicker._showDatepicker(this) : a = !1; 1200 a && (e.preventDefault(), e.stopPropagation()) 1201 }, 1202 _doKeyPress: function(e) { 1203 var i, s, n = t.datepicker._getInst(e.target); 1204 if (t.datepicker._get(n, "constrainInput")) return i = t.datepicker._possibleChars(t.datepicker._get(n, "dateFormat")), s = String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode), e.ctrlKey || e.metaKey || s < " " || !i || i.indexOf(s) > -1 1205 }, 1206 _doKeyUp: function(e) { 1207 var i = t.datepicker._getInst(e.target); 1208 if (i.input.val() !== i.lastVal) try { 1209 t.datepicker.parseDate(t.datepicker._get(i, "dateFormat"), i.input ? i.input.val() : null, t.datepicker._getFormatConfig(i)) && (t.datepicker._setDateFromField(i), t.datepicker._updateAlternate(i), t.datepicker._updateDatepicker(i)) 1210 } catch (t) {} 1211 return !0 1212 }, 1213 _showDatepicker: function(e) { 1214 var i, s, n, o, a, r, h; 1215 ("input" !== (e = e.target || e).nodeName.toLowerCase() && (e = t("input", e.parentNode)[0]), t.datepicker._isDisabledDatepicker(e) || t.datepicker._lastInput === e) || (i = t.datepicker._getInst(e), t.datepicker._curInst && t.datepicker._curInst !== i && (t.datepicker._curInst.dpDiv.stop(!0, !0), i && t.datepicker._datepickerShowing && t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])), !1 !== (n = (s = t.datepicker._get(i, "beforeShow")) ? s.apply(e, [e, i]) : {}) && (g(i.settings, n), i.lastVal = null, t.datepicker._lastInput = e, t.datepicker._setDateFromField(i), t.datepicker._inDialog && (e.value = ""), t.datepicker._pos || (t.datepicker._pos = t.datepicker._findPos(e), t.datepicker._pos[1] += e.offsetHeight), o = !1, t(e).parents().each(function() { 1216 return !(o |= "fixed" === t(this).css("position")) 1217 }), a = { 1218 left: t.datepicker._pos[0], 1219 top: t.datepicker._pos[1] 1220 }, t.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({ 1221 position: "absolute", 1222 display: "block", 1223 top: "-1000px" 1224 }), t.datepicker._updateDatepicker(i), a = t.datepicker._checkOffset(i, a, o), i.dpDiv.css({ 1225 position: t.datepicker._inDialog && t.blockUI ? "static" : o ? "fixed" : "absolute", 1226 display: "none", 1227 left: a.left + "px", 1228 top: a.top + "px" 1229 }), i.inline || (r = t.datepicker._get(i, "showAnim"), h = t.datepicker._get(i, "duration"), i.dpDiv.css("z-index", function(t) { 1230 for (var e, i; t.length && t[0] !== document;) { 1231 if (("absolute" === (e = t.css("position")) || "relative" === e || "fixed" === e) && (i = parseInt(t.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i; 1232 t = t.parent() 1233 } 1234 return 0 1235 }(t(e)) + 1), t.datepicker._datepickerShowing = !0, t.effects && t.effects.effect[r] ? i.dpDiv.show(r, t.datepicker._get(i, "showOptions"), h) : i.dpDiv[r || "show"](r ? h : null), t.datepicker._shouldFocusInput(i) && i.input.trigger("focus"), t.datepicker._curInst = i))) 1236 }, 1237 _updateDatepicker: function(e) { 1238 this.maxRows = 4, u = e, e.dpDiv.empty().append(this._generateHTML(e)), this._attachHandlers(e); 1239 var i, s = this._getNumberOfMonths(e), 1240 n = s[1], 1241 o = e.dpDiv.find("." + this._dayOverClass + " a"); 1242 o.length > 0 && f.apply(o.get(0)), e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), n > 1 && e.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", 17 * n + "em"), e.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), e === t.datepicker._curInst && t.datepicker._datepickerShowing && t.datepicker._shouldFocusInput(e) && e.input.trigger("focus"), e.yearshtml && (i = e.yearshtml, setTimeout(function() { 1243 i === e.yearshtml && e.yearshtml && e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml), i = e.yearshtml = null 1244 }, 0)) 1245 }, 1246 _shouldFocusInput: function(t) { 1247 return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus") 1248 }, 1249 _checkOffset: function(e, i, s) { 1250 var n = e.dpDiv.outerWidth(), 1251 o = e.dpDiv.outerHeight(), 1252 a = e.input ? e.input.outerWidth() : 0, 1253 r = e.input ? e.input.outerHeight() : 0, 1254 h = document.documentElement.clientWidth + (s ? 0 : t(document).scrollLeft()), 1255 l = document.documentElement.clientHeight + (s ? 0 : t(document).scrollTop()); 1256 return i.left -= this._get(e, "isRTL") ? n - a : 0, i.left -= s && i.left === e.input.offset().left ? t(document).scrollLeft() : 0, i.top -= s && i.top === e.input.offset().top + r ? t(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + n > h && h > n ? Math.abs(i.left + n - h) : 0), i.top -= Math.min(i.top, i.top + o > l && l > o ? Math.abs(o + r) : 0), i 1257 }, 1258 _findPos: function(e) { 1259 for (var i, s = this._getInst(e), n = this._get(s, "isRTL"); e && ("hidden" === e.type || 1 !== e.nodeType || t.expr.filters.hidden(e));) e = e[n ? "previousSibling" : "nextSibling"]; 1260 return [(i = t(e).offset()).left, i.top] 1261 }, 1262 _hideDatepicker: function(e) { 1263 var i, s, n, o, a = this._curInst; 1264 !a || e && a !== t.data(e, "datepicker") || this._datepickerShowing && (i = this._get(a, "showAnim"), s = this._get(a, "duration"), n = function() { 1265 t.datepicker._tidyDialog(a) 1266 }, t.effects && (t.effects.effect[i] || t.effects[i]) ? a.dpDiv.hide(i, t.datepicker._get(a, "showOptions"), s, n) : a.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ? "fadeOut" : "hide"](i ? s : null, n), i || n(), this._datepickerShowing = !1, (o = this._get(a, "onClose")) && o.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : "", a]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ 1267 position: "absolute", 1268 left: "0", 1269 top: "-100px" 1270 }), t.blockUI && (t.unblockUI(), t("body").append(this.dpDiv))), this._inDialog = !1) 1271 }, 1272 _tidyDialog: function(t) { 1273 t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar") 1274 }, 1275 _checkExternalClick: function(e) { 1276 if (t.datepicker._curInst) { 1277 var i = t(e.target), 1278 s = t.datepicker._getInst(i[0]); 1279 (i[0].id === t.datepicker._mainDivId || 0 !== i.parents("#" + t.datepicker._mainDivId).length || i.hasClass(t.datepicker.markerClassName) || i.closest("." + t.datepicker._triggerClass).length || !t.datepicker._datepickerShowing || t.datepicker._inDialog && t.blockUI) && (!i.hasClass(t.datepicker.markerClassName) || t.datepicker._curInst === s) || t.datepicker._hideDatepicker() 1280 } 1281 }, 1282 _adjustDate: function(e, i, s) { 1283 var n = t(e), 1284 o = this._getInst(n[0]); 1285 this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(o, i + ("M" === s ? this._get(o, "showCurrentAtPos") : 0), s), this._updateDatepicker(o)) 1286 }, 1287 _gotoToday: function(e) { 1288 var i, s = t(e), 1289 n = this._getInst(s[0]); 1290 this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (i = new Date, n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear()), this._notifyChange(n), this._adjustDate(s) 1291 }, 1292 _selectMonthYear: function(e, i, s) { 1293 var n = t(e), 1294 o = this._getInst(n[0]); 1295 o["selected" + ("M" === s ? "Month" : "Year")] = o["draw" + ("M" === s ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(o), this._adjustDate(n) 1296 }, 1297 _selectDay: function(e, i, s, n) { 1298 var o, a = t(e); 1299 t(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(a[0]) || ((o = this._getInst(a[0])).selectedDay = o.currentDay = t("a", n).html(), o.selectedMonth = o.currentMonth = i, o.selectedYear = o.currentYear = s, this._selectDate(e, this._formatDate(o, o.currentDay, o.currentMonth, o.currentYear))) 1300 }, 1301 _clearDate: function(e) { 1302 var i = t(e); 1303 this._selectDate(i, "") 1304 }, 1305 _selectDate: function(e, i) { 1306 var s, n = t(e), 1307 o = this._getInst(n[0]); 1308 i = null != i ? i : this._formatDate(o), o.input && o.input.val(i), this._updateAlternate(o), (s = this._get(o, "onSelect")) ? s.apply(o.input ? o.input[0] : null, [i, o]) : o.input && o.input.trigger("change"), o.inline ? this._updateDatepicker(o) : (this._hideDatepicker(), this._lastInput = o.input[0], "object" != typeof o.input[0] && o.input.trigger("focus"), this._lastInput = null) 1309 }, 1310 _updateAlternate: function(e) { 1311 var i, s, n, o = this._get(e, "altField"); 1312 o && (i = this._get(e, "altFormat") || this._get(e, "dateFormat"), s = this._getDate(e), n = this.formatDate(i, s, this._getFormatConfig(e)), t(o).val(n)) 1313 }, 1314 noWeekends: function(t) { 1315 var e = t.getDay(); 1316 return [e > 0 && e < 6, ""] 1317 }, 1318 iso8601Week: function(t) { 1319 var e, i = new Date(t.getTime()); 1320 return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), e = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((e - i) / 864e5) / 7) + 1 1321 }, 1322 parseDate: function(e, i, s) { 1323 if (null == e || null == i) throw "Invalid arguments"; 1324 if ("" === (i = "object" == typeof i ? i.toString() : i + "")) return null; 1325 var n, o, a, r, h = 0, 1326 l = (s ? s.shortYearCutoff : null) || this._defaults.shortYearCutoff, 1327 c = "string" != typeof l ? l : (new Date).getFullYear() % 100 + parseInt(l, 10), 1328 u = (s ? s.dayNamesShort : null) || this._defaults.dayNamesShort, 1329 d = (s ? s.dayNames : null) || this._defaults.dayNames, 1330 p = (s ? s.monthNamesShort : null) || this._defaults.monthNamesShort, 1331 f = (s ? s.monthNames : null) || this._defaults.monthNames, 1332 g = -1, 1333 m = -1, 1334 _ = -1, 1335 v = -1, 1336 b = !1, 1337 y = function(t) { 1338 var i = n + 1 < e.length && e.charAt(n + 1) === t; 1339 return i && n++, i 1340 }, 1341 w = function(t) { 1342 var e = y(t), 1343 s = "@" === t ? 14 : "!" === t ? 20 : "y" === t && e ? 4 : "o" === t ? 3 : 2, 1344 n = new RegExp("^\\d{" + ("y" === t ? s : 1) + "," + s + "}"), 1345 o = i.substring(h).match(n); 1346 if (!o) throw "Missing number at position " + h; 1347 return h += o[0].length, parseInt(o[0], 10) 1348 }, 1349 k = function(e, s, n) { 1350 var o = -1, 1351 a = t.map(y(e) ? n : s, function(t, e) { 1352 return [ 1353 [e, t] 1354 ] 1355 }).sort(function(t, e) { 1356 return -(t[1].length - e[1].length) 1357 }); 1358 if (t.each(a, function(t, e) { 1359 var s = e[1]; 1360 if (i.substr(h, s.length).toLowerCase() === s.toLowerCase()) return o = e[0], h += s.length, !1 1361 }), -1 !== o) return o + 1; 1362 throw "Unknown name at position " + h 1363 }, 1364 x = function() { 1365 if (i.charAt(h) !== e.charAt(n)) throw "Unexpected literal at position " + h; 1366 h++ 1367 }; 1368 for (n = 0; n < e.length; n++) 1369 if (b) "'" !== e.charAt(n) || y("'") ? x() : b = !1; 1370 else switch (e.charAt(n)) { 1371 case "d": 1372 _ = w("d"); 1373 break; 1374 case "D": 1375 k("D", u, d); 1376 break; 1377 case "o": 1378 v = w("o"); 1379 break; 1380 case "m": 1381 m = w("m"); 1382 break; 1383 case "M": 1384 m = k("M", p, f); 1385 break; 1386 case "y": 1387 g = w("y"); 1388 break; 1389 case "@": 1390 g = (r = new Date(w("@"))).getFullYear(), m = r.getMonth() + 1, _ = r.getDate(); 1391 break; 1392 case "!": 1393 g = (r = new Date((w("!") - this._ticksTo1970) / 1e4)).getFullYear(), m = r.getMonth() + 1, _ = r.getDate(); 1394 break; 1395 case "'": 1396 y("'") ? x() : b = !0; 1397 break; 1398 default: 1399 x() 1400 } 1401 if (h < i.length && (a = i.substr(h), !/^\s+/.test(a))) throw "Extra/unparsed characters found in date: " + a; 1402 if (-1 === g ? g = (new Date).getFullYear() : g < 100 && (g += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (g <= c ? 0 : -100)), v > -1) 1403 for (m = 1, _ = v;;) { 1404 if (_ <= (o = this._getDaysInMonth(g, m - 1))) break; 1405 m++, _ -= o 1406 } 1407 if ((r = this._daylightSavingAdjust(new Date(g, m - 1, _))).getFullYear() !== g || r.getMonth() + 1 !== m || r.getDate() !== _) throw "Invalid date"; 1408 return r 1409 }, 1410 ATOM: "yy-mm-dd", 1411 COOKIE: "D, dd M yy", 1412 ISO_8601: "yy-mm-dd", 1413 RFC_822: "D, d M y", 1414 RFC_850: "DD, dd-M-y", 1415 RFC_1036: "D, d M y", 1416 RFC_1123: "D, d M yy", 1417 RFC_2822: "D, d M yy", 1418 RSS: "D, d M y", 1419 TICKS: "!", 1420 TIMESTAMP: "@", 1421 W3C: "yy-mm-dd", 1422 _ticksTo1970: 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 60 * 60 * 1e7, 1423 formatDate: function(t, e, i) { 1424 if (!e) return ""; 1425 var s, n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, 1426 o = (i ? i.dayNames : null) || this._defaults.dayNames, 1427 a = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, 1428 r = (i ? i.monthNames : null) || this._defaults.monthNames, 1429 h = function(e) { 1430 var i = s + 1 < t.length && t.charAt(s + 1) === e; 1431 return i && s++, i 1432 }, 1433 l = function(t, e, i) { 1434 var s = "" + e; 1435 if (h(t)) 1436 for (; s.length < i;) s = "0" + s; 1437 return s 1438 }, 1439 c = function(t, e, i, s) { 1440 return h(t) ? s[e] : i[e] 1441 }, 1442 u = "", 1443 d = !1; 1444 if (e) 1445 for (s = 0; s < t.length; s++) 1446 if (d) "'" !== t.charAt(s) || h("'") ? u += t.charAt(s) : d = !1; 1447 else switch (t.charAt(s)) { 1448 case "d": 1449 u += l("d", e.getDate(), 2); 1450 break; 1451 case "D": 1452 u += c("D", e.getDay(), n, o); 1453 break; 1454 case "o": 1455 u += l("o", Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime() - new Date(e.getFullYear(), 0, 0).getTime()) / 864e5), 3); 1456 break; 1457 case "m": 1458 u += l("m", e.getMonth() + 1, 2); 1459 break; 1460 case "M": 1461 u += c("M", e.getMonth(), a, r); 1462 break; 1463 case "y": 1464 u += h("y") ? e.getFullYear() : (e.getFullYear() % 100 < 10 ? "0" : "") + e.getFullYear() % 100; 1465 break; 1466 case "@": 1467 u += e.getTime(); 1468 break; 1469 case "!": 1470 u += 1e4 * e.getTime() + this._ticksTo1970; 1471 break;
vendor: 5,119 bytes, lines 1472-1575
1472 case "'": 1473 h("'") ? u += "'" : d = !0; 1474 break; 1475 default: 1476 u += t.charAt(s) 1477 } 1478 return u 1479 }, 1480 _possibleChars: function(t) { 1481 var e, i = "", 1482 s = !1, 1483 n = function(i) { 1484 var s = e + 1 < t.length && t.charAt(e + 1) === i; 1485 return s && e++, s 1486 }; 1487 for (e = 0; e < t.length; e++) 1488 if (s) "'" !== t.charAt(e) || n("'") ? i += t.charAt(e) : s = !1; 1489 else switch (t.charAt(e)) { 1490 case "d": 1491 case "m": 1492 case "y": 1493 case "@": 1494 i += "0123456789"; 1495 break; 1496 case "D": 1497 case "M": 1498 return null; 1499 case "'": 1500 n("'") ? i += "'" : s = !0; 1501 break; 1502 default: 1503 i += t.charAt(e) 1504 } 1505 return i 1506 }, 1507 _get: function(t, e) { 1508 return void 0 !== t.settings[e] ? t.settings[e] : this._defaults[e] 1509 }, 1510 _setDateFromField: function(t, e) { 1511 if (t.input.val() !== t.lastVal) { 1512 var i = this._get(t, "dateFormat"), 1513 s = t.lastVal = t.input ? t.input.val() : null, 1514 n = this._getDefaultDate(t), 1515 o = n, 1516 a = this._getFormatConfig(t); 1517 try { 1518 o = this.parseDate(i, s, a) || n 1519 } catch (t) { 1520 s = e ? "" : s 1521 } 1522 t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear = o.getFullYear(), t.currentDay = s ? o.getDate() : 0, t.currentMonth = s ? o.getMonth() : 0, t.currentYear = s ? o.getFullYear() : 0, this._adjustInstDate(t) 1523 } 1524 }, 1525 _getDefaultDate: function(t) { 1526 return this._restrictMinMax(t, this._determineDate(t, this._get(t, "defaultDate"), new Date)) 1527 }, 1528 _determineDate: function(e, i, s) { 1529 var n = null == i || "" === i ? s : "string" == typeof i ? function(i) { 1530 try { 1531 return t.datepicker.parseDate(t.datepicker._get(e, "dateFormat"), i, t.datepicker._getFormatConfig(e)) 1532 } catch (t) {} 1533 for (var s = (i.toLowerCase().match(/^c/) ? t.datepicker._getDate(e) : null) || new Date, n = s.getFullYear(), o = s.getMonth(), a = s.getDate(), r = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, h = r.exec(i); h;) { 1534 switch (h[2] || "d") { 1535 case "d": 1536 case "D": 1537 a += parseInt(h[1], 10); 1538 break; 1539 case "w": 1540 case "W": 1541 a += 7 * parseInt(h[1], 10); 1542 break; 1543 case "m": 1544 case "M": 1545 o += parseInt(h[1], 10), a = Math.min(a, t.datepicker._getDaysInMonth(n, o)); 1546 break; 1547 case "y": 1548 case "Y": 1549 n += parseInt(h[1], 10), a = Math.min(a, t.datepicker._getDaysInMonth(n, o)) 1550 } 1551 h = r.exec(i) 1552 } 1553 return new Date(n, o, a) 1554 }(i) : "number" == typeof i ? isNaN(i) ? s : function(t) { 1555 var e = new Date; 1556 return e.setDate(e.getDate() + t), e 1557 }(i) : new Date(i.getTime()); 1558 return (n = n && "Invalid Date" === n.toString() ? s : n) && (n.setHours(0), n.setMinutes(0), n.setSeconds(0), n.setMilliseconds(0)), this._daylightSavingAdjust(n) 1559 }, 1560 _daylightSavingAdjust: function(t) { 1561 return t ? (t.setHours(t.getHours() > 12 ? t.getHours() + 2 : 0), t) : null 1562 }, 1563 _setDate: function(t, e, i) { 1564 var s = !e, 1565 n = t.selectedMonth, 1566 o = t.selectedYear, 1567 a = this._restrictMinMax(t, this._determineDate(t, e, new Date)); 1568 t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(), t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), n === t.selectedMonth && o === t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(s ? "" : this._formatDate(t)) 1569 }, 1570 _getDate: function(t) { 1571 return !t.currentYear || t.input && "" === t.input.val() ? null : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)) 1572 }, 1573 _attachHandlers: function(e) { 1574 var i = this._get(e, "stepMonths"), 1575 s = "#" + e.id.replace(/\\\\/g, "\\");
vendor: 10,952 bytes, lines 1576-1676
1576 e.dpDiv.find("[data-handler]").map(function() { 1577 var e = { 1578 prev: function() { 1579 t.datepicker._adjustDate(s, -i, "M") 1580 }, 1581 next: function() { 1582 t.datepicker._adjustDate(s, +i, "M") 1583 }, 1584 hide: function() { 1585 t.datepicker._hideDatepicker() 1586 }, 1587 today: function() { 1588 t.datepicker._gotoToday(s) 1589 }, 1590 selectDay: function() { 1591 return t.datepicker._selectDay(s, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1 1592 }, 1593 selectMonth: function() { 1594 return t.datepicker._selectMonthYear(s, this, "M"), !1 1595 }, 1596 selectYear: function() { 1597 return t.datepicker._selectMonthYear(s, this, "Y"), !1 1598 } 1599 }; 1600 t(this).on(this.getAttribute("data-event"), e[this.getAttribute("data-handler")]) 1601 }) 1602 }, 1603 _generateHTML: function(t) { 1604 var e, i, s, n, o, a, r, h, l, c, u, d, p, f, g, m, _, v, b, y, w, k, x, C, D, I, T, P, M, S, H, z, O, A, N, W, E, F, L, R = new Date, 1605 B = this._daylightSavingAdjust(new Date(R.getFullYear(), R.getMonth(), R.getDate())), 1606 Y = this._get(t, "isRTL"), 1607 j = this._get(t, "showButtonPanel"), 1608 q = this._get(t, "hideIfNoPrevNext"), 1609 K = this._get(t, "navigationAsDateFormat"), 1610 U = this._getNumberOfMonths(t), 1611 V = this._get(t, "showCurrentAtPos"), 1612 $ = this._get(t, "stepMonths"), 1613 X = 1 !== U[0] || 1 !== U[1], 1614 G = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)), 1615 Q = this._getMinMaxDate(t, "min"), 1616 J = this._getMinMaxDate(t, "max"), 1617 Z = t.drawMonth - V, 1618 tt = t.drawYear; 1619 if (Z < 0 && (Z += 12, tt--), J) 1620 for (e = this._daylightSavingAdjust(new Date(J.getFullYear(), J.getMonth() - U[0] * U[1] + 1, J.getDate())), e = Q && e < Q ? Q : e; this._daylightSavingAdjust(new Date(tt, Z, 1)) > e;) --Z < 0 && (Z = 11, tt--); 1621 for (t.drawMonth = Z, t.drawYear = tt, i = this._get(t, "prevText"), i = K ? this.formatDate(i, this._daylightSavingAdjust(new Date(tt, Z - $, 1)), this._getFormatConfig(t)) : i, s = this._canAdjustMonth(t, -1, tt, Z) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>" : q ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>", n = this._get(t, "nextText"), n = K ? this.formatDate(n, this._daylightSavingAdjust(new Date(tt, Z + $, 1)), this._getFormatConfig(t)) : n, o = this._canAdjustMonth(t, 1, tt, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>" : q ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>", a = this._get(t, "currentText"), r = this._get(t, "gotoCurrent") && t.currentDay ? G : B, a = K ? this.formatDate(a, r, this._getFormatConfig(t)) : a, h = t.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(t, "closeText") + "</button>", l = j ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Y ? h : "") + (this._isInRange(t, r) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + a + "</button>" : "") + (Y ? "" : h) + "</div>" : "", c = parseInt(this._get(t, "firstDay"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, "showWeek"), d = this._get(t, "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), g = this._get(t, "monthNamesShort"), m = this._get(t, "beforeShowDay"), _ = this._get(t, "showOtherMonths"), v = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), y = "", k = 0; k < U[0]; k++) { 1622 for (x = "", this.maxRows = 4, C = 0; C < U[1]; C++) { 1623 if (D = this._daylightSavingAdjust(new Date(tt, Z, t.selectedDay)), I = " ui-corner-all", T = "", X) { 1624 if (T += "<div class='ui-datepicker-group", U[1] > 1) switch (C) { 1625 case 0: 1626 T += " ui-datepicker-group-first", I = " ui-corner-" + (Y ? "right" : "left"); 1627 break; 1628 case U[1] - 1: 1629 T += " ui-datepicker-group-last", I = " ui-corner-" + (Y ? "left" : "right"); 1630 break; 1631 default: 1632 T += " ui-datepicker-group-middle", I = "" 1633 } 1634 T += "'>" 1635 } 1636 for (T += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + I + "'>" + (/all|left/.test(I) && 0 === k ? Y ? o : s : "") + (/all|right/.test(I) && 0 === k ? Y ? s : o : "") + this._generateMonthYearHeader(t, Z, tt, Q, J, k > 0 || C > 0, f, g) + "</div><table class='ui-datepicker-calendar'><thead><tr>", P = u ? "<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>" : "", w = 0; w < 7; w++) P += "<th scope='col'" + ((w + c + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + d[M = (w + c) % 7] + "'>" + p[M] + "</span></th>"; 1637 for (T += P + "</tr></thead><tbody>", S = this._getDaysInMonth(tt, Z), tt === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, S)), H = (this._getFirstDayOfMonth(tt, Z) - c + 7) % 7, z = Math.ceil((H + S) / 7), O = X && this.maxRows > z ? this.maxRows : z, this.maxRows = O, A = this._daylightSavingAdjust(new Date(tt, Z, 1 - H)), N = 0; N < O; N++) { 1638 for (T += "<tr>", W = u ? "<td class='ui-datepicker-week-col'>" + this._get(t, "calculateWeek")(A) + "</td>" : "", w = 0; w < 7; w++) E = m ? m.apply(t.input ? t.input[0] : null, [A]) : [!0, ""], L = (F = A.getMonth() !== Z) && !v || !E[0] || Q && A < Q || J && A > J, W += "<td class='" + ((w + c + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") + (A.getTime() === D.getTime() && Z === t.selectedMonth && t._keyEvent || b.getTime() === A.getTime() && b.getTime() === D.getTime() ? " " + this._dayOverClass : "") + (L ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !_ ? "" : " " + E[1] + (A.getTime() === G.getTime() ? " " + this._currentClass : "") + (A.getTime() === B.getTime() ? " ui-datepicker-today" : "")) + "'" + (F && !_ || !E[2] ? "" : " title='" + E[2].replace(/'/g, "'") + "'") + (L ? "" : " data-handler='selectDay' data-event='click' data-month='" + A.getMonth() + "' data-year='" + A.getFullYear() + "'") + ">" + (F && !_ ? " " : L ? "<span class='ui-state-default'>" + A.getDate() + "</span>" : "<a class='ui-state-default" + (A.getTime() === B.getTime() ? " ui-state-highlight" : "") + (A.getTime() === G.getTime() ? " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") + "' href='#'>" + A.getDate() + "</a>") + "</td>", A.setDate(A.getDate() + 1), A = this._daylightSavingAdjust(A); 1639 T += W + "</tr>" 1640 }++Z > 11 && (Z = 0, tt++), x += T += "</tbody></table>" + (X ? "</div>" + (U[0] > 0 && C === U[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : "") 1641 } 1642 y += x 1643 } 1644 return y += l, t._keyEvent = !1, y 1645 }, 1646 _generateMonthYearHeader: function(t, e, i, s, n, o, a, r) { 1647 var h, l, c, u, d, p, f, g, m = this._get(t, "changeMonth"), 1648 _ = this._get(t, "changeYear"), 1649 v = this._get(t, "showMonthAfterYear"), 1650 b = "<div class='ui-datepicker-title'>", 1651 y = ""; 1652 if (o || !m) y += "<span class='ui-datepicker-month'>" + a[e] + "</span>"; 1653 else { 1654 for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", c = 0; c < 12; c++)(!h || c >= s.getMonth()) && (!l || c <= n.getMonth()) && (y += "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] + "</option>"); 1655 y += "</select>" 1656 } 1657 if (v || (b += y + (!o && m && _ ? "" : " ")), !t.yearshtml) 1658 if (t.yearshtml = "", o || !_) b += "<span class='ui-datepicker-year'>" + i + "</span>"; 1659 else { 1660 for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), f = (p = function(t) { 1661 var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10); 1662 return isNaN(e) ? d : e 1663 })(u[0]), g = Math.max(f, p(u[1] || "")), f = s ? Math.max(f, s.getFullYear()) : f, g = n ? Math.min(g, n.getFullYear()) : g, t.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; f <= g; f++) t.yearshtml += "<option value='" + f + "'" + (f === i ? " selected='selected'" : "") + ">" + f + "</option>"; 1664 t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null 1665 } 1666 return b += this._get(t, "yearSuffix"), v && (b += (!o && m && _ ? "" : " ") + y), b += "</div>" 1667 }, 1668 _adjustInstDate: function(t, e, i) { 1669 var s = t.selectedYear + ("Y" === i ? e : 0), 1670 n = t.selectedMonth + ("M" === i ? e : 0), 1671 o = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0), 1672 a = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, o))); 1673 t.selectedDay = a.getDate(), t.drawMonth = t.selectedMonth = a.getMonth(), t.drawYear = t.selectedYear = a.getFullYear(), "M" !== i && "Y" !== i || this._notifyChange(t) 1674 }, 1675 _restrictMinMax: function(t, e) { 1676 var i = this._getMinMaxDate(t, "min"),
1677 s = this._getMinMaxDate(t, "max"), 1678 n = i && e < i ? i : e; 1679 return s && n > s ? s : n 1680 }, 1681 _notifyChange: function(t) { 1682 var e = this._get(t, "onChangeMonthYear"); 1683 e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t]) 1684 }, 1685 _getNumberOfMonths: function(t) { 1686 var e = this._get(t, "numberOfMonths"); 1687 return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e 1688 }, 1689 _getMinMaxDate: function(t, e) { 1690 return this._determineDate(t, this._get(t, e + "Date"), null) 1691 }, 1692 _getDaysInMonth: function(t, e) { 1693 return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate() 1694 }, 1695 _getFirstDayOfMonth: function(t, e) { 1696 return new Date(t, e, 1).getDay() 1697 }, 1698 _canAdjustMonth: function(t, e, i, s) { 1699 var n = this._getNumberOfMonths(t), 1700 o = this._daylightSavingAdjust(new Date(i, s + (e < 0 ? e : n[0] * n[1]), 1)); 1701 return e < 0 && o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())), this._isInRange(t, o) 1702 }, 1703 _isInRange: function(t, e) { 1704 var i, s, n = this._getMinMaxDate(t, "min"), 1705 o = this._getMinMaxDate(t, "max"), 1706 a = null, 1707 r = null, 1708 h = this._get(t, "yearRange"); 1709 return h && (i = h.split(":"), s = (new Date).getFullYear(), a = parseInt(i[0], 10), r = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (a += s), i[1].match(/[+\-].*/) && (r += s)), (!n || e.getTime() >= n.getTime()) && (!o || e.getTime() <= o.getTime()) && (!a || e.getFullYear() >= a) && (!r || e.getFullYear() <= r) 1710 }, 1711 _getFormatConfig: function(t) { 1712 var e = this._get(t, "shortYearCutoff"); 1713 return { 1714 shortYearCutoff: e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), 1715 dayNamesShort: this._get(t, "dayNamesShort"), 1716 dayNames: this._get(t, "dayNames"), 1717 monthNamesShort: this._get(t, "monthNamesShort"), 1718 monthNames: this._get(t, "monthNames") 1719 } 1720 }, 1721 _formatDate: function(t, e, i, s) { 1722 e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear); 1723 var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(s, i, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)); 1724 return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t)) 1725 } 1726 }), t.fn.datepicker = function(e) { 1727 if (!this.length) return this; 1728 t.datepicker.initialized || (t(document).on("mousedown", t.datepicker._checkExternalClick), t.datepicker.initialized = !0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv); 1729 var i = Array.prototype.slice.call(arguments, 1); 1730 return "string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e ? "option" === e && 2 === arguments.length && "string" == typeof arguments[1] ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) : this.each(function() { 1731 "string" == typeof e ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)) : t.datepicker._attachDatepicker(this, e) 1732 }) : t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) 1733 }, t.datepicker = new d, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version = "1.12.1"; 1734 t.datepicker, t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); 1735 let n = !1 1736 t(document).on('mouseup', function() { 1737 n = !1 1738 }), 1739 t.widget('ui.mouse', { 1740 version: '1.12.1', 1741 options: { 1742 cancel: 'input, textarea, button, select, option', 1743 distance: 1, 1744 delay: 0 1745 }, 1746 _mouseInit() { 1747 const e = this 1748 this.element 1749 .on(`mousedown.${this.widgetName}`, function(t) { 1750 return e._mouseDown(t) 1751 }) 1752 .on(`click.${this.widgetName}`, function(i) { 1753 return !0 === t.data(i.target, `${e.widgetName}.preventClickEvent`) 1754 ? (t.removeData(i.target, `${e.widgetName}.preventClickEvent`), 1755 i.stopImmediatePropagation(), 1756 !1) 1757 : void 0 1758 }), 1759 (this.started = !1) 1760 }, 1761 _mouseDestroy() { 1762 this.element.off(`.${this.widgetName}`), 1763 this._mouseMoveDelegate && 1764 this.document 1765 .off(`mousemove.${this.widgetName}`, this._mouseMoveDelegate) 1766 .off(`mouseup.${this.widgetName}`, this._mouseUpDelegate) 1767 }, 1768 _mouseDown(e) { 1769 if (!n) { 1770 ;(this._mouseMoved = !1), 1771 this._mouseStarted && this._mouseUp(e), 1772 (this._mouseDownEvent = e) 1773 let i = this, 1774 s = e.which === 1, 1775 o = 1776 typeof this.options.cancel === 'string' && e.target.nodeName 1777 ? t(e.target).closest(this.options.cancel).length 1778 : !1 1779 return s && !o && this._mouseCapture(e) 1780 ? ((this.mouseDelayMet = !this.options.delay), 1781 this.mouseDelayMet || 1782 (this._mouseDelayTimer = setTimeout(function() { 1783 i.mouseDelayMet = !0 1784 }, this.options.delay)), 1785 this._mouseDistanceMet(e) && 1786 this._mouseDelayMet(e) && 1787 ((this._mouseStarted = this._mouseStart(e) !== !1), 1788 !this._mouseStarted) 1789 ? (e.preventDefault(), !0) 1790 : (!0 === 1791 t.data(e.target, `${this.widgetName}.preventClickEvent`) && 1792 t.removeData( 1793 e.target, 1794 `${this.widgetName}.preventClickEvent` 1795 ), 1796 (this._mouseMoveDelegate = function(t) { 1797 return i._mouseMove(t) 1798 }), 1799 (this._mouseUpDelegate = function(t) { 1800 return i._mouseUp(t) 1801 }), 1802 this.document 1803 .on(`mousemove.${this.widgetName}`, this._mouseMoveDelegate) 1804 .on(`mouseup.${this.widgetName}`, this._mouseUpDelegate), 1805 e.preventDefault(), 1806 (n = !0), 1807 !0)) 1808 : !0 1809 } 1810 }, 1811 _mouseMove(e) { 1812 if (this._mouseMoved) { 1813 if ( 1814 t.ui.ie && 1815 (!document.documentMode || document.documentMode < 9) && 1816 !e.button 1817 ) { 1818 return this._mouseUp(e) 1819 } 1820 if (!e.which) { 1821 if ( 1822 e.originalEvent.altKey || 1823 e.originalEvent.ctrlKey || 1824 e.originalEvent.metaKey || 1825 e.originalEvent.shiftKey 1826 ) { 1827 this.ignoreMissingWhich = !0 1828 } else if (!this.ignoreMissingWhich) return this._mouseUp(e) 1829 } 1830 } 1831 return ( 1832 (e.which || e.button) && (this._mouseMoved = !0), 1833 this._mouseStarted 1834 ? (this._mouseDrag(e), e.preventDefault()) 1835 : (this._mouseDistanceMet(e) && 1836 this._mouseDelayMet(e) && 1837 ((this._mouseStarted = 1838 this._mouseStart(this._mouseDownEvent, e) !== !1), 1839 this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), 1840 !this._mouseStarted) 1841 ) 1842 }, 1843 _mouseUp(e) { 1844 this.document 1845 .off(`mousemove.${this.widgetName}`, this._mouseMoveDelegate) 1846 .off(`mouseup.${this.widgetName}`, this._mouseUpDelegate), 1847 this._mouseStarted && 1848 ((this._mouseStarted = !1), 1849 e.target === this._mouseDownEvent.target && 1850 t.data(e.target, `${this.widgetName}.preventClickEvent`, !0), 1851 this._mouseStop(e)), 1852 this._mouseDelayTimer && 1853 (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), 1854 (this.ignoreMissingWhich = !1), 1855 (n = !1), 1856 e.preventDefault() 1857 }, 1858 _mouseDistanceMet(t) { 1859 return ( 1860 Math.max( 1861 Math.abs(this._mouseDownEvent.pageX - t.pageX), 1862 Math.abs(this._mouseDownEvent.pageY - t.pageY) 1863 ) >= this.options.distance 1864 ) 1865 }, 1866 _mouseDelayMet() { 1867 return this.mouseDelayMet 1868 }, 1869 _mouseStart() {}, 1870 _mouseDrag() {}, 1871 _mouseStop() {}, 1872 _mouseCapture() { 1873 return !0 1874 } 1875 }), 1876 (t.ui.plugin = { 1877 add(e, i, s) { 1878 let n, 1879 o = t.ui[e].prototype 1880 for (n in s) { 1881 ;
1881(o.plugins[n] = o.plugins[n] || []), o.plugins[n].push([i, s[n]]) 1882 } 1883 }, 1884 call(t, e, i, s) { 1885 let n, 1886 o = t.plugins[e] 1887 if ( 1888 o && 1889 (s || 1890 (t.element[0].parentNode && 1891 t.element[0].parentNode.nodeType !== 11)) 1892 ) { 1893 for (n = 0; o.length > n; n++) { 1894 t.options[o[n][0]] && o[n][1].apply(t.element, i) 1895 } 1896 } 1897 } 1898 }), 1899 (t.ui.safeActiveElement = function(t) { 1900 let e 1901 try { 1902 e = t.activeElement 1903 } catch (i) { 1904 e = t.body 1905 } 1906 return e || (e = t.body), e.nodeName || (e = t.body), e 1907 }), 1908 (t.ui.safeBlur = function(e) { 1909 e && e.nodeName.toLowerCase() !== 'body' && t(e).trigger('blur') 1910 }), 1911 t.widget('ui.draggable', t.ui.mouse, { 1912 version: '1.12.1', 1913 widgetEventPrefix: 'drag', 1914 options: { 1915 addClasses: !0, 1916 appendTo: 'parent', 1917 axis: !1, 1918 connectToSortable: !1, 1919 containment: !1, 1920 cursor: 'auto', 1921 cursorAt: !1, 1922 grid: !1, 1923 handle: !1, 1924 helper: 'original', 1925 iframeFix: !1, 1926 opacity: !1, 1927 refreshPositions: !1, 1928 revert: !1, 1929 revertDuration: 500, 1930 scope: 'default', 1931 scroll: !0, 1932 scrollSensitivity: 20, 1933 scrollSpeed: 20, 1934 snap: !1, 1935 snapMode: 'both', 1936 snapTolerance: 20, 1937 stack: !1, 1938 zIndex: !1, 1939 drag: null, 1940 start: null, 1941 stop: null 1942 }, 1943 _create() { 1944 this.options.helper === 'original' && this._setPositionRelative(), 1945 this.options.addClasses && this._addClass('ui-draggable'), 1946 this._setHandleClassName(), 1947 this._mouseInit() 1948 }, 1949 _setOption(t, e) { 1950 this._super(t, e), 1951 t === 'handle' && 1952 (this._removeHandleClassName(), this._setHandleClassName()) 1953 }, 1954 _destroy() { 1955 return (this.helper || this.element).is('.ui-draggable-dragging') 1956 ? ((this.destroyOnClear = !0), void 0) 1957 : (this._removeHandleClassName(), this._mouseDestroy(), void 0) 1958 }, 1959 _mouseCapture(e) { 1960 const i = this.options 1961 return this.helper || 1962 i.disabled || 1963 t(e.target).closest('.ui-resizable-handle').length > 0 1964 ? !1 1965 : ((this.handle = this._getHandle(e)), 1966 this.handle 1967 ? (this._blurActiveElement(e), 1968 this._blockFrames(i.iframeFix === !0 ? 'iframe' : i.iframeFix), 1969 !0) 1970 : !1) 1971 }, 1972 _blockFrames(e) { 1973 this.iframeBlocks = this.document.find(e).map(function() { 1974 const e = t(this) 1975 return t('<div>') 1976 .css('position', 'absolute') 1977 .appendTo(e.parent()) 1978 .outerWidth(e.outerWidth()) 1979 .outerHeight(e.outerHeight()) 1980 .offset(e.offset())[0] 1981 }) 1982 }, 1983 _unblockFrames() { 1984 this.iframeBlocks && 1985 (this.iframeBlocks.remove(), delete this.iframeBlocks) 1986 }, 1987 _blurActiveElement(e) { 1988 let i = t.ui.safeActiveElement(this.document[0]), 1989 s = t(e.target) 1990 s.closest(i).length || t.ui.safeBlur(i) 1991 }, 1992 _mouseStart(e) { 1993 const i = this.options 1994 return ( 1995 (this.helper = this._createHelper(e)), 1996 this._addClass(this.helper, 'ui-draggable-dragging'), 1997 this._cacheHelperProportions(), 1998 t.ui.ddmanager && (t.ui.ddmanager.current = this), 1999 this._cacheMargins(), 2000 (this.cssPosition = this.helper.css('position')), 2001 (this.scrollParent = this.helper.scrollParent(!0)), 2002 (this.offsetParent = this.helper.offsetParent()), 2003 (this.hasFixedAncestor = 2004 this.helper.parents().filter(function() { 2005 return t(this).css('position') === 'fixed' 2006 }).length > 0), 2007 (this.positionAbs = this.element.offset()), 2008 this._refreshOffsets(e), 2009 (this.originalPosition = this.position = this._generatePosition( 2010 e, 2011 !1 2012 )), 2013 (this.originalPageX = e.pageX), 2014 (this.originalPageY = e.pageY), 2015 i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), 2016 this._setContainment(), 2017 this._trigger('start', e) === !1 2018 ? (this._clear(), !1) 2019 : (this._cacheHelperProportions(), 2020 t.ui.ddmanager && 2021 !i.dropBehaviour && 2022 t.ui.ddmanager.prepareOffsets(this, e), 2023 this._mouseDrag(e, !0), 2024 t.ui.ddmanager && t.ui.ddmanager.dragStart(this, e), 2025 !0) 2026 ) 2027 }, 2028 _refreshOffsets(t) { 2029 ;(this.offset = { 2030 top: this.positionAbs.top - this.margins.top, 2031 left: this.positionAbs.left - this.margins.left, 2032 scroll: !1, 2033 parent: this._getParentOffset(), 2034 relative: this._getRelativeOffset() 2035 }), 2036 (this.offset.click = { 2037 left: t.pageX - this.offset.left, 2038 top: t.pageY - this.offset.top 2039 }) 2040 }, 2041 _mouseDrag(e, i) { 2042 if ( 2043 (this.hasFixedAncestor && 2044 (this.offset.parent = this._getParentOffset()), 2045 (this.position = this._generatePosition(e, !0)), 2046 (this.positionAbs = this._convertPositionTo('absolute')), 2047 !i) 2048 ) { 2049 const s = this._uiHash() 2050 if (this._trigger('drag', e, s) === !1) { 2051 return this._mouseUp(new t.Event('mouseup', e)), !1 2052 } 2053 this.position = s.position 2054 } 2055 return ( 2056 (this.helper[0].style.left = `${this.position.left}px`), 2057 (this.helper[0].style.top = `${this.position.top}px`), 2058 t.ui.ddmanager && t.ui.ddmanager.drag(this, e), 2059 !1 2060 ) 2061 }, 2062 _mouseStop(e) { 2063 let i = this, 2064 s = !1 2065 return ( 2066 t.ui.ddmanager && 2067 !this.options.dropBehaviour && 2068 (s = t.ui.ddmanager.drop(this, e)), 2069 this.dropped && ((s = this.dropped), (this.dropped = !1)),
2070 (this.options.revert === 'invalid' && !s) || 2071 (this.options.revert === 'valid' && s) || 2072 this.options.revert === !0 || 2073 (t.isFunction(this.options.revert) && 2074 this.options.revert.call(this.element, s)) 2075 ? t(this.helper).animate( 2076 this.originalPosition, 2077 parseInt(this.options.revertDuration, 10), 2078 function() { 2079 i._trigger('stop', e) !== !1 && i._clear() 2080 } 2081 ) 2082 : this._trigger('stop', e) !== !1 && this._clear(), 2083 !1 2084 ) 2085 }, 2086 _mouseUp(e) { 2087 return ( 2088 this._unblockFrames(), 2089 t.ui.ddmanager && t.ui.ddmanager.dragStop(this, e), 2090 this.handleElement.is(e.target) && this.element.trigger('focus'), 2091 t.ui.mouse.prototype._mouseUp.call(this, e) 2092 ) 2093 }, 2094 cancel() { 2095 return ( 2096 this.helper.is('.ui-draggable-dragging') 2097 ? this._mouseUp(new t.Event('mouseup', { target: this.element[0] })) 2098 : this._clear(), 2099 this 2100 ) 2101 }, 2102 _getHandle(e) { 2103 return this.options.handle 2104 ? !!t(e.target).closest(this.element.find(this.options.handle)).length 2105 : !0 2106 }, 2107 _setHandleClassName() { 2108 ;(this.handleElement = this.options.handle 2109 ? this.element.find(this.options.handle) 2110 : this.element), 2111 this._addClass(this.handleElement, 'ui-draggable-handle') 2112 }, 2113 _removeHandleClassName() { 2114 this._removeClass(this.handleElement, 'ui-draggable-handle') 2115 }, 2116 _createHelper(e) { 2117 let i = this.options, 2118 s = t.isFunction(i.helper), 2119 n = s 2120 ? t(i.helper.apply(this.element[0], [e])) 2121 : i.helper === 'clone' 2122 ? this.element.clone().removeAttr('id') 2123 : this.element 2124 return ( 2125 n.parents('body').length || 2126 n.appendTo( 2127 i.appendTo === 'parent' ? this.element[0].parentNode : i.appendTo 2128 ), 2129 s && n[0] === this.element[0] && this._setPositionRelative(), 2130 n[0] === this.element[0] || 2131 /(fixed|absolute)/.test(n.css('position')) || 2132 n.css('position', 'absolute'), 2133 n 2134 ) 2135 }, 2136 _setPositionRelative() { 2137 ;/^(?:r|a|f)/.test(this.element.css('position')) || 2138 (this.element[0].style.position = 'relative') 2139 }, 2140 _adjustOffsetFromHelper(e) { 2141 typeof e === 'string' && (e = e.split(' ')), 2142 t.isArray(e) && (e = { left: +e[0], top: +e[1] || 0 }), 2143 'left' in e && (this.offset.click.left = e.left + this.margins.left), 2144 'right' in e && 2145 (this.offset.click.left = 2146 this.helperProportions.width - e.right + this.margins.left), 2147 'top' in e && (this.offset.click.top = e.top + this.margins.top), 2148 'bottom' in e && 2149 (this.offset.click.top = 2150 this.helperProportions.height - e.bottom + this.margins.top) 2151 }, 2152 _isRootNode(t) { 2153 return /(html|body)/i.test(t.tagName) || t === this.document[0] 2154 }, 2155 _getParentOffset() { 2156 let e = this.offsetParent.offset(), 2157 i = this.document[0] 2158 return ( 2159 this.cssPosition === 'absolute' && 2160 this.scrollParent[0] !== i && 2161 t.contains(this.scrollParent[0], this.offsetParent[0]) && 2162 ((e.left += this.scrollParent.scrollLeft()), 2163 (e.top += this.scrollParent.scrollTop())),
2164 this._isRootNode(this.offsetParent[0]) && (e = { top: 0, left: 0 }), 2165 { 2166 top: 2167 e.top + 2168 (parseInt(this.offsetParent.css('borderTopWidth'), 10) || 0), 2169 left: 2170 e.left + 2171 (parseInt(this.offsetParent.css('borderLeftWidth'), 10) || 0) 2172 } 2173 ) 2174 }, 2175 _getRelativeOffset() { 2176 if (this.cssPosition !== 'relative') return { top: 0, left: 0 } 2177 let t = this.element.position(), 2178 e = this._isRootNode(this.scrollParent[0]) 2179 return { 2180 top: 2181 t.top - 2182 (parseInt(this.helper.css('top'), 10) || 0) + 2183 (e ? 0 : this.scrollParent.scrollTop()), 2184 left: 2185 t.left - 2186 (parseInt(this.helper.css('left'), 10) || 0) + 2187 (e ? 0 : this.scrollParent.scrollLeft()) 2188 } 2189 }, 2190 _cacheMargins() { 2191 this.margins = { 2192 left: parseInt(this.element.css('marginLeft'), 10) || 0, 2193 top: parseInt(this.element.css('marginTop'), 10) || 0, 2194 right: parseInt(this.element.css('marginRight'), 10) || 0, 2195 bottom: parseInt(this.element.css('marginBottom'), 10) || 0 2196 } 2197 }, 2198 _cacheHelperProportions() { 2199 this.helperProportions = { 2200 width: this.helper.outerWidth(), 2201 height: this.helper.outerHeight() 2202 } 2203 }, 2204 _setContainment() { 2205 let e, 2206 i, 2207 s, 2208 n = this.options, 2209 o = this.document[0] 2210 return ( 2211 (this.relativeContainer = null), 2212 n.containment 2213 ? n.containment === 'window' 2214 ? ((this.containment = [ 2215 t(window).scrollLeft() - 2216 this.offset.relative.left - 2217 this.offset.parent.left, 2218 t(window).scrollTop() - 2219 this.offset.relative.top - 2220 this.offset.parent.top, 2221 t(window).scrollLeft() + 2222 t(window).width() - 2223 this.helperProportions.width - 2224 this.margins.left, 2225 t(window).scrollTop() + 2226 (t(window).height() || o.body.parentNode.scrollHeight) - 2227 this.helperProportions.height - 2228 this.margins.top 2229 ]), 2230 void 0) 2231 : n.containment === 'document' 2232 ? ((this.containment = [ 2233 0, 2234 0, 2235 t(o).width() - 2236 this.helperProportions.width - 2237 this.margins.left, 2238 (t(o).height() || o.body.parentNode.scrollHeight) - 2239 this.helperProportions.height - 2240 this.margins.top 2241 ]), 2242 void 0) 2243 : n.containment.constructor === Array 2244 ? ((this.containment = n.containment), void 0) 2245 : (n.containment === 'parent' && 2246 (n.containment = this.helper[0].parentNode), 2247 (i = t(n.containment)), 2248 (s = i[0]), 2249 s && 2250 ((e = /(scroll|auto)/.test(i.css('overflow'))), 2251 (this.containment = [ 2252 (parseInt(i.css('borderLeftWidth'), 10) || 0) + 2253 (parseInt(i.css('paddingLeft'), 10) || 0), 2254 (parseInt(i.css('borderTopWidth'), 10) || 0) + 2255 (parseInt(i.css('paddingTop'), 10) || 0), 2256 (e 2257 ? Math.max(s.scrollWidth, s.offsetWidth) 2258 : s.offsetWidth) - 2259 (parseInt(i.css('borderRightWidth'), 10) || 0) - 2260 (parseInt(i.css('paddingRight'), 10) || 0) - 2261 this.helperProportions.width - 2262 this.margins.left - 2263 this.margins.right, 2264 (e 2265 ? Math.max(s.scrollHeight, s.offsetHeight) 2266 : s.offsetHeight) - 2267 (parseInt(i.css('borderBottomWidth'), 10) || 0) - 2268 (parseInt(i.css('paddingBottom'), 10) || 0) - 2269 this.helperProportions.height - 2270 this.margins.top - 2271 this.margins.bottom 2272 ]), 2273 (this.relativeContainer = i)), 2274 void 0) 2275 : ((this.containment = null), void 0) 2276 ) 2277 }, 2278 _convertPositionTo(t, e) { 2279 e || (e = this.position) 2280 let i = t === 'absolute' ? 1 : -1,
2281 s = this._isRootNode(this.scrollParent[0]) 2282 return { 2283 top: 2284 e.top + 2285 this.offset.relative.top * i + 2286 this.offset.parent.top * i - 2287 (this.cssPosition === 'fixed' 2288 ? -this.offset.scroll.top 2289 : s 2290 ? 0 2291 : this.offset.scroll.top) * 2292 i, 2293 left: 2294 e.left + 2295 this.offset.relative.left * i + 2296 this.offset.parent.left * i - 2297 (this.cssPosition === 'fixed' 2298 ? -this.offset.scroll.left 2299 : s 2300 ? 0 2301 : this.offset.scroll.left) * 2302 i 2303 } 2304 }, 2305 _generatePosition(t, e) { 2306 let i, 2307 s, 2308 n, 2309 o, 2310 a = this.options, 2311 r = this._isRootNode(this.scrollParent[0]), 2312 l = t.pageX, 2313 h = t.pageY 2314 return ( 2315 (r && this.offset.scroll) || 2316 (this.offset.scroll = { 2317 top: this.scrollParent.scrollTop(), 2318 left: this.scrollParent.scrollLeft() 2319 }), 2320 e && 2321 (this.containment && 2322 (this.relativeContainer 2323 ? ((s = this.relativeContainer.offset()), 2324 (i = [ 2325 this.containment[0] + s.left, 2326 this.containment[1] + s.top, 2327 this.containment[2] + s.left, 2328 this.containment[3] + s.top 2329 ])) 2330 : (i = this.containment), 2331 t.pageX - this.offset.click.left < i[0] && 2332 (l = i[0] + this.offset.click.left), 2333 t.pageY - this.offset.click.top < i[1] && 2334 (h = i[1] + this.offset.click.top), 2335 t.pageX - this.offset.click.left > i[2] && 2336 (l = i[2] + this.offset.click.left), 2337 t.pageY - this.offset.click.top > i[3] && 2338 (h = i[3] + this.offset.click.top)), 2339 a.grid && 2340 ((n = a.grid[1] 2341 ? this.originalPageY + 2342 Math.round((h - this.originalPageY) / a.grid[1]) * a.grid[1] 2343 : this.originalPageY), 2344 (h = i 2345 ? n - this.offset.click.top >= i[1] || 2346 n - this.offset.click.top > i[3] 2347 ? n 2348 : n - this.offset.click.top >= i[1] 2349 ? n - a.grid[1] 2350 : n + a.grid[1] 2351 : n), 2352 (o = a.grid[0] 2353 ? this.originalPageX + 2354 Math.round((l - this.originalPageX) / a.grid[0]) * a.grid[0] 2355 : this.originalPageX), 2356 (l = i 2357 ? o - this.offset.click.left >= i[0] || 2358 o - this.offset.click.left > i[2] 2359 ? o 2360 : o - this.offset.click.left >= i[0] 2361 ? o - a.grid[0] 2362 : o + a.grid[0] 2363 : o)), 2364 a.axis === 'y' && (l = this.originalPageX), 2365 a.axis === 'x' && (h = this.originalPageY)), 2366 { 2367 top: 2368 h - 2369 this.offset.click.top - 2370 this.offset.relative.top - 2371 this.offset.parent.top + 2372 (this.cssPosition === 'fixed' 2373 ? -this.offset.scroll.top 2374 : r 2375 ? 0 2376 : this.offset.scroll.top), 2377 left: 2378 l - 2379 this.offset.click.left - 2380 this.offset.relative.left - 2381 this.offset.parent.left + 2382 (this.cssPosition === 'fixed' 2383 ? -this.offset.scroll.left 2384 : r 2385 ? 0 2386 : this.offset.scroll.left) 2387 } 2388 ) 2389 }, 2390 _clear() { 2391 this._removeClass(this.helper, 'ui-draggable-dragging'), 2392 this.helper[0] === this.element[0] || 2393 this.cancelHelperRemoval || 2394 this.helper.remove(), 2395 (this.helper = null), 2396 (this.cancelHelperRemoval = !1), 2397 this.destroyOnClear && this.destroy() 2398 }, 2399 _trigger(e, i, s) { 2400 return ( 2401 (s = s || this._uiHash()), 2402 t.ui.plugin.call(this, e, [i, s, this], !0),
2403 /^(drag|start|stop)/.test(e) && 2404 ((this.positionAbs = this._convertPositionTo('absolute')), 2405 (s.offset = this.positionAbs)), 2406 t.Widget.prototype._trigger.call(this, e, i, s) 2407 ) 2408 }, 2409 plugins: {}, 2410 _uiHash() { 2411 return { 2412 helper: this.helper, 2413 position: this.position, 2414 originalPosition: this.originalPosition, 2415 offset: this.positionAbs 2416 } 2417 } 2418 }), 2419 t.ui.plugin.add('draggable', 'connectToSortable', { 2420 start(e, i, s) { 2421 const n = t.extend({}, i, { item: s.element }) 2422 ;(s.sortables = []), 2423 t(s.options.connectToSortable).each(function() { 2424 const i = t(this).sortable('instance') 2425 i && 2426 !i.options.disabled && 2427 (s.sortables.push(i), 2428 i.refreshPositions(), 2429 i._trigger('activate', e, n)) 2430 }) 2431 }, 2432 stop(e, i, s) { 2433 const n = t.extend({}, i, { item: s.element }) 2434 ;(s.cancelHelperRemoval = !1), 2435 t.each(s.sortables, function() { 2436 const t = this 2437 t.isOver 2438 ? ((t.isOver = 0), 2439 (s.cancelHelperRemoval = !0), 2440 (t.cancelHelperRemoval = !1), 2441 (t._storedCSS = { 2442 position: t.placeholder.css('position'), 2443 top: t.placeholder.css('top'), 2444 left: t.placeholder.css('left') 2445 }), 2446 t._mouseStop(e), 2447 (t.options.helper = t.options._helper)) 2448 : ((t.cancelHelperRemoval = !0), t._trigger('deactivate', e, n)) 2449 }) 2450 }, 2451 drag(e, i, s) { 2452 t.each(s.sortables, function() { 2453 let n = !1, 2454 o = this 2455 ;(o.positionAbs = s.positionAbs), 2456 (o.helperProportions = s.helperProportions), 2457 (o.offset.click = s.offset.click), 2458 o._intersectsWith(o.containerCache) && 2459 ((n = !0), 2460 t.each(s.sortables, function() { 2461 return ( 2462 (this.positionAbs = s.positionAbs), 2463 (this.helperProportions = s.helperProportions), 2464 (this.offset.click = s.offset.click), 2465 this !== o && 2466 this._intersectsWith(this.containerCache) && 2467 t.contains(o.element[0], this.element[0]) && 2468 (n = !1), 2469 n 2470 ) 2471 })), 2472 n 2473 ? (o.isOver || 2474 ((o.isOver = 1), 2475 (s._parent = i.helper.parent()), 2476 (o.currentItem = i.helper 2477 .appendTo(o.element) 2478 .data('ui-sortable-item', !0)), 2479 (o.options._helper = o.options.helper), 2480 (o.options.helper = function() { 2481 return i.helper[0] 2482 }), 2483 (e.target = o.currentItem[0]), 2484 o._mouseCapture(e, !0), 2485 o._mouseStart(e, !0, !0), 2486 (o.offset.click.top = s.offset.click.top), 2487 (o.offset.click.left = s.offset.click.left), 2488 (o.offset.parent.left -= 2489 s.offset.parent.left - o.offset.parent.left), 2490 (o.offset.parent.top -= 2491 s.offset.parent.top - o.offset.parent.top), 2492 s._trigger('toSortable', e), 2493 (s.dropped = o.element), 2494 t.each(s.sortables, function() { 2495 this.refreshPositions() 2496 }), 2497 (s.currentItem = s.element), 2498 (o.fromOutside = s)), 2499 o.currentItem && (o._mouseDrag(e), (i.position = o.position))) 2500 : o.isOver && 2501 ((o.isOver = 0), 2502 (o.cancelHelperRemoval = !0), 2503 (o.options._revert = o.options.revert), 2504 (o.options.revert = !1), 2505 o._trigger('out', e, o._uiHash(o)), 2506 o._mouseStop(e, !0), 2507 (o.options.revert = o.options._revert), 2508 (o.options.helper = o.options._helper), 2509 o.placeholder && o.placeholder.remove(), 2510 i.helper.appendTo(s._parent), 2511 s._refreshOffsets(e), 2512 (i.position = s._generatePosition(e, !0)), 2513 s._trigger('fromSortable', e), 2514 (s.dropped = !1), 2515 t.each(s.sortables, function() { 2516 this.refreshPositions() 2517 })) 2518 }) 2519 } 2520 }), 2521 t.ui.plugin.add('draggable', 'cursor', { 2522 start(e, i, s) { 2523 let n = t('body'), 2524 o = s.options 2525 n.css('cursor') && (o._cursor = n.css('cursor')), 2526 n.css('cursor', o.cursor) 2527 }, 2528 stop(e, i, s) { 2529 const n = s.options 2530 n._cursor && t('body').css('cursor', n._cursor) 2531 } 2532 }), 2533 t.ui.plugin.add('draggable', 'opacity', { 2534 start(e, i, s) { 2535 let n = t(i.helper), 2536 o = s.options
2537 n.css('opacity') && (o._opacity = n.css('opacity')), 2538 n.css('opacity', o.opacity) 2539 }, 2540 stop(e, i, s) { 2541 const n = s.options 2542 n._opacity && t(i.helper).css('opacity', n._opacity) 2543 } 2544 }), 2545 t.ui.plugin.add('draggable', 'scroll', { 2546 start(t, e, i) { 2547 i.scrollParentNotHidden || 2548 (i.scrollParentNotHidden = i.helper.scrollParent(!1)), 2549 i.scrollParentNotHidden[0] !== i.document[0] && 2550 i.scrollParentNotHidden[0].tagName !== 'HTML' && 2551 (i.overflowOffset = i.scrollParentNotHidden.offset()) 2552 }, 2553 drag(e, i, s) { 2554 let n = s.options, 2555 o = !1, 2556 a = s.scrollParentNotHidden[0], 2557 r = s.document[0] 2558 a !== r && a.tagName !== 'HTML' 2559 ? ((n.axis && n.axis === 'x') || 2560 (s.overflowOffset.top + a.offsetHeight - e.pageY < 2561 n.scrollSensitivity 2562 ? (a.scrollTop = o = a.scrollTop + n.scrollSpeed) 2563 : e.pageY - s.overflowOffset.top < n.scrollSensitivity && 2564 (a.scrollTop = o = a.scrollTop - n.scrollSpeed)), 2565 (n.axis && n.axis === 'y') || 2566 (s.overflowOffset.left + a.offsetWidth - e.pageX < 2567 n.scrollSensitivity 2568 ? (a.scrollLeft = o = a.scrollLeft + n.scrollSpeed) 2569 : e.pageX - s.overflowOffset.left < n.scrollSensitivity && 2570 (a.scrollLeft = o = a.scrollLeft - n.scrollSpeed))) 2571 : ((n.axis && n.axis === 'x') || 2572 (e.pageY - t(r).scrollTop() < n.scrollSensitivity 2573 ? (o = t(r).scrollTop(t(r).scrollTop() - n.scrollSpeed)) 2574 : t(window).height() - (e.pageY - t(r).scrollTop()) < 2575 n.scrollSensitivity && 2576 (o = t(r).scrollTop(t(r).scrollTop() + n.scrollSpeed))), 2577 (n.axis && n.axis === 'y') || 2578 (e.pageX - t(r).scrollLeft() < n.scrollSensitivity 2579 ? (o = t(r).scrollLeft(t(r).scrollLeft() - n.scrollSpeed)) 2580 : t(window).width() - (e.pageX - t(r).scrollLeft()) < 2581 n.scrollSensitivity && 2582 (o = t(r).scrollLeft(t(r).scrollLeft() + n.scrollSpeed)))), 2583 o !== !1 && 2584 t.ui.ddmanager && 2585 !n.dropBehaviour && 2586 t.ui.ddmanager.prepareOffsets(s, e) 2587 } 2588 }), 2589 t.ui.plugin.add('draggable', 'snap', { 2590 start(e, i, s) { 2591 const n = s.options 2592 ;(s.snapElements = []), 2593 t( 2594 n.snap.constructor !== String 2595 ? n.snap.items || ':data(ui-draggable)' 2596 : n.snap 2597 ).each(function() { 2598 let e = t(this), 2599 i = e.offset() 2600 this !== s.element[0] && 2601 s.snapElements.push({ 2602 item: this, 2603 width: e.outerWidth(), 2604 height: e.outerHeight(), 2605 top: i.top, 2606 left: i.left 2607 }) 2608 }) 2609 }, 2610 drag(e, i, s) { 2611 let n, 2612 o, 2613 a, 2614 r, 2615 l, 2616 h, 2617 c, 2618 u, 2619 d, 2620 p, 2621 f = s.options, 2622 g = f.snapTolerance, 2623 m = i.offset.left, 2624 _ = m + s.helperProportions.width, 2625 v = i.offset.top, 2626 b = v + s.helperProportions.height 2627 for (d = s.snapElements.length - 1; d >= 0; d--) { 2628 ;(l = s.snapElements[d].left - s.margins.left), 2629 (h = l + s.snapElements[d].width), 2630 (c = s.snapElements[d].top - s.margins.top), 2631 (u = c + s.snapElements[d].height), 2632 l - g > _ || 2633 m > h + g || 2634 c - g > b || 2635 v > u + g || 2636 !t.contains( 2637 s.snapElements[d].item.ownerDocument, 2638 s.snapElements[d].item 2639 ) 2640 ? (s.snapElements[d].snapping && 2641 s.options.snap.release && 2642 s.options.snap.release.call( 2643 s.element, 2644 e, 2645 t.extend(s._uiHash(), { snapItem: s.snapElements[d].item }) 2646 ), 2647 (s.snapElements[d].snapping = !1))
2648 : (f.snapMode !== 'inner' && 2649 ((n = g >= Math.abs(c - b)), 2650 (o = g >= Math.abs(u - v)), 2651 (a = g >= Math.abs(l - _)), 2652 (r = g >= Math.abs(h - m)), 2653 n && 2654 (i.position.top = s._convertPositionTo('relative', { 2655 top: c - s.helperProportions.height, 2656 left: 0 2657 }).top), 2658 o && 2659 (i.position.top = s._convertPositionTo('relative', { 2660 top: u, 2661 left: 0 2662 }).top), 2663 a && 2664 (i.position.left = s._convertPositionTo('relative', { 2665 top: 0, 2666 left: l - s.helperProportions.width 2667 }).left), 2668 r && 2669 (i.position.left = s._convertPositionTo('relative', { 2670 top: 0, 2671 left: h 2672 }).left)), 2673 (p = n || o || a || r), 2674 f.snapMode !== 'outer' && 2675 ((n = g >= Math.abs(c - v)), 2676 (o = g >= Math.abs(u - b)), 2677 (a = g >= Math.abs(l - m)), 2678 (r = g >= Math.abs(h - _)), 2679 n && 2680 (i.position.top = s._convertPositionTo('relative', { 2681 top: c, 2682 left: 0 2683 }).top), 2684 o && 2685 (i.position.top = s._convertPositionTo('relative', { 2686 top: u - s.helperProportions.height, 2687 left: 0 2688 }).top), 2689 a && 2690 (i.position.left = s._convertPositionTo('relative', { 2691 top: 0, 2692 left: l 2693 }).left), 2694 r && 2695 (i.position.left = s._convertPositionTo('relative', { 2696 top: 0, 2697 left: h - s.helperProportions.width 2698 }).left)), 2699 !s.snapElements[d].snapping && 2700 (n || o || a || r || p) && 2701 s.options.snap.snap && 2702 s.options.snap.snap.call( 2703 s.element, 2704 e, 2705 t.extend(s._uiHash(), { snapItem: s.snapElements[d].item }) 2706 ), 2707 (s.snapElements[d].snapping = n || o || a || r || p)) 2708 } 2709 } 2710 }), 2711 t.ui.plugin.add('draggable', 'stack', { 2712 start(e, i, s) { 2713 let n, 2714 o = s.options, 2715 a = t.makeArray(t(o.stack)).sort(function(e, i) { 2716 return ( 2717 (parseInt(t(e).css('zIndex'), 10) || 0) - 2718 (parseInt(t(i).css('zIndex'), 10) || 0) 2719 ) 2720 }) 2721 a.length && 2722 ((n = parseInt(t(a[0]).css('zIndex'), 10) || 0), 2723 t(a).each(function(e) { 2724 t(this).css('zIndex', n + e) 2725 }), 2726 this.css('zIndex', n + a.length)) 2727 } 2728 }), 2729 t.ui.plugin.add('draggable', 'zIndex', { 2730 start(e, i, s) { 2731 let n = t(i.helper), 2732 o = s.options 2733 n.css('zIndex') && (o._zIndex = n.css('zIndex')), 2734 n.css('zIndex', o.zIndex) 2735 }, 2736 stop(e, i, s) { 2737 const n = s.options 2738 n._zIndex && t(i.helper).css('zIndex', n._zIndex) 2739 } 2740 }), 2741 t.ui.draggable, 2742 t.widget('ui.droppable', { 2743 version: '1.12.1', 2744 widgetEventPrefix: 'drop', 2745 options: { 2746 accept: '*', 2747 addClasses: !0, 2748 greedy: !1, 2749 scope: 'default', 2750 tolerance: 'intersect', 2751 activate: null, 2752 deactivate: null, 2753 drop: null, 2754 out: null, 2755 over: null 2756 }, 2757 _create() { 2758 let e, 2759 i = this.options, 2760 s = i.accept 2761 ;(this.isover = !1), 2762 (this.isout = !0), 2763 (this.accept = t.isFunction(s) 2764 ? s 2765 : function(t) { 2766 return t.is(s) 2767 }), 2768 (this.proportions = function() { 2769 return arguments.length 2770 ? ((e = arguments[0]), void 0) 2771 : e || 2772 (e = { 2773 width: this.element[0].offsetWidth, 2774 height: this.element[0].offsetHeight 2775 }) 2776 }), 2777 this._addToManager(i.scope), 2778 i.addClasses && this._addClass('ui-droppable') 2779 }, 2780 _addToManager(e) { 2781 ;(t.ui.ddmanager.droppables[e] = t.ui.ddmanager.droppables[e] || []), 2782 t.ui.ddmanager.droppables[e].push(this) 2783 }, 2784 _splice(t) { 2785 for (let e = 0; t.length > e; e++) t[e] === this && t.splice(e, 1) 2786 }, 2787 _destroy() { 2788 const e = t.ui.ddmanager.droppables[this.options.scope] 2789 this._splice(e) 2790 }, 2791 _setOption(e, i) { 2792 if (e === 'accept') { 2793 this.accept = t.isFunction(i) 2794 ? i 2795 : function(t) { 2796 return t.is(i) 2797 } 2798 } else if (e === 'scope') { 2799 const s = t.ui.ddmanager.droppables[this.options.scope] 2800 this._splice(s), this._addToManager(i) 2801 } 2802 this._super(e, i) 2803 }, 2804 _activate(e) { 2805 const i = t.ui.ddmanager.current 2806 this._addActiveClass(), i && this._trigger('activate', e, this.ui(i)) 2807 }, 2808 _deactivate(e) { 2809 const i = t.ui.ddmanager.current 2810 this._removeActiveClass(), 2811 i && this._trigger('deactivate', e, this.ui(i)) 2812 }, 2813 _over(e) { 2814 const i = t.ui.ddmanager.current 2815 i && 2816 (i.currentItem || i.element)[0] !== this.element[0] && 2817 this.accept.call(this.element[0], i.currentItem || i.element) && 2818 (this._addHoverClass(), this._trigger('over', e, this.ui(i))) 2819 }, 2820 _out(e) { 2821 const i = t.ui.ddmanager.current 2822 i && 2823 (i.currentItem || i.element)[0] !== this.element[0] && 2824 this.accept.call(this.element[0], i.currentItem || i.element) && 2825 (this._removeHoverClass(), this._trigger('out', e, this.ui(i))) 2826 }, 2827 _drop(e, i) { 2828 let s = i || t.ui.ddmanager.current, 2829 n = !1 2830 return s && (s.currentItem || s.element)[0] !== this.element[0] 2831 ? (this.element 2832 .find(':data(ui-droppable)') 2833 .not('.ui-draggable-dragging') 2834 .each(function() { 2835 const i = t(this).droppable('instance') 2836 return i.options.greedy && 2837 !i.options.disabled && 2838 i.options.scope === s.options.scope && 2839 i.accept.call(i.element[0], s.currentItem || s.element) && 2840 o( 2841 s, 2842 t.extend(i, { offset: i.element.offset() }), 2843 i.options.tolerance, 2844 e 2845 ) 2846 ? ((n = !0), !1) 2847 : void 0 2848 }), 2849 n 2850 ? !1 2851 : this.accept.call(this.element[0], s.currentItem || s.element) 2852 ? (this._removeActiveClass(), 2853 this._removeHoverClass(), 2854 this._trigger('drop', e, this.ui(s)), 2855 this.element) 2856 : !1) 2857 : !1 2858 }, 2859 ui(t) { 2860 return { 2861 draggable: t.currentItem || t.element, 2862 helper: t.helper, 2863 position: t.position, 2864 offset: t.positionAbs 2865 } 2866 }, 2867 _addHoverClass() { 2868 this._addClass('ui-droppable-hover') 2869 }, 2870 _removeHoverClass() { 2871 this._removeClass('ui-droppable-hover') 2872 }, 2873 _addActiveClass() { 2874 this._addClass('ui-droppable-active') 2875 }, 2876 _removeActiveClass() { 2877 this._removeClass('ui-droppable-active') 2878 } 2879 }) 2880 var o = (t.ui.intersect = (function() { 2881 function t(t, e, i) { 2882 return t >
2882= e && e + i > t 2883 } 2884 return function(e, i, s, n) { 2885 if (!i.offset) return !1 2886 let o = (e.positionAbs || e.position.absolute).left + e.margins.left, 2887 a = (e.positionAbs || e.position.absolute).top + e.margins.top, 2888 r = o + e.helperProportions.width, 2889 l = a + e.helperProportions.height, 2890 h = i.offset.left, 2891 c = i.offset.top, 2892 u = h + i.proportions().width, 2893 d = c + i.proportions().height 2894 switch (s) { 2895 case 'fit': 2896 return o >= h && u >= r && a >= c && d >= l 2897 case 'intersect': 2898 return ( 2899 o + e.helperProportions.width / 2 > h && 2900 u > r - e.helperProportions.width / 2 && 2901 a + e.helperProportions.height / 2 > c && 2902 d > l - e.helperProportions.height / 2 2903 ) 2904 case 'pointer': 2905 return ( 2906 t(n.pageY, c, i.proportions().height) && 2907 t(n.pageX, h, i.proportions().width) 2908 ) 2909 case 'touch': 2910 return ( 2911 ((a >= c && d >= a) || (l >= c && d >= l) || (c > a && l > d)) && 2912 ((o >= h && u >= o) || (r >= h && u >= r) || (h > o && r > u)) 2913 ) 2914 default: 2915 return !1 2916 } 2917 } 2918 })()) 2919 ;(t.ui.ddmanager = { 2920 current: null, 2921 droppables: { default: [] }, 2922 prepareOffsets(e, i) { 2923 let s, 2924 n, 2925 o = t.ui.ddmanager.droppables[e.options.scope] || [], 2926 a = i ? i.type : null, 2927 r = (e.currentItem || e.element).find(':data(ui-droppable)').addBack() 2928 t: for (s = 0; o.length > s; s++) { 2929 if ( 2930 !( 2931 o[s].options.disabled || 2932 (e && 2933 !o[s].accept.call(o[s].element[0], e.currentItem || e.element)) 2934 ) 2935 ) { 2936 for (n = 0; r.length > n; n++) { 2937 if (r[n] === o[s].element[0]) { 2938 o[s].proportions().height = 0 2939 continue t 2940 } 2941 } 2942 ;(o[s].visible = o[s].element.css('display') !== 'none'), 2943 o[s].visible && 2944 (a === 'mousedown' && o[s]._activate.call(o[s], i), 2945 (o[s].offset = o[s].element.offset()), 2946 o[s].proportions({ 2947 width: o[s].element[0].offsetWidth, 2948 height: o[s].element[0].offsetHeight 2949 })) 2950 } 2951 } 2952 }, 2953 drop(e, i) { 2954 let s = !1 2955 return ( 2956 t.each( 2957 (t.ui.ddmanager.droppables[e.options.scope] || []).slice(), 2958 function() { 2959 this.options && 2960 (!this.options.disabled && 2961 this.visible && 2962 o(e, this, this.options.tolerance, i) && 2963 (s = this._drop.call(this, i) || s), 2964 !this.options.disabled && 2965 this.visible && 2966 this.accept.call(this.element[0], e.currentItem || e.element) && 2967 ((this.isout = !0), 2968 (this.isover = !1), 2969 this._deactivate.call(this, i))) 2970 } 2971 ), 2972 s 2973 ) 2974 }, 2975 dragStart(e, i) { 2976 e.element.parentsUntil('body').on('scroll.droppable', function() { 2977 e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i) 2978 }) 2979 }, 2980 drag(e, i) { 2981 e.options.refreshPositions && t.ui.ddmanager.prepareOffsets(e, i), 2982 t.each(t.ui.ddmanager.droppables[e.options.scope] || [], function() { 2983 if (!this.options.disabled && !this.greedyChild && this.visible) { 2984 let s, 2985 n, 2986 a, 2987 r = o(e, this, this.options.tolerance, i), 2988 l = 2989 !r && this.isover 2990 ? 'isout' 2991 : r && !this.isover 2992 ? 'isover' 2993 : null 2994 l && 2995 (this.options.greedy && 2996 ((n = this.options.scope), 2997 (a = this.element 2998 .parents(':data(ui-droppable)') 2999 .filter(function() { 3000 return t(this).droppable('instance').options.scope === n 3001 })), 3002 a.length && 3003 ((s = t(a[0]).droppable('instance')),
3004 (s.greedyChild = l === 'isover'))), 3005 s && 3006 l === 'isover' && 3007 ((s.isover = !1), (s.isout = !0), s._out.call(s, i)), 3008 (this[l] = !0), 3009 (this[l === 'isout' ? 'isover' : 'isout'] = !1), 3010 this[l === 'isover' ? '_over' : '_out'].call(this, i), 3011 s && 3012 l === 'isout' && 3013 ((s.isout = !1), (s.isover = !0), s._over.call(s, i))) 3014 } 3015 }) 3016 }, 3017 dragStop(e, i) { 3018 e.element.parentsUntil('body').off('scroll.droppable'), 3019 e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i) 3020 } 3021 }), 3022 t.uiBackCompat !== !1 && 3023 t.widget('ui.droppable', t.ui.droppable, { 3024 options: { hoverClass: !1, activeClass: !1 }, 3025 _addActiveClass() { 3026 this._super(), 3027 this.options.activeClass && 3028 this.element.addClass(this.options.activeClass) 3029 }, 3030 _removeActiveClass() { 3031 this._super(), 3032 this.options.activeClass && 3033 this.element.removeClass(this.options.activeClass) 3034 }, 3035 _addHoverClass() { 3036 this._super(), 3037 this.options.hoverClass && 3038 this.element.addClass(this.options.hoverClass) 3039 }, 3040 _removeHoverClass() { 3041 this._super(), 3042 this.options.hoverClass && 3043 this.element.removeClass(this.options.hoverClass) 3044 } 3045 }), 3046 t.ui.droppable, 3047 t.widget('ui.resizable', t.ui.mouse, { 3048 version: '1.12.1', 3049 widgetEventPrefix: 'resize', 3050 options: { 3051 alsoResize: !1, 3052 animate: !1, 3053 animateDuration: 'slow', 3054 animateEasing: 'swing', 3055 aspectRatio: !1, 3056 autoHide: !1, 3057 classes: { 'ui-resizable-se': 'ui-icon ui-icon-gripsmall-diagonal-se' }, 3058 containment: !1, 3059 ghost: !1, 3060 grid: !1, 3061 handles: 'e,s,se', 3062 helper: !1, 3063 maxHeight: null, 3064 maxWidth: null, 3065 minHeight: 10, 3066 minWidth: 10, 3067 zIndex: 90, 3068 resize: null, 3069 start: null, 3070 stop: null 3071 }, 3072 _num(t) { 3073 return parseFloat(t) || 0 3074 }, 3075 _isNumber(t) { 3076 return !isNaN(parseFloat(t)) 3077 }, 3078 _hasScroll(e, i) { 3079 if (t(e).css('overflow') === 'hidden') return !1 3080 let s = i && i === 'left' ? 'scrollLeft' : 'scrollTop', 3081 n = !1 3082 return e[s] > 0 ? !0 : ((e[s] = 1), (n = e[s] > 0), (e[s] = 0), n) 3083 }, 3084 _create() { 3085 let e, 3086 i = this.options, 3087 s = this 3088 this._addClass('ui-resizable'), 3089 t.extend(this, { 3090 _aspectRatio: !!i.aspectRatio, 3091 aspectRatio: i.aspectRatio, 3092 originalElement: this.element, 3093 _proportionallyResizeElements: [], 3094 _helper: 3095 i.helper || i.ghost || i.animate 3096 ? i.helper || 'ui-resizable-helper' 3097 : null 3098 }), 3099 this.element[0].nodeName.match( 3100 /^(canvas|textarea|input|select|button|img)$/i 3101 ) && 3102 (this.element.wrap( 3103 t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css( 3104 { 3105 position: this.element.css('position'), 3106 width: this.element.outerWidth(), 3107 height: this.element.outerHeight(), 3108 top: this.element.css('top'), 3109 left: this.element.css('left') 3110 } 3111 ) 3112 ), 3113 (this.element = this.element 3114 .parent() 3115 .data('ui-resizable', this.element.resizable('instance'))), 3116 (this.elementIsWrapper = !0), 3117 (e = { 3118 marginTop: this.originalElement.css('marginTop'), 3119 marginRight: this.originalElement.css('marginRight'), 3120 marginBottom: this.originalElement.css('marginBottom'), 3121 marginLeft: this.originalElement.css('marginLeft') 3122 }), 3123 this.element.css(e), 3124 this.originalElement.css('margin', 0), 3125 (this.originalResizeStyle = this.originalElement.css('resize')), 3126 this.originalElement.css('resize', 'none'), 3127 this._proportionallyResizeElements.push( 3128 this.originalElement.css({ 3129 position: 'static', 3130 zoom: 1, 3131 display: 'block' 3132 }) 3133 ), 3134 this.originalElement.css(e), 3135 this._proportionallyResize()), 3136 this._setupHandles(), 3137 i.autoHide && 3138 t(this.element) 3139 .on('mouseenter', function() { 3140 i.disabled || 3141 (s._removeClass('ui-resizable-autohide'), s._handles.show()) 3142 }) 3143 .on('mouseleave', function() { 3144 i.disabled || 3145 s.resizing || 3146 (s._addClass('ui-resizable-autohide'), s._handles.hide()) 3147 }), 3148 this._mouseInit() 3149 }, 3150 _destroy() { 3151 this._mouseDestroy() 3152 let e, 3153 i = function(e) { 3154 t(e) 3155 .removeData('resizable') 3156 .removeData('ui-resizable') 3157 .off('.resizable') 3158 .find('.ui-resizable-handle') 3159 .remove() 3160 } 3161 return ( 3162 this.elementIsWrapper && 3163 (i(this.element), 3164 (e = this.element), 3165 this.originalElement 3166 .css({ 3167 position: e.css('position'), 3168 width: e.outerWidth(), 3169 height: e.outerHeight(), 3170 top: e.css('top'), 3171 left: e.css('left') 3172 }) 3173 .insertAfter(e), 3174 e.remove()), 3175 this.originalElement.css('resize', this.originalResizeStyle), 3176 i(this.originalElement), 3177 this 3178 ) 3179 }, 3180 _setOption(t, e) { 3181 switch ((this._super(t, e), t)) { 3182 case 'handles': 3183 this._removeHandles(), this._setupHandles() 3184 break 3185 default: 3186 } 3187 }, 3188 _setupHandles() { 3189 let e, 3190 i, 3191 s, 3192 n, 3193 o, 3194 a = this.options, 3195 r = this 3196 if ( 3197 ((this.handles = 3198 a.handles || 3199 (t('.ui-resizable-handle', this.element).length 3200 ? { 3201 n: '.ui-resizable-n', 3202 e: '.ui-resizable-e', 3203 s: '.ui-resizable-s', 3204 w: '.ui-resizable-w', 3205 se: '.ui-resizable-se', 3206 sw: '.ui-resizable-sw', 3207 ne: '.ui-resizable-ne', 3208 nw: '.ui-resizable-nw' 3209 } 3210 : 'e,s,se')),
3211 (this._handles = t()), 3212 this.handles.constructor === String) 3213 ) { 3214 for ( 3215 this.handles === 'all' && (this.handles = 'n,e,s,w,se,sw,ne,nw'), 3216 s = this.handles.split(','), 3217 this.handles = {}, 3218 i = 0; 3219 s.length > i; 3220 i++ 3221 ) { 3222 ;(e = t.trim(s[i])), 3223 (n = `ui-resizable-${e}`), 3224 (o = t('<div>')), 3225 this._addClass(o, `ui-resizable-handle ${n}`), 3226 o.css({ zIndex: a.zIndex }), 3227 (this.handles[e] = `.ui-resizable-${e}`), 3228 this.element.append(o) 3229 } 3230 } 3231 ;(this._renderAxis = function(e) { 3232 let i, s, n, o 3233 e = e || this.element 3234 for (i in this.handles) { 3235 this.handles[i].constructor === String 3236 ? (this.handles[i] = this.element 3237 .children(this.handles[i]) 3238 .first() 3239 .show()) 3240 : (this.handles[i].jquery || this.handles[i].nodeType) && 3241 ((this.handles[i] = t(this.handles[i])), 3242 this._on(this.handles[i], { mousedown: r._mouseDown })), 3243 this.elementIsWrapper && 3244 this.originalElement[0].nodeName.match( 3245 /^(textarea|input|select|button)$/i 3246 ) && 3247 ((s = t(this.handles[i], this.element)), 3248 (o = /sw|ne|nw|se|n|s/.test(i) 3249 ? s.outerHeight() 3250 : s.outerWidth()), 3251 (n = [ 3252 'padding', 3253 /ne|nw|n/.test(i) 3254 ? 'Top' 3255 : /se|sw|s/.test(i) 3256 ? 'Bottom' 3257 : /^e$/.test(i) 3258 ? 'Right' 3259 : 'Left' 3260 ].join('')), 3261 e.css(n, o), 3262 this._proportionallyResize()), 3263 (this._handles = this._handles.add(this.handles[i])) 3264 } 3265 }), 3266 this._renderAxis(this.element), 3267 (this._handles = this._handles.add( 3268 this.element.find('.ui-resizable-handle') 3269 )), 3270 this._handles.disableSelection(), 3271 this._handles.on('mouseover', function() { 3272 r.resizing || 3273 (this.className && 3274 (o = this.className.match( 3275 /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i 3276 )),
3277 (r.axis = o && o[1] ? o[1] : 'se')) 3278 }), 3279 a.autoHide && 3280 (this._handles.hide(), this._addClass('ui-resizable-autohide')) 3281 }, 3282 _removeHandles() { 3283 this._handles.remove() 3284 }, 3285 _mouseCapture(e) { 3286 let i, 3287 s, 3288 n = !1 3289 for (i in this.handles) { 3290 ;(s = t(this.handles[i])[0]), 3291 (s === e.target || t.contains(s, e.target)) && (n = !0) 3292 } 3293 return !this.options.disabled && n 3294 }, 3295 _mouseStart(e) { 3296 let i, 3297 s, 3298 n, 3299 o = this.options, 3300 a = this.element 3301 return ( 3302 (this.resizing = !0), 3303 this._renderProxy(), 3304 (i = this._num(this.helper.css('left'))), 3305 (s = this._num(this.helper.css('top'))), 3306 o.containment && 3307 ((i += t(o.containment).scrollLeft() || 0), 3308 (s += t(o.containment).scrollTop() || 0)), 3309 (this.offset = this.helper.offset()), 3310 (this.position = { left: i, top: s }), 3311 (this.size = this._helper 3312 ? { width: this.helper.width(), height: this.helper.height() } 3313 : { width: a.width(), height: a.height() }), 3314 (this.originalSize = this._helper 3315 ? { width: a.outerWidth(), height: a.outerHeight() } 3316 : { width: a.width(), height: a.height() }), 3317 (this.sizeDiff = { 3318 width: a.outerWidth() - a.width(), 3319 height: a.outerHeight() - a.height() 3320 }), 3321 (this.originalPosition = { left: i, top: s }), 3322 (this.originalMousePosition = { left: e.pageX, top: e.pageY }), 3323 (this.aspectRatio = 3324 typeof o.aspectRatio === 'number' 3325 ? o.aspectRatio 3326 : this.originalSize.width / this.originalSize.height || 1), 3327 (n = t(`.ui-resizable-${this.axis}`).css('cursor')), 3328 t('body').css('cursor', n === 'auto' ? `${this.axis}-resize` : n), 3329 this._addClass('ui-resizable-resizing'), 3330 this._propagate('start', e), 3331 !0 3332 ) 3333 }, 3334 _mouseDrag(e) { 3335 let i, 3336 s, 3337 n = this.originalMousePosition, 3338 o = this.axis, 3339 a = e.pageX - n.left || 0, 3340 r = e.pageY - n.top || 0, 3341 l = this._change[o] 3342 return ( 3343 this._updatePrevProperties(), 3344 l 3345 ? ((i = l.apply(this, [e, a, r])), 3346 this._updateVirtualBoundaries(e.shiftKey), 3347 (this._aspectRatio || e.shiftKey) && 3348 (i = this._updateRatio(i, e)), 3349 (i = this._respectSize(i, e)), 3350 this._updateCache(i), 3351 this._propagate('resize', e), 3352 (s = this._applyChanges()), 3353 !this._helper && 3354 this._proportionallyResizeElements.length && 3355 this._proportionallyResize(), 3356 t.isEmptyObject(s) || 3357 (this._updatePrevProperties(), 3358 this._trigger('resize', e, this.ui()), 3359 this._applyChanges()), 3360 !1) 3361 : !1 3362 ) 3363 }, 3364 _mouseStop(e) { 3365 this.resizing = !1 3366 let i, 3367 s, 3368 n, 3369 o, 3370 a, 3371 r, 3372 l, 3373 h = this.options, 3374 c = this 3375 return ( 3376 this._helper && 3377 ((i = this._proportionallyResizeElements), 3378 (s = i.length && /textarea/i.test(i[0].nodeName)), 3379 (n = s && this._hasScroll(i[0], 'left') ? 0 : c.sizeDiff.height), 3380 (o = s ? 0 : c.sizeDiff.width), 3381 (a = { 3382 width: c.helper.width() - o, 3383 height: c.helper.height() - n 3384 }), 3385 (r = 3386 parseFloat(c.element.css('left')) + 3387 (c.position.left - c.originalPosition.left) || null), 3388 (l = 3389 parseFloat(c.element.css('top')) + 3390 (c.position.top - c.originalPosition.top) || null), 3391 h.animate || this.element.css(t.extend(a, { top: l, left: r })), 3392 c.helper.height(c.size.height), 3393 c.helper.width(c.size.width), 3394 this._helper && !h.animate && this._proportionallyResize()), 3395 t('body').css('cursor', 'auto'),
3396 this._removeClass('ui-resizable-resizing'), 3397 this._propagate('stop', e), 3398 this._helper && this.helper.remove(), 3399 !1 3400 ) 3401 }, 3402 _updatePrevProperties() { 3403 ;(this.prevPosition = { 3404 top: this.position.top, 3405 left: this.position.left 3406 }), 3407 (this.prevSize = { width: this.size.width, height: this.size.height }) 3408 }, 3409 _applyChanges() { 3410 const t = {} 3411 return ( 3412 this.position.top !== this.prevPosition.top && 3413 (t.top = `${this.position.top}px`), 3414 this.position.left !== this.prevPosition.left && 3415 (t.left = `${this.position.left}px`), 3416 this.size.width !== this.prevSize.width && 3417 (t.width = `${this.size.width}px`), 3418 this.size.height !== this.prevSize.height && 3419 (t.height = `${this.size.height}px`), 3420 this.helper.css(t), 3421 t 3422 ) 3423 }, 3424 _updateVirtualBoundaries(t) { 3425 let e, 3426 i, 3427 s, 3428 n, 3429 o, 3430 a = this.options 3431 ;(o = { 3432 minWidth: this._isNumber(a.minWidth) ? a.minWidth : 0, 3433 maxWidth: this._isNumber(a.maxWidth) ? a.maxWidth : 1 / 0, 3434 minHeight: this._isNumber(a.minHeight) ? a.minHeight : 0, 3435 maxHeight: this._isNumber(a.maxHeight) ? a.maxHeight : 1 / 0 3436 }), 3437 (this._aspectRatio || t) && 3438 ((e = o.minHeight * this.aspectRatio), 3439 (s = o.minWidth / this.aspectRatio), 3440 (i = o.maxHeight * this.aspectRatio), 3441 (n = o.maxWidth / this.aspectRatio), 3442 e > o.minWidth && (o.minWidth = e), 3443 s > o.minHeight && (o.minHeight = s), 3444 o.maxWidth > i && (o.maxWidth = i), 3445 o.maxHeight > n && (o.maxHeight = n)), 3446 (this._vBoundaries = o) 3447 }, 3448 _updateCache(t) { 3449 ;(this.offset = this.helper.offset()), 3450 this._isNumber(t.left) && (this.position.left = t.left), 3451 this._isNumber(t.top) && (this.position.top = t.top), 3452 this._isNumber(t.height) && (this.size.height = t.height), 3453 this._isNumber(t.width) && (this.size.width = t.width) 3454 }, 3455 _updateRatio(t) { 3456 let e = this.position, 3457 i = this.size, 3458 s = this.axis 3459 return ( 3460 this._isNumber(t.height) 3461 ? (t.width = t.height * this.aspectRatio) 3462 : this._isNumber(t.width) && 3463 (t.height = t.width / this.aspectRatio), 3464 s === 'sw' && 3465 ((t.left = e.left + (i.width - t.width)), (t.top = null)), 3466 s === 'nw' && 3467 ((t.top = e.top + (i.height - t.height)), 3468 (t.left = e.left + (i.width - t.width))), 3469 t 3470 ) 3471 }, 3472 _respectSize(t) { 3473 let e = this._vBoundaries, 3474 i = this.axis, 3475 s = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width, 3476 n = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height, 3477 o = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width, 3478 a = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height, 3479 r = this.originalPosition.left + this.originalSize.width, 3480 l = this.originalPosition.top + this.originalSize.height, 3481 h = /sw|nw|w/.test(i), 3482 c = /nw|ne|n/.test(i) 3483 return ( 3484 o && (t.width = e.minWidth), 3485 a && (t.height = e.minHeight), 3486 s && (t.width = e.maxWidth), 3487 n && (t.height = e.maxHeight), 3488 o && h && (t.left = r - e.minWidth), 3489 s && h && (t.left = r - e.maxWidth), 3490 a && c && (t.top = l - e.minHeight), 3491 n && c && (t.top = l - e.maxHeight), 3492 t.width || t.height || t.left || !t.top 3493 ? t.width || t.height || t.top || !t.left || (t.left = null) 3494 : (t.top = null), 3495 t 3496 ) 3497 }, 3498 _getPaddingPlusBorderDimensions(t) { 3499 for ( 3500 var e = 0, 3501 i = [], 3502 s = [ 3503 t.css('borderTopWidth'), 3504 t.css('borderRightWidth'), 3505 t.css('borderBottomWidth'), 3506 t.css('borderLeftWidth') 3507 ], 3508 n = [ 3509 t.css('paddingTop'), 3510 t.css('paddingRight'), 3511 t.css('paddingBottom'), 3512 t.css('paddingLeft') 3513 ]; 3514 e < 4; 3515 e++ 3516 ) { 3517 ;(i[e] = parseFloat(s[e]) || 0), (i[e] += parseFloat(n[e]) || 0) 3518 } 3519 return { height: i[0] + i[2], width: i[1] + i[3] } 3520 }, 3521 _proportionallyResize() { 3522 if (this._proportionallyResizeElements.length) { 3523 for ( 3524 var t, e = 0, i = this.helper || this.element; 3525 this._proportionallyResizeElements.length > e; 3526 e++ 3527 ) { 3528 ;(t = this._proportionallyResizeElements[e]), 3529 this.outerDimensions || 3530 (this.outerDimensions = this._getPaddingPlusBorderDimensions( 3531 t 3532 )), 3533 t.css({ 3534 height: i.height() - this.outerDimensions.height || 0, 3535 width: i.width() - this.outerDimensions.width || 0 3536 }) 3537 } 3538 } 3539 }, 3540 _renderProxy() { 3541 let e = this.element, 3542 i = this.options 3543 ;(this.elementOffset = e.offset()), 3544 this._helper 3545 ? ((this.helper = 3546 this.helper || t("<div style='overflow:hidden;'></div>")), 3547 this._addClass(this.helper, this._helper), 3548 this.helper.css({ 3549 width: this.element.outerWidth(), 3550 height: this.element.outerHeight(), 3551 position: 'absolute', 3552 left: `${this.elementOffset.left}px`, 3553 top: `${this.elementOffset.top}
3553px`, 3554 zIndex: ++i.zIndex 3555 }), 3556 this.helper.appendTo('body').disableSelection()) 3557 : (this.helper = this.element) 3558 }, 3559 _change: { 3560 e(t, e) { 3561 return { width: this.originalSize.width + e } 3562 }, 3563 w(t, e) { 3564 let i = this.originalSize, 3565 s = this.originalPosition 3566 return { left: s.left + e, width: i.width - e } 3567 }, 3568 n(t, e, i) { 3569 let s = this.originalSize, 3570 n = this.originalPosition 3571 return { top: n.top + i, height: s.height - i } 3572 }, 3573 s(t, e, i) { 3574 return { height: this.originalSize.height + i } 3575 }, 3576 se(e, i, s) { 3577 return t.extend( 3578 this._change.s.apply(this, arguments), 3579 this._change.e.apply(this, [e, i, s]) 3580 ) 3581 }, 3582 sw(e, i, s) { 3583 return t.extend( 3584 this._change.s.apply(this, arguments), 3585 this._change.w.apply(this, [e, i, s]) 3586 ) 3587 }, 3588 ne(e, i, s) { 3589 return t.extend( 3590 this._change.n.apply(this, arguments), 3591 this._change.e.apply(this, [e, i, s]) 3592 ) 3593 }, 3594 nw(e, i, s) { 3595 return t.extend( 3596 this._change.n.apply(this, arguments), 3597 this._change.w.apply(this, [e, i, s]) 3598 ) 3599 } 3600 }, 3601 _propagate(e, i) { 3602 t.ui.plugin.call(this, e, [i, this.ui()]), 3603 e !== 'resize' && this._trigger(e, i, this.ui()) 3604 }, 3605 plugins: {}, 3606 ui() { 3607 return { 3608 originalElement: this.originalElement, 3609 element: this.element, 3610 helper: this.helper, 3611 position: this.position, 3612 size: this.size, 3613 originalSize: this.originalSize, 3614 originalPosition: this.originalPosition 3615 } 3616 } 3617 }), 3618 t.ui.plugin.add('resizable', 'animate', { 3619 stop(e) { 3620 let i = t(this).resizable('instance'), 3621 s = i.options, 3622 n = i._proportionallyResizeElements, 3623 o = n.length && /textarea/i.test(n[0].nodeName), 3624 a = o && i._hasScroll(n[0], 'left') ? 0 : i.sizeDiff.height, 3625 r = o ? 0 : i.sizeDiff.width, 3626 l = { width: i.size.width - r, height: i.size.height - a }, 3627 h = 3628 parseFloat(i.element.css('left')) + 3629 (i.position.left - i.originalPosition.left) || null, 3630 c = 3631 parseFloat(i.element.css('top')) + 3632 (i.position.top - i.originalPosition.top) || null 3633 i.element.animate(t.extend(l, c && h ? { top: c, left: h } : {}), { 3634 duration: s.animateDuration, 3635 easing: s.animateEasing, 3636 step() { 3637 const s = { 3638 width: parseFloat(i.element.css('width')), 3639 height: parseFloat(i.element.css('height')), 3640 top: parseFloat(i.element.css('top')), 3641 left: parseFloat(i.element.css('left')) 3642 } 3643 n && n.length && t(n[0]).css({ width: s.width, height: s.height }), 3644 i._updateCache(s), 3645 i._propagate('resize', e) 3646 } 3647 }) 3648 } 3649 }), 3650 t.ui.plugin.add('resizable', 'containment', { 3651 start() { 3652 let e, 3653 i, 3654 s, 3655 n, 3656 o, 3657 a, 3658 r, 3659 l = t(this).resizable('instance'), 3660 h = l.options, 3661 c = l.element, 3662 u = h.containment, 3663 d = 3664 u instanceof t ? u.get(0) : /parent/.test(u) ? c.parent().get(0) : u 3665 d && 3666 ((l.containerElement = t(d)), 3667 /document/.test(u) || u === document 3668 ? ((l.containerOffset = { left: 0, top: 0 }), 3669 (l.containerPosition = { left: 0, top: 0 }), 3670 (l.parentData = { 3671 element: t(document), 3672 left: 0, 3673 top: 0, 3674 width: t(document).width(), 3675 height: 3676 t(document).height() || document.body.parentNode.scrollHeight 3677 })) 3678 : ((e = t(d)), 3679 (i = []), 3680 t(['Top', 'Right', 'Left', 'Bottom']).each(function(t, s) { 3681 i[t] = l._num(e.css(`padding${s}`)) 3682 }), 3683 (l.containerOffset = e.offset()), 3684 (l.containerPosition = e.position()), 3685 (l.containerSize = {
3686 height: e.innerHeight() - i[3], 3687 width: e.innerWidth() - i[1] 3688 }), 3689 (s = l.containerOffset), 3690 (n = l.containerSize.height), 3691 (o = l.containerSize.width), 3692 (a = l._hasScroll(d, 'left') ? d.scrollWidth : o), 3693 (r = l._hasScroll(d) ? d.scrollHeight : n), 3694 (l.parentData = { 3695 element: d, 3696 left: s.left, 3697 top: s.top, 3698 width: a, 3699 height: r 3700 }))) 3701 }, 3702 resize(e) { 3703 let i, 3704 s, 3705 n, 3706 o, 3707 a = t(this).resizable('instance'), 3708 r = a.options, 3709 l = a.containerOffset, 3710 h = a.position, 3711 c = a._aspectRatio || e.shiftKey, 3712 u = { top: 0, left: 0 }, 3713 d = a.containerElement, 3714 p = !0 3715 d[0] !== document && /static/.test(d.css('position')) && (u = l), 3716 h.left < (a._helper ? l.left : 0) && 3717 ((a.size.width = 3718 a.size.width + 3719 (a._helper 3720 ? a.position.left - l.left 3721 : a.position.left - u.left)), 3722 c && ((a.size.height = a.size.width / a.aspectRatio), (p = !1)), 3723 (a.position.left = r.helper ? l.left : 0)), 3724 h.top < (a._helper ? l.top : 0) && 3725 ((a.size.height = 3726 a.size.height + 3727 (a._helper ? a.position.top - l.top : a.position.top)), 3728 c && ((a.size.width = a.size.height * a.aspectRatio), (p = !1)), 3729 (a.position.top = a._helper ? l.top : 0)), 3730 (n = a.containerElement.get(0) === a.element.parent().get(0)), 3731 (o = /relative|absolute/.test(a.containerElement.css('position'))), 3732 n && o 3733 ? ((a.offset.left = a.parentData.left + a.position.left), 3734 (a.offset.top = a.parentData.top + a.position.top)) 3735 : ((a.offset.left = a.element.offset().left), 3736 (a.offset.top = a.element.offset().top)), 3737 (i = Math.abs( 3738 a.sizeDiff.width + 3739 (a._helper ? a.offset.left - u.left : a.offset.left - l.left) 3740 )), 3741 (s = Math.abs( 3742 a.sizeDiff.height + 3743 (a._helper ? a.offset.top - u.top : a.offset.top - l.top) 3744 )), 3745 i + a.size.width >= a.parentData.width && 3746 ((a.size.width = a.parentData.width - i), 3747 c && ((a.size.height = a.size.width / a.aspectRatio), (p = !1))), 3748 s + a.size.height >= a.parentData.height && 3749 ((a.size.height = a.parentData.height - s), 3750 c && ((a.size.width = a.size.height * a.aspectRatio), (p = !1))), 3751 p || 3752 ((a.position.left = a.prevPosition.left), 3753 (a.position.top = a.prevPosition.top), 3754 (a.size.width = a.prevSize.width), 3755 (a.size.height = a.prevSize.height)) 3756 }, 3757 stop() { 3758 let e = t(this).resizable('instance'), 3759 i = e.options, 3760 s = e.containerOffset, 3761 n = e.containerPosition, 3762 o = e.containerElement, 3763 a = t(e.helper), 3764 r = a.offset(), 3765 l = a.outerWidth() - e.sizeDiff.width, 3766 h = a.outerHeight() - e.sizeDiff.height 3767 e._helper && 3768 !i.animate && 3769 /relative/.test(o.css('position')) && 3770 t(this).css({ left: r.left - n.left - s.left, width: l, height: h }), 3771 e._helper && 3772 !i.animate && 3773 /static/.test(o.css('position')) && 3774 t(this).css({ left: r.left - n.left - s.left, width: l, height: h }) 3775 } 3776 }), 3777 t.ui.plugin.add('resizable', 'alsoResize', { 3778 start() { 3779 let e = t(this).resizable('instance'), 3780 i = e.options 3781 t(i.alsoResize).each(function() { 3782 const e = t(this) 3783 e.data('ui-resizable-alsoresize', { 3784 width: parseFloat(e.width()), 3785 height: parseFloat(e.height()), 3786 left: parseFloat(e.css('left')), 3787 top: parseFloat(e.css('top')) 3788 }) 3789 }) 3790 }, 3791 resize(e, i) { 3792 let s = t(this).resizable('instance'), 3793 n = s.options, 3794 o = s.originalSize, 3795 a = s.originalPosition, 3796 r = { 3797 height: s.size.height - o.height || 0, 3798 width: s.size.width - o.width || 0, 3799 top: s.position.top - a.top || 0, 3800 left: s.position.left - a.left || 0 3801 } 3802 t(n.alsoResize).each(function() { 3803 let e = t(this), 3804 s = t(this).data('ui-resizable-alsoresize'), 3805 n = {}, 3806 o = e.parents(i.originalElement[0]).length 3807 ? ['width', 'height'] 3808 : ['width', 'height', 'top', 'left'] 3809 t.each(o, function(t, e) { 3810 const i = (s[e] || 0) + (r[e] || 0) 3811 i && i >= 0 && (n[e] = i || null) 3812 }), 3813 e.css(n) 3814 }) 3815 }, 3816 stop() { 3817 t(this).removeData('ui-resizable-alsoresize') 3818 } 3819 }), 3820 t.ui.plugin.add('resizable', 'ghost', { 3821 start() { 3822 let e = t(this).resizable('instance'), 3823 i = e.size 3824 ;(e.ghost = e.originalElement.clone()), 3825 e.ghost.css({ 3826 opacity: 0.25, 3827 display: 'block', 3828 position: 'relative', 3829 height: i.height, 3830 width: i.width, 3831 margin: 0, 3832 left: 0, 3833 top: 0 3834 }), 3835 e._addClass(e.ghost, 'ui-resizable-ghost'), 3836 t.uiBackCompat !== !1 &&
3837 typeof e.options.ghost === 'string' && 3838 e.ghost.addClass(this.options.ghost), 3839 e.ghost.appendTo(e.helper) 3840 }, 3841 resize() { 3842 const e = t(this).resizable('instance') 3843 e.ghost && 3844 e.ghost.css({ 3845 position: 'relative', 3846 height: e.size.height, 3847 width: e.size.width 3848 }) 3849 }, 3850 stop() { 3851 const e = t(this).resizable('instance') 3852 e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0)) 3853 } 3854 }), 3855 t.ui.plugin.add('resizable', 'grid', { 3856 resize() { 3857 let e, 3858 i = t(this).resizable('instance'), 3859 s = i.options, 3860 n = i.size, 3861 o = i.originalSize, 3862 a = i.originalPosition, 3863 r = i.axis, 3864 l = typeof s.grid === 'number' ? [s.grid, s.grid] : s.grid, 3865 h = l[0] || 1, 3866 c = l[1] || 1, 3867 u = Math.round((n.width - o.width) / h) * h, 3868 d = Math.round((n.height - o.height) / c) * c, 3869 p = o.width + u, 3870 f = o.height + d, 3871 g = s.maxWidth && p > s.maxWidth, 3872 m = s.maxHeight && f > s.maxHeight, 3873 _ = s.minWidth && s.minWidth > p, 3874 v = s.minHeight && s.minHeight > f 3875 ;(s.grid = l), 3876 _ && (p += h), 3877 v && (f += c), 3878 g && (p -= h), 3879 m && (f -= c), 3880 /^(se|s|e)$/.test(r) 3881 ? ((i.size.width = p), (i.size.height = f)) 3882 : /^(ne)$/.test(r) 3883 ? ((i.size.width = p), 3884 (i.size.height = f), 3885 (i.position.top = a.top - d)) 3886 : /^(sw)$/.test(r) 3887 ? ((i.size.width = p), 3888 (i.size.height = f), 3889 (i.position.left = a.left - u)) 3890 : ((f - c <= 0 || p - h <= 0) && 3891 (e = i._getPaddingPlusBorderDimensions(this)), 3892 f - c > 0 3893 ? ((i.size.height = f), (i.position.top = a.top - d)) 3894 : ((f = c - e.height), 3895 (i.size.height = f), 3896 (i.position.top = a.top + o.height - f)), 3897 p - h > 0 3898 ? ((i.size.width = p), (i.position.left = a.left - u)) 3899 : ((p = h - e.width), 3900 (i.size.width = p), 3901 (i.position.left = a.left + o.width - p))) 3902 } 3903 }), 3904 t.ui.resizable, 3905 t.widget('ui.selectable', t.ui.mouse, { 3906 version: '1.12.1', 3907 options: { 3908 appendTo: 'body', 3909 autoRefresh: !0, 3910 distance: 0, 3911 filter: '*', 3912 tolerance: 'touch', 3913 selected: null, 3914 selecting: null, 3915 start: null, 3916 stop: null, 3917 unselected: null, 3918 unselecting: null 3919 }, 3920 _create() { 3921 const e = this 3922 this._addClass('ui-selectable'), 3923 (this.dragged = !1), 3924 (this.refresh = function() { 3925 ;(e.elementPos = t(e.element[0]).offset()), 3926 (e.selectees = t(e.options.filter, e.element[0])), 3927 e._addClass(e.selectees, 'ui-selectee'), 3928 e.selectees.each(function() { 3929 let i = t(this), 3930 s = i.offset(), 3931 n = { 3932 left: s.left - e.elementPos.left, 3933 top: s.top - e.elementPos.top 3934 } 3935 t.data(this, 'selectable-item', { 3936 element: this, 3937 $element: i, 3938 left: n.left, 3939 top: n.top, 3940 right: n.left + i.outerWidth(), 3941 bottom: n.top + i.outerHeight(), 3942 startselected: !1, 3943 selected: i.hasClass('ui-selected'), 3944 selecting: i.hasClass('ui-selecting'), 3945 unselecting: i.hasClass('ui-unselecting') 3946 }) 3947 }) 3948 }), 3949 this.refresh(), 3950 this._mouseInit(), 3951 (this.helper = t('<div>')), 3952 this._addClass(this.helper, 'ui-selectable-helper') 3953 }, 3954 _destroy() { 3955 this.selectees.removeData('selectable-item'), this._mouseDestroy() 3956 }, 3957 _mouseStart(e) { 3958 let i = this, 3959 s = this.options 3960 ;(this.opos = [e.pageX, e.pageY]), 3961 (this.elementPos = t(this.element[0]).offset()), 3962 this.options.disabled || 3963 ((this.selectees = t(s.filter, this.element[0])), 3964 this._trigger('start', e), 3965 t(s.appendTo).append(this.helper), 3966 this.helper.css({ 3967 left: e.pageX, 3968 top: e.pageY, 3969 width: 0, 3970 height: 0 3971 }), 3972 s.autoRefresh && this.refresh(), 3973 this.selectees.filter('.ui-selected').each(function() { 3974 const s = t.data(this, 'selectable-item') 3975 ;(s.startselected = !0), 3976 e.metaKey || 3977 e.ctrlKey || 3978 (i._removeClass(s.$element, 'ui-selected'), 3979 (s.selected = !1), 3980 i._addClass(s.$element, 'ui-unselecting'), 3981 (s.unselecting = !0), 3982 i._trigger('unselecting', e, { unselecting: s.element })) 3983 }), 3984 t(e.target) 3985 .parents() 3986 .addBack() 3987 .each(function() { 3988 let s, 3989 n = t.data(this, 'selectable-item') 3990 return n 3991 ? ((s = 3992 (!e.metaKey && !e.ctrlKey) || 3993 !n.$element.hasClass('ui-selected')), 3994 i 3995 ._removeClass( 3996 n.$element, 3997 s ? 'ui-unselecting' : 'ui-selected' 3998 ) 3999 ._addClass( 4000 n.$element, 4001 s ? 'ui-selecting' : 'ui-unselecting' 4002 ), 4003 (n.unselecting = !s), 4004 (n.selecting = s), 4005 (n.selected = s), 4006 s 4007 ? i._trigger('selecting', e, { selecting: n.element }) 4008 : i._trigger('unselecting', e, { 4009 unselecting: n.element 4010 }), 4011 !1) 4012 : void 0 4013 })) 4014 }, 4015 _mouseDrag(e) { 4016 if (((this.dragged = !0), !this.options.disabled)) { 4017 let i, 4018 s = this, 4019 n = this.options, 4020 o = this.opos[0], 4021 a = this.opos[1], 4022 r = e.pageX, 4023 l = e.pageY 4024 return ( 4025 o > r && ((i = r), (r = o), (o = i)), 4026 a > l && ((i = l), (l = a), (a = i)), 4027 this.helper.css({ left: o, top: a, width: r - o, height: l - a }), 4028 this.selectees.each(function() { 4029 let i = t.data(this, 'selectable-item'), 4030 h = !1, 4031 c = {} 4032 i && 4033 i.element !== s.element[0] && 4034 ((c.left = i.left + s.elementPos.left), 4035 (c.right = i.right + s.elementPos.left), 4036 (c.top = i.top + s.elementPos.top), 4037 (c.bottom = i.bottom + s.elementPos.top), 4038 n.tolerance === 'touch' 4039 ? (h = !( 4040 c.left > r || 4041 o > c.right || 4042 c.top > l || 4043 a > c.bottom 4044 )) 4045 : n.tolerance === 'fit' && 4046 (h = 4047 c.left > o && r > c.right && c.top > a && l > c.bottom), 4048 h 4049 ? (i.selected && 4050 (s._removeClass(i.$element, 'ui-selected'), 4051 (i.selected = !1)), 4052 i.unselecting && 4053 (s._removeClass(i.$element, 'ui-unselecting'), 4054 (i.unselecting = !1)), 4055 i.selecting || 4056 (s._addClass(i.$element, 'ui-selecting'), 4057 (i.selecting = !0), 4058 s._trigger('selecting', e, { selecting: i.element }))) 4059 : (i.selecting && 4060 ((e.metaKey || e.ctrlKey) && i.startselected 4061 ? (s._removeClass(i.$element, 'ui-selecting'), 4062 (i.selecting = !1), 4063 s._addClass(i.$element, 'ui-selected'), 4064 (i.selected = !0)) 4065 : (s._removeClass(i.$element, 'ui-selecting'), 4066 (i.selecting = !1), 4067 i.startselected && 4068 (s._addClass(i.$element, 'ui-unselecting'), 4069 (i.unselecting = !0)), 4070 s._trigger('unselecting', e, { 4071 unselecting: i.element 4072 }))), 4073 i.selected && 4074 (e.metaKey || 4075 e.ctrlKey || 4076 i.startselected || 4077 (s._removeClass(i.$element, 'ui-selected'), 4078 (i.selected = !1), 4079 s._addClass(i.$element, 'ui-unselecting'), 4080 (i.unselecting = !0), 4081 s._trigger('unselecting', e, { 4082 unselecting: i.element 4083 }))))) 4084 }), 4085 !1 4086 ) 4087 } 4088 }, 4089 _mouseStop(e) { 4090 const i = this 4091 return ( 4092 (this.dragged = !1), 4093 t('.ui-unselecting', this.element[0]).each(function() { 4094 const s = t.data(this, 'selectable-item') 4095 i._removeClass(s.$element, 'ui-unselecting'), 4096 (s.unselecting = !1), 4097 (s.startselected = !1), 4098 i._trigger('unselected', e, { unselected: s.element }) 4099 }), 4100 t('.ui-selecting', this.element[0]).each(function() { 4101 const s = t.data(this, 'selectable-item') 4102 i 4103 ._removeClass(s.$element, 'ui-selecting') 4104 ._addClass(s.$element, 'ui-selected'), 4105 (s.selecting = !1), 4106 (s.selected = !0), 4107 (s.startselected = !0), 4108 i._trigger('selected', e, { selected: s.element }) 4109 }), 4110 this._trigger('stop', e), 4111 this.helper.remove(), 4112 !1 4113 ) 4114 } 4115 }), 4116 t.widget('ui.sortable', t.ui.mouse, { 4117 version: '1.12.1', 4118 widgetEventPrefix: 'sort', 4119 ready: !1, 4120 options: { 4121 appendTo: 'parent', 4122 axis: !1, 4123 connectWith: !1, 4124 containment: !1, 4125 cursor: 'auto', 4126 cursorAt: !1, 4127 dropOnEmpty: !0, 4128 forcePlaceholderSize: !1, 4129 forceHelperSize: !1, 4130 grid: !1, 4131 handle: !1, 4132 helper: 'original', 4133 items: '> *', 4134 opacity: !1, 4135 placeholder: !1, 4136 revert: !1, 4137 scroll: !0, 4138 scrollSensitivity: 20, 4139 scrollSpeed: 20, 4140 scope: 'default', 4141 tolerance: 'intersect', 4142 zIndex: 1e3, 4143 activate: null, 4144 beforeStop: null, 4145 change: null, 4146 deactivate: null, 4147 out: null, 4148 over: null, 4149 receive: null, 4150 remove: null, 4151 sort: null, 4152 start: null, 4153 stop: null, 4154 update: null 4155 }, 4156 _isOverAxis(t, e, i) { 4157 return t >
4157= e && e + i > t 4158 }, 4159 _isFloating(t) { 4160 return ( 4161 /left|right/.test(t.css('float')) || 4162 /inline|table-cell/.test(t.css('display')) 4163 ) 4164 }, 4165 _create() { 4166 ;(this.containerCache = {}), 4167 this._addClass('ui-sortable'), 4168 this.refresh(), 4169 (this.offset = this.element.offset()), 4170 this._mouseInit(), 4171 this._setHandleClassName(), 4172 (this.ready = !0) 4173 }, 4174 _setOption(t, e) { 4175 this._super(t, e), t === 'handle' && this._setHandleClassName() 4176 }, 4177 _setHandleClassName() { 4178 const e = this 4179 this._removeClass( 4180 this.element.find('.ui-sortable-handle'), 4181 'ui-sortable-handle' 4182 ), 4183 t.each(this.items, function() { 4184 e._addClass( 4185 this.instance.options.handle 4186 ? this.item.find(this.instance.options.handle) 4187 : this.item, 4188 'ui-sortable-handle' 4189 ) 4190 }) 4191 }, 4192 _destroy() { 4193 this._mouseDestroy() 4194 for (let t = this.items.length - 1; t >= 0; t--) { 4195 this.items[t].item.removeData(`${this.widgetName}-item`) 4196 } 4197 return this 4198 }, 4199 _mouseCapture(e, i) { 4200 let s = null, 4201 n = !1, 4202 o = this 4203 return this.reverting 4204 ? !1 4205 : this.options.disabled || this.options.type === 'static' 4206 ? !1 4207 : (this._refreshItems(e), 4208 t(e.target) 4209 .parents() 4210 .each(function() { 4211 return t.data(this, `${o.widgetName}-item`) === o 4212 ? ((s = t(this)), !1) 4213 : void 0 4214 }), 4215 t.data(e.target, `${o.widgetName}-item`) === o && 4216 (s = t(e.target)), 4217 s 4218 ? !this.options.handle || 4219 i || 4220 (t(this.options.handle, s) 4221 .find('*') 4222 .addBack() 4223 .each(function() { 4224 this === e.target && (n = !0) 4225 }), 4226 n) 4227 ? ((this.currentItem = s), 4228 this._removeCurrentsFromItems(), 4229 !0) 4230 : !1 4231 : !1) 4232 }, 4233 _mouseStart(e, i, s) { 4234 let n, 4235 o, 4236 a = this.options 4237 if ( 4238 ((this.currentContainer = this), 4239 this.refreshPositions(), 4240 (this.helper = this._createHelper(e)), 4241 this._cacheHelperProportions(), 4242 this._cacheMargins(), 4243 (this.scrollParent = this.helper.scrollParent()), 4244 (this.offset = this.currentItem.offset()), 4245 (this.offset = { 4246 top: this.offset.top - this.margins.top, 4247 left: this.offset.left - this.margins.left 4248 }), 4249 t.extend(this.offset, { 4250 click: { 4251 left: e.pageX - this.offset.left, 4252 top: e.pageY - this.offset.top 4253 }, 4254 parent: this._getParentOffset(), 4255 relative: this._getRelativeOffset() 4256 }), 4257 this.helper.css('position', 'absolute'), 4258 (this.cssPosition = this.helper.css('position')), 4259 (this.originalPosition = this._generatePosition(e)), 4260 (this.originalPageX = e.pageX), 4261 (this.originalPageY = e.pageY), 4262 a.cursorAt && this._adjustOffsetFromHelper(a.cursorAt), 4263 (this.domPosition = { 4264 prev: this.currentItem.prev()[0], 4265 parent: this.currentItem.parent()[0] 4266 }), 4267 this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), 4268 this._createPlaceholder(), 4269 a.containment && this._setContainment(), 4270 a.cursor && 4271 a.cursor !== 'auto' && 4272 ((o = this.document.find('body')), 4273 (this.storedCursor = o.css('cursor')), 4274 o.css('cursor', a.cursor), 4275 (this.storedStylesheet = t( 4276 `<style>*{ cursor: ${a.cursor} !important; }</style>` 4277 ).appendTo(o))), 4278 a.opacity && 4279 (this.helper.css('opacity') && 4280 (this._storedOpacity = this.helper.css('opacity')), 4281 this.helper.css('opacity', a.opacity)), 4282 a.zIndex && 4283 (this.helper.css('zIndex') && 4284 (this._storedZIndex = this.helper.css('zIndex')), 4285 this.helper.css('zIndex', a.zIndex)), 4286 this.scrollParent[0] !== this.document[0] && 4287 this.scrollParent[0].tagName !== 'HTML' && 4288 (this.overflowOffset = this.scrollParent.offset()), 4289 this._trigger('start', e, this._uiHash()), 4290 this._preserveHelperProportions || this._cacheHelperProportions(), 4291 !s) 4292 ) { 4293 for (n = this.containers.length - 1; n >= 0; n--) { 4294 this.containers[n]._trigger('activate', e, this._uiHash(this)) 4295 } 4296 } 4297 return ( 4298 t.ui.ddmanager && (t.ui.ddmanager.current = this), 4299 t.ui.ddmanager && 4300 !a.dropBehaviour && 4301 t.ui.ddmanager.prepareOffsets(this, e), 4302 (this.dragging = !0), 4303 this._addClass(this.helper, 'ui-sortable-helper'), 4304 this._mouseDrag(e), 4305 !0 4306 ) 4307 }, 4308 _mouseDrag(e) { 4309 let i, 4310 s, 4311 n, 4312 o, 4313 a = this.options, 4314 r = !1 4315 for ( 4316 this.position = this._generatePosition(e), 4317 this.positionAbs = this._convertPositionTo('absolute'), 4318 this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), 4319 this.options.scroll && 4320 (this.scrollParent[0] !== this.document[0] && 4321 this.scrollParent[0].tagName !== 'HTML' 4322 ? (this.overflowOffset.top + 4323 this.scrollParent[0].offsetHeight - 4324 e.pageY < 4325 a.scrollSensitivity 4326 ? (this.scrollParent[0].scrollTop = r = 4327 this.scrollParent[0].scrollTop + a.scrollSpeed) 4328 : e.pageY - this.overflowOffset.top < a.scrollSensitivity && 4329 (this.scrollParent[0].scrollTop = r = 4330 this.scrollParent[0].scrollTop - a.scrollSpeed), 4331 this.overflowOffset.left + 4332 this.scrollParent[0].offsetWidth - 4333 e.pageX < 4334 a.scrollSensitivity 4335 ? (this.scrollParent[0].scrollLeft = r = 4336 this.scrollParent[0].scrollLeft + a.scrollSpeed) 4337 : e.pageX - this.overflowOffset.left < 4338 a.scrollSensitivity && 4339 (this.scrollParent[0].scrollLeft = r = 4340 this.scrollParent[0].scrollLeft - a.scrollSpeed)) 4341 : (e.pageY - this.document.scrollTop() < a.scrollSensitivity 4342 ? (r = this.document.scrollTop( 4343 this.document.scrollTop() - a.scrollSpeed 4344 )) 4345 : this.window.height() - 4346 (e.pageY - this.document.scrollTop()) < 4347 a.scrollSensitivity && 4348 (r = this.document.scrollTop( 4349 this.document.scrollTop() + a.scrollSpeed 4350 )), 4351 e.pageX - this.document.scrollLeft() < a.scrollSensitivity 4352 ? (r = this.document.scrollLeft( 4353 this.document.scrollLeft() - a.scrollSpeed 4354 )) 4355 : this.window.width() - 4356 (e.pageX - this.document.scrollLeft()) < 4357 a.scrollSensitivity && 4358 (r = this.document.scrollLeft( 4359 this.document.scrollLeft() + a.scrollSpeed 4360 ))), 4361 r !== !1 && 4362 t.ui.ddmanager && 4363 !a.dropBehaviour && 4364 t.ui.ddmanager.prepareOffsets(this, e)), 4365 this.positionAbs = this._convertPositionTo('absolute'), 4366 (this.options.axis && this.options.axis === 'y') || 4367 (this.helper[0].style.left = `${this.position.left}px`), 4368 (this.options.axis && this.options.axis === 'x') || 4369 (this.helper[0].style.top = `${this.position.top}px`), 4370 i = this.items.length - 1; 4371 i >= 0; 4372 i-- 4373 ) { 4374 if ( 4375 ((s = this.items[i]), 4376 (n = s.item[0]), 4377 (o = this._intersectsWithPointer(s)), 4378 o && 4379 s.instance === this.currentContainer && 4380 n !== this.currentItem[0] && 4381 this.placeholder[o === 1 ? 'next' : 'prev']()[0] !== n && 4382 !t.contains(this.placeholder[0], n) && 4383 (this.options.type === 'semi-dynamic' 4384 ? !t.contains(this.element[0], n) 4385 : !0)) 4386 ) { 4387 if ( 4388 ((this.direction = o === 1 ? 'down' : 'up'), 4389 this.options.tolerance !== 'pointer' && 4390 !this._intersectsWithSides(s)) 4391 ) { 4392 break 4393 } 4394 this._rearrange(e, s), this._trigger('change', e, this._uiHash()) 4395 break 4396 } 4397 } 4398 return ( 4399 this._contactContainers(e), 4400 t.ui.ddmanager && t.ui.ddmanager.drag(this, e), 4401 this._trigger('sort', e, this._uiHash()), 4402 (this.lastPositionAbs = this.positionAbs), 4403 !1 4404 ) 4405 }, 4406 _mouseStop(e, i) { 4407 if (e) { 4408 if ( 4409 (t.ui.ddmanager && 4410 !this.options.dropBehaviour && 4411 t.ui.ddmanager.drop(this, e), 4412 this.options.revert) 4413 ) { 4414 let s = this, 4415 n = this.placeholder.offset(), 4416 o = this.options.axis, 4417 a = {} 4418 ;
4418(o && o !== 'x') || 4419 (a.left = 4420 n.left - 4421 this.offset.parent.left - 4422 this.margins.left + 4423 (this.offsetParent[0] === this.document[0].body 4424 ? 0 4425 : this.offsetParent[0].scrollLeft)), 4426 (o && o !== 'y') || 4427 (a.top = 4428 n.top - 4429 this.offset.parent.top - 4430 this.margins.top + 4431 (this.offsetParent[0] === this.document[0].body 4432 ? 0 4433 : this.offsetParent[0].scrollTop)), 4434 (this.reverting = !0), 4435 t(this.helper).animate( 4436 a, 4437 parseInt(this.options.revert, 10) || 500, 4438 function() { 4439 s._clear(e) 4440 } 4441 ) 4442 } else this._clear(e, i) 4443 return !1 4444 } 4445 }, 4446 cancel() { 4447 if (this.dragging) { 4448 this._mouseUp(new t.Event('mouseup', { target: null })), 4449 this.options.helper === 'original' 4450 ? (this.currentItem.css(this._storedCSS), 4451 this._removeClass(this.currentItem, 'ui-sortable-helper')) 4452 : this.currentItem.show() 4453 for (let e = this.containers.length - 1; e >= 0; e--) { 4454 this.containers[e]._trigger('deactivate', null, this._uiHash(this)), 4455 this.containers[e].containerCache.over && 4456 (this.containers[e]._trigger('out', null, this._uiHash(this)), 4457 (this.containers[e].containerCache.over = 0)) 4458 } 4459 } 4460 return ( 4461 this.placeholder && 4462 (this.placeholder[0].parentNode && 4463 this.placeholder[0].parentNode.removeChild(this.placeholder[0]), 4464 this.options.helper !== 'original' && 4465 this.helper && 4466 this.helper[0].parentNode && 4467 this.helper.remove(), 4468 t.extend(this, { 4469 helper: null, 4470 dragging: !1, 4471 reverting: !1, 4472 _noFinalSort: null 4473 }), 4474 this.domPosition.prev 4475 ? t(this.domPosition.prev).after(this.currentItem) 4476 : t(this.domPosition.parent).prepend(this.currentItem)), 4477 this 4478 ) 4479 }, 4480 serialize(e) { 4481 let i = this._getItemsAsjQuery(e && e.connected), 4482 s = [] 4483 return ( 4484 (e = e || {}), 4485 t(i).each(function() { 4486 const i = (t(e.item || this).attr(e.attribute || 'id') || '').match( 4487 e.expression || /(.+)[\-=_](.+)/ 4488 ) 4489 i && 4490 s.push( 4491 `${e.key || `${i[1]}[]`}=${e.key && e.expression ? i[1] : i[2]}` 4492 ) 4493 }), 4494 !s.length && e.key && s.push(`${e.key}=`), 4495 s.join('&') 4496 ) 4497 }, 4498 toArray(e) { 4499 let i = this._getItemsAsjQuery(e && e.connected), 4500 s = [] 4501 return ( 4502 (e = e || {}), 4503 i.each(function() { 4504 s.push(t(e.item || this).attr(e.attribute || 'id') || '') 4505 }), 4506 s 4507 ) 4508 }, 4509 _intersectsWith(t) { 4510 let e = this.positionAbs.left, 4511 i = e + this.helperProportions.width, 4512 s = this.positionAbs.top, 4513 n = s + this.helperProportions.height, 4514 o = t.left, 4515 a = o + t.width, 4516 r = t.top, 4517 l = r + t.height, 4518 h = this.offset.click.top, 4519 c = this.offset.click.left, 4520 u = this.options.axis === 'x' || (s + h > r && l > s + h), 4521 d = this.options.axis === 'y' || (e + c > o && a > e + c), 4522 p = u && d 4523 return this.options.tolerance === 'pointer' || 4524 this.options.forcePointerForContainers || 4525 (this.options.tolerance !== 'pointer' && 4526 this.helperProportions[this.floating ? 'width' : 'height'] > 4527 t[this.floating ? 'width' : 'height']) 4528 ? p 4529 : e + this.helperProportions.width / 2 > o && 4530 a > i - this.helperProportions.width / 2 && 4531 s + this.helperProportions.height / 2 > r && 4532 l > n - this.helperProportions.height / 2 4533 }, 4534 _intersectsWithPointer(t) { 4535 let e, 4536 i, 4537 s = 4538 this.options.axis === 'x' || 4539 this._isOverAxis( 4540 this.positionAbs.top + this.offset.click.top, 4541 t.top, 4542 t.height 4543 ), 4544 n = 4545 this.options.axis === 'y' || 4546 this._isOverAxis( 4547 this.positionAbs.left + this.offset.click.left, 4548 t.left, 4549 t.width 4550 ), 4551 o = s && n 4552 return o 4553 ? ((e = this._getDragVerticalDirection()), 4554 (i = this._getDragHorizontalDirection()), 4555 this.floating 4556 ? i === 'right' || e === 'down' 4557 ? 2 4558 : 1 4559 : e && (e === 'down' ? 2 : 1)) 4560 : !1 4561 }, 4562 _intersectsWithSides(t) { 4563 let e = this._isOverAxis( 4564 this.positionAbs.top + this.offset.click.top, 4565 t.top + t.height / 2, 4566 t.height 4567 ), 4568 i = this._isOverAxis( 4569 this.positionAbs.left + this.offset.click.left, 4570 t.left + t.width / 2, 4571 t.width 4572 ), 4573 s = this._getDragVerticalDirection(), 4574 n = this._getDragHorizontalDirection() 4575 return this.floating && n 4576 ? (n === 'right' && i) || (n === 'left' && !i) 4577 : s && ((s === 'down' && e) || (s === 'up' && !e)) 4578 }, 4579 _getDragVerticalDirection() { 4580 const t = this.positionAbs.top - this.lastPositionAbs.top 4581 return t !== 0 && (t > 0 ? 'down' : 'up') 4582 }, 4583 _getDragHorizontalDirection() { 4584 const t = this.positionAbs.left - this.lastPositionAbs.left 4585 return t !== 0 && (t > 0 ? 'right' : 'left') 4586 }, 4587 refresh(t) { 4588 return ( 4589 this._refreshItems(t), 4590 this._setHandleClassName(), 4591 this.refreshPositions(), 4592 this 4593 ) 4594 }, 4595 _connectWith() { 4596 const t = this.options 4597 return t.connectWith.constructor === String
4598 ? [t.connectWith] 4599 : t.connectWith 4600 }, 4601 _getItemsAsjQuery(e) { 4602 function i() { 4603 r.push(this) 4604 } 4605 var s, 4606 n, 4607 o, 4608 a, 4609 r = [], 4610 l = [], 4611 h = this._connectWith() 4612 if (h && e) { 4613 for (s = h.length - 1; s >= 0; s--) { 4614 for (o = t(h[s], this.document[0]), n = o.length - 1; n >= 0; n--) { 4615 ;(a = t.data(o[n], this.widgetFullName)), 4616 a && 4617 a !== this && 4618 !a.options.disabled && 4619 l.push([ 4620 t.isFunction(a.options.items) 4621 ? a.options.items.call(a.element) 4622 : t(a.options.items, a.element) 4623 .not('.ui-sortable-helper') 4624 .not('.ui-sortable-placeholder'), 4625 a 4626 ]) 4627 } 4628 } 4629 } 4630 for ( 4631 l.push([ 4632 t.isFunction(this.options.items) 4633 ? this.options.items.call(this.element, null, { 4634 options: this.options, 4635 item: this.currentItem 4636 }) 4637 : t(this.options.items, this.element) 4638 .not('.ui-sortable-helper') 4639 .not('.ui-sortable-placeholder'), 4640 this 4641 ]), 4642 s = l.length - 1; 4643 s >= 0; 4644 s-- 4645 ) { 4646 l[s][0].each(i) 4647 } 4648 return t(r) 4649 }, 4650 _removeCurrentsFromItems() { 4651 const e = this.currentItem.find(`:data(${this.widgetName}-item)`) 4652 this.items = t.grep(this.items, function(t) { 4653 for (let i = 0; e.length > i; i++) if (e[i] === t.item[0]) return !1 4654 return !0 4655 }) 4656 }, 4657 _refreshItems(e) { 4658 ;(this.items = []), (this.containers = [this]) 4659 let i, 4660 s, 4661 n, 4662 o, 4663 a, 4664 r, 4665 l, 4666 h, 4667 c = this.items, 4668 u = [ 4669 [ 4670 t.isFunction(this.options.items) 4671 ? this.options.items.call(this.element[0], e, { 4672 item: this.currentItem 4673 }) 4674 : t(this.options.items, this.element), 4675 this 4676 ] 4677 ], 4678 d = this._connectWith() 4679 if (d && this.ready) { 4680 for (i = d.length - 1; i >= 0; i--) { 4681 for (n = t(d[i], this.document[0]), s = n.length - 1; s >= 0; s--) { 4682 ;(o = t.data(n[s], this.widgetFullName)), 4683 o && 4684 o !== this && 4685 !o.options.disabled && 4686 (u.push([ 4687 t.isFunction(o.options.items) 4688 ? o.options.items.call(o.element[0], e, { 4689 item: this.currentItem 4690 }) 4691 : t(o.options.items, o.element), 4692 o 4693 ]), 4694 this.containers.push(o)) 4695 } 4696 } 4697 } 4698 for (i = u.length - 1; i >= 0; i--) { 4699 for (a = u[i][1], r = u[i][0], s = 0, h = r.length; h > s; s++) { 4700 ;(l = t(r[s])), 4701 l.data(`${this.widgetName}-item`, a), 4702 c.push({ 4703 item: l, 4704 instance: a, 4705 width: 0, 4706 height: 0, 4707 left: 0, 4708 top: 0 4709 }) 4710 } 4711 } 4712 }, 4713 refreshPositions(e) { 4714 ;(this.floating = this.items.length 4715 ? this.options.axis === 'x' || this._isFloating(this.items[0].item) 4716 : !1), 4717 this.offsetParent && 4718 this.helper && 4719 (this.offset.parent = this._getParentOffset()) 4720 let i, s, n, o 4721 for (i = this.items.length - 1; i >= 0; i--) { 4722 ;(s = this.items[i]), 4723 (s.instance !== this.currentContainer && 4724 this.currentContainer && 4725 s.item[0] !== this.currentItem[0]) || 4726 ((n = this.options.toleranceElement 4727 ? t(this.options.toleranceElement, s.item) 4728 : s.item), 4729 e || ((s.width = n.outerWidth()), (s.height = n.outerHeight())), 4730 (o = n.offset()), 4731 (s.left = o.left), 4732 (s.top = o.top)) 4733 } 4734 if (this.options.custom && this.options.custom.refreshContainers
4734) { 4735 this.options.custom.refreshContainers.call(this) 4736 } else { 4737 for (i = this.containers.length - 1; i >= 0; i--) { 4738 ;(o = this.containers[i].element.offset()), 4739 (this.containers[i].containerCache.left = o.left), 4740 (this.containers[i].containerCache.top = o.top), 4741 (this.containers[i].containerCache.width = this.containers[ 4742 i 4743 ].element.outerWidth()), 4744 (this.containers[i].containerCache.height = this.containers[ 4745 i 4746 ].element.outerHeight()) 4747 } 4748 } 4749 return this 4750 }, 4751 _createPlaceholder(e) { 4752 e = e || this 4753 let i, 4754 s = e.options 4755 ;(s.placeholder && s.placeholder.constructor !== String) || 4756 ((i = s.placeholder), 4757 (s.placeholder = { 4758 element() { 4759 let s = e.currentItem[0].nodeName.toLowerCase(), 4760 n = t(`<${s}>`, e.document[0]) 4761 return ( 4762 e 4763 ._addClass( 4764 n, 4765 'ui-sortable-placeholder', 4766 i || e.currentItem[0].className 4767 ) 4768 ._removeClass(n, 'ui-sortable-helper'), 4769 s === 'tbody' 4770 ? e._createTrPlaceholder( 4771 e.currentItem.find('tr').eq(0), 4772 t('<tr>', e.document[0]).appendTo(n) 4773 ) 4774 : s === 'tr' 4775 ? e._createTrPlaceholder(e.currentItem, n) 4776 : s === 'img' && n.attr('src', e.currentItem.attr('src')), 4777 i || n.css('visibility', 'hidden'), 4778 n 4779 ) 4780 }, 4781 update(t, n) { 4782 ;(!i || s.forcePlaceholderSize) && 4783 (n.height() || 4784 n.height(
4785 e.currentItem.innerHeight() - 4786 parseInt(e.currentItem.css('paddingTop') || 0, 10) - 4787 parseInt(e.currentItem.css('paddingBottom') || 0, 10) 4788 ), 4789 n.width() || 4790 n.width( 4791 e.currentItem.innerWidth() - 4792 parseInt(e.currentItem.css('paddingLeft') || 0, 10) - 4793 parseInt(e.currentItem.css('paddingRight') || 0, 10) 4794 )) 4795 } 4796 })), 4797 (e.placeholder = t( 4798 s.placeholder.element.call(e.element, e.currentItem) 4799 )), 4800 e.currentItem.after(e.placeholder), 4801 s.placeholder.update(e, e.placeholder) 4802 }, 4803 _createTrPlaceholder(e, i) { 4804 const s = this 4805 e.children().each(function() { 4806 t('<td> </td>', s.document[0]) 4807 .attr('colspan', t(this).attr('colspan') || 1) 4808 .appendTo(i) 4809 }) 4810 }, 4811 _contactContainers(e) { 4812 let i, 4813 s, 4814 n, 4815 o, 4816 a, 4817 r, 4818 l, 4819 h, 4820 c, 4821 u, 4822 d = null, 4823 p = null 4824 for (i = this.containers.length - 1; i >= 0; i--) { 4825 if (!t.contains(this.currentItem[0], this.containers[i].element[0])) { 4826 if (this._intersectsWith(this.containers[i].containerCache)) { 4827 if ( 4828 d && 4829 t.contains(this.containers[i].element[0], d.element[0]) 4830 ) { 4831 continue 4832 } 4833 ;(d = this.containers[i]), (p = i) 4834 } else { 4835 this.containers[i].containerCache.over && 4836 (this.containers[i]._trigger('out', e, this._uiHash(this)), 4837 (this.containers[i].containerCache.over = 0)) 4838 } 4839 } 4840 } 4841 if (d) { 4842 if (this.containers.length === 1) { 4843 this.containers[p].containerCache.over || 4844 (this.containers[p]._trigger('over', e, this._uiHash(this)), 4845 (this.containers[p].containerCache.over = 1)) 4846 } else { 4847 for ( 4848 n = 1e4, 4849 o = null, 4850 c = d.floating || this._isFloating(this.currentItem), 4851 a = c ? 'left' : 'top', 4852 r = c ? 'width' : 'height', 4853 u = c ? 'pageX' : 'pageY', 4854 s = this.items.length - 1; 4855 s >= 0; 4856 s-- 4857 ) { 4858 t.contains( 4859 this.containers[p].element[0], 4860 this.items[s].item[0] 4861 ) && 4862 this.items[s].item[0] !== this.currentItem[0] && 4863 ((l = this.items[s].item.offset()[a]), 4864 (h = !1), 4865 e[u] - l > this.items[s][r] / 2 && (h = !0), 4866 n > Math.abs(e[u] - l) && 4867 ((n = Math.abs(e[u] - l)), 4868 (o = this.items[s]), 4869 (this.direction = h ? 'up' : 'down'))) 4870 } 4871 if (!o && !this.options.dropOnEmpty) return 4872 if (this.currentContainer === this.containers[p]) { 4873 return ( 4874 this.currentContainer.containerCache.over || 4875 (this.containers[p]._trigger('over', e, this._uiHash()), 4876 (this.currentContainer.containerCache.over = 1)), 4877 void 0 4878 ) 4879 } 4880 o 4881 ? this._rearrange(e, o, null, !0) 4882 : this._rearrange(e, null, this.containers[p].element, !0), 4883 this._trigger('change', e, this._uiHash()), 4884 this.containers[p]._trigger('change', e, this._uiHash(this)), 4885 (this.currentContainer = this.containers[p]), 4886 this.options.placeholder.update( 4887 this.currentContainer, 4888 this.placeholder 4889 ), 4890 this.containers[p]._trigger('over', e, this._uiHash(this)), 4891 (this.containers[p].containerCache.over = 1) 4892 } 4893 } 4894 }, 4895 _createHelper(e) { 4896 let i = this.options, 4897 s = t.isFunction(i.helper) 4898 ? t(i.helper.apply(this.element[0], [e, this.currentItem])) 4899 : i.helper === 'clone' 4900 ? this.currentItem.clone() 4901 : this.currentItem 4902 return ( 4903 s.parents('body').length || 4904 t( 4905 i.appendTo !== 'parent' 4906 ? i.appendTo 4907 : this.currentItem[0].parentNode 4908 )[0].appendChild(s[0]), 4909 s[0] === this.currentItem[0] && 4910 (this._storedCSS = { 4911 width: this.currentItem[0].style.width, 4912 height: this.currentItem[0].style.height, 4913 position: this.currentItem.css('position'), 4914 top: this.currentItem.css('top'), 4915 left: this.currentItem.css('left') 4916 }), 4917 (!s[0].style.width || i.forceHelperSize) && 4918 s.width(this.currentItem.width()), 4919 (!s[0].style.height || i.forceHelperSize) && 4920 s.height(this.currentItem.height()), 4921 s 4922 ) 4923 }, 4924 _adjustOffsetFromHelper(e) { 4925 typeof e === 'string' && (e = e.split(' ')), 4926 t.isArray(e) && (e = { left: +e[0], top: +e[1] || 0 }), 4927 'left' in e && (this.offset.click.left = e.left + this.margins.left), 4928 'right' in e && 4929 (this.offset.click.left = 4930 this.helperProportions.width - e.right + this.margins.left), 4931 'top' in e && (this.offset.click.top = e.top + this.margins.top), 4932 'bottom' in e && 4933 (this.offset.click.top = 4934 this.helperProportions.height - e.bottom + this.margins.top) 4935 }, 4936 _getParentOffset() { 4937 this.offsetParent = this.helper.offsetParent() 4938 let e = this.offsetParent.offset() 4939 return ( 4940 this.cssPosition === 'absolute' && 4941 this.scrollParent[0] !== this.document[0] && 4942 t.contains(this.scrollParent[0], this.offsetParent[0]) && 4943 ((e.left += this.scrollParent.scrollLeft()), 4944 (e.top += this.scrollParent.scrollTop())), 4945 (this.offsetParent[0] === this.document[0].body || 4946 (this.offsetParent[0].tagName && 4947 this.offsetParent[0].tagName.toLowerCase() === 'html' && 4948 t.ui.ie)) && 4949 (e = { top: 0, left: 0 }), 4950 { 4951 top: 4952 e.top + 4953 (parseInt(this.offsetParent.css('borderTopWidth'), 10) || 0), 4954 left: 4955 e.left + 4956 (parseInt(this.offsetParent.css('borderLeftWidth'), 10) || 0) 4957 } 4958 ) 4959 }, 4960 _getRelativeOffset() { 4961 if (this.cssPosition === 'relative') { 4962 const t = this.currentItem.position() 4963 return { 4964 top: 4965 t.top - 4966 (parseInt(this.helper.css('top'), 10) || 0) + 4967 this.scrollParent.scrollTop(), 4968 left: 4969 t.left - 4970 (parseInt(this.helper.css('left'), 10) || 0) + 4971 this.scrollParent.scrollLeft() 4972 } 4973 } 4974 return { top: 0, left: 0 } 4975 }, 4976 _cacheMargins() { 4977 this.margins = { 4978 left: parseInt(this.currentItem.css('marginLeft'), 10) || 0, 4979 top: parseInt(this.currentItem.css('marginTop'), 10) || 0 4980 } 4981 }, 4982 _cacheHelperProportions() { 4983 this.helperProportions = { 4984 width: this.helper.outerWidth(), 4985 height: this.helper.outerHeight() 4986 } 4987 }, 4988 _setContainment() { 4989 let e, 4990 i, 4991 s, 4992 n = this.options 4993 n.containment === 'parent' && 4994 (n.containment = this.helper[0].parentNode), 4995 (n.containment === 'document' || n.containment === 'window') && 4996 (this.containment = [ 4997 0 - this.offset.relative.left - this.offset.parent.left, 4998 0 - this.offset.relative.top - this.offset.parent.top, 4999 n.containment === 'document' 5000 ? this.document.width() 5001 : this.window.width() - 5002 this.helperProportions.width - 5003 this.margins.left, 5004 (n.containment === 'document' 5005 ? this.document.height() || 5006 document.body.parentNode.scrollHeight 5007 : this.window.height() || 5008 this.document[0].body.parentNode.scrollHeight) - 5009 this.helperProportions.height - 5010 this.margins.top 5011 ]), 5012 /^(document|window|parent)$/.test(n.containment) || 5013 ((e = t(n.containment)[0]), 5014 (i = t(n.containment).offset()), 5015 (s = t(e).css('overflow') !== 'hidden'), 5016 (this.containment = [ 5017 i.left + 5018 (parseInt(t(e).css('borderLeftWidth'), 10) || 0) + 5019 (parseInt(t(e).css('paddingLeft'), 10) || 0) - 5020 this.margins.left, 5021 i.top + 5022 (parseInt(t(e).css('borderTopWidth'), 10) || 0) + 5023 (parseInt(t(e).css('paddingTop'), 10) || 0) - 5024 this.margins.top, 5025 i.left + 5026 (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - 5027 (parseInt(t(e).css('borderLeftWidth'), 10) || 0) - 5028 (parseInt(t(e).css('paddingRight'), 10) || 0) - 5029 this.helperProportions.width - 5030 this.margins.left, 5031 i.top + 5032 (s 5033 ? Math.max(e.scrollHeight, e.offsetHeight) 5034 : e.offsetHeight) - 5035 (parseInt(t(e).css('borderTopWidth'), 10) || 0) - 5036 (parseInt(t(e).css('paddingBottom'), 10) || 0) - 5037 this.helperProportions.height - 5038 this.margins.top 5039 ])) 5040 }, 5041 _convertPositionTo(e, i) { 5042 i || (i = this.position) 5043 let s = e === 'absolute' ? 1 : -1, 5044 n = 5045 this.cssPosition !== 'absolute' || 5046 (this.scrollParent[0] !== this.document[0] && 5047 t.contains(this.scrollParent[0], this.offsetParent[0])) 5048 ? this.scrollParent 5049 : this.offsetParent, 5050 o = /(html|body)/i.test(n[0].tagName) 5051 return { 5052 top: 5053 i.top + 5054 this.offset.relative.top * s + 5055 this.offset.parent.top * s - 5056 (this.cssPosition === 'fixed' 5057 ? -this.scrollParent.scrollTop() 5058 : o 5059 ? 0 5060 : n.scrollTop()) * 5061 s, 5062 left: 5063 i.left + 5064 this.offset.relative.left * s + 5065 this.offset.parent.left * s - 5066 (this.cssPosition === 'fixed' 5067 ? -this.scrollParent.scrollLeft() 5068 : o 5069 ? 0 5070 : n.scrollLeft()) * 5071 s 5072 } 5073 }, 5074 _generatePosition(e) { 5075 let i, 5076 s, 5077 n = this.options, 5078 o = e.pageX, 5079 a = e.pageY, 5080 r = 5081 this.cssPosition !== 'absolute' || 5082 (this.scrollParent[0] !== this.document[0] && 5083 t.contains(this.scrollParent[0], this.offsetParent[0])) 5084 ? this.scrollParent 5085 : this.offsetParent, 5086 l = /(html|body)/i.test(r[0].tagName) 5087 return ( 5088 this.cssPosition !== 'relative' || 5089 (this.scrollParent[0] !== this.document[0] && 5090 this.scrollParent[0] !== this.offsetParent[0]) || 5091 (this.offset.relative = this._getRelativeOffset()), 5092 this.originalPosition && 5093 (this.containment && 5094 (e.pageX - this.offset.click.left < this.containment[0] && 5095 (o = this.containment[0] + this.offset.click.left), 5096 e.pageY - this.offset.click.top < this.containment[1] && 5097 (a = this.containment[1] + this.offset.click.top), 5098 e.pageX - this.offset.click.left > this.containment[2] && 5099 (o = this.containment[2] + this.offset.click.left), 5100 e.pageY - this.offset.click.top > this.containment[3] && 5101 (a = this.containment[3] + this.offset.click.top)), 5102 n.grid && 5103 ((i = 5104 this.originalPageY + 5105 Math.round((a - this.originalPageY) / n.grid[1]) * n.grid[1]), 5106 (a = this.containment 5107 ? i - this.offset.click.top >= this.containment[1] && 5108 i - this.offset.click.top <= this.containment[3] 5109 ? i 5110 : i - this.offset.click.top >= this.containment[1] 5111 ? i - n.grid[1] 5112 : i + n.grid[1] 5113 : i), 5114 (s = 5115 this.originalPageX + 5116 Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0]), 5117 (o = this.containment 5118 ? s - this.offset.click.left >= this.containment[0] && 5119 s - this.offset.click.left <= this.containment[2] 5120 ? s 5121 : s - this.offset.click.left >= this.containment[0] 5122 ? s - n.grid[0] 5123 : s + n.grid[0] 5124 : s))), 5125 { 5126 top: 5127 a - 5128 this.offset.click.top - 5129 this.offset.relative.top - 5130 this.offset.parent.top + 5131 (this.cssPosition === 'fixed' 5132 ? -this.scrollParent.scrollTop() 5133 : l 5134 ? 0 5135 : r.scrollTop()), 5136 left: 5137 o - 5138 this.offset.click.left - 5139 this.offset.relative.left - 5140 this.offset.parent.left + 5141 (this.cssPosition === 'fixed' 5142 ? -this.scrollParent.scrollLeft() 5143 : l 5144 ? 0 5145 : r.scrollLeft()) 5146 } 5147 ) 5148 }, 5149 _rearrange(t, e, i, s) { 5150 i 5151 ? i[0].appendChild(this.placeholder[0]) 5152 : e.item[0].parentNode.insertBefore( 5153 this.placeholder[0], 5154 this.direction === 'down' ? e.item[0] : e.item[0].nextSibling 5155 ), 5156 (this.counter = this.counter ? ++this.counter : 1) 5157 const n = this.counter 5158 this._delay(function() { 5159 n === this.counter && this.refreshPositions(!s) 5160 }) 5161 }, 5162 _clear(t, e) { 5163 function i(t, e, i) { 5164 return function(s) { 5165 i._trigger(t, s, e._uiHash(e)) 5166 } 5167 } 5168 this.reverting = !1 5169 let s, 5170 n = [] 5171 if ( 5172 (!this._noFinalSort && 5173 this.currentItem.parent().length && 5174 this.placeholder.before(this.currentItem), 5175 (this._noFinalSort = null),
5176 this.helper[0] === this.currentItem[0]) 5177 ) { 5178 for (s in this._storedCSS) { 5179 ;(this._storedCSS[s] === 'auto' || 5180 this._storedCSS[s] === 'static') && 5181 (this._storedCSS[s] = '') 5182 } 5183 this.currentItem.css(this._storedCSS), 5184 this._removeClass(this.currentItem, 'ui-sortable-helper') 5185 } else this.currentItem.show() 5186 for ( 5187 this.fromOutside && 5188 !e && 5189 n.push(function(t) { 5190 this._trigger('receive', t, this._uiHash(this.fromOutside)) 5191 }), 5192 (!this.fromOutside && 5193 this.domPosition.prev === 5194 this.currentItem.prev().not('.ui-sortable-helper')[0] && 5195 this.domPosition.parent === this.currentItem.parent()[0]) || 5196 e || 5197 n.push(function(t) { 5198 this._trigger('update', t, this._uiHash()) 5199 }), 5200 this !== this.currentContainer && 5201 (e || 5202 (n.push(function(t) { 5203 this._trigger('remove', t, this._uiHash()) 5204 }), 5205 n.push( 5206 function(t) { 5207 return function(e) { 5208 t._trigger('receive', e, this._uiHash(this)) 5209 } 5210 }.call(this, this.currentContainer) 5211 ), 5212 n.push( 5213 function(t) { 5214 return function(e) { 5215 t._trigger('update', e, this._uiHash(this)) 5216 } 5217 }.call(this, this.currentContainer) 5218 ))), 5219 s = this.containers.length - 1; 5220 s >= 0; 5221 s-- 5222 ) { 5223 e || n.push(i('deactivate', this, this.containers[s])), 5224 this.containers[s].containerCache.over && 5225 (n.push(i('out', this, this.containers[s])), 5226 (this.containers[s].containerCache.over = 0)) 5227 } 5228 if ( 5229 (this.storedCursor && 5230 (this.document.find('body').css('cursor', this.storedCursor), 5231 this.storedStylesheet.remove()), 5232 this._storedOpacity && 5233 this.helper.css('opacity', this._storedOpacity), 5234 this._storedZIndex && 5235 this.helper.css( 5236 'zIndex', 5237 this._storedZIndex === 'auto' ? '' : this._storedZIndex 5238 ), 5239 (this.dragging = !1), 5240 e || this._trigger('beforeStop', t, this._uiHash()), 5241 this.placeholder[0].parentNode.removeChild(this.placeholder[0]), 5242 this.cancelHelperRemoval || 5243 (this.helper[0] !== this.currentItem[0] && this.helper.remove(), 5244 (this.helper = null)), 5245 !e) 5246 ) { 5247 for (s = 0; n.length > s; s++) n[s].call(this, t) 5248 this._trigger('stop', t, this._uiHash()) 5249 } 5250 return (this.fromOutside = !1), !this.cancelHelperRemoval 5251 }, 5252 _trigger() { 5253 t.Widget.prototype._trigger.apply(this, arguments) === !1 && 5254 this.cancel() 5255 }, 5256 _uiHash(e) { 5257 const i = e || this 5258 return { 5259 helper: i.helper, 5260 placeholder: i.placeholder || t([]), 5261 position: i.position, 5262 originalPosition: i.originalPosition, 5263 offset: i.positionAbs, 5264 item: i.currentItem, 5265 sender: e ? e.element : null 5266 } 5267 } 5268 }), 5269 t.widget('ui.slider', t.ui.mouse, { 5270 version: '1.12.1', 5271 widgetEventPrefix: 'slide', 5272 options: { 5273 animate: !1, 5274 classes: { 5275 'ui-slider': 'ui-corner-all', 5276 'ui-slider-handle': 'ui-corner-all', 5277 'ui-slider-range': 'ui-corner-all ui-widget-header' 5278 }, 5279 distance: 0, 5280 max: 100, 5281 min: 0, 5282 orientation: 'horizontal', 5283 range: !1, 5284 step: 1, 5285 value: 0, 5286 values: null, 5287 change: null, 5288 slide: null, 5289 start: null, 5290 stop: null 5291 }, 5292 numPages: 5, 5293 _create() { 5294 ;(this._keySliding = !1), 5295 (this._mouseSliding = !1), 5296 (this._animateOff = !0), 5297 (this._handleIndex = null),
5298 this._detectOrientation(), 5299 this._mouseInit(), 5300 this._calculateNewMax(), 5301 this._addClass( 5302 `ui-slider ui-slider-${this.orientation}`, 5303 'ui-widget ui-widget-content' 5304 ), 5305 this._refresh(), 5306 (this._animateOff = !1) 5307 }, 5308 _refresh() { 5309 this._createRange(), 5310 this._createHandles(), 5311 this._setupEvents(), 5312 this._refreshValue() 5313 }, 5314 _createHandles() { 5315 let e, 5316 i, 5317 s = this.options, 5318 n = this.element.find('.ui-slider-handle'), 5319 o = "<span tabindex='0'></span>", 5320 a = [] 5321 for ( 5322 i = (s.values && s.values.length) || 1, 5323 n.length > i && (n.slice(i).remove(), (n = n.slice(0, i))), 5324 e = n.length; 5325 i > e; 5326 e++ 5327 ) { 5328 a.push(o) 5329 } 5330 ;(this.handles = n.add(t(a.join('')).appendTo(this.element))), 5331 this._addClass(this.handles, 'ui-slider-handle', 'ui-state-default'), 5332 (this.handle = this.handles.eq(0)), 5333 this.handles.each(function(e) { 5334 t(this) 5335 .data('ui-slider-handle-index', e) 5336 .attr('tabIndex', 0) 5337 }) 5338 }, 5339 _createRange() { 5340 const e = this.options 5341 e.range 5342 ? (e.range === !0 && 5343 (e.values 5344 ? e.values.length && e.values.length !== 2 5345 ? (e.values = [e.values[0], e.values[0]]) 5346 : t.isArray(e.values) && (e.values = e.values.slice(0)) 5347 : (e.values = [this._valueMin(), this._valueMin()])), 5348 this.range && this.range.length 5349 ? (this._removeClass( 5350 this.range, 5351 'ui-slider-range-min ui-slider-range-max' 5352 ), 5353 this.range.css({ left: '', bottom: '' })) 5354 : ((this.range = t('<div>').appendTo(this.element)), 5355 this._addClass(this.range, 'ui-slider-range')), 5356 (e.range === 'min' || e.range === 'max') && 5357 this._addClass(this.range, `ui-slider-range-${e.range}`)) 5358 : (this.range && this.range.remove(), (this.range = null)) 5359 }, 5360 _setupEvents() { 5361 this._off(this.handles), 5362 this._on(this.handles, this._handleEvents), 5363 this._hoverable(this.handles), 5364 this._focusable(this.handles) 5365 }, 5366 _destroy() { 5367 this.handles.remove(), 5368 this.range && this.range.remove(), 5369 this._mouseDestroy() 5370 }, 5371 _mouseCapture(e) { 5372 let i, 5373 s, 5374 n, 5375 o, 5376 a, 5377 r, 5378 l, 5379 h, 5380 c = this, 5381 u = this.options 5382 return u.disabled 5383 ? !1 5384 : ((this.elementSize = { 5385 width: this.element.outerWidth(), 5386 height: this.element.outerHeight() 5387 }), 5388 (this.elementOffset = this.element.offset()), 5389 (i = { x: e.pageX, y: e.pageY }), 5390 (s = this._normValueFromMouse(i)), 5391 (n = this._valueMax() - this._valueMin() + 1), 5392 this.handles.each(function(e) { 5393 const i = Math.abs(s - c.values(e)) 5394 ;(n > i || 5395 (n === i && 5396 (e === c._lastChangedValue || c.values(e) === u.min))) && 5397 ((n = i), (o = t(this)), (a = e)) 5398 }), 5399 (r = this._start(e, a)), 5400 r === !1 5401 ? !1 5402 : ((this._mouseSliding = !0), 5403 (this._handleIndex = a), 5404 this._addClass(o, null, 'ui-state-active'), 5405 o.trigger('focus'), 5406 (l = o.offset()), 5407 (h = !t(e.target) 5408 .parents() 5409 .addBack() 5410 .is('.ui-slider-handle')), 5411 (this._clickOffset = h 5412 ? { left: 0, top: 0 } 5413 : { 5414 left: e.pageX - l.left - o.width() / 2, 5415 top: 5416 e.pageY - 5417 l.top - 5418 o.height() / 2 - 5419 (parseInt(o.css('borderTopWidth'), 10) || 0) - 5420 (parseInt(o.css('borderBottomWidth'), 10) || 0) + 5421 (parseInt(o.css('marginTop'), 10) || 0) 5422 }), 5423 this.handles.hasClass('ui-state-hover') || this._slide(e, a, s), 5424 (this._animateOff = !0), 5425 !0)) 5426 }, 5427 _mouseStart() { 5428 return !0 5429 }, 5430 _mouseDrag(t) { 5431 let e = { x: t.pageX, y: t.pageY }, 5432 i = this._normValueFromMouse(e) 5433 return this._slide(t, this._handleIndex, i), !1 5434 }, 5435 _mouseStop(t) { 5436 return ( 5437 this._removeClass(this.handles, null, 'ui-state-active'), 5438 (this._mouseSliding = !1), 5439 this._stop(t, this._handleIndex), 5440 this._change(t, this._handleIndex), 5441 (this._handleIndex = null),
5442 (this._clickOffset = null), 5443 (this._animateOff = !1), 5444 !1 5445 ) 5446 }, 5447 _detectOrientation() { 5448 this.orientation = 5449 this.options.orientation === 'vertical' ? 'vertical' : 'horizontal' 5450 }, 5451 _normValueFromMouse(t) { 5452 let e, i, s, n, o 5453 return ( 5454 this.orientation === 'horizontal' 5455 ? ((e = this.elementSize.width), 5456 (i = 5457 t.x - 5458 this.elementOffset.left - 5459 (this._clickOffset ? this._clickOffset.left : 0))) 5460 : ((e = this.elementSize.height), 5461 (i = 5462 t.y - 5463 this.elementOffset.top - 5464 (this._clickOffset ? this._clickOffset.top : 0))), 5465 (s = i / e), 5466 s > 1 && (s = 1), 5467 s < 0 && (s = 0), 5468 this.orientation === 'vertical' && (s = 1 - s), 5469 (n = this._valueMax() - this._valueMin()), 5470 (o = this._valueMin() + s * n), 5471 this._trimAlignValue(o) 5472 ) 5473 }, 5474 _uiHash(t, e, i) { 5475 const s = { 5476 handle: this.handles[t], 5477 handleIndex: t, 5478 value: void 0 !== e ? e : this.value() 5479 } 5480 return ( 5481 this._hasMultipleValues() && 5482 ((s.value = void 0 !== e ? e : this.values(t)), 5483 (s.values = i || this.values())), 5484 s 5485 ) 5486 }, 5487 _hasMultipleValues() { 5488 return this.options.values && this.options.values.length 5489 }, 5490 _start(t, e) { 5491 return this._trigger('start', t, this._uiHash(e)) 5492 }, 5493 _slide(t, e, i) { 5494 let s, 5495 n, 5496 o = this.value(), 5497 a = this.values() 5498 this._hasMultipleValues() && 5499 ((n = this.values(e ? 0 : 1)), 5500 (o = this.values(e)), 5501 this.options.values.length === 2 && 5502 this.options.range === !0 && 5503 (i = e === 0 ? Math.min(n, i) : Math.max(n, i)), 5504 (a[e] = i)), 5505 i !== o && 5506 ((s = this._trigger('slide', t, this._uiHash(e, i, a))), 5507 s !== !1 && 5508 (this._hasMultipleValues() ? this.values(e, i) : this.value(i))) 5509 }, 5510 _stop(t, e) { 5511 this._trigger('stop', t, this._uiHash(e)) 5512 }, 5513 _change(t, e) { 5514 this._keySliding || 5515 this._mouseSliding || 5516 ((this._lastChangedValue = e), 5517 this._trigger('change', t, this._uiHash(e))) 5518 }, 5519 value(t) { 5520 return arguments.length 5521 ? ((this.options.value = this._trimAlignValue(t)), 5522 this._refreshValue(), 5523 this._change(null, 0), 5524 void 0) 5525 : this._value() 5526 }, 5527 values(e, i) { 5528 let s, n, o 5529 if (arguments.length > 1) { 5530 return ( 5531 (this.options.values[e] = this._trimAlignValue(i)), 5532 this._refreshValue(), 5533 this._change(null, e), 5534 void 0 5535 ) 5536 } 5537 if (!arguments.length) return this._values() 5538 if (!t.isArray(arguments[0])) { 5539 return this._hasMultipleValues() ? this._values(e) : this.value() 5540 } 5541 for ( 5542 s = this.options.values, n = arguments[0], o = 0; 5543 s.length > o; 5544 o += 1 5545 ) { 5546 ;(s[o] = this._trimAlignValue(n[o])), this._change(null, o) 5547 } 5548 this._refreshValue() 5549 }, 5550 _setOption(e, i) { 5551 let s, 5552 n = 0 5553 switch ( 5554 (e === 'range' && 5555 this.options.range === !0 && 5556 (i === 'min' 5557 ? ((this.options.value = this._values(0)), 5558 (this.options.values = null)) 5559 : i === 'max' && 5560 ((this.options.value = this._values( 5561 this.options.values.length - 1 5562 )), 5563 (this.options.values = null))), 5564 t.isArray(this.options.values) && (n = this.options.values.length), 5565 this._super(e, i), 5566 e) 5567 ) { 5568 case 'orientation': 5569 this._detectOrientation(), 5570 this._removeClass( 5571 'ui-slider-horizontal ui-slider-vertical' 5572 )._addClass(`ui-slider-${this.orientation}`), 5573 this._refreshValue(), 5574 this.options.range && this._refreshRange(i), 5575 this.handles.css(i === 'horizontal' ? 'bottom' : 'left', '') 5576 break 5577 case 'value': 5578 ;(this._animateOff = !0), 5579 this._refreshValue(), 5580 this._change(null, 0), 5581 (this._animateOff = !1) 5582 break 5583 case 'values': 5584 for ( 5585 this._animateOff = !0, this._refreshValue(), s = n - 1; 5586 s >= 0; 5587 s-- 5588 ) { 5589 this._change(null, s) 5590 } 5591 this._animateOff = !1 5592 break 5593 case 'step': 5594 case 'min': 5595 case 'max': 5596 ;(this._animateOff = !0), 5597 this._calculateNewMax(), 5598 this._refreshValue(), 5599 (this._animateOff = !1) 5600 break 5601 case 'range': 5602 ;(this._animateOff = !0), this._refresh(), (this._animateOff = !1) 5603 } 5604 }, 5605 _setOptionDisabled(t) { 5606 this._super(t), this._toggleClass(null, 'ui-state-disabled', !!t) 5607 },
5608 _value() { 5609 let t = this.options.value 5610 return (t = this._trimAlignValue(t)) 5611 }, 5612 _values(t) { 5613 let e, i, s 5614 if (arguments.length) { 5615 return (e = this.options.values[t]), (e = this._trimAlignValue(e)) 5616 } 5617 if (this._hasMultipleValues()) { 5618 for (i = this.options.values.slice(), s = 0; i.length > s; s += 1) { 5619 i[s] = this._trimAlignValue(i[s]) 5620 } 5621 return i 5622 } 5623 return [] 5624 }, 5625 _trimAlignValue(t) { 5626 if (this._valueMin() >= t) return this._valueMin() 5627 if (t >= this._valueMax()) return this._valueMax() 5628 let e = this.options.step > 0 ? this.options.step : 1, 5629 i = (t - this._valueMin()) % e, 5630 s = t - i 5631 return ( 5632 2 * Math.abs(i) >= e && (s += i > 0 ? e : -e), 5633 parseFloat(s.toFixed(5)) 5634 ) 5635 }, 5636 _calculateNewMax() { 5637 let t = this.options.max, 5638 e = this._valueMin(), 5639 i = this.options.step, 5640 s = Math.round((t - e) / i) * i 5641 ;(t = s + e), 5642 t > this.options.max && (t -= i), 5643 (this.max = parseFloat(t.toFixed(this._precision()))) 5644 }, 5645 _precision() { 5646 let t = this._precisionOf(this.options.step) 5647 return ( 5648 this.options.min !== null && 5649 (t = Math.max(t, this._precisionOf(this.options.min))), 5650 t 5651 ) 5652 }, 5653 _precisionOf(t) { 5654 let e = `${t}`, 5655 i = e.indexOf('.') 5656 return i === -1 ? 0 : e.length - i - 1 5657 }, 5658 _valueMin() { 5659 return this.options.min 5660 }, 5661 _valueMax() { 5662 return this.max 5663 }, 5664 _refreshRange(t) { 5665 t === 'vertical' && this.range.css({ width: '', left: '' }), 5666 t === 'horizontal' && this.range.css({ height: '', bottom: '' }) 5667 }, 5668 _refreshValue() { 5669 let e, 5670 i, 5671 s, 5672 n, 5673 o, 5674 a = this.options.range, 5675 r = this.options, 5676 l = this, 5677 h = this._animateOff ? !1 : r.animate, 5678 c = {} 5679 this._hasMultipleValues() 5680 ? this.handles.each(function(s) { 5681 ;(i = 5682 100 * 5683 ((l.values(s) - l._valueMin()) / 5684 (l._valueMax() - l._valueMin()))), 5685 (c[ 5686 l.orientation === 'horizontal' ? 'left' : 'bottom' 5687 ] = `${i}%`), 5688 t(this) 5689 .stop(1, 1) 5690 [h ? 'animate' : 'css'](c, r.animate), 5691 l.options.range === !0 && 5692 (l.orientation === 'horizontal' 5693 ? (s === 0 && 5694 l.range 5695 .stop(1, 1) 5696 [h ? 'animate' : 'css']({ left: `${i}%` }, r.animate), 5697 s === 1 && 5698 l.range[h ? 'animate' : 'css']( 5699 { width: `${i - e}%` }, 5700 { queue: !1, duration: r.animate } 5701 )) 5702 : (s === 0 && 5703 l.range 5704 .stop(1, 1) 5705 [h ? 'animate' : 'css']( 5706 { bottom: `${i}%` }, 5707 r.animate 5708 ), 5709 s === 1 && 5710 l.range[h ? 'animate' : 'css']( 5711 { height: `${i - e}%` }, 5712 { queue: !1, duration: r.animate } 5713 ))), 5714 (e = i) 5715 }) 5716 : ((s = this.value()), 5717 (n = this._valueMin()), 5718 (o = this._valueMax()), 5719 (i = o !== n ? 100 * ((s - n) / (o - n)) : 0), 5720 (c[ 5721 this.orientation === 'horizontal' ? 'left' : 'bottom' 5722 ] = `${i}%`), 5723 this.handle.stop(1, 1)[h ? 'animate' : 'css'](c, r.animate), 5724 a === 'min' && 5725 this.orientation === 'horizontal' && 5726 this.range 5727 .stop(1, 1) 5728 [h ? 'animate' : 'css']({ width: `${i}%` }, r.animate), 5729 a === 'max' && 5730 this.orientation === 'horizontal' && 5731 this.range 5732 .stop(1, 1) 5733 [h ? 'animate' : 'css']({ width: `${100 - i}%` }, r.animate), 5734 a === 'min' && 5735 this.orientation === 'vertical' && 5736 this.range 5737 .stop(1, 1) 5738 [h ? 'animate' : 'css']({ height: `${i}%` }, r.animate), 5739 a === 'max' && 5740 this.orientation === 'vertical' && 5741 this.range 5742 .stop(1, 1) 5743 [h ? 'animate' : 'css']({ height: `${100 - i}%` }, r.animate)) 5744 }, 5745 _handleEvents: { 5746 keydown(e) { 5747 let i, 5748 s, 5749 n, 5750 o, 5751 a = t(e.target).data('ui-slider-handle-index') 5752 switch (e.keyCode) { 5753 case t.ui.keyCode.HOME: 5754 case t.ui.keyCode.END: 5755 case t.ui.keyCode.PAGE_UP: 5756 case t.ui.keyCode.PAGE_DOWN: 5757 case t.ui.keyCode.UP: 5758 case t.ui.keyCode.RIGHT: 5759 case t.ui.keyCode.DOWN: 5760 case t.ui.keyCode.LEFT: 5761 if ( 5762 (e.preventDefault(), 5763 !this._keySliding && 5764 ((this._keySliding = !0), 5765 this._addClass(t(e.target), null, 'ui-state-active'), 5766 (i = this._start(e, a)), 5767 i === !1)) 5768 ) { 5769 return 5770 } 5771 } 5772 switch ( 5773 ((o = this.options.step), 5774 (s = n = this._hasMultipleValues() ? this.values(a) : this.value()), 5775 e.keyCode) 5776 ) { 5777 case t.ui.keyCode.HOME: 5778 n = this._valueMin() 5779 break 5780 case t.ui.keyCode.END: 5781 n = this._valueMax() 5782 break 5783 case t.ui.keyCode.PAGE_UP: 5784 n = this._trimAlignValue( 5785 s + (this._valueMax() - this._valueMin()) / this.numPages 5786 ) 5787 break 5788 case t.ui.keyCode.PAGE_DOWN: 5789 n = this._trimAlignValue( 5790 s - (this._valueMax() - this._valueMin()) / this.numPages 5791 ) 5792 break 5793 case t.ui.keyCode.UP: 5794 case t.ui.keyCode.RIGHT: 5795 if (s === this._valueMax()) return 5796 n = this._trimAlignValue(s + o) 5797 break 5798 case t.ui.keyCode.DOWN: 5799 case t.ui.keyCode.LEFT: 5800 if (s === this._valueMin()) return 5801 n = this._trimAlignValue(s - o) 5802 } 5803 this._slide(e, a, n) 5804 }, 5805 keyup(e) { 5806 const i = t(e.target).data('ui-slider-handle-index') 5807 this._keySliding && 5808 ((this._keySliding = !1), 5809 this._stop(e, i), 5810 this._change(e, i), 5811 this._removeClass(t(e.target), null, 'ui-state-active')) 5812 } 5813 } 5814 }), 5815 t.widget('ui.tooltip', { 5816 version: '1.12.1', 5817 options: { 5818 classes: { 'ui-tooltip': 'ui-corner-all ui-widget-shadow' }, 5819 content() { 5820 const e = t(this).attr('title') || '' 5821 return t('<a>') 5822 .text(e) 5823 .html() 5824 }, 5825 hide: !0, 5826 items: '[title]:not([disabled])', 5827 position: { 5828 my: 'left top+15', 5829 at: 'left bottom', 5830 collision: 'flipfit flip' 5831 }, 5832 show: !0, 5833 track: !1, 5834 close: null, 5835 open: null 5836 }, 5837 _addDescribedBy(e, i) { 5838 const s = (e.attr('aria-describedby') || '').split(/\s+/) 5839 s.push(i), 5840 e 5841 .data('ui-tooltip-id', i) 5842 .attr('aria-describedby', t.trim(s.join(' '))) 5843 }, 5844 _removeDescribedBy(e) { 5845 let i = e.data('ui-tooltip-id'), 5846 s = (e.attr('aria-describedby') || '').split(/\s+/), 5847 n = t.inArray(i, s) 5848 n !== -1 && s.splice(n, 1), 5849 e.removeData('ui-tooltip-id'), 5850 (s = t.trim(s.join(' '))), 5851 s ? e.attr('aria-describedby', s) : e.removeAttr('aria-describedby') 5852 }, 5853 _create() {
5854 this._on({ mouseover: 'open', focusin: 'open' }), 5855 (this.tooltips = {}), 5856 (this.parents = {}), 5857 (this.liveRegion = t('<div>') 5858 .attr({ 5859 role: 'log', 5860 'aria-live': 'assertive', 5861 'aria-relevant': 'additions' 5862 }) 5863 .appendTo(this.document[0].body)), 5864 this._addClass(this.liveRegion, null, 'ui-helper-hidden-accessible'), 5865 (this.disabledTitles = t([])) 5866 }, 5867 _setOption(e, i) { 5868 const s = this 5869 this._super(e, i), 5870 e === 'content' && 5871 t.each(this.tooltips, function(t, e) { 5872 s._updateContent(e.element) 5873 }) 5874 }, 5875 _setOptionDisabled(t) { 5876 this[t ? '_disable' : '_enable']() 5877 }, 5878 _disable() { 5879 const e = this 5880 t.each(this.tooltips, function(i, s) { 5881 const n = t.Event('blur') 5882 ;(n.target = n.currentTarget = s.element[0]), e.close(n, !0) 5883 }), 5884 (this.disabledTitles = this.disabledTitles.add( 5885 this.element 5886 .find(this.options.items) 5887 .addBack() 5888 .filter(function() { 5889 const e = t(this) 5890 return e.is('[title]') 5891 ? e 5892 .data('ui-tooltip-title', e.attr('title')) 5893 .removeAttr('title') 5894 : void 0 5895 }) 5896 )) 5897 }, 5898 _enable() { 5899 this.disabledTitles.each(function() { 5900 const e = t(this) 5901 e.data('ui-tooltip-title') && 5902 e.attr('title', e.data('ui-tooltip-title')) 5903 }), 5904 (this.disabledTitles = t([])) 5905 }, 5906 open(e) { 5907 let i = this, 5908 s = t(e ? e.target : this.element).closest(this.options.items) 5909 s.length && 5910 !s.data('ui-tooltip-id') && 5911 (s.attr('title') && s.data('ui-tooltip-title', s.attr('title')), 5912 s.data('ui-tooltip-open', !0), 5913 e && 5914 e.type === 'mouseover' && 5915 s.parents().each(function() { 5916 let e, 5917 s = t(this) 5918 s.data('ui-tooltip-open') && 5919 ((e = t.Event('blur')), 5920 (e.target = e.currentTarget = this), 5921 i.close(e, !0)), 5922 s.attr('title') && 5923 (s.uniqueId(), 5924 (i.parents[this.id] = { 5925 element: this, 5926 title: s.attr('title') 5927 }), 5928 s.attr('title', '')) 5929 }), 5930 this._registerCloseHandlers(e, s), 5931 this._updateContent(s, e)) 5932 }, 5933 _updateContent(t, e) { 5934 let i, 5935 s = this.options.content, 5936 n = this, 5937 o = e ? e.type : null 5938 return typeof s === 'string' || s.nodeType || s.jquery 5939 ? this._open(e, t, s) 5940 : ((i = s.call(t[0], function(i) { 5941 n._delay(function() { 5942 t.data('ui-tooltip-open') && 5943 (e && (e.type = o), this._open(e, t, i)) 5944 }) 5945 })), 5946 i && this._open(e, t, i), 5947 void 0) 5948 }, 5949 _open(e, i, s) { 5950 function n(t) { 5951 ;(h.of = t), a.is(':hidden') || a.position(h) 5952 } 5953 var o, 5954 a, 5955 r, 5956 l, 5957 h = t.extend({}, this.options.position) 5958 if (s) { 5959 if ((o = this._find(i))) { 5960 return o.tooltip.find('.ui-tooltip-content').html(s), void 0 5961 } 5962 i.is('[title]') && 5963 (e && e.type === 'mouseover' 5964 ? i.attr('title', '') 5965 : i.removeAttr('title')), 5966 (o = this._tooltip(i)), 5967 (a = o.tooltip), 5968 this._addDescribedBy(i, a.attr('id')), 5969 a.find('.ui-tooltip-content').html(s), 5970 this.liveRegion.children().hide(), 5971 (l = t('<div>').html(a.find('.ui-tooltip-content').html())), 5972 l 5973 .removeAttr('name') 5974 .find('[name]') 5975 .removeAttr('name'), 5976 l 5977 .removeAttr('id') 5978 .find('[id]') 5979 .removeAttr('id'), 5980 l.appendTo(this.liveRegion), 5981 this.options.track && e && /^mouse/.test(e.type) 5982 ? (this._on(this.document, { mousemove: n }), n(e)) 5983 : a.position(t.extend({ of: i }, this.options.position)), 5984 a.hide(), 5985 this._show(a, this.options.show), 5986 this.options.track && 5987 this.options.show && 5988 this.options.show.delay && 5989 (r = this.delayedShow = setInterval(function() { 5990 a.is(':visible') && (n(h.of), clearInterval(r)) 5991 }, t.fx.interval)), 5992 this._trigger('open', e, { tooltip: a }) 5993 } 5994 }, 5995 _registerCloseHandlers(e, i) { 5996 const s = { 5997 keyup(e) { 5998 if (e.keyCode === t.ui.keyCode.ESCAPE) { 5999 const s = t.Event(e) 6000 ;(s.currentTarget = i[0]), this.close(s, !0) 6001 } 6002 } 6003 } 6004 i[0] !== this.element[0] && 6005 (s.remove = function() { 6006 this._removeTooltip(this._find(i).tooltip) 6007 }), 6008 (e && e.type !== 'mouseover') || (s.mouseleave = 'close'), 6009 (e && e.type !== 'focusin') || (s.focusout = 'close'), 6010 this._on(!0, i, s) 6011 }, 6012 close(e) { 6013 let i, 6014 s = this, 6015 n = t(e ? e.currentTarget : this.element), 6016 o = this._find(n) 6017 return o 6018 ? ((i = o.tooltip), 6019 o.closing || 6020 (clearInterval(this.delayedShow), 6021 n.data('ui-tooltip-title') && 6022 !n.attr('title') && 6023 n.attr('title', n.data('ui-tooltip-title')), 6024 this._removeDescribedBy(n), 6025 (o.hiding = !0), 6026 i.stop(!0), 6027 this._hide(i, this.options.hide, function() { 6028 s._removeTooltip(t(this)) 6029 }), 6030 n.removeData('ui-tooltip-open'), 6031 this._off(n, 'mouseleave focusout keyup'), 6032 n[0] !== this.element[0] && this._off(n, 'remove'), 6033 this._off(this.document, 'mousemove'), 6034 e && 6035 e.type === 'mouseleave' && 6036 t.each(this.parents, function(e, i) { 6037 t(i.element).attr('title', i.title), delete s.parents[e] 6038 }), 6039 (o.closing = !0), 6040 this._trigger('close', e, { tooltip: i }), 6041 o.hiding || (o.closing = !1)), 6042 void 0) 6043 : (n.removeData('ui-tooltip-open'), void 0) 6044 }, 6045 _tooltip(e) { 6046 let i = t('<div>').attr('role', 'tooltip'), 6047 s = t('<div>').appendTo(i), 6048 n = i.uniqueId().attr('id') 6049 return ( 6050 this._addClass(s, 'ui-tooltip-content'), 6051 this._addClass(i, 'ui-tooltip', 'ui-widget ui-widget-content'), 6052 i.appendTo(this._appendTo(e)), 6053 (this.tooltips[n] = { element: e, tooltip: i }) 6054 ) 6055 }, 6056 _find(t) { 6057 const e = t.data('ui-tooltip-id')
6058 return e ? this.tooltips[e] : null 6059 }, 6060 _removeTooltip(t) { 6061 t.remove(), delete this.tooltips[t.attr('id')] 6062 }, 6063 _appendTo(t) { 6064 let e = t.closest('.ui-front, dialog') 6065 return e.length || (e = this.document[0].body), e 6066 }, 6067 _destroy() { 6068 const e = this 6069 t.each(this.tooltips, function(i, s) { 6070 let n = t.Event('blur'), 6071 o = s.element 6072 ;(n.target = n.currentTarget = o[0]), 6073 e.close(n, !0), 6074 t(`#${i}`).remove(), 6075 o.data('ui-tooltip-title') && 6076 (o.attr('title') || o.attr('title', o.data('ui-tooltip-title')), 6077 o.removeData('ui-tooltip-title')) 6078 }), 6079 this.liveRegion.remove() 6080 } 6081 }), 6082 t.uiBackCompat !== !1 && 6083 t.widget('ui.tooltip', t.ui.tooltip, { 6084 options: { tooltipClass: null }, 6085 _tooltip() { 6086 const t = this._superApply(arguments) 6087 return ( 6088 this.options.tooltipClass && 6089 t.tooltip.addClass(this.options.tooltipClass), 6090 t 6091 ) 6092 } 6093 }), 6094 t.ui.tooltip 6095 let a = 'ui-effects-', 6096 r = 'ui-effects-style', 6097 l = 'ui-effects-animated', 6098 h = t 6099 ;(t.effects = { effect: {} }), 6100 (function(t, e) { 6101 function i(t, e, i) { 6102 const s = u[e.type] || {} 6103 return t == null 6104 ? i || !e.def 6105 ? null 6106 : e.def 6107 : ((t = s.floor ? ~~t : parseFloat(t)), 6108 isNaN(t) 6109 ? e.def 6110 : s.mod 6111 ? (t + s.mod) % s.mod 6112 : t < 0 6113 ? 0 6114 : t > s.max 6115 ? s.max 6116 : t) 6117 } 6118 function s(i) { 6119 let s = h(), 6120 n = (s._rgba = []) 6121 return ( 6122 (i = i.toLowerCase()), 6123 f(l, function(t, o) { 6124 let a, 6125 r = o.re.exec(i), 6126 l = r && o.parse(r), 6127 h = o.space || 'rgba' 6128 return l 6129 ? ((a = s[h](l)), 6130 (s[c[h].cache] = a[c[h].cache]), 6131 (n = s._rgba = a._rgba), 6132 !1) 6133 : e 6134 }), 6135 n.length 6136 ? (n.join() === '0,0,0,0' && t.extend(n, o.transparent), s) 6137 : o[i] 6138 ) 6139 } 6140 function n(t, e, i) { 6141 return ( 6142 (i = (i + 1) % 1), 6143 6 * i < 1 6144 ? t + 6 * (e - t) * i 6145 : 2 * i < 1 6146 ? e 6147 : 3 * i < 2 6148 ? t + 6 * (e - t) * (2 / 3 - i) 6149 : t 6150 ) 6151 } 6152 var o, 6153 a = 6154 'backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor', 6155 r = /^([\-+])=\s*(\d+\.?\d*)/, 6156 l = [ 6157 { 6158 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 6159 parse(t) { 6160 return [t[1], t[2], t[3], t[4]] 6161 } 6162 }, 6163 { 6164 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 6165 parse(t) { 6166 return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]] 6167 } 6168 }, 6169 { 6170 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 6171 parse(t) { 6172 return [ 6173 parseInt(t[1], 16), 6174 parseInt(t[2], 16), 6175 parseInt(t[3], 16) 6176 ] 6177 } 6178 }, 6179 { 6180 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 6181 parse(t) { 6182 return [ 6183 parseInt(t[1] + t[1], 16), 6184 parseInt(t[2] + t[2], 16), 6185 parseInt(t[3] + t[3], 16) 6186 ] 6187 } 6188 }, 6189 { 6190 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 6191 space: 'hsla', 6192 parse(t) { 6193 return [t[1], t[2] / 100, t[3] / 100, t[4]] 6194 } 6195 } 6196 ], 6197 h = (t.Color = function(e, i, s, n) { 6198 return new t.Color.fn.parse(e, i, s, n) 6199 }), 6200 c = { 6201 rgba: { 6202 props: { 6203 red: { idx: 0, type: 'byte' }, 6204 green: { idx: 1, type: 'byte' }, 6205 blue: { idx: 2, type: 'byte' } 6206 } 6207 }, 6208 hsla: { 6209 props: { 6210 hue: { idx: 0, type: 'degrees' }, 6211 saturation: { idx: 1, type: 'percent' }, 6212 lightness: { idx: 2, type: 'percent' } 6213 } 6214 } 6215 }, 6216 u = { 6217 byte: { floor: !0, max: 255 }, 6218 percent: { max: 1 }, 6219 degrees: { mod: 360, floor: !0 } 6220 }, 6221 d = (h.support = {}), 6222 p = t('<p>')[0], 6223 f = t.each 6224 ;(p.style.cssText = 'background-color:rgba(1,1,1,.5)'), 6225 (d.rgba = p.style.backgroundColor.indexOf('rgba') > -1), 6226 f(c, function(t, e) { 6227 ;(e.cache = `_${t}`), 6228 (e.props.alpha = { idx: 3, type: 'percent', def: 1 }) 6229 }), 6230 (h.fn = t.extend(h.prototype, { 6231 parse(n, a, r, l) { 6232 if (n === e) return (this._rgba = [null, null, null, null]), this 6233 ;(n.jquery || n.nodeType) && ((n = t(n).css(a)), (a = e)) 6234 let u = this, 6235 d = t.type(n), 6236 p = (this._rgba = []) 6237 return ( 6238 a !== e && ((n = [n, a, r, l]), (d = 'array')), 6239 d === 'string' 6240 ? this.parse(s(n) || o._default) 6241 : d === 'array' 6242 ? (f(c.rgba.props, function(t, e) { 6243 p[e.idx] = i(n[e.idx], e) 6244 }), 6245 this) 6246 : d === 'object' 6247 ? (n instanceof h 6248 ? f(c, function(t, e) { 6249 n[e.cache] && (u[e.cache] = n[e.cache].slice()) 6250 }) 6251 : f(c, function(e, s) { 6252 const o = s.cache 6253 f(s.props, function(t, e) { 6254 if (!u[o] && s.to) { 6255 if (t === 'alpha' || n[t] == null) return 6256 u[o] = s.to(u._rgba) 6257 } 6258 u[o][e.idx] = i(n[t], e, !0) 6259 }), 6260 u[o] && 6261 t.inArray(null, u[o].slice(0, 3)) < 0 && 6262 ((u[o][3] = 1),
6263 s.from && (u._rgba = s.from(u[o]))) 6264 }), 6265 this) 6266 : e 6267 ) 6268 }, 6269 is(t) { 6270 let i = h(t), 6271 s = !0, 6272 n = this 6273 return ( 6274 f(c, function(t, o) { 6275 let a, 6276 r = i[o.cache] 6277 return ( 6278 r && 6279 ((a = n[o.cache] || (o.to && o.to(n._rgba)) || []), 6280 f(o.props, function(t, i) { 6281 return r[i.idx] != null ? (s = r[i.idx] === a[i.idx]) : e 6282 })), 6283 s 6284 ) 6285 }), 6286 s 6287 ) 6288 }, 6289 _space() { 6290 let t = [], 6291 e = this 6292 return ( 6293 f(c, function(i, s) { 6294 e[s.cache] && t.push(i) 6295 }), 6296 t.pop() 6297 ) 6298 }, 6299 transition(t, e) { 6300 let s = h(t), 6301 n = s._space(), 6302 o = c[n], 6303 a = this.alpha() === 0 ? h('transparent') : this, 6304 r = a[o.cache] || o.to(a._rgba), 6305 l = r.slice() 6306 return ( 6307 (s = s[o.cache]), 6308 f(o.props, function(t, n) { 6309 let o = n.idx, 6310 a = r[o], 6311 h = s[o], 6312 c = u[n.type] || {} 6313 h !== null && 6314 (a === null 6315 ? (l[o] = h) 6316 : (c.mod && 6317 (h - a > c.mod / 2 6318 ? (a += c.mod) 6319 : a - h > c.mod / 2 && (a -= c.mod)), 6320 (l[o] = i((h - a) * e + a, n)))) 6321 }), 6322 this[n](l) 6323 ) 6324 }, 6325 blend(e) { 6326 if (this._rgba[3] === 1) return this 6327 let i = this._rgba.slice(), 6328 s = i.pop(), 6329 n = h(e)._rgba 6330 return h( 6331 t.map(i, function(t, e) { 6332 return (1 - s) * n[e] + s * t 6333 }) 6334 ) 6335 }, 6336 toRgbaString() { 6337 let e = 'rgba(', 6338 i = t.map(this._rgba, function(t, e) { 6339 return t == null ? (e > 2 ? 1 : 0) : t 6340 }) 6341 return i[3] === 1 && (i.pop(), (e = 'rgb(')), `${e + i.join()})` 6342 }, 6343 toHslaString() { 6344 let e = 'hsla(', 6345 i = t.map(this.hsla(), function(t, e) { 6346 return ( 6347 t == null && (t = e > 2 ? 1 : 0), 6348 e && e < 3 && (t = `${Math.round(100 * t)}%`), 6349 t 6350 ) 6351 }) 6352 return i[3] === 1 && (i.pop(), (e = 'hsl(')), `${e + i.join()})` 6353 }, 6354 toHexString(e) { 6355 let i = this._rgba.slice(), 6356 s = i.pop() 6357 return ( 6358 e && i.push(~~(255 * s)), 6359 `#${t 6360 .map(i, function(t) { 6361 return ( 6362 (t = (t || 0).toString(16)), t.length === 1 ? `0${t}` : t 6363 ) 6364 }) 6365 .join('')}` 6366 ) 6367 }, 6368 toString() { 6369 return this._rgba[3] === 0 ? 'transparent' : this.toRgbaString() 6370 } 6371 })), 6372 (h.fn.parse.prototype = h.fn), 6373 (c.hsla.to = function(t) { 6374 if (t[0] == null || t[1] == null || t[2] == null) { 6375 return [null, null, null, t[3]] 6376 } 6377 let e, 6378 i, 6379 s = t[0] / 255, 6380 n = t[1] / 255, 6381 o = t[2] / 255, 6382 a = t[3], 6383 r = Math.max(s, n, o), 6384 l = Math.min(s, n, o), 6385 h = r - l, 6386 c = r + l, 6387 u = 0.5 * c 6388 return ( 6389 (e = 6390 l === r 6391 ? 0 6392 : s === r 6393 ? 60 * (n - o) / h + 360 6394 : n === r 6395 ? 60 * (o - s) / h + 120 6396 : 60 * (s - n) / h + 240), 6397 (i = h === 0 ? 0 : u <= 0.5 ? h / c : h / (2 - c)), 6398 [Math.round(e) % 360, i, u, a == null ? 1 : a] 6399 ) 6400 }), 6401 (c.hsla.from = function(t) { 6402 if (t[0] == null || t[1] == null || t[2] == null) { 6403 return [null, null, null, t[3]] 6404 } 6405 let e = t[0] / 360, 6406 i = t[1], 6407 s = t[2], 6408 o = t[3], 6409 a = s <= 0.5 ? s * (1 + i) : s + i - s * i, 6410 r = 2 * s - a 6411 return [ 6412 Math.round(255 * n(r, a, e + 1 / 3)), 6413 Math.round(255 * n(r, a, e)), 6414 Math.round(255 * n(r, a, e - 1 / 3)), 6415 o 6416 ] 6417 }), 6418 f(c, function(s, n) { 6419 let o = n.props, 6420 a = n.cache, 6421 l = n.to, 6422 c = n.from 6423 ;(h.fn[s] = function(s) { 6424 if ((l && !this[a] && (this[a] = l(this._rgba)), s === e)) { 6425 return this[a].slice() 6426 } 6427 let n, 6428 r = t.type(s), 6429 u = r === 'array' || r === 'object' ? s : arguments, 6430 d = this[a].slice() 6431 return ( 6432 f(o, function(t, e) { 6433 let s = u[r === 'object' ? t : e.idx] 6434 s == null && (s = d[e.idx]), (d[e.idx] = i(s, e)) 6435 }), 6436 c ? ((n = h(c(d))), (n[a] = d), n) : h(d) 6437 ) 6438 }), 6439 f(o, function(e, i) { 6440 h.fn[e] || 6441 (h.fn[e] = function(n) { 6442 let o, 6443 a = t.type(n), 6444 l = e === 'alpha' ? (this._hsla ? 'hsla' : 'rgba') : s, 6445 h = this[l](), 6446 c = h[i.idx] 6447 return a === 'undefined' 6448 ? c 6449 : (a === 'function' && 6450 ((n = n.call(this, c)), (a = t.type(n))), 6451 n == null && i.empty 6452 ? this 6453 : (a === 'string' && 6454 ((o = r.exec(n)), 6455 o && 6456 (n = 6457 c + 6458 parseFloat(o[2]) * (o[1] === '+' ? 1 : -1))), 6459 (h[i.idx] = n), 6460 this[l](h))) 6461 }) 6462 }) 6463 }), 6464 (h.hook = function(e) { 6465 const i = e.split(' ') 6466 f(i, function(e, i) { 6467 ;(t.cssHooks[i] = { 6468 set(e, n) { 6469 let o, 6470 a, 6471 r = '' 6472 if ( 6473 n !== 'transparent' && 6474 (t.type(n) !== 'string' || (o = s(n))) 6475 ) { 6476 if (((n = h(o || n)), !d.rgba && n._rgba[3] !== 1)) { 6477 for ( 6478 a = i === 'backgroundColor' ? e.parentNode : e; 6479 (r === '' || r === 'transparent') && a && a.style; 6480 6481 ) { 6482 try { 6483 ;(r = t.css(a, 'backgroundColor')), (a = a.parentNode) 6484 } catch (l) {} 6485 } 6486 n = n.blend(r && r !== 'transparent' ? r : '_default') 6487 } 6488 n = n.toRgbaString() 6489 } 6490 try { 6491 e.style[i] = n 6492 } catch (l) {} 6493 } 6494 }), 6495 (t.fx.step[i] = function(e) { 6496 e.colorInit || 6497 ((e.start = h(e.elem, i)), 6498 (e.end = h(e.end)), 6499 (e.colorInit = !0)), 6500 t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos)) 6501 }) 6502 }) 6503 }), 6504 h.hook(a), 6505 (t.cssHooks.borderColor = { 6506 expand(t) { 6507 const e = {} 6508 return ( 6509 f(['Top', 'Right', 'Bottom', 'Left'], function(i, s) { 6510 e[`border${s}Color`] = t 6511 }), 6512 e 6513 ) 6514 } 6515 }), 6516 (o = t.Color.names = { 6517 aqua: '#00ffff', 6518 black: '#000000', 6519 blue: '#0000ff', 6520 fuchsia: '#ff00ff', 6521 gray: '#808080', 6522 green: '#008000', 6523 lime: '#00ff00', 6524 maroon: '#800000', 6525 navy: '#000080', 6526 olive: '#808000', 6527 purple: '#800080', 6528 red: '#ff0000', 6529 silver: '#c0c0c0', 6530 teal: '#008080', 6531 white: '#ffffff', 6532 yellow: '#ffff00', 6533 transparent: [null, null, null, 0], 6534 _default: '#ffffff' 6535 }) 6536 })(h), 6537 (function() { 6538 function e(e) { 6539 let i, 6540 s, 6541 n = e.ownerDocument.defaultView 6542 ? e.ownerDocument.defaultView.getComputedStyle(e, null) 6543 : e.currentStyle, 6544 o = {} 6545 if (n && n.length && n[0] && n[n[0]]) { 6546 for (s = n.length; s--; ) { 6547 ;(i = n[s]), typeof n[i] === 'string' && (o[t.camelCase(i)] = n[i]) 6548 } 6549 } else for (i in n) typeof n[i] === 'string' && (o[i] = n[i]) 6550 return o 6551 } 6552 function i(e, i) { 6553 let s, 6554 o, 6555 a = {} 6556 for (s in i) { 6557 ;
6557(o = i[s]), 6558 e[s] !== o && 6559 (n[s] || ((t.fx.step[s] || !isNaN(parseFloat(o))) && (a[s] = o))) 6560 } 6561 return a 6562 } 6563 var s = ['add', 'remove', 'toggle'], 6564 n = { 6565 border: 1, 6566 borderBottom: 1, 6567 borderColor: 1, 6568 borderLeft: 1, 6569 borderRight: 1, 6570 borderTop: 1, 6571 borderWidth: 1, 6572 margin: 1, 6573 padding: 1 6574 } 6575 t.each( 6576 [ 6577 'borderLeftStyle', 6578 'borderRightStyle', 6579 'borderBottomStyle', 6580 'borderTopStyle' 6581 ], 6582 function(e, i) { 6583 t.fx.step[i] = function(t) { 6584 ;((t.end !== 'none' && !t.setAttr) || 6585 (t.pos === 1 && !t.setAttr)) && 6586 (h.style(t.elem, i, t.end), (t.setAttr = !0)) 6587 } 6588 } 6589 ), 6590 t.fn.addBack || 6591 (t.fn.addBack = function(t) { 6592 return this.add( 6593 t == null ? this.prevObject : this.prevObject.filter(t) 6594 ) 6595 }), 6596 (t.effects.animateClass = function(n, o, a, r) { 6597 const l = t.speed(o, a, r) 6598 return this.queue(function() { 6599 let o, 6600 a = t(this), 6601 r = a.attr('class') || '', 6602 h = l.children ? a.find('*').addBack() : a 6603 ;(h = h.map(function() { 6604 const i = t(this) 6605 return { el: i, start: e(this) } 6606 })), 6607 (o = function() { 6608 t.each(s, function(t, e) { 6609 n[e] && a[`${e}Class`](n[e]) 6610 }) 6611 }), 6612 o(), 6613 (h = h.map(function() { 6614 return ( 6615 (this.end = e(this.el[0])), 6616 (this.diff = i(this.start, this.end)), 6617 this 6618 ) 6619 })), 6620 a.attr('class', r), 6621 (h = h.map(function() { 6622 let e = this, 6623 i = t.Deferred(), 6624 s = t.extend({}, l, { 6625 queue: !1, 6626 complete() { 6627 i.resolve(e) 6628 } 6629 }) 6630 return this.el.animate(this.diff, s), i.promise() 6631 })), 6632 t.when.apply(t, h.get()).done(function() { 6633 o(), 6634 t.each(arguments, function() { 6635 const e = this.el 6636 t.each(this.diff, function(t) { 6637 e.css(t, '') 6638 }) 6639 }), 6640 l.complete.call(a[0]) 6641 }) 6642 }) 6643 }), 6644 t.fn.extend({ 6645 addClass: (function(e) { 6646 return function(i, s, n, o) { 6647 return s 6648 ? t.effects.animateClass.call(this, { add: i }, s, n, o) 6649 : e.apply(this, arguments) 6650 } 6651 })(t.fn.addClass), 6652 removeClass: (function(e) { 6653 return function(i, s, n, o) { 6654 return arguments.length > 1 6655 ? t.effects.animateClass.call(this, { remove: i }, s, n, o) 6656 : e.apply(this, arguments) 6657 } 6658 })(t.fn.removeClass), 6659 toggleClass: (function(e) { 6660 return function(i, s, n, o, a) { 6661 return typeof s === 'boolean' || void 0 === s 6662 ? n 6663 ? t.effects.animateClass.call( 6664 this, 6665 s ? { add: i } : { remove: i }, 6666 n, 6667 o, 6668 a 6669 ) 6670 : e.apply(this, arguments) 6671 : t.effects.animateClass.call(this, { toggle: i }, s, n, o) 6672 } 6673 })(t.fn.toggleClass), 6674 switchClass(e, i, s, n, o) { 6675 return t.effects.animateClass.call( 6676 this, 6677 { add: i, remove: e }, 6678 s, 6679 n, 6680 o 6681 ) 6682 } 6683 }) 6684 })(), 6685 (function() { 6686 function e(e, i, s, n) { 6687 return ( 6688 t.isPlainObject(e) && ((i = e), (e = e.effect)), 6689 (e = { effect: e }), 6690 i == null && (i = {}), 6691 t.isFunction(i) && ((n = i), (s = null), (i = {})), 6692 (typeof i === 'number' || t.fx.speeds[i]) && 6693 ((n = s), (s = i), (i = {})), 6694 t.isFunction(s) && ((n = s), (s = null)), 6695 i && t.extend(e, i), 6696 (s = s || i.duration), 6697 (e.duration = t.fx.off 6698 ? 0 6699 : typeof s === 'number' 6700 ? s 6701 : s in t.fx.speeds 6702 ? t.fx.speeds[s] 6703 : t.fx.speeds._default), 6704 (e.complete = n || i.complete), 6705 e 6706 ) 6707 } 6708 function i(e) { 6709 return !e || typeof e === 'number' || t.fx.speeds[e] 6710 ? !0 6711 : typeof e !== 'string' || t.effects.effect[e] 6712 ? t.isFunction(e) 6713 ? !0 6714 : typeof e !== 'object' || e.effect 6715 ? !1 6716 : !0 6717 : !0 6718 } 6719 function s(t, e) { 6720 let i = e.outerWidth(), 6721 s = e.outerHeight(), 6722 n = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, 6723 o = n.exec(t) || ['', 0, i, s, 0] 6724 return { 6725 top: parseFloat(o[1]) || 0, 6726 right: o[2] === 'auto' ? i : parseFloat(o[2]),
6727 bottom: o[3] === 'auto' ? s : parseFloat(o[3]), 6728 left: parseFloat(o[4]) || 0 6729 } 6730 } 6731 t.expr && 6732 t.expr.filters && 6733 t.expr.filters.animated && 6734 (t.expr.filters.animated = (function(e) { 6735 return function(i) { 6736 return !!t(i).data(l) || e(i) 6737 } 6738 })(t.expr.filters.animated)), 6739 t.uiBackCompat !== !1 && 6740 t.extend(t.effects, { 6741 save(t, e) { 6742 for (let i = 0, s = e.length; s > i; i++) { 6743 e[i] !== null && t.data(a + e[i], t[0].style[e[i]]) 6744 } 6745 }, 6746 restore(t, e) { 6747 for (var i, s = 0, n = e.length; n > s; s++) { 6748 e[s] !== null && ((i = t.data(a + e[s])), t.css(e[s], i)) 6749 } 6750 }, 6751 setMode(t, e) { 6752 return ( 6753 e === 'toggle' && (e = t.is(':hidden') ? 'show' : 'hide'), e 6754 ) 6755 }, 6756 createWrapper(e) { 6757 if (e.parent().is('.ui-effects-wrapper')) return e.parent() 6758 let i = { 6759 width: e.outerWidth(!0), 6760 height: e.outerHeight(!0), 6761 float: e.css('float') 6762 }, 6763 s = t('<div></div>') 6764 .addClass('ui-effects-wrapper') 6765 .css({ 6766 fontSize: '100%', 6767 background: 'transparent', 6768 border: 'none', 6769 margin: 0, 6770 padding: 0 6771 }), 6772 n = { width: e.width(), height: e.height() }, 6773 o = document.activeElement 6774 try { 6775 o.id 6776 } catch (a) { 6777 o = document.body 6778 } 6779 return ( 6780 e.wrap(s), 6781 (e[0] === o || t.contains(e[0], o)) && t(o).trigger('focus'), 6782 (s = e.parent()), 6783 e.css('position') === 'static' 6784 ? (s.css({ position: 'relative' }), 6785 e.css({ position: 'relative' })) 6786 : (t.extend(i, { 6787 position: e.css('position'), 6788 zIndex: e.css('z-index') 6789 }), 6790 t.each(['top', 'left', 'bottom', 'right'], function(t, s) { 6791 ;(i[s] = e.css(s)), 6792 isNaN(parseInt(i[s], 10)) && (i[s] = 'auto') 6793 }), 6794 e.css({ 6795 position: 'relative', 6796 top: 0, 6797 left: 0, 6798 right: 'auto', 6799 bottom: 'auto' 6800 })), 6801 e.css(n), 6802 s.css(i).show() 6803 ) 6804 }, 6805 removeWrapper(e) { 6806 const i = document.activeElement 6807 return ( 6808 e.parent().is('.ui-effects-wrapper') && 6809 (e.parent().replaceWith(e), 6810 (e[0] === i || t.contains(e[0], i)) && t(i).trigger('focus')), 6811 e 6812 ) 6813 } 6814 }), 6815 t.extend(t.effects, { 6816 version: '1.12.1', 6817 define(e, i, s) { 6818 return ( 6819 s || ((s = i), (i = 'effect')), 6820 (t.effects.effect[e] = s), 6821 (t.effects.effect[e].mode = i), 6822 s 6823 ) 6824 }, 6825 scaledDimensions(t, e, i) { 6826 if (e === 0) { 6827 return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 } 6828 } 6829 let s = i !== 'horizontal' ? (e || 100) / 100 : 1, 6830 n = i !== 'vertical' ? (e || 100) / 100 : 1 6831 return { 6832 height: t.height() * n, 6833 width: t.width() * s, 6834 outerHeight: t.outerHeight() * n, 6835 outerWidth: t.outerWidth() * s 6836 } 6837 }, 6838 clipToBox(t) { 6839 return { 6840 width: t.clip.right - t.clip.left, 6841 height: t.clip.bottom - t.clip.top, 6842 left: t.clip.left, 6843 top: t.clip.top 6844 } 6845 }, 6846 unshift(t, e, i) { 6847 const s = t.queue() 6848 e > 1 && s.splice.apply(s, [1, 0].concat(s.splice(e, i))), 6849 t.dequeue() 6850 }, 6851 saveStyle(t) { 6852 t.data(r, t[0].style.cssText) 6853 }, 6854 restoreStyle(t) { 6855 ;(t[0].style.cssText = t.data(r) || ''), t.removeData(r) 6856 }, 6857 mode(t, e) { 6858 const i = t.is(':hidden') 6859 return ( 6860 e === 'toggle' && (e = i ? 'show' : 'hide'), 6861 (i ? e === 'hide' : e === 'show') && (e = 'none'), 6862 e 6863 ) 6864 }, 6865 getBaseline(t, e) { 6866 let i, s 6867 switch (t[0]) { 6868 case 'top': 6869 i = 0 6870 break 6871 case 'middle': 6872 i = 0.5 6873 break 6874 case 'bottom': 6875 i = 1 6876 break 6877 default: 6878 i = t[0] / e.height 6879 } 6880 switch (t[1]) { 6881 case 'left': 6882 s = 0 6883 break 6884 case 'center': 6885 s = 0.5 6886 break 6887 case 'right': 6888 s = 1 6889 break 6890 default: 6891 s = t[1] / e.width 6892 } 6893 return { x: s, y: i } 6894 }, 6895 createPlaceholder(e) { 6896 let i, 6897 s = e.css('position'), 6898 n = e.position() 6899 return ( 6900 e 6901 .css({ 6902 marginTop: e.css('marginTop'), 6903 marginBottom: e.css('marginBottom'), 6904 marginLeft: e.css('marginLeft'), 6905 marginRight: e.css('marginRight') 6906 }) 6907 .outerWidth(e.outerWidth()) 6908 .outerHeight(e.outerHeight()), 6909 /^(static|relative)/.test(s) && 6910 ((s = 'absolute'), 6911 (i = t(`<${e[0].nodeName}>`) 6912 .insertAfter(e) 6913 .css({ 6914 display: /^(inline|ruby)/.test(e.css('display')) 6915 ? 'inline-block' 6916 : 'block', 6917 visibility: 'hidden', 6918 marginTop: e.css('marginTop'), 6919 marginBottom: e.css('marginBottom'), 6920 marginLeft: e.css('marginLeft'), 6921 marginRight: e.css('marginRight'), 6922 float: e.css('float') 6923 }) 6924 .outerWidth(e.outerWidth()) 6925 .outerHeight(e.outerHeight()) 6926 .addClass('ui-effects-placeholder')), 6927 e.data(`${a}placeholder`, i)), 6928 e.css({ position: s, left: n.left, top: n.top }), 6929 i 6930 ) 6931 }, 6932 removePlaceholder(t) { 6933 let e = `${a}placeholder`, 6934 i = t.data(e) 6935 i && (i.remove(), t.removeData(e)) 6936 }, 6937 cleanUp(e) { 6938 t.effects.restoreStyle(e), t.effects.removePlaceholder(e) 6939 }, 6940 setTransition(e, i, s, n) { 6941 return ( 6942 (n = n || {}), 6943 t.each(i, function(t, i) { 6944 const o = e.cssUnit(i) 6945 o[0] > 0 && (n[i] = o[0] * s + o[1]) 6946 }), 6947 n 6948 ) 6949 } 6950 }), 6951 t.fn.extend({ 6952 effect() { 6953 function i(e) { 6954 function i() { 6955 r.removeData(l), 6956 t.effects.cleanUp(r), 6957 s.mode === 'hide' && r.hide(), 6958 a() 6959 } 6960 function a() { 6961 t.isFunction(h) && h.call(r[0]), t.isFunction(e) && e() 6962 } 6963 var r = t(this) 6964 ;(s.mode = u.shift()), 6965 t.uiBackCompat === !1 || o 6966 ? s.mode === 'none' 6967 ? (r[c](), a()) 6968 : n.call(r[0], s, i) 6969 : (r.is(':hidden') 6970 ? c === 'hide' 6971 : c === 'show') 6972 ? (r[c](), a()) 6973 : n.call(r[0], s, a) 6974 } 6975 var s = e.apply(this, arguments), 6976 n = t.effects.effect[s.effect], 6977 o = n.mode, 6978 a = s.queue, 6979 r = a || 'fx', 6980 h = s.complete, 6981 c = s.mode, 6982 u = [], 6983 d = function(e) { 6984 let i = t(this), 6985 s = t.effects.mode(i, c) || o 6986 i.data(l, !0), 6987 u.push(s), 6988 o && (s === 'show' || (s === o && s === 'hide')) && i.show(), 6989 (o && s === 'none') || t.effects.saveStyle(i), 6990 t.isFunction(e) && e() 6991 } 6992 return t.fx.off || !n 6993 ? c 6994 ? this[c](s.duration, h) 6995 : this.each(function() { 6996 h && h.call(this) 6997 }) 6998 : a === !1 6999 ? this.each(d).each(i) 7000 : this.queue(r, d).queue(r, i) 7001 }, 7002 show: (function(t) { 7003 return function(s) { 7004 if (i(s)) return t.apply(this, arguments) 7005 const n = e.apply(this, arguments) 7006 return (n.mode = 'show'), this.effect.call(this, n) 7007 } 7008 })(t.fn.show), 7009 hide: (function(t) { 7010 return function(s) { 7011 if (i(s)) return t.apply(this, arguments) 7012 const n = e.apply(this, arguments) 7013 return (n.mode = 'hide'), this.effect.call(this, n) 7014 } 7015 })(t.fn.hide), 7016 toggle: (function(t) { 7017 return function(s) { 7018 if (i(s) || typeof s === 'boolean') { 7019 return t.apply(this, arguments) 7020 } 7021 const n = e.apply(this, arguments) 7022 return (n.mode = 'toggle'), this.effect.call(this, n) 7023 } 7024 })(t.fn.toggle), 7025 cssUnit(e) { 7026 let i = this.css(e), 7027 s = [] 7028 return ( 7029 t.each(['em', 'px', '%', 'pt'], function(t, e) { 7030 i.indexOf(e) > 0 && (s = [parseFloat(i), e]) 7031 }), 7032 s 7033 ) 7034 }, 7035 cssClip(t) { 7036 return t 7037 ? this.css( 7038 'clip', 7039 `rect(${t.top}px ${t.right}px ${t.bottom}px ${t.left}px)` 7040 ) 7041 : s(this.css('clip'), this) 7042 }, 7043 transfer(e, i) { 7044 var s = t(this), 7045 n = t(e.to), 7046 o = n.css('position') === 'fixed', 7047 a = t('body'), 7048 r = o ? a.scrollTop() : 0, 7049 l = o ? a.scrollLeft() : 0, 7050 h = n.offset(), 7051 c = { 7052 top: h.top - r, 7053 left: h.left - l, 7054 height: n.innerHeight(), 7055 width: n.innerWidth() 7056 }, 7057 u = s.offset(), 7058 d = t("<div class='ui-effects-transfer'></div>") 7059 .appendTo('body') 7060 .addClass(e.className) 7061 .css({ 7062 top: u.top - r, 7063 left: u.left - l, 7064 height: s.innerHeight(), 7065 width: s.innerWidth(), 7066 position: o ? 'fixed' : 'absolute' 7067 }) 7068 .animate(c, e.duration, e.easing, function() { 7069 d.remove(), t.isFunction(i) && i() 7070 }) 7071 } 7072 }), 7073 (t.fx.step.clip = function(e) { 7074 e.clipInit || 7075 ((e.start = t(e.elem).cssClip()), 7076 typeof e.end === 'string' && (e.end = s(e.end, e.elem)), 7077 (e.clipInit = !0)), 7078 t(e.elem).cssClip({ 7079 top: e.pos * (e.end.top - e.start.top) + e.start.top, 7080 right: e.pos * (e.end.right - e.start.right) + e.start.right, 7081 bottom: e.pos * (e.end.bottom - e.start.bottom) + e.start.bottom, 7082 left: e.pos * (e.end.left - e.start.left) + e.start.left 7083 }) 7084 }) 7085 })(), 7086 (function() { 7087 const e = {} 7088 t.each(['Quad', 'Cubic', 'Quart', 'Quint', 'Expo'], function(t, i) { 7089 e[i] = function(e) { 7090 return Math.pow(e, t + 2) 7091 } 7092 }), 7093 t.extend(e, { 7094 Sine(t) { 7095 return 1 - Math.cos(t * Math.PI / 2) 7096 }, 7097 Circ(t) { 7098 return 1 - Math.sqrt(1 - t * t) 7099 }, 7100 Elastic(t) { 7101 return t === 0 || t === 1 7102 ? t 7103 : -Math.pow(2, 8 * (t - 1)) *
7104 Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15) 7105 }, 7106 Back(t) { 7107 return t * t * (3 * t - 2) 7108 }, 7109 Bounce(t) { 7110 for (var e, i = 4; ((e = Math.pow(2, --i)) - 1) / 11 > t; ); 7111 return ( 7112 1 / Math.pow(4, 3 - i) - 7113 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2) 7114 ) 7115 } 7116 }), 7117 t.each(e, function(e, i) { 7118 ;(t.easing[`easeIn${e}`] = i), 7119 (t.easing[`easeOut${e}`] = function(t) { 7120 return 1 - i(1 - t) 7121 }), 7122 (t.easing[`easeInOut${e}`] = function(t) { 7123 return t < 0.5 ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2 7124 }) 7125 }) 7126 })(), 7127 t.effects, 7128 t.effects.define('slide', 'show', function(e, i) { 7129 let s, 7130 n, 7131 o = t(this), 7132 a = { 7133 up: ['bottom', 'top'], 7134 down: ['top', 'bottom'], 7135 left: ['right', 'left'], 7136 right: ['left', 'right'] 7137 }, 7138 r = e.mode, 7139 l = e.direction || 'left', 7140 h = l === 'up' || l === 'down' ? 'top' : 'left', 7141 c = l === 'up' || l === 'left', 7142 u = e.distance || o[h === 'top' ? 'outerHeight' : 'outerWidth'](!0), 7143 d = {} 7144 t.effects.createPlaceholder(o), 7145 (s = o.cssClip()), 7146 (n = o.position()[h]), 7147 (d[h] = (c ? -1 : 1) * u + n), 7148 (d.clip = o.cssClip()), 7149 (d.clip[a[l][1]] = d.clip[a[l][0]]), 7150 r === 'show' && 7151 (o.cssClip(d.clip), o.css(h, d[h]), (d.clip = s), (d[h] = n)), 7152 o.animate(d, { 7153 queue: !1, 7154 duration: e.duration, 7155 easing: e.easing, 7156 complete: i 7157 }) 7158 }) 7159})
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.