packages
1 week ago
012778ff5828d0d1739f.bundle.js
2 weeks ago
02ab54a3328c55e115ea.bundle.min.js
2 weeks ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
06dbd869189450c5db6c.bundle.js
2 weeks ago
0982f37bec0944fbcb10.bundle.js
4 months ago
0bc41c4656ca54cf2aca.bundle.min.js
4 months ago
14bcbc91620c14a7112c.bundle.min.js
2 weeks ago
1564d2bfa4591bf857f3.bundle.min.js
4 months ago
197583acd246fea0e25d.bundle.js
5 months ago
20866d9d9e34bf3cb0a7.bundle.min.js
2 weeks ago
2140afa714e988f1069e.bundle.js
2 months ago
220e9c3d1caa01726b1a.bundle.js
2 weeks ago
29c342e9c10e3f13f498.bundle.js
2 weeks ago
2bac2875cdf51a1f8140.bundle.min.js
2 weeks ago
32f7c5e8db4c8976b254.bundle.js
2 months ago
35423d812dc1d52fdb27.bundle.min.js
4 months ago
397f2d183c19202777d6.bundle.min.js
3 months ago
397f2d183c19202777d6.bundle.min.js.LICENSE.txt
3 months ago
3c838288a9b7ddd2aea4.bundle.min.js
4 months ago
3d410a099008411bb011.bundle.js
5 months ago
3df4dbb5d612dbdab477.bundle.min.js
2 months ago
40d841f4b4ce7b1928f5.bundle.js
4 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4927500be197e062162e.bundle.min.js
2 months ago
4c96eab5a48ee097dcb2.bundle.js
2 weeks ago
59845ab5a628d2b79f57.bundle.js
2 weeks ago
5b575dffd21b0cec15a5.bundle.js
2 weeks ago
6117d083decd13b6ed73.bundle.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
687979ffbcfd58352c29.bundle.min.js
2 weeks ago
6936b079b4e7c28cd901.bundle.min.js
2 weeks ago
6a19e86dd8c1f9165dbe.bundle.js
5 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
73f63f9507c306870586.bundle.min.js
2 weeks ago
7698e0d50a8ad7ecc822.bundle.js
2 weeks ago
77b60be7dc925a32f560.bundle.min.js
2 weeks ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
4 months ago
8277989eebcfba278cb0.bundle.min.js
7 months ago
831aea236b1ddda24f0c.bundle.js
2 weeks ago
845418a5488e9937fc99.bundle.min.js
2 weeks ago
8ad22e7ba800b096313c.bundle.min.js
2 weeks ago
8c20eb5e96967d3016b2.bundle.js
2 weeks ago
8e5b42844d27eada9b53.bundle.min.js
2 months ago
8e80438d29fc79b648e5.bundle.js
2 months ago
8e8b47ad5b4e4d038c80.bundle.js
4 months ago
8ecfd8495b7ec419862a.bundle.js
4 months ago
979a9c03fe10da23400d.bundle.js
2 months ago
9b0cc3aa93cf287cd0a2.bundle.min.js
2 weeks ago
9b97a73ee8fdc5fb7dc3.bundle.js
3 months ago
9bd390911e34b349d8cb.bundle.min.js
2 months ago
9dcd9e88237da6496816.bundle.min.js
4 months ago
9e7e356552c03a622b0f.bundle.js
2 months ago
9ffe53753902b9aca176.bundle.js
2 weeks ago
a0f667abb781daab8e48.bundle.js
2 weeks ago
a9c3d5b02d26399aebfb.bundle.js
2 weeks ago
accordion.8b0db5058afeb74622f5.bundle.min.js
7 months ago
accordion.b9a0ab19c7c872c405d7.bundle.js
5 months ago
admin-feedback.js
7 months ago
admin-feedback.min.js
7 months ago
admin-feedback.strings.js
2 weeks ago
admin-modules.js
5 months ago
admin-modules.min.js
5 months ago
admin-modules.min.js.LICENSE.txt
9 months ago
admin-modules.strings.js
1 month ago
admin-notifications.js
7 months ago
admin-notifications.min.js
7 months ago
admin-notifications.strings.js
5 months ago
admin-top-bar.js
2 months ago
admin-top-bar.min.js
2 months ago
admin-top-bar.strings.js
5 months ago
admin.js
2 weeks ago
admin.min.js
2 weeks ago
admin.min.js.LICENSE.txt
9 months ago
admin.strings.js
5 months ago
aee13673e923469c3275.bundle.min.js
4 months ago
af05aac2eb23e7438265.bundle.js
2 weeks ago
ai-admin.js
5 months ago
ai-admin.min.js
5 months ago
ai-admin.min.js.LICENSE.txt
9 months ago
ai-admin.strings.js
5 months ago
ai-gutenberg.js
5 months ago
ai-gutenberg.min.js
5 months ago
ai-gutenberg.min.js.LICENSE.txt
9 months ago
ai-gutenberg.strings.js
5 months ago
ai-layout.js
3 months ago
ai-layout.min.js
3 months ago
ai-layout.min.js.LICENSE.txt
9 months ago
ai-layout.strings.js
1 week ago
ai-media-library.js
5 months ago
ai-media-library.min.js
5 months ago
ai-media-library.min.js.LICENSE.txt
9 months ago
ai-media-library.strings.js
5 months ago
ai-unify-product-images.js
5 months ago
ai-unify-product-images.min.js
5 months ago
ai-unify-product-images.min.js.LICENSE.txt
9 months ago
ai-unify-product-images.strings.js
5 months ago
ai.js
5 months ago
ai.min.js
5 months ago
ai.min.js.LICENSE.txt
9 months ago
ai.strings.js
1 week ago
alert.b4336601ffdb6086d1b5.bundle.min.js
2 weeks ago
alert.fd509aa768e7b35a8e32.bundle.js
5 months ago
announcements-app.js
2 weeks ago
announcements-app.min.js
2 weeks ago
announcements-app.min.js.LICENSE.txt
9 months ago
announcements-app.strings.js
5 months ago
app-loader.js
5 months ago
app-loader.min.js
7 months ago
app-loader.strings.js
1 week ago
app-packages.js
4 months ago
app-packages.min.js
4 months ago
app-packages.min.js.LICENSE.txt
9 months ago
app-packages.strings.js
1 week ago
app.js
2 weeks ago
app.min.js
2 weeks ago
app.min.js.LICENSE.txt
9 months ago
app.strings.js
1 week ago
atomic-widgets-action-link-handler.js
2 weeks ago
atomic-widgets-action-link-handler.min.js
2 weeks ago
atomic-widgets-editor.js
2 weeks ago
atomic-widgets-editor.min.js
2 weeks ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
2 months ago
atomic-widgets-form-handler.js
1 week ago
atomic-widgets-form-handler.min.js
1 week ago
atomic-widgets-form-handler.min.js.LICENSE.txt
2 weeks ago
b4d39e5186d768f79598.bundle.js
2 weeks ago
b96d70044d0d67c2df19.bundle.min.js
7 months ago
bcb5135af6b817bc9708.bundle.min.js
2 months ago
beta-tester.js
7 months ago
beta-tester.min.js
7 months ago
beta-tester.strings.js
5 months ago
bf2fa9f81b3d78f5858f.bundle.min.js
2 weeks ago
c13d205fa26f8af1ce7c.bundle.js
5 months ago
c73a7d15e48e3305780a.bundle.min.js
2 weeks ago
cf6ec600fcf4e08ba6d3.bundle.js
4 months ago
checklist.js
5 months ago
checklist.min.js
5 months ago
checklist.min.js.LICENSE.txt
9 months ago
checklist.strings.js
5 months ago
cloud-library-screenshot.js
5 months ago
cloud-library-screenshot.min.js
5 months ago
cloud-library-screenshot.min.js.LICENSE.txt
7 months ago
cloud-library-screenshot.strings.js
5 months ago
common-modules.js
2 months ago
common-modules.min.js
2 months ago
common-modules.strings.js
5 months ago
common.js
2 weeks ago
common.min.js
2 weeks ago
common.min.js.LICENSE.txt
9 months ago
common.strings.js
5 months ago
contact-buttons.086261d3e9c4d8037686.bundle.js
5 months ago
contact-buttons.e98d0220ce8c38404e7e.bundle.min.js
7 months ago
container-converter.js
7 months ago
container-converter.min.js
7 months ago
container-converter.strings.js
5 months ago
container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js
4 months ago
container-editor-handlers.e7e069c4e656425c51f8.bundle.js
4 months ago
counter.12335f45aaa79d244f24.bundle.min.js
7 months ago
counter.7310c276bc7865a3d438.bundle.js
5 months ago
d39cd4cb3d5b09b11c14.bundle.min.js
2 weeks ago
d42de03ef4a0f50e39ca.bundle.min.js
4 months ago
d4c67aa71d8173f6201f.bundle.js
2 months ago
d52aa05c75af56327744.bundle.js
5 months ago
d67ddd6f08b08392c42f.bundle.js
5 months ago
d8a330693f9211e2166e.bundle.min.js
2 weeks ago
daedc6797eaad5c82711.bundle.min.js
7 months ago
de7511b88f9ec0968921.bundle.js
2 weeks ago
design-system-sync.js
1 month ago
design-system-sync.min.js
1 month ago
design-system-sync.strings.js
2 months ago
dev-tools.js
7 months ago
dev-tools.min.js
7 months ago
dev-tools.strings.js
5 months ago
df2f2a2ae20e0181ec2d.bundle.js
2 months ago
df4ff09f2b412abf0cd3.bundle.js
2 weeks ago
dff865a4d52c12bcf996.bundle.min.js
2 weeks ago
e-home-screen.js
2 weeks ago
e-home-screen.min.js
2 weeks ago
e-home-screen.min.js.LICENSE.txt
2 weeks ago
e-home-screen.strings.js
2 weeks ago
e-react-promotions.js
1 month ago
e-react-promotions.min.js
1 month ago
e-react-promotions.min.js.LICENSE.txt
1 month ago
e-react-promotions.strings.js
5 months ago
e-wc-product-editor.js
5 months ago
e-wc-product-editor.min.js
7 months ago
e-wc-product-editor.min.js.LICENSE.txt
1 year ago
e-wc-product-editor.strings.js
5 months ago
e1cb4d726bb59646c677.bundle.min.js
7 months ago
e459c6c89c0c0899c850.bundle.js
5 months ago
e9a764dcd37c06162942.bundle.js
2 weeks ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
ec1ee92b2a471389c7b9.bundle.min.js
2 weeks ago
editor-document.js
5 months ago
editor-document.min.js
7 months ago
editor-document.strings.js
1 week ago
editor-environment-v2.js
7 months ago
editor-environment-v2.min.js
7 months ago
editor-environment-v2.strings.js
5 months ago
editor-interactions.js
2 weeks ago
editor-interactions.min.js
2 weeks ago
editor-interactions.strings.js
5 months ago
editor-loader-v1.js
7 months ago
editor-loader-v1.min.js
7 months ago
editor-loader-v1.strings.js
5 months ago
editor-loader-v2.js
7 months ago
editor-loader-v2.min.js
7 months ago
editor-loader-v2.strings.js
5 months ago
editor-modules.js
2 months ago
editor-modules.min.js
2 months ago
editor-modules.min.js.LICENSE.txt
9 months ago
editor-modules.strings.js
1 week ago
editor-notifications.js
7 months ago
editor-notifications.min.js
7 months ago
editor-notifications.strings.js
5 months ago
editor-one-admin.js
5 months ago
editor-one-admin.min.js
5 months ago
editor-one-admin.strings.js
5 months ago
editor-one-menu.js
4 months ago
editor-one-menu.min.js
4 months ago
editor-one-menu.strings.js
5 months ago
editor-one-sidebar-navigation.js
2 months ago
editor-one-sidebar-navigation.min.js
2 months ago
editor-one-sidebar-navigation.min.js.LICENSE.txt
5 months ago
editor-one-sidebar-navigation.strings.js
5 months ago
editor-one-top-bar.js
2 weeks ago
editor-one-top-bar.min.js
2 weeks ago
editor-one-top-bar.min.js.LICENSE.txt
4 months ago
editor-one-top-bar.strings.js
4 months ago
editor-v4-opt-in-alphachip.js
2 months ago
editor-v4-opt-in-alphachip.min.js
2 months ago
editor-v4-opt-in-alphachip.strings.js
2 months ago
editor-v4-opt-in.js
2 months ago
editor-v4-opt-in.min.js
2 months ago
editor-v4-opt-in.min.js.LICENSE.txt
5 months ago
editor-v4-opt-in.strings.js
2 months ago
editor.js
2 weeks ago
editor.min.js
2 weeks ago
editor.min.js.LICENSE.txt
5 months ago
editor.strings.js
2 weeks ago
ef2100ac3eda1a957819.bundle.min.js
7 months ago
ef35c83e4628f0a5c328.bundle.js
4 months ago
element-manager-admin.js
2 months ago
element-manager-admin.min.js
2 months ago
element-manager-admin.min.js.LICENSE.txt
9 months ago
element-manager-admin.strings.js
2 months ago
elementor-admin-bar.js
7 months ago
elementor-admin-bar.min.js
7 months ago
elementor-admin-bar.strings.js
5 months ago
f3b4453f66034a6655a7.bundle.min.js
2 weeks ago
f56b0d1257a5346afe64.bundle.min.js
2 months ago
fdda4547e887fbda71b3.bundle.js
2 months ago
fdf69f4e1f300fb27472.bundle.min.js
2 months ago
floating-bars.740d06d17cea5cebdb61.bundle.min.js
7 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
5 months ago
floating-elements-modal.js
2 months ago
floating-elements-modal.min.js
2 months ago
floating-elements-modal.strings.js
5 months ago
frontend-modules.js
2 months ago
frontend-modules.min.js
2 months ago
frontend.js
2 weeks ago
frontend.min.js
2 weeks ago
gutenberg.js
7 months ago
gutenberg.min.js
7 months ago
gutenberg.strings.js
2 months ago
image-carousel.6167d20b95b33386757b.bundle.min.js
7 months ago
image-carousel.8b25f3674c29b829a867.bundle.js
5 months ago
import-export-admin.js
5 months ago
import-export-admin.min.js
5 months ago
import-export-admin.strings.js
1 week ago
import-export-customization-admin.js
2 weeks ago
import-export-customization-admin.min.js
2 weeks ago
import-export-customization-admin.min.js.LICENSE.txt
7 months ago
import-export-customization-admin.strings.js
1 week ago
interactions-shared-utils.js
2 weeks ago
interactions-shared-utils.min.js
2 weeks ago
interactions-shared-utils.strings.js
2 months ago
interactions.js
2 weeks ago
interactions.min.js
2 weeks ago
interactions.strings.js
5 months ago
kit-elements-defaults-editor.js
5 months ago
kit-elements-defaults-editor.min.js
5 months ago
kit-elements-defaults-editor.min.js.LICENSE.txt
9 months ago
kit-elements-defaults-editor.strings.js
5 months ago
kit-library.a394510096bc447f636d.bundle.min.js
2 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
2 months ago
lightbox.570c05c5a283cfb6b223.bundle.min.js
3 months ago
lightbox.d9ea72d232a14f514ee2.bundle.js
3 months ago
media-hints.js
7 months ago
media-hints.min.js
7 months ago
media-hints.strings.js
5 months ago
nested-accordion.294d40984397351fd0f5.bundle.min.js
4 months ago
nested-accordion.4340b64226322f36bcc0.bundle.js
4 months ago
nested-accordion.js
5 months ago
nested-accordion.min.js
5 months ago
nested-accordion.min.js.LICENSE.txt
9 months ago
nested-accordion.strings.js
5 months ago
nested-elements.js
3 months ago
nested-elements.min.js
3 months ago
nested-elements.strings.js
5 months ago
nested-tabs.7a338e6d7e060c473993.bundle.js
5 months ago
nested-tabs.a2401356d329f179475e.bundle.min.js
5 months ago
nested-tabs.js
5 months ago
nested-tabs.min.js
5 months ago
nested-tabs.min.js.LICENSE.txt
9 months ago
nested-tabs.strings.js
5 months ago
nested-title-keyboard-handler.0c2b498e3e0695a1dc19.bundle.js
5 months ago
nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js
5 months ago
new-template.js
4 months ago
new-template.min.js
4 months ago
new-template.strings.js
5 months ago
notes.js
7 months ago
notes.min.js
7 months ago
notes.strings.js
5 months ago
pro-free-trial-popup.js
7 months ago
pro-free-trial-popup.min.js
7 months ago
pro-free-trial-popup.strings.js
5 months ago
pro-install-events.js
7 months ago
pro-install-events.min.js
7 months ago
pro-install-events.strings.js
5 months ago
progress.0ea083b809812c0e3aa1.bundle.min.js
7 months ago
progress.b1057ba870016558bce1.bundle.js
5 months ago
responsive-bar.js
7 months ago
responsive-bar.min.js
7 months ago
responsive-bar.strings.js
5 months ago
section-editor-handlers.53ffedef32043348b99b.bundle.min.js
7 months ago
section-editor-handlers.d65899d232b5339510d7.bundle.js
5 months ago
section-frontend-handlers.c3950c6b190ca134bc8d.bundle.js
5 months ago
section-frontend-handlers.d85ab872da118940910d.bundle.min.js
7 months ago
shared-editor-handlers.3023894100138e442ab0.bundle.js
4 months ago
shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js
4 months ago
shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js
7 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
5 months ago
styleguide-app-initiator.js
5 months ago
styleguide-app-initiator.min.js
5 months ago
styleguide-app-initiator.min.js.LICENSE.txt
9 months ago
styleguide-app-initiator.strings.js
5 months ago
styleguide-app.04340244193733d78622.bundle.min.js
7 months ago
styleguide-app.36ecabae74d9b87fc5a8.bundle.js
5 months ago
styleguide.js
7 months ago
styleguide.min.js
7 months ago
styleguide.strings.js
3 months ago
tabs-handler.js
2 weeks ago
tabs-handler.min.js
2 weeks ago
tabs-preview-handler.js
2 weeks ago
tabs-preview-handler.min.js
2 weeks ago
tabs.18344b05d8d1ea0702bc.bundle.min.js
7 months ago
tabs.40498fa771d612162c53.bundle.js
5 months ago
text-editor.0c9960167105139d27c9.bundle.js
5 months ago
text-editor.45609661e409413f1cef.bundle.min.js
7 months ago
text-path.6db73cc0a10a70f128eb.bundle.js
3 months ago
text-path.a67c1f3a78d208bc7e1b.bundle.min.js
3 months ago
toggle.2a177a3ef4785d3dfbc5.bundle.min.js
7 months ago
toggle.b75e66d2aca6f6ee742e.bundle.js
5 months ago
video.6e96510afa701d1f2ebc.bundle.js
5 months ago
video.86d44e46e43d0807e708.bundle.min.js
7 months ago
web-cli.js
5 months ago
web-cli.min.js
5 months ago
web-cli.min.js.LICENSE.txt
9 months ago
web-cli.strings.js
5 months ago
webpack.runtime.js
2 weeks ago
webpack.runtime.min.js
2 weeks ago
wp-audio.0ba9114964acf4c37ca2.bundle.js
5 months ago
wp-audio.c9624cb6e5dc9de86abd.bundle.min.js
7 months ago
youtube-handler.js
5 months ago
youtube-handler.min.js
5 months ago
admin.js
4322 lines
| 1 | /******/ (() => { // webpackBootstrap |
| 2 | /******/ var __webpack_modules__ = ({ |
| 3 | |
| 4 | /***/ "../app/assets/js/event-track/dashboard/action-controls.js": |
| 5 | /*!*****************************************************************!*\ |
| 6 | !*** ../app/assets/js/event-track/dashboard/action-controls.js ***! |
| 7 | \*****************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | |
| 10 | "use strict"; |
| 11 | |
| 12 | |
| 13 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 14 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 15 | Object.defineProperty(exports, "__esModule", ({ |
| 16 | value: true |
| 17 | })); |
| 18 | exports["default"] = void 0; |
| 19 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 20 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 21 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 22 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 23 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 24 | var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 25 | var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); |
| 26 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 27 | function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 28 | function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } |
| 29 | function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } |
| 30 | function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } |
| 31 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 32 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 33 | var EXCLUDED_SELECTORS = { |
| 34 | ADMIN_MENU: '#adminmenu', |
| 35 | TOP_BAR: '.e-admin-top-bar', |
| 36 | TOP_BAR_EDITOR_ONE: '#editor-one-top-bar', |
| 37 | WP_ADMIN_BAR: '#wpadminbar', |
| 38 | SUBMENU: '.wp-submenu', |
| 39 | PROMO_PAGE: '.e-feature-promotion', |
| 40 | PROMO_BLANK_STATE: '.elementor-blank_state', |
| 41 | APP: '.e-app', |
| 42 | SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation', |
| 43 | FLYOUT_MENU: '.elementor-submenu-flyout' |
| 44 | }; |
| 45 | var ActionControlTracking = /*#__PURE__*/function (_BaseTracking) { |
| 46 | function ActionControlTracking() { |
| 47 | (0, _classCallCheck2.default)(this, ActionControlTracking); |
| 48 | return _callSuper(this, ActionControlTracking, arguments); |
| 49 | } |
| 50 | (0, _inherits2.default)(ActionControlTracking, _BaseTracking); |
| 51 | return (0, _createClass2.default)(ActionControlTracking, null, [{ |
| 52 | key: "init", |
| 53 | value: function init() { |
| 54 | if (!_utils.DashboardUtils.isElementorPage()) { |
| 55 | return; |
| 56 | } |
| 57 | this.attachDelegatedHandlers(); |
| 58 | this.addTrackingAttributesToFilterButtons(); |
| 59 | this.initializeLinkDataIds(); |
| 60 | } |
| 61 | }, { |
| 62 | key: "initializeLinkDataIds", |
| 63 | value: function initializeLinkDataIds() { |
| 64 | var _this = this; |
| 65 | var initializeLinks = function initializeLinks() { |
| 66 | var links = document.querySelectorAll('a[href]'); |
| 67 | links.forEach(function (link) { |
| 68 | if (_this.isExcludedElement(link) || _this.isNavigationLink(link) || link.hasAttribute('data-id')) { |
| 69 | return; |
| 70 | } |
| 71 | var href = link.getAttribute('href'); |
| 72 | if (!href) { |
| 73 | return; |
| 74 | } |
| 75 | var cleanedHref = _this.removeNonceFromUrl(href); |
| 76 | if (cleanedHref) { |
| 77 | link.setAttribute('data-id', cleanedHref); |
| 78 | } |
| 79 | }); |
| 80 | }; |
| 81 | if ('loading' === document.readyState) { |
| 82 | document.addEventListener('DOMContentLoaded', initializeLinks); |
| 83 | } else { |
| 84 | initializeLinks(); |
| 85 | } |
| 86 | } |
| 87 | }, { |
| 88 | key: "addTrackingAttributesToFilterButtons", |
| 89 | value: function addTrackingAttributesToFilterButtons() { |
| 90 | var body = document.body; |
| 91 | if (!body) { |
| 92 | return; |
| 93 | } |
| 94 | var screenPrefix = ''; |
| 95 | switch (true) { |
| 96 | case body.classList.contains('post-type-elementor_library'): |
| 97 | screenPrefix = 'elementor_library-library'; |
| 98 | break; |
| 99 | case body.classList.contains('post-type-e-floating-buttons'): |
| 100 | screenPrefix = 'e-floating-buttons'; |
| 101 | break; |
| 102 | default: |
| 103 | return; |
| 104 | } |
| 105 | var addDataIdToListTableButtons = function addDataIdToListTableButtons() { |
| 106 | var buttonConfigs = [{ |
| 107 | id: 'post-query-submit', |
| 108 | suffix: 'filter' |
| 109 | }, { |
| 110 | id: 'search-submit', |
| 111 | suffix: 'search' |
| 112 | }, { |
| 113 | id: 'doaction', |
| 114 | suffix: 'apply' |
| 115 | }, { |
| 116 | id: 'doaction2', |
| 117 | suffix: 'apply-bottom' |
| 118 | }]; |
| 119 | buttonConfigs.forEach(function (config) { |
| 120 | var button = document.getElementById(config.id); |
| 121 | if (!button || button.hasAttribute('data-id')) { |
| 122 | return; |
| 123 | } |
| 124 | button.setAttribute('data-id', "".concat(screenPrefix, "-button-").concat(config.suffix)); |
| 125 | }); |
| 126 | }; |
| 127 | if ('loading' === document.readyState) { |
| 128 | document.addEventListener('DOMContentLoaded', addDataIdToListTableButtons); |
| 129 | } else { |
| 130 | addDataIdToListTableButtons(); |
| 131 | } |
| 132 | } |
| 133 | }, { |
| 134 | key: "isExcludedElement", |
| 135 | value: function isExcludedElement(element) { |
| 136 | for (var _i = 0, _Object$values = Object.values(EXCLUDED_SELECTORS); _i < _Object$values.length; _i++) { |
| 137 | var selector = _Object$values[_i]; |
| 138 | if (element.closest(selector)) { |
| 139 | return true; |
| 140 | } |
| 141 | } |
| 142 | if (element.classList.contains('go-pro')) { |
| 143 | return true; |
| 144 | } |
| 145 | return false; |
| 146 | } |
| 147 | }, { |
| 148 | key: "attachDelegatedHandlers", |
| 149 | value: function attachDelegatedHandlers() { |
| 150 | var _this2 = this; |
| 151 | var FILTER_BUTTON_IDS = ['search-submit', 'post-query-submit']; |
| 152 | this.addEventListenerTracked(document, 'click', function (event) { |
| 153 | var _event$target; |
| 154 | var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.parentElement; |
| 155 | if (!base) { |
| 156 | return; |
| 157 | } |
| 158 | var toggle = base.closest('.elementor-role-toggle'); |
| 159 | if (toggle && !_this2.isExcludedElement(toggle)) { |
| 160 | _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); |
| 161 | return; |
| 162 | } |
| 163 | var button = base.closest('button, input[type="submit"], input[type="button"], .button, .e-btn'); |
| 164 | if (button && !_this2.isExcludedElement(button)) { |
| 165 | if (FILTER_BUTTON_IDS.includes(button.id)) { |
| 166 | _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.FILTER); |
| 167 | return; |
| 168 | } |
| 169 | _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.BUTTON); |
| 170 | return; |
| 171 | } |
| 172 | var link = base.closest('a'); |
| 173 | if (link && !_this2.isExcludedElement(link) && !_this2.isNavigationLink(link)) { |
| 174 | _this2.trackControl(link, _wpDashboardTracking.CONTROL_TYPES.LINK); |
| 175 | } |
| 176 | }, { |
| 177 | capture: false |
| 178 | }); |
| 179 | this.addEventListenerTracked(document, 'change', function (event) { |
| 180 | var _event$target2; |
| 181 | var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.parentElement; |
| 182 | if (!base) { |
| 183 | return; |
| 184 | } |
| 185 | var toggle = null; |
| 186 | if (_wpDashboardTracking.default.isEditorOneActive()) { |
| 187 | toggle = base.closest('.MuiSwitch-switchBase'); |
| 188 | } else { |
| 189 | toggle = base.closest('.components-toggle-control'); |
| 190 | } |
| 191 | if (toggle && !_this2.isExcludedElement(toggle)) { |
| 192 | _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); |
| 193 | return; |
| 194 | } |
| 195 | var checkbox = base.closest('input[type="checkbox"]'); |
| 196 | if (checkbox && !_this2.isExcludedElement(checkbox)) { |
| 197 | _this2.trackControl(checkbox, _wpDashboardTracking.CONTROL_TYPES.CHECKBOX); |
| 198 | return; |
| 199 | } |
| 200 | var radio = base.closest('input[type="radio"]'); |
| 201 | if (radio && !_this2.isExcludedElement(radio)) { |
| 202 | _this2.trackControl(radio, _wpDashboardTracking.CONTROL_TYPES.RADIO); |
| 203 | return; |
| 204 | } |
| 205 | var select = base.closest('select'); |
| 206 | if (select && !_this2.isExcludedElement(select)) { |
| 207 | _this2.trackControl(select, _wpDashboardTracking.CONTROL_TYPES.SELECT); |
| 208 | } |
| 209 | }); |
| 210 | } |
| 211 | }, { |
| 212 | key: "isNavigationLink", |
| 213 | value: function isNavigationLink(link) { |
| 214 | var href = link.getAttribute('href'); |
| 215 | if (!href) { |
| 216 | return false; |
| 217 | } |
| 218 | if (href.startsWith('#') && href.includes('tab')) { |
| 219 | return true; |
| 220 | } |
| 221 | if (link.classList.contains('nav-tab')) { |
| 222 | return true; |
| 223 | } |
| 224 | var isInNavigation = link.closest('.wp-submenu, #adminmenu, .e-admin-top-bar, #wpadminbar'); |
| 225 | return !!isInNavigation; |
| 226 | } |
| 227 | }, { |
| 228 | key: "trackControl", |
| 229 | value: function trackControl(element, controlType) { |
| 230 | var controlIdentifier = this.extractControlIdentifier(element, controlType); |
| 231 | if (!controlIdentifier) { |
| 232 | return; |
| 233 | } |
| 234 | _wpDashboardTracking.default.trackActionControl(controlIdentifier, controlType); |
| 235 | } |
| 236 | }, { |
| 237 | key: "extractControlIdentifier", |
| 238 | value: function extractControlIdentifier(element, controlType) { |
| 239 | if (_wpDashboardTracking.CONTROL_TYPES.RADIO === controlType) { |
| 240 | var name = element.getAttribute('name'); |
| 241 | var value = element.value || element.getAttribute('value'); |
| 242 | if (name && value) { |
| 243 | return "".concat(name, "-").concat(value); |
| 244 | } |
| 245 | if (name) { |
| 246 | return name; |
| 247 | } |
| 248 | } |
| 249 | if (_wpDashboardTracking.CONTROL_TYPES.SELECT === controlType) { |
| 250 | var _name = element.getAttribute('name'); |
| 251 | if (_name) { |
| 252 | return _name; |
| 253 | } |
| 254 | } |
| 255 | if (_wpDashboardTracking.CONTROL_TYPES.CHECKBOX === controlType) { |
| 256 | var _name2 = element.getAttribute('name'); |
| 257 | if (_name2) { |
| 258 | var checkboxesWithSameName = document.querySelectorAll("input[type=\"checkbox\"][name=\"".concat(CSS.escape(_name2), "\"]")); |
| 259 | if (checkboxesWithSameName.length > 1) { |
| 260 | var _value = element.value || element.getAttribute('value'); |
| 261 | if (_value) { |
| 262 | return "".concat(_name2, "-").concat(_value); |
| 263 | } |
| 264 | } |
| 265 | return _name2; |
| 266 | } |
| 267 | } |
| 268 | if (_wpDashboardTracking.CONTROL_TYPES.LINK === controlType) { |
| 269 | var dataId = element.getAttribute('data-id'); |
| 270 | if (dataId) { |
| 271 | return dataId; |
| 272 | } |
| 273 | var href = element.getAttribute('href'); |
| 274 | if (href) { |
| 275 | return this.removeNonceFromUrl(href); |
| 276 | } |
| 277 | } |
| 278 | if (_wpDashboardTracking.CONTROL_TYPES.BUTTON === controlType || _wpDashboardTracking.CONTROL_TYPES.TOGGLE === controlType || _wpDashboardTracking.CONTROL_TYPES.FILTER === controlType) { |
| 279 | var _dataId = element.getAttribute('data-id'); |
| 280 | if (_dataId) { |
| 281 | return _dataId; |
| 282 | } |
| 283 | var classIdMatch = this.extractClassId(element); |
| 284 | if (classIdMatch) { |
| 285 | return classIdMatch; |
| 286 | } |
| 287 | } |
| 288 | return ''; |
| 289 | } |
| 290 | }, { |
| 291 | key: "extractClassId", |
| 292 | value: function extractClassId(element) { |
| 293 | var classes = element.className; |
| 294 | if (!classes || 'string' !== typeof classes) { |
| 295 | return ''; |
| 296 | } |
| 297 | var classList = classes.split(' '); |
| 298 | var _iterator = _createForOfIteratorHelper(classList), |
| 299 | _step; |
| 300 | try { |
| 301 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 302 | var cls = _step.value; |
| 303 | if (cls.startsWith('e-id-')) { |
| 304 | return cls.substring(5); |
| 305 | } |
| 306 | } |
| 307 | } catch (err) { |
| 308 | _iterator.e(err); |
| 309 | } finally { |
| 310 | _iterator.f(); |
| 311 | } |
| 312 | return ''; |
| 313 | } |
| 314 | }, { |
| 315 | key: "removeNonceFromUrl", |
| 316 | value: function removeNonceFromUrl(url) { |
| 317 | try { |
| 318 | var urlObj = new URL(url, window.location.origin); |
| 319 | urlObj.searchParams.delete('_wpnonce'); |
| 320 | var postParam = urlObj.searchParams.get('post'); |
| 321 | if (postParam !== null && /^[0-9]+$/.test(postParam)) { |
| 322 | urlObj.searchParams.delete('post'); |
| 323 | } |
| 324 | return urlObj.pathname + urlObj.search + urlObj.hash; |
| 325 | } catch (e) { |
| 326 | return url; |
| 327 | } |
| 328 | } |
| 329 | }]); |
| 330 | }(_baseTracking.default); |
| 331 | var _default = exports["default"] = ActionControlTracking; |
| 332 | |
| 333 | /***/ }), |
| 334 | |
| 335 | /***/ "../app/assets/js/event-track/dashboard/base-tracking.js": |
| 336 | /*!***************************************************************!*\ |
| 337 | !*** ../app/assets/js/event-track/dashboard/base-tracking.js ***! |
| 338 | \***************************************************************/ |
| 339 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 340 | |
| 341 | "use strict"; |
| 342 | |
| 343 | |
| 344 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 345 | Object.defineProperty(exports, "__esModule", ({ |
| 346 | value: true |
| 347 | })); |
| 348 | exports["default"] = void 0; |
| 349 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 350 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 351 | var BaseTracking = /*#__PURE__*/function () { |
| 352 | function BaseTracking() { |
| 353 | (0, _classCallCheck2.default)(this, BaseTracking); |
| 354 | } |
| 355 | return (0, _createClass2.default)(BaseTracking, null, [{ |
| 356 | key: "ensureOwnArrays", |
| 357 | value: function ensureOwnArrays() { |
| 358 | if (!Object.prototype.hasOwnProperty.call(this, 'observers')) { |
| 359 | this.observers = []; |
| 360 | } |
| 361 | if (!Object.prototype.hasOwnProperty.call(this, 'eventListeners')) { |
| 362 | this.eventListeners = []; |
| 363 | } |
| 364 | } |
| 365 | }, { |
| 366 | key: "destroy", |
| 367 | value: function destroy() { |
| 368 | this.ensureOwnArrays(); |
| 369 | this.observers.forEach(function (observer) { |
| 370 | return observer.disconnect(); |
| 371 | }); |
| 372 | this.observers = []; |
| 373 | this.eventListeners.forEach(function (_ref) { |
| 374 | var target = _ref.target, |
| 375 | type = _ref.type, |
| 376 | handler = _ref.handler, |
| 377 | options = _ref.options; |
| 378 | target.removeEventListener(type, handler, options); |
| 379 | }); |
| 380 | this.eventListeners = []; |
| 381 | } |
| 382 | }, { |
| 383 | key: "addObserver", |
| 384 | value: function addObserver(target, options, callback) { |
| 385 | this.ensureOwnArrays(); |
| 386 | var observer = new MutationObserver(callback); |
| 387 | observer.observe(target, options); |
| 388 | this.observers.push(observer); |
| 389 | return observer; |
| 390 | } |
| 391 | }, { |
| 392 | key: "addEventListenerTracked", |
| 393 | value: function addEventListenerTracked(target, type, handler) { |
| 394 | var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; |
| 395 | this.ensureOwnArrays(); |
| 396 | target.addEventListener(type, handler, options); |
| 397 | this.eventListeners.push({ |
| 398 | target: target, |
| 399 | type: type, |
| 400 | handler: handler, |
| 401 | options: options |
| 402 | }); |
| 403 | } |
| 404 | }]); |
| 405 | }(); |
| 406 | var _default = exports["default"] = BaseTracking; |
| 407 | |
| 408 | /***/ }), |
| 409 | |
| 410 | /***/ "../app/assets/js/event-track/dashboard/menu-promotion.js": |
| 411 | /*!****************************************************************!*\ |
| 412 | !*** ../app/assets/js/event-track/dashboard/menu-promotion.js ***! |
| 413 | \****************************************************************/ |
| 414 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 415 | |
| 416 | "use strict"; |
| 417 | |
| 418 | |
| 419 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 420 | Object.defineProperty(exports, "__esModule", ({ |
| 421 | value: true |
| 422 | })); |
| 423 | exports["default"] = void 0; |
| 424 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 425 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 426 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 427 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 428 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 429 | var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 430 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 431 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 432 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 433 | var PROMO_MENU_ITEMS = { |
| 434 | go_elementor_pro: 'Upgrade' |
| 435 | }; |
| 436 | var MenuPromotionTracking = /*#__PURE__*/function (_BaseTracking) { |
| 437 | function MenuPromotionTracking() { |
| 438 | (0, _classCallCheck2.default)(this, MenuPromotionTracking); |
| 439 | return _callSuper(this, MenuPromotionTracking, arguments); |
| 440 | } |
| 441 | (0, _inherits2.default)(MenuPromotionTracking, _BaseTracking); |
| 442 | return (0, _createClass2.default)(MenuPromotionTracking, null, [{ |
| 443 | key: "init", |
| 444 | value: function init() { |
| 445 | this.attachDelegatedTracking(); |
| 446 | } |
| 447 | }, { |
| 448 | key: "attachDelegatedTracking", |
| 449 | value: function attachDelegatedTracking() { |
| 450 | var _this = this; |
| 451 | this.addEventListenerTracked(document, 'click', function (event) { |
| 452 | var target = event.target; |
| 453 | if (!target) { |
| 454 | return; |
| 455 | } |
| 456 | var link = target.closest('a'); |
| 457 | if (!link) { |
| 458 | return; |
| 459 | } |
| 460 | var href = link.getAttribute('href'); |
| 461 | if (!href) { |
| 462 | return; |
| 463 | } |
| 464 | var menuItemKey = _this.extractPromoMenuKey(href); |
| 465 | if (!menuItemKey) { |
| 466 | return; |
| 467 | } |
| 468 | _this.handleMenuPromoClick(link, menuItemKey); |
| 469 | }, { |
| 470 | capture: true |
| 471 | }); |
| 472 | } |
| 473 | }, { |
| 474 | key: "extractPromoMenuKey", |
| 475 | value: function extractPromoMenuKey(href) { |
| 476 | for (var _i = 0, _Object$keys = Object.keys(PROMO_MENU_ITEMS); _i < _Object$keys.length; _i++) { |
| 477 | var menuItemKey = _Object$keys[_i]; |
| 478 | if (href.includes("page=".concat(menuItemKey))) { |
| 479 | return menuItemKey; |
| 480 | } |
| 481 | } |
| 482 | return null; |
| 483 | } |
| 484 | }, { |
| 485 | key: "handleMenuPromoClick", |
| 486 | value: function handleMenuPromoClick(menuItem, menuItemKey) { |
| 487 | var destination = menuItem.getAttribute('href'); |
| 488 | var promoName = PROMO_MENU_ITEMS[menuItemKey]; |
| 489 | var path = menuItemKey.replace('elementor_', '').replace(/_/g, '/'); |
| 490 | _wpDashboardTracking.default.trackPromoClicked(promoName, destination, path); |
| 491 | } |
| 492 | }]); |
| 493 | }(_baseTracking.default); |
| 494 | var _default = exports["default"] = MenuPromotionTracking; |
| 495 | |
| 496 | /***/ }), |
| 497 | |
| 498 | /***/ "../app/assets/js/event-track/dashboard/navigation.js": |
| 499 | /*!************************************************************!*\ |
| 500 | !*** ../app/assets/js/event-track/dashboard/navigation.js ***! |
| 501 | \************************************************************/ |
| 502 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 503 | |
| 504 | "use strict"; |
| 505 | |
| 506 | |
| 507 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 508 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 509 | Object.defineProperty(exports, "__esModule", ({ |
| 510 | value: true |
| 511 | })); |
| 512 | exports["default"] = void 0; |
| 513 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 514 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 515 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 516 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 517 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 518 | var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 519 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 520 | function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 521 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 522 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 523 | var ELEMENTOR_MENU_SELECTORS = { |
| 524 | ELEMENTOR_TOP_LEVEL: 'li#toplevel_page_elementor', |
| 525 | TEMPLATES_TOP_LEVEL: 'li#menu-posts-elementor_library', |
| 526 | ELEMENTOR_HOME_TOP_LEVEL: 'li#toplevel_page_elementor-home', |
| 527 | ADMIN_MENU: '#adminmenu', |
| 528 | TOP_LEVEL_LINK: '.wp-menu-name', |
| 529 | SUBMENU_CONTAINER: '.wp-submenu', |
| 530 | SUBMENU_ITEM: '.wp-submenu li a', |
| 531 | SUBMENU_ITEM_TOP_LEVEL: '.wp-has-submenu', |
| 532 | SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation' |
| 533 | }; |
| 534 | var NavigationTracking = /*#__PURE__*/function (_BaseTracking) { |
| 535 | function NavigationTracking() { |
| 536 | (0, _classCallCheck2.default)(this, NavigationTracking); |
| 537 | return _callSuper(this, NavigationTracking, arguments); |
| 538 | } |
| 539 | (0, _inherits2.default)(NavigationTracking, _BaseTracking); |
| 540 | return (0, _createClass2.default)(NavigationTracking, null, [{ |
| 541 | key: "init", |
| 542 | value: function init() { |
| 543 | if (_wpDashboardTracking.default.isEditorOneActive()) { |
| 544 | this.attachSidebarNavigationTracking(); |
| 545 | this.attachElementorHomeMenuTracking(); |
| 546 | } else { |
| 547 | this.attachElementorMenuTracking(); |
| 548 | this.attachTemplatesMenuTracking(); |
| 549 | } |
| 550 | } |
| 551 | }, { |
| 552 | key: "attachTemplatesMenuTracking", |
| 553 | value: function attachTemplatesMenuTracking() { |
| 554 | var templatesMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.TEMPLATES_TOP_LEVEL); |
| 555 | if (!templatesMenu) { |
| 556 | return; |
| 557 | } |
| 558 | this.attachMenuTracking(templatesMenu, 'Templates'); |
| 559 | } |
| 560 | }, { |
| 561 | key: "attachElementorHomeMenuTracking", |
| 562 | value: function attachElementorHomeMenuTracking() { |
| 563 | var elementorHomeMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_HOME_TOP_LEVEL); |
| 564 | if (!elementorHomeMenu) { |
| 565 | return; |
| 566 | } |
| 567 | this.attachMenuTracking(elementorHomeMenu, 'Elementor'); |
| 568 | } |
| 569 | }, { |
| 570 | key: "attachElementorMenuTracking", |
| 571 | value: function attachElementorMenuTracking() { |
| 572 | var elementorMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_TOP_LEVEL); |
| 573 | if (!elementorMenu) { |
| 574 | return; |
| 575 | } |
| 576 | this.attachMenuTracking(elementorMenu, 'Elementor'); |
| 577 | } |
| 578 | }, { |
| 579 | key: "attachSidebarNavigationTracking", |
| 580 | value: function attachSidebarNavigationTracking() { |
| 581 | var sidebar = document.querySelector(ELEMENTOR_MENU_SELECTORS.SIDEBAR_NAVIGATION); |
| 582 | if (sidebar) { |
| 583 | this.attachSidebarClickListener(sidebar); |
| 584 | } |
| 585 | } |
| 586 | }, { |
| 587 | key: "attachSidebarClickListener", |
| 588 | value: function attachSidebarClickListener(sidebar) { |
| 589 | var _this = this; |
| 590 | this.addEventListenerTracked(sidebar, 'click', function (event) { |
| 591 | _this.handleSidebarClick(event); |
| 592 | }, { |
| 593 | capture: true |
| 594 | }); |
| 595 | } |
| 596 | }, { |
| 597 | key: "attachMenuTracking", |
| 598 | value: function attachMenuTracking(menuElement, menuName) { |
| 599 | var _this2 = this; |
| 600 | this.addEventListenerTracked(menuElement, 'click', function (event) { |
| 601 | _this2.handleMenuClick(event, menuName); |
| 602 | }); |
| 603 | } |
| 604 | }, { |
| 605 | key: "handleMenuClick", |
| 606 | value: function handleMenuClick(event, menuName) { |
| 607 | var link = event.target.closest('a'); |
| 608 | if (!link) { |
| 609 | return; |
| 610 | } |
| 611 | var isTopLevel = link.classList.contains('menu-top'); |
| 612 | var itemId = this.extractItemId(link); |
| 613 | var area = this.determineNavArea(link); |
| 614 | _wpDashboardTracking.default.trackNavClicked(itemId, isTopLevel ? null : menuName, area); |
| 615 | } |
| 616 | }, { |
| 617 | key: "handleSidebarClick", |
| 618 | value: function handleSidebarClick(event) { |
| 619 | var clickedElement = event.target.closest('a, button, [role="button"]'); |
| 620 | if (!clickedElement) { |
| 621 | return; |
| 622 | } |
| 623 | var itemId = this.extractSidebarItemId(clickedElement); |
| 624 | _wpDashboardTracking.default.trackNavClicked(itemId, null, _wpDashboardTracking.NAV_AREAS.SIDEBAR_MENU); |
| 625 | } |
| 626 | }, { |
| 627 | key: "extractSidebarItemId", |
| 628 | value: function extractSidebarItemId(element) { |
| 629 | var paragraph = element.querySelector('p'); |
| 630 | if (paragraph) { |
| 631 | return paragraph.textContent.trim(); |
| 632 | } |
| 633 | var textContent = element.textContent.trim(); |
| 634 | if (textContent) { |
| 635 | return textContent; |
| 636 | } |
| 637 | return 'unknown'; |
| 638 | } |
| 639 | }, { |
| 640 | key: "extractPageFromUrl", |
| 641 | value: function extractPageFromUrl(href) { |
| 642 | var urlParams = new URLSearchParams(href.split('?')[1] || ''); |
| 643 | var page = urlParams.get('page'); |
| 644 | if (page) { |
| 645 | return page; |
| 646 | } |
| 647 | var postType = urlParams.get('post_type'); |
| 648 | if (postType) { |
| 649 | return postType; |
| 650 | } |
| 651 | return 'unknown'; |
| 652 | } |
| 653 | }, { |
| 654 | key: "extractItemId", |
| 655 | value: function extractItemId(link) { |
| 656 | var textContent = link.textContent.trim(); |
| 657 | if (textContent) { |
| 658 | return textContent; |
| 659 | } |
| 660 | var href = link.getAttribute('href'); |
| 661 | if (href) { |
| 662 | return this.extractPageFromUrl(href); |
| 663 | } |
| 664 | var linkId = link.getAttribute('id'); |
| 665 | if (linkId) { |
| 666 | return linkId; |
| 667 | } |
| 668 | return 'unknown'; |
| 669 | } |
| 670 | }, { |
| 671 | key: "determineNavArea", |
| 672 | value: function determineNavArea(link) { |
| 673 | var parentMenu = link.closest('li.menu-top'); |
| 674 | if (parentMenu) { |
| 675 | var isSubmenuItem = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_CONTAINER); |
| 676 | if (isSubmenuItem) { |
| 677 | var submenuElement = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_ITEM_TOP_LEVEL); |
| 678 | if (submenuElement.classList.contains('wp-not-current-submenu')) { |
| 679 | return _wpDashboardTracking.NAV_AREAS.HOVER_MENU; |
| 680 | } |
| 681 | return _wpDashboardTracking.NAV_AREAS.SUBMENU; |
| 682 | } |
| 683 | return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; |
| 684 | } |
| 685 | return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; |
| 686 | } |
| 687 | }]); |
| 688 | }(_baseTracking.default); |
| 689 | var _default = exports["default"] = NavigationTracking; |
| 690 | |
| 691 | /***/ }), |
| 692 | |
| 693 | /***/ "../app/assets/js/event-track/dashboard/plugin-actions.js": |
| 694 | /*!****************************************************************!*\ |
| 695 | !*** ../app/assets/js/event-track/dashboard/plugin-actions.js ***! |
| 696 | \****************************************************************/ |
| 697 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 698 | |
| 699 | "use strict"; |
| 700 | |
| 701 | |
| 702 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 703 | Object.defineProperty(exports, "__esModule", ({ |
| 704 | value: true |
| 705 | })); |
| 706 | exports["default"] = void 0; |
| 707 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 708 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 709 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 710 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 711 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 712 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 713 | var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 714 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 715 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 716 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 717 | var PLUGIN_TYPE = { |
| 718 | ELEMENTOR: 'core', |
| 719 | ELEMENTOR_PRO: 'pro' |
| 720 | }; |
| 721 | var PluginActions = /*#__PURE__*/function (_BaseTracking) { |
| 722 | function PluginActions() { |
| 723 | (0, _classCallCheck2.default)(this, PluginActions); |
| 724 | return _callSuper(this, PluginActions, arguments); |
| 725 | } |
| 726 | (0, _inherits2.default)(PluginActions, _BaseTracking); |
| 727 | return (0, _createClass2.default)(PluginActions, null, [{ |
| 728 | key: "init", |
| 729 | value: function init() { |
| 730 | this.attachCoreDeactivationTracking(); |
| 731 | this.attachProDeactivationTracking(); |
| 732 | this.attachProDeletionTracking(); |
| 733 | } |
| 734 | }, { |
| 735 | key: "attachCoreDeactivationTracking", |
| 736 | value: function attachCoreDeactivationTracking() { |
| 737 | var _this = this; |
| 738 | var dialogForm = document.querySelector('#elementor-deactivate-feedback-dialog-form'); |
| 739 | if (!dialogForm) { |
| 740 | return; |
| 741 | } |
| 742 | this.addEventListenerTracked(dialogForm, 'change', function (event) { |
| 743 | var target = event.target; |
| 744 | if (target.classList.contains('elementor-deactivate-feedback-dialog-input')) { |
| 745 | _this.selectedReason = target.value; |
| 746 | } |
| 747 | }); |
| 748 | this.observeModalButtons(); |
| 749 | } |
| 750 | }, { |
| 751 | key: "attachProDeactivationTracking", |
| 752 | value: function attachProDeactivationTracking() { |
| 753 | var _this2 = this; |
| 754 | var pluginsTable = document.querySelector('.plugins'); |
| 755 | if (!pluginsTable) { |
| 756 | return; |
| 757 | } |
| 758 | this.addEventListenerTracked(pluginsTable, 'click', function (event) { |
| 759 | var link = event.target.closest('a'); |
| 760 | if (link && 'deactivate-elementor-pro' === link.id) { |
| 761 | _this2.trackProDeactivation(); |
| 762 | } |
| 763 | }, { |
| 764 | capture: true |
| 765 | }); |
| 766 | } |
| 767 | }, { |
| 768 | key: "observeModalButtons", |
| 769 | value: function observeModalButtons() { |
| 770 | var _this3 = this; |
| 771 | var checkAndAttachDelegation = function checkAndAttachDelegation() { |
| 772 | var modal = document.querySelector('#elementor-deactivate-feedback-modal'); |
| 773 | if (!modal) { |
| 774 | return false; |
| 775 | } |
| 776 | _this3.addEventListenerTracked(modal, 'click', function (event) { |
| 777 | var submitButton = event.target.closest('.dialog-submit'); |
| 778 | var skipButton = event.target.closest('.dialog-skip'); |
| 779 | if (submitButton) { |
| 780 | _this3.trackCoreDeactivation('submit&deactivate'); |
| 781 | } else if (skipButton) { |
| 782 | _this3.trackCoreDeactivation('skip&deactivate'); |
| 783 | } |
| 784 | }, { |
| 785 | capture: true |
| 786 | }); |
| 787 | return true; |
| 788 | }; |
| 789 | if (checkAndAttachDelegation()) { |
| 790 | return; |
| 791 | } |
| 792 | this.addObserver(document.body, { |
| 793 | childList: true, |
| 794 | subtree: true |
| 795 | }, function (mutations, observer) { |
| 796 | if (checkAndAttachDelegation()) { |
| 797 | observer.disconnect(); |
| 798 | } |
| 799 | }); |
| 800 | } |
| 801 | }, { |
| 802 | key: "getUserInput", |
| 803 | value: function getUserInput() { |
| 804 | var reasonsWithInput = ['found_a_better_plugin', 'other']; |
| 805 | if (!this.selectedReason || !reasonsWithInput.includes(this.selectedReason)) { |
| 806 | return null; |
| 807 | } |
| 808 | var inputField = document.querySelector("input[name=\"reason_".concat(this.selectedReason, "\"]")); |
| 809 | if (inputField && inputField.value) { |
| 810 | return inputField.value; |
| 811 | } |
| 812 | return null; |
| 813 | } |
| 814 | }, { |
| 815 | key: "trackCoreDeactivation", |
| 816 | value: function trackCoreDeactivation(action) { |
| 817 | var properties = { |
| 818 | deactivate_form_submit: action, |
| 819 | deactivate_plugin_type: PLUGIN_TYPE.ELEMENTOR |
| 820 | }; |
| 821 | if (this.selectedReason) { |
| 822 | properties.deactivate_feedback_reason = this.selectedReason; |
| 823 | } |
| 824 | var userInput = this.getUserInput(); |
| 825 | if (userInput) { |
| 826 | properties.deactivate_feedback_reason += "/".concat(userInput); |
| 827 | } |
| 828 | _wpDashboardTracking.default.dispatchEvent('wpdash_deactivate_plugin', properties, { |
| 829 | send_immediately: true |
| 830 | }); |
| 831 | } |
| 832 | }, { |
| 833 | key: "trackProDeactivation", |
| 834 | value: function trackProDeactivation() { |
| 835 | this.trackProAction('deactivate'); |
| 836 | } |
| 837 | }, { |
| 838 | key: "attachProDeletionTracking", |
| 839 | value: function attachProDeletionTracking() { |
| 840 | var _this4 = this; |
| 841 | if ('undefined' === typeof jQuery) { |
| 842 | return; |
| 843 | } |
| 844 | jQuery(document).on('wp-plugin-deleting', function (event, args) { |
| 845 | if ('elementor-pro' === (args === null || args === void 0 ? void 0 : args.slug)) { |
| 846 | _this4.trackProAction('delete'); |
| 847 | } |
| 848 | }); |
| 849 | } |
| 850 | }, { |
| 851 | key: "destroy", |
| 852 | value: function destroy() { |
| 853 | if ('undefined' !== typeof jQuery) { |
| 854 | jQuery(document).off('wp-plugin-deleting'); |
| 855 | } |
| 856 | _baseTracking.default.destroy.call(this); |
| 857 | } |
| 858 | }, { |
| 859 | key: "trackProAction", |
| 860 | value: function trackProAction(action) { |
| 861 | var eventMap = { |
| 862 | deactivate: { |
| 863 | eventName: 'wpdash_deactivate_plugin', |
| 864 | propertyKey: 'deactivate_plugin_type' |
| 865 | }, |
| 866 | delete: { |
| 867 | eventName: 'wpdash_delete_plugin', |
| 868 | propertyKey: 'plugin_delete' |
| 869 | } |
| 870 | }; |
| 871 | var config = eventMap[action]; |
| 872 | if (!config) { |
| 873 | return; |
| 874 | } |
| 875 | var properties = (0, _defineProperty2.default)({}, config.propertyKey, PLUGIN_TYPE.ELEMENTOR_PRO); |
| 876 | _wpDashboardTracking.default.dispatchEvent(config.eventName, properties, { |
| 877 | send_immediately: true |
| 878 | }); |
| 879 | } |
| 880 | }]); |
| 881 | }(_baseTracking.default); |
| 882 | (0, _defineProperty2.default)(PluginActions, "selectedReason", null); |
| 883 | var _default = exports["default"] = PluginActions; |
| 884 | |
| 885 | /***/ }), |
| 886 | |
| 887 | /***/ "../app/assets/js/event-track/dashboard/promotion.js": |
| 888 | /*!***********************************************************!*\ |
| 889 | !*** ../app/assets/js/event-track/dashboard/promotion.js ***! |
| 890 | \***********************************************************/ |
| 891 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 892 | |
| 893 | "use strict"; |
| 894 | |
| 895 | |
| 896 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 897 | Object.defineProperty(exports, "__esModule", ({ |
| 898 | value: true |
| 899 | })); |
| 900 | exports["default"] = void 0; |
| 901 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 902 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 903 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 904 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 905 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 906 | var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 907 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 908 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 909 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 910 | var PROMO_SELECTORS = { |
| 911 | PROMO_PAGE: '.e-feature-promotion, .elementor-settings-form-page, #elementor-element-manager-wrap', |
| 912 | PROMO_BLANK_STATE: '.elementor-blank_state', |
| 913 | CTA_BUTTON: '.go-pro', |
| 914 | TITLE: 'h3' |
| 915 | }; |
| 916 | var PromotionTracking = /*#__PURE__*/function (_BaseTracking) { |
| 917 | function PromotionTracking() { |
| 918 | (0, _classCallCheck2.default)(this, PromotionTracking); |
| 919 | return _callSuper(this, PromotionTracking, arguments); |
| 920 | } |
| 921 | (0, _inherits2.default)(PromotionTracking, _BaseTracking); |
| 922 | return (0, _createClass2.default)(PromotionTracking, null, [{ |
| 923 | key: "init", |
| 924 | value: function init() { |
| 925 | this.attachDelegatedTracking(); |
| 926 | } |
| 927 | }, { |
| 928 | key: "attachDelegatedTracking", |
| 929 | value: function attachDelegatedTracking() { |
| 930 | var _this = this; |
| 931 | this.addEventListenerTracked(document, 'click', function (event) { |
| 932 | var target = event.target; |
| 933 | if (!target) { |
| 934 | return; |
| 935 | } |
| 936 | var button = target.closest("a".concat(PROMO_SELECTORS.CTA_BUTTON)); |
| 937 | if (!button) { |
| 938 | return; |
| 939 | } |
| 940 | var promoPage = button.closest("".concat(PROMO_SELECTORS.PROMO_PAGE, ", ").concat(PROMO_SELECTORS.PROMO_BLANK_STATE)); |
| 941 | if (!promoPage) { |
| 942 | return; |
| 943 | } |
| 944 | _this.handlePromoClick(button, promoPage); |
| 945 | }, { |
| 946 | capture: true |
| 947 | }); |
| 948 | } |
| 949 | }, { |
| 950 | key: "handlePromoClick", |
| 951 | value: function handlePromoClick(button, promoPage) { |
| 952 | var promoTitle = this.extractPromoTitle(promoPage, button); |
| 953 | var destination = button.getAttribute('href'); |
| 954 | var path = this.extractPromoPath(); |
| 955 | _wpDashboardTracking.default.trackPromoClicked(promoTitle, destination, path); |
| 956 | } |
| 957 | }, { |
| 958 | key: "extractPromoTitle", |
| 959 | value: function extractPromoTitle(promoPage, button) { |
| 960 | var titleElement = promoPage.querySelector(PROMO_SELECTORS.TITLE); |
| 961 | return titleElement ? titleElement.textContent.trim() : button.textContent.trim(); |
| 962 | } |
| 963 | }, { |
| 964 | key: "extractPromoPath", |
| 965 | value: function extractPromoPath() { |
| 966 | var urlParams = new URLSearchParams(window.location.search); |
| 967 | var page = urlParams.get('page'); |
| 968 | if (!page) { |
| 969 | return 'elementor'; |
| 970 | } |
| 971 | return page.replace('elementor_', '').replace(/_/g, '/'); |
| 972 | } |
| 973 | }]); |
| 974 | }(_baseTracking.default); |
| 975 | var _default = exports["default"] = PromotionTracking; |
| 976 | |
| 977 | /***/ }), |
| 978 | |
| 979 | /***/ "../app/assets/js/event-track/dashboard/screen-view.js": |
| 980 | /*!*************************************************************!*\ |
| 981 | !*** ../app/assets/js/event-track/dashboard/screen-view.js ***! |
| 982 | \*************************************************************/ |
| 983 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 984 | |
| 985 | "use strict"; |
| 986 | |
| 987 | |
| 988 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 989 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 990 | Object.defineProperty(exports, "__esModule", ({ |
| 991 | value: true |
| 992 | })); |
| 993 | exports["default"] = void 0; |
| 994 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 995 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 996 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 997 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 998 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 999 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1000 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1001 | var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 1002 | var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); |
| 1003 | var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); |
| 1004 | function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 1005 | function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } |
| 1006 | function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } |
| 1007 | function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } |
| 1008 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1009 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1010 | function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 1011 | var SCREEN_SELECTORS = { |
| 1012 | NAV_TAB_WRAPPER: '.nav-tab-wrapper', |
| 1013 | NAV_TAB: '.nav-tab', |
| 1014 | NAV_TAB_ACTIVE: '.nav-tab-active', |
| 1015 | SETTINGS_FORM_PAGE: '.elementor-settings-form-page', |
| 1016 | SETTINGS_FORM_PAGE_ACTIVE: '.elementor-settings-form-page.elementor-active', |
| 1017 | FLOATING_ELEMENTS_MODAL: '#elementor-new-floating-elements-modal', |
| 1018 | TEMPLATE_DIALOG_MODAL: '#elementor-new-template-dialog-content' |
| 1019 | }; |
| 1020 | var TRACKED_MODALS = [SCREEN_SELECTORS.FLOATING_ELEMENTS_MODAL, SCREEN_SELECTORS.TEMPLATE_DIALOG_MODAL]; |
| 1021 | var ScreenViewTracking = /*#__PURE__*/function (_BaseTracking) { |
| 1022 | function ScreenViewTracking() { |
| 1023 | (0, _classCallCheck2.default)(this, ScreenViewTracking); |
| 1024 | return _callSuper(this, ScreenViewTracking, arguments); |
| 1025 | } |
| 1026 | (0, _inherits2.default)(ScreenViewTracking, _BaseTracking); |
| 1027 | return (0, _createClass2.default)(ScreenViewTracking, null, [{ |
| 1028 | key: "init", |
| 1029 | value: function init() { |
| 1030 | if (!_utils.DashboardUtils.isElementorPage()) { |
| 1031 | return; |
| 1032 | } |
| 1033 | var screenData = this.getScreenData(); |
| 1034 | if (screenData) { |
| 1035 | this.trackScreen(screenData.screenId, screenData.screenType); |
| 1036 | } |
| 1037 | this.attachTabChangeTracking(); |
| 1038 | } |
| 1039 | }, { |
| 1040 | key: "destroy", |
| 1041 | value: function destroy() { |
| 1042 | _superPropGet(ScreenViewTracking, "destroy", this, 2)([]); |
| 1043 | this.trackedScreens.clear(); |
| 1044 | } |
| 1045 | }, { |
| 1046 | key: "getScreenData", |
| 1047 | value: function getScreenData() { |
| 1048 | var urlParams = new URLSearchParams(window.location.search); |
| 1049 | var page = urlParams.get('page'); |
| 1050 | var postType = urlParams.get('post_type'); |
| 1051 | var hash = window.location.hash; |
| 1052 | var screenId = ''; |
| 1053 | var screenType = ''; |
| 1054 | if (page) { |
| 1055 | screenId = page; |
| 1056 | } else if (postType) { |
| 1057 | screenId = postType; |
| 1058 | } else { |
| 1059 | screenId = this.getScreenIdFromBody(); |
| 1060 | } |
| 1061 | if (this.isElementorAppPage()) { |
| 1062 | var appScreenData = this.getAppScreenData(hash); |
| 1063 | if (appScreenData) { |
| 1064 | return appScreenData; |
| 1065 | } |
| 1066 | } |
| 1067 | var hasNavTabs = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); |
| 1068 | var hasSettingsTabs = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE).length > 1; |
| 1069 | if (hasNavTabs || hasSettingsTabs || hash && !this.isElementorAppPage()) { |
| 1070 | screenType = _wpDashboardTracking.SCREEN_TYPES.TAB; |
| 1071 | if (hash) { |
| 1072 | var tabId = hash.replace(/^#(tab-)?/, ''); |
| 1073 | screenId = "".concat(screenId, "-").concat(tabId); |
| 1074 | } else if (hasNavTabs) { |
| 1075 | var activeTab = document.querySelector(SCREEN_SELECTORS.NAV_TAB_ACTIVE); |
| 1076 | if (activeTab) { |
| 1077 | var tabText = activeTab.textContent.trim(); |
| 1078 | var tabHref = activeTab.getAttribute('href'); |
| 1079 | if (tabText) { |
| 1080 | screenId = "".concat(screenId, "-").concat(this.sanitizeScreenId(tabText)); |
| 1081 | } else if (tabHref && tabHref.includes('#')) { |
| 1082 | var _tabId = tabHref.split('#')[1]; |
| 1083 | screenId = "".concat(screenId, "-").concat(_tabId); |
| 1084 | } |
| 1085 | } |
| 1086 | } else if (hasSettingsTabs) { |
| 1087 | var activeSettingsTab = document.querySelector(SCREEN_SELECTORS.SETTINGS_FORM_PAGE_ACTIVE); |
| 1088 | if (activeSettingsTab) { |
| 1089 | var _tabId2 = activeSettingsTab.id; |
| 1090 | if (_tabId2) { |
| 1091 | screenId = "".concat(screenId, "-").concat(_tabId2); |
| 1092 | } |
| 1093 | } |
| 1094 | } |
| 1095 | } |
| 1096 | return { |
| 1097 | screenId: screenId, |
| 1098 | screenType: screenType |
| 1099 | }; |
| 1100 | } |
| 1101 | }, { |
| 1102 | key: "isElementorAppPage", |
| 1103 | value: function isElementorAppPage() { |
| 1104 | var urlParams = new URLSearchParams(window.location.search); |
| 1105 | return 'elementor-app' === urlParams.get('page'); |
| 1106 | } |
| 1107 | }, { |
| 1108 | key: "getAppScreenData", |
| 1109 | value: function getAppScreenData(hash) { |
| 1110 | if (!hash) { |
| 1111 | return null; |
| 1112 | } |
| 1113 | var cleanHash = hash.replace(/^#/, ''); |
| 1114 | if (!cleanHash.startsWith('/')) { |
| 1115 | return null; |
| 1116 | } |
| 1117 | var pathParts = cleanHash.split('/').filter(Boolean); |
| 1118 | if (0 === pathParts.length) { |
| 1119 | return null; |
| 1120 | } |
| 1121 | var screenId = pathParts.join('/'); |
| 1122 | var screenType = _wpDashboardTracking.SCREEN_TYPES.APP_SCREEN; |
| 1123 | return { |
| 1124 | screenId: screenId, |
| 1125 | screenType: screenType |
| 1126 | }; |
| 1127 | } |
| 1128 | }, { |
| 1129 | key: "getScreenIdFromBody", |
| 1130 | value: function getScreenIdFromBody() { |
| 1131 | var body = document.body; |
| 1132 | var bodyClasses = body.className.split(' '); |
| 1133 | var _iterator = _createForOfIteratorHelper(bodyClasses), |
| 1134 | _step; |
| 1135 | try { |
| 1136 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 1137 | var cls = _step.value; |
| 1138 | if (cls.startsWith('elementor') && (cls.includes('page') || cls.includes('post-type'))) { |
| 1139 | return cls; |
| 1140 | } |
| 1141 | } |
| 1142 | } catch (err) { |
| 1143 | _iterator.e(err); |
| 1144 | } finally { |
| 1145 | _iterator.f(); |
| 1146 | } |
| 1147 | return 'elementor-unknown'; |
| 1148 | } |
| 1149 | }, { |
| 1150 | key: "sanitizeScreenId", |
| 1151 | value: function sanitizeScreenId(text) { |
| 1152 | return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, ''); |
| 1153 | } |
| 1154 | }, { |
| 1155 | key: "attachTabChangeTracking", |
| 1156 | value: function attachTabChangeTracking() { |
| 1157 | this.attachNavTabTracking(); |
| 1158 | this.attachHashChangeTracking(); |
| 1159 | this.attachSettingsTabTracking(); |
| 1160 | this.attachModalTracking(); |
| 1161 | } |
| 1162 | }, { |
| 1163 | key: "attachNavTabTracking", |
| 1164 | value: function attachNavTabTracking() { |
| 1165 | var _this = this; |
| 1166 | var wrapper = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); |
| 1167 | if (!wrapper) { |
| 1168 | return; |
| 1169 | } |
| 1170 | this.addEventListenerTracked(wrapper, 'click', function (event) { |
| 1171 | var navTab = event.target.closest(SCREEN_SELECTORS.NAV_TAB); |
| 1172 | if (navTab && !navTab.classList.contains('nav-tab-active')) { |
| 1173 | var screenData = _this.getScreenData(); |
| 1174 | if (screenData) { |
| 1175 | _this.trackScreen(screenData.screenId, screenData.screenType); |
| 1176 | } |
| 1177 | } |
| 1178 | }); |
| 1179 | } |
| 1180 | }, { |
| 1181 | key: "attachHashChangeTracking", |
| 1182 | value: function attachHashChangeTracking() { |
| 1183 | var _this2 = this; |
| 1184 | this.addEventListenerTracked(window, 'hashchange', function () { |
| 1185 | var screenData = _this2.getScreenData(); |
| 1186 | if (screenData) { |
| 1187 | _this2.trackScreen(screenData.screenId, screenData.screenType); |
| 1188 | } |
| 1189 | }); |
| 1190 | } |
| 1191 | }, { |
| 1192 | key: "attachSettingsTabTracking", |
| 1193 | value: function attachSettingsTabTracking() { |
| 1194 | var _this3 = this; |
| 1195 | var settingsPages = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE); |
| 1196 | if (0 === settingsPages.length) { |
| 1197 | return; |
| 1198 | } |
| 1199 | settingsPages.forEach(function (page) { |
| 1200 | _this3.addObserver(page, { |
| 1201 | attributes: true, |
| 1202 | attributeFilter: ['class'] |
| 1203 | }, function () { |
| 1204 | var screenData = _this3.getScreenData(); |
| 1205 | if (screenData) { |
| 1206 | _this3.trackScreen(screenData.screenId, screenData.screenType); |
| 1207 | } |
| 1208 | }); |
| 1209 | }); |
| 1210 | } |
| 1211 | }, { |
| 1212 | key: "attachModalTracking", |
| 1213 | value: function attachModalTracking() { |
| 1214 | var _this4 = this; |
| 1215 | this.addObserver(document.body, { |
| 1216 | childList: true, |
| 1217 | subtree: true |
| 1218 | }, function (mutations) { |
| 1219 | var _iterator2 = _createForOfIteratorHelper(mutations), |
| 1220 | _step2; |
| 1221 | try { |
| 1222 | for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { |
| 1223 | var mutation = _step2.value; |
| 1224 | if ('childList' === mutation.type) { |
| 1225 | TRACKED_MODALS.forEach(function (modalSelector) { |
| 1226 | var modal = document.querySelector(modalSelector); |
| 1227 | if (modal && _this4.isModalVisible(modal)) { |
| 1228 | var modalId = modalSelector.replace('#', ''); |
| 1229 | _this4.trackScreen(modalId, _wpDashboardTracking.SCREEN_TYPES.POPUP); |
| 1230 | } |
| 1231 | }); |
| 1232 | } |
| 1233 | } |
| 1234 | } catch (err) { |
| 1235 | _iterator2.e(err); |
| 1236 | } finally { |
| 1237 | _iterator2.f(); |
| 1238 | } |
| 1239 | }); |
| 1240 | } |
| 1241 | }, { |
| 1242 | key: "isModalVisible", |
| 1243 | value: function isModalVisible(element) { |
| 1244 | if (!element) { |
| 1245 | return false; |
| 1246 | } |
| 1247 | var style = window.getComputedStyle(element); |
| 1248 | return 'none' !== style.display && 0 !== parseFloat(style.opacity); |
| 1249 | } |
| 1250 | }, { |
| 1251 | key: "trackScreen", |
| 1252 | value: function trackScreen(screenId) { |
| 1253 | var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _wpDashboardTracking.SCREEN_TYPES.TOP_LEVEL_PAGE; |
| 1254 | var trackingKey = "".concat(screenId, "-").concat(screenType); |
| 1255 | if (this.trackedScreens.has(trackingKey)) { |
| 1256 | return; |
| 1257 | } |
| 1258 | this.trackedScreens.add(trackingKey); |
| 1259 | _wpDashboardTracking.default.trackScreenViewed(screenId, screenType); |
| 1260 | } |
| 1261 | }]); |
| 1262 | }(_baseTracking.default); |
| 1263 | (0, _defineProperty2.default)(ScreenViewTracking, "trackedScreens", new Set()); |
| 1264 | var _default = exports["default"] = ScreenViewTracking; |
| 1265 | |
| 1266 | /***/ }), |
| 1267 | |
| 1268 | /***/ "../app/assets/js/event-track/dashboard/utils.js": |
| 1269 | /*!*******************************************************!*\ |
| 1270 | !*** ../app/assets/js/event-track/dashboard/utils.js ***! |
| 1271 | \*******************************************************/ |
| 1272 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1273 | |
| 1274 | "use strict"; |
| 1275 | |
| 1276 | |
| 1277 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1278 | Object.defineProperty(exports, "__esModule", ({ |
| 1279 | value: true |
| 1280 | })); |
| 1281 | exports.DashboardUtils = void 0; |
| 1282 | var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); |
| 1283 | var DashboardUtils = exports.DashboardUtils = { |
| 1284 | isElementorPage: function isElementorPage() { |
| 1285 | var urlParams = new URLSearchParams(window.location.search); |
| 1286 | var page = urlParams.get('page'); |
| 1287 | if (page && _wpDashboardTracking.default.elementorPages.some(function (p) { |
| 1288 | return page.includes(p); |
| 1289 | })) { |
| 1290 | return true; |
| 1291 | } |
| 1292 | var postType = urlParams.get('post_type'); |
| 1293 | if (_wpDashboardTracking.default.elementorPostTypes.includes(postType)) { |
| 1294 | return true; |
| 1295 | } |
| 1296 | var body = document.body; |
| 1297 | var bodyClasses = body.className.split(' '); |
| 1298 | return bodyClasses.some(function (cls) { |
| 1299 | return cls.includes('elementor') && (cls.includes('page') || cls.includes('post-type')); |
| 1300 | }); |
| 1301 | } |
| 1302 | }; |
| 1303 | |
| 1304 | /***/ }), |
| 1305 | |
| 1306 | /***/ "../app/assets/js/event-track/wp-dashboard-tracking.js": |
| 1307 | /*!*************************************************************!*\ |
| 1308 | !*** ../app/assets/js/event-track/wp-dashboard-tracking.js ***! |
| 1309 | \*************************************************************/ |
| 1310 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1311 | |
| 1312 | "use strict"; |
| 1313 | |
| 1314 | |
| 1315 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1316 | Object.defineProperty(exports, "__esModule", ({ |
| 1317 | value: true |
| 1318 | })); |
| 1319 | exports["default"] = exports.SCREEN_TYPES = exports.NAV_AREAS = exports.CONTROL_TYPES = void 0; |
| 1320 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1321 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1322 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1323 | var _navigation = _interopRequireDefault(__webpack_require__(/*! ./dashboard/navigation */ "../app/assets/js/event-track/dashboard/navigation.js")); |
| 1324 | var _pluginActions = _interopRequireDefault(__webpack_require__(/*! ./dashboard/plugin-actions */ "../app/assets/js/event-track/dashboard/plugin-actions.js")); |
| 1325 | var _promotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/promotion */ "../app/assets/js/event-track/dashboard/promotion.js")); |
| 1326 | var _screenView = _interopRequireDefault(__webpack_require__(/*! ./dashboard/screen-view */ "../app/assets/js/event-track/dashboard/screen-view.js")); |
| 1327 | var _menuPromotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/menu-promotion */ "../app/assets/js/event-track/dashboard/menu-promotion.js")); |
| 1328 | var _actionControls = _interopRequireDefault(__webpack_require__(/*! ./dashboard/action-controls */ "../app/assets/js/event-track/dashboard/action-controls.js")); |
| 1329 | var _WpDashboardTracking; |
| 1330 | var SESSION_TIMEOUT_MINUTES = 30; |
| 1331 | var MINUTE_MS = 60 * 1000; |
| 1332 | var SESSION_TIMEOUT = SESSION_TIMEOUT_MINUTES * MINUTE_MS; |
| 1333 | var ACTIVITY_CHECK_INTERVAL = 1 * MINUTE_MS; |
| 1334 | var SESSION_STORAGE_KEY = 'elementor_wpdash_session'; |
| 1335 | var PENDING_NAV_CLICK_KEY = 'elementor_wpdash_pending_nav'; |
| 1336 | var CONTROL_TYPES = exports.CONTROL_TYPES = { |
| 1337 | BUTTON: 'button', |
| 1338 | CHECKBOX: 'checkbox', |
| 1339 | RADIO: 'radio', |
| 1340 | LINK: 'link', |
| 1341 | SELECT: 'select', |
| 1342 | TOGGLE: 'toggle', |
| 1343 | FILTER: 'filter' |
| 1344 | }; |
| 1345 | var NAV_AREAS = exports.NAV_AREAS = { |
| 1346 | LEFT_MENU: 'left_menu', |
| 1347 | SUBMENU: 'submenu', |
| 1348 | HOVER_MENU: 'hover_menu', |
| 1349 | TOP_BAR: 'top_bar', |
| 1350 | SIDEBAR_MENU: 'sidebar' |
| 1351 | }; |
| 1352 | var SCREEN_TYPES = exports.SCREEN_TYPES = { |
| 1353 | TAB: 'tab', |
| 1354 | POPUP: 'popup', |
| 1355 | APP_SCREEN: 'app_screen' |
| 1356 | }; |
| 1357 | var WpDashboardTracking = exports["default"] = /*#__PURE__*/function () { |
| 1358 | function WpDashboardTracking() { |
| 1359 | (0, _classCallCheck2.default)(this, WpDashboardTracking); |
| 1360 | } |
| 1361 | return (0, _createClass2.default)(WpDashboardTracking, null, [{ |
| 1362 | key: "getElementorCommon", |
| 1363 | value: function getElementorCommon() { |
| 1364 | return window.elementorCommon; |
| 1365 | } |
| 1366 | }, { |
| 1367 | key: "init", |
| 1368 | value: function init() { |
| 1369 | if (this.initialized) { |
| 1370 | return; |
| 1371 | } |
| 1372 | this.restoreOrCreateSession(); |
| 1373 | if (this.isEventsManagerAvailable()) { |
| 1374 | this.startSessionMonitoring(); |
| 1375 | this.attachActivityListeners(); |
| 1376 | this.attachNavigationListener(); |
| 1377 | this.initialized = true; |
| 1378 | } |
| 1379 | } |
| 1380 | }, { |
| 1381 | key: "restoreOrCreateSession", |
| 1382 | value: function restoreOrCreateSession() { |
| 1383 | var storedSession = this.getStoredSession(); |
| 1384 | if (storedSession) { |
| 1385 | this.sessionStartTime = storedSession.sessionStartTime; |
| 1386 | this.navItemsVisited = new Set(storedSession.navItemsVisited); |
| 1387 | this.lastActivityTime = Date.now(); |
| 1388 | this.sessionEnded = false; |
| 1389 | } else { |
| 1390 | this.sessionStartTime = Date.now(); |
| 1391 | this.lastActivityTime = Date.now(); |
| 1392 | this.sessionEnded = false; |
| 1393 | this.navItemsVisited = new Set(); |
| 1394 | } |
| 1395 | this.processPendingNavClick(); |
| 1396 | this.saveSessionToStorage(); |
| 1397 | } |
| 1398 | }, { |
| 1399 | key: "isEditorOneActive", |
| 1400 | value: function isEditorOneActive() { |
| 1401 | var _elementorCommon$conf, _elementorCommon$conf2; |
| 1402 | var elementorCommon = this.getElementorCommon(); |
| 1403 | return (_elementorCommon$conf = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf2 = elementorCommon.config) === null || _elementorCommon$conf2 === void 0 || (_elementorCommon$conf2 = _elementorCommon$conf2.editor_events) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.isEditorOneActive) !== null && _elementorCommon$conf !== void 0 ? _elementorCommon$conf : false; |
| 1404 | } |
| 1405 | }, { |
| 1406 | key: "processPendingNavClick", |
| 1407 | value: function processPendingNavClick() { |
| 1408 | try { |
| 1409 | var pendingNav = sessionStorage.getItem(PENDING_NAV_CLICK_KEY); |
| 1410 | if (pendingNav) { |
| 1411 | var _JSON$parse = JSON.parse(pendingNav), |
| 1412 | itemId = _JSON$parse.itemId, |
| 1413 | rootItem = _JSON$parse.rootItem, |
| 1414 | area = _JSON$parse.area; |
| 1415 | this.navItemsVisited.add(itemId); |
| 1416 | var properties = { |
| 1417 | wpdash_nav_item_id: itemId, |
| 1418 | wpdash_nav_area: area |
| 1419 | }; |
| 1420 | if (rootItem) { |
| 1421 | properties.wpdash_nav_item_root = rootItem; |
| 1422 | } |
| 1423 | this.dispatchEvent('wpdash_nav_clicked', properties, { |
| 1424 | send_immediately: true |
| 1425 | }); |
| 1426 | sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); |
| 1427 | } |
| 1428 | } catch (error) { |
| 1429 | sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); |
| 1430 | } |
| 1431 | } |
| 1432 | }, { |
| 1433 | key: "getStoredSession", |
| 1434 | value: function getStoredSession() { |
| 1435 | try { |
| 1436 | var stored = sessionStorage.getItem(SESSION_STORAGE_KEY); |
| 1437 | return stored ? JSON.parse(stored) : null; |
| 1438 | } catch (error) { |
| 1439 | return null; |
| 1440 | } |
| 1441 | } |
| 1442 | }, { |
| 1443 | key: "saveSessionToStorage", |
| 1444 | value: function saveSessionToStorage() { |
| 1445 | var sessionData = { |
| 1446 | sessionStartTime: this.sessionStartTime, |
| 1447 | navItemsVisited: Array.from(this.navItemsVisited) |
| 1448 | }; |
| 1449 | sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(sessionData)); |
| 1450 | } |
| 1451 | }, { |
| 1452 | key: "clearStoredSession", |
| 1453 | value: function clearStoredSession() { |
| 1454 | sessionStorage.removeItem(SESSION_STORAGE_KEY); |
| 1455 | } |
| 1456 | }, { |
| 1457 | key: "isEventsManagerAvailable", |
| 1458 | value: function isEventsManagerAvailable() { |
| 1459 | var elementorCommon = this.getElementorCommon(); |
| 1460 | return (elementorCommon === null || elementorCommon === void 0 ? void 0 : elementorCommon.eventsManager) && 'function' === typeof elementorCommon.eventsManager.dispatchEvent; |
| 1461 | } |
| 1462 | }, { |
| 1463 | key: "canSendEvents", |
| 1464 | value: function canSendEvents() { |
| 1465 | var _elementorCommon$conf3, _elementorCommon$conf4; |
| 1466 | var elementorCommon = this.getElementorCommon(); |
| 1467 | return (_elementorCommon$conf3 = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf4 = elementorCommon.config) === null || _elementorCommon$conf4 === void 0 || (_elementorCommon$conf4 = _elementorCommon$conf4.editor_events) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.can_send_events) !== null && _elementorCommon$conf3 !== void 0 ? _elementorCommon$conf3 : false; |
| 1468 | } |
| 1469 | }, { |
| 1470 | key: "dispatchEvent", |
| 1471 | value: function dispatchEvent(eventName) { |
| 1472 | var _elementorCommon$even; |
| 1473 | var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 1474 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; |
| 1475 | if (!this.isEventsManagerAvailable() || !this.canSendEvents()) { |
| 1476 | return; |
| 1477 | } |
| 1478 | var elementorCommon = this.getElementorCommon(); |
| 1479 | elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$even = elementorCommon.eventsManager) === null || _elementorCommon$even === void 0 || _elementorCommon$even.dispatchEvent(eventName, properties, options); |
| 1480 | } |
| 1481 | }, { |
| 1482 | key: "updateActivity", |
| 1483 | value: function updateActivity() { |
| 1484 | this.lastActivityTime = Date.now(); |
| 1485 | } |
| 1486 | }, { |
| 1487 | key: "startSessionMonitoring", |
| 1488 | value: function startSessionMonitoring() { |
| 1489 | var _this = this; |
| 1490 | this.activityCheckInterval = setInterval(function () { |
| 1491 | _this.checkSessionTimeout(); |
| 1492 | }, ACTIVITY_CHECK_INTERVAL); |
| 1493 | window.addEventListener('beforeunload', function () { |
| 1494 | if (!_this.sessionEnded && !_this.isNavigatingToElementor) { |
| 1495 | _this.trackSessionEnd('tab_closed'); |
| 1496 | } |
| 1497 | }); |
| 1498 | document.addEventListener('visibilitychange', function () { |
| 1499 | if (!_this.sessionEnded && document.hidden) { |
| 1500 | var timeSinceLastActivity = Date.now() - _this.lastActivityTime; |
| 1501 | if (timeSinceLastActivity > SESSION_TIMEOUT) { |
| 1502 | _this.trackSessionEnd('tab_inactive'); |
| 1503 | } |
| 1504 | } |
| 1505 | }); |
| 1506 | } |
| 1507 | }, { |
| 1508 | key: "isElementorPage", |
| 1509 | value: function isElementorPage(url) { |
| 1510 | try { |
| 1511 | var urlObj = new URL(url, window.location.origin); |
| 1512 | var params = urlObj.searchParams; |
| 1513 | var page = params.get('page'); |
| 1514 | var postType = params.get('post_type'); |
| 1515 | var action = params.get('action'); |
| 1516 | return !!(page && this.elementorPages.some(function (p) { |
| 1517 | return page.includes(p); |
| 1518 | }) || postType && this.elementorPostTypes.includes(postType) || action && action.includes(this.anyPageWithElementorString)); |
| 1519 | } catch (error) { |
| 1520 | return false; |
| 1521 | } |
| 1522 | } |
| 1523 | }, { |
| 1524 | key: "isPluginsPage", |
| 1525 | value: function isPluginsPage(url) { |
| 1526 | try { |
| 1527 | var urlObj = new URL(url, window.location.origin); |
| 1528 | return urlObj.pathname.includes('plugins.php'); |
| 1529 | } catch (error) { |
| 1530 | return false; |
| 1531 | } |
| 1532 | } |
| 1533 | }, { |
| 1534 | key: "isNavigatingAwayFromElementor", |
| 1535 | value: function isNavigatingAwayFromElementor(targetUrl) { |
| 1536 | if (!targetUrl) { |
| 1537 | return false; |
| 1538 | } |
| 1539 | if (targetUrl.startsWith('#')) { |
| 1540 | return false; |
| 1541 | } |
| 1542 | return !this.isElementorPage(targetUrl); |
| 1543 | } |
| 1544 | }, { |
| 1545 | key: "isLinkOpeningInNewTab", |
| 1546 | value: function isLinkOpeningInNewTab(link) { |
| 1547 | var target = link.getAttribute('target'); |
| 1548 | return '_blank' === target || '_new' === target; |
| 1549 | } |
| 1550 | }, { |
| 1551 | key: "attachNavigationListener", |
| 1552 | value: function attachNavigationListener() { |
| 1553 | var _this2 = this; |
| 1554 | var handleLinkClick = function handleLinkClick(event) { |
| 1555 | var link = event.target.closest('a'); |
| 1556 | if (link && link.href) { |
| 1557 | if (_this2.isLinkOpeningInNewTab(link)) { |
| 1558 | return; |
| 1559 | } |
| 1560 | if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(link.href)) { |
| 1561 | _this2.trackSessionEnd('navigate_away'); |
| 1562 | } else if (_this2.isElementorPage(link.href)) { |
| 1563 | _this2.isNavigatingToElementor = true; |
| 1564 | } |
| 1565 | } |
| 1566 | var isSidebar = event.target.closest('#editor-one-sidebar-navigation'); |
| 1567 | if (isSidebar) { |
| 1568 | _this2.isNavigatingToElementor = true; |
| 1569 | } |
| 1570 | }; |
| 1571 | var handleFormSubmit = function handleFormSubmit(event) { |
| 1572 | var form = event.target; |
| 1573 | if (form.action) { |
| 1574 | if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(form.action)) { |
| 1575 | _this2.trackSessionEnd('navigate_away'); |
| 1576 | } else if (_this2.isElementorPage(form.action)) { |
| 1577 | _this2.isNavigatingToElementor = true; |
| 1578 | } |
| 1579 | } |
| 1580 | }; |
| 1581 | document.addEventListener('click', handleLinkClick, true); |
| 1582 | document.addEventListener('submit', handleFormSubmit, true); |
| 1583 | this.navigationListeners.push({ |
| 1584 | type: 'click', |
| 1585 | handler: handleLinkClick |
| 1586 | }, { |
| 1587 | type: 'submit', |
| 1588 | handler: handleFormSubmit |
| 1589 | }); |
| 1590 | } |
| 1591 | }, { |
| 1592 | key: "checkSessionTimeout", |
| 1593 | value: function checkSessionTimeout() { |
| 1594 | var timeSinceLastActivity = Date.now() - this.lastActivityTime; |
| 1595 | if (timeSinceLastActivity > SESSION_TIMEOUT && !this.sessionEnded) { |
| 1596 | this.trackSessionEnd('timeout'); |
| 1597 | } |
| 1598 | } |
| 1599 | }, { |
| 1600 | key: "attachActivityListeners", |
| 1601 | value: function attachActivityListeners() { |
| 1602 | var _this3 = this; |
| 1603 | var events = ['mousedown', 'keydown', 'scroll', 'touchstart', 'click']; |
| 1604 | events.forEach(function (event) { |
| 1605 | document.addEventListener(event, function () { |
| 1606 | _this3.updateActivity(); |
| 1607 | }, { |
| 1608 | capture: true, |
| 1609 | passive: true |
| 1610 | }); |
| 1611 | }); |
| 1612 | } |
| 1613 | }, { |
| 1614 | key: "formatDuration", |
| 1615 | value: function formatDuration(milliseconds) { |
| 1616 | var totalSeconds = Math.floor(milliseconds / 1000); |
| 1617 | return Number(totalSeconds.toFixed(2)); |
| 1618 | } |
| 1619 | }, { |
| 1620 | key: "trackNavClicked", |
| 1621 | value: function trackNavClicked(itemId) { |
| 1622 | var rootItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; |
| 1623 | var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NAV_AREAS.LEFT_MENU; |
| 1624 | if (!this.initialized) { |
| 1625 | var pendingNav = { |
| 1626 | itemId: itemId, |
| 1627 | rootItem: rootItem, |
| 1628 | area: area |
| 1629 | }; |
| 1630 | sessionStorage.setItem(PENDING_NAV_CLICK_KEY, JSON.stringify(pendingNav)); |
| 1631 | return; |
| 1632 | } |
| 1633 | this.updateActivity(); |
| 1634 | this.navItemsVisited.add(itemId); |
| 1635 | this.saveSessionToStorage(); |
| 1636 | var properties = { |
| 1637 | wpdash_nav_item_id: itemId, |
| 1638 | wpdash_nav_area: area |
| 1639 | }; |
| 1640 | if (rootItem) { |
| 1641 | properties.wpdash_nav_item_root = rootItem; |
| 1642 | } |
| 1643 | this.dispatchEvent('wpdash_nav_clicked', properties); |
| 1644 | } |
| 1645 | }, { |
| 1646 | key: "trackScreenViewed", |
| 1647 | value: function trackScreenViewed(screenId) { |
| 1648 | var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SCREEN_TYPES.TAB; |
| 1649 | this.updateActivity(); |
| 1650 | var properties = { |
| 1651 | wpdash_screen_id: screenId, |
| 1652 | wpdash_screen_type: screenType |
| 1653 | }; |
| 1654 | this.dispatchEvent('wpdash_screen_viewed', properties); |
| 1655 | } |
| 1656 | }, { |
| 1657 | key: "trackActionControl", |
| 1658 | value: function trackActionControl(controlIdentifier, controlType) { |
| 1659 | this.updateActivity(); |
| 1660 | var properties = { |
| 1661 | wpdash_action_control_interacted: controlIdentifier, |
| 1662 | wpdash_control_type: controlType |
| 1663 | }; |
| 1664 | this.dispatchEvent('wpdash_action_control', properties); |
| 1665 | } |
| 1666 | }, { |
| 1667 | key: "trackPromoClicked", |
| 1668 | value: function trackPromoClicked(promoName, destination, clickPath) { |
| 1669 | this.updateActivity(); |
| 1670 | var properties = { |
| 1671 | wpdash_promo_name: promoName, |
| 1672 | wpdash_promo_destination: destination, |
| 1673 | wpdash_promo_clicked_path: clickPath |
| 1674 | }; |
| 1675 | this.dispatchEvent('wpdash_promo_clicked', properties); |
| 1676 | } |
| 1677 | }, { |
| 1678 | key: "trackSessionEnd", |
| 1679 | value: function trackSessionEnd() { |
| 1680 | var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'timeout'; |
| 1681 | if (this.sessionEnded) { |
| 1682 | return; |
| 1683 | } |
| 1684 | this.sessionEnded = true; |
| 1685 | if (this.activityCheckInterval) { |
| 1686 | clearInterval(this.activityCheckInterval); |
| 1687 | this.activityCheckInterval = null; |
| 1688 | } |
| 1689 | var duration = Date.now() - this.sessionStartTime; |
| 1690 | var properties = { |
| 1691 | wpdash_endstate_nav_summary: Array.from(this.navItemsVisited), |
| 1692 | wpdash_endstate_nav_count: this.navItemsVisited.size, |
| 1693 | wpdash_endstate_duration: this.formatDuration(duration), |
| 1694 | reason: reason |
| 1695 | }; |
| 1696 | this.dispatchEvent('wpdash_session_end_state', properties); |
| 1697 | this.clearStoredSession(); |
| 1698 | } |
| 1699 | }, { |
| 1700 | key: "destroy", |
| 1701 | value: function destroy() { |
| 1702 | if (this.activityCheckInterval) { |
| 1703 | clearInterval(this.activityCheckInterval); |
| 1704 | } |
| 1705 | this.navigationListeners.forEach(function (_ref) { |
| 1706 | var type = _ref.type, |
| 1707 | handler = _ref.handler; |
| 1708 | document.removeEventListener(type, handler, true); |
| 1709 | }); |
| 1710 | this.navigationListeners = []; |
| 1711 | _screenView.default.destroy(); |
| 1712 | _promotion.default.destroy(); |
| 1713 | _menuPromotion.default.destroy(); |
| 1714 | _actionControls.default.destroy(); |
| 1715 | this.initialized = false; |
| 1716 | } |
| 1717 | }]); |
| 1718 | }(); |
| 1719 | _WpDashboardTracking = WpDashboardTracking; |
| 1720 | (0, _defineProperty2.default)(WpDashboardTracking, "anyPageWithElementorString", 'elementor'); |
| 1721 | (0, _defineProperty2.default)(WpDashboardTracking, "elementorPages", [_WpDashboardTracking.anyPageWithElementorString, 'e-form-submissions', 'popup_templates']); |
| 1722 | (0, _defineProperty2.default)(WpDashboardTracking, "elementorPostTypes", ['elementor_library', 'e-floating-buttons', 'elementor_snippet', 'elementor_font', 'elementor_icons']); |
| 1723 | (0, _defineProperty2.default)(WpDashboardTracking, "sessionStartTime", Date.now()); |
| 1724 | (0, _defineProperty2.default)(WpDashboardTracking, "lastActivityTime", Date.now()); |
| 1725 | (0, _defineProperty2.default)(WpDashboardTracking, "sessionEnded", false); |
| 1726 | (0, _defineProperty2.default)(WpDashboardTracking, "navItemsVisited", new Set()); |
| 1727 | (0, _defineProperty2.default)(WpDashboardTracking, "activityCheckInterval", null); |
| 1728 | (0, _defineProperty2.default)(WpDashboardTracking, "initialized", false); |
| 1729 | (0, _defineProperty2.default)(WpDashboardTracking, "navigationListeners", []); |
| 1730 | (0, _defineProperty2.default)(WpDashboardTracking, "isNavigatingToElementor", false); |
| 1731 | window.addEventListener('elementor/admin/init', function () { |
| 1732 | var currentUrl = window.location.href; |
| 1733 | var isPluginsPage = WpDashboardTracking.isPluginsPage(currentUrl); |
| 1734 | var isElementorPage = WpDashboardTracking.isElementorPage(currentUrl); |
| 1735 | if (isPluginsPage) { |
| 1736 | _pluginActions.default.init(); |
| 1737 | } |
| 1738 | _navigation.default.init(); |
| 1739 | if (isElementorPage) { |
| 1740 | WpDashboardTracking.init(); |
| 1741 | _screenView.default.init(); |
| 1742 | _promotion.default.init(); |
| 1743 | _menuPromotion.default.init(); |
| 1744 | _actionControls.default.init(); |
| 1745 | } |
| 1746 | }); |
| 1747 | window.addEventListener('beforeunload', function () { |
| 1748 | _navigation.default.destroy(); |
| 1749 | _pluginActions.default.destroy(); |
| 1750 | WpDashboardTracking.destroy(); |
| 1751 | }); |
| 1752 | |
| 1753 | /***/ }), |
| 1754 | |
| 1755 | /***/ "../assets/dev/js/admin/maintenance-mode.js": |
| 1756 | /*!**************************************************!*\ |
| 1757 | !*** ../assets/dev/js/admin/maintenance-mode.js ***! |
| 1758 | \**************************************************/ |
| 1759 | /***/ ((module) => { |
| 1760 | |
| 1761 | "use strict"; |
| 1762 | |
| 1763 | |
| 1764 | module.exports = elementorModules.ViewModule.extend({ |
| 1765 | getDefaultSettings: function getDefaultSettings() { |
| 1766 | return { |
| 1767 | selectors: { |
| 1768 | modeSelect: '.elementor_maintenance_mode_mode select', |
| 1769 | maintenanceModeTable: '#tab-maintenance_mode table', |
| 1770 | maintenanceModeDescriptions: '.elementor-maintenance-mode-description', |
| 1771 | excludeModeSelect: '.elementor_maintenance_mode_exclude_mode select', |
| 1772 | excludeRolesArea: '.elementor_maintenance_mode_exclude_roles', |
| 1773 | templateSelect: '.elementor_maintenance_mode_template_id select', |
| 1774 | editTemplateButton: '.elementor-edit-template', |
| 1775 | maintenanceModeError: '.elementor-maintenance-mode-error' |
| 1776 | }, |
| 1777 | classes: { |
| 1778 | isEnabled: 'elementor-maintenance-mode-is-enabled' |
| 1779 | } |
| 1780 | }; |
| 1781 | }, |
| 1782 | getDefaultElements: function getDefaultElements() { |
| 1783 | var elements = {}, |
| 1784 | selectors = this.getSettings('selectors'); |
| 1785 | elements.$modeSelect = jQuery(selectors.modeSelect); |
| 1786 | elements.$maintenanceModeTable = elements.$modeSelect.parents(selectors.maintenanceModeTable); |
| 1787 | elements.$excludeModeSelect = elements.$maintenanceModeTable.find(selectors.excludeModeSelect); |
| 1788 | elements.$excludeRolesArea = elements.$maintenanceModeTable.find(selectors.excludeRolesArea); |
| 1789 | elements.$templateSelect = elements.$maintenanceModeTable.find(selectors.templateSelect); |
| 1790 | elements.$editTemplateButton = elements.$maintenanceModeTable.find(selectors.editTemplateButton); |
| 1791 | elements.$maintenanceModeDescriptions = elements.$maintenanceModeTable.find(selectors.maintenanceModeDescriptions); |
| 1792 | elements.$maintenanceModeError = elements.$maintenanceModeTable.find(selectors.maintenanceModeError); |
| 1793 | return elements; |
| 1794 | }, |
| 1795 | handleModeSelectChange: function handleModeSelectChange() { |
| 1796 | var settings = this.getSettings(), |
| 1797 | elements = this.elements; |
| 1798 | elements.$maintenanceModeTable.toggleClass(settings.classes.isEnabled, !!elements.$modeSelect.val()); |
| 1799 | elements.$maintenanceModeDescriptions.hide(); |
| 1800 | elements.$maintenanceModeDescriptions.filter('[data-value="' + elements.$modeSelect.val() + '"]').show(); |
| 1801 | }, |
| 1802 | handleExcludeModeSelectChange: function handleExcludeModeSelectChange() { |
| 1803 | var elements = this.elements; |
| 1804 | elements.$excludeRolesArea.toggle('custom' === elements.$excludeModeSelect.val()); |
| 1805 | }, |
| 1806 | handleTemplateSelectChange: function handleTemplateSelectChange() { |
| 1807 | var elements = this.elements; |
| 1808 | var templateID = elements.$templateSelect.val(); |
| 1809 | if (!templateID) { |
| 1810 | elements.$editTemplateButton.hide(); |
| 1811 | elements.$maintenanceModeError.show(); |
| 1812 | return; |
| 1813 | } |
| 1814 | var editUrl = elementorAdmin.config.home_url + '?p=' + templateID + '&elementor'; |
| 1815 | elements.$editTemplateButton.prop('href', editUrl).show(); |
| 1816 | elements.$maintenanceModeError.hide(); |
| 1817 | }, |
| 1818 | bindEvents: function bindEvents() { |
| 1819 | var elements = this.elements; |
| 1820 | elements.$modeSelect.on('change', this.handleModeSelectChange.bind(this)); |
| 1821 | elements.$excludeModeSelect.on('change', this.handleExcludeModeSelectChange.bind(this)); |
| 1822 | elements.$templateSelect.on('change', this.handleTemplateSelectChange.bind(this)); |
| 1823 | }, |
| 1824 | onAdminInit: function onAdminInit() { |
| 1825 | this.handleModeSelectChange(); |
| 1826 | this.handleExcludeModeSelectChange(); |
| 1827 | this.handleTemplateSelectChange(); |
| 1828 | }, |
| 1829 | onInit: function onInit() { |
| 1830 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| 1831 | elementorCommon.elements.$window.on('elementor/admin/init', this.onAdminInit); |
| 1832 | } |
| 1833 | }); |
| 1834 | |
| 1835 | /***/ }), |
| 1836 | |
| 1837 | /***/ "../assets/dev/js/admin/menu-handler.js": |
| 1838 | /*!**********************************************!*\ |
| 1839 | !*** ../assets/dev/js/admin/menu-handler.js ***! |
| 1840 | \**********************************************/ |
| 1841 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1842 | |
| 1843 | "use strict"; |
| 1844 | |
| 1845 | |
| 1846 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1847 | Object.defineProperty(exports, "__esModule", ({ |
| 1848 | value: true |
| 1849 | })); |
| 1850 | exports["default"] = void 0; |
| 1851 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1852 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1853 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1854 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1855 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 1856 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1857 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1858 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1859 | function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 1860 | var MenuHandler = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { |
| 1861 | function MenuHandler() { |
| 1862 | (0, _classCallCheck2.default)(this, MenuHandler); |
| 1863 | return _callSuper(this, MenuHandler, arguments); |
| 1864 | } |
| 1865 | (0, _inherits2.default)(MenuHandler, _elementorModules$Vie); |
| 1866 | return (0, _createClass2.default)(MenuHandler, [{ |
| 1867 | key: "getDefaultSettings", |
| 1868 | value: function getDefaultSettings() { |
| 1869 | return { |
| 1870 | selectors: { |
| 1871 | currentSubmenuItems: '#adminmenu .current' |
| 1872 | } |
| 1873 | }; |
| 1874 | } |
| 1875 | }, { |
| 1876 | key: "getDefaultElements", |
| 1877 | value: function getDefaultElements() { |
| 1878 | var settings = this.getSettings(); |
| 1879 | return { |
| 1880 | $currentSubmenuItems: jQuery(settings.selectors.currentSubmenuItems), |
| 1881 | $adminPageMenuLink: jQuery("a[href=\"".concat(settings.path, "\"]")) |
| 1882 | }; |
| 1883 | } |
| 1884 | |
| 1885 | // This method highlights the currently visited submenu item for the slug provided as an argument to this handler. |
| 1886 | // This method also accepts a jQuery instance of a custom submenu item to highlight. If provided, the provided |
| 1887 | // item will be the one highlighted. |
| 1888 | }, { |
| 1889 | key: "highlightSubMenuItem", |
| 1890 | value: function highlightSubMenuItem() { |
| 1891 | var $element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; |
| 1892 | var $submenuItem = $element || this.elements.$adminPageMenuLink; |
| 1893 | if (this.elements.$currentSubmenuItems.length) { |
| 1894 | this.elements.$currentSubmenuItems.removeClass('current'); |
| 1895 | } |
| 1896 | $submenuItem.addClass('current'); |
| 1897 | |
| 1898 | // Need to add the 'current' class to the link element's parent `<li>` element as well. |
| 1899 | $submenuItem.parent().addClass('current'); |
| 1900 | } |
| 1901 | }, { |
| 1902 | key: "highlightTopLevelMenuItem", |
| 1903 | value: function highlightTopLevelMenuItem($elementToHighlight) { |
| 1904 | var $elementToRemove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; |
| 1905 | var activeClasses = 'wp-has-current-submenu wp-menu-open current'; |
| 1906 | $elementToHighlight.parent().addClass(activeClasses).removeClass('wp-not-current-submenu'); |
| 1907 | if ($elementToRemove) { |
| 1908 | $elementToRemove.removeClass(activeClasses); |
| 1909 | } |
| 1910 | } |
| 1911 | }, { |
| 1912 | key: "onInit", |
| 1913 | value: function onInit() { |
| 1914 | _superPropGet(MenuHandler, "onInit", this, 3)([]); |
| 1915 | var settings = this.getSettings(); |
| 1916 | if (window.location.href.includes(settings.path)) { |
| 1917 | this.highlightSubMenuItem(); |
| 1918 | } |
| 1919 | } |
| 1920 | }]); |
| 1921 | }(elementorModules.ViewModule); |
| 1922 | |
| 1923 | /***/ }), |
| 1924 | |
| 1925 | /***/ "../assets/dev/js/admin/new-template/template-controls.js": |
| 1926 | /*!****************************************************************!*\ |
| 1927 | !*** ../assets/dev/js/admin/new-template/template-controls.js ***! |
| 1928 | \****************************************************************/ |
| 1929 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1930 | |
| 1931 | "use strict"; |
| 1932 | |
| 1933 | |
| 1934 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1935 | Object.defineProperty(exports, "__esModule", ({ |
| 1936 | value: true |
| 1937 | })); |
| 1938 | exports["default"] = void 0; |
| 1939 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1940 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1941 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1942 | var TemplateControls = exports["default"] = /*#__PURE__*/function () { |
| 1943 | function TemplateControls() { |
| 1944 | (0, _classCallCheck2.default)(this, TemplateControls); |
| 1945 | } |
| 1946 | return (0, _createClass2.default)(TemplateControls, [{ |
| 1947 | key: "setDynamicControlsVisibility", |
| 1948 | value: function setDynamicControlsVisibility(lookupControlIdPrefix, controls) { |
| 1949 | if (undefined === controls) { |
| 1950 | return; |
| 1951 | } |
| 1952 | var controlsArray = Object.entries(controls); |
| 1953 | for (var _i = 0, _controlsArray = controlsArray; _i < _controlsArray.length; _i++) { |
| 1954 | var _controlsArray$_i = (0, _slicedToArray2.default)(_controlsArray[_i], 2), |
| 1955 | controlId = _controlsArray$_i[0], |
| 1956 | controlSettings = _controlsArray$_i[1]; |
| 1957 | this.setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId); |
| 1958 | } |
| 1959 | } |
| 1960 | }, { |
| 1961 | key: "setVisibilityForControl", |
| 1962 | value: function setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId) { |
| 1963 | var _controlSettings$cond, |
| 1964 | _this = this; |
| 1965 | var conditions = Object.entries((_controlSettings$cond = controlSettings.conditions) !== null && _controlSettings$cond !== void 0 ? _controlSettings$cond : {}); |
| 1966 | conditions.forEach(function (condition) { |
| 1967 | _this.changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId); |
| 1968 | }); |
| 1969 | } |
| 1970 | }, { |
| 1971 | key: "changeVisibilityBasedOnCondition", |
| 1972 | value: function changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId) { |
| 1973 | var _condition = (0, _slicedToArray2.default)(condition, 2), |
| 1974 | conditionKey = _condition[0], |
| 1975 | conditionValue = _condition[1]; |
| 1976 | var targetControlWrapper = document.getElementById(lookupControlIdPrefix + controlId + '__wrapper'); |
| 1977 | var lookupControl = document.getElementById(lookupControlIdPrefix + conditionKey); |
| 1978 | targetControlWrapper.classList.toggle('elementor-hidden', !lookupControl || conditionValue !== lookupControl.value); |
| 1979 | } |
| 1980 | }]); |
| 1981 | }(); |
| 1982 | |
| 1983 | /***/ }), |
| 1984 | |
| 1985 | /***/ "../assets/dev/js/editor/utils/files-upload-handler.js": |
| 1986 | /*!*************************************************************!*\ |
| 1987 | !*** ../assets/dev/js/editor/utils/files-upload-handler.js ***! |
| 1988 | \*************************************************************/ |
| 1989 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1990 | |
| 1991 | "use strict"; |
| 1992 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 1993 | |
| 1994 | |
| 1995 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1996 | Object.defineProperty(exports, "__esModule", ({ |
| 1997 | value: true |
| 1998 | })); |
| 1999 | exports["default"] = void 0; |
| 2000 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2001 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2002 | var FilesUploadHandler = exports["default"] = /*#__PURE__*/function () { |
| 2003 | function FilesUploadHandler() { |
| 2004 | (0, _classCallCheck2.default)(this, FilesUploadHandler); |
| 2005 | } |
| 2006 | return (0, _createClass2.default)(FilesUploadHandler, null, [{ |
| 2007 | key: "isUploadEnabled", |
| 2008 | value: function isUploadEnabled(mediaType) { |
| 2009 | var unfilteredFilesTypes = ['svg', 'application/json']; |
| 2010 | if (!unfilteredFilesTypes.includes(mediaType)) { |
| 2011 | return true; |
| 2012 | } |
| 2013 | return elementorCommon.config.filesUpload.unfilteredFiles; |
| 2014 | } |
| 2015 | }, { |
| 2016 | key: "setUploadTypeCaller", |
| 2017 | value: function setUploadTypeCaller(frame) { |
| 2018 | frame.uploader.uploader.param('uploadTypeCaller', 'elementor-wp-media-upload'); |
| 2019 | } |
| 2020 | }, { |
| 2021 | key: "getUnfilteredFilesNonAdminDialog", |
| 2022 | value: function getUnfilteredFilesNonAdminDialog() { |
| 2023 | return elementorCommon.dialogsManager.createWidget('alert', { |
| 2024 | id: 'e-unfiltered-files-disabled-dialog', |
| 2025 | headerMessage: __('Sorry, you can\'t upload that file yet', 'elementor'), |
| 2026 | message: __('This is because JSON files may pose a security risk.', 'elementor') + '<br><br>' + __('To upload them anyway, ask the site administrator to enable unfiltered file uploads.', 'elementor'), |
| 2027 | strings: { |
| 2028 | confirm: __('Got it', 'elementor') |
| 2029 | } |
| 2030 | }); |
| 2031 | } |
| 2032 | }, { |
| 2033 | key: "getUnfilteredFilesNotEnabledDialog", |
| 2034 | value: function getUnfilteredFilesNotEnabledDialog(callback) { |
| 2035 | var elementorInstance = window.elementorAdmin || window.elementor; |
| 2036 | if (!elementorInstance.config.user.is_administrator) { |
| 2037 | return this.getUnfilteredFilesNonAdminDialog(); |
| 2038 | } |
| 2039 | var onConfirm = function onConfirm() { |
| 2040 | elementorCommon.ajax.addRequest('enable_unfiltered_files_upload', {}, true); |
| 2041 | elementorCommon.config.filesUpload.unfilteredFiles = true; |
| 2042 | callback(); |
| 2043 | }; |
| 2044 | return elementorInstance.helpers.getSimpleDialog('e-enable-unfiltered-files-dialog', __('Enable Unfiltered File Uploads', 'elementor'), __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor'), __('Enable', 'elementor'), onConfirm); |
| 2045 | } |
| 2046 | }, { |
| 2047 | key: "getUnfilteredFilesNotEnabledImportTemplateDialog", |
| 2048 | value: function getUnfilteredFilesNotEnabledImportTemplateDialog(callback) { |
| 2049 | if (!(window.elementorAdmin || window.elementor).config.user.is_administrator) { |
| 2050 | return this.getUnfilteredFilesNonAdminDialog(); |
| 2051 | } |
| 2052 | return elementorCommon.dialogsManager.createWidget('confirm', { |
| 2053 | id: 'e-enable-unfiltered-files-dialog-import-template', |
| 2054 | headerMessage: __('Enable Unfiltered File Uploads', 'elementor'), |
| 2055 | message: __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor') + '<br /><br />' + __('If you do not enable uploading unfiltered files, any SVG or JSON (including lottie) files used in the uploaded template will not be imported.', 'elementor'), |
| 2056 | position: { |
| 2057 | my: 'center center', |
| 2058 | at: 'center center' |
| 2059 | }, |
| 2060 | strings: { |
| 2061 | confirm: __('Enable and Import', 'elementor'), |
| 2062 | cancel: __('Import Without Enabling', 'elementor') |
| 2063 | }, |
| 2064 | onConfirm: function onConfirm() { |
| 2065 | elementorCommon.ajax.addRequest('enable_unfiltered_files_upload', { |
| 2066 | success: function success() { |
| 2067 | // This utility is used in both the admin and the Editor. |
| 2068 | elementorCommon.config.filesUpload.unfilteredFiles = true; |
| 2069 | callback(); |
| 2070 | } |
| 2071 | }, true); |
| 2072 | }, |
| 2073 | onCancel: function onCancel() { |
| 2074 | return callback(); |
| 2075 | } |
| 2076 | }); |
| 2077 | } |
| 2078 | }]); |
| 2079 | }(); |
| 2080 | |
| 2081 | /***/ }), |
| 2082 | |
| 2083 | /***/ "../assets/dev/js/utils/events.js": |
| 2084 | /*!****************************************!*\ |
| 2085 | !*** ../assets/dev/js/utils/events.js ***! |
| 2086 | \****************************************/ |
| 2087 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2088 | |
| 2089 | "use strict"; |
| 2090 | |
| 2091 | |
| 2092 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2093 | Object.defineProperty(exports, "__esModule", ({ |
| 2094 | value: true |
| 2095 | })); |
| 2096 | exports["default"] = exports.Events = void 0; |
| 2097 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2098 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2099 | var Events = exports.Events = /*#__PURE__*/function () { |
| 2100 | function Events() { |
| 2101 | (0, _classCallCheck2.default)(this, Events); |
| 2102 | } |
| 2103 | return (0, _createClass2.default)(Events, null, [{ |
| 2104 | key: "dispatch", |
| 2105 | value: |
| 2106 | /** |
| 2107 | * Dispatch an Elementor event. |
| 2108 | * |
| 2109 | * Will dispatch both native event & jQuery event (as BC). |
| 2110 | * By default, `bcEvent` is `null`. |
| 2111 | * |
| 2112 | * @param {Object} context - The context that will dispatch the event. |
| 2113 | * @param {string} event - Event to dispatch. |
| 2114 | * @param {*} data - Data to pass to the event, default to `null`. |
| 2115 | * @param {string|null} bcEvent - BC event to dispatch, default to `null`. |
| 2116 | * |
| 2117 | * @return {void} |
| 2118 | */ |
| 2119 | function dispatch(context, event) { |
| 2120 | var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; |
| 2121 | var bcEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; |
| 2122 | // Make sure to use the native context if it's a jQuery instance. |
| 2123 | context = context instanceof jQuery ? context[0] : context; |
| 2124 | |
| 2125 | // Dispatch the BC event only if exists. |
| 2126 | if (bcEvent) { |
| 2127 | context.dispatchEvent(new CustomEvent(bcEvent, { |
| 2128 | detail: data |
| 2129 | })); |
| 2130 | } |
| 2131 | |
| 2132 | // jQuery's `.on()` listens also to native custom events, so there is no need |
| 2133 | // to dispatch also a jQuery event. |
| 2134 | context.dispatchEvent(new CustomEvent(event, { |
| 2135 | detail: data |
| 2136 | })); |
| 2137 | } |
| 2138 | }]); |
| 2139 | }(); |
| 2140 | var _default = exports["default"] = Events; |
| 2141 | |
| 2142 | /***/ }), |
| 2143 | |
| 2144 | /***/ "../assets/dev/js/utils/json-upload-warning-message.js": |
| 2145 | /*!*************************************************************!*\ |
| 2146 | !*** ../assets/dev/js/utils/json-upload-warning-message.js ***! |
| 2147 | \*************************************************************/ |
| 2148 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2149 | |
| 2150 | "use strict"; |
| 2151 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 2152 | |
| 2153 | |
| 2154 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2155 | Object.defineProperty(exports, "__esModule", ({ |
| 2156 | value: true |
| 2157 | })); |
| 2158 | exports.showJsonUploadWarningMessageIfNeeded = showJsonUploadWarningMessageIfNeeded; |
| 2159 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 2160 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 2161 | var genericMessageIntroductionKey = 'upload_json_warning_generic_message'; |
| 2162 | /** |
| 2163 | * @type {import('../utils/introduction').default | null} |
| 2164 | */ |
| 2165 | var genericWarningModal = null; |
| 2166 | function showJsonUploadWarningMessageIfNeeded(_ref) { |
| 2167 | var introductionMap = _ref.introductionMap, |
| 2168 | IntroductionClass = _ref.IntroductionClass, |
| 2169 | _ref$waitForSetViewed = _ref.waitForSetViewed, |
| 2170 | waitForSetViewed = _ref$waitForSetViewed === void 0 ? false : _ref$waitForSetViewed; |
| 2171 | if (!genericWarningModal) { |
| 2172 | genericWarningModal = createGenericWarningModal(IntroductionClass); |
| 2173 | } |
| 2174 | genericWarningModal.setIntroductionMap(introductionMap); |
| 2175 | if (genericWarningModal.introductionViewed) { |
| 2176 | return Promise.resolve(); |
| 2177 | } |
| 2178 | var dialog = genericWarningModal.getDialog(); |
| 2179 | return new Promise(function (resolve, reject) { |
| 2180 | dialog.onHide = function () { |
| 2181 | // When closing the dialog (esc, click on background, etc.) we need to reject the promise. |
| 2182 | reject(); |
| 2183 | }; |
| 2184 | dialog.onConfirm = /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 2185 | return _regenerator.default.wrap(function (_context) { |
| 2186 | while (1) switch (_context.prev = _context.next) { |
| 2187 | case 0: |
| 2188 | if (!dialog.getElements('checkbox-dont-show-again').prop('checked')) { |
| 2189 | _context.next = 3; |
| 2190 | break; |
| 2191 | } |
| 2192 | if (!waitForSetViewed) { |
| 2193 | _context.next = 2; |
| 2194 | break; |
| 2195 | } |
| 2196 | _context.next = 1; |
| 2197 | return genericWarningModal.setViewed(); |
| 2198 | case 1: |
| 2199 | _context.next = 3; |
| 2200 | break; |
| 2201 | case 2: |
| 2202 | genericWarningModal.setViewed(); |
| 2203 | case 3: |
| 2204 | // Hack: we need to resolve the promise and then hide it manually, to avoid rejecting the promise. |
| 2205 | // this because when closing the dialog (esc, click on background, etc.) it does not trigger `onCancel` method. |
| 2206 | resolve(); |
| 2207 | dialog.hide(); |
| 2208 | case 4: |
| 2209 | case "end": |
| 2210 | return _context.stop(); |
| 2211 | } |
| 2212 | }, _callee); |
| 2213 | })); |
| 2214 | dialog.onCancel = function () { |
| 2215 | dialog.hide(); |
| 2216 | }; |
| 2217 | genericWarningModal.show(); |
| 2218 | }); |
| 2219 | } |
| 2220 | |
| 2221 | /** |
| 2222 | * @param {import('../utils/introduction').default.prototype.constructor} IntroductionClass |
| 2223 | * |
| 2224 | * @return {import('../utils/introduction').default} |
| 2225 | */ |
| 2226 | function createGenericWarningModal(IntroductionClass) { |
| 2227 | var _introduction$getDial, _introduction$getDial2; |
| 2228 | var dialogId = 'e-generic-warning-modal-for-json-upload'; |
| 2229 | var introduction = new IntroductionClass({ |
| 2230 | introductionKey: genericMessageIntroductionKey, |
| 2231 | dialogType: 'confirm', |
| 2232 | dialogOptions: { |
| 2233 | id: dialogId, |
| 2234 | headerMessage: __('Warning: JSON files may be unsafe', 'elementor'), |
| 2235 | message: __('Uploading JSON files from unknown sources can be harmful and put your site at risk. For maximum safety, only install JSON files from trusted sources.', 'elementor'), |
| 2236 | effects: { |
| 2237 | show: 'fadeIn', |
| 2238 | hide: 'fadeOut' |
| 2239 | }, |
| 2240 | hide: { |
| 2241 | onBackgroundClick: true, |
| 2242 | onButtonClick: false |
| 2243 | }, |
| 2244 | strings: { |
| 2245 | confirm: __('Continue', 'elementor'), |
| 2246 | cancel: __('Cancel', 'elementor') |
| 2247 | } |
| 2248 | } |
| 2249 | }); |
| 2250 | var _createCheckboxAndLab = createCheckboxAndLabel(dialogId), |
| 2251 | checkbox = _createCheckboxAndLab.checkbox, |
| 2252 | label = _createCheckboxAndLab.label; |
| 2253 | introduction.getDialog().addElement('checkbox-dont-show-again', checkbox); |
| 2254 | (_introduction$getDial = introduction.getDialog().getElements('message')) === null || _introduction$getDial === void 0 || (_introduction$getDial2 = _introduction$getDial.append) === null || _introduction$getDial2 === void 0 || _introduction$getDial2.call(_introduction$getDial, label); // `getElements` return JQuery object. |
| 2255 | |
| 2256 | return introduction; |
| 2257 | } |
| 2258 | function createCheckboxAndLabel(dialogId) { |
| 2259 | var checkboxId = "".concat(dialogId, "-dont-show-again"); |
| 2260 | var checkbox = document.createElement('input'); |
| 2261 | checkbox.type = 'checkbox'; |
| 2262 | checkbox.name = checkboxId; |
| 2263 | checkbox.id = checkboxId; |
| 2264 | var label = document.createElement('label'); |
| 2265 | label.htmlFor = checkboxId; |
| 2266 | label.textContent = __('Do not show this message again', 'elementor'); |
| 2267 | label.style.display = 'block'; |
| 2268 | label.style.marginTop = '20px'; |
| 2269 | label.style.marginBottom = '20px'; |
| 2270 | label.prepend(checkbox); |
| 2271 | return { |
| 2272 | checkbox: checkbox, |
| 2273 | label: label |
| 2274 | }; |
| 2275 | } |
| 2276 | |
| 2277 | /***/ }), |
| 2278 | |
| 2279 | /***/ "../core/common/assets/js/utils/environment.js": |
| 2280 | /*!*****************************************************!*\ |
| 2281 | !*** ../core/common/assets/js/utils/environment.js ***! |
| 2282 | \*****************************************************/ |
| 2283 | /***/ ((__unused_webpack_module, exports) => { |
| 2284 | |
| 2285 | "use strict"; |
| 2286 | |
| 2287 | |
| 2288 | Object.defineProperty(exports, "__esModule", ({ |
| 2289 | value: true |
| 2290 | })); |
| 2291 | exports["default"] = void 0; |
| 2292 | var matchUserAgent = function matchUserAgent(UserAgentStr) { |
| 2293 | return userAgent.indexOf(UserAgentStr) >= 0; |
| 2294 | }, |
| 2295 | userAgent = navigator.userAgent, |
| 2296 | // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser |
| 2297 | |
| 2298 | // Opera 8.0+ |
| 2299 | isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), |
| 2300 | // Firefox 1.0+ |
| 2301 | isFirefox = matchUserAgent('Firefox'), |
| 2302 | // Safari 3.0+ "[object HTMLElementConstructor]" |
| 2303 | isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { |
| 2304 | return '[object SafariRemoteNotification]' === p.toString(); |
| 2305 | }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), |
| 2306 | // Internet Explorer 6-11 |
| 2307 | isIE = /Trident|MSIE/.test(userAgent) && (/* @cc_on!@*/ false || !!document.documentMode), |
| 2308 | // Edge 20+ |
| 2309 | isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), |
| 2310 | // Google Chrome (Not accurate) |
| 2311 | isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), |
| 2312 | // Blink engine |
| 2313 | isBlink = matchUserAgent('Chrome') && !!window.CSS, |
| 2314 | // Apple Webkit engine |
| 2315 | isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, |
| 2316 | isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, |
| 2317 | environment = { |
| 2318 | isTouchDevice: isTouchDevice, |
| 2319 | appleWebkit: isAppleWebkit, |
| 2320 | blink: isBlink, |
| 2321 | chrome: isChrome, |
| 2322 | edge: isEdge, |
| 2323 | firefox: isFirefox, |
| 2324 | ie: isIE, |
| 2325 | mac: matchUserAgent('Macintosh'), |
| 2326 | opera: isOpera, |
| 2327 | safari: isSafari, |
| 2328 | webkit: matchUserAgent('AppleWebKit') |
| 2329 | }; |
| 2330 | var _default = exports["default"] = environment; |
| 2331 | |
| 2332 | /***/ }), |
| 2333 | |
| 2334 | /***/ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js": |
| 2335 | /*!*****************************************************************************!*\ |
| 2336 | !*** ../core/experiments/assets/js/admin/behaviors/experiments-messages.js ***! |
| 2337 | \*****************************************************************************/ |
| 2338 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2339 | |
| 2340 | "use strict"; |
| 2341 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 2342 | |
| 2343 | |
| 2344 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2345 | Object.defineProperty(exports, "__esModule", ({ |
| 2346 | value: true |
| 2347 | })); |
| 2348 | exports["default"] = void 0; |
| 2349 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 2350 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2351 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2352 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 2353 | var STATE_ACTIVE = 'active'; |
| 2354 | var STATE_INACTIVE = 'inactive'; |
| 2355 | var STATE_DEFAULT = 'default'; |
| 2356 | var ExperimentsMessages = exports["default"] = /*#__PURE__*/function () { |
| 2357 | function ExperimentsMessages(_ref) { |
| 2358 | var selects = _ref.selects, |
| 2359 | submit = _ref.submit; |
| 2360 | (0, _classCallCheck2.default)(this, ExperimentsMessages); |
| 2361 | (0, _defineProperty2.default)(this, "elements", {}); |
| 2362 | this.elements = { |
| 2363 | /** |
| 2364 | * @type {HTMLSelectElement[]} |
| 2365 | */ |
| 2366 | selects: selects, |
| 2367 | /** |
| 2368 | * @type {HTMLInputElement} |
| 2369 | */ |
| 2370 | submit: submit |
| 2371 | }; |
| 2372 | } |
| 2373 | return (0, _createClass2.default)(ExperimentsMessages, [{ |
| 2374 | key: "bindEvents", |
| 2375 | value: function bindEvents() { |
| 2376 | var _this = this; |
| 2377 | this.elements.selects.forEach(function (select) { |
| 2378 | select.addEventListener('change', function (e) { |
| 2379 | return _this.onExperimentStateChange(e); |
| 2380 | }); |
| 2381 | }); |
| 2382 | } |
| 2383 | }, { |
| 2384 | key: "onExperimentStateChange", |
| 2385 | value: function onExperimentStateChange(e) { |
| 2386 | var experimentId = e.currentTarget.dataset.experimentId, |
| 2387 | experimentNewState = this.getExperimentActualState(experimentId); |
| 2388 | switch (experimentNewState) { |
| 2389 | case STATE_ACTIVE: |
| 2390 | if (this.shouldShowDependenciesDialog(experimentId)) { |
| 2391 | this.showDependenciesDialog(experimentId); |
| 2392 | } |
| 2393 | break; |
| 2394 | case STATE_INACTIVE: |
| 2395 | if (this.shouldShowDeactivationDialog(experimentId)) { |
| 2396 | this.showDeactivationDialog(experimentId); |
| 2397 | } else { |
| 2398 | this.deactivateDependantExperiments(experimentId); |
| 2399 | } |
| 2400 | break; |
| 2401 | default: |
| 2402 | break; |
| 2403 | } |
| 2404 | } |
| 2405 | }, { |
| 2406 | key: "getExperimentData", |
| 2407 | value: function getExperimentData(experimentId) { |
| 2408 | return elementorAdminConfig.experiments[experimentId]; |
| 2409 | } |
| 2410 | }, { |
| 2411 | key: "getExperimentDependencies", |
| 2412 | value: function getExperimentDependencies(experimentId) { |
| 2413 | var _this2 = this; |
| 2414 | return this.getExperimentData(experimentId).dependencies.map(function (dependencyId) { |
| 2415 | return _this2.getExperimentData(dependencyId); |
| 2416 | }); |
| 2417 | } |
| 2418 | }, { |
| 2419 | key: "getExperimentSelect", |
| 2420 | value: function getExperimentSelect(experimentId) { |
| 2421 | return this.elements.selects.find(function (select) { |
| 2422 | return select.matches("[data-experiment-id=\"".concat(experimentId, "\"]")); |
| 2423 | }); |
| 2424 | } |
| 2425 | }, { |
| 2426 | key: "setExperimentState", |
| 2427 | value: function setExperimentState(experimentId, state) { |
| 2428 | this.getExperimentSelect(experimentId).value = state; |
| 2429 | } |
| 2430 | }, { |
| 2431 | key: "getExperimentActualState", |
| 2432 | value: function getExperimentActualState(experimentId) { |
| 2433 | var _this$getExperimentSe; |
| 2434 | var state = (_this$getExperimentSe = this.getExperimentSelect(experimentId)) === null || _this$getExperimentSe === void 0 ? void 0 : _this$getExperimentSe.value; |
| 2435 | if (!state) { |
| 2436 | return this.getExperimentData(experimentId).state; |
| 2437 | } |
| 2438 | if (state !== STATE_DEFAULT) { |
| 2439 | return state; |
| 2440 | } |
| 2441 | |
| 2442 | // Normalize the "default" state to the actual state value. |
| 2443 | return this.isExperimentActiveByDefault(experimentId) ? STATE_ACTIVE : STATE_INACTIVE; |
| 2444 | } |
| 2445 | }, { |
| 2446 | key: "isExperimentActive", |
| 2447 | value: function isExperimentActive(experimentId) { |
| 2448 | return this.getExperimentActualState(experimentId) === STATE_ACTIVE; |
| 2449 | } |
| 2450 | }, { |
| 2451 | key: "isExperimentActiveByDefault", |
| 2452 | value: function isExperimentActiveByDefault(experimentId) { |
| 2453 | return this.getExperimentData(experimentId).default === STATE_ACTIVE; |
| 2454 | } |
| 2455 | }, { |
| 2456 | key: "areAllDependenciesActive", |
| 2457 | value: function areAllDependenciesActive(dependencies) { |
| 2458 | var _this3 = this; |
| 2459 | return dependencies.every(function (dependency) { |
| 2460 | return _this3.isExperimentActive(dependency.name); |
| 2461 | }); |
| 2462 | } |
| 2463 | }, { |
| 2464 | key: "deactivateDependantExperiments", |
| 2465 | value: function deactivateDependantExperiments(experimentId) { |
| 2466 | var _this4 = this; |
| 2467 | Object.entries(elementorAdminConfig.experiments).forEach(function (_ref2) { |
| 2468 | var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), |
| 2469 | id = _ref3[0], |
| 2470 | experimentData = _ref3[1]; |
| 2471 | var isDependant = experimentData.dependencies.includes(experimentId), |
| 2472 | isActive = _this4.getExperimentActualState(id) === STATE_ACTIVE; |
| 2473 | if (isDependant && isActive) { |
| 2474 | _this4.setExperimentState(id, STATE_INACTIVE); |
| 2475 | } |
| 2476 | }); |
| 2477 | } |
| 2478 | }, { |
| 2479 | key: "shouldShowDependenciesDialog", |
| 2480 | value: function shouldShowDependenciesDialog(experimentId) { |
| 2481 | var dependencies = this.getExperimentDependencies(experimentId); |
| 2482 | return !this.areAllDependenciesActive(dependencies); |
| 2483 | } |
| 2484 | }, { |
| 2485 | key: "shouldShowDeactivationDialog", |
| 2486 | value: function shouldShowDeactivationDialog(experimentId) { |
| 2487 | var getExperimentData = this.getExperimentData(experimentId), |
| 2488 | isInitialStateActive = getExperimentData.state === STATE_ACTIVE || getExperimentData.state === STATE_DEFAULT && getExperimentData.default === STATE_ACTIVE, |
| 2489 | hasMessage = !!this.getMessage(experimentId, 'on_deactivate'); |
| 2490 | return hasMessage && isInitialStateActive; |
| 2491 | } |
| 2492 | }, { |
| 2493 | key: "showDialog", |
| 2494 | value: function showDialog(dialog) { |
| 2495 | return elementorCommon.dialogsManager.createWidget('confirm', { |
| 2496 | id: 'e-experiments-messages-dialog', |
| 2497 | headerMessage: dialog.headerMessage, |
| 2498 | message: dialog.message, |
| 2499 | position: { |
| 2500 | my: 'center center', |
| 2501 | at: 'center center' |
| 2502 | }, |
| 2503 | strings: { |
| 2504 | confirm: dialog.strings.confirm, |
| 2505 | cancel: dialog.strings.cancel |
| 2506 | }, |
| 2507 | hide: { |
| 2508 | onOutsideClick: false, |
| 2509 | onBackgroundClick: false, |
| 2510 | onEscKeyPress: false |
| 2511 | }, |
| 2512 | onConfirm: dialog.onConfirm, |
| 2513 | onCancel: dialog.onCancel |
| 2514 | }).show(); |
| 2515 | } |
| 2516 | }, { |
| 2517 | key: "getSiteLanguageCode", |
| 2518 | value: function getSiteLanguageCode() { |
| 2519 | var languageCode = document.querySelector('html').getAttribute('lang'); |
| 2520 | return languageCode !== null && languageCode !== void 0 ? languageCode : 'en'; // Fallback to English if no language code found. |
| 2521 | } |
| 2522 | }, { |
| 2523 | key: "formatDependenciesList", |
| 2524 | value: function formatDependenciesList(dependencies) { |
| 2525 | var dependenciesTitles = dependencies.map(function (d) { |
| 2526 | return d.title; |
| 2527 | }); |
| 2528 | var languageCode = this.getSiteLanguageCode(); |
| 2529 | return new Intl.ListFormat(languageCode).format(dependenciesTitles); |
| 2530 | } |
| 2531 | }, { |
| 2532 | key: "showDependenciesDialog", |
| 2533 | value: function showDependenciesDialog(experimentId) { |
| 2534 | var _this5 = this; |
| 2535 | var experiment = this.getExperimentData(experimentId), |
| 2536 | experimentName = experiment.title, |
| 2537 | dependenciesList = this.formatDependenciesList(this.getExperimentDependencies(experimentId)); |
| 2538 | |
| 2539 | // Translators: %1$s: Experiment title, %2$s: Comma-separated dependencies list |
| 2540 | var message = __('In order to use %1$s, first you need to activate %2$s.', 'elementor').replace('%1$s', "<strong>".concat(experimentName, "</strong>")).replace('%2$s', dependenciesList); |
| 2541 | this.showDialog({ |
| 2542 | message: message, |
| 2543 | headerMessage: __('First, activate another experiment.', 'elementor'), |
| 2544 | strings: { |
| 2545 | confirm: __('Activate', 'elementor'), |
| 2546 | cancel: __('Cancel', 'elementor') |
| 2547 | }, |
| 2548 | onConfirm: function onConfirm() { |
| 2549 | _this5.getExperimentDependencies(experimentId).forEach(function (dependency) { |
| 2550 | _this5.setExperimentState(dependency.name, STATE_ACTIVE); |
| 2551 | }); |
| 2552 | _this5.elements.submit.click(); |
| 2553 | }, |
| 2554 | onCancel: function onCancel() { |
| 2555 | _this5.setExperimentState(experimentId, STATE_INACTIVE); |
| 2556 | } |
| 2557 | }); |
| 2558 | } |
| 2559 | }, { |
| 2560 | key: "showDeactivationDialog", |
| 2561 | value: function showDeactivationDialog(experimentId) { |
| 2562 | var _this6 = this; |
| 2563 | this.showDialog({ |
| 2564 | message: this.getMessage(experimentId, 'on_deactivate'), |
| 2565 | headerMessage: __('Are you sure?', 'elementor'), |
| 2566 | strings: { |
| 2567 | confirm: __('Deactivate', 'elementor'), |
| 2568 | cancel: __('Cancel', 'elementor') |
| 2569 | }, |
| 2570 | onConfirm: function onConfirm() { |
| 2571 | _this6.setExperimentState(experimentId, STATE_INACTIVE); |
| 2572 | _this6.deactivateDependantExperiments(experimentId); |
| 2573 | _this6.elements.submit.click(); |
| 2574 | }, |
| 2575 | onCancel: function onCancel() { |
| 2576 | _this6.setExperimentState(experimentId, STATE_ACTIVE); |
| 2577 | } |
| 2578 | }); |
| 2579 | } |
| 2580 | }, { |
| 2581 | key: "getMessage", |
| 2582 | value: function getMessage(experimentId, messageId) { |
| 2583 | var _this$getExperimentDa; |
| 2584 | return (_this$getExperimentDa = this.getExperimentData(experimentId)) === null || _this$getExperimentDa === void 0 ? void 0 : _this$getExperimentDa.messages[messageId]; |
| 2585 | } |
| 2586 | }]); |
| 2587 | }(); |
| 2588 | |
| 2589 | /***/ }), |
| 2590 | |
| 2591 | /***/ "../core/experiments/assets/js/admin/module.js": |
| 2592 | /*!*****************************************************!*\ |
| 2593 | !*** ../core/experiments/assets/js/admin/module.js ***! |
| 2594 | \*****************************************************/ |
| 2595 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2596 | |
| 2597 | "use strict"; |
| 2598 | |
| 2599 | |
| 2600 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2601 | Object.defineProperty(exports, "__esModule", ({ |
| 2602 | value: true |
| 2603 | })); |
| 2604 | exports["default"] = void 0; |
| 2605 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2606 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2607 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2608 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2609 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 2610 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2611 | var _experimentsMessages = _interopRequireDefault(__webpack_require__(/*! ./behaviors/experiments-messages */ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js")); |
| 2612 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 2613 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2614 | function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 2615 | var ExperimentsModule = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { |
| 2616 | function ExperimentsModule() { |
| 2617 | (0, _classCallCheck2.default)(this, ExperimentsModule); |
| 2618 | return _callSuper(this, ExperimentsModule, arguments); |
| 2619 | } |
| 2620 | (0, _inherits2.default)(ExperimentsModule, _elementorModules$Vie); |
| 2621 | return (0, _createClass2.default)(ExperimentsModule, [{ |
| 2622 | key: "getDefaultSettings", |
| 2623 | value: function getDefaultSettings() { |
| 2624 | return { |
| 2625 | selectors: { |
| 2626 | experimentIndicators: '.e-experiment__title__indicator', |
| 2627 | experimentForm: '#elementor-settings-form', |
| 2628 | experimentSelects: '.e-experiment__select', |
| 2629 | experimentsButtons: '.e-experiment__button' |
| 2630 | } |
| 2631 | }; |
| 2632 | } |
| 2633 | }, { |
| 2634 | key: "getDefaultElements", |
| 2635 | value: function getDefaultElements() { |
| 2636 | var _this$getSettings = this.getSettings(), |
| 2637 | selectors = _this$getSettings.selectors; |
| 2638 | return { |
| 2639 | $experimentIndicators: jQuery(selectors.experimentIndicators), |
| 2640 | $experimentForm: jQuery(selectors.experimentForm), |
| 2641 | $experimentSelects: jQuery(selectors.experimentSelects), |
| 2642 | $experimentsButtons: jQuery(selectors.experimentsButtons) |
| 2643 | }; |
| 2644 | } |
| 2645 | }, { |
| 2646 | key: "bindEvents", |
| 2647 | value: function bindEvents() { |
| 2648 | var _this = this; |
| 2649 | this.elements.$experimentsButtons.on('click', function (event) { |
| 2650 | return _this.onExperimentsButtonsClick(event); |
| 2651 | }); |
| 2652 | } |
| 2653 | }, { |
| 2654 | key: "onExperimentsButtonsClick", |
| 2655 | value: function onExperimentsButtonsClick(event) { |
| 2656 | var submitButton = jQuery(event.currentTarget); |
| 2657 | this.elements.$experimentSelects.val(submitButton.val()); |
| 2658 | this.elements.$experimentForm.find('#submit').trigger('click'); |
| 2659 | } |
| 2660 | }, { |
| 2661 | key: "addTipsy", |
| 2662 | value: function addTipsy($element) { |
| 2663 | $element.tipsy({ |
| 2664 | gravity: 's', |
| 2665 | offset: 8, |
| 2666 | title: function title() { |
| 2667 | return this.getAttribute('data-tooltip'); |
| 2668 | } |
| 2669 | }); |
| 2670 | } |
| 2671 | }, { |
| 2672 | key: "addIndicatorsTooltips", |
| 2673 | value: function addIndicatorsTooltips() { |
| 2674 | var _this2 = this; |
| 2675 | this.elements.$experimentIndicators.each(function (index, experimentIndicator) { |
| 2676 | return _this2.addTipsy(jQuery(experimentIndicator)); |
| 2677 | }); |
| 2678 | } |
| 2679 | }, { |
| 2680 | key: "onInit", |
| 2681 | value: function onInit() { |
| 2682 | var _this3 = this; |
| 2683 | _superPropGet(ExperimentsModule, "onInit", this, 3)([]); |
| 2684 | this.experimentsDependency = new _experimentsMessages.default({ |
| 2685 | selects: this.elements.$experimentSelects.toArray(), |
| 2686 | submit: this.elements.$experimentForm.find('#submit').get(0) |
| 2687 | }); |
| 2688 | this.experimentsDependency.bindEvents(); |
| 2689 | if (this.elements.$experimentIndicators.length) { |
| 2690 | import(/* webpackIgnore: true */"".concat(elementorCommon.config.urls.assets, "lib/tipsy/tipsy.min.js?ver=1.0.0")).then(function () { |
| 2691 | return _this3.addIndicatorsTooltips(); |
| 2692 | }); |
| 2693 | } |
| 2694 | } |
| 2695 | }]); |
| 2696 | }(elementorModules.ViewModule); |
| 2697 | |
| 2698 | /***/ }), |
| 2699 | |
| 2700 | /***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js": |
| 2701 | /*!****************************************************************************************!*\ |
| 2702 | !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js ***! |
| 2703 | \****************************************************************************************/ |
| 2704 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2705 | |
| 2706 | "use strict"; |
| 2707 | |
| 2708 | |
| 2709 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2710 | Object.defineProperty(exports, "__esModule", ({ |
| 2711 | value: true |
| 2712 | })); |
| 2713 | exports["default"] = void 0; |
| 2714 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2715 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2716 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2717 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2718 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 2719 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2720 | var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); |
| 2721 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 2722 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2723 | function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 2724 | var FloatingButtonsHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { |
| 2725 | function FloatingButtonsHandler() { |
| 2726 | (0, _classCallCheck2.default)(this, FloatingButtonsHandler); |
| 2727 | return _callSuper(this, FloatingButtonsHandler, arguments); |
| 2728 | } |
| 2729 | (0, _inherits2.default)(FloatingButtonsHandler, _AdminMenuHandler); |
| 2730 | return (0, _createClass2.default)(FloatingButtonsHandler, [{ |
| 2731 | key: "getDefaultSettings", |
| 2732 | value: function getDefaultSettings() { |
| 2733 | var pageName = 'e-floating-buttons', |
| 2734 | adminMenuSelectors = { |
| 2735 | // The escaping is done because jQuery requires it for selectors. |
| 2736 | contactPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', |
| 2737 | contactPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' |
| 2738 | }; |
| 2739 | return { |
| 2740 | selectors: { |
| 2741 | addButton: '.page-title-action:first', |
| 2742 | templatesMenuItem: '.menu-icon-elementor_library', |
| 2743 | contactPagesMenuItem: "".concat(adminMenuSelectors.contactPagesTablePage, ", ").concat(adminMenuSelectors.contactPagesAddNewPage) |
| 2744 | } |
| 2745 | }; |
| 2746 | } |
| 2747 | }, { |
| 2748 | key: "getDefaultElements", |
| 2749 | value: function getDefaultElements() { |
| 2750 | var selectors = this.getSettings('selectors'), |
| 2751 | elements = _superPropGet(FloatingButtonsHandler, "getDefaultElements", this, 3)([]); |
| 2752 | elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); |
| 2753 | elements.$contactPagesMenuItem = jQuery(selectors.contactPagesMenuItem); |
| 2754 | return elements; |
| 2755 | } |
| 2756 | }, { |
| 2757 | key: "onInit", |
| 2758 | value: function onInit() { |
| 2759 | var _elementorAdminConfig; |
| 2760 | _superPropGet(FloatingButtonsHandler, "onInit", this, 3)([]); |
| 2761 | var settings = this.getSettings(), |
| 2762 | isContactPagesTablePage = !!window.location.href.includes(settings.paths.contactPagesTablePage), |
| 2763 | isContactPagesTrashPage = !!window.location.href.includes(settings.paths.contactPagesTrashPage), |
| 2764 | isLContactPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.contactPagesAddNewPage); |
| 2765 | |
| 2766 | // We need this because there is a complex bug in the WordPress admin menu that causes the Contact Menu to be broken |
| 2767 | // When the links page has at least one post and the contact page has none. |
| 2768 | if ((_elementorAdminConfig = elementorAdminConfig.urls) !== null && _elementorAdminConfig !== void 0 && _elementorAdminConfig.viewContactPageUrl) { |
| 2769 | this.elements.$templatesMenuItem.find('li.submenu-e-contact a').attr('href', elementorAdminConfig.urls.viewContactPageUrl); |
| 2770 | } |
| 2771 | if (isContactPagesTablePage || isContactPagesTrashPage || isLContactPagesCreateYourFirstPage) { |
| 2772 | this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); |
| 2773 | this.highlightSubMenuItem(this.elements.$contactPagesMenuItem); |
| 2774 | jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLinkUrlContact); |
| 2775 | } |
| 2776 | } |
| 2777 | }]); |
| 2778 | }(_menuHandler.default); |
| 2779 | |
| 2780 | /***/ }), |
| 2781 | |
| 2782 | /***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js": |
| 2783 | /*!******************************************************************************!*\ |
| 2784 | !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/module.js ***! |
| 2785 | \******************************************************************************/ |
| 2786 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2787 | |
| 2788 | "use strict"; |
| 2789 | |
| 2790 | |
| 2791 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2792 | Object.defineProperty(exports, "__esModule", ({ |
| 2793 | value: true |
| 2794 | })); |
| 2795 | exports["default"] = void 0; |
| 2796 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2797 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2798 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2799 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2800 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2801 | var _floatingButtons = _interopRequireDefault(__webpack_require__(/*! ./floating-buttons */ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js")); |
| 2802 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 2803 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2804 | var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { |
| 2805 | function _default() { |
| 2806 | var _this; |
| 2807 | (0, _classCallCheck2.default)(this, _default); |
| 2808 | _this = _callSuper(this, _default); |
| 2809 | elementorCommon.elements.$window.on('elementor/admin/init', function () { |
| 2810 | _this.runHandler(); |
| 2811 | }); |
| 2812 | return _this; |
| 2813 | } |
| 2814 | (0, _inherits2.default)(_default, _elementorModules$Mod); |
| 2815 | return (0, _createClass2.default)(_default, [{ |
| 2816 | key: "runHandler", |
| 2817 | value: function runHandler() { |
| 2818 | var pageNameContact = 'e-floating-buttons', |
| 2819 | paths = { |
| 2820 | contactPagesTablePage: 'edit.php?post_type=' + pageNameContact, |
| 2821 | contactPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageNameContact, |
| 2822 | contactPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageNameContact |
| 2823 | }, |
| 2824 | args = { |
| 2825 | paths: paths |
| 2826 | }; |
| 2827 | |
| 2828 | // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core |
| 2829 | // and could not be modified in the backend. |
| 2830 | new _floatingButtons.default(args); |
| 2831 | } |
| 2832 | }]); |
| 2833 | }(elementorModules.Module); |
| 2834 | |
| 2835 | /***/ }), |
| 2836 | |
| 2837 | /***/ "../modules/landing-pages/assets/js/admin/landing-pages.js": |
| 2838 | /*!*****************************************************************!*\ |
| 2839 | !*** ../modules/landing-pages/assets/js/admin/landing-pages.js ***! |
| 2840 | \*****************************************************************/ |
| 2841 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2842 | |
| 2843 | "use strict"; |
| 2844 | |
| 2845 | |
| 2846 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2847 | Object.defineProperty(exports, "__esModule", ({ |
| 2848 | value: true |
| 2849 | })); |
| 2850 | exports["default"] = void 0; |
| 2851 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2852 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2853 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2854 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2855 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 2856 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2857 | var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); |
| 2858 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 2859 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2860 | function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 2861 | var LandingPagesHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { |
| 2862 | function LandingPagesHandler() { |
| 2863 | (0, _classCallCheck2.default)(this, LandingPagesHandler); |
| 2864 | return _callSuper(this, LandingPagesHandler, arguments); |
| 2865 | } |
| 2866 | (0, _inherits2.default)(LandingPagesHandler, _AdminMenuHandler); |
| 2867 | return (0, _createClass2.default)(LandingPagesHandler, [{ |
| 2868 | key: "getDefaultSettings", |
| 2869 | value: function getDefaultSettings() { |
| 2870 | var pageName = 'e-landing-page', |
| 2871 | adminMenuSelectors = { |
| 2872 | // The escaping is done because jQuery requires it for selectors. |
| 2873 | landingPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', |
| 2874 | landingPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' |
| 2875 | }; |
| 2876 | return { |
| 2877 | selectors: { |
| 2878 | addButton: '.page-title-action:first', |
| 2879 | pagesMenuItemAndLink: '#menu-pages, #menu-pages > a', |
| 2880 | landingPagesMenuItem: "".concat(adminMenuSelectors.landingPagesTablePage, ", ").concat(adminMenuSelectors.landingPagesAddNewPage), |
| 2881 | templatesMenuItem: '.menu-icon-elementor_library' |
| 2882 | } |
| 2883 | }; |
| 2884 | } |
| 2885 | }, { |
| 2886 | key: "getDefaultElements", |
| 2887 | value: function getDefaultElements() { |
| 2888 | var selectors = this.getSettings('selectors'), |
| 2889 | elements = _superPropGet(LandingPagesHandler, "getDefaultElements", this, 3)([]); |
| 2890 | elements.$landingPagesMenuItem = jQuery(selectors.landingPagesMenuItem); |
| 2891 | elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); |
| 2892 | elements.$pagesMenuItemAndLink = jQuery(selectors.pagesMenuItemAndLink); |
| 2893 | return elements; |
| 2894 | } |
| 2895 | }, { |
| 2896 | key: "onInit", |
| 2897 | value: function onInit() { |
| 2898 | _superPropGet(LandingPagesHandler, "onInit", this, 3)([]); |
| 2899 | var settings = this.getSettings(), |
| 2900 | isLandingPagesTablePage = !!window.location.href.includes(settings.paths.landingPagesTablePage), |
| 2901 | isLandingPagesTrashPage = !!window.location.href.includes(settings.paths.landingPagesTrashPage), |
| 2902 | isLandingPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.landingPagesAddNewPage); |
| 2903 | |
| 2904 | // If the current page is a Landing Pages Page (the Posts Table page, "Create Your First.." page, or a native |
| 2905 | // WordPress dashboard page edit screen when using WordPress' Classic Editor). |
| 2906 | if (isLandingPagesTablePage || isLandingPagesTrashPage || isLandingPagesCreateYourFirstPage || settings.isLandingPageAdminEdit) { |
| 2907 | // Make sure the active admin top level menu item is 'Templates', and not 'Pages'. |
| 2908 | this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); |
| 2909 | this.highlightSubMenuItem(this.elements.$landingPagesMenuItem); |
| 2910 | |
| 2911 | // Overwrite the 'Add New' button at the top of the page to open in Elementor with the library module open. |
| 2912 | jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLandingPageUrl); |
| 2913 | } |
| 2914 | } |
| 2915 | }]); |
| 2916 | }(_menuHandler.default); |
| 2917 | |
| 2918 | /***/ }), |
| 2919 | |
| 2920 | /***/ "../modules/landing-pages/assets/js/admin/module.js": |
| 2921 | /*!**********************************************************!*\ |
| 2922 | !*** ../modules/landing-pages/assets/js/admin/module.js ***! |
| 2923 | \**********************************************************/ |
| 2924 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2925 | |
| 2926 | "use strict"; |
| 2927 | |
| 2928 | |
| 2929 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2930 | Object.defineProperty(exports, "__esModule", ({ |
| 2931 | value: true |
| 2932 | })); |
| 2933 | exports["default"] = void 0; |
| 2934 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2935 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2936 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2937 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2938 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2939 | var _landingPages = _interopRequireDefault(__webpack_require__(/*! ./landing-pages */ "../modules/landing-pages/assets/js/admin/landing-pages.js")); |
| 2940 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 2941 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2942 | var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { |
| 2943 | function _default() { |
| 2944 | var _this; |
| 2945 | (0, _classCallCheck2.default)(this, _default); |
| 2946 | _this = _callSuper(this, _default); |
| 2947 | elementorCommon.elements.$window.on('elementor/admin/init', function () { |
| 2948 | _this.runHandler(); |
| 2949 | }); |
| 2950 | return _this; |
| 2951 | } |
| 2952 | (0, _inherits2.default)(_default, _elementorModules$Mod); |
| 2953 | return (0, _createClass2.default)(_default, [{ |
| 2954 | key: "runHandler", |
| 2955 | value: function runHandler() { |
| 2956 | var _elementorAdmin$confi, _elementorAdmin$confi2; |
| 2957 | var pageName = 'e-landing-page', |
| 2958 | paths = { |
| 2959 | landingPagesTablePage: 'edit.php?post_type=' + pageName, |
| 2960 | landingPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageName, |
| 2961 | landingPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageName |
| 2962 | }, |
| 2963 | args = { |
| 2964 | path: (_elementorAdmin$confi = elementorAdmin.config.landingPages) !== null && _elementorAdmin$confi !== void 0 && _elementorAdmin$confi.landingPagesHasPages ? paths.landingPagesTablePage : paths.landingPagesAddNewPage, |
| 2965 | isLandingPageAdminEdit: (_elementorAdmin$confi2 = elementorAdmin.config.landingPages) === null || _elementorAdmin$confi2 === void 0 ? void 0 : _elementorAdmin$confi2.isLandingPageAdminEdit, |
| 2966 | paths: paths |
| 2967 | }; |
| 2968 | |
| 2969 | // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core |
| 2970 | // and could not be modified in the backend. |
| 2971 | new _landingPages.default(args); |
| 2972 | } |
| 2973 | }]); |
| 2974 | }(elementorModules.Module); |
| 2975 | |
| 2976 | /***/ }), |
| 2977 | |
| 2978 | /***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": |
| 2979 | /*!***************************************************************!*\ |
| 2980 | !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! |
| 2981 | \***************************************************************/ |
| 2982 | /***/ ((module) => { |
| 2983 | |
| 2984 | function _OverloadYield(e, d) { |
| 2985 | this.v = e, this.k = d; |
| 2986 | } |
| 2987 | module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2988 | |
| 2989 | /***/ }), |
| 2990 | |
| 2991 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 2992 | /*!******************************************************************!*\ |
| 2993 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 2994 | \******************************************************************/ |
| 2995 | /***/ ((module) => { |
| 2996 | |
| 2997 | function _arrayLikeToArray(r, a) { |
| 2998 | (null == a || a > r.length) && (a = r.length); |
| 2999 | for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 3000 | return n; |
| 3001 | } |
| 3002 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3003 | |
| 3004 | /***/ }), |
| 3005 | |
| 3006 | /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 3007 | /*!****************************************************************!*\ |
| 3008 | !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 3009 | \****************************************************************/ |
| 3010 | /***/ ((module) => { |
| 3011 | |
| 3012 | function _arrayWithHoles(r) { |
| 3013 | if (Array.isArray(r)) return r; |
| 3014 | } |
| 3015 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3016 | |
| 3017 | /***/ }), |
| 3018 | |
| 3019 | /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 3020 | /*!***********************************************************************!*\ |
| 3021 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 3022 | \***********************************************************************/ |
| 3023 | /***/ ((module) => { |
| 3024 | |
| 3025 | function _assertThisInitialized(e) { |
| 3026 | if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 3027 | return e; |
| 3028 | } |
| 3029 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3030 | |
| 3031 | /***/ }), |
| 3032 | |
| 3033 | /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": |
| 3034 | /*!******************************************************************!*\ |
| 3035 | !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! |
| 3036 | \******************************************************************/ |
| 3037 | /***/ ((module) => { |
| 3038 | |
| 3039 | function asyncGeneratorStep(n, t, e, r, o, a, c) { |
| 3040 | try { |
| 3041 | var i = n[a](c), |
| 3042 | u = i.value; |
| 3043 | } catch (n) { |
| 3044 | return void e(n); |
| 3045 | } |
| 3046 | i.done ? t(u) : Promise.resolve(u).then(r, o); |
| 3047 | } |
| 3048 | function _asyncToGenerator(n) { |
| 3049 | return function () { |
| 3050 | var t = this, |
| 3051 | e = arguments; |
| 3052 | return new Promise(function (r, o) { |
| 3053 | var a = n.apply(t, e); |
| 3054 | function _next(n) { |
| 3055 | asyncGeneratorStep(a, r, o, _next, _throw, "next", n); |
| 3056 | } |
| 3057 | function _throw(n) { |
| 3058 | asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); |
| 3059 | } |
| 3060 | _next(void 0); |
| 3061 | }); |
| 3062 | }; |
| 3063 | } |
| 3064 | module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3065 | |
| 3066 | /***/ }), |
| 3067 | |
| 3068 | /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 3069 | /*!****************************************************************!*\ |
| 3070 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 3071 | \****************************************************************/ |
| 3072 | /***/ ((module) => { |
| 3073 | |
| 3074 | function _classCallCheck(a, n) { |
| 3075 | if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 3076 | } |
| 3077 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3078 | |
| 3079 | /***/ }), |
| 3080 | |
| 3081 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 3082 | /*!*************************************************************!*\ |
| 3083 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 3084 | \*************************************************************/ |
| 3085 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3086 | |
| 3087 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 3088 | function _defineProperties(e, r) { |
| 3089 | for (var t = 0; t < r.length; t++) { |
| 3090 | var o = r[t]; |
| 3091 | o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 3092 | } |
| 3093 | } |
| 3094 | function _createClass(e, r, t) { |
| 3095 | return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 3096 | writable: !1 |
| 3097 | }), e; |
| 3098 | } |
| 3099 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3100 | |
| 3101 | /***/ }), |
| 3102 | |
| 3103 | /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 3104 | /*!****************************************************************!*\ |
| 3105 | !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 3106 | \****************************************************************/ |
| 3107 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3108 | |
| 3109 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 3110 | function _defineProperty(e, r, t) { |
| 3111 | return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 3112 | value: t, |
| 3113 | enumerable: !0, |
| 3114 | configurable: !0, |
| 3115 | writable: !0 |
| 3116 | }) : e[r] = t, e; |
| 3117 | } |
| 3118 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3119 | |
| 3120 | /***/ }), |
| 3121 | |
| 3122 | /***/ "../node_modules/@babel/runtime/helpers/get.js": |
| 3123 | /*!*****************************************************!*\ |
| 3124 | !*** ../node_modules/@babel/runtime/helpers/get.js ***! |
| 3125 | \*****************************************************/ |
| 3126 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3127 | |
| 3128 | var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 3129 | function _get() { |
| 3130 | return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { |
| 3131 | var p = superPropBase(e, t); |
| 3132 | if (p) { |
| 3133 | var n = Object.getOwnPropertyDescriptor(p, t); |
| 3134 | return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; |
| 3135 | } |
| 3136 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); |
| 3137 | } |
| 3138 | module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3139 | |
| 3140 | /***/ }), |
| 3141 | |
| 3142 | /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": |
| 3143 | /*!****************************************************************!*\ |
| 3144 | !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 3145 | \****************************************************************/ |
| 3146 | /***/ ((module) => { |
| 3147 | |
| 3148 | function _getPrototypeOf(t) { |
| 3149 | return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { |
| 3150 | return t.__proto__ || Object.getPrototypeOf(t); |
| 3151 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); |
| 3152 | } |
| 3153 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3154 | |
| 3155 | /***/ }), |
| 3156 | |
| 3157 | /***/ "../node_modules/@babel/runtime/helpers/inherits.js": |
| 3158 | /*!**********************************************************!*\ |
| 3159 | !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! |
| 3160 | \**********************************************************/ |
| 3161 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3162 | |
| 3163 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 3164 | function _inherits(t, e) { |
| 3165 | if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 3166 | t.prototype = Object.create(e && e.prototype, { |
| 3167 | constructor: { |
| 3168 | value: t, |
| 3169 | writable: !0, |
| 3170 | configurable: !0 |
| 3171 | } |
| 3172 | }), Object.defineProperty(t, "prototype", { |
| 3173 | writable: !1 |
| 3174 | }), e && setPrototypeOf(t, e); |
| 3175 | } |
| 3176 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3177 | |
| 3178 | /***/ }), |
| 3179 | |
| 3180 | /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 3181 | /*!***********************************************************************!*\ |
| 3182 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 3183 | \***********************************************************************/ |
| 3184 | /***/ ((module) => { |
| 3185 | |
| 3186 | function _interopRequireDefault(e) { |
| 3187 | return e && e.__esModule ? e : { |
| 3188 | "default": e |
| 3189 | }; |
| 3190 | } |
| 3191 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3192 | |
| 3193 | /***/ }), |
| 3194 | |
| 3195 | /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 3196 | /*!**********************************************************************!*\ |
| 3197 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 3198 | \**********************************************************************/ |
| 3199 | /***/ ((module) => { |
| 3200 | |
| 3201 | function _iterableToArrayLimit(r, l) { |
| 3202 | var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 3203 | if (null != t) { |
| 3204 | var e, |
| 3205 | n, |
| 3206 | i, |
| 3207 | u, |
| 3208 | a = [], |
| 3209 | f = !0, |
| 3210 | o = !1; |
| 3211 | try { |
| 3212 | if (i = (t = t.call(r)).next, 0 === l) { |
| 3213 | if (Object(t) !== t) return; |
| 3214 | f = !1; |
| 3215 | } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 3216 | } catch (r) { |
| 3217 | o = !0, n = r; |
| 3218 | } finally { |
| 3219 | try { |
| 3220 | if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 3221 | } finally { |
| 3222 | if (o) throw n; |
| 3223 | } |
| 3224 | } |
| 3225 | return a; |
| 3226 | } |
| 3227 | } |
| 3228 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3229 | |
| 3230 | /***/ }), |
| 3231 | |
| 3232 | /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 3233 | /*!*****************************************************************!*\ |
| 3234 | !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 3235 | \*****************************************************************/ |
| 3236 | /***/ ((module) => { |
| 3237 | |
| 3238 | function _nonIterableRest() { |
| 3239 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 3240 | } |
| 3241 | module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3242 | |
| 3243 | /***/ }), |
| 3244 | |
| 3245 | /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 3246 | /*!***************************************************************************!*\ |
| 3247 | !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 3248 | \***************************************************************************/ |
| 3249 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3250 | |
| 3251 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 3252 | var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 3253 | function _possibleConstructorReturn(t, e) { |
| 3254 | if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 3255 | if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 3256 | return assertThisInitialized(t); |
| 3257 | } |
| 3258 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3259 | |
| 3260 | /***/ }), |
| 3261 | |
| 3262 | /***/ "../node_modules/@babel/runtime/helpers/regenerator.js": |
| 3263 | /*!*************************************************************!*\ |
| 3264 | !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! |
| 3265 | \*************************************************************/ |
| 3266 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3267 | |
| 3268 | var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 3269 | function _regenerator() { |
| 3270 | /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ |
| 3271 | var e, |
| 3272 | t, |
| 3273 | r = "function" == typeof Symbol ? Symbol : {}, |
| 3274 | n = r.iterator || "@@iterator", |
| 3275 | o = r.toStringTag || "@@toStringTag"; |
| 3276 | function i(r, n, o, i) { |
| 3277 | var c = n && n.prototype instanceof Generator ? n : Generator, |
| 3278 | u = Object.create(c.prototype); |
| 3279 | return regeneratorDefine(u, "_invoke", function (r, n, o) { |
| 3280 | var i, |
| 3281 | c, |
| 3282 | u, |
| 3283 | f = 0, |
| 3284 | p = o || [], |
| 3285 | y = !1, |
| 3286 | G = { |
| 3287 | p: 0, |
| 3288 | n: 0, |
| 3289 | v: e, |
| 3290 | a: d, |
| 3291 | f: d.bind(e, 4), |
| 3292 | d: function d(t, r) { |
| 3293 | return i = t, c = 0, u = e, G.n = r, a; |
| 3294 | } |
| 3295 | }; |
| 3296 | function d(r, n) { |
| 3297 | for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { |
| 3298 | var o, |
| 3299 | i = p[t], |
| 3300 | d = G.p, |
| 3301 | l = i[2]; |
| 3302 | r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); |
| 3303 | } |
| 3304 | if (o || r > 1) return a; |
| 3305 | throw y = !0, n; |
| 3306 | } |
| 3307 | return function (o, p, l) { |
| 3308 | if (f > 1) throw TypeError("Generator is already running"); |
| 3309 | for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { |
| 3310 | i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); |
| 3311 | try { |
| 3312 | if (f = 2, i) { |
| 3313 | if (c || (o = "next"), t = i[o]) { |
| 3314 | if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); |
| 3315 | if (!t.done) return t; |
| 3316 | u = t.value, c < 2 && (c = 0); |
| 3317 | } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); |
| 3318 | i = e; |
| 3319 | } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; |
| 3320 | } catch (t) { |
| 3321 | i = e, c = 1, u = t; |
| 3322 | } finally { |
| 3323 | f = 1; |
| 3324 | } |
| 3325 | } |
| 3326 | return { |
| 3327 | value: t, |
| 3328 | done: y |
| 3329 | }; |
| 3330 | }; |
| 3331 | }(r, o, i), !0), u; |
| 3332 | } |
| 3333 | var a = {}; |
| 3334 | function Generator() {} |
| 3335 | function GeneratorFunction() {} |
| 3336 | function GeneratorFunctionPrototype() {} |
| 3337 | t = Object.getPrototypeOf; |
| 3338 | var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { |
| 3339 | return this; |
| 3340 | }), t), |
| 3341 | u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); |
| 3342 | function f(e) { |
| 3343 | return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; |
| 3344 | } |
| 3345 | return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { |
| 3346 | return this; |
| 3347 | }), regeneratorDefine(u, "toString", function () { |
| 3348 | return "[object Generator]"; |
| 3349 | }), (module.exports = _regenerator = function _regenerator() { |
| 3350 | return { |
| 3351 | w: i, |
| 3352 | m: f |
| 3353 | }; |
| 3354 | }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 3355 | } |
| 3356 | module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3357 | |
| 3358 | /***/ }), |
| 3359 | |
| 3360 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": |
| 3361 | /*!******************************************************************!*\ |
| 3362 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! |
| 3363 | \******************************************************************/ |
| 3364 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3365 | |
| 3366 | var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 3367 | function _regeneratorAsync(n, e, r, t, o) { |
| 3368 | var a = regeneratorAsyncGen(n, e, r, t, o); |
| 3369 | return a.next().then(function (n) { |
| 3370 | return n.done ? n.value : a.next(); |
| 3371 | }); |
| 3372 | } |
| 3373 | module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3374 | |
| 3375 | /***/ }), |
| 3376 | |
| 3377 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": |
| 3378 | /*!*********************************************************************!*\ |
| 3379 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! |
| 3380 | \*********************************************************************/ |
| 3381 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3382 | |
| 3383 | var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 3384 | var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 3385 | function _regeneratorAsyncGen(r, e, t, o, n) { |
| 3386 | return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); |
| 3387 | } |
| 3388 | module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3389 | |
| 3390 | /***/ }), |
| 3391 | |
| 3392 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": |
| 3393 | /*!**************************************************************************!*\ |
| 3394 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! |
| 3395 | \**************************************************************************/ |
| 3396 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3397 | |
| 3398 | var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 3399 | var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 3400 | function AsyncIterator(t, e) { |
| 3401 | function n(r, o, i, f) { |
| 3402 | try { |
| 3403 | var c = t[r](o), |
| 3404 | u = c.value; |
| 3405 | return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { |
| 3406 | n("next", t, i, f); |
| 3407 | }, function (t) { |
| 3408 | n("throw", t, i, f); |
| 3409 | }) : e.resolve(u).then(function (t) { |
| 3410 | c.value = t, i(c); |
| 3411 | }, function (t) { |
| 3412 | return n("throw", t, i, f); |
| 3413 | }); |
| 3414 | } catch (t) { |
| 3415 | f(t); |
| 3416 | } |
| 3417 | } |
| 3418 | var r; |
| 3419 | this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { |
| 3420 | return this; |
| 3421 | })), regeneratorDefine(this, "_invoke", function (t, o, i) { |
| 3422 | function f() { |
| 3423 | return new e(function (e, r) { |
| 3424 | n(t, i, e, r); |
| 3425 | }); |
| 3426 | } |
| 3427 | return r = r ? r.then(f, f) : f(); |
| 3428 | }, !0); |
| 3429 | } |
| 3430 | module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3431 | |
| 3432 | /***/ }), |
| 3433 | |
| 3434 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": |
| 3435 | /*!*******************************************************************!*\ |
| 3436 | !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! |
| 3437 | \*******************************************************************/ |
| 3438 | /***/ ((module) => { |
| 3439 | |
| 3440 | function _regeneratorDefine(e, r, n, t) { |
| 3441 | var i = Object.defineProperty; |
| 3442 | try { |
| 3443 | i({}, "", {}); |
| 3444 | } catch (e) { |
| 3445 | i = 0; |
| 3446 | } |
| 3447 | module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { |
| 3448 | function o(r, n) { |
| 3449 | _regeneratorDefine(e, r, function (e) { |
| 3450 | return this._invoke(r, n, e); |
| 3451 | }); |
| 3452 | } |
| 3453 | r ? i ? i(e, r, { |
| 3454 | value: n, |
| 3455 | enumerable: !t, |
| 3456 | configurable: !t, |
| 3457 | writable: !t |
| 3458 | }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); |
| 3459 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); |
| 3460 | } |
| 3461 | module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3462 | |
| 3463 | /***/ }), |
| 3464 | |
| 3465 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": |
| 3466 | /*!*****************************************************************!*\ |
| 3467 | !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! |
| 3468 | \*****************************************************************/ |
| 3469 | /***/ ((module) => { |
| 3470 | |
| 3471 | function _regeneratorKeys(e) { |
| 3472 | var n = Object(e), |
| 3473 | r = []; |
| 3474 | for (var t in n) r.unshift(t); |
| 3475 | return function e() { |
| 3476 | for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; |
| 3477 | return e.done = !0, e; |
| 3478 | }; |
| 3479 | } |
| 3480 | module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3481 | |
| 3482 | /***/ }), |
| 3483 | |
| 3484 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": |
| 3485 | /*!********************************************************************!*\ |
| 3486 | !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! |
| 3487 | \********************************************************************/ |
| 3488 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3489 | |
| 3490 | var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 3491 | var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 3492 | var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); |
| 3493 | var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 3494 | var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 3495 | var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); |
| 3496 | var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); |
| 3497 | function _regeneratorRuntime() { |
| 3498 | "use strict"; |
| 3499 | |
| 3500 | var r = regenerator(), |
| 3501 | e = r.m(_regeneratorRuntime), |
| 3502 | t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; |
| 3503 | function n(r) { |
| 3504 | var e = "function" == typeof r && r.constructor; |
| 3505 | return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); |
| 3506 | } |
| 3507 | var o = { |
| 3508 | "throw": 1, |
| 3509 | "return": 2, |
| 3510 | "break": 3, |
| 3511 | "continue": 3 |
| 3512 | }; |
| 3513 | function a(r) { |
| 3514 | var e, t; |
| 3515 | return function (n) { |
| 3516 | e || (e = { |
| 3517 | stop: function stop() { |
| 3518 | return t(n.a, 2); |
| 3519 | }, |
| 3520 | "catch": function _catch() { |
| 3521 | return n.v; |
| 3522 | }, |
| 3523 | abrupt: function abrupt(r, e) { |
| 3524 | return t(n.a, o[r], e); |
| 3525 | }, |
| 3526 | delegateYield: function delegateYield(r, o, a) { |
| 3527 | return e.resultName = o, t(n.d, regeneratorValues(r), a); |
| 3528 | }, |
| 3529 | finish: function finish(r) { |
| 3530 | return t(n.f, r); |
| 3531 | } |
| 3532 | }, t = function t(r, _t, o) { |
| 3533 | n.p = e.prev, n.n = e.next; |
| 3534 | try { |
| 3535 | return r(_t, o); |
| 3536 | } finally { |
| 3537 | e.next = n.n; |
| 3538 | } |
| 3539 | }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; |
| 3540 | try { |
| 3541 | return r.call(this, e); |
| 3542 | } finally { |
| 3543 | n.p = e.prev, n.n = e.next; |
| 3544 | } |
| 3545 | }; |
| 3546 | } |
| 3547 | return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { |
| 3548 | return { |
| 3549 | wrap: function wrap(e, t, n, o) { |
| 3550 | return r.w(a(e), t, n, o && o.reverse()); |
| 3551 | }, |
| 3552 | isGeneratorFunction: n, |
| 3553 | mark: r.m, |
| 3554 | awrap: function awrap(r, e) { |
| 3555 | return new OverloadYield(r, e); |
| 3556 | }, |
| 3557 | AsyncIterator: regeneratorAsyncIterator, |
| 3558 | async: function async(r, e, t, o, u) { |
| 3559 | return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); |
| 3560 | }, |
| 3561 | keys: regeneratorKeys, |
| 3562 | values: regeneratorValues |
| 3563 | }; |
| 3564 | }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 3565 | } |
| 3566 | module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3567 | |
| 3568 | /***/ }), |
| 3569 | |
| 3570 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": |
| 3571 | /*!*******************************************************************!*\ |
| 3572 | !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! |
| 3573 | \*******************************************************************/ |
| 3574 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3575 | |
| 3576 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 3577 | function _regeneratorValues(e) { |
| 3578 | if (null != e) { |
| 3579 | var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], |
| 3580 | r = 0; |
| 3581 | if (t) return t.call(e); |
| 3582 | if ("function" == typeof e.next) return e; |
| 3583 | if (!isNaN(e.length)) return { |
| 3584 | next: function next() { |
| 3585 | return e && r >= e.length && (e = void 0), { |
| 3586 | value: e && e[r++], |
| 3587 | done: !e |
| 3588 | }; |
| 3589 | } |
| 3590 | }; |
| 3591 | } |
| 3592 | throw new TypeError(_typeof(e) + " is not iterable"); |
| 3593 | } |
| 3594 | module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3595 | |
| 3596 | /***/ }), |
| 3597 | |
| 3598 | /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 3599 | /*!****************************************************************!*\ |
| 3600 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 3601 | \****************************************************************/ |
| 3602 | /***/ ((module) => { |
| 3603 | |
| 3604 | function _setPrototypeOf(t, e) { |
| 3605 | return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { |
| 3606 | return t.__proto__ = e, t; |
| 3607 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); |
| 3608 | } |
| 3609 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3610 | |
| 3611 | /***/ }), |
| 3612 | |
| 3613 | /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 3614 | /*!***************************************************************!*\ |
| 3615 | !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 3616 | \***************************************************************/ |
| 3617 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3618 | |
| 3619 | var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 3620 | var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 3621 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 3622 | var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 3623 | function _slicedToArray(r, e) { |
| 3624 | return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 3625 | } |
| 3626 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3627 | |
| 3628 | /***/ }), |
| 3629 | |
| 3630 | /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": |
| 3631 | /*!***************************************************************!*\ |
| 3632 | !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! |
| 3633 | \***************************************************************/ |
| 3634 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3635 | |
| 3636 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 3637 | function _superPropBase(t, o) { |
| 3638 | for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); |
| 3639 | return t; |
| 3640 | } |
| 3641 | module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3642 | |
| 3643 | /***/ }), |
| 3644 | |
| 3645 | /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 3646 | /*!*************************************************************!*\ |
| 3647 | !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 3648 | \*************************************************************/ |
| 3649 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3650 | |
| 3651 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 3652 | function toPrimitive(t, r) { |
| 3653 | if ("object" != _typeof(t) || !t) return t; |
| 3654 | var e = t[Symbol.toPrimitive]; |
| 3655 | if (void 0 !== e) { |
| 3656 | var i = e.call(t, r || "default"); |
| 3657 | if ("object" != _typeof(i)) return i; |
| 3658 | throw new TypeError("@@toPrimitive must return a primitive value."); |
| 3659 | } |
| 3660 | return ("string" === r ? String : Number)(t); |
| 3661 | } |
| 3662 | module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3663 | |
| 3664 | /***/ }), |
| 3665 | |
| 3666 | /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 3667 | /*!***************************************************************!*\ |
| 3668 | !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 3669 | \***************************************************************/ |
| 3670 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3671 | |
| 3672 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 3673 | var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 3674 | function toPropertyKey(t) { |
| 3675 | var i = toPrimitive(t, "string"); |
| 3676 | return "symbol" == _typeof(i) ? i : i + ""; |
| 3677 | } |
| 3678 | module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3679 | |
| 3680 | /***/ }), |
| 3681 | |
| 3682 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 3683 | /*!********************************************************!*\ |
| 3684 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 3685 | \********************************************************/ |
| 3686 | /***/ ((module) => { |
| 3687 | |
| 3688 | function _typeof(o) { |
| 3689 | "@babel/helpers - typeof"; |
| 3690 | |
| 3691 | return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 3692 | return typeof o; |
| 3693 | } : function (o) { |
| 3694 | return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 3695 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 3696 | } |
| 3697 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3698 | |
| 3699 | /***/ }), |
| 3700 | |
| 3701 | /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 3702 | /*!****************************************************************************!*\ |
| 3703 | !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 3704 | \****************************************************************************/ |
| 3705 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3706 | |
| 3707 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 3708 | function _unsupportedIterableToArray(r, a) { |
| 3709 | if (r) { |
| 3710 | if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 3711 | var t = {}.toString.call(r).slice(8, -1); |
| 3712 | return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; |
| 3713 | } |
| 3714 | } |
| 3715 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3716 | |
| 3717 | /***/ }), |
| 3718 | |
| 3719 | /***/ "../node_modules/@babel/runtime/regenerator/index.js": |
| 3720 | /*!***********************************************************!*\ |
| 3721 | !*** ../node_modules/@babel/runtime/regenerator/index.js ***! |
| 3722 | \***********************************************************/ |
| 3723 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3724 | |
| 3725 | // TODO(Babel 8): Remove this file. |
| 3726 | |
| 3727 | var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); |
| 3728 | module.exports = runtime; |
| 3729 | |
| 3730 | // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= |
| 3731 | try { |
| 3732 | regeneratorRuntime = runtime; |
| 3733 | } catch (accidentalStrictMode) { |
| 3734 | if (typeof globalThis === "object") { |
| 3735 | globalThis.regeneratorRuntime = runtime; |
| 3736 | } else { |
| 3737 | Function("r", "regeneratorRuntime = r")(runtime); |
| 3738 | } |
| 3739 | } |
| 3740 | |
| 3741 | |
| 3742 | /***/ }), |
| 3743 | |
| 3744 | /***/ "@wordpress/i18n": |
| 3745 | /*!**************************!*\ |
| 3746 | !*** external "wp.i18n" ***! |
| 3747 | \**************************/ |
| 3748 | /***/ ((module) => { |
| 3749 | |
| 3750 | "use strict"; |
| 3751 | module.exports = wp.i18n; |
| 3752 | |
| 3753 | /***/ }) |
| 3754 | |
| 3755 | /******/ }); |
| 3756 | /************************************************************************/ |
| 3757 | /******/ // The module cache |
| 3758 | /******/ var __webpack_module_cache__ = {}; |
| 3759 | /******/ |
| 3760 | /******/ // The require function |
| 3761 | /******/ function __webpack_require__(moduleId) { |
| 3762 | /******/ // Check if module is in cache |
| 3763 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 3764 | /******/ if (cachedModule !== undefined) { |
| 3765 | /******/ return cachedModule.exports; |
| 3766 | /******/ } |
| 3767 | /******/ // Create a new module (and put it into the cache) |
| 3768 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 3769 | /******/ // no module.id needed |
| 3770 | /******/ // no module.loaded needed |
| 3771 | /******/ exports: {} |
| 3772 | /******/ }; |
| 3773 | /******/ |
| 3774 | /******/ // Execute the module function |
| 3775 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 3776 | /******/ |
| 3777 | /******/ // Return the exports of the module |
| 3778 | /******/ return module.exports; |
| 3779 | /******/ } |
| 3780 | /******/ |
| 3781 | /************************************************************************/ |
| 3782 | var __webpack_exports__ = {}; |
| 3783 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 3784 | (() => { |
| 3785 | "use strict"; |
| 3786 | /*!***************************************!*\ |
| 3787 | !*** ../assets/dev/js/admin/admin.js ***! |
| 3788 | \***************************************/ |
| 3789 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 3790 | |
| 3791 | |
| 3792 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 3793 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 3794 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 3795 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 3796 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/modules/landing-pages/assets/js/admin/module */ "../modules/landing-pages/assets/js/admin/module.js")); |
| 3797 | var _module2 = _interopRequireDefault(__webpack_require__(/*! elementor/core/experiments/assets/js/admin/module */ "../core/experiments/assets/js/admin/module.js")); |
| 3798 | var _environment = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/assets/js/utils/environment */ "../core/common/assets/js/utils/environment.js")); |
| 3799 | var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js")); |
| 3800 | var _filesUploadHandler = _interopRequireDefault(__webpack_require__(/*! ../editor/utils/files-upload-handler */ "../assets/dev/js/editor/utils/files-upload-handler.js")); |
| 3801 | var _templateControls = _interopRequireDefault(__webpack_require__(/*! ./new-template/template-controls.js */ "../assets/dev/js/admin/new-template/template-controls.js")); |
| 3802 | var _jsonUploadWarningMessage = __webpack_require__(/*! elementor-utils/json-upload-warning-message */ "../assets/dev/js/utils/json-upload-warning-message.js"); |
| 3803 | var _module3 = _interopRequireDefault(__webpack_require__(/*! elementor/modules/floating-buttons/assets/js/floating-buttons/admin/module */ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js")); |
| 3804 | __webpack_require__(/*! elementor-app/event-track/wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js"); |
| 3805 | (function ($) { |
| 3806 | var ElementorAdmin = elementorModules.ViewModule.extend({ |
| 3807 | maintenanceMode: null, |
| 3808 | config: elementorAdminConfig, |
| 3809 | getDefaultElements: function getDefaultElements() { |
| 3810 | var elements = { |
| 3811 | $switchMode: $('#elementor-switch-mode'), |
| 3812 | $goToEditLink: $('#elementor-go-to-edit-page-link'), |
| 3813 | $switchModeInput: $('#elementor-switch-mode-input'), |
| 3814 | $switchModeButton: $('#elementor-switch-mode-button'), |
| 3815 | $elementorLoader: $('.elementor-loader'), |
| 3816 | $builderEditor: $('#elementor-editor'), |
| 3817 | $importButton: $('#elementor-import-template-trigger'), |
| 3818 | $importNowButton: $('#e-import-template-action'), |
| 3819 | $importArea: $('#elementor-import-template-area'), |
| 3820 | $importForm: $('#elementor-import-template-form'), |
| 3821 | $importFormFileInput: $('#elementor-import-template-form input[type="file"]'), |
| 3822 | $settingsForm: $('#elementor-settings-form'), |
| 3823 | $settingsTabsWrapper: $('#elementor-settings-tabs-wrapper'), |
| 3824 | $menuGoProLink: $('a[href="admin.php?page=go_elementor_pro"]'), |
| 3825 | $reMigrateGlobalsButton: $('.elementor-re-migrate-globals-button') |
| 3826 | }; |
| 3827 | elements.$settingsFormPages = elements.$settingsForm.find('.elementor-settings-form-page'); |
| 3828 | elements.$activeSettingsPage = elements.$settingsFormPages.filter('.elementor-active'); |
| 3829 | elements.$settingsTabs = elements.$settingsTabsWrapper.children(); |
| 3830 | elements.$activeSettingsTab = elements.$settingsTabs.filter('.nav-tab-active'); |
| 3831 | return elements; |
| 3832 | }, |
| 3833 | toggleStatus: function toggleStatus() { |
| 3834 | var isElementorMode = this.isElementorMode(); |
| 3835 | elementorCommon.elements.$body.toggleClass('elementor-editor-active', isElementorMode).toggleClass('elementor-editor-inactive', !isElementorMode); |
| 3836 | }, |
| 3837 | bindEvents: function bindEvents() { |
| 3838 | var self = this; |
| 3839 | self.elements.$switchModeButton.on('click', function (event) { |
| 3840 | event.preventDefault(); |
| 3841 | if (self.isElementorMode()) { |
| 3842 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 3843 | message: __('Please note that you are switching to WordPress default editor. Your current layout, design and content might break.', 'elementor'), |
| 3844 | headerMessage: __('Back to WordPress Editor', 'elementor'), |
| 3845 | strings: { |
| 3846 | confirm: __('Continue', 'elementor'), |
| 3847 | cancel: __('Cancel', 'elementor') |
| 3848 | }, |
| 3849 | defaultOption: 'confirm', |
| 3850 | onConfirm: function onConfirm() { |
| 3851 | self.elements.$switchModeInput.val(''); |
| 3852 | self.toggleStatus(); |
| 3853 | } |
| 3854 | }).show(); |
| 3855 | } else { |
| 3856 | self.elements.$switchModeInput.val(true); |
| 3857 | var $wpTitle = $('#title'); |
| 3858 | if (!$wpTitle.val()) { |
| 3859 | $wpTitle.val('Elementor #' + $('#post_ID').val()); |
| 3860 | } |
| 3861 | if (wp.autosave) { |
| 3862 | wp.autosave.server.triggerSave(); |
| 3863 | } |
| 3864 | self.animateLoader(); |
| 3865 | $(document).on('heartbeat-tick.autosave', function () { |
| 3866 | elementorCommon.elements.$window.off('beforeunload.edit-post'); |
| 3867 | location.href = self.elements.$goToEditLink.attr('href'); |
| 3868 | }); |
| 3869 | self.toggleStatus(); |
| 3870 | } |
| 3871 | }); |
| 3872 | self.elements.$goToEditLink.on('click', function () { |
| 3873 | self.animateLoader(); |
| 3874 | }); |
| 3875 | $('.e-notice--dismissible').on('click', '.e-notice__dismiss, .e-notice-dismiss', function (event) { |
| 3876 | event.preventDefault(); |
| 3877 | var $wrapperElm = $(this).closest('.e-notice--dismissible'); |
| 3878 | $.post(ajaxurl, { |
| 3879 | action: 'elementor_set_admin_notice_viewed', |
| 3880 | notice_id: $wrapperElm.data('notice_id'), |
| 3881 | _wpnonce: $wrapperElm.data('nonce') |
| 3882 | }); |
| 3883 | $wrapperElm.fadeTo(100, 0, function () { |
| 3884 | $wrapperElm.slideUp(100, function () { |
| 3885 | $wrapperElm.remove(); |
| 3886 | }); |
| 3887 | }); |
| 3888 | }); |
| 3889 | var campaignNotices = { |
| 3890 | plugin_image_optimization: 'elementor_image_optimization_campaign', |
| 3891 | site_mailer_promotion: 'elementor_core_site_mailer_campaign' |
| 3892 | }; |
| 3893 | Object.keys(campaignNotices).forEach(function (noticeId) { |
| 3894 | $(".e-notice--cta.e-notice--dismissible[data-notice_id=\"".concat(noticeId, "\"] a.e-button--cta")).on('click', function () { |
| 3895 | var $button = $(this); |
| 3896 | elementorCommon.ajax.addRequest(campaignNotices[noticeId], { |
| 3897 | data: { |
| 3898 | campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', |
| 3899 | source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', |
| 3900 | medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' |
| 3901 | } |
| 3902 | }); |
| 3903 | }); |
| 3904 | }); |
| 3905 | $('.e-a-apps .e-a-item[data-plugin="image-optimization/image-optimization.php"] a.e-btn').on('click', function () { |
| 3906 | var $button = $(this); |
| 3907 | elementorCommon.ajax.addRequest('elementor_image_optimization_campaign', { |
| 3908 | data: { |
| 3909 | campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', |
| 3910 | source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', |
| 3911 | medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' |
| 3912 | } |
| 3913 | }); |
| 3914 | }); |
| 3915 | $('#elementor-clear-cache-button').on('click', function (event) { |
| 3916 | event.preventDefault(); |
| 3917 | var $thisButton = $(this); |
| 3918 | $thisButton.removeClass('success').addClass('loading'); |
| 3919 | $.post(ajaxurl, { |
| 3920 | action: 'elementor_clear_cache', |
| 3921 | _nonce: $thisButton.data('nonce') |
| 3922 | }).done(function () { |
| 3923 | $thisButton.removeClass('loading').addClass('success'); |
| 3924 | }); |
| 3925 | }); |
| 3926 | $('#elementor-library-sync-button').on('click', function (event) { |
| 3927 | event.preventDefault(); |
| 3928 | var $thisButton = $(this); |
| 3929 | $thisButton.removeClass('success').addClass('loading'); |
| 3930 | $.post(ajaxurl, { |
| 3931 | action: 'elementor_reset_library', |
| 3932 | _nonce: $thisButton.data('nonce') |
| 3933 | }).done(function () { |
| 3934 | $thisButton.removeClass('loading').addClass('success'); |
| 3935 | }); |
| 3936 | }); |
| 3937 | $('#elementor-recreate-kit-button').on('click', function (event) { |
| 3938 | event.preventDefault(); |
| 3939 | var $thisButton = $(this); |
| 3940 | $thisButton.removeClass('success error').addClass('loading').next('.e-recreate-kit-error-message').remove(); |
| 3941 | $.post(ajaxurl, { |
| 3942 | action: 'elementor_recreate_kit', |
| 3943 | _nonce: $thisButton.data('nonce') |
| 3944 | }).done(function () { |
| 3945 | $thisButton.removeClass('loading').addClass('success'); |
| 3946 | }).fail(function (_ref) { |
| 3947 | var _responseJSON$data; |
| 3948 | var responseJSON = _ref.responseJSON; |
| 3949 | $thisButton.removeClass('loading').addClass('error'); |
| 3950 | if ((_responseJSON$data = responseJSON.data) !== null && _responseJSON$data !== void 0 && _responseJSON$data.message) { |
| 3951 | $thisButton.after("<div class=\"e-recreate-kit-error-message\">".concat(responseJSON.data.message, "</div>")); |
| 3952 | } |
| 3953 | }); |
| 3954 | }); |
| 3955 | $('#elementor-replace-url-button').on('click', function (event) { |
| 3956 | event.preventDefault(); |
| 3957 | var $this = $(this), |
| 3958 | $tr = $this.parents('tr'), |
| 3959 | $from = $tr.find('[name="from"]'), |
| 3960 | $to = $tr.find('[name="to"]'); |
| 3961 | $this.removeClass('success').addClass('loading'); |
| 3962 | $.post(ajaxurl, { |
| 3963 | action: 'elementor_replace_url', |
| 3964 | from: $from.val(), |
| 3965 | to: $to.val(), |
| 3966 | _nonce: $this.data('nonce') |
| 3967 | }).done(function (response) { |
| 3968 | $this.removeClass('loading'); |
| 3969 | if (response.success) { |
| 3970 | $this.addClass('success'); |
| 3971 | } |
| 3972 | elementorCommon.dialogsManager.createWidget('alert', { |
| 3973 | message: response.data |
| 3974 | }).show(); |
| 3975 | }); |
| 3976 | }); |
| 3977 | $('#elementor_upgrade_fa_button').on('click', function (event) { |
| 3978 | event.preventDefault(); |
| 3979 | var $updateButton = $(this); |
| 3980 | $updateButton.addClass('loading'); |
| 3981 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 3982 | id: 'confirm_fa_migration_admin_modal', |
| 3983 | message: __('I understand that by upgrading to Font Awesome 5,', 'elementor') + '<br>' + __('I acknowledge that some changes may affect my website and that this action cannot be undone.', 'elementor'), |
| 3984 | headerMessage: __('Font Awesome 5 Migration', 'elementor'), |
| 3985 | strings: { |
| 3986 | confirm: __('Continue', 'elementor'), |
| 3987 | cancel: __('Cancel', 'elementor') |
| 3988 | }, |
| 3989 | defaultOption: 'confirm', |
| 3990 | onConfirm: function onConfirm() { |
| 3991 | $updateButton.removeClass('error').addClass('loading'); |
| 3992 | var _$updateButton$data = $updateButton.data(), |
| 3993 | _nonce = _$updateButton$data._nonce, |
| 3994 | action = _$updateButton$data.action, |
| 3995 | redirectUrl = _$updateButton$data.redirectUrl; |
| 3996 | $.post(ajaxurl, { |
| 3997 | action: action, |
| 3998 | _nonce: _nonce |
| 3999 | }).done(function (response) { |
| 4000 | $updateButton.removeClass('loading').addClass('success'); |
| 4001 | var messageElement = document.createElement('p'); |
| 4002 | messageElement.appendChild(document.createTextNode(response.data.message)); |
| 4003 | $('#elementor_upgrade_fa_button').parent().append(messageElement); |
| 4004 | if (redirectUrl) { |
| 4005 | location.href = decodeURIComponent(redirectUrl); |
| 4006 | return; |
| 4007 | } |
| 4008 | history.go(-1); |
| 4009 | }).fail(function () { |
| 4010 | $updateButton.removeClass('loading').addClass('error'); |
| 4011 | }); |
| 4012 | }, |
| 4013 | onCancel: function onCancel() { |
| 4014 | $updateButton.removeClass('loading').addClass('error'); |
| 4015 | } |
| 4016 | }).show(); |
| 4017 | }); |
| 4018 | self.elements.$settingsTabs.on({ |
| 4019 | click: function click(event) { |
| 4020 | event.preventDefault(); |
| 4021 | event.currentTarget.focus(); // Safari does not focus the tab automatically |
| 4022 | }, |
| 4023 | focus: function focus() { |
| 4024 | // Using focus event to enable navigation by tab key |
| 4025 | var hrefWithoutHash = location.href.replace(/#.*/, ''); |
| 4026 | history.pushState({}, '', hrefWithoutHash + this.hash); |
| 4027 | self.goToSettingsTabFromHash(); |
| 4028 | } |
| 4029 | }); |
| 4030 | $('select.elementor-rollback-select').on('change', function () { |
| 4031 | var $this = $(this), |
| 4032 | $rollbackButton = $this.next('.elementor-rollback-button'), |
| 4033 | placeholderText = $rollbackButton.data('placeholder-text'), |
| 4034 | placeholderUrl = $rollbackButton.data('placeholder-url'); |
| 4035 | $rollbackButton.html(placeholderText.replace('{VERSION}', $this.val())); |
| 4036 | $rollbackButton.data('href', placeholderUrl.replace('VERSION', $this.val())); |
| 4037 | }).trigger('change'); |
| 4038 | $('.elementor-rollback-button').on('click', function (event) { |
| 4039 | event.preventDefault(); |
| 4040 | var $this = $(this); |
| 4041 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 4042 | headerMessage: __('Rollback to Previous Version', 'elementor'), |
| 4043 | message: __('Are you sure you want to reinstall previous version?', 'elementor'), |
| 4044 | strings: { |
| 4045 | confirm: __('Continue', 'elementor'), |
| 4046 | cancel: __('Cancel', 'elementor') |
| 4047 | }, |
| 4048 | onConfirm: function onConfirm() { |
| 4049 | $this.addClass('loading'); |
| 4050 | location.href = $this.data('href'); |
| 4051 | } |
| 4052 | }).show(); |
| 4053 | }); |
| 4054 | self.elements.$reMigrateGlobalsButton.on('click', function (event) { |
| 4055 | event.preventDefault(); |
| 4056 | var $this = $(event.currentTarget); |
| 4057 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 4058 | headerMessage: __('Migrate to v3.0', 'elementor'), |
| 4059 | message: __('Please note that this process will revert all changes made to Global Colors and Fonts since upgrading to v3.x.', 'elementor'), |
| 4060 | strings: { |
| 4061 | confirm: __('Continue', 'elementor'), |
| 4062 | cancel: __('Cancel', 'elementor') |
| 4063 | }, |
| 4064 | onConfirm: function onConfirm() { |
| 4065 | $this.removeClass('success').addClass('loading'); |
| 4066 | elementorCommon.ajax.addRequest('re_migrate_globals', { |
| 4067 | success: function success() { |
| 4068 | return $this.removeClass('loading').addClass('success'); |
| 4069 | } |
| 4070 | }); |
| 4071 | } |
| 4072 | }).show(); |
| 4073 | }); |
| 4074 | $('.elementor_google_font select').on('change', function () { |
| 4075 | $('.elementor_font_display').toggle('1' === $(this).val()); |
| 4076 | }).trigger('change'); |
| 4077 | }, |
| 4078 | onInit: function onInit() { |
| 4079 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| 4080 | this.initTemplatesImport(); |
| 4081 | this.initMaintenanceMode(); |
| 4082 | this.goToSettingsTabFromHash(); |
| 4083 | this.openLinksInNewTab(); |
| 4084 | this.addUserAgentClasses(); |
| 4085 | this.roleManager.init(); |
| 4086 | if (elementorCommon.config.experimentalFeatures['landing-pages']) { |
| 4087 | new _module.default(); |
| 4088 | } |
| 4089 | if (elementorCommon.config.experimentalFeatures.container) { |
| 4090 | new _module3.default(); |
| 4091 | } |
| 4092 | this.templateControls = new _templateControls.default(); |
| 4093 | new _module2.default(); |
| 4094 | }, |
| 4095 | addUserAgentClasses: function addUserAgentClasses() { |
| 4096 | var body = document.querySelector('body'); |
| 4097 | Object.entries(_environment.default).forEach(function (_ref2) { |
| 4098 | var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), |
| 4099 | key = _ref3[0], |
| 4100 | value = _ref3[1]; |
| 4101 | if (!value) { |
| 4102 | return; |
| 4103 | } |
| 4104 | body.classList.add('e--ua-' + key); |
| 4105 | }); |
| 4106 | }, |
| 4107 | /** |
| 4108 | * Open Links in New Tab |
| 4109 | * |
| 4110 | * Adds a `target="_blank"` attribute to the Admin Dashboard menu items specified in the `elements` array, |
| 4111 | * if the elements are found in the DOM. The items in the `elements` array should be jQuery instances. |
| 4112 | * |
| 4113 | * @since 3.6.0 |
| 4114 | */ |
| 4115 | openLinksInNewTab: function openLinksInNewTab() { |
| 4116 | var elements = [this.elements.$menuGoProLink]; |
| 4117 | elements.forEach(function ($element) { |
| 4118 | // Only add the attribute if the element is found. |
| 4119 | if ($element.length) { |
| 4120 | $element.attr('target', '_blank'); |
| 4121 | } |
| 4122 | }); |
| 4123 | }, |
| 4124 | initTemplatesImport: function initTemplatesImport() { |
| 4125 | var _elementorAdminConfig, _elementorAdminConfig2; |
| 4126 | var canImport = elementorAdminConfig.user.is_administrator || ((_elementorAdminConfig = (_elementorAdminConfig2 = elementorAdminConfig.user.restrictions) === null || _elementorAdminConfig2 === void 0 ? void 0 : _elementorAdminConfig2.includes('json-upload')) !== null && _elementorAdminConfig !== void 0 ? _elementorAdminConfig : false); |
| 4127 | if (!canImport || !elementorCommon.elements.$body.hasClass('post-type-elementor_library')) { |
| 4128 | return; |
| 4129 | } |
| 4130 | if (0 === this.elements.$importNowButton.length) { |
| 4131 | return; |
| 4132 | } |
| 4133 | var self = this, |
| 4134 | $importForm = self.elements.$importForm, |
| 4135 | $importButton = self.elements.$importButton, |
| 4136 | $importArea = self.elements.$importArea, |
| 4137 | $importNowButton = self.elements.$importNowButton, |
| 4138 | $importFormFileInput = self.elements.$importFormFileInput; |
| 4139 | self.elements.$formAnchor = $('.wp-header-end'); |
| 4140 | $('#wpbody-content').find('.page-title-action').first().before($importButton); |
| 4141 | self.elements.$formAnchor.after($importArea); |
| 4142 | $importButton.on('click', function () { |
| 4143 | $('#elementor-import-template-area').toggle(); |
| 4144 | }); |
| 4145 | var messages = { |
| 4146 | jsonUploadWarning: { |
| 4147 | shown: false |
| 4148 | }, |
| 4149 | enableUnfilteredFiles: { |
| 4150 | shown: false |
| 4151 | } |
| 4152 | }; |
| 4153 | var originalButtonValue = $importNowButton[0].value; |
| 4154 | $importForm.on('submit', /*#__PURE__*/function () { |
| 4155 | var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(event) { |
| 4156 | var hasImportedFiles, areUnfilteredFilesEnabled, enableUnfilteredFilesModal, _t; |
| 4157 | return _regenerator.default.wrap(function (_context) { |
| 4158 | while (1) switch (_context.prev = _context.next) { |
| 4159 | case 0: |
| 4160 | $importNowButton[0].disabled = true; |
| 4161 | $importNowButton[0].value = __('Importing...', 'elementor'); |
| 4162 | if (messages.jsonUploadWarning.shown) { |
| 4163 | _context.next = 5; |
| 4164 | break; |
| 4165 | } |
| 4166 | event.preventDefault(); |
| 4167 | _context.prev = 1; |
| 4168 | _context.next = 2; |
| 4169 | return (0, _jsonUploadWarningMessage.showJsonUploadWarningMessageIfNeeded)({ |
| 4170 | IntroductionClass: window.elementorModules.admin.utils.Introduction, |
| 4171 | introductionMap: window.elementorAdmin.config.user.introduction, |
| 4172 | waitForSetViewed: true |
| 4173 | }); |
| 4174 | case 2: |
| 4175 | messages.jsonUploadWarning.shown = true; |
| 4176 | $importForm.trigger('submit'); |
| 4177 | _context.next = 4; |
| 4178 | break; |
| 4179 | case 3: |
| 4180 | _context.prev = 3; |
| 4181 | _t = _context["catch"](1); |
| 4182 | $importNowButton[0].disabled = false; |
| 4183 | $importNowButton[0].value = originalButtonValue; |
| 4184 | case 4: |
| 4185 | return _context.abrupt("return"); |
| 4186 | case 5: |
| 4187 | hasImportedFiles = $importFormFileInput[0].files.length; |
| 4188 | areUnfilteredFilesEnabled = elementorCommon.config.filesUpload.unfilteredFiles; |
| 4189 | if (!(hasImportedFiles && !areUnfilteredFilesEnabled && !messages.enableUnfilteredFiles.shown)) { |
| 4190 | _context.next = 6; |
| 4191 | break; |
| 4192 | } |
| 4193 | event.preventDefault(); |
| 4194 | enableUnfilteredFilesModal = _filesUploadHandler.default.getUnfilteredFilesNotEnabledImportTemplateDialog(function () { |
| 4195 | messages.enableUnfilteredFiles.shown = true; |
| 4196 | $importForm.trigger('submit'); |
| 4197 | }); |
| 4198 | enableUnfilteredFilesModal.show(); |
| 4199 | return _context.abrupt("return"); |
| 4200 | case 6: |
| 4201 | messages.jsonUploadWarning.shown = false; |
| 4202 | messages.enableUnfilteredFiles.shown = false; |
| 4203 | case 7: |
| 4204 | case "end": |
| 4205 | return _context.stop(); |
| 4206 | } |
| 4207 | }, _callee, null, [[1, 3]]); |
| 4208 | })); |
| 4209 | return function (_x) { |
| 4210 | return _ref4.apply(this, arguments); |
| 4211 | }; |
| 4212 | }()); |
| 4213 | }, |
| 4214 | initMaintenanceMode: function initMaintenanceMode() { |
| 4215 | var MaintenanceMode = __webpack_require__(/*! elementor-admin/maintenance-mode */ "../assets/dev/js/admin/maintenance-mode.js"); |
| 4216 | this.maintenanceMode = new MaintenanceMode(); |
| 4217 | }, |
| 4218 | isElementorMode: function isElementorMode() { |
| 4219 | return !!this.elements.$switchModeInput.val(); |
| 4220 | }, |
| 4221 | animateLoader: function animateLoader() { |
| 4222 | this.elements.$goToEditLink.addClass('elementor-animate'); |
| 4223 | }, |
| 4224 | goToSettingsTabFromHash: function goToSettingsTabFromHash() { |
| 4225 | var hash = location.hash.slice(1); |
| 4226 | if (hash) { |
| 4227 | this.goToSettingsTab(hash); |
| 4228 | } |
| 4229 | }, |
| 4230 | goToSettingsTab: function goToSettingsTab(tabName) { |
| 4231 | var $pages = this.elements.$settingsFormPages; |
| 4232 | if (!$pages.length) { |
| 4233 | return; |
| 4234 | } |
| 4235 | var $activePage = $pages.filter('#' + tabName); |
| 4236 | this.elements.$activeSettingsPage.removeClass('elementor-active'); |
| 4237 | this.elements.$activeSettingsTab.removeClass('nav-tab-active'); |
| 4238 | var $activeTab = this.elements.$settingsTabs.filter('#elementor-settings-' + tabName); |
| 4239 | $activePage.addClass('elementor-active'); |
| 4240 | $activeTab.addClass('nav-tab-active'); |
| 4241 | this.elements.$settingsForm.attr('action', 'options.php#' + tabName); |
| 4242 | this.elements.$activeSettingsPage = $activePage; |
| 4243 | this.elements.$activeSettingsTab = $activeTab; |
| 4244 | }, |
| 4245 | translate: function translate(stringKey, templateArgs) { |
| 4246 | return elementorCommon.translate(stringKey, null, templateArgs, this.config.i18n); |
| 4247 | }, |
| 4248 | roleManager: { |
| 4249 | selectors: { |
| 4250 | body: 'elementor-role-manager', |
| 4251 | row: '.elementor-role-row', |
| 4252 | label: '.elementor-role-label', |
| 4253 | excludedIndicator: '.elementor-role-excluded-indicator', |
| 4254 | excludedField: 'input[name="elementor_exclude_user_roles[]"]', |
| 4255 | controlsContainer: '.elementor-role-controls', |
| 4256 | toggleHandle: '.elementor-role-toggle', |
| 4257 | arrowUp: 'dashicons-arrow-up', |
| 4258 | arrowDown: 'dashicons-arrow-down' |
| 4259 | }, |
| 4260 | toggle: function toggle($trigger) { |
| 4261 | var self = this, |
| 4262 | $row = $trigger.closest(self.selectors.row), |
| 4263 | $toggleHandleIcon = $row.find(self.selectors.toggleHandle).find('.dashicons'), |
| 4264 | $controls = $row.find(self.selectors.controlsContainer); |
| 4265 | $controls.toggleClass('hidden'); |
| 4266 | if ($controls.hasClass('hidden')) { |
| 4267 | $toggleHandleIcon.removeClass(self.selectors.arrowUp).addClass(self.selectors.arrowDown); |
| 4268 | } else { |
| 4269 | $toggleHandleIcon.removeClass(self.selectors.arrowDown).addClass(self.selectors.arrowUp); |
| 4270 | } |
| 4271 | self.updateLabel($row); |
| 4272 | }, |
| 4273 | updateLabel: function updateLabel($row) { |
| 4274 | var self = this, |
| 4275 | $indicator = $row.find(self.selectors.excludedIndicator), |
| 4276 | excluded = $row.find(self.selectors.excludedField).is(':checked'); |
| 4277 | if (excluded) { |
| 4278 | $indicator.html($indicator.data('excluded-label')); |
| 4279 | } else { |
| 4280 | $indicator.html(''); |
| 4281 | } |
| 4282 | self.setAdvancedState($row, excluded); |
| 4283 | }, |
| 4284 | setAdvancedState: function setAdvancedState($row, state) { |
| 4285 | var self = this, |
| 4286 | $controls = $row.find('input[type="checkbox"]').not(self.selectors.excludedField); |
| 4287 | $controls.each(function (index, input) { |
| 4288 | $(input).prop('disabled', state); |
| 4289 | }); |
| 4290 | }, |
| 4291 | bind: function bind() { |
| 4292 | var self = this; |
| 4293 | $(document).on('click', self.selectors.label + ',' + self.selectors.toggleHandle, function (event) { |
| 4294 | event.stopPropagation(); |
| 4295 | event.preventDefault(); |
| 4296 | self.toggle($(this)); |
| 4297 | }).on('change', self.selectors.excludedField, function () { |
| 4298 | self.updateLabel($(this).closest(self.selectors.row)); |
| 4299 | }); |
| 4300 | }, |
| 4301 | init: function init() { |
| 4302 | var self = this; |
| 4303 | if (!$('body[class*="' + self.selectors.body + '"]').length) { |
| 4304 | return; |
| 4305 | } |
| 4306 | self.bind(); |
| 4307 | $(self.selectors.row).each(function (index, row) { |
| 4308 | self.updateLabel($(row)); |
| 4309 | }); |
| 4310 | } |
| 4311 | } |
| 4312 | }); |
| 4313 | $(function () { |
| 4314 | window.elementorAdmin = new ElementorAdmin(); |
| 4315 | _events.default.dispatch(elementorCommon.elements.$window, 'elementor/admin/init'); |
| 4316 | }); |
| 4317 | })(jQuery); |
| 4318 | })(); |
| 4319 | |
| 4320 | /******/ })() |
| 4321 | ; |
| 4322 | //# sourceMappingURL=admin.js.map |