PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | assets/js/dist/admin/admin.js +1683 -226 4.4.4 → 4.4.9 View file →
@@ -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 */ });
@@ -394,12 +707,9 @@
394 707 let lp_rest_url;
395 708 if ('undefined' !== typeof lpDataAdmin) {
396 709 lp_rest_url = lpDataAdmin.lp_rest_url;
397 710 lplistAPI.admin = {
398 - apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices',
399 - apiAddons: lp_rest_url + 'lp/v1/addon/all',
400 - apiAddonAction: lp_rest_url + 'lp/v1/addon/action-n',
401 - apiAddonsPurchase: lp_rest_url + 'lp/v1/addon/info-addons-purchase',
711 + // apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices',
402 712 apiSearchCourses: lp_rest_url + 'lp/v1/admin/tools/search-course',
403 713 apiSearchUsers: lp_rest_url + 'lp/v1/admin/tools/search-user',
404 714 apiAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/assign-user-course',
405 715 apiUnAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/unassign-user-course'
@@ -424,8 +734,62 @@
424 734 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lplistAPI);
425 735
426 736 /***/ },
427 737
738 +/***/ "./assets/src/js/lpToastify.js"
739 +/*!*************************************!*\
740 + !*** ./assets/src/js/lpToastify.js ***!
741 + \*************************************/
742 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
743 +
744 +"use strict";
745 +__webpack_require__.r(__webpack_exports__);
746 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
747 +/* harmony export */ show: () => (/* binding */ show)
748 +/* harmony export */ });
749 +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! toastify-js */ "./node_modules/toastify-js/src/toastify.js");
750 +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(toastify_js__WEBPACK_IMPORTED_MODULE_0__);
751 +/* 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");
752 +/**
753 + * Utils functions
754 + *
755 + * @param url
756 + * @param data
757 + * @param functions
758 + * @since 4.3.0
759 + * @version 1.0.0
760 + */
761 +
762 +
763 +const argsToastify = {
764 + text: '',
765 + gravity: lpData.toast.gravity,
766 + // `top` or `bottom`
767 + position: lpData.toast.position,
768 + // `left`, `center` or `right`
769 + className: `${lpData.toast.classPrefix}`,
770 + close: lpData.toast.close == 1,
771 + stopOnFocus: lpData.toast.stopOnFocus == 1,
772 + duration: lpData.toast.duration
773 +};
774 +const show = (message, status = 'success', argsCustom) => {
775 + let args = argsToastify;
776 + if (argsCustom) {
777 + args = {
778 + ...args,
779 + ...argsCustom
780 + };
781 + }
782 + const toastify = new (toastify_js__WEBPACK_IMPORTED_MODULE_0___default())({
783 + ...args,
784 + text: message,
785 + className: `${lpData.toast.classPrefix} ${status}`
786 + });
787 + toastify.showToast();
788 +};
789 +
790 +/***/ },
791 +
428 792 /***/ "./assets/src/js/utils.js"
429 793 /*!********************************!*\
430 794 !*** ./assets/src/js/utils.js ***!
431 795 \********************************/
@@ -430,12 +794,14 @@
430 794 !*** ./assets/src/js/utils.js ***!
431 795 \********************************/
432 796 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
433 797
798 +"use strict";
434 799 __webpack_require__.r(__webpack_exports__);
435 800 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
436 801 /* harmony export */ debounce: () => (/* binding */ debounce),
437 802 /* harmony export */ eventHandlers: () => (/* binding */ eventHandlers),
803 +/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView),
438 804 /* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm),
439 805 /* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm),
440 806 /* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated),
441 807 /* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed),
@@ -447,9 +813,10 @@
447 813 /* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady),
448 814 /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl),
449 815 /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl),
450 816 /* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm),
451 -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse)
817 +/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse),
818 +/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable)
452 819 /* harmony export */ });
453 820 /**
454 821 * Utils functions
455 822 *
@@ -456,9 +823,9 @@
456 823 * @param url
457 824 * @param data
458 825 * @param functions
459 826 * @since 4.2.5.1
460 - * @version 1.0.6
827 + * @version 1.0.7
461 828 */
462 829 const lpClassName = {
463 830 hidden: 'lp-hidden',
464 831 loading: 'loading',
@@ -463,9 +830,12 @@
463 830 hidden: 'lp-hidden',
464 831 loading: 'loading',
465 832 elCollapse: 'lp-collapse',
466 833 elSectionToggle: '.lp-section-toggle',
467 - elTriggerToggle: '.lp-trigger-toggle'
834 + elTriggerToggle: '.lp-trigger-toggle',
835 + elBtnFullScreen: '.lp-btn-full-screen-view',
836 + elFullScreen: 'lp-full-screen-view',
837 + elBtnFullScreenClose: 'lp-full-screen-view__close'
468 838 };
469 839 const lpFetchAPI = (url, data = {}, functions = {}) => {
470 840 if ('function' === typeof functions.before) {
471 841 functions.before();
@@ -783,10 +1153,1159 @@
783 1153 timer = setTimeout(() => func(args), wait);
784 1154 };
785 1155 };
786 1156
1157 +/**
1158 + * Initialize lp-toggle-enable components.
1159 + *
1160 + * Finds all `.lp-toggle-enable` elements and wires up toggle behavior.
1161 + * Reads initial state from `data-enabled` attribute ("true"/"false").
1162 + * Calls `data-on-toggle` callback (if provided via options) on state change.
1163 + *
1164 + * HTML structure:
1165 + * <label class="lp-toggle-enable" data-enabled="true">
1166 + * <input type="checkbox" class="lp-toggle-enable__input" />
1167 + * <span class="lp-toggle-enable__track"></span>
1168 + * </label>
1169 + *
1170 + * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable')
1171 + * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change
1172 + * @since 4.4.5
1173 + * @version 1.0.0
1174 + */
1175 +window.lpToggleEnableInit = 0;
1176 +const toggleEnable = (onToggle = null) => {
1177 + if (window.lpToggleEnableInit) {
1178 + return;
1179 + }
1180 + window.lpToggleEnableInit = 1;
1181 + const selector = '.lp-toggle-enable';
1182 + const updateUI = (toggle, isEnabled) => {
1183 + toggle.classList.toggle('is-enabled', isEnabled);
1184 + const input = toggle.querySelector('.lp-toggle-enable__input');
1185 + if (input) {
1186 + input.checked = isEnabled;
1187 + input.value = isEnabled ? '1' : '0';
1188 + }
1189 + };
1190 +
1191 + // Delegate click handling via eventHandlers.
1192 + eventHandlers('click', [{
1193 + selector,
1194 + callBack: args => {
1195 + const {
1196 + e,
1197 + target
1198 + } = args;
1199 + const toggle = target.closest(selector);
1200 + if (!toggle || toggle.classList.contains('is-disabled')) {
1201 + return;
1202 + }
1203 + e.preventDefault();
1204 + const isEnabled = !toggle.classList.contains('is-enabled');
1205 + updateUI(toggle, isEnabled);
1206 + if ('function' === typeof onToggle) {
1207 + onToggle(toggle, isEnabled);
1208 + }
1209 + }
1210 + }]);
1211 +};
1212 +
1213 +/**
1214 + * Initialize custom fullscreen view buttons.
1215 + *
1216 + * Delegates clicks on `.lp-btn-full-screen-view` buttons to
1217 + * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the
1218 + * target element. Falls back to the button's parent element when
1219 + * `data-target` is not provided.
1220 + *
1221 + * @since 4.4.5
1222 + * @version 1.0.0
1223 + */
1224 +window.lpFullScreenViewInit = 0;
1225 +const fullScreenView = () => {
1226 + if (window.lpFullScreenViewInit) {
1227 + return;
1228 + }
1229 + window.lpFullScreenViewInit = 1;
1230 + let lastScrollY = 0;
1231 + const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => {
1232 + const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen);
1233 + if (isFullscreen) {
1234 + elTarget.classList.remove(lpClassName.elFullScreen);
1235 + document.documentElement.classList.remove('lp-full-screen-active');
1236 + window.scrollTo(0, lastScrollY);
1237 + } else {
1238 + lastScrollY = window.scrollY;
1239 + elTarget.classList.add(lpClassName.elFullScreen);
1240 + document.documentElement.classList.add('lp-full-screen-active');
1241 + }
1242 + if (!isFullscreen) {
1243 + if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) {
1244 + const closeButton = document.createElement('button');
1245 + closeButton.type = 'button';
1246 + closeButton.className = lpClassName.elBtnFullScreenClose;
1247 + closeButton.setAttribute('aria-label', 'Close');
1248 + closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close &times;';
1249 + closeButton.addEventListener('click', e => {
1250 + e.preventDefault();
1251 + lpToggleFullscreenView(elTarget);
1252 + });
1253 + elTarget.appendChild(closeButton);
1254 + }
1255 + } else {
1256 + const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`);
1257 + if (closeButton) {
1258 + closeButton.remove();
1259 + }
1260 + }
1261 + };
1262 + eventHandlers('click', [{
1263 + selector: lpClassName.elBtnFullScreen,
1264 + callBack: args => {
1265 + const {
1266 + e,
1267 + target
1268 + } = args;
1269 + const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen);
1270 + if (!elBtnFullScreen) {
1271 + console.log('No full screen button found');
1272 + return;
1273 + }
1274 + e.preventDefault();
1275 + let elTarget = null;
1276 + const targetSelector = elBtnFullScreen.dataset.targetFullscreen;
1277 + console.log(targetSelector);
1278 + if (targetSelector) {
1279 + elTarget = document.querySelector(targetSelector);
1280 + }
1281 + if (!elTarget) {
1282 + console.log('No target element found');
1283 + return;
1284 + }
1285 + lpToggleFullscreenView(elTarget, elBtnFullScreen);
1286 + }
1287 + }]);
1288 +};
1289 +
787 1290 /***/ },
788 1291
1292 +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css"
1293 +/*!*****************************************************************************************!*\
1294 + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css ***!
1295 + \*****************************************************************************************/
1296 +(module, __webpack_exports__, __webpack_require__) {
1297 +
1298 +"use strict";
1299 +__webpack_require__.r(__webpack_exports__);
1300 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1301 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1302 +/* harmony export */ });
1303 +/* 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");
1304 +/* 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__);
1305 +/* 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");
1306 +/* 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__);
1307 +// Imports
1308 +
1309 +
1310 +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()));
1311 +// Module
1312 +___CSS_LOADER_EXPORT___.push([module.id, `/*!
1313 + * Toastify js 1.12.0
1314 + * https://github.com/apvarun/toastify-js
1315 + * @license MIT licensed
1316 + *
1317 + * Copyright (C) 2018 Varun A P
1318 + */
1319 +
1320 +.toastify {
1321 + padding: 12px 20px;
1322 + color: #ffffff;
1323 + display: inline-block;
1324 + box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);
1325 + background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);
1326 + background: linear-gradient(135deg, #73a5ff, #5477f5);
1327 + position: fixed;
1328 + opacity: 0;
1329 + transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
1330 + border-radius: 2px;
1331 + cursor: pointer;
1332 + text-decoration: none;
1333 + max-width: calc(50% - 20px);
1334 + z-index: 2147483647;
1335 +}
1336 +
1337 +.toastify.on {
1338 + opacity: 1;
1339 +}
1340 +
1341 +.toast-close {
1342 + background: transparent;
1343 + border: 0;
1344 + color: white;
1345 + cursor: pointer;
1346 + font-family: inherit;
1347 + font-size: 1em;
1348 + opacity: 0.4;
1349 + padding: 0 5px;
1350 +}
1351 +
1352 +.toastify-right {
1353 + right: 15px;
1354 +}
1355 +
1356 +.toastify-left {
1357 + left: 15px;
1358 +}
1359 +
1360 +.toastify-top {
1361 + top: -150px;
1362 +}
1363 +
1364 +.toastify-bottom {
1365 + bottom: -150px;
1366 +}
1367 +
1368 +.toastify-rounded {
1369 + border-radius: 25px;
1370 +}
1371 +
1372 +.toastify-avatar {
1373 + width: 1.5em;
1374 + height: 1.5em;
1375 + margin: -7px 5px;
1376 + border-radius: 2px;
1377 +}
1378 +
1379 +.toastify-center {
1380 + margin-left: auto;
1381 + margin-right: auto;
1382 + left: 0;
1383 + right: 0;
1384 + max-width: fit-content;
1385 + max-width: -moz-fit-content;
1386 +}
1387 +
1388 +@media only screen and (max-width: 360px) {
1389 + .toastify-right, .toastify-left {
1390 + margin-left: auto;
1391 + margin-right: auto;
1392 + left: 0;
1393 + right: 0;
1394 + max-width: fit-content;
1395 + }
1396 +}
1397 +`, "",{"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":""}]);
1398 +// Exports
1399 +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
1400 +
1401 +
1402 +/***/ },
1403 +
1404 +/***/ "./node_modules/css-loader/dist/runtime/api.js"
1405 +/*!*****************************************************!*\
1406 + !*** ./node_modules/css-loader/dist/runtime/api.js ***!
1407 + \*****************************************************/
1408 +(module) {
1409 +
1410 +"use strict";
1411 +
1412 +
1413 +/*
1414 + MIT License http://www.opensource.org/licenses/mit-license.php
1415 + Author Tobias Koppers @sokra
1416 +*/
1417 +module.exports = function (cssWithMappingToString) {
1418 + var list = [];
1419 +
1420 + // return the list of modules as css string
1421 + list.toString = function toString() {
1422 + return this.map(function (item) {
1423 + var content = "";
1424 + var needLayer = typeof item[5] !== "undefined";
1425 + if (item[4]) {
1426 + content += "@supports (".concat(item[4], ") {");
1427 + }
1428 + if (item[2]) {
1429 + content += "@media ".concat(item[2], " {");
1430 + }
1431 + if (needLayer) {
1432 + content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
1433 + }
1434 + content += cssWithMappingToString(item);
1435 + if (needLayer) {
1436 + content += "}";
1437 + }
1438 + if (item[2]) {
1439 + content += "}";
1440 + }
1441 + if (item[4]) {
1442 + content += "}";
1443 + }
1444 + return content;
1445 + }).join("");
1446 + };
1447 +
1448 + // import a list of modules into the list
1449 + list.i = function i(modules, media, dedupe, supports, layer) {
1450 + if (typeof modules === "string") {
1451 + modules = [[null, modules, undefined]];
1452 + }
1453 + var alreadyImportedModules = {};
1454 + if (dedupe) {
1455 + for (var k = 0; k < this.length; k++) {
1456 + var id = this[k][0];
1457 + if (id != null) {
1458 + alreadyImportedModules[id] = true;
1459 + }
1460 + }
1461 + }
1462 + for (var _k = 0; _k < modules.length; _k++) {
1463 + var item = [].concat(modules[_k]);
1464 + if (dedupe && alreadyImportedModules[item[0]]) {
1465 + continue;
1466 + }
1467 + if (typeof layer !== "undefined") {
1468 + if (typeof item[5] === "undefined") {
1469 + item[5] = layer;
1470 + } else {
1471 + item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
1472 + item[5] = layer;
1473 + }
1474 + }
1475 + if (media) {
1476 + if (!item[2]) {
1477 + item[2] = media;
1478 + } else {
1479 + item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
1480 + item[2] = media;
1481 + }
1482 + }
1483 + if (supports) {
1484 + if (!item[4]) {
1485 + item[4] = "".concat(supports);
1486 + } else {
1487 + item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
1488 + item[4] = supports;
1489 + }
1490 + }
1491 + list.push(item);
1492 + }
1493 + };
1494 + return list;
1495 +};
1496 +
1497 +/***/ },
1498 +
1499 +/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js"
1500 +/*!************************************************************!*\
1501 + !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
1502 + \************************************************************/
1503 +(module) {
1504 +
1505 +"use strict";
1506 +
1507 +
1508 +module.exports = function (item) {
1509 + var content = item[1];
1510 + var cssMapping = item[3];
1511 + if (!cssMapping) {
1512 + return content;
1513 + }
1514 + if (typeof btoa === "function") {
1515 + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
1516 + var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
1517 + var sourceMapping = "/*# ".concat(data, " */");
1518 + return [content].concat([sourceMapping]).join("\n");
1519 + }
1520 + return [content].join("\n");
1521 +};
1522 +
1523 +/***/ },
1524 +
1525 +/***/ "./node_modules/toastify-js/src/toastify.css"
1526 +/*!***************************************************!*\
1527 + !*** ./node_modules/toastify-js/src/toastify.css ***!
1528 + \***************************************************/
1529 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1530 +
1531 +"use strict";
1532 +__webpack_require__.r(__webpack_exports__);
1533 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1534 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1535 +/* harmony export */ });
1536 +/* 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");
1537 +/* 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__);
1538 +/* 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");
1539 +/* 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__);
1540 +/* 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");
1541 +/* 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__);
1542 +/* 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");
1543 +/* 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__);
1544 +/* 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");
1545 +/* 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__);
1546 +/* 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");
1547 +/* 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__);
1548 +/* 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");
1549 +
1550 +
1551 +
1552 +
1553 +
1554 +
1555 +
1556 +
1557 +
1558 +
1559 +
1560 +var options = {};
1561 +
1562 +options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
1563 +options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
1564 +
1565 + options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
1566 +
1567 +options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
1568 +options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
1569 +
1570 +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);
1571 +
1572 +
1573 +
1574 +
1575 + /* 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);
1576 +
1577 +
1578 +/***/ },
1579 +
1580 +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"
1581 +/*!****************************************************************************!*\
1582 + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
1583 + \****************************************************************************/
1584 +(module) {
1585 +
1586 +"use strict";
1587 +
1588 +
1589 +var stylesInDOM = [];
1590 +function getIndexByIdentifier(identifier) {
1591 + var result = -1;
1592 + for (var i = 0; i < stylesInDOM.length; i++) {
1593 + if (stylesInDOM[i].identifier === identifier) {
1594 + result = i;
1595 + break;
1596 + }
1597 + }
1598 + return result;
1599 +}
1600 +function modulesToDom(list, options) {
1601 + var idCountMap = {};
1602 + var identifiers = [];
1603 + for (var i = 0; i < list.length; i++) {
1604 + var item = list[i];
1605 + var id = options.base ? item[0] + options.base : item[0];
1606 + var count = idCountMap[id] || 0;
1607 + var identifier = "".concat(id, " ").concat(count);
1608 + idCountMap[id] = count + 1;
1609 + var indexByIdentifier = getIndexByIdentifier(identifier);
1610 + var obj = {
1611 + css: item[1],
1612 + media: item[2],
1613 + sourceMap: item[3],
1614 + supports: item[4],
1615 + layer: item[5]
1616 + };
1617 + if (indexByIdentifier !== -1) {
1618 + stylesInDOM[indexByIdentifier].references++;
1619 + stylesInDOM[indexByIdentifier].updater(obj);
1620 + } else {
1621 + var updater = addElementStyle(obj, options);
1622 + options.byIndex = i;
1623 + stylesInDOM.splice(i, 0, {
1624 + identifier: identifier,
1625 + updater: updater,
1626 + references: 1
1627 + });
1628 + }
1629 + identifiers.push(identifier);
1630 + }
1631 + return identifiers;
1632 +}
1633 +function addElementStyle(obj, options) {
1634 + var api = options.domAPI(options);
1635 + api.update(obj);
1636 + var updater = function updater(newObj) {
1637 + if (newObj) {
1638 + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
1639 + return;
1640 + }
1641 + api.update(obj = newObj);
1642 + } else {
1643 + api.remove();
1644 + }
1645 + };
1646 + return updater;
1647 +}
1648 +module.exports = function (list, options) {
1649 + options = options || {};
1650 + list = list || [];
1651 + var lastIdentifiers = modulesToDom(list, options);
1652 + return function update(newList) {
1653 + newList = newList || [];
1654 + for (var i = 0; i < lastIdentifiers.length; i++) {
1655 + var identifier = lastIdentifiers[i];
1656 + var index = getIndexByIdentifier(identifier);
1657 + stylesInDOM[index].references--;
1658 + }
1659 + var newLastIdentifiers = modulesToDom(newList, options);
1660 + for (var _i = 0; _i < lastIdentifiers.length; _i++) {
1661 + var _identifier = lastIdentifiers[_i];
1662 + var _index = getIndexByIdentifier(_identifier);
1663 + if (stylesInDOM[_index].references === 0) {
1664 + stylesInDOM[_index].updater();
1665 + stylesInDOM.splice(_index, 1);
1666 + }
1667 + }
1668 + lastIdentifiers = newLastIdentifiers;
1669 + };
1670 +};
1671 +
1672 +/***/ },
1673 +
1674 +/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js"
1675 +/*!********************************************************************!*\
1676 + !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
1677 + \********************************************************************/
1678 +(module) {
1679 +
1680 +"use strict";
1681 +
1682 +
1683 +var memo = {};
1684 +
1685 +/* istanbul ignore next */
1686 +function getTarget(target) {
1687 + if (typeof memo[target] === "undefined") {
1688 + var styleTarget = document.querySelector(target);
1689 +
1690 + // Special case to return head of iframe instead of iframe itself
1691 + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
1692 + try {
1693 + // This will throw an exception if access to iframe is blocked
1694 + // due to cross-origin restrictions
1695 + styleTarget = styleTarget.contentDocument.head;
1696 + } catch (e) {
1697 + // istanbul ignore next
1698 + styleTarget = null;
1699 + }
1700 + }
1701 + memo[target] = styleTarget;
1702 + }
1703 + return memo[target];
1704 +}
1705 +
1706 +/* istanbul ignore next */
1707 +function insertBySelector(insert, style) {
1708 + var target = getTarget(insert);
1709 + if (!target) {
1710 + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
1711 + }
1712 + target.appendChild(style);
1713 +}
1714 +module.exports = insertBySelector;
1715 +
1716 +/***/ },
1717 +
1718 +/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"
1719 +/*!**********************************************************************!*\
1720 + !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
1721 + \**********************************************************************/
1722 +(module) {
1723 +
1724 +"use strict";
1725 +
1726 +
1727 +/* istanbul ignore next */
1728 +function insertStyleElement(options) {
1729 + var element = document.createElement("style");
1730 + options.setAttributes(element, options.attributes);
1731 + options.insert(element, options.options);
1732 + return element;
1733 +}
1734 +module.exports = insertStyleElement;
1735 +
1736 +/***/ },
1737 +
1738 +/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"
1739 +/*!**********************************************************************************!*\
1740 + !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
1741 + \**********************************************************************************/
1742 +(module, __unused_webpack_exports, __webpack_require__) {
1743 +
1744 +"use strict";
1745 +
1746 +
1747 +/* istanbul ignore next */
1748 +function setAttributesWithoutAttributes(styleElement) {
1749 + var nonce = true ? __webpack_require__.nc : 0;
1750 + if (nonce) {
1751 + styleElement.setAttribute("nonce", nonce);
1752 + }
1753 +}
1754 +module.exports = setAttributesWithoutAttributes;
1755 +
1756 +/***/ },
1757 +
1758 +/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"
1759 +/*!***************************************************************!*\
1760 + !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
1761 + \***************************************************************/
1762 +(module) {
1763 +
1764 +"use strict";
1765 +
1766 +
1767 +/* istanbul ignore next */
1768 +function apply(styleElement, options, obj) {
1769 + var css = "";
1770 + if (obj.supports) {
1771 + css += "@supports (".concat(obj.supports, ") {");
1772 + }
1773 + if (obj.media) {
1774 + css += "@media ".concat(obj.media, " {");
1775 + }
1776 + var needLayer = typeof obj.layer !== "undefined";
1777 + if (needLayer) {
1778 + css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
1779 + }
1780 + css += obj.css;
1781 + if (needLayer) {
1782 + css += "}";
1783 + }
1784 + if (obj.media) {
1785 + css += "}";
1786 + }
1787 + if (obj.supports) {
1788 + css += "}";
1789 + }
1790 + var sourceMap = obj.sourceMap;
1791 + if (sourceMap && typeof btoa !== "undefined") {
1792 + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
1793 + }
1794 +
1795 + // For old IE
1796 + /* istanbul ignore if */
1797 + options.styleTagTransform(css, styleElement, options.options);
1798 +}
1799 +function removeStyleElement(styleElement) {
1800 + // istanbul ignore if
1801 + if (styleElement.parentNode === null) {
1802 + return false;
1803 + }
1804 + styleElement.parentNode.removeChild(styleElement);
1805 +}
1806 +
1807 +/* istanbul ignore next */
1808 +function domAPI(options) {
1809 + if (typeof document === "undefined") {
1810 + return {
1811 + update: function update() {},
1812 + remove: function remove() {}
1813 + };
1814 + }
1815 + var styleElement = options.insertStyleElement(options);
1816 + return {
1817 + update: function update(obj) {
1818 + apply(styleElement, options, obj);
1819 + },
1820 + remove: function remove() {
1821 + removeStyleElement(styleElement);
1822 + }
1823 + };
1824 +}
1825 +module.exports = domAPI;
1826 +
1827 +/***/ },
1828 +
1829 +/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"
1830 +/*!*********************************************************************!*\
1831 + !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
1832 + \*********************************************************************/
1833 +(module) {
1834 +
1835 +"use strict";
1836 +
1837 +
1838 +/* istanbul ignore next */
1839 +function styleTagTransform(css, styleElement) {
1840 + if (styleElement.styleSheet) {
1841 + styleElement.styleSheet.cssText = css;
1842 + } else {
1843 + while (styleElement.firstChild) {
1844 + styleElement.removeChild(styleElement.firstChild);
1845 + }
1846 + styleElement.appendChild(document.createTextNode(css));
1847 + }
1848 +}
1849 +module.exports = styleTagTransform;
1850 +
1851 +/***/ },
1852 +
1853 +/***/ "./node_modules/toastify-js/src/toastify.js"
1854 +/*!**************************************************!*\
1855 + !*** ./node_modules/toastify-js/src/toastify.js ***!
1856 + \**************************************************/
1857 +(module) {
1858 +
1859 +/*!
1860 + * Toastify js 1.12.0
1861 + * https://github.com/apvarun/toastify-js
1862 + * @license MIT licensed
1863 + *
1864 + * Copyright (C) 2018 Varun A P
1865 + */
1866 +(function(root, factory) {
1867 + if ( true && module.exports) {
1868 + module.exports = factory();
1869 + } else {
1870 + root.Toastify = factory();
1871 + }
1872 +})(this, function(global) {
1873 + // Object initialization
1874 + var Toastify = function(options) {
1875 + // Returning a new init object
1876 + return new Toastify.lib.init(options);
1877 + },
1878 + // Library version
1879 + version = "1.12.0";
1880 +
1881 + // Set the default global options
1882 + Toastify.defaults = {
1883 + oldestFirst: true,
1884 + text: "Toastify is awesome!",
1885 + node: undefined,
1886 + duration: 3000,
1887 + selector: undefined,
1888 + callback: function () {
1889 + },
1890 + destination: undefined,
1891 + newWindow: false,
1892 + close: false,
1893 + gravity: "toastify-top",
1894 + positionLeft: false,
1895 + position: '',
1896 + backgroundColor: '',
1897 + avatar: "",
1898 + className: "",
1899 + stopOnFocus: true,
1900 + onClick: function () {
1901 + },
1902 + offset: {x: 0, y: 0},
1903 + escapeMarkup: true,
1904 + ariaLive: 'polite',
1905 + style: {background: ''}
1906 + };
1907 +
1908 + // Defining the prototype of the object
1909 + Toastify.lib = Toastify.prototype = {
1910 + toastify: version,
1911 +
1912 + constructor: Toastify,
1913 +
1914 + // Initializing the object with required parameters
1915 + init: function(options) {
1916 + // Verifying and validating the input object
1917 + if (!options) {
1918 + options = {};
1919 + }
1920 +
1921 + // Creating the options object
1922 + this.options = {};
1923 +
1924 + this.toastElement = null;
1925 +
1926 + // Validating the options
1927 + this.options.text = options.text || Toastify.defaults.text; // Display message
1928 + this.options.node = options.node || Toastify.defaults.node; // Display content as node
1929 + this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration
1930 + this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector
1931 + this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display
1932 + this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination
1933 + this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window
1934 + this.options.close = options.close || Toastify.defaults.close; // Show toast close icon
1935 + this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom
1936 + this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right
1937 + this.options.position = options.position || Toastify.defaults.position; // toast position - left or right
1938 + this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color
1939 + this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path
1940 + this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast
1941 + this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus
1942 + this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click
1943 + this.options.offset = options.offset || Toastify.defaults.offset; // toast offset
1944 + this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;
1945 + this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;
1946 + this.options.style = options.style || Toastify.defaults.style;
1947 + if(options.backgroundColor) {
1948 + this.options.style.background = options.backgroundColor;
1949 + }
1950 +
1951 + // Returning the current object for chaining functions
1952 + return this;
1953 + },
1954 +
1955 + // Building the DOM element
1956 + buildToast: function() {
1957 + // Validating if the options are defined
1958 + if (!this.options) {
1959 + throw "Toastify is not initialized";
1960 + }
1961 +
1962 + // Creating the DOM object
1963 + var divElement = document.createElement("div");
1964 + divElement.className = "toastify on " + this.options.className;
1965 +
1966 + // Positioning toast to left or right or center
1967 + if (!!this.options.position) {
1968 + divElement.className += " toastify-" + this.options.position;
1969 + } else {
1970 + // To be depreciated in further versions
1971 + if (this.options.positionLeft === true) {
1972 + divElement.className += " toastify-left";
1973 + console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')
1974 + } else {
1975 + // Default position
1976 + divElement.className += " toastify-right";
1977 + }
1978 + }
1979 +
1980 + // Assigning gravity of element
1981 + divElement.className += " " + this.options.gravity;
1982 +
1983 + if (this.options.backgroundColor) {
1984 + // This is being deprecated in favor of using the style HTML DOM property
1985 + console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
1986 + }
1987 +
1988 + // Loop through our style object and apply styles to divElement
1989 + for (var property in this.options.style) {
1990 + divElement.style[property] = this.options.style[property];
1991 + }
1992 +
1993 + // Announce the toast to screen readers
1994 + if (this.options.ariaLive) {
1995 + divElement.setAttribute('aria-live', this.options.ariaLive)
1996 + }
1997 +
1998 + // Adding the toast message/node
1999 + if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {
2000 + // If we have a valid node, we insert it
2001 + divElement.appendChild(this.options.node)
2002 + } else {
2003 + if (this.options.escapeMarkup) {
2004 + divElement.innerText = this.options.text;
2005 + } else {
2006 + divElement.innerHTML = this.options.text;
2007 + }
2008 +
2009 + if (this.options.avatar !== "") {
2010 + var avatarElement = document.createElement("img");
2011 + avatarElement.src = this.options.avatar;
2012 +
2013 + avatarElement.className = "toastify-avatar";
2014 +
2015 + if (this.options.position == "left" || this.options.positionLeft === true) {
2016 + // Adding close icon on the left of content
2017 + divElement.appendChild(avatarElement);
2018 + } else {
2019 + // Adding close icon on the right of content
2020 + divElement.insertAdjacentElement("afterbegin", avatarElement);
2021 + }
2022 + }
2023 + }
2024 +
2025 + // Adding a close icon to the toast
2026 + if (this.options.close === true) {
2027 + // Create a span for close element
2028 + var closeElement = document.createElement("button");
2029 + closeElement.type = "button";
2030 + closeElement.setAttribute("aria-label", "Close");
2031 + closeElement.className = "toast-close";
2032 + closeElement.innerHTML = "&#10006;";
2033 +
2034 + // Triggering the removal of toast from DOM on close click
2035 + closeElement.addEventListener(
2036 + "click",
2037 + function(event) {
2038 + event.stopPropagation();
2039 + this.removeElement(this.toastElement);
2040 + window.clearTimeout(this.toastElement.timeOutValue);
2041 + }.bind(this)
2042 + );
2043 +
2044 + //Calculating screen width
2045 + var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
2046 +
2047 + // Adding the close icon to the toast element
2048 + // Display on the right if screen width is less than or equal to 360px
2049 + if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) {
2050 + // Adding close icon on the left of content
2051 + divElement.insertAdjacentElement("afterbegin", closeElement);
2052 + } else {
2053 + // Adding close icon on the right of content
2054 + divElement.appendChild(closeElement);
2055 + }
2056 + }
2057 +
2058 + // Clear timeout while toast is focused
2059 + if (this.options.stopOnFocus && this.options.duration > 0) {
2060 + var self = this;
2061 + // stop countdown
2062 + divElement.addEventListener(
2063 + "mouseover",
2064 + function(event) {
2065 + window.clearTimeout(divElement.timeOutValue);
2066 + }
2067 + )
2068 + // add back the timeout
2069 + divElement.addEventListener(
2070 + "mouseleave",
2071 + function() {
2072 + divElement.timeOutValue = window.setTimeout(
2073 + function() {
2074 + // Remove the toast from DOM
2075 + self.removeElement(divElement);
2076 + },
2077 + self.options.duration
2078 + )
2079 + }
2080 + )
2081 + }
2082 +
2083 + // Adding an on-click destination path
2084 + if (typeof this.options.destination !== "undefined") {
2085 + divElement.addEventListener(
2086 + "click",
2087 + function(event) {
2088 + event.stopPropagation();
2089 + if (this.options.newWindow === true) {
2090 + window.open(this.options.destination, "_blank");
2091 + } else {
2092 + window.location = this.options.destination;
2093 + }
2094 + }.bind(this)
2095 + );
2096 + }
2097 +
2098 + if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") {
2099 + divElement.addEventListener(
2100 + "click",
2101 + function(event) {
2102 + event.stopPropagation();
2103 + this.options.onClick();
2104 + }.bind(this)
2105 + );
2106 + }
2107 +
2108 + // Adding offset
2109 + if(typeof this.options.offset === "object") {
2110 +
2111 + var x = getAxisOffsetAValue("x", this.options);
2112 + var y = getAxisOffsetAValue("y", this.options);
2113 +
2114 + var xOffset = this.options.position == "left" ? x : "-" + x;
2115 + var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y;
2116 +
2117 + divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";
2118 +
2119 + }
2120 +
2121 + // Returning the generated element
2122 + return divElement;
2123 + },
2124 +
2125 + // Displaying the toast
2126 + showToast: function() {
2127 + // Creating the DOM object for the toast
2128 + this.toastElement = this.buildToast();
2129 +
2130 + // Getting the root element to with the toast needs to be added
2131 + var rootElement;
2132 + if (typeof this.options.selector === "string") {
2133 + rootElement = document.getElementById(this.options.selector);
2134 + } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {
2135 + rootElement = this.options.selector;
2136 + } else {
2137 + rootElement = document.body;
2138 + }
2139 +
2140 + // Validating if root element is present in DOM
2141 + if (!rootElement) {
2142 + throw "Root element is not defined";
2143 + }
2144 +
2145 + // Adding the DOM element
2146 + var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;
2147 + rootElement.insertBefore(this.toastElement, elementToInsert);
2148 +
2149 + // Repositioning the toasts in case multiple toasts are present
2150 + Toastify.reposition();
2151 +
2152 + if (this.options.duration > 0) {
2153 + this.toastElement.timeOutValue = window.setTimeout(
2154 + function() {
2155 + // Remove the toast from DOM
2156 + this.removeElement(this.toastElement);
2157 + }.bind(this),
2158 + this.options.duration
2159 + ); // Binding `this` for function invocation
2160 + }
2161 +
2162 + // Supporting function chaining
2163 + return this;
2164 + },
2165 +
2166 + hideToast: function() {
2167 + if (this.toastElement.timeOutValue) {
2168 + clearTimeout(this.toastElement.timeOutValue);
2169 + }
2170 + this.removeElement(this.toastElement);
2171 + },
2172 +
2173 + // Removing the element from the DOM
2174 + removeElement: function(toastElement) {
2175 + // Hiding the element
2176 + // toastElement.classList.remove("on");
2177 + toastElement.className = toastElement.className.replace(" on", "");
2178 +
2179 + // Removing the element from DOM after transition end
2180 + window.setTimeout(
2181 + function() {
2182 + // remove options node if any
2183 + if (this.options.node && this.options.node.parentNode) {
2184 + this.options.node.parentNode.removeChild(this.options.node);
2185 + }
2186 +
2187 + // Remove the element from the DOM, only when the parent node was not removed before.
2188 + if (toastElement.parentNode) {
2189 + toastElement.parentNode.removeChild(toastElement);
2190 + }
2191 +
2192 + // Calling the callback function
2193 + this.options.callback.call(toastElement);
2194 +
2195 + // Repositioning the toasts again
2196 + Toastify.reposition();
2197 + }.bind(this),
2198 + 400
2199 + ); // Binding `this` for function invocation
2200 + },
2201 + };
2202 +
2203 + // Positioning the toasts on the DOM
2204 + Toastify.reposition = function() {
2205 +
2206 + // Top margins with gravity
2207 + var topLeftOffsetSize = {
2208 + top: 15,
2209 + bottom: 15,
2210 + };
2211 + var topRightOffsetSize = {
2212 + top: 15,
2213 + bottom: 15,
2214 + };
2215 + var offsetSize = {
2216 + top: 15,
2217 + bottom: 15,
2218 + };
2219 +
2220 + // Get all toast messages on the DOM
2221 + var allToasts = document.getElementsByClassName("toastify");
2222 +
2223 + var classUsed;
2224 +
2225 + // Modifying the position of each toast element
2226 + for (var i = 0; i < allToasts.length; i++) {
2227 + // Getting the applied gravity
2228 + if (containsClass(allToasts[i], "toastify-top") === true) {
2229 + classUsed = "toastify-top";
2230 + } else {
2231 + classUsed = "toastify-bottom";
2232 + }
2233 +
2234 + var height = allToasts[i].offsetHeight;
2235 + classUsed = classUsed.substr(9, classUsed.length-1)
2236 + // Spacing between toasts
2237 + var offset = 15;
2238 +
2239 + var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
2240 +
2241 + // Show toast in center if screen with less than or equal to 360px
2242 + if (width <= 360) {
2243 + // Setting the position
2244 + allToasts[i].style[classUsed] = offsetSize[classUsed] + "px";
2245 +
2246 + offsetSize[classUsed] += height + offset;
2247 + } else {
2248 + if (containsClass(allToasts[i], "toastify-left") === true) {
2249 + // Setting the position
2250 + allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px";
2251 +
2252 + topLeftOffsetSize[classUsed] += height + offset;
2253 + } else {
2254 + // Setting the position
2255 + allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px";
2256 +
2257 + topRightOffsetSize[classUsed] += height + offset;
2258 + }
2259 + }
2260 + }
2261 +
2262 + // Supporting function chaining
2263 + return this;
2264 + };
2265 +
2266 + // Helper function to get offset.
2267 + function getAxisOffsetAValue(axis, options) {
2268 +
2269 + if(options.offset[axis]) {
2270 + if(isNaN(options.offset[axis])) {
2271 + return options.offset[axis];
2272 + }
2273 + else {
2274 + return options.offset[axis] + 'px';
2275 + }
2276 + }
2277 +
2278 + return '0px';
2279 +
2280 + }
2281 +
2282 + function containsClass(elem, yourClass) {
2283 + if (!elem || typeof yourClass !== "string") {
2284 + return false;
2285 + } else if (
2286 + elem.className &&
2287 + elem.className
2288 + .trim()
2289 + .split(/\s+/gi)
2290 + .indexOf(yourClass) > -1
2291 + ) {
2292 + return true;
2293 + } else {
2294 + return false;
2295 + }
2296 + }
2297 +
2298 + // Setting up the prototype for the init object
2299 + Toastify.lib.init.prototype = Toastify.lib;
2300 +
2301 + // Returning the Toastify function to be assigned to the window object/module
2302 + return Toastify;
2303 +});
2304 +
2305 +
2306 +/***/ },
2307 +
789 2308 /***/ "./node_modules/@orchidjs/sifter/dist/esm/sifter.js"
790 2309 /*!**********************************************************!*\
791 2310 !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***!
792 2311 \**********************************************************/
@@ -791,8 +2310,9 @@
791 2310 !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***!
792 2311 \**********************************************************/
793 2312 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
794 2313
2314 +"use strict";
795 2315 __webpack_require__.r(__webpack_exports__);
796 2316 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
797 2317 /* harmony export */ Sifter: () => (/* binding */ Sifter),
798 2318 /* harmony export */ cmp: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.cmp),
@@ -1118,8 +2638,9 @@
1118 2638 !*** ./node_modules/@orchidjs/sifter/dist/esm/types.js ***!
1119 2639 \*********************************************************/
1120 2640 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1121 2641
2642 +"use strict";
1122 2643 __webpack_require__.r(__webpack_exports__);
1123 2644
1124 2645 //# sourceMappingURL=types.js.map
1125 2646
@@ -1130,8 +2651,9 @@
1130 2651 !*** ./node_modules/@orchidjs/sifter/dist/esm/utils.js ***!
1131 2652 \*********************************************************/
1132 2653 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1133 2654
2655 +"use strict";
1134 2656 __webpack_require__.r(__webpack_exports__);
1135 2657 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1136 2658 /* harmony export */ cmp: () => (/* binding */ cmp),
1137 2659 /* harmony export */ getAttr: () => (/* binding */ getAttr),
@@ -1242,8 +2764,9 @@
1242 2764 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/index.js ***!
1243 2765 \*******************************************************************/
1244 2766 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1245 2767
2768 +"use strict";
1246 2769 __webpack_require__.r(__webpack_exports__);
1247 2770 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1248 2771 /* harmony export */ _asciifold: () => (/* binding */ _asciifold),
1249 2772 /* harmony export */ asciifold: () => (/* binding */ asciifold),
@@ -1645,8 +3168,9 @@
1645 3168 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/regex.js ***!
1646 3169 \*******************************************************************/
1647 3170 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1648 3171
3172 +"use strict";
1649 3173 __webpack_require__.r(__webpack_exports__);
1650 3174 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1651 3175 /* harmony export */ arrayToPattern: () => (/* binding */ arrayToPattern),
1652 3176 /* harmony export */ escape_regex: () => (/* binding */ escape_regex),
@@ -1730,8 +3254,9 @@
1730 3254 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/strings.js ***!
1731 3255 \*********************************************************************/
1732 3256 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1733 3257
3258 +"use strict";
1734 3259 __webpack_require__.r(__webpack_exports__);
1735 3260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1736 3261 /* harmony export */ allSubstrings: () => (/* binding */ allSubstrings)
1737 3262 /* harmony export */ });
@@ -1764,8 +3289,9 @@
1764 3289 !*** ./node_modules/tom-select/dist/esm/constants.js ***!
1765 3290 \*******************************************************/
1766 3291 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1767 3292
3293 +"use strict";
1768 3294 __webpack_require__.r(__webpack_exports__);
1769 3295 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1770 3296 /* harmony export */ IS_MAC: () => (/* binding */ IS_MAC),
1771 3297 /* harmony export */ KEY_A: () => (/* binding */ KEY_A),
@@ -1801,8 +3327,9 @@
1801 3327 !*** ./node_modules/tom-select/dist/esm/contrib/highlight.js ***!
1802 3328 \***************************************************************/
1803 3329 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1804 3330
3331 +"use strict";
1805 3332 __webpack_require__.r(__webpack_exports__);
1806 3333 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1807 3334 /* harmony export */ highlight: () => (/* binding */ highlight),
1808 3335 /* harmony export */ removeHighlight: () => (/* binding */ removeHighlight)
@@ -1880,8 +3407,9 @@
1880 3407 !*** ./node_modules/tom-select/dist/esm/contrib/microevent.js ***!
1881 3408 \****************************************************************/
1882 3409 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1883 3410
3411 +"use strict";
1884 3412 __webpack_require__.r(__webpack_exports__);
1885 3413 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1886 3414 /* harmony export */ "default": () => (/* binding */ MicroEvent)
1887 3415 /* harmony export */ });
@@ -1954,8 +3482,9 @@
1954 3482 !*** ./node_modules/tom-select/dist/esm/contrib/microplugin.js ***!
1955 3483 \*****************************************************************/
1956 3484 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1957 3485
3486 +"use strict";
1958 3487 __webpack_require__.r(__webpack_exports__);
1959 3488 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1960 3489 /* harmony export */ "default": () => (/* binding */ MicroPlugin)
1961 3490 /* harmony export */ });
@@ -2076,8 +3605,9 @@
2076 3605 !*** ./node_modules/tom-select/dist/esm/defaults.js ***!
2077 3606 \******************************************************/
2078 3607 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2079 3608
3609 +"use strict";
2080 3610 __webpack_require__.r(__webpack_exports__);
2081 3611 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2082 3612 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2083 3613 /* harmony export */ });
@@ -2091,9 +3621,8 @@
2091 3621 diacritics: true,
2092 3622 create: null,
2093 3623 createOnBlur: false,
2094 3624 createFilter: null,
2095 - clearAfterSelect: false,
2096 3625 highlight: true,
2097 3626 openOnFocus: true,
2098 3627 shouldOpen: null,
2099 3628 maxOptions: 50,
@@ -2172,8 +3701,9 @@
2172 3701 !*** ./node_modules/tom-select/dist/esm/getSettings.js ***!
2173 3702 \*********************************************************/
2174 3703 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2175 3704
3705 +"use strict";
2176 3706 __webpack_require__.r(__webpack_exports__);
2177 3707 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2178 3708 /* harmony export */ "default": () => (/* binding */ getSettings)
2179 3709 /* harmony export */ });
@@ -2290,12 +3820,11 @@
2290 3820 * Initialize from a <input type="text"> element.
2291 3821 *
2292 3822 */
2293 3823 var init_textbox = () => {
2294 - var _a, _b;
2295 3824 const data_raw = input.getAttribute(attr_data);
2296 3825 if (!data_raw) {
2297 - var value = (_b = (_a = input === null || input === void 0 ? void 0 : input.value) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
3826 + var value = input.value.trim() || '';
2298 3827 if (!settings.allowEmptyOption && !value.length)
2299 3828 return;
2300 3829 const values = value.split(settings.delimiter);
2301 3830 (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.iterate)(values, (value) => {
@@ -2331,14 +3860,15 @@
2331 3860 !*** ./node_modules/tom-select/dist/esm/plugins/caret_position/plugin.js ***!
2332 3861 \***************************************************************************/
2333 3862 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2334 3863
3864 +"use strict";
2335 3865 __webpack_require__.r(__webpack_exports__);
2336 3866 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2337 3867 /* harmony export */ "default": () => (/* binding */ plugin)
2338 3868 /* harmony export */ });
2339 3869 /**
2340 -* Tom Select v2.6.2
3870 +* Tom Select v2.4.3
2341 3871 * Licensed under the Apache License, Version 2.0 (the "License");
2342 3872 */
2343 3873
2344 3874 /**
@@ -2508,14 +4038,15 @@
2508 4038 !*** ./node_modules/tom-select/dist/esm/plugins/change_listener/plugin.js ***!
2509 4039 \****************************************************************************/
2510 4040 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2511 4041
4042 +"use strict";
2512 4043 __webpack_require__.r(__webpack_exports__);
2513 4044 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2514 4045 /* harmony export */ "default": () => (/* binding */ plugin)
2515 4046 /* harmony export */ });
2516 4047 /**
2517 -* Tom Select v2.6.2
4048 +* Tom Select v2.4.3
2518 4049 * Licensed under the Apache License, Version 2.0 (the "License");
2519 4050 */
2520 4051
2521 4052 /**
@@ -2573,14 +4104,15 @@
2573 4104 !*** ./node_modules/tom-select/dist/esm/plugins/checkbox_options/plugin.js ***!
2574 4105 \*****************************************************************************/
2575 4106 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2576 4107
4108 +"use strict";
2577 4109 __webpack_require__.r(__webpack_exports__);
2578 4110 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2579 4111 /* harmony export */ "default": () => (/* binding */ plugin)
2580 4112 /* harmony export */ });
2581 4113 /**
2582 -* Tom Select v2.6.2
4114 +* Tom Select v2.4.3
2583 4115 * Licensed under the Apache License, Version 2.0 (the "License");
2584 4116 */
2585 4117
2586 4118 /**
@@ -2766,14 +4298,15 @@
2766 4298 !*** ./node_modules/tom-select/dist/esm/plugins/clear_button/plugin.js ***!
2767 4299 \*************************************************************************/
2768 4300 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2769 4301
4302 +"use strict";
2770 4303 __webpack_require__.r(__webpack_exports__);
2771 4304 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2772 4305 /* harmony export */ "default": () => (/* binding */ plugin)
2773 4306 /* harmony export */ });
2774 4307 /**
2775 -* Tom Select v2.6.2
4308 +* Tom Select v2.4.3
2776 4309 * Licensed under the Apache License, Version 2.0 (the "License");
2777 4310 */
2778 4311
2779 4312 /**
@@ -2822,12 +4355,10 @@
2822 4355 const self = this;
2823 4356 const options = Object.assign({
2824 4357 className: 'clear-button',
2825 4358 title: 'Clear All',
2826 - role: 'button',
2827 - tabindex: 0,
2828 4359 html: data => {
2829 - return `<div class="${data.className}" title="${data.title}" role="${data.role}" tabindex="${data.tabindex}">&times;</div>`;
4360 + return `<div class="${data.className}" title="${data.title}">&#10799;</div>`;
2830 4361 }
2831 4362 }, userOptions);
2832 4363 self.on('initialize', () => {
2833 4364 var button = getDom(options.html(options));
@@ -2836,9 +4367,8 @@
2836 4367 self.clear();
2837 4368 if (self.settings.mode === 'single' && self.settings.allowEmptyOption) {
2838 4369 self.addItem('');
2839 4370 }
2840 - self.refreshOptions(false);
2841 4371 evt.preventDefault();
2842 4372 evt.stopPropagation();
2843 4373 });
2844 4374 self.control.appendChild(button);
@@ -2856,14 +4386,15 @@
2856 4386 !*** ./node_modules/tom-select/dist/esm/plugins/drag_drop/plugin.js ***!
2857 4387 \**********************************************************************/
2858 4388 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2859 4389
4390 +"use strict";
2860 4391 __webpack_require__.r(__webpack_exports__);
2861 4392 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2862 4393 /* harmony export */ "default": () => (/* binding */ plugin)
2863 4394 /* harmony export */ });
2864 4395 /**
2865 -* Tom Select v2.6.2
4396 +* Tom Select v2.4.3
2866 4397 * Licensed under the Apache License, Version 2.0 (the "License");
2867 4398 */
2868 4399
2869 4400 /**
@@ -3090,14 +4621,15 @@
3090 4621 !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_header/plugin.js ***!
3091 4622 \****************************************************************************/
3092 4623 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3093 4624
4625 +"use strict";
3094 4626 __webpack_require__.r(__webpack_exports__);
3095 4627 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3096 4628 /* harmony export */ "default": () => (/* binding */ plugin)
3097 4629 /* harmony export */ });
3098 4630 /**
3099 -* Tom Select v2.6.2
4631 +* Tom Select v2.4.3
3100 4632 * Licensed under the Apache License, Version 2.0 (the "License");
3101 4633 */
3102 4634
3103 4635 /**
@@ -3206,14 +4738,15 @@
3206 4738 !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_input/plugin.js ***!
3207 4739 \***************************************************************************/
3208 4740 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3209 4741
4742 +"use strict";
3210 4743 __webpack_require__.r(__webpack_exports__);
3211 4744 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3212 4745 /* harmony export */ "default": () => (/* binding */ plugin)
3213 4746 /* harmony export */ });
3214 4747 /**
3215 -* Tom Select v2.6.2
4748 +* Tom Select v2.4.3
3216 4749 * Licensed under the Apache License, Version 2.0 (the "License");
3217 4750 */
3218 4751
3219 4752 const KEY_ESC = 27;
@@ -3366,9 +4899,8 @@
3366 4899 const self = this;
3367 4900 self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown
3368 4901
3369 4902 self.hook('before', 'setup', () => {
3370 - var _self$input;
3371 4903 self.focus_node = self.control;
3372 4904 addClasses(self.control_input, 'dropdown-input');
3373 4905 const div = getDom('<div class="dropdown-input-wrap">');
3374 4906 div.append(self.control_input);
@@ -3377,17 +4909,8 @@
3377 4909 // set a placeholder in the select control
3378 4910 const placeholder = getDom('<input class="items-placeholder" tabindex="-1" />');
3379 4911 placeholder.placeholder = self.settings.placeholder || '';
3380 4912 self.control.append(placeholder);
3381 - /**
3382 - * TomSelect renders a custom control with a focusable <input class="items-placeholder">.
3383 - * The source <select>'s aria-label is not automatically propagated to that input,
3384 - * which triggers "Missing form label" accessibility warnings.
3385 - * This helper copies the label from the <select> onto the generated input.
3386 - */
3387 - const label = (_self$input = self.input) == null ? void 0 : _self$input.getAttribute('aria-label');
3388 - if (!label) return;
3389 - placeholder.setAttribute('aria-label', label);
3390 4913 });
3391 4914 self.on('initialize', () => {
3392 4915 // set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input
3393 4916 self.control_input.addEventListener('keydown', evt => {
@@ -3444,14 +4967,15 @@
3444 4967 !*** ./node_modules/tom-select/dist/esm/plugins/input_autogrow/plugin.js ***!
3445 4968 \***************************************************************************/
3446 4969 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3447 4970
4971 +"use strict";
3448 4972 __webpack_require__.r(__webpack_exports__);
3449 4973 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3450 4974 /* harmony export */ "default": () => (/* binding */ plugin)
3451 4975 /* harmony export */ });
3452 4976 /**
3453 -* Tom Select v2.6.2
4977 +* Tom Select v2.4.3
3454 4978 * Licensed under the Apache License, Version 2.0 (the "License");
3455 4979 */
3456 4980
3457 4981 /**
@@ -3532,14 +5056,15 @@
3532 5056 !*** ./node_modules/tom-select/dist/esm/plugins/no_active_items/plugin.js ***!
3533 5057 \****************************************************************************/
3534 5058 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3535 5059
5060 +"use strict";
3536 5061 __webpack_require__.r(__webpack_exports__);
3537 5062 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3538 5063 /* harmony export */ "default": () => (/* binding */ plugin)
3539 5064 /* harmony export */ });
3540 5065 /**
3541 -* Tom Select v2.6.2
5066 +* Tom Select v2.4.3
3542 5067 * Licensed under the Apache License, Version 2.0 (the "License");
3543 5068 */
3544 5069
3545 5070 /**
@@ -3572,14 +5097,15 @@
3572 5097 !*** ./node_modules/tom-select/dist/esm/plugins/no_backspace_delete/plugin.js ***!
3573 5098 \********************************************************************************/
3574 5099 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3575 5100
5101 +"use strict";
3576 5102 __webpack_require__.r(__webpack_exports__);
3577 5103 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3578 5104 /* harmony export */ "default": () => (/* binding */ plugin)
3579 5105 /* harmony export */ });
3580 5106 /**
3581 -* Tom Select v2.6.2
5107 +* Tom Select v2.4.3
3582 5108 * Licensed under the Apache License, Version 2.0 (the "License");
3583 5109 */
3584 5110
3585 5111 /**
@@ -3618,14 +5144,15 @@
3618 5144 !*** ./node_modules/tom-select/dist/esm/plugins/optgroup_columns/plugin.js ***!
3619 5145 \*****************************************************************************/
3620 5146 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3621 5147
5148 +"use strict";
3622 5149 __webpack_require__.r(__webpack_exports__);
3623 5150 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3624 5151 /* harmony export */ "default": () => (/* binding */ plugin)
3625 5152 /* harmony export */ });
3626 5153 /**
3627 -* Tom Select v2.6.2
5154 +* Tom Select v2.4.3
3628 5155 * Licensed under the Apache License, Version 2.0 (the "License");
3629 5156 */
3630 5157
3631 5158 const KEY_LEFT = 37;
@@ -3718,14 +5245,15 @@
3718 5245 !*** ./node_modules/tom-select/dist/esm/plugins/remove_button/plugin.js ***!
3719 5246 \**************************************************************************/
3720 5247 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3721 5248
5249 +"use strict";
3722 5250 __webpack_require__.r(__webpack_exports__);
3723 5251 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3724 5252 /* harmony export */ "default": () => (/* binding */ plugin)
3725 5253 /* harmony export */ });
3726 5254 /**
3727 -* Tom Select v2.6.2
5255 +* Tom Select v2.4.3
3728 5256 * Licensed under the Apache License, Version 2.0 (the "License");
3729 5257 */
3730 5258
3731 5259 /**
@@ -3743,8 +5271,16 @@
3743 5271 *
3744 5272 */
3745 5273
3746 5274 /**
5275 + * Escapes a string for use within HTML.
5276 + *
5277 + */
5278 +const escape_html = str => {
5279 + return (str + '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
5280 +};
5281 +
5282 +/**
3747 5283 * Prevent default
3748 5284 *
3749 5285 */
3750 5286 const preventDefault = (evt, stop = false) => {
@@ -3806,31 +5342,28 @@
3806 5342 *
3807 5343 */
3808 5344
3809 5345 function plugin (userOptions) {
3810 - const self = this;
3811 5346 const options = Object.assign({
3812 - label: '×',
5347 + label: '&times;',
3813 5348 title: 'Remove',
3814 5349 className: 'remove',
3815 - tabindex: -1,
3816 - role: 'button',
3817 - html: data => {
3818 - var _data$tabindex;
3819 - const el = document.createElement('div');
3820 - el.className = data.className || '';
3821 - el.title = data.title || '';
3822 - el.setAttribute('role', data.role || 'button');
3823 - el.tabIndex = (_data$tabindex = data.tabindex) != null ? _data$tabindex : -1;
3824 - el.textContent = data.label || '';
3825 - return el;
3826 - }
5350 + append: true
3827 5351 }, userOptions);
5352 +
5353 + //options.className = 'remove-single';
5354 + var self = this;
5355 +
5356 + // override the render method to add remove button to each item
5357 + if (!options.append) {
5358 + return;
5359 + }
5360 + var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
3828 5361 self.hook('after', 'setupTemplates', () => {
3829 5362 var orig_render_item = self.settings.render.item;
3830 5363 self.settings.render.item = (data, escape) => {
3831 5364 var item = getDom(orig_render_item.call(self, data, escape));
3832 - var close_button = getDom(options.html(options));
5365 + var close_button = getDom(html);
3833 5366 item.appendChild(close_button);
3834 5367 addEvent(close_button, 'mousedown', evt => {
3835 5368 preventDefault(evt, true);
3836 5369 });
@@ -3861,14 +5394,15 @@
3861 5394 !*** ./node_modules/tom-select/dist/esm/plugins/restore_on_backspace/plugin.js ***!
3862 5395 \*********************************************************************************/
3863 5396 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3864 5397
5398 +"use strict";
3865 5399 __webpack_require__.r(__webpack_exports__);
3866 5400 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3867 5401 /* harmony export */ "default": () => (/* binding */ plugin)
3868 5402 /* harmony export */ });
3869 5403 /**
3870 -* Tom Select v2.6.2
5404 +* Tom Select v2.4.3
3871 5405 * Licensed under the Apache License, Version 2.0 (the "License");
3872 5406 */
3873 5407
3874 5408 /**
@@ -3917,14 +5451,15 @@
3917 5451 !*** ./node_modules/tom-select/dist/esm/plugins/virtual_scroll/plugin.js ***!
3918 5452 \***************************************************************************/
3919 5453 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3920 5454
5455 +"use strict";
3921 5456 __webpack_require__.r(__webpack_exports__);
3922 5457 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3923 5458 /* harmony export */ "default": () => (/* binding */ plugin)
3924 5459 /* harmony export */ });
3925 5460 /**
3926 -* Tom Select v2.6.2
5461 +* Tom Select v2.4.3
3927 5462 * Licensed under the Apache License, Version 2.0 (the "License");
3928 5463 */
3929 5464
3930 5465 /**
@@ -4006,9 +5541,9 @@
4006 5541 return arg;
4007 5542 };
4008 5543
4009 5544 /**
4010 - * Plugin: "virtual_scroll" (Tom Select)
5545 + * Plugin: "restore_on_backspace" (Tom Select)
4011 5546 * Copyright (c) contributors
4012 5547 *
4013 5548 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
4014 5549 * file except in compliance with the License. You may obtain a copy of the License at:
@@ -4030,12 +5565,8 @@
4030 5565 var dropdown_content;
4031 5566 var loading_more = false;
4032 5567 var load_more_opt;
4033 5568 var default_values = [];
4034 - var default_values_loaded = false;
4035 - var default_pagination;
4036 - var default_options = [];
4037 - var html_values = [];
4038 5569 if (!self.settings.shouldLoadMore) {
4039 5570 // return true if additional results should be loaded
4040 5571 self.settings.shouldLoadMore = () => {
4041 5572 const scroll_percent = dropdown_content.clientHeight / (dropdown_content.scrollHeight - dropdown_content.scrollTop);
@@ -4065,9 +5596,9 @@
4065 5596 }];
4066 5597
4067 5598 // can we load more results for given query?
4068 5599 const canLoadMore = query => {
4069 - if (self.settings.maxOptions !== null && typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) {
5600 + if (typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) {
4070 5601 return false;
4071 5602 }
4072 5603 if (query in pagination && pagination[query]) {
4073 5604 return true;
@@ -4125,13 +5656,9 @@
4125 5656
4126 5657 // wrap the load
4127 5658 self.hook('instead', 'loadCallback', (options, optgroups) => {
4128 5659 if (!loading_more) {
4129 - // When searching (non-empty query), keep selected items and HTML default options,
4130 - // but remove preloaded remote options so they don't bleed into search results.
4131 - // For empty query, use clearFilter (keeps default_values + items).
4132 - const activeFilter = self.lastValue !== '' ? (_option, value) => self.items.indexOf(value) >= 0 || html_values.indexOf(value) >= 0 : clearFilter;
4133 - self.clearOptions(activeFilter);
5660 + self.clearOptions(clearFilter);
4134 5661 } else if (load_more_opt) {
4135 5662 const first_option = options[0];
4136 5663 if (first_option !== undefined) {
4137 5664 load_more_opt.dataset.value = first_option[self.settings.valueField];
@@ -4137,31 +5664,11 @@
4137 5664 load_more_opt.dataset.value = first_option[self.settings.valueField];
4138 5665 }
4139 5666 }
4140 5667 orig_loadCallback.call(self, options, optgroups);
4141 -
4142 - // After the initial preload (empty query), snapshot default_values and option objects
4143 - // so they can be restored when the user clears their search.
4144 - if (!loading_more && !default_values_loaded) {
4145 - default_values_loaded = true;
4146 - if (self.lastValue === '') {
4147 - default_values = Object.keys(self.options);
4148 - default_pagination = pagination[''];
4149 - default_options = Object.values(self.options);
4150 - }
4151 - }
4152 5668 loading_more = false;
4153 5669 });
4154 5670
4155 - // as the “loading_more” element will be removed from the dropdown,
4156 - // we activate the previous option if needed
4157 - // to avoid the dropdown being scrolled back to the first one
4158 - self.hook('before', 'refreshOptions', () => {
4159 - if (self.activeOption && "option" !== self.activeOption.getAttribute("role")) {
4160 - self.setActiveOption(self.activeOption.previousElementSibling);
4161 - }
4162 - });
4163 -
4164 5671 // add templates to dropdown
4165 5672 // loading_more if we have another url in the queue
4166 5673 // no_more_results if we don't have another url in the queue
4167 5674 self.hook('after', 'refreshOptions', () => {
@@ -4185,32 +5692,10 @@
4185 5692 dropdown_content.append(option);
4186 5693 }
4187 5694 });
4188 5695
4189 - // Restore preloaded options and pagination when clearing search
4190 - const restoreDefaults = () => {
4191 - if (!default_values_loaded) {
4192 - return;
4193 - }
4194 - // Re-add preloaded option objects (clearOptions can only remove, not restore)
4195 - self.addOptions(default_options);
4196 - // Remove any search results that are not part of the preloaded defaults
4197 - self.clearOptions(clearFilter);
4198 - if (default_pagination) {
4199 - pagination[''] = default_pagination;
4200 - }
4201 - };
4202 - self.on('type', query => {
4203 - if (query === '') {
4204 - restoreDefaults();
4205 - self.refreshOptions(false);
4206 - }
4207 - });
4208 - self.on('dropdown_close', restoreDefaults);
4209 -
4210 5696 // add scroll listener and default templates
4211 5697 self.on('initialize', () => {
4212 - html_values = Object.keys(self.options);
4213 5698 default_values = Object.keys(self.options);
4214 5699 dropdown_content = self.dropdown_content;
4215 5700
4216 5701 // default templates
@@ -4253,8 +5738,9 @@
4253 5738 !*** ./node_modules/tom-select/dist/esm/tom-select.complete.js ***!
4254 5739 \*****************************************************************/
4255 5740 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4256 5741
5742 +"use strict";
4257 5743 __webpack_require__.r(__webpack_exports__);
4258 5744 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4259 5745 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4260 5746 /* harmony export */ });
@@ -4312,8 +5798,9 @@
4312 5798 !*** ./node_modules/tom-select/dist/esm/tom-select.js ***!
4313 5799 \********************************************************/
4314 5800 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4315 5801
5802 +"use strict";
4316 5803 __webpack_require__.r(__webpack_exports__);
4317 5804 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4318 5805 /* harmony export */ "default": () => (/* binding */ TomSelect)
4319 5806 /* harmony export */ });
@@ -4348,9 +5835,8 @@
4348 5835 this.isLocked = false;
4349 5836 this.isFocused = false;
4350 5837 this.isInputHidden = false;
4351 5838 this.isSetup = false;
4352 - this.isDropdownContentStale = true;
4353 5839 this.ignoreFocus = false;
4354 5840 this.ignoreHover = false;
4355 5841 this.hasOptions = false;
4356 5842 this.lastValue = '';
@@ -4425,9 +5911,9 @@
4425 5911 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, settings.dropdownClass, inputMode);
4426 5912 if (settings.copyClassesToDropdown) {
4427 5913 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, classes);
4428 5914 }
4429 - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass);
5915 + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass);
4430 5916 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown, dropdown_content);
4431 5917 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.dropdownParent || wrapper).appendChild(dropdown);
4432 5918 // default controlInput
4433 5919 if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) {
@@ -4432,9 +5918,9 @@
4432 5918 // default controlInput
4433 5919 if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) {
4434 5920 control_input = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.controlInput);
4435 5921 // set attributes
4436 - var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck', 'aria-label'];
5922 + var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck'];
4437 5923 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(attrs, (attr) => {
4438 5924 if (input.getAttribute(attr)) {
4439 5925 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(control_input, { [attr]: input.getAttribute(attr) });
4440 5926 }
@@ -4495,10 +5981,8 @@
4495 5981 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(focus_node, { 'aria-labelledby': label_id });
4496 5982 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(dropdown_content, { 'aria-labelledby': label_id });
4497 5983 }
4498 5984 wrapper.style.width = input.style.width;
4499 - wrapper.style.minWidth = input.style.minWidth;
4500 - wrapper.style.maxWidth = input.style.maxWidth;
4501 5985 if (self.plugins.names.length) {
4502 5986 const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
4503 5987 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)([wrapper, dropdown], classes_plugins);
4504 5988 }
@@ -4516,9 +6000,9 @@
4516 6000 // after initializePlugins() so plugins can create/modify user defined loaders
4517 6001 if (settings.load && settings.loadThrottle) {
4518 6002 settings.load = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.loadDebounce)(settings.load, settings.loadThrottle);
4519 6003 }
4520 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => {
6004 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => {
4521 6005 self.ignoreHover = false;
4522 6006 });
4523 6007 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mouseenter', (e) => {
4524 6008 var target_match = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.parentMatch)(e.target, '[data-selectable]', dropdown);
@@ -4581,21 +6065,12 @@
4581 6065 if (self.isOpen) {
4582 6066 self.positionDropdown();
4583 6067 }
4584 6068 };
4585 - const input_invalid = () => {
4586 - if (self.isValid) {
4587 - self.isValid = false;
4588 - self.isInvalid = true;
4589 - self.refreshState();
4590 - }
4591 - };
4592 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', input_invalid);
4593 6069 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(document, 'mousedown', doc_mousedown);
4594 6070 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'scroll', win_scroll, passive_event);
4595 6071 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'resize', win_scroll, passive_event);
4596 6072 this._destroy = () => {
4597 - input.removeEventListener('invalid', input_invalid);
4598 6073 document.removeEventListener('mousedown', doc_mousedown);
4599 6074 window.removeEventListener('scroll', win_scroll);
4600 6075 window.removeEventListener('resize', win_scroll);
4601 6076 if (label)
@@ -4612,12 +6087,29 @@
4612 6087 self.sync(false);
4613 6088 settings.items = [];
4614 6089 delete settings.optgroups;
4615 6090 delete settings.options;
6091 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', () => {
6092 + if (self.isValid) {
6093 + self.isValid = false;
6094 + self.isInvalid = true;
6095 + self.refreshState();
6096 + }
6097 + });
6098 + self.updateOriginalInput();
4616 6099 self.refreshItems();
4617 6100 self.close(false);
4618 6101 self.inputState();
4619 6102 self.isSetup = true;
6103 + if (input.disabled) {
6104 + self.disable();
6105 + }
6106 + else if (input.readOnly) {
6107 + self.setReadOnly(true);
6108 + }
6109 + else {
6110 + self.enable(); //sets tabIndex
6111 + }
4620 6112 self.on('change', this.onChange);
4621 6113 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(input, 'tomselected', 'ts-hidden-accessible');
4622 6114 self.trigger('initialize');
4623 6115 // preload options
@@ -4713,20 +6205,11 @@
4713 6205 *
4714 6206 */
4715 6207 sync(get_settings = true) {
4716 6208 const self = this;
4717 - const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter, allowEmptyOption: self.settings.allowEmptyOption }) : self.settings;
6209 + const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter }) : self.settings;
4718 6210 self.setupOptions(settings.options, settings.optgroups);
4719 6211 self.setValue(settings.items || [], true); // silent prevents recursion
4720 - if (self.input.disabled) {
4721 - self.disable();
4722 - }
4723 - else if (self.input.readOnly) {
4724 - self.setReadOnly(true);
4725 - }
4726 - else {
4727 - self.enable(); //sets tabIndex
4728 - }
4729 6212 self.lastQuery = null; // so updated options will be displayed in dropdown
4730 6213 }
4731 6214 /**
4732 6215 * Triggered when the main control element
@@ -4757,9 +6240,9 @@
4757 6240 * This should propagate the event to the original DOM
4758 6241 * input / select element.
4759 6242 */
4760 6243 onChange() {
4761 - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input');
6244 + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input');
4762 6245 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'change');
4763 6246 }
4764 6247 /**
4765 6248 * Triggered on <input> paste.
@@ -4854,9 +6337,9 @@
4854 6337 let next = self.getAdjacent(self.activeOption, 1);
4855 6338 if (next)
4856 6339 self.setActiveOption(next);
4857 6340 }
4858 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6341 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4859 6342 return;
4860 6343 // up: move selection up
4861 6344 case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_UP:
4862 6345 if (self.activeOption) {
@@ -4863,9 +6346,9 @@
4863 6346 let prev = self.getAdjacent(self.activeOption, -1);
4864 6347 if (prev)
4865 6348 self.setActiveOption(prev);
4866 6349 }
4867 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6350 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4868 6351 return;
4869 6352 // return: select active option
4870 6353 case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_RETURN:
4871 6354 if (self.canSelect(self.activeOption)) {
@@ -4897,9 +6380,9 @@
4897 6380 // prevent default [tab] behaviour of jump to the next field
4898 6381 // if select isFull, then the dropdown won't be open and [tab] will work normally
4899 6382 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4900 6383 }
4901 - else if (self.settings.create && self.createItem()) {
6384 + if (self.settings.create && self.createItem()) {
4902 6385 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4903 6386 }
4904 6387 }
4905 6388 return;
@@ -5021,24 +6504,18 @@
5021 6504 self.createItem(null, () => {
5022 6505 if (self.settings.closeAfterSelect) {
5023 6506 self.close();
5024 6507 }
5025 - else if (self.settings.clearAfterSelect) {
5026 - self.setTextboxValue();
5027 - }
5028 6508 });
5029 6509 }
5030 6510 else {
5031 6511 value = option.dataset.value;
5032 6512 if (typeof value !== 'undefined') {
5033 - self.isDropdownContentStale = self.settings.hideSelected;
6513 + self.lastQuery = null;
5034 6514 self.addItem(value);
5035 6515 if (self.settings.closeAfterSelect) {
5036 6516 self.close();
5037 6517 }
5038 - else if (self.settings.clearAfterSelect) {
5039 - self.setTextboxValue();
5040 - }
5041 6518 if (!self.settings.hideSelected && evt.type && /click/.test(evt.type)) {
5042 6519 self.setActiveOption(option);
5043 6520 }
5044 6521 }
@@ -5110,9 +6587,9 @@
5110 6587 */
5111 6588 loadCallback(options, optgroups) {
5112 6589 const self = this;
5113 6590 self.loading = Math.max(self.loading - 1, 0);
5114 - self.isDropdownContentStale = true;
6591 + self.lastQuery = null;
5115 6592 self.clearActiveOption(); // when new results load, focus should be on first option
5116 6593 self.setupOptions(options, optgroups);
5117 6594 self.refreshOptions(self.isFocused && !self.isInputHidden);
5118 6595 if (!self.loading) {
@@ -5209,9 +6686,9 @@
5209 6686 if (self.activeItems.indexOf(item) === -1) {
5210 6687 self.setActiveItemClass(item);
5211 6688 }
5212 6689 }
5213 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6690 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
5214 6691 }
5215 6692 else if ((eventName === 'click' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)(_constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_SHORTCUT, e)) || (eventName === 'keydown' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)('shiftKey', e))) {
5216 6693 if (item.classList.contains('active')) {
5217 6694 self.removeActiveItem(item);
@@ -5258,9 +6735,9 @@
5258 6735 * Clears all the active items
5259 6736 *
5260 6737 */
5261 6738 clearActiveItems() {
5262 - ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active');
6739 + (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active');
5263 6740 this.activeItems = [];
5264 6741 }
5265 6742 /**
5266 6743 * Sets the selected item in the dropdown menu
@@ -5375,21 +6852,17 @@
5375 6852 var self = this;
5376 6853 if (self.isDisabled || self.isReadOnly)
5377 6854 return;
5378 6855 self.ignoreFocus = true;
5379 - const focusTarget = this.control_input.offsetWidth ? this.control_input : this.focus_node;
5380 - focusTarget.focus();
6856 + if (self.control_input.offsetWidth) {
6857 + self.control_input.focus();
6858 + }
6859 + else {
6860 + self.focus_node.focus();
6861 + }
5381 6862 setTimeout(() => {
5382 6863 self.ignoreFocus = false;
5383 - // Fix https://github.com/orchidjs/tom-select/issues/806
5384 - // Only proceed if this instance's element is still the active element. If Edge autofill
5385 - // (or anything else) has moved focus to a different element in the interim, calling
5386 - // onFocus() here would steal focus back and restart the cascade loop.
5387 - const root = focusTarget.getRootNode();
5388 - if (root.activeElement !== focusTarget) {
5389 - return;
5390 - }
5391 - this.onFocus();
6864 + self.onFocus();
5392 6865 }, 0);
5393 6866 }
5394 6867 /**
5395 6868 * Forces the control out of focus.
@@ -5445,15 +6918,10 @@
5445 6918 throw new Error('Tom Select "score" setting must be a function that returns a function');
5446 6919 }
5447 6920 }
5448 6921 // perform search
5449 - if (self.isDropdownContentStale || query !== self.lastQuery) {
6922 + if (query !== self.lastQuery) {
5450 6923 self.lastQuery = query;
5451 - // temp fix for https://github.com/orchidjs/tom-select/issues/987
5452 - // UI crashed when more than 30 same chars in a row, prevent search and return empt result
5453 - if (/(.)\1{15,}/.test(query)) {
5454 - query = '';
5455 - }
5456 6924 result = self.sifter.search(query, Object.assign(options, { score: calculateScore }));
5457 6925 self.currentResults = result;
5458 6926 }
5459 6927 else {
@@ -5462,9 +6930,9 @@
5462 6930 // filter out selected items
5463 6931 if (self.settings.hideSelected) {
5464 6932 result.items = result.items.filter((item) => {
5465 6933 let hashed = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(item.id);
5466 - return !(hashed !== null && self.items.indexOf(hashed) !== -1);
6934 + return !(hashed && self.items.indexOf(hashed) !== -1);
5467 6935 });
5468 6936 }
5469 6937 return result;
5470 6938 }
@@ -5534,15 +7002,8 @@
5534 7002 for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
5535 7003 optgroup = optgroups[j];
5536 7004 let order = option.$order;
5537 7005 let self_optgroup = self.optgroups[optgroup];
5538 - if (self_optgroup === undefined && typeof self.settings.optionGroupRegister === 'function') {
5539 - var regGroup;
5540 - if (regGroup = self.settings.optionGroupRegister.apply(self, [optgroup])) {
5541 - self.registerOptionGroup(regGroup);
5542 - }
5543 - }
5544 - self_optgroup = self.optgroups[optgroup];
5545 7006 if (self_optgroup === undefined) {
5546 7007 optgroup = '';
5547 7008 }
5548 7009 else {
@@ -5595,9 +7056,8 @@
5595 7056 }
5596 7057 });
5597 7058 dropdown_content.innerHTML = '';
5598 7059 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown_content, html);
5599 - self.isDropdownContentStale = false;
5600 7060 // highlight matching terms inline
5601 7061 if (self.settings.highlight) {
5602 7062 (0,_contrib_highlight_js__WEBPACK_IMPORTED_MODULE_4__.removeHighlight)(dropdown_content);
5603 7063 if (results.query.length && results.tokens.length) {
@@ -5690,15 +7150,14 @@
5690 7150 return false;
5691 7151 }
5692 7152 const key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(data[self.settings.valueField]);
5693 7153 if (key === null || self.options.hasOwnProperty(key)) {
5694 - self.updateOption(data[self.settings.valueField], data);
5695 7154 return false;
5696 7155 }
5697 7156 data.$order = data.$order || ++self.order;
5698 7157 data.$id = self.inputId + '-opt-' + data.$order;
5699 7158 self.options[key] = data;
5700 - self.isDropdownContentStale = true;
7159 + self.lastQuery = null;
5701 7160 if (user_created) {
5702 7161 self.userOptions[key] = user_created;
5703 7162 self.trigger('option_add', key, data);
5704 7163 }
@@ -5708,9 +7167,9 @@
5708 7167 * Add multiple options
5709 7168 *
5710 7169 */
5711 7170 addOptions(data, user_created = false) {
5712 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => {
7171 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => {
5713 7172 this.addOption(dat, user_created);
5714 7173 });
5715 7174 }
5716 7175 /**
@@ -5812,10 +7271,10 @@
5812 7271 if (item.classList.contains('active'))
5813 7272 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(item_new, 'active');
5814 7273 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.replaceNode)(item, item_new);
5815 7274 }
5816 - // we might have updated the sortField
5817 - self.isDropdownContentStale = true;
7275 + // invalidate last query because we might have updated the sortField
7276 + self.lastQuery = null;
5818 7277 }
5819 7278 /**
5820 7279 * Removes a single option.
5821 7280 *
@@ -5825,9 +7284,9 @@
5825 7284 value = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.get_hash)(value);
5826 7285 self.uncacheValue(value);
5827 7286 delete self.userOptions[value];
5828 7287 delete self.options[value];
5829 - self.isDropdownContentStale = true;
7288 + self.lastQuery = null;
5830 7289 self.trigger('option_remove', value);
5831 7290 self.removeItem(value, silent);
5832 7291 }
5833 7292 /**
@@ -5844,9 +7303,9 @@
5844 7303 selected[key] = option;
5845 7304 }
5846 7305 });
5847 7306 this.options = this.sifter.items = selected;
5848 - this.isDropdownContentStale = true;
7307 + this.lastQuery = null;
5849 7308 this.trigger('option_clear');
5850 7309 }
5851 7310 /**
5852 7311 * Used by clearOptions() to decide whether or not an option should be removed
@@ -5976,12 +7435,8 @@
5976 7435 if (next) {
5977 7436 self.setActiveOption(next);
5978 7437 }
5979 7438 }
5980 - //remove input value when enabled
5981 - if (self.settings.clearAfterSelect) {
5982 - self.setTextboxValue();
5983 - }
5984 7439 // refreshOptions after setActiveOption(),
5985 7440 // otherwise setActiveOption() will be called by refreshOptions() with the wrong value
5986 7441 if (!self.isPending && !self.settings.closeAfterSelect) {
5987 7442 self.refreshOptions(self.isFocused && inputMode !== 'single');
@@ -6023,9 +7478,9 @@
6023 7478 self.activeItems.splice(idx, 1);
6024 7479 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(item, 'active');
6025 7480 }
6026 7481 self.items.splice(i, 1);
6027 - self.isDropdownContentStale = true;
7482 + self.lastQuery = null;
6028 7483 if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
6029 7484 self.removeOption(value, silent);
6030 7485 }
6031 7486 if (i < self.caretPos) {
@@ -6057,14 +7512,8 @@
6057 7512 var caret = self.caretPos;
6058 7513 var output;
6059 7514 input = input || self.inputValue();
6060 7515 if (!self.canCreate(input)) {
6061 - const hash = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(input);
6062 - if (hash) {
6063 - if (this.options[input]) {
6064 - self.addItem(input);
6065 - }
6066 - }
6067 7516 callback();
6068 7517 return false;
6069 7518 }
6070 7519 self.lock();
@@ -6102,9 +7551,9 @@
6102 7551 * Re-renders the selected item lists.
6103 7552 */
6104 7553 refreshItems() {
6105 7554 var self = this;
6106 - self.isDropdownContentStale = true;
7555 + self.lastQuery = null;
6107 7556 if (self.isSetup) {
6108 7557 self.addItems(self.items);
6109 7558 }
6110 7559 self.updateOriginalInput();
@@ -6181,9 +7630,9 @@
6181 7630 }
6182 7631 selected.push(option_el);
6183 7632 // marking empty option as selected can break validation
6184 7633 // fixes https://github.com/orchidjs/tom-select/issues/303
6185 - if (option_el != empty_option || has_selected > 0 || self.settings.mode == 'multi') {
7634 + if (option_el != empty_option || has_selected > 0) {
6186 7635 option_el.selected = true;
6187 7636 }
6188 7637 return option_el;
6189 7638 }
@@ -6324,9 +7773,9 @@
6324 7773 caret = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.nodeIndex)(tail);
6325 7774 if (direction > 0) {
6326 7775 caret++;
6327 7776 }
6328 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item));
7777 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item));
6329 7778 }
6330 7779 else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
6331 7780 const items = self.controlChildren();
6332 7781 let rm_item;
@@ -6342,9 +7791,9 @@
6342 7791 }
6343 7792 if (!self.shouldDelete(rm_items, e)) {
6344 7793 return false;
6345 7794 }
6346 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true);
7795 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true);
6347 7796 // perform removal
6348 7797 if (typeof caret !== 'undefined') {
6349 7798 self.setCaret(caret);
6350 7799 }
@@ -6361,9 +7810,9 @@
6361 7810 */
6362 7811 shouldDelete(items, evt) {
6363 7812 const values = items.map(item => item.dataset.value);
6364 7813 // allow the callback to abort
6365 - if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete.call(this, values, evt) === false)) {
7814 + if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete(values, evt) === false)) {
6366 7815 return false;
6367 7816 }
6368 7817 return true;
6369 7818 }
@@ -6580,9 +8029,9 @@
6580 8029 * caches.
6581 8030 *
6582 8031 */
6583 8032 clearCache() {
6584 - ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => {
8033 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => {
6585 8034 if (option.$div) {
6586 8035 option.$div.remove();
6587 8036 delete option.$div;
6588 8037 }
@@ -6641,8 +8090,9 @@
6641 8090 !*** ./node_modules/tom-select/dist/esm/utils.js ***!
6642 8091 \***************************************************/
6643 8092 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6644 8093
8094 +"use strict";
6645 8095 __webpack_require__.r(__webpack_exports__);
6646 8096 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6647 8097 /* harmony export */ addEvent: () => (/* binding */ addEvent),
6648 8098 /* harmony export */ addSlashes: () => (/* binding */ addSlashes),
@@ -6862,8 +8312,9 @@
6862 8312 !*** ./node_modules/tom-select/dist/esm/vanilla.js ***!
6863 8313 \*****************************************************/
6864 8314 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6865 8315
8316 +"use strict";
6866 8317 __webpack_require__.r(__webpack_exports__);
6867 8318 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6868 8319 /* harmony export */ addClasses: () => (/* binding */ addClasses),
6869 8320 /* harmony export */ applyCSS: () => (/* binding */ applyCSS),
@@ -7059,20 +8510,20 @@
7059 8510
7060 8511 /******/ });
7061 8512 /************************************************************************/
7062 8513 /******/ // The module cache
7063 -/******/ const __webpack_module_cache__ = {};
8514 +/******/ var __webpack_module_cache__ = {};
7064 8515 /******/
7065 8516 /******/ // The require function
7066 8517 /******/ function __webpack_require__(moduleId) {
7067 8518 /******/ // Check if module is in cache
7068 -/******/ const cachedModule = __webpack_module_cache__[moduleId];
8519 +/******/ var cachedModule = __webpack_module_cache__[moduleId];
7069 8520 /******/ if (cachedModule !== undefined) {
7070 8521 /******/ return cachedModule.exports;
7071 8522 /******/ }
7072 8523 /******/ // Create a new module (and put it into the cache)
7073 -/******/ const module = __webpack_module_cache__[moduleId] = {
7074 -/******/ // no module.id needed
8524 +/******/ var module = __webpack_module_cache__[moduleId] = {
8525 +/******/ id: moduleId,
7075 8526 /******/ // no module.loaded needed
7076 8527 /******/ exports: {}
7077 8528 /******/ };
7078 8529 /******/
@@ -7078,13 +8529,13 @@
7078 8529 /******/
7079 8530 /******/ // Execute the module function
7080 8531 /******/ if (!(moduleId in __webpack_modules__)) {
7081 8532 /******/ delete __webpack_module_cache__[moduleId];
7082 -/******/ const e = new Error("Cannot find module '" + moduleId + "'");
8533 +/******/ var e = new Error("Cannot find module '" + moduleId + "'");
7083 8534 /******/ e.code = 'MODULE_NOT_FOUND';
7084 8535 /******/ throw e;
7085 8536 /******/ }
7086 -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
8537 +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
7087 8538 /******/
7088 8539 /******/ // Return the exports of the module
7089 8540 /******/ return module.exports;
7090 8541 /******/ }
@@ -7089,31 +8540,28 @@
7089 8540 /******/ return module.exports;
7090 8541 /******/ }
7091 8542 /******/
7092 8543 /************************************************************************/
8544 +/******/ /* webpack/runtime/compat get default export */
8545 +/******/ (() => {
8546 +/******/ // getDefaultExport function for compatibility with non-harmony modules
8547 +/******/ __webpack_require__.n = (module) => {
8548 +/******/ var getter = module && module.__esModule ?
8549 +/******/ () => (module['default']) :
8550 +/******/ () => (module);
8551 +/******/ __webpack_require__.d(getter, { a: getter });
8552 +/******/ return getter;
8553 +/******/ };
8554 +/******/ })();
8555 +/******/
7093 8556 /******/ /* webpack/runtime/define property getters */
7094 8557 /******/ (() => {
7095 -/******/ // define getter/value functions for harmony exports
8558 +/******/ // define getter functions for harmony exports
7096 8559 /******/ __webpack_require__.d = (exports, definition) => {
7097 -/******/ if(Array.isArray(definition)) {
7098 -/******/ var i = 0;
7099 -/******/ while(i < definition.length) {
7100 -/******/ var key = definition[i++];
7101 -/******/ var binding = definition[i++];
7102 -/******/ if(!__webpack_require__.o(exports, key)) {
7103 -/******/ if(binding === 0) {
7104 -/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
7105 -/******/ } else {
7106 -/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
7107 -/******/ }
7108 -/******/ } else if(binding === 0) { i++; }
8560 +/******/ for(var key in definition) {
8561 +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
8562 +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
7109 8563 /******/ }
7110 -/******/ } else {
7111 -/******/ for(var key in definition) {
7112 -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
7113 -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
7114 -/******/ }
7115 -/******/ }
7116 8564 /******/ }
7117 8565 /******/ };
7118 8566 /******/ })();
7119 8567 /******/
@@ -7118,9 +8566,9 @@
7118 8566 /******/ })();
7119 8567 /******/
7120 8568 /******/ /* webpack/runtime/hasOwnProperty shorthand */
7121 8569 /******/ (() => {
7122 -/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop))
8570 +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
7123 8571 /******/ })();
7124 8572 /******/
7125 8573 /******/ /* webpack/runtime/make namespace object */
7126 8574 /******/ (() => {
@@ -7125,9 +8573,9 @@
7125 8573 /******/ /* webpack/runtime/make namespace object */
7126 8574 /******/ (() => {
7127 8575 /******/ // define __esModule on exports
7128 8576 /******/ __webpack_require__.r = (exports) => {
7129 -/******/ if(Symbol.toStringTag) {
8577 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
7130 8578 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7131 8579 /******/ }
7132 8580 /******/ Object.defineProperty(exports, '__esModule', { value: true });
7133 8581 /******/ };
@@ -7132,12 +8580,18 @@
7132 8580 /******/ Object.defineProperty(exports, '__esModule', { value: true });
7133 8581 /******/ };
7134 8582 /******/ })();
7135 8583 /******/
8584 +/******/ /* webpack/runtime/nonce */
8585 +/******/ (() => {
8586 +/******/ __webpack_require__.nc = undefined;
8587 +/******/ })();
8588 +/******/
7136 8589 /************************************************************************/
7137 -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.
8590 +var __webpack_exports__ = {};
8591 +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
7139 8592 (() => {
8593 +"use strict";
7140 8594 /*!**************************************!*\
7141 8595 !*** ./assets/src/js/admin/admin.js ***!
7142 8596 \**************************************/
7143 8597 __webpack_require__.r(__webpack_exports__);
@@ -7142,10 +8596,12 @@
7142 8596 \**************************************/
7143 8597 __webpack_require__.r(__webpack_exports__);
7144 8598 /* 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 8599 /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js");
8600 +/* 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 8601
7147 8602
8603 +
7148 8604 (function ($) {
7149 8605 /**
7150 8606 * Callback event for button to creating pages inside error message.
7151 8607 *
@@ -7259,9 +8715,10 @@
7259 8715 };
7260 8716 const onReady = function onReady() {
7261 8717 lpMetaboxFileInput();
7262 8718 //updateDb();
7263 - $('.learn-press-dropdown-pages').LP('DropdownPages');
8719 + const dropdownPages = new _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__.DropdownPages();
8720 + dropdownPages.init();
7264 8721 //$( '.learn-press-advertisement-slider' ).LP( 'Advertisement', 'a', 's' ).appendTo( $( '#wpbody-content' ) );
7265 8722 //$( '.learn-press-toggle-item-preview' ).on( 'change', updateItemPreview );
7266 8723 $('.learn-press-tip').LP('QuickTip'); //$('.learn-press-tabs').LP('AdminTab');
7267 8724