| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | -/******/ "use strict"; | |
| 3 | 2 | /******/ var __webpack_modules__ = ({ |
| 4 | 3 | |
| 5 | 4 | /***/ "./assets/src/js/admin/init-tom-select.js" |
| 6 | 5 | /*!************************************************!*\ |
| @@ -7,8 +6,9 @@ | ||
| 7 | 6 | !*** ./assets/src/js/admin/init-tom-select.js ***! |
| 8 | 7 | \************************************************/ |
| 9 | 8 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 10 | 9 | |
| 10 | +"use strict"; | |
| 11 | 11 | __webpack_require__.r(__webpack_exports__); |
| 12 | 12 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13 | 13 | /* harmony export */ initElsTomSelect: () => (/* binding */ initElsTomSelect), |
| 14 | 14 | /* harmony export */ initTomSelect: () => (/* binding */ initTomSelect), |
| @@ -250,8 +250,319 @@ | ||
| 250 | 250 | |
| 251 | 251 | |
| 252 | 252 | /***/ }, |
| 253 | 253 | |
| 254 | +/***/ "./assets/src/js/admin/share/dropdown-pages.js" | |
| 255 | +/*!*****************************************************!*\ | |
| 256 | + !*** ./assets/src/js/admin/share/dropdown-pages.js ***! | |
| 257 | + \*****************************************************/ | |
| 258 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 259 | + | |
| 260 | +"use strict"; | |
| 261 | +__webpack_require__.r(__webpack_exports__); | |
| 262 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 263 | +/* harmony export */ DropdownPages: () => (/* binding */ DropdownPages) | |
| 264 | +/* harmony export */ }); | |
| 265 | +/* harmony import */ var lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lpAssetsJsPath/utils.js */ "./assets/src/js/utils.js"); | |
| 266 | +/* harmony import */ var lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lpAssetsJsPath/lpToastify.js */ "./assets/src/js/lpToastify.js"); | |
| 267 | +/** | |
| 268 | + * Dropdown Pages | |
| 269 | + * | |
| 270 | + * @since 4.2.5.1 | |
| 271 | + * @version 1.0.0 | |
| 272 | + */ | |
| 273 | + | |
| 274 | + | |
| 275 | +class DropdownPages { | |
| 276 | + static selectors = { | |
| 277 | + elDropdown: '.learn-press-dropdown-pages', | |
| 278 | + elSelect: 'select', | |
| 279 | + elListWrap: '.list-pages-wrapper', | |
| 280 | + elActions: '.quick-add-page-actions', | |
| 281 | + elForm: '.quick-add-page-inline', | |
| 282 | + elButtonQuickAdd: '.button-quick-add-page', | |
| 283 | + elInput: '.quick-add-page-inline input[type="text"]', | |
| 284 | + elButtonSubmit: '.quick-add-page-inline button', | |
| 285 | + elButtonCancel: '.quick-add-page-inline a' | |
| 286 | + }; | |
| 287 | + constructor() { | |
| 288 | + this.elDropdowns = []; | |
| 289 | + } | |
| 290 | + init() { | |
| 291 | + this.elDropdowns = document.querySelectorAll(DropdownPages.selectors.elDropdown); | |
| 292 | + if (!this.elDropdowns.length) { | |
| 293 | + return; | |
| 294 | + } | |
| 295 | + this.events(); | |
| 296 | + } | |
| 297 | + events() { | |
| 298 | + // Check and attach events only once | |
| 299 | + if (DropdownPages._loadedEvents) { | |
| 300 | + return; | |
| 301 | + } | |
| 302 | + DropdownPages._loadedEvents = this; | |
| 303 | + | |
| 304 | + // Change events | |
| 305 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('change', [{ | |
| 306 | + selector: DropdownPages.selectors.elDropdown, | |
| 307 | + class: this, | |
| 308 | + callBack: this.handleChangeSelect.name | |
| 309 | + }]); | |
| 310 | + | |
| 311 | + // Click events | |
| 312 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('click', [{ | |
| 313 | + selector: DropdownPages.selectors.elButtonSubmit, | |
| 314 | + class: this, | |
| 315 | + callBack: this.handleSubmit.name | |
| 316 | + }, { | |
| 317 | + selector: DropdownPages.selectors.elButtonCancel, | |
| 318 | + class: this, | |
| 319 | + callBack: this.handleCancel.name | |
| 320 | + }, { | |
| 321 | + selector: DropdownPages.selectors.elButtonQuickAdd, | |
| 322 | + class: this, | |
| 323 | + callBack: this.handleQuickAdd.name | |
| 324 | + }]); | |
| 325 | + | |
| 326 | + // Keydown events | |
| 327 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('keydown', [{ | |
| 328 | + selector: DropdownPages.selectors.elInput, | |
| 329 | + class: this, | |
| 330 | + callBack: this.handleInputEnter.name, | |
| 331 | + checkIsEventEnter: true | |
| 332 | + }, { | |
| 333 | + selector: DropdownPages.selectors.elInput, | |
| 334 | + class: this, | |
| 335 | + callBack: this.handleInputEscape.name | |
| 336 | + }]); | |
| 337 | + } | |
| 338 | + handleChangeSelect(args) { | |
| 339 | + const { | |
| 340 | + e | |
| 341 | + } = args; | |
| 342 | + const elSelect = e.target; | |
| 343 | + if (!elSelect.matches(DropdownPages.selectors.elSelect)) { | |
| 344 | + return; | |
| 345 | + } | |
| 346 | + const elDropdown = elSelect.closest(DropdownPages.selectors.elDropdown); | |
| 347 | + if (!elDropdown) { | |
| 348 | + return; | |
| 349 | + } | |
| 350 | + const elActions = elDropdown.querySelector(DropdownPages.selectors.elActions); | |
| 351 | + if (elActions) { | |
| 352 | + elActions.classList.add('hide-if-js'); | |
| 353 | + } | |
| 354 | + if (parseInt(elSelect.value, 10)) { | |
| 355 | + if (elActions) { | |
| 356 | + const editLink = elActions.querySelector('a.edit-page'); | |
| 357 | + const viewLink = elActions.querySelector('a.view-page'); | |
| 358 | + if (editLink) { | |
| 359 | + editLink.href = `post.php?post=${elSelect.value}&action=edit`; | |
| 360 | + } | |
| 361 | + if (viewLink) { | |
| 362 | + viewLink.href = `${window.lpGlobalSettings.siteurl}?page_id=${elSelect.value}`; | |
| 363 | + } | |
| 364 | + elActions.classList.remove('hide-if-js'); | |
| 365 | + } | |
| 366 | + elSelect.setAttribute('data-selected', elSelect.value); | |
| 367 | + } | |
| 368 | + } | |
| 369 | + openQuickAddForm(elDropdown) { | |
| 370 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 371 | + const elForm = elDropdown.querySelector(DropdownPages.selectors.elForm); | |
| 372 | + if (elListWrap) { | |
| 373 | + elListWrap.classList.add('hide-if-js'); | |
| 374 | + } | |
| 375 | + if (elForm) { | |
| 376 | + elForm.classList.remove('hide-if-js'); | |
| 377 | + const elInput = elForm.querySelector('input'); | |
| 378 | + if (elInput) { | |
| 379 | + elInput.value = ''; | |
| 380 | + elInput.focus(); | |
| 381 | + } | |
| 382 | + } | |
| 383 | + } | |
| 384 | + handleSubmit(args) { | |
| 385 | + const { | |
| 386 | + e | |
| 387 | + } = args; | |
| 388 | + e.preventDefault(); | |
| 389 | + const elButton = e.target.closest(DropdownPages.selectors.elButtonSubmit); | |
| 390 | + if (!elButton) { | |
| 391 | + return; | |
| 392 | + } | |
| 393 | + const elForm = elButton.closest(DropdownPages.selectors.elForm); | |
| 394 | + if (!elForm) { | |
| 395 | + return; | |
| 396 | + } | |
| 397 | + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown); | |
| 398 | + if (!elDropdown) { | |
| 399 | + return; | |
| 400 | + } | |
| 401 | + const elInput = elForm.querySelector('input'); | |
| 402 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 403 | + const pageName = elInput ? elInput.value.trim() : ''; | |
| 404 | + if (!pageName) { | |
| 405 | + alert('Please enter the name of page'); | |
| 406 | + if (elInput) { | |
| 407 | + elInput.focus(); | |
| 408 | + } | |
| 409 | + return; | |
| 410 | + } | |
| 411 | + elButton.disabled = true; | |
| 412 | + let fieldName = ''; | |
| 413 | + const elFieldName = elDropdown.querySelector('select'); | |
| 414 | + fieldName = elFieldName ? elFieldName.name : ''; | |
| 415 | + if (!window.lpGlobalSettings || !window.lpGlobalSettings.ajax || !window.lpDataAdmin || !window.lpDataAdmin.nonce) { | |
| 416 | + elButton.disabled = false; | |
| 417 | + return; | |
| 418 | + } | |
| 419 | + const formData = new FormData(); | |
| 420 | + formData.append('action', 'learnpress_create_page'); | |
| 421 | + formData.append('page_name', pageName); | |
| 422 | + formData.append('field_name', fieldName); | |
| 423 | + formData.append('nonce', window.lpDataAdmin.nonce); | |
| 424 | + fetch(window.lpGlobalSettings.ajax, { | |
| 425 | + method: 'POST', | |
| 426 | + body: formData | |
| 427 | + }).then(response => response.json()).then(response => { | |
| 428 | + const { | |
| 429 | + message, | |
| 430 | + status, | |
| 431 | + data | |
| 432 | + } = response; | |
| 433 | + if (status === 'success') { | |
| 434 | + elForm.classList.add('hide-if-js'); | |
| 435 | + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(message, 'success'); | |
| 436 | + setTimeout(() => { | |
| 437 | + window.location.reload(); | |
| 438 | + }, 1000); | |
| 439 | + } else { | |
| 440 | + throw new Error(message); | |
| 441 | + } | |
| 442 | + }).catch(error => { | |
| 443 | + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(error.message, 'error'); | |
| 444 | + }).finally(() => { | |
| 445 | + elButton.disabled = false; | |
| 446 | + if (elListWrap) { | |
| 447 | + elListWrap.classList.remove('hide-if-js'); | |
| 448 | + } | |
| 449 | + }); | |
| 450 | + } | |
| 451 | + addNewPageToList(args) { | |
| 452 | + const { | |
| 453 | + ID, | |
| 454 | + name, | |
| 455 | + positions | |
| 456 | + } = args; | |
| 457 | + const option = document.createElement('option'); | |
| 458 | + option.value = ID; | |
| 459 | + option.textContent = name; | |
| 460 | + const position = positions.indexOf(ID + ''); | |
| 461 | + document.querySelectorAll(`${DropdownPages.selectors.elDropdown} ${DropdownPages.selectors.elSelect}`).forEach(select => { | |
| 462 | + const newOption = option.cloneNode(true); | |
| 463 | + if (position === 0) { | |
| 464 | + const options = select.querySelectorAll('option'); | |
| 465 | + for (const opt of options) { | |
| 466 | + if (parseInt(opt.value, 10)) { | |
| 467 | + opt.before(newOption); | |
| 468 | + break; | |
| 469 | + } | |
| 470 | + } | |
| 471 | + } else if (position === positions.length - 1) { | |
| 472 | + select.appendChild(newOption); | |
| 473 | + } else { | |
| 474 | + const prevOption = select.querySelector(`option[value="${positions[position - 1]}"]`); | |
| 475 | + if (prevOption) { | |
| 476 | + prevOption.after(newOption); | |
| 477 | + } else { | |
| 478 | + select.appendChild(newOption); | |
| 479 | + } | |
| 480 | + } | |
| 481 | + }); | |
| 482 | + } | |
| 483 | + handleCancel(args) { | |
| 484 | + const { | |
| 485 | + e | |
| 486 | + } = args; | |
| 487 | + e.preventDefault(); | |
| 488 | + const elCancel = e.target.closest(DropdownPages.selectors.elButtonCancel); | |
| 489 | + if (!elCancel) { | |
| 490 | + return; | |
| 491 | + } | |
| 492 | + const elForm = elCancel.closest(DropdownPages.selectors.elForm); | |
| 493 | + if (!elForm) { | |
| 494 | + return; | |
| 495 | + } | |
| 496 | + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown); | |
| 497 | + if (!elDropdown) { | |
| 498 | + return; | |
| 499 | + } | |
| 500 | + const elSelect = elDropdown.querySelector(DropdownPages.selectors.elSelect); | |
| 501 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 502 | + const selected = elSelect ? elSelect.getAttribute('data-selected') : ''; | |
| 503 | + elForm.classList.add('hide-if-js'); | |
| 504 | + if (elSelect) { | |
| 505 | + elSelect.value = selected + ''; | |
| 506 | + elSelect.removeAttribute('disabled'); | |
| 507 | + elSelect.dispatchEvent(new Event('change', { | |
| 508 | + bubbles: true | |
| 509 | + })); | |
| 510 | + } | |
| 511 | + if (elListWrap) { | |
| 512 | + elListWrap.classList.remove('hide-if-js'); | |
| 513 | + } | |
| 514 | + } | |
| 515 | + handleQuickAdd(args) { | |
| 516 | + const { | |
| 517 | + e | |
| 518 | + } = args; | |
| 519 | + const elButton = e.target.closest(DropdownPages.selectors.elButtonQuickAdd); | |
| 520 | + if (!elButton) { | |
| 521 | + return; | |
| 522 | + } | |
| 523 | + const elDropdown = elButton.closest(DropdownPages.selectors.elDropdown); | |
| 524 | + if (!elDropdown) { | |
| 525 | + return; | |
| 526 | + } | |
| 527 | + this.openQuickAddForm(elDropdown); | |
| 528 | + } | |
| 529 | + handleInputEnter(args) { | |
| 530 | + const { | |
| 531 | + e | |
| 532 | + } = args; | |
| 533 | + e.preventDefault(); | |
| 534 | + const elInput = e.target; | |
| 535 | + const elForm = elInput.closest(DropdownPages.selectors.elForm); | |
| 536 | + if (!elForm) { | |
| 537 | + return; | |
| 538 | + } | |
| 539 | + const elButton = elForm.querySelector('button'); | |
| 540 | + if (elButton) { | |
| 541 | + elButton.click(); | |
| 542 | + } | |
| 543 | + } | |
| 544 | + handleInputEscape(args) { | |
| 545 | + const { | |
| 546 | + e | |
| 547 | + } = args; | |
| 548 | + if (e.key !== 'Escape') { | |
| 549 | + return; | |
| 550 | + } | |
| 551 | + const elInput = e.target; | |
| 552 | + const elForm = elInput.closest(DropdownPages.selectors.elForm); | |
| 553 | + if (!elForm) { | |
| 554 | + return; | |
| 555 | + } | |
| 556 | + const elCancel = elForm.querySelector('a'); | |
| 557 | + if (elCancel) { | |
| 558 | + elCancel.click(); | |
| 559 | + } | |
| 560 | + } | |
| 561 | +} | |
| 562 | + | |
| 563 | +/***/ }, | |
| 564 | + | |
| 254 | 565 | /***/ "./assets/src/js/admin/utils-admin.js" |
| 255 | 566 | /*!********************************************!*\ |
| 256 | 567 | !*** ./assets/src/js/admin/utils-admin.js ***! |
| 257 | 568 | \********************************************/ |
| @@ -256,8 +567,9 @@ | ||
| 256 | 567 | !*** ./assets/src/js/admin/utils-admin.js ***! |
| 257 | 568 | \********************************************/ |
| 258 | 569 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 259 | 570 | |
| 571 | +"use strict"; | |
| 260 | 572 | __webpack_require__.r(__webpack_exports__); |
| 261 | 573 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 262 | 574 | /* harmony export */ AdminUtilsFunctions: () => (/* binding */ AdminUtilsFunctions), |
| 263 | 575 | /* harmony export */ Api: () => (/* reexport safe */ _api_js__WEBPACK_IMPORTED_MODULE_2__["default"]), |
| @@ -378,8 +690,9 @@ | ||
| 378 | 690 | !*** ./assets/src/js/api.js ***! |
| 379 | 691 | \******************************/ |
| 380 | 692 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 381 | 693 | |
| 694 | +"use strict"; | |
| 382 | 695 | __webpack_require__.r(__webpack_exports__); |
| 383 | 696 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 384 | 697 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 385 | 698 | /* harmony export */ }); |
| @@ -424,8 +737,62 @@ | ||
| 424 | 737 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lplistAPI); |
| 425 | 738 | |
| 426 | 739 | /***/ }, |
| 427 | 740 | |
| 741 | +/***/ "./assets/src/js/lpToastify.js" | |
| 742 | +/*!*************************************!*\ | |
| 743 | + !*** ./assets/src/js/lpToastify.js ***! | |
| 744 | + \*************************************/ | |
| 745 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 746 | + | |
| 747 | +"use strict"; | |
| 748 | +__webpack_require__.r(__webpack_exports__); | |
| 749 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 750 | +/* harmony export */ show: () => (/* binding */ show) | |
| 751 | +/* harmony export */ }); | |
| 752 | +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! toastify-js */ "./node_modules/toastify-js/src/toastify.js"); | |
| 753 | +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(toastify_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 754 | +/* harmony import */ var toastify_js_src_toastify_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! toastify-js/src/toastify.css */ "./node_modules/toastify-js/src/toastify.css"); | |
| 755 | +/** | |
| 756 | + * Utils functions | |
| 757 | + * | |
| 758 | + * @param url | |
| 759 | + * @param data | |
| 760 | + * @param functions | |
| 761 | + * @since 4.3.0 | |
| 762 | + * @version 1.0.0 | |
| 763 | + */ | |
| 764 | + | |
| 765 | + | |
| 766 | +const argsToastify = { | |
| 767 | + text: '', | |
| 768 | + gravity: lpData.toast.gravity, | |
| 769 | + // `top` or `bottom` | |
| 770 | + position: lpData.toast.position, | |
| 771 | + // `left`, `center` or `right` | |
| 772 | + className: `${lpData.toast.classPrefix}`, | |
| 773 | + close: lpData.toast.close == 1, | |
| 774 | + stopOnFocus: lpData.toast.stopOnFocus == 1, | |
| 775 | + duration: lpData.toast.duration | |
| 776 | +}; | |
| 777 | +const show = (message, status = 'success', argsCustom) => { | |
| 778 | + let args = argsToastify; | |
| 779 | + if (argsCustom) { | |
| 780 | + args = { | |
| 781 | + ...args, | |
| 782 | + ...argsCustom | |
| 783 | + }; | |
| 784 | + } | |
| 785 | + const toastify = new (toastify_js__WEBPACK_IMPORTED_MODULE_0___default())({ | |
| 786 | + ...args, | |
| 787 | + text: message, | |
| 788 | + className: `${lpData.toast.classPrefix} ${status}` | |
| 789 | + }); | |
| 790 | + toastify.showToast(); | |
| 791 | +}; | |
| 792 | + | |
| 793 | +/***/ }, | |
| 794 | + | |
| 428 | 795 | /***/ "./assets/src/js/utils.js" |
| 429 | 796 | /*!********************************!*\ |
| 430 | 797 | !*** ./assets/src/js/utils.js ***! |
| 431 | 798 | \********************************/ |
| @@ -430,12 +797,14 @@ | ||
| 430 | 797 | !*** ./assets/src/js/utils.js ***! |
| 431 | 798 | \********************************/ |
| 432 | 799 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 433 | 800 | |
| 801 | +"use strict"; | |
| 434 | 802 | __webpack_require__.r(__webpack_exports__); |
| 435 | 803 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 436 | 804 | /* harmony export */ debounce: () => (/* binding */ debounce), |
| 437 | 805 | /* harmony export */ eventHandlers: () => (/* binding */ eventHandlers), |
| 806 | +/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView), | |
| 438 | 807 | /* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm), |
| 439 | 808 | /* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm), |
| 440 | 809 | /* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated), |
| 441 | 810 | /* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed), |
| @@ -447,9 +816,10 @@ | ||
| 447 | 816 | /* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady), |
| 448 | 817 | /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl), |
| 449 | 818 | /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl), |
| 450 | 819 | /* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm), |
| 451 | -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse) | |
| 820 | +/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse), | |
| 821 | +/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable) | |
| 452 | 822 | /* harmony export */ }); |
| 453 | 823 | /** |
| 454 | 824 | * Utils functions |
| 455 | 825 | * |
| @@ -456,9 +826,9 @@ | ||
| 456 | 826 | * @param url |
| 457 | 827 | * @param data |
| 458 | 828 | * @param functions |
| 459 | 829 | * @since 4.2.5.1 |
| 460 | - * @version 1.0.6 | |
| 830 | + * @version 1.0.7 | |
| 461 | 831 | */ |
| 462 | 832 | const lpClassName = { |
| 463 | 833 | hidden: 'lp-hidden', |
| 464 | 834 | loading: 'loading', |
| @@ -463,9 +833,12 @@ | ||
| 463 | 833 | hidden: 'lp-hidden', |
| 464 | 834 | loading: 'loading', |
| 465 | 835 | elCollapse: 'lp-collapse', |
| 466 | 836 | elSectionToggle: '.lp-section-toggle', |
| 467 | - elTriggerToggle: '.lp-trigger-toggle' | |
| 837 | + elTriggerToggle: '.lp-trigger-toggle', | |
| 838 | + elBtnFullScreen: '.lp-btn-full-screen-view', | |
| 839 | + elFullScreen: 'lp-full-screen-view', | |
| 840 | + elBtnFullScreenClose: 'lp-full-screen-view__close' | |
| 468 | 841 | }; |
| 469 | 842 | const lpFetchAPI = (url, data = {}, functions = {}) => { |
| 470 | 843 | if ('function' === typeof functions.before) { |
| 471 | 844 | functions.before(); |
| @@ -783,10 +1156,1159 @@ | ||
| 783 | 1156 | timer = setTimeout(() => func(args), wait); |
| 784 | 1157 | }; |
| 785 | 1158 | }; |
| 786 | 1159 | |
| 1160 | +/** | |
| 1161 | + * Initialize lp-toggle-enable components. | |
| 1162 | + * | |
| 1163 | + * Finds all `.lp-toggle-enable` elements and wires up toggle behavior. | |
| 1164 | + * Reads initial state from `data-enabled` attribute ("true"/"false"). | |
| 1165 | + * Calls `data-on-toggle` callback (if provided via options) on state change. | |
| 1166 | + * | |
| 1167 | + * HTML structure: | |
| 1168 | + * <label class="lp-toggle-enable" data-enabled="true"> | |
| 1169 | + * <input type="checkbox" class="lp-toggle-enable__input" /> | |
| 1170 | + * <span class="lp-toggle-enable__track"></span> | |
| 1171 | + * </label> | |
| 1172 | + * | |
| 1173 | + * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable') | |
| 1174 | + * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change | |
| 1175 | + * @since 4.4.5 | |
| 1176 | + * @version 1.0.0 | |
| 1177 | + */ | |
| 1178 | +window.lpToggleEnableInit = 0; | |
| 1179 | +const toggleEnable = (onToggle = null) => { | |
| 1180 | + if (window.lpToggleEnableInit) { | |
| 1181 | + return; | |
| 1182 | + } | |
| 1183 | + window.lpToggleEnableInit = 1; | |
| 1184 | + const selector = '.lp-toggle-enable'; | |
| 1185 | + const updateUI = (toggle, isEnabled) => { | |
| 1186 | + toggle.classList.toggle('is-enabled', isEnabled); | |
| 1187 | + const input = toggle.querySelector('.lp-toggle-enable__input'); | |
| 1188 | + if (input) { | |
| 1189 | + input.checked = isEnabled; | |
| 1190 | + input.value = isEnabled ? '1' : '0'; | |
| 1191 | + } | |
| 1192 | + }; | |
| 1193 | + | |
| 1194 | + // Delegate click handling via eventHandlers. | |
| 1195 | + eventHandlers('click', [{ | |
| 1196 | + selector, | |
| 1197 | + callBack: args => { | |
| 1198 | + const { | |
| 1199 | + e, | |
| 1200 | + target | |
| 1201 | + } = args; | |
| 1202 | + const toggle = target.closest(selector); | |
| 1203 | + if (!toggle || toggle.classList.contains('is-disabled')) { | |
| 1204 | + return; | |
| 1205 | + } | |
| 1206 | + e.preventDefault(); | |
| 1207 | + const isEnabled = !toggle.classList.contains('is-enabled'); | |
| 1208 | + updateUI(toggle, isEnabled); | |
| 1209 | + if ('function' === typeof onToggle) { | |
| 1210 | + onToggle(toggle, isEnabled); | |
| 1211 | + } | |
| 1212 | + } | |
| 1213 | + }]); | |
| 1214 | +}; | |
| 1215 | + | |
| 1216 | +/** | |
| 1217 | + * Initialize custom fullscreen view buttons. | |
| 1218 | + * | |
| 1219 | + * Delegates clicks on `.lp-btn-full-screen-view` buttons to | |
| 1220 | + * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the | |
| 1221 | + * target element. Falls back to the button's parent element when | |
| 1222 | + * `data-target` is not provided. | |
| 1223 | + * | |
| 1224 | + * @since 4.4.5 | |
| 1225 | + * @version 1.0.0 | |
| 1226 | + */ | |
| 1227 | +window.lpFullScreenViewInit = 0; | |
| 1228 | +const fullScreenView = () => { | |
| 1229 | + if (window.lpFullScreenViewInit) { | |
| 1230 | + return; | |
| 1231 | + } | |
| 1232 | + window.lpFullScreenViewInit = 1; | |
| 1233 | + let lastScrollY = 0; | |
| 1234 | + const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => { | |
| 1235 | + const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen); | |
| 1236 | + if (isFullscreen) { | |
| 1237 | + elTarget.classList.remove(lpClassName.elFullScreen); | |
| 1238 | + document.documentElement.classList.remove('lp-full-screen-active'); | |
| 1239 | + window.scrollTo(0, lastScrollY); | |
| 1240 | + } else { | |
| 1241 | + lastScrollY = window.scrollY; | |
| 1242 | + elTarget.classList.add(lpClassName.elFullScreen); | |
| 1243 | + document.documentElement.classList.add('lp-full-screen-active'); | |
| 1244 | + } | |
| 1245 | + if (!isFullscreen) { | |
| 1246 | + if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) { | |
| 1247 | + const closeButton = document.createElement('button'); | |
| 1248 | + closeButton.type = 'button'; | |
| 1249 | + closeButton.className = lpClassName.elBtnFullScreenClose; | |
| 1250 | + closeButton.setAttribute('aria-label', 'Close'); | |
| 1251 | + closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close ×'; | |
| 1252 | + closeButton.addEventListener('click', e => { | |
| 1253 | + e.preventDefault(); | |
| 1254 | + lpToggleFullscreenView(elTarget); | |
| 1255 | + }); | |
| 1256 | + elTarget.appendChild(closeButton); | |
| 1257 | + } | |
| 1258 | + } else { | |
| 1259 | + const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`); | |
| 1260 | + if (closeButton) { | |
| 1261 | + closeButton.remove(); | |
| 1262 | + } | |
| 1263 | + } | |
| 1264 | + }; | |
| 1265 | + eventHandlers('click', [{ | |
| 1266 | + selector: lpClassName.elBtnFullScreen, | |
| 1267 | + callBack: args => { | |
| 1268 | + const { | |
| 1269 | + e, | |
| 1270 | + target | |
| 1271 | + } = args; | |
| 1272 | + const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen); | |
| 1273 | + if (!elBtnFullScreen) { | |
| 1274 | + console.log('No full screen button found'); | |
| 1275 | + return; | |
| 1276 | + } | |
| 1277 | + e.preventDefault(); | |
| 1278 | + let elTarget = null; | |
| 1279 | + const targetSelector = elBtnFullScreen.dataset.targetFullscreen; | |
| 1280 | + console.log(targetSelector); | |
| 1281 | + if (targetSelector) { | |
| 1282 | + elTarget = document.querySelector(targetSelector); | |
| 1283 | + } | |
| 1284 | + if (!elTarget) { | |
| 1285 | + console.log('No target element found'); | |
| 1286 | + return; | |
| 1287 | + } | |
| 1288 | + lpToggleFullscreenView(elTarget, elBtnFullScreen); | |
| 1289 | + } | |
| 1290 | + }]); | |
| 1291 | +}; | |
| 1292 | + | |
| 787 | 1293 | /***/ }, |
| 788 | 1294 | |
| 1295 | +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css" | |
| 1296 | +/*!*****************************************************************************************!*\ | |
| 1297 | + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css ***! | |
| 1298 | + \*****************************************************************************************/ | |
| 1299 | +(module, __webpack_exports__, __webpack_require__) { | |
| 1300 | + | |
| 1301 | +"use strict"; | |
| 1302 | +__webpack_require__.r(__webpack_exports__); | |
| 1303 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1304 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1305 | +/* harmony export */ }); | |
| 1306 | +/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); | |
| 1307 | +/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1308 | +/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); | |
| 1309 | +/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1310 | +// Imports | |
| 1311 | + | |
| 1312 | + | |
| 1313 | +var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); | |
| 1314 | +// Module | |
| 1315 | +___CSS_LOADER_EXPORT___.push([module.id, `/*! | |
| 1316 | + * Toastify js 1.12.0 | |
| 1317 | + * https://github.com/apvarun/toastify-js | |
| 1318 | + * @license MIT licensed | |
| 1319 | + * | |
| 1320 | + * Copyright (C) 2018 Varun A P | |
| 1321 | + */ | |
| 1322 | + | |
| 1323 | +.toastify { | |
| 1324 | + padding: 12px 20px; | |
| 1325 | + color: #ffffff; | |
| 1326 | + display: inline-block; | |
| 1327 | + box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3); | |
| 1328 | + background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5); | |
| 1329 | + background: linear-gradient(135deg, #73a5ff, #5477f5); | |
| 1330 | + position: fixed; | |
| 1331 | + opacity: 0; | |
| 1332 | + transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| 1333 | + border-radius: 2px; | |
| 1334 | + cursor: pointer; | |
| 1335 | + text-decoration: none; | |
| 1336 | + max-width: calc(50% - 20px); | |
| 1337 | + z-index: 2147483647; | |
| 1338 | +} | |
| 1339 | + | |
| 1340 | +.toastify.on { | |
| 1341 | + opacity: 1; | |
| 1342 | +} | |
| 1343 | + | |
| 1344 | +.toast-close { | |
| 1345 | + background: transparent; | |
| 1346 | + border: 0; | |
| 1347 | + color: white; | |
| 1348 | + cursor: pointer; | |
| 1349 | + font-family: inherit; | |
| 1350 | + font-size: 1em; | |
| 1351 | + opacity: 0.4; | |
| 1352 | + padding: 0 5px; | |
| 1353 | +} | |
| 1354 | + | |
| 1355 | +.toastify-right { | |
| 1356 | + right: 15px; | |
| 1357 | +} | |
| 1358 | + | |
| 1359 | +.toastify-left { | |
| 1360 | + left: 15px; | |
| 1361 | +} | |
| 1362 | + | |
| 1363 | +.toastify-top { | |
| 1364 | + top: -150px; | |
| 1365 | +} | |
| 1366 | + | |
| 1367 | +.toastify-bottom { | |
| 1368 | + bottom: -150px; | |
| 1369 | +} | |
| 1370 | + | |
| 1371 | +.toastify-rounded { | |
| 1372 | + border-radius: 25px; | |
| 1373 | +} | |
| 1374 | + | |
| 1375 | +.toastify-avatar { | |
| 1376 | + width: 1.5em; | |
| 1377 | + height: 1.5em; | |
| 1378 | + margin: -7px 5px; | |
| 1379 | + border-radius: 2px; | |
| 1380 | +} | |
| 1381 | + | |
| 1382 | +.toastify-center { | |
| 1383 | + margin-left: auto; | |
| 1384 | + margin-right: auto; | |
| 1385 | + left: 0; | |
| 1386 | + right: 0; | |
| 1387 | + max-width: fit-content; | |
| 1388 | + max-width: -moz-fit-content; | |
| 1389 | +} | |
| 1390 | + | |
| 1391 | +@media only screen and (max-width: 360px) { | |
| 1392 | + .toastify-right, .toastify-left { | |
| 1393 | + margin-left: auto; | |
| 1394 | + margin-right: auto; | |
| 1395 | + left: 0; | |
| 1396 | + right: 0; | |
| 1397 | + max-width: fit-content; | |
| 1398 | + } | |
| 1399 | +} | |
| 1400 | +`, "",{"version":3,"sources":["webpack://./node_modules/toastify-js/src/toastify.css"],"names":[],"mappings":"AAAA;;;;;;EAME;;AAEF;IACI,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,uFAAuF;IACvF,6DAA6D;IAC7D,qDAAqD;IACrD,eAAe;IACf,UAAU;IACV,wDAAwD;IACxD,kBAAkB;IAClB,eAAe;IACf,qBAAqB;IACrB,2BAA2B;IAC3B,mBAAmB;AACvB;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,uBAAuB;IACvB,SAAS;IACT,YAAY;IACZ,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,YAAY;IACZ,cAAc;AAClB;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,sBAAsB;IACtB,2BAA2B;AAC/B;;AAEA;IACI;QACI,iBAAiB;QACjB,kBAAkB;QAClB,OAAO;QACP,QAAQ;QACR,sBAAsB;IAC1B;AACJ","sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n padding: 12px 20px;\n color: #ffffff;\n display: inline-block;\n box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n background: linear-gradient(135deg, #73a5ff, #5477f5);\n position: fixed;\n opacity: 0;\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n border-radius: 2px;\n cursor: pointer;\n text-decoration: none;\n max-width: calc(50% - 20px);\n z-index: 2147483647;\n}\n\n.toastify.on {\n opacity: 1;\n}\n\n.toast-close {\n background: transparent;\n border: 0;\n color: white;\n cursor: pointer;\n font-family: inherit;\n font-size: 1em;\n opacity: 0.4;\n padding: 0 5px;\n}\n\n.toastify-right {\n right: 15px;\n}\n\n.toastify-left {\n left: 15px;\n}\n\n.toastify-top {\n top: -150px;\n}\n\n.toastify-bottom {\n bottom: -150px;\n}\n\n.toastify-rounded {\n border-radius: 25px;\n}\n\n.toastify-avatar {\n width: 1.5em;\n height: 1.5em;\n margin: -7px 5px;\n border-radius: 2px;\n}\n\n.toastify-center {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n .toastify-right, .toastify-left {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n }\n}\n"],"sourceRoot":""}]); | |
| 1401 | +// Exports | |
| 1402 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); | |
| 1403 | + | |
| 1404 | + | |
| 1405 | +/***/ }, | |
| 1406 | + | |
| 1407 | +/***/ "./node_modules/css-loader/dist/runtime/api.js" | |
| 1408 | +/*!*****************************************************!*\ | |
| 1409 | + !*** ./node_modules/css-loader/dist/runtime/api.js ***! | |
| 1410 | + \*****************************************************/ | |
| 1411 | +(module) { | |
| 1412 | + | |
| 1413 | +"use strict"; | |
| 1414 | + | |
| 1415 | + | |
| 1416 | +/* | |
| 1417 | + MIT License http://www.opensource.org/licenses/mit-license.php | |
| 1418 | + Author Tobias Koppers @sokra | |
| 1419 | +*/ | |
| 1420 | +module.exports = function (cssWithMappingToString) { | |
| 1421 | + var list = []; | |
| 1422 | + | |
| 1423 | + // return the list of modules as css string | |
| 1424 | + list.toString = function toString() { | |
| 1425 | + return this.map(function (item) { | |
| 1426 | + var content = ""; | |
| 1427 | + var needLayer = typeof item[5] !== "undefined"; | |
| 1428 | + if (item[4]) { | |
| 1429 | + content += "@supports (".concat(item[4], ") {"); | |
| 1430 | + } | |
| 1431 | + if (item[2]) { | |
| 1432 | + content += "@media ".concat(item[2], " {"); | |
| 1433 | + } | |
| 1434 | + if (needLayer) { | |
| 1435 | + content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); | |
| 1436 | + } | |
| 1437 | + content += cssWithMappingToString(item); | |
| 1438 | + if (needLayer) { | |
| 1439 | + content += "}"; | |
| 1440 | + } | |
| 1441 | + if (item[2]) { | |
| 1442 | + content += "}"; | |
| 1443 | + } | |
| 1444 | + if (item[4]) { | |
| 1445 | + content += "}"; | |
| 1446 | + } | |
| 1447 | + return content; | |
| 1448 | + }).join(""); | |
| 1449 | + }; | |
| 1450 | + | |
| 1451 | + // import a list of modules into the list | |
| 1452 | + list.i = function i(modules, media, dedupe, supports, layer) { | |
| 1453 | + if (typeof modules === "string") { | |
| 1454 | + modules = [[null, modules, undefined]]; | |
| 1455 | + } | |
| 1456 | + var alreadyImportedModules = {}; | |
| 1457 | + if (dedupe) { | |
| 1458 | + for (var k = 0; k < this.length; k++) { | |
| 1459 | + var id = this[k][0]; | |
| 1460 | + if (id != null) { | |
| 1461 | + alreadyImportedModules[id] = true; | |
| 1462 | + } | |
| 1463 | + } | |
| 1464 | + } | |
| 1465 | + for (var _k = 0; _k < modules.length; _k++) { | |
| 1466 | + var item = [].concat(modules[_k]); | |
| 1467 | + if (dedupe && alreadyImportedModules[item[0]]) { | |
| 1468 | + continue; | |
| 1469 | + } | |
| 1470 | + if (typeof layer !== "undefined") { | |
| 1471 | + if (typeof item[5] === "undefined") { | |
| 1472 | + item[5] = layer; | |
| 1473 | + } else { | |
| 1474 | + item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); | |
| 1475 | + item[5] = layer; | |
| 1476 | + } | |
| 1477 | + } | |
| 1478 | + if (media) { | |
| 1479 | + if (!item[2]) { | |
| 1480 | + item[2] = media; | |
| 1481 | + } else { | |
| 1482 | + item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); | |
| 1483 | + item[2] = media; | |
| 1484 | + } | |
| 1485 | + } | |
| 1486 | + if (supports) { | |
| 1487 | + if (!item[4]) { | |
| 1488 | + item[4] = "".concat(supports); | |
| 1489 | + } else { | |
| 1490 | + item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); | |
| 1491 | + item[4] = supports; | |
| 1492 | + } | |
| 1493 | + } | |
| 1494 | + list.push(item); | |
| 1495 | + } | |
| 1496 | + }; | |
| 1497 | + return list; | |
| 1498 | +}; | |
| 1499 | + | |
| 1500 | +/***/ }, | |
| 1501 | + | |
| 1502 | +/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js" | |
| 1503 | +/*!************************************************************!*\ | |
| 1504 | + !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***! | |
| 1505 | + \************************************************************/ | |
| 1506 | +(module) { | |
| 1507 | + | |
| 1508 | +"use strict"; | |
| 1509 | + | |
| 1510 | + | |
| 1511 | +module.exports = function (item) { | |
| 1512 | + var content = item[1]; | |
| 1513 | + var cssMapping = item[3]; | |
| 1514 | + if (!cssMapping) { | |
| 1515 | + return content; | |
| 1516 | + } | |
| 1517 | + if (typeof btoa === "function") { | |
| 1518 | + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); | |
| 1519 | + var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); | |
| 1520 | + var sourceMapping = "/*# ".concat(data, " */"); | |
| 1521 | + return [content].concat([sourceMapping]).join("\n"); | |
| 1522 | + } | |
| 1523 | + return [content].join("\n"); | |
| 1524 | +}; | |
| 1525 | + | |
| 1526 | +/***/ }, | |
| 1527 | + | |
| 1528 | +/***/ "./node_modules/toastify-js/src/toastify.css" | |
| 1529 | +/*!***************************************************!*\ | |
| 1530 | + !*** ./node_modules/toastify-js/src/toastify.css ***! | |
| 1531 | + \***************************************************/ | |
| 1532 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1533 | + | |
| 1534 | +"use strict"; | |
| 1535 | +__webpack_require__.r(__webpack_exports__); | |
| 1536 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1537 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1538 | +/* harmony export */ }); | |
| 1539 | +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); | |
| 1540 | +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1541 | +/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); | |
| 1542 | +/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1543 | +/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); | |
| 1544 | +/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); | |
| 1545 | +/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); | |
| 1546 | +/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); | |
| 1547 | +/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); | |
| 1548 | +/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); | |
| 1549 | +/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); | |
| 1550 | +/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); | |
| 1551 | +/* harmony import */ var _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js!./toastify.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css"); | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | +var options = {}; | |
| 1564 | + | |
| 1565 | +options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); | |
| 1566 | +options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); | |
| 1567 | + | |
| 1568 | + options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); | |
| 1569 | + | |
| 1570 | +options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); | |
| 1571 | +options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); | |
| 1572 | + | |
| 1573 | +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); | |
| 1579 | + | |
| 1580 | + | |
| 1581 | +/***/ }, | |
| 1582 | + | |
| 1583 | +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js" | |
| 1584 | +/*!****************************************************************************!*\ | |
| 1585 | + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! | |
| 1586 | + \****************************************************************************/ | |
| 1587 | +(module) { | |
| 1588 | + | |
| 1589 | +"use strict"; | |
| 1590 | + | |
| 1591 | + | |
| 1592 | +var stylesInDOM = []; | |
| 1593 | +function getIndexByIdentifier(identifier) { | |
| 1594 | + var result = -1; | |
| 1595 | + for (var i = 0; i < stylesInDOM.length; i++) { | |
| 1596 | + if (stylesInDOM[i].identifier === identifier) { | |
| 1597 | + result = i; | |
| 1598 | + break; | |
| 1599 | + } | |
| 1600 | + } | |
| 1601 | + return result; | |
| 1602 | +} | |
| 1603 | +function modulesToDom(list, options) { | |
| 1604 | + var idCountMap = {}; | |
| 1605 | + var identifiers = []; | |
| 1606 | + for (var i = 0; i < list.length; i++) { | |
| 1607 | + var item = list[i]; | |
| 1608 | + var id = options.base ? item[0] + options.base : item[0]; | |
| 1609 | + var count = idCountMap[id] || 0; | |
| 1610 | + var identifier = "".concat(id, " ").concat(count); | |
| 1611 | + idCountMap[id] = count + 1; | |
| 1612 | + var indexByIdentifier = getIndexByIdentifier(identifier); | |
| 1613 | + var obj = { | |
| 1614 | + css: item[1], | |
| 1615 | + media: item[2], | |
| 1616 | + sourceMap: item[3], | |
| 1617 | + supports: item[4], | |
| 1618 | + layer: item[5] | |
| 1619 | + }; | |
| 1620 | + if (indexByIdentifier !== -1) { | |
| 1621 | + stylesInDOM[indexByIdentifier].references++; | |
| 1622 | + stylesInDOM[indexByIdentifier].updater(obj); | |
| 1623 | + } else { | |
| 1624 | + var updater = addElementStyle(obj, options); | |
| 1625 | + options.byIndex = i; | |
| 1626 | + stylesInDOM.splice(i, 0, { | |
| 1627 | + identifier: identifier, | |
| 1628 | + updater: updater, | |
| 1629 | + references: 1 | |
| 1630 | + }); | |
| 1631 | + } | |
| 1632 | + identifiers.push(identifier); | |
| 1633 | + } | |
| 1634 | + return identifiers; | |
| 1635 | +} | |
| 1636 | +function addElementStyle(obj, options) { | |
| 1637 | + var api = options.domAPI(options); | |
| 1638 | + api.update(obj); | |
| 1639 | + var updater = function updater(newObj) { | |
| 1640 | + if (newObj) { | |
| 1641 | + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { | |
| 1642 | + return; | |
| 1643 | + } | |
| 1644 | + api.update(obj = newObj); | |
| 1645 | + } else { | |
| 1646 | + api.remove(); | |
| 1647 | + } | |
| 1648 | + }; | |
| 1649 | + return updater; | |
| 1650 | +} | |
| 1651 | +module.exports = function (list, options) { | |
| 1652 | + options = options || {}; | |
| 1653 | + list = list || []; | |
| 1654 | + var lastIdentifiers = modulesToDom(list, options); | |
| 1655 | + return function update(newList) { | |
| 1656 | + newList = newList || []; | |
| 1657 | + for (var i = 0; i < lastIdentifiers.length; i++) { | |
| 1658 | + var identifier = lastIdentifiers[i]; | |
| 1659 | + var index = getIndexByIdentifier(identifier); | |
| 1660 | + stylesInDOM[index].references--; | |
| 1661 | + } | |
| 1662 | + var newLastIdentifiers = modulesToDom(newList, options); | |
| 1663 | + for (var _i = 0; _i < lastIdentifiers.length; _i++) { | |
| 1664 | + var _identifier = lastIdentifiers[_i]; | |
| 1665 | + var _index = getIndexByIdentifier(_identifier); | |
| 1666 | + if (stylesInDOM[_index].references === 0) { | |
| 1667 | + stylesInDOM[_index].updater(); | |
| 1668 | + stylesInDOM.splice(_index, 1); | |
| 1669 | + } | |
| 1670 | + } | |
| 1671 | + lastIdentifiers = newLastIdentifiers; | |
| 1672 | + }; | |
| 1673 | +}; | |
| 1674 | + | |
| 1675 | +/***/ }, | |
| 1676 | + | |
| 1677 | +/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js" | |
| 1678 | +/*!********************************************************************!*\ | |
| 1679 | + !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! | |
| 1680 | + \********************************************************************/ | |
| 1681 | +(module) { | |
| 1682 | + | |
| 1683 | +"use strict"; | |
| 1684 | + | |
| 1685 | + | |
| 1686 | +var memo = {}; | |
| 1687 | + | |
| 1688 | +/* istanbul ignore next */ | |
| 1689 | +function getTarget(target) { | |
| 1690 | + if (typeof memo[target] === "undefined") { | |
| 1691 | + var styleTarget = document.querySelector(target); | |
| 1692 | + | |
| 1693 | + // Special case to return head of iframe instead of iframe itself | |
| 1694 | + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { | |
| 1695 | + try { | |
| 1696 | + // This will throw an exception if access to iframe is blocked | |
| 1697 | + // due to cross-origin restrictions | |
| 1698 | + styleTarget = styleTarget.contentDocument.head; | |
| 1699 | + } catch (e) { | |
| 1700 | + // istanbul ignore next | |
| 1701 | + styleTarget = null; | |
| 1702 | + } | |
| 1703 | + } | |
| 1704 | + memo[target] = styleTarget; | |
| 1705 | + } | |
| 1706 | + return memo[target]; | |
| 1707 | +} | |
| 1708 | + | |
| 1709 | +/* istanbul ignore next */ | |
| 1710 | +function insertBySelector(insert, style) { | |
| 1711 | + var target = getTarget(insert); | |
| 1712 | + if (!target) { | |
| 1713 | + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); | |
| 1714 | + } | |
| 1715 | + target.appendChild(style); | |
| 1716 | +} | |
| 1717 | +module.exports = insertBySelector; | |
| 1718 | + | |
| 1719 | +/***/ }, | |
| 1720 | + | |
| 1721 | +/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js" | |
| 1722 | +/*!**********************************************************************!*\ | |
| 1723 | + !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! | |
| 1724 | + \**********************************************************************/ | |
| 1725 | +(module) { | |
| 1726 | + | |
| 1727 | +"use strict"; | |
| 1728 | + | |
| 1729 | + | |
| 1730 | +/* istanbul ignore next */ | |
| 1731 | +function insertStyleElement(options) { | |
| 1732 | + var element = document.createElement("style"); | |
| 1733 | + options.setAttributes(element, options.attributes); | |
| 1734 | + options.insert(element, options.options); | |
| 1735 | + return element; | |
| 1736 | +} | |
| 1737 | +module.exports = insertStyleElement; | |
| 1738 | + | |
| 1739 | +/***/ }, | |
| 1740 | + | |
| 1741 | +/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js" | |
| 1742 | +/*!**********************************************************************************!*\ | |
| 1743 | + !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! | |
| 1744 | + \**********************************************************************************/ | |
| 1745 | +(module, __unused_webpack_exports, __webpack_require__) { | |
| 1746 | + | |
| 1747 | +"use strict"; | |
| 1748 | + | |
| 1749 | + | |
| 1750 | +/* istanbul ignore next */ | |
| 1751 | +function setAttributesWithoutAttributes(styleElement) { | |
| 1752 | + var nonce = true ? __webpack_require__.nc : 0; | |
| 1753 | + if (nonce) { | |
| 1754 | + styleElement.setAttribute("nonce", nonce); | |
| 1755 | + } | |
| 1756 | +} | |
| 1757 | +module.exports = setAttributesWithoutAttributes; | |
| 1758 | + | |
| 1759 | +/***/ }, | |
| 1760 | + | |
| 1761 | +/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js" | |
| 1762 | +/*!***************************************************************!*\ | |
| 1763 | + !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! | |
| 1764 | + \***************************************************************/ | |
| 1765 | +(module) { | |
| 1766 | + | |
| 1767 | +"use strict"; | |
| 1768 | + | |
| 1769 | + | |
| 1770 | +/* istanbul ignore next */ | |
| 1771 | +function apply(styleElement, options, obj) { | |
| 1772 | + var css = ""; | |
| 1773 | + if (obj.supports) { | |
| 1774 | + css += "@supports (".concat(obj.supports, ") {"); | |
| 1775 | + } | |
| 1776 | + if (obj.media) { | |
| 1777 | + css += "@media ".concat(obj.media, " {"); | |
| 1778 | + } | |
| 1779 | + var needLayer = typeof obj.layer !== "undefined"; | |
| 1780 | + if (needLayer) { | |
| 1781 | + css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); | |
| 1782 | + } | |
| 1783 | + css += obj.css; | |
| 1784 | + if (needLayer) { | |
| 1785 | + css += "}"; | |
| 1786 | + } | |
| 1787 | + if (obj.media) { | |
| 1788 | + css += "}"; | |
| 1789 | + } | |
| 1790 | + if (obj.supports) { | |
| 1791 | + css += "}"; | |
| 1792 | + } | |
| 1793 | + var sourceMap = obj.sourceMap; | |
| 1794 | + if (sourceMap && typeof btoa !== "undefined") { | |
| 1795 | + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); | |
| 1796 | + } | |
| 1797 | + | |
| 1798 | + // For old IE | |
| 1799 | + /* istanbul ignore if */ | |
| 1800 | + options.styleTagTransform(css, styleElement, options.options); | |
| 1801 | +} | |
| 1802 | +function removeStyleElement(styleElement) { | |
| 1803 | + // istanbul ignore if | |
| 1804 | + if (styleElement.parentNode === null) { | |
| 1805 | + return false; | |
| 1806 | + } | |
| 1807 | + styleElement.parentNode.removeChild(styleElement); | |
| 1808 | +} | |
| 1809 | + | |
| 1810 | +/* istanbul ignore next */ | |
| 1811 | +function domAPI(options) { | |
| 1812 | + if (typeof document === "undefined") { | |
| 1813 | + return { | |
| 1814 | + update: function update() {}, | |
| 1815 | + remove: function remove() {} | |
| 1816 | + }; | |
| 1817 | + } | |
| 1818 | + var styleElement = options.insertStyleElement(options); | |
| 1819 | + return { | |
| 1820 | + update: function update(obj) { | |
| 1821 | + apply(styleElement, options, obj); | |
| 1822 | + }, | |
| 1823 | + remove: function remove() { | |
| 1824 | + removeStyleElement(styleElement); | |
| 1825 | + } | |
| 1826 | + }; | |
| 1827 | +} | |
| 1828 | +module.exports = domAPI; | |
| 1829 | + | |
| 1830 | +/***/ }, | |
| 1831 | + | |
| 1832 | +/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js" | |
| 1833 | +/*!*********************************************************************!*\ | |
| 1834 | + !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! | |
| 1835 | + \*********************************************************************/ | |
| 1836 | +(module) { | |
| 1837 | + | |
| 1838 | +"use strict"; | |
| 1839 | + | |
| 1840 | + | |
| 1841 | +/* istanbul ignore next */ | |
| 1842 | +function styleTagTransform(css, styleElement) { | |
| 1843 | + if (styleElement.styleSheet) { | |
| 1844 | + styleElement.styleSheet.cssText = css; | |
| 1845 | + } else { | |
| 1846 | + while (styleElement.firstChild) { | |
| 1847 | + styleElement.removeChild(styleElement.firstChild); | |
| 1848 | + } | |
| 1849 | + styleElement.appendChild(document.createTextNode(css)); | |
| 1850 | + } | |
| 1851 | +} | |
| 1852 | +module.exports = styleTagTransform; | |
| 1853 | + | |
| 1854 | +/***/ }, | |
| 1855 | + | |
| 1856 | +/***/ "./node_modules/toastify-js/src/toastify.js" | |
| 1857 | +/*!**************************************************!*\ | |
| 1858 | + !*** ./node_modules/toastify-js/src/toastify.js ***! | |
| 1859 | + \**************************************************/ | |
| 1860 | +(module) { | |
| 1861 | + | |
| 1862 | +/*! | |
| 1863 | + * Toastify js 1.12.0 | |
| 1864 | + * https://github.com/apvarun/toastify-js | |
| 1865 | + * @license MIT licensed | |
| 1866 | + * | |
| 1867 | + * Copyright (C) 2018 Varun A P | |
| 1868 | + */ | |
| 1869 | +(function(root, factory) { | |
| 1870 | + if ( true && module.exports) { | |
| 1871 | + module.exports = factory(); | |
| 1872 | + } else { | |
| 1873 | + root.Toastify = factory(); | |
| 1874 | + } | |
| 1875 | +})(this, function(global) { | |
| 1876 | + // Object initialization | |
| 1877 | + var Toastify = function(options) { | |
| 1878 | + // Returning a new init object | |
| 1879 | + return new Toastify.lib.init(options); | |
| 1880 | + }, | |
| 1881 | + // Library version | |
| 1882 | + version = "1.12.0"; | |
| 1883 | + | |
| 1884 | + // Set the default global options | |
| 1885 | + Toastify.defaults = { | |
| 1886 | + oldestFirst: true, | |
| 1887 | + text: "Toastify is awesome!", | |
| 1888 | + node: undefined, | |
| 1889 | + duration: 3000, | |
| 1890 | + selector: undefined, | |
| 1891 | + callback: function () { | |
| 1892 | + }, | |
| 1893 | + destination: undefined, | |
| 1894 | + newWindow: false, | |
| 1895 | + close: false, | |
| 1896 | + gravity: "toastify-top", | |
| 1897 | + positionLeft: false, | |
| 1898 | + position: '', | |
| 1899 | + backgroundColor: '', | |
| 1900 | + avatar: "", | |
| 1901 | + className: "", | |
| 1902 | + stopOnFocus: true, | |
| 1903 | + onClick: function () { | |
| 1904 | + }, | |
| 1905 | + offset: {x: 0, y: 0}, | |
| 1906 | + escapeMarkup: true, | |
| 1907 | + ariaLive: 'polite', | |
| 1908 | + style: {background: ''} | |
| 1909 | + }; | |
| 1910 | + | |
| 1911 | + // Defining the prototype of the object | |
| 1912 | + Toastify.lib = Toastify.prototype = { | |
| 1913 | + toastify: version, | |
| 1914 | + | |
| 1915 | + constructor: Toastify, | |
| 1916 | + | |
| 1917 | + // Initializing the object with required parameters | |
| 1918 | + init: function(options) { | |
| 1919 | + // Verifying and validating the input object | |
| 1920 | + if (!options) { | |
| 1921 | + options = {}; | |
| 1922 | + } | |
| 1923 | + | |
| 1924 | + // Creating the options object | |
| 1925 | + this.options = {}; | |
| 1926 | + | |
| 1927 | + this.toastElement = null; | |
| 1928 | + | |
| 1929 | + // Validating the options | |
| 1930 | + this.options.text = options.text || Toastify.defaults.text; // Display message | |
| 1931 | + this.options.node = options.node || Toastify.defaults.node; // Display content as node | |
| 1932 | + this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration | |
| 1933 | + this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector | |
| 1934 | + this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display | |
| 1935 | + this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination | |
| 1936 | + this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window | |
| 1937 | + this.options.close = options.close || Toastify.defaults.close; // Show toast close icon | |
| 1938 | + this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom | |
| 1939 | + this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right | |
| 1940 | + this.options.position = options.position || Toastify.defaults.position; // toast position - left or right | |
| 1941 | + this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color | |
| 1942 | + this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path | |
| 1943 | + this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast | |
| 1944 | + this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus | |
| 1945 | + this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click | |
| 1946 | + this.options.offset = options.offset || Toastify.defaults.offset; // toast offset | |
| 1947 | + this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup; | |
| 1948 | + this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive; | |
| 1949 | + this.options.style = options.style || Toastify.defaults.style; | |
| 1950 | + if(options.backgroundColor) { | |
| 1951 | + this.options.style.background = options.backgroundColor; | |
| 1952 | + } | |
| 1953 | + | |
| 1954 | + // Returning the current object for chaining functions | |
| 1955 | + return this; | |
| 1956 | + }, | |
| 1957 | + | |
| 1958 | + // Building the DOM element | |
| 1959 | + buildToast: function() { | |
| 1960 | + // Validating if the options are defined | |
| 1961 | + if (!this.options) { | |
| 1962 | + throw "Toastify is not initialized"; | |
| 1963 | + } | |
| 1964 | + | |
| 1965 | + // Creating the DOM object | |
| 1966 | + var divElement = document.createElement("div"); | |
| 1967 | + divElement.className = "toastify on " + this.options.className; | |
| 1968 | + | |
| 1969 | + // Positioning toast to left or right or center | |
| 1970 | + if (!!this.options.position) { | |
| 1971 | + divElement.className += " toastify-" + this.options.position; | |
| 1972 | + } else { | |
| 1973 | + // To be depreciated in further versions | |
| 1974 | + if (this.options.positionLeft === true) { | |
| 1975 | + divElement.className += " toastify-left"; | |
| 1976 | + console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.') | |
| 1977 | + } else { | |
| 1978 | + // Default position | |
| 1979 | + divElement.className += " toastify-right"; | |
| 1980 | + } | |
| 1981 | + } | |
| 1982 | + | |
| 1983 | + // Assigning gravity of element | |
| 1984 | + divElement.className += " " + this.options.gravity; | |
| 1985 | + | |
| 1986 | + if (this.options.backgroundColor) { | |
| 1987 | + // This is being deprecated in favor of using the style HTML DOM property | |
| 1988 | + console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'); | |
| 1989 | + } | |
| 1990 | + | |
| 1991 | + // Loop through our style object and apply styles to divElement | |
| 1992 | + for (var property in this.options.style) { | |
| 1993 | + divElement.style[property] = this.options.style[property]; | |
| 1994 | + } | |
| 1995 | + | |
| 1996 | + // Announce the toast to screen readers | |
| 1997 | + if (this.options.ariaLive) { | |
| 1998 | + divElement.setAttribute('aria-live', this.options.ariaLive) | |
| 1999 | + } | |
| 2000 | + | |
| 2001 | + // Adding the toast message/node | |
| 2002 | + if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) { | |
| 2003 | + // If we have a valid node, we insert it | |
| 2004 | + divElement.appendChild(this.options.node) | |
| 2005 | + } else { | |
| 2006 | + if (this.options.escapeMarkup) { | |
| 2007 | + divElement.innerText = this.options.text; | |
| 2008 | + } else { | |
| 2009 | + divElement.innerHTML = this.options.text; | |
| 2010 | + } | |
| 2011 | + | |
| 2012 | + if (this.options.avatar !== "") { | |
| 2013 | + var avatarElement = document.createElement("img"); | |
| 2014 | + avatarElement.src = this.options.avatar; | |
| 2015 | + | |
| 2016 | + avatarElement.className = "toastify-avatar"; | |
| 2017 | + | |
| 2018 | + if (this.options.position == "left" || this.options.positionLeft === true) { | |
| 2019 | + // Adding close icon on the left of content | |
| 2020 | + divElement.appendChild(avatarElement); | |
| 2021 | + } else { | |
| 2022 | + // Adding close icon on the right of content | |
| 2023 | + divElement.insertAdjacentElement("afterbegin", avatarElement); | |
| 2024 | + } | |
| 2025 | + } | |
| 2026 | + } | |
| 2027 | + | |
| 2028 | + // Adding a close icon to the toast | |
| 2029 | + if (this.options.close === true) { | |
| 2030 | + // Create a span for close element | |
| 2031 | + var closeElement = document.createElement("button"); | |
| 2032 | + closeElement.type = "button"; | |
| 2033 | + closeElement.setAttribute("aria-label", "Close"); | |
| 2034 | + closeElement.className = "toast-close"; | |
| 2035 | + closeElement.innerHTML = "✖"; | |
| 2036 | + | |
| 2037 | + // Triggering the removal of toast from DOM on close click | |
| 2038 | + closeElement.addEventListener( | |
| 2039 | + "click", | |
| 2040 | + function(event) { | |
| 2041 | + event.stopPropagation(); | |
| 2042 | + this.removeElement(this.toastElement); | |
| 2043 | + window.clearTimeout(this.toastElement.timeOutValue); | |
| 2044 | + }.bind(this) | |
| 2045 | + ); | |
| 2046 | + | |
| 2047 | + //Calculating screen width | |
| 2048 | + var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2049 | + | |
| 2050 | + // Adding the close icon to the toast element | |
| 2051 | + // Display on the right if screen width is less than or equal to 360px | |
| 2052 | + if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) { | |
| 2053 | + // Adding close icon on the left of content | |
| 2054 | + divElement.insertAdjacentElement("afterbegin", closeElement); | |
| 2055 | + } else { | |
| 2056 | + // Adding close icon on the right of content | |
| 2057 | + divElement.appendChild(closeElement); | |
| 2058 | + } | |
| 2059 | + } | |
| 2060 | + | |
| 2061 | + // Clear timeout while toast is focused | |
| 2062 | + if (this.options.stopOnFocus && this.options.duration > 0) { | |
| 2063 | + var self = this; | |
| 2064 | + // stop countdown | |
| 2065 | + divElement.addEventListener( | |
| 2066 | + "mouseover", | |
| 2067 | + function(event) { | |
| 2068 | + window.clearTimeout(divElement.timeOutValue); | |
| 2069 | + } | |
| 2070 | + ) | |
| 2071 | + // add back the timeout | |
| 2072 | + divElement.addEventListener( | |
| 2073 | + "mouseleave", | |
| 2074 | + function() { | |
| 2075 | + divElement.timeOutValue = window.setTimeout( | |
| 2076 | + function() { | |
| 2077 | + // Remove the toast from DOM | |
| 2078 | + self.removeElement(divElement); | |
| 2079 | + }, | |
| 2080 | + self.options.duration | |
| 2081 | + ) | |
| 2082 | + } | |
| 2083 | + ) | |
| 2084 | + } | |
| 2085 | + | |
| 2086 | + // Adding an on-click destination path | |
| 2087 | + if (typeof this.options.destination !== "undefined") { | |
| 2088 | + divElement.addEventListener( | |
| 2089 | + "click", | |
| 2090 | + function(event) { | |
| 2091 | + event.stopPropagation(); | |
| 2092 | + if (this.options.newWindow === true) { | |
| 2093 | + window.open(this.options.destination, "_blank"); | |
| 2094 | + } else { | |
| 2095 | + window.location = this.options.destination; | |
| 2096 | + } | |
| 2097 | + }.bind(this) | |
| 2098 | + ); | |
| 2099 | + } | |
| 2100 | + | |
| 2101 | + if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") { | |
| 2102 | + divElement.addEventListener( | |
| 2103 | + "click", | |
| 2104 | + function(event) { | |
| 2105 | + event.stopPropagation(); | |
| 2106 | + this.options.onClick(); | |
| 2107 | + }.bind(this) | |
| 2108 | + ); | |
| 2109 | + } | |
| 2110 | + | |
| 2111 | + // Adding offset | |
| 2112 | + if(typeof this.options.offset === "object") { | |
| 2113 | + | |
| 2114 | + var x = getAxisOffsetAValue("x", this.options); | |
| 2115 | + var y = getAxisOffsetAValue("y", this.options); | |
| 2116 | + | |
| 2117 | + var xOffset = this.options.position == "left" ? x : "-" + x; | |
| 2118 | + var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y; | |
| 2119 | + | |
| 2120 | + divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")"; | |
| 2121 | + | |
| 2122 | + } | |
| 2123 | + | |
| 2124 | + // Returning the generated element | |
| 2125 | + return divElement; | |
| 2126 | + }, | |
| 2127 | + | |
| 2128 | + // Displaying the toast | |
| 2129 | + showToast: function() { | |
| 2130 | + // Creating the DOM object for the toast | |
| 2131 | + this.toastElement = this.buildToast(); | |
| 2132 | + | |
| 2133 | + // Getting the root element to with the toast needs to be added | |
| 2134 | + var rootElement; | |
| 2135 | + if (typeof this.options.selector === "string") { | |
| 2136 | + rootElement = document.getElementById(this.options.selector); | |
| 2137 | + } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) { | |
| 2138 | + rootElement = this.options.selector; | |
| 2139 | + } else { | |
| 2140 | + rootElement = document.body; | |
| 2141 | + } | |
| 2142 | + | |
| 2143 | + // Validating if root element is present in DOM | |
| 2144 | + if (!rootElement) { | |
| 2145 | + throw "Root element is not defined"; | |
| 2146 | + } | |
| 2147 | + | |
| 2148 | + // Adding the DOM element | |
| 2149 | + var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild; | |
| 2150 | + rootElement.insertBefore(this.toastElement, elementToInsert); | |
| 2151 | + | |
| 2152 | + // Repositioning the toasts in case multiple toasts are present | |
| 2153 | + Toastify.reposition(); | |
| 2154 | + | |
| 2155 | + if (this.options.duration > 0) { | |
| 2156 | + this.toastElement.timeOutValue = window.setTimeout( | |
| 2157 | + function() { | |
| 2158 | + // Remove the toast from DOM | |
| 2159 | + this.removeElement(this.toastElement); | |
| 2160 | + }.bind(this), | |
| 2161 | + this.options.duration | |
| 2162 | + ); // Binding `this` for function invocation | |
| 2163 | + } | |
| 2164 | + | |
| 2165 | + // Supporting function chaining | |
| 2166 | + return this; | |
| 2167 | + }, | |
| 2168 | + | |
| 2169 | + hideToast: function() { | |
| 2170 | + if (this.toastElement.timeOutValue) { | |
| 2171 | + clearTimeout(this.toastElement.timeOutValue); | |
| 2172 | + } | |
| 2173 | + this.removeElement(this.toastElement); | |
| 2174 | + }, | |
| 2175 | + | |
| 2176 | + // Removing the element from the DOM | |
| 2177 | + removeElement: function(toastElement) { | |
| 2178 | + // Hiding the element | |
| 2179 | + // toastElement.classList.remove("on"); | |
| 2180 | + toastElement.className = toastElement.className.replace(" on", ""); | |
| 2181 | + | |
| 2182 | + // Removing the element from DOM after transition end | |
| 2183 | + window.setTimeout( | |
| 2184 | + function() { | |
| 2185 | + // remove options node if any | |
| 2186 | + if (this.options.node && this.options.node.parentNode) { | |
| 2187 | + this.options.node.parentNode.removeChild(this.options.node); | |
| 2188 | + } | |
| 2189 | + | |
| 2190 | + // Remove the element from the DOM, only when the parent node was not removed before. | |
| 2191 | + if (toastElement.parentNode) { | |
| 2192 | + toastElement.parentNode.removeChild(toastElement); | |
| 2193 | + } | |
| 2194 | + | |
| 2195 | + // Calling the callback function | |
| 2196 | + this.options.callback.call(toastElement); | |
| 2197 | + | |
| 2198 | + // Repositioning the toasts again | |
| 2199 | + Toastify.reposition(); | |
| 2200 | + }.bind(this), | |
| 2201 | + 400 | |
| 2202 | + ); // Binding `this` for function invocation | |
| 2203 | + }, | |
| 2204 | + }; | |
| 2205 | + | |
| 2206 | + // Positioning the toasts on the DOM | |
| 2207 | + Toastify.reposition = function() { | |
| 2208 | + | |
| 2209 | + // Top margins with gravity | |
| 2210 | + var topLeftOffsetSize = { | |
| 2211 | + top: 15, | |
| 2212 | + bottom: 15, | |
| 2213 | + }; | |
| 2214 | + var topRightOffsetSize = { | |
| 2215 | + top: 15, | |
| 2216 | + bottom: 15, | |
| 2217 | + }; | |
| 2218 | + var offsetSize = { | |
| 2219 | + top: 15, | |
| 2220 | + bottom: 15, | |
| 2221 | + }; | |
| 2222 | + | |
| 2223 | + // Get all toast messages on the DOM | |
| 2224 | + var allToasts = document.getElementsByClassName("toastify"); | |
| 2225 | + | |
| 2226 | + var classUsed; | |
| 2227 | + | |
| 2228 | + // Modifying the position of each toast element | |
| 2229 | + for (var i = 0; i < allToasts.length; i++) { | |
| 2230 | + // Getting the applied gravity | |
| 2231 | + if (containsClass(allToasts[i], "toastify-top") === true) { | |
| 2232 | + classUsed = "toastify-top"; | |
| 2233 | + } else { | |
| 2234 | + classUsed = "toastify-bottom"; | |
| 2235 | + } | |
| 2236 | + | |
| 2237 | + var height = allToasts[i].offsetHeight; | |
| 2238 | + classUsed = classUsed.substr(9, classUsed.length-1) | |
| 2239 | + // Spacing between toasts | |
| 2240 | + var offset = 15; | |
| 2241 | + | |
| 2242 | + var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2243 | + | |
| 2244 | + // Show toast in center if screen with less than or equal to 360px | |
| 2245 | + if (width <= 360) { | |
| 2246 | + // Setting the position | |
| 2247 | + allToasts[i].style[classUsed] = offsetSize[classUsed] + "px"; | |
| 2248 | + | |
| 2249 | + offsetSize[classUsed] += height + offset; | |
| 2250 | + } else { | |
| 2251 | + if (containsClass(allToasts[i], "toastify-left") === true) { | |
| 2252 | + // Setting the position | |
| 2253 | + allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px"; | |
| 2254 | + | |
| 2255 | + topLeftOffsetSize[classUsed] += height + offset; | |
| 2256 | + } else { | |
| 2257 | + // Setting the position | |
| 2258 | + allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px"; | |
| 2259 | + | |
| 2260 | + topRightOffsetSize[classUsed] += height + offset; | |
| 2261 | + } | |
| 2262 | + } | |
| 2263 | + } | |
| 2264 | + | |
| 2265 | + // Supporting function chaining | |
| 2266 | + return this; | |
| 2267 | + }; | |
| 2268 | + | |
| 2269 | + // Helper function to get offset. | |
| 2270 | + function getAxisOffsetAValue(axis, options) { | |
| 2271 | + | |
| 2272 | + if(options.offset[axis]) { | |
| 2273 | + if(isNaN(options.offset[axis])) { | |
| 2274 | + return options.offset[axis]; | |
| 2275 | + } | |
| 2276 | + else { | |
| 2277 | + return options.offset[axis] + 'px'; | |
| 2278 | + } | |
| 2279 | + } | |
| 2280 | + | |
| 2281 | + return '0px'; | |
| 2282 | + | |
| 2283 | + } | |
| 2284 | + | |
| 2285 | + function containsClass(elem, yourClass) { | |
| 2286 | + if (!elem || typeof yourClass !== "string") { | |
| 2287 | + return false; | |
| 2288 | + } else if ( | |
| 2289 | + elem.className && | |
| 2290 | + elem.className | |
| 2291 | + .trim() | |
| 2292 | + .split(/\s+/gi) | |
| 2293 | + .indexOf(yourClass) > -1 | |
| 2294 | + ) { | |
| 2295 | + return true; | |
| 2296 | + } else { | |
| 2297 | + return false; | |
| 2298 | + } | |
| 2299 | + } | |
| 2300 | + | |
| 2301 | + // Setting up the prototype for the init object | |
| 2302 | + Toastify.lib.init.prototype = Toastify.lib; | |
| 2303 | + | |
| 2304 | + // Returning the Toastify function to be assigned to the window object/module | |
| 2305 | + return Toastify; | |
| 2306 | +}); | |
| 2307 | + | |
| 2308 | + | |
| 2309 | +/***/ }, | |
| 2310 | + | |
| 789 | 2311 | /***/ "./node_modules/@orchidjs/sifter/dist/esm/sifter.js" |
| 790 | 2312 | /*!**********************************************************!*\ |
| 791 | 2313 | !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***! |
| 792 | 2314 | \**********************************************************/ |
| @@ -791,8 +2313,9 @@ | ||
| 791 | 2313 | !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***! |
| 792 | 2314 | \**********************************************************/ |
| 793 | 2315 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 794 | 2316 | |
| 2317 | +"use strict"; | |
| 795 | 2318 | __webpack_require__.r(__webpack_exports__); |
| 796 | 2319 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 797 | 2320 | /* harmony export */ Sifter: () => (/* binding */ Sifter), |
| 798 | 2321 | /* harmony export */ cmp: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.cmp), |
| @@ -1118,8 +2641,9 @@ | ||
| 1118 | 2641 | !*** ./node_modules/@orchidjs/sifter/dist/esm/types.js ***! |
| 1119 | 2642 | \*********************************************************/ |
| 1120 | 2643 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1121 | 2644 | |
| 2645 | +"use strict"; | |
| 1122 | 2646 | __webpack_require__.r(__webpack_exports__); |
| 1123 | 2647 | |
| 1124 | 2648 | //# sourceMappingURL=types.js.map |
| 1125 | 2649 | |
| @@ -1130,8 +2654,9 @@ | ||
| 1130 | 2654 | !*** ./node_modules/@orchidjs/sifter/dist/esm/utils.js ***! |
| 1131 | 2655 | \*********************************************************/ |
| 1132 | 2656 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1133 | 2657 | |
| 2658 | +"use strict"; | |
| 1134 | 2659 | __webpack_require__.r(__webpack_exports__); |
| 1135 | 2660 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1136 | 2661 | /* harmony export */ cmp: () => (/* binding */ cmp), |
| 1137 | 2662 | /* harmony export */ getAttr: () => (/* binding */ getAttr), |
| @@ -1242,8 +2767,9 @@ | ||
| 1242 | 2767 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/index.js ***! |
| 1243 | 2768 | \*******************************************************************/ |
| 1244 | 2769 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1245 | 2770 | |
| 2771 | +"use strict"; | |
| 1246 | 2772 | __webpack_require__.r(__webpack_exports__); |
| 1247 | 2773 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1248 | 2774 | /* harmony export */ _asciifold: () => (/* binding */ _asciifold), |
| 1249 | 2775 | /* harmony export */ asciifold: () => (/* binding */ asciifold), |
| @@ -1645,8 +3171,9 @@ | ||
| 1645 | 3171 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/regex.js ***! |
| 1646 | 3172 | \*******************************************************************/ |
| 1647 | 3173 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1648 | 3174 | |
| 3175 | +"use strict"; | |
| 1649 | 3176 | __webpack_require__.r(__webpack_exports__); |
| 1650 | 3177 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1651 | 3178 | /* harmony export */ arrayToPattern: () => (/* binding */ arrayToPattern), |
| 1652 | 3179 | /* harmony export */ escape_regex: () => (/* binding */ escape_regex), |
| @@ -1730,8 +3257,9 @@ | ||
| 1730 | 3257 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/strings.js ***! |
| 1731 | 3258 | \*********************************************************************/ |
| 1732 | 3259 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1733 | 3260 | |
| 3261 | +"use strict"; | |
| 1734 | 3262 | __webpack_require__.r(__webpack_exports__); |
| 1735 | 3263 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1736 | 3264 | /* harmony export */ allSubstrings: () => (/* binding */ allSubstrings) |
| 1737 | 3265 | /* harmony export */ }); |
| @@ -1764,8 +3292,9 @@ | ||
| 1764 | 3292 | !*** ./node_modules/tom-select/dist/esm/constants.js ***! |
| 1765 | 3293 | \*******************************************************/ |
| 1766 | 3294 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1767 | 3295 | |
| 3296 | +"use strict"; | |
| 1768 | 3297 | __webpack_require__.r(__webpack_exports__); |
| 1769 | 3298 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1770 | 3299 | /* harmony export */ IS_MAC: () => (/* binding */ IS_MAC), |
| 1771 | 3300 | /* harmony export */ KEY_A: () => (/* binding */ KEY_A), |
| @@ -1801,8 +3330,9 @@ | ||
| 1801 | 3330 | !*** ./node_modules/tom-select/dist/esm/contrib/highlight.js ***! |
| 1802 | 3331 | \***************************************************************/ |
| 1803 | 3332 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1804 | 3333 | |
| 3334 | +"use strict"; | |
| 1805 | 3335 | __webpack_require__.r(__webpack_exports__); |
| 1806 | 3336 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1807 | 3337 | /* harmony export */ highlight: () => (/* binding */ highlight), |
| 1808 | 3338 | /* harmony export */ removeHighlight: () => (/* binding */ removeHighlight) |
| @@ -1880,8 +3410,9 @@ | ||
| 1880 | 3410 | !*** ./node_modules/tom-select/dist/esm/contrib/microevent.js ***! |
| 1881 | 3411 | \****************************************************************/ |
| 1882 | 3412 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1883 | 3413 | |
| 3414 | +"use strict"; | |
| 1884 | 3415 | __webpack_require__.r(__webpack_exports__); |
| 1885 | 3416 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1886 | 3417 | /* harmony export */ "default": () => (/* binding */ MicroEvent) |
| 1887 | 3418 | /* harmony export */ }); |
| @@ -1954,8 +3485,9 @@ | ||
| 1954 | 3485 | !*** ./node_modules/tom-select/dist/esm/contrib/microplugin.js ***! |
| 1955 | 3486 | \*****************************************************************/ |
| 1956 | 3487 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1957 | 3488 | |
| 3489 | +"use strict"; | |
| 1958 | 3490 | __webpack_require__.r(__webpack_exports__); |
| 1959 | 3491 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1960 | 3492 | /* harmony export */ "default": () => (/* binding */ MicroPlugin) |
| 1961 | 3493 | /* harmony export */ }); |
| @@ -2076,8 +3608,9 @@ | ||
| 2076 | 3608 | !*** ./node_modules/tom-select/dist/esm/defaults.js ***! |
| 2077 | 3609 | \******************************************************/ |
| 2078 | 3610 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2079 | 3611 | |
| 3612 | +"use strict"; | |
| 2080 | 3613 | __webpack_require__.r(__webpack_exports__); |
| 2081 | 3614 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2082 | 3615 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2083 | 3616 | /* harmony export */ }); |
| @@ -2172,8 +3705,9 @@ | ||
| 2172 | 3705 | !*** ./node_modules/tom-select/dist/esm/getSettings.js ***! |
| 2173 | 3706 | \*********************************************************/ |
| 2174 | 3707 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2175 | 3708 | |
| 3709 | +"use strict"; | |
| 2176 | 3710 | __webpack_require__.r(__webpack_exports__); |
| 2177 | 3711 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2178 | 3712 | /* harmony export */ "default": () => (/* binding */ getSettings) |
| 2179 | 3713 | /* harmony export */ }); |
| @@ -2331,8 +3865,9 @@ | ||
| 2331 | 3865 | !*** ./node_modules/tom-select/dist/esm/plugins/caret_position/plugin.js ***! |
| 2332 | 3866 | \***************************************************************************/ |
| 2333 | 3867 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2334 | 3868 | |
| 3869 | +"use strict"; | |
| 2335 | 3870 | __webpack_require__.r(__webpack_exports__); |
| 2336 | 3871 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2337 | 3872 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2338 | 3873 | /* harmony export */ }); |
| @@ -2508,8 +4043,9 @@ | ||
| 2508 | 4043 | !*** ./node_modules/tom-select/dist/esm/plugins/change_listener/plugin.js ***! |
| 2509 | 4044 | \****************************************************************************/ |
| 2510 | 4045 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2511 | 4046 | |
| 4047 | +"use strict"; | |
| 2512 | 4048 | __webpack_require__.r(__webpack_exports__); |
| 2513 | 4049 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2514 | 4050 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2515 | 4051 | /* harmony export */ }); |
| @@ -2573,8 +4109,9 @@ | ||
| 2573 | 4109 | !*** ./node_modules/tom-select/dist/esm/plugins/checkbox_options/plugin.js ***! |
| 2574 | 4110 | \*****************************************************************************/ |
| 2575 | 4111 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2576 | 4112 | |
| 4113 | +"use strict"; | |
| 2577 | 4114 | __webpack_require__.r(__webpack_exports__); |
| 2578 | 4115 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2579 | 4116 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2580 | 4117 | /* harmony export */ }); |
| @@ -2766,8 +4303,9 @@ | ||
| 2766 | 4303 | !*** ./node_modules/tom-select/dist/esm/plugins/clear_button/plugin.js ***! |
| 2767 | 4304 | \*************************************************************************/ |
| 2768 | 4305 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2769 | 4306 | |
| 4307 | +"use strict"; | |
| 2770 | 4308 | __webpack_require__.r(__webpack_exports__); |
| 2771 | 4309 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2772 | 4310 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2773 | 4311 | /* harmony export */ }); |
| @@ -2856,8 +4394,9 @@ | ||
| 2856 | 4394 | !*** ./node_modules/tom-select/dist/esm/plugins/drag_drop/plugin.js ***! |
| 2857 | 4395 | \**********************************************************************/ |
| 2858 | 4396 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2859 | 4397 | |
| 4398 | +"use strict"; | |
| 2860 | 4399 | __webpack_require__.r(__webpack_exports__); |
| 2861 | 4400 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2862 | 4401 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2863 | 4402 | /* harmony export */ }); |
| @@ -3090,8 +4629,9 @@ | ||
| 3090 | 4629 | !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_header/plugin.js ***! |
| 3091 | 4630 | \****************************************************************************/ |
| 3092 | 4631 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3093 | 4632 | |
| 4633 | +"use strict"; | |
| 3094 | 4634 | __webpack_require__.r(__webpack_exports__); |
| 3095 | 4635 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3096 | 4636 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3097 | 4637 | /* harmony export */ }); |
| @@ -3206,8 +4746,9 @@ | ||
| 3206 | 4746 | !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_input/plugin.js ***! |
| 3207 | 4747 | \***************************************************************************/ |
| 3208 | 4748 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3209 | 4749 | |
| 4750 | +"use strict"; | |
| 3210 | 4751 | __webpack_require__.r(__webpack_exports__); |
| 3211 | 4752 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3212 | 4753 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3213 | 4754 | /* harmony export */ }); |
| @@ -3444,8 +4985,9 @@ | ||
| 3444 | 4985 | !*** ./node_modules/tom-select/dist/esm/plugins/input_autogrow/plugin.js ***! |
| 3445 | 4986 | \***************************************************************************/ |
| 3446 | 4987 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3447 | 4988 | |
| 4989 | +"use strict"; | |
| 3448 | 4990 | __webpack_require__.r(__webpack_exports__); |
| 3449 | 4991 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3450 | 4992 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3451 | 4993 | /* harmony export */ }); |
| @@ -3532,8 +5074,9 @@ | ||
| 3532 | 5074 | !*** ./node_modules/tom-select/dist/esm/plugins/no_active_items/plugin.js ***! |
| 3533 | 5075 | \****************************************************************************/ |
| 3534 | 5076 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3535 | 5077 | |
| 5078 | +"use strict"; | |
| 3536 | 5079 | __webpack_require__.r(__webpack_exports__); |
| 3537 | 5080 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3538 | 5081 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3539 | 5082 | /* harmony export */ }); |
| @@ -3572,8 +5115,9 @@ | ||
| 3572 | 5115 | !*** ./node_modules/tom-select/dist/esm/plugins/no_backspace_delete/plugin.js ***! |
| 3573 | 5116 | \********************************************************************************/ |
| 3574 | 5117 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3575 | 5118 | |
| 5119 | +"use strict"; | |
| 3576 | 5120 | __webpack_require__.r(__webpack_exports__); |
| 3577 | 5121 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3578 | 5122 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3579 | 5123 | /* harmony export */ }); |
| @@ -3618,8 +5162,9 @@ | ||
| 3618 | 5162 | !*** ./node_modules/tom-select/dist/esm/plugins/optgroup_columns/plugin.js ***! |
| 3619 | 5163 | \*****************************************************************************/ |
| 3620 | 5164 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3621 | 5165 | |
| 5166 | +"use strict"; | |
| 3622 | 5167 | __webpack_require__.r(__webpack_exports__); |
| 3623 | 5168 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3624 | 5169 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3625 | 5170 | /* harmony export */ }); |
| @@ -3718,8 +5263,9 @@ | ||
| 3718 | 5263 | !*** ./node_modules/tom-select/dist/esm/plugins/remove_button/plugin.js ***! |
| 3719 | 5264 | \**************************************************************************/ |
| 3720 | 5265 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3721 | 5266 | |
| 5267 | +"use strict"; | |
| 3722 | 5268 | __webpack_require__.r(__webpack_exports__); |
| 3723 | 5269 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3724 | 5270 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3725 | 5271 | /* harmony export */ }); |
| @@ -3861,8 +5407,9 @@ | ||
| 3861 | 5407 | !*** ./node_modules/tom-select/dist/esm/plugins/restore_on_backspace/plugin.js ***! |
| 3862 | 5408 | \*********************************************************************************/ |
| 3863 | 5409 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3864 | 5410 | |
| 5411 | +"use strict"; | |
| 3865 | 5412 | __webpack_require__.r(__webpack_exports__); |
| 3866 | 5413 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3867 | 5414 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3868 | 5415 | /* harmony export */ }); |
| @@ -3917,8 +5464,9 @@ | ||
| 3917 | 5464 | !*** ./node_modules/tom-select/dist/esm/plugins/virtual_scroll/plugin.js ***! |
| 3918 | 5465 | \***************************************************************************/ |
| 3919 | 5466 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3920 | 5467 | |
| 5468 | +"use strict"; | |
| 3921 | 5469 | __webpack_require__.r(__webpack_exports__); |
| 3922 | 5470 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3923 | 5471 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3924 | 5472 | /* harmony export */ }); |
| @@ -4253,8 +5801,9 @@ | ||
| 4253 | 5801 | !*** ./node_modules/tom-select/dist/esm/tom-select.complete.js ***! |
| 4254 | 5802 | \*****************************************************************/ |
| 4255 | 5803 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 4256 | 5804 | |
| 5805 | +"use strict"; | |
| 4257 | 5806 | __webpack_require__.r(__webpack_exports__); |
| 4258 | 5807 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4259 | 5808 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 4260 | 5809 | /* harmony export */ }); |
| @@ -4312,8 +5861,9 @@ | ||
| 4312 | 5861 | !*** ./node_modules/tom-select/dist/esm/tom-select.js ***! |
| 4313 | 5862 | \********************************************************/ |
| 4314 | 5863 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 4315 | 5864 | |
| 5865 | +"use strict"; | |
| 4316 | 5866 | __webpack_require__.r(__webpack_exports__); |
| 4317 | 5867 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4318 | 5868 | /* harmony export */ "default": () => (/* binding */ TomSelect) |
| 4319 | 5869 | /* harmony export */ }); |
| @@ -6641,8 +8191,9 @@ | ||
| 6641 | 8191 | !*** ./node_modules/tom-select/dist/esm/utils.js ***! |
| 6642 | 8192 | \***************************************************/ |
| 6643 | 8193 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 6644 | 8194 | |
| 8195 | +"use strict"; | |
| 6645 | 8196 | __webpack_require__.r(__webpack_exports__); |
| 6646 | 8197 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6647 | 8198 | /* harmony export */ addEvent: () => (/* binding */ addEvent), |
| 6648 | 8199 | /* harmony export */ addSlashes: () => (/* binding */ addSlashes), |
| @@ -6862,8 +8413,9 @@ | ||
| 6862 | 8413 | !*** ./node_modules/tom-select/dist/esm/vanilla.js ***! |
| 6863 | 8414 | \*****************************************************/ |
| 6864 | 8415 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 6865 | 8416 | |
| 8417 | +"use strict"; | |
| 6866 | 8418 | __webpack_require__.r(__webpack_exports__); |
| 6867 | 8419 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6868 | 8420 | /* harmony export */ addClasses: () => (/* binding */ addClasses), |
| 6869 | 8421 | /* harmony export */ applyCSS: () => (/* binding */ applyCSS), |
| @@ -7070,9 +8622,9 @@ | ||
| 7070 | 8622 | /******/ return cachedModule.exports; |
| 7071 | 8623 | /******/ } |
| 7072 | 8624 | /******/ // Create a new module (and put it into the cache) |
| 7073 | 8625 | /******/ const module = __webpack_module_cache__[moduleId] = { |
| 7074 | -/******/ // no module.id needed | |
| 8626 | +/******/ id: moduleId, | |
| 7075 | 8627 | /******/ // no module.loaded needed |
| 7076 | 8628 | /******/ exports: {} |
| 7077 | 8629 | /******/ }; |
| 7078 | 8630 | /******/ |
| @@ -7082,9 +8634,9 @@ | ||
| 7082 | 8634 | /******/ const e = new Error("Cannot find module '" + moduleId + "'"); |
| 7083 | 8635 | /******/ e.code = 'MODULE_NOT_FOUND'; |
| 7084 | 8636 | /******/ throw e; |
| 7085 | 8637 | /******/ } |
| 7086 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 8638 | +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
| 7087 | 8639 | /******/ |
| 7088 | 8640 | /******/ // Return the exports of the module |
| 7089 | 8641 | /******/ return module.exports; |
| 7090 | 8642 | /******/ } |
| @@ -7089,8 +8641,20 @@ | ||
| 7089 | 8641 | /******/ return module.exports; |
| 7090 | 8642 | /******/ } |
| 7091 | 8643 | /******/ |
| 7092 | 8644 | /************************************************************************/ |
| 8645 | +/******/ /* webpack/runtime/compat get default export */ | |
| 8646 | +/******/ (() => { | |
| 8647 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 8648 | +/******/ __webpack_require__.n = (module) => { | |
| 8649 | +/******/ const getter = module && module.__esModule ? | |
| 8650 | +/******/ () => (module['default']) : | |
| 8651 | +/******/ () => (module); | |
| 8652 | +/******/ __webpack_require__.d(getter, { a: getter }); | |
| 8653 | +/******/ return getter; | |
| 8654 | +/******/ }; | |
| 8655 | +/******/ })(); | |
| 8656 | +/******/ | |
| 7093 | 8657 | /******/ /* webpack/runtime/define property getters */ |
| 7094 | 8658 | /******/ (() => { |
| 7095 | 8659 | /******/ // define getter/value functions for harmony exports |
| 7096 | 8660 | /******/ __webpack_require__.d = (exports, definition) => { |
| @@ -7132,12 +8696,18 @@ | ||
| 7132 | 8696 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 7133 | 8697 | /******/ }; |
| 7134 | 8698 | /******/ })(); |
| 7135 | 8699 | /******/ |
| 8700 | +/******/ /* webpack/runtime/nonce */ | |
| 8701 | +/******/ (() => { | |
| 8702 | +/******/ __webpack_require__.nc = undefined; | |
| 8703 | +/******/ })(); | |
| 8704 | +/******/ | |
| 7136 | 8705 | /************************************************************************/ |
| 7137 | 8706 | let __webpack_exports__ = {}; |
| 7138 | -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. | |
| 8707 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 7139 | 8708 | (() => { |
| 8709 | +"use strict"; | |
| 7140 | 8710 | /*!**************************************!*\ |
| 7141 | 8711 | !*** ./assets/src/js/admin/admin.js ***! |
| 7142 | 8712 | \**************************************/ |
| 7143 | 8713 | __webpack_require__.r(__webpack_exports__); |
| @@ -7142,10 +8712,12 @@ | ||
| 7142 | 8712 | \**************************************/ |
| 7143 | 8713 | __webpack_require__.r(__webpack_exports__); |
| 7144 | 8714 | /* harmony import */ var _init_tom_select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init-tom-select.js */ "./assets/src/js/admin/init-tom-select.js"); |
| 7145 | 8715 | /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js"); |
| 8716 | +/* harmony import */ var _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./share/dropdown-pages.js */ "./assets/src/js/admin/share/dropdown-pages.js"); | |
| 7146 | 8717 | |
| 7147 | 8718 | |
| 8719 | + | |
| 7148 | 8720 | (function ($) { |
| 7149 | 8721 | /** |
| 7150 | 8722 | * Callback event for button to creating pages inside error message. |
| 7151 | 8723 | * |
| @@ -7259,9 +8831,10 @@ | ||
| 7259 | 8831 | }; |
| 7260 | 8832 | const onReady = function onReady() { |
| 7261 | 8833 | lpMetaboxFileInput(); |
| 7262 | 8834 | //updateDb(); |
| 7263 | - $('.learn-press-dropdown-pages').LP('DropdownPages'); | |
| 8835 | + const dropdownPages = new _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__.DropdownPages(); | |
| 8836 | + dropdownPages.init(); | |
| 7264 | 8837 | //$( '.learn-press-advertisement-slider' ).LP( 'Advertisement', 'a', 's' ).appendTo( $( '#wpbody-content' ) ); |
| 7265 | 8838 | //$( '.learn-press-toggle-item-preview' ).on( 'change', updateItemPreview ); |
| 7266 | 8839 | $('.learn-press-tip').LP('QuickTip'); //$('.learn-press-tabs').LP('AdminTab'); |
| 7267 | 8840 | |