PageSourceSearch

https://www.lacorteditore.it/wp-content/plugins/sqm-mc-woocommerce…alomail-woocommerce-public.min.js?ver=2.5.1

js lacorteditore.it collected 2026-10-02 10:30:49 UTC 9,078 bytes, 207 lines download raw bytes

1var squalomail,
2    squalomail_cart,
3    squalomail_billing_email,
4    squalomail_username_email,
5    squalomail_registration_email,
6    squalomail_submitted_email = false,
7    squalomailReady = function (a) { /in/.test(document.readyState) ? setTimeout("squalomailReady(" + a + ")", 9) : a(); };
8
9function squalomailGetCurrentUserByHash(a) {
10    try {
11        var b = squalomail_public_data.ajax_url + "?action=squalomail_get_user_by_hash&hash=" + a, c = new XMLHttpRequest;
12        c.open("POST", b, !0), c.onload = function () {
13            if (c.status >= 200 && c.status < 400) {
14                var a = JSON.parse(c.responseText);
15                if (!a) return;
16                squalomail_cart.valueEmail(a.email) && squalomail_cart.setEmail(a.email);
17            }
18        };
19        c.onerror = function () {
20            console.log("squalomail.get_email_by_hash.request.error", c.responseText)
21        };
22        c.setRequestHeader("Content-Type", "application/json");
23        c.setRequestHeader("Accept", "application/json");
24        c.send();
25    } catch (a) {
26        console.log("squalomail.get_email_by_hash.error", a)
27    }
28}
29function squalomailHandleBillingEmail(selector) {
30    try {
31        if (!selector) selector = "#billing_email";
32        var a = document.querySelector(selector);
33        var b = void 0 !== a ? a.value : "";
34        if (!squalomail_cart.valueEmail(b) || squalomail_submitted_email === b) { return false; }
35        squalomail_cart.setEmail(b);
36        var c = squalomail_public_data.ajax_url + "?action=squalomail_set_user_by_email&email=" + b + "&sqm_language=" + squalomail_public_data.language;
37        var d = new XMLHttpRequest;
38        d.open("POST", c, !0);
39        d.onload = function () {
40            var successful = d.status >= 200 && d.status < 400;
41            var msg = successful ? "squalomail.handle_billing_email.request.success" : "squalomail.handle_billing_email.request.error";
42            if (successful) {
43                squalomail_submitted_email = b;
44            }
45            console.log(msg, d.responseText);
46        };
47        d.onerror = function () {
48            console.log("squalomail.handle_billing_email.request.error", d.responseText)
49        };
50        d.setRequestHeader("Content-Type", "application/json");
51        d.setRequestHeader("Accept", "application/json");
52        d.send();
53        return true;
54    } catch (a) {
55        console.log("squalomail.handle_billing_email.error", a); squalomail_submitted_email = !1
56    }
57}
58
59!function () {
60    "use strict";
61
62    function squalomailCart() {
63
64        this.email_types = "input[type=email]";
65        this.regex_email = /^([A-Za-z0-9_+\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
66        this.current_email = null;
67        this.previous_email = null;
68        this.expireUser = function () {
69            this.current_email = null;
70            squalomail.storage.expire("squalomail.cart.current_email");
71        };
72        this.expireSaved = function () {
73            squalomail.storage.expire("squalomail.cart.items");
74        };
75        this.setEmail = function (a) {
76            if (!this.valueEmail(a)) return false;
77            this.setPreviousEmail(this.getEmail());
78            squalomail.storage.set("squalomail.cart.current_email", this.current_email = a);
79        };
80        this.getEmail = function () {
81            if (this.current_email) return this.current_email;
82            var a = squalomail.storage.get("squalomail.cart.current_email", !1);
83            if (!a || !this.valueEmail(a)) return false;
84            return this.current_email = a;
85        };
86        this.setPreviousEmail = function (a) {
87            if (!this.valueEmail(a)) return false;
88            squalomail.storage.set("squalomail.cart.previous_email", this.previous_email = a);
89        };
90        this.valueEmail = function (a) {
91            return this.regex_email.test(a);
92        };
93        return this;
94    }
95
96    var g = {
97        extend: function (a, b) {
98            for (var c in b || {})b.hasOwnProperty(c) && (a[c] = b[c]);
99            return a
100        }, getQueryStringVars: function () {
101            var a = window.location.search || "", b = [], c = {};
102            if (a = a.substr(1), a.length) {
103                b = a.split("&");
104                for (var d in b) {
105                    var e = b[d];
106                    if ("string" == typeof e) {
107                        var f = e.split("="), g = f[0], h = f[1];
108                        g.length && ("undefined" == typeof c[g] && (c[g] = []), c[g].push(h))
109                    }
110                }
111            }
112            return c
113        }, unEscape: function (a) {
114            return decodeURIComponent(a)
115        }, escape: function (a) {
116            return encodeURIComponent(a)
117        }, createDate: function (a, b) {
118            a || (a = 0);
119            var c = new Date, d = b ? c.getDate() - a : c.getDate() + a;
120            return c.setDate(d), c
121        }, arrayUnique: function (a) {
122            for (var b = a.concat(), c = 0; c < b.length; ++c)for (var d = c + 1; d < b.length; ++d)b[c] === b[d] && b.splice(d, 1);
123            return b
124        }, objectCombineUnique: function (a) {
125            for (var b = a[0], c = 1; c < a.length; c++) {
126                var d = a[c];
127                for (var e in d)b[e] = d[e]
128            }
129            return b
130        }
131    }, h = function (a, b) {
132        var c = function (a, b, d) {
133            return 1 === arguments.length ? c.get(a) : c.set(a, b, d)
134        };
135        return c.get = function (b, d) {
136            return a.cookie !== c._cacheString && c._populateCache(), void 0 == c._cache[b] ? d : c._cache[b]
137        }, c.defaults = {path: "/", secure: true, samesite: 'strict'}, c.set = function (d, e, f) {
138            switch (f = {
139                path: f && f.path || c.defaults.path,
140                domain: f && f.domain || c.defaults.domain,
141                expires: f && f.expires || c.defaults.expires,
142                secure: f && f.secure !== b ? f.secure : c.defaults.secure,
143                samesite: f && f.samesite || c.defaults.samesite,
144            }, e === b && (f.expires = -1), typeof f.expires) {
145                case"number":
146                    f.expires = new Date((new Date).getTime() + 1e3 * f.expires);
147                    break;
148                case"string":
149                    f.expires = new Date(f.expires)
150            }
151            return d = encodeURIComponent(d) + "=" + (e + "").replace(/[^!#-+\--:<-\[\]-~]/g, encodeURIComponent), d += f.path ? ";path=" + f.path : "", d += f.domain ? ";domain=" + f.domain : "", d += f.expires ? ";expires=" + f.expires.toGMTString() : "", d += f.secure ? ";secure" : "", d += f.samesite ? (";samesite="+f.samesite) : '', a.cookie = d, c
152        }, c.expire = function (a, d) {
153            return c.set(a, b, d)
154        }, c._populateCache = function () {
155            c._cache = {};
156            try {
157                c._cacheString = a.cookie;
158                for (var d = c._cacheString.split("; "), e = 0; e < d.length; e++) {
159                    var f = d[e].indexOf("="), g = decodeURIComponent(d[e].substr(0, f)), f = decodeURIComponent(d[e].substr(f + 1));
160                    c._cache[g] === b && (c._cache[g] = f)
161                }
162            } catch (a) {
163                console.log(a)
164            }
165        }, c.enabled = function () {
166            var a = "1" === c.set("cookies.js", "1").get("cookies.js");
167            return c.expire("cookies.js"), a;
168        }(), c
169    }(document);
170
171    squalomail = {storage: h, utils: g};
172    squalomail_cart = new squalomailCart;
173}();
174
175squalomailReady(function () {
176
177    if (void 0 === a) {
178        var a = { site_url: document.location.origin, defaulted: !0, ajax_url: document.location.origin + "/wp-admin?admin-ajax.php" };
179    }
180
181    try {
182        var b = squalomail.utils.getQueryStringVars();
183        void 0 !== b.sqm_cart_id && squalomailGetCurrentUserByHash(b.sqm_cart_id);
184
185        squalomail_username_email = document.querySelector("#username");
186        squalomail_billing_email = document.querySelector("#billing_email");
187        squalomail_registration_email = document.querySelector("#reg_email");
188
189        if (squalomail_billing_email) {
190            squalomail_billing_email.onblur = function () { squalomailHandleBillingEmail('#billing_email'); };
191            squalomail_billing_email.onfocus = function () { squalomailHandleBillingEmail('#billing_email'); }
192        }
193
194        if (squalomail_username_email) {
195            squalomail_username_email.onblur = function () { squalomailHandleBillingEmail('#username'); };
196            squalomail_username_email.onfocus = function () { squalomailHandleBillingEmail('#username'); }
197        }
198
199        if (squalomail_registration_email) {
200            squalomail_registration_email.onblur = function () { squalomailHandleBillingEmail('#reg_email'); };
201            squalomail_registration_email.onfocus = function () { squalomailHandleBillingEmail('#reg_email'); }
202        }
203
204    } catch (e) {
205        console.log('squalomail ready error', e);
206    }
207});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.