PageSourceSearch

https://www.publico.es/assets/myAccount.bundle.js?v=1790755900

js publico.es collected 2026-10-01 07:39:12 UTC 144,992 bytes, 2,869 lines download raw bytes

vendor: 4,399 bytes, lines 1-138
1/******/ (() => { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
4/***/ 434:
5/***/ (() => {
6
7function ownKeys(e, r) {
8  var t = Object.keys(e);
9  if (Object.getOwnPropertySymbols) {
10    var o = Object.getOwnPropertySymbols(e);
11    r && (o = o.filter(function (r) {
12      return Object.getOwnPropertyDescriptor(e, r).enumerable;
13    })), t.push.apply(t, o);
14  }
15  return t;
16}
17function _objectSpread(e) {
18  for (var r = 1; r < arguments.length; r++) {
19    var t = null != arguments[r] ? arguments[r] : {};
20    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
21      _defineProperty(e, r, t[r]);
22    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
23      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
24    });
25  }
26  return e;
27}
28function _slicedToArray(r, e) {
29  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
30}
31function _nonIterableRest() {
32  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33}
34function _unsupportedIterableToArray(r, a) {
35  if (r) {
36    if ("string" == typeof r) return _arrayLikeToArray(r, a);
37    var t = {}.toString.call(r).slice(8, -1);
38    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;
39  }
40}
41function _arrayLikeToArray(r, a) {
42  (null == a || a > r.length) && (a = r.length);
43  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
44  return n;
45}
46function _iterableToArrayLimit(r, l) {
47  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
48  if (null != t) {
49    var e,
50      n,
51      i,
52      u,
53      a = [],
54      f = !0,
55      o = !1;
56    try {
57      if (i = (t = t.call(r)).next, 0 === l) {
58        if (Object(t) !== t) return;
59        f = !1;
60      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
61    } catch (r) {
62      o = !0, n = r;
63    } finally {
64      try {
65        if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
66      } finally {
67        if (o) throw n;
68      }
69    }
70    return a;
71  }
72}
73function _arrayWithHoles(r) {
74  if (Array.isArray(r)) return r;
75}
76function _typeof(o) {
77  "@babel/helpers - typeof";
78
79  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
80    return typeof o;
81  } : function (o) {
82    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
83  }, _typeof(o);
84}
85function _regeneratorRuntime() {
86  "use strict";
87
88  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
89  _regeneratorRuntime = function _regeneratorRuntime() {
90    return r;
91  };
92  var t,
93    r = {},
94    e = Object.prototype,
95    n = e.hasOwnProperty,
96    o = "function" == typeof Symbol ? Symbol : {},
97    i = o.iterator || "@@iterator",
98    a = o.asyncIterator || "@@asyncIterator",
99    u = o.toStringTag || "@@toStringTag";
100  function c(t, r, e, n) {
101    return Object.defineProperty(t, r, {
102      value: e,
103      enumerable: !n,
104      configurable: !n,
105      writable: !n
106    });
107  }
108  try {
109    c({}, "");
110  } catch (t) {
111    c = function c(t, r, e) {
112      return t[r] = e;
113    };
114  }
115  function h(r, e, n, o) {
116    var i = e && e.prototype instanceof Generator ? e : Generator,
117      a = Object.create(i.prototype);
118    return c(a, "_invoke", function (r, e, n) {
119      var o = 1;
120      return function (i, a) {
121        if (3 === o) throw Error("Generator is already running");
122        if (4 === o) {
123          if ("throw" === i) throw a;
124          return {
125            value: t,
126            done: !0
127          };
128        }
129        for (n.method = i, n.arg = a;;) {
130          var u = n.delegate;
131          if (u) {
132            var c = d(u, n);
133            if (c) {
134              if (c === f) continue;
135              return c;
136            }
137          }
138          if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
139            if (1 === o) throw o = 4, n.arg;
140            n.dispatchException(n.arg);
141          } else "return" === n.method && n.abrupt("return", n.arg);
142          o = 3;
143          var h = s(r, e, n);
144          if ("normal" === h.type) {
145            if (o = n.done ? 4 : 2, h.arg === f) continue;
146            return {
147              value: h.arg,
148              done: n.done
149            };
150          }
151          "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
152        }
153      };
154    }(r, n, new Context(o || [])), !0), a;
155  }
156  function s(t, r, e) {
157    try {
158      return {
159        type: "normal",
160        arg: t.call(r, e)
161      };
162    } catch (t) {
163      return {
164        type: "throw",
165        arg: t
166      };
167    }
168  }
169  r.wrap = h;
170  var f = {};
171  function Generator() {}
172  function GeneratorFunction() {}
173  function GeneratorFunctionPrototype() {}
174  var l = {};
175  c(l, i, function () {
176    return this;
177  });
178  var p = Object.getPrototypeOf,
179    y = p && p(p(x([])));
180  y && y !== e && n.call(y, i) && (l = y);
181  var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
182  function g(t) {
183    ["next", "throw", "return"].forEach(function (r) {
184      c(t, r, function (t) {
185        return this._invoke(r, t);
186      });
187    });
188  }
189  function AsyncIterator(t, r) {
190    function e(o, i, a, u) {
191      var c = s(t[o], t, i);
192      if ("throw" !== c.type) {
193        var h = c.arg,
194          f = h.value;
195        return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
196          e("next", t, a, u);
197        }, function (t) {
198          e("throw", t, a, u);
199        }) : r.resolve(f).then(function (t) {
200          h.value = t, a(h);
201        }, function (t) {
202          return e("throw", t, a, u);
203        });
204      }
205      u(c.arg);
206    }
207    var o;
208    c(this, "_invoke", function (t, n) {
209      function i() {
210        return new r(function (r, o) {
211          e(t, n, r, o);
212        });
213      }
214      return o = o ? o.then(i, i) : i();
215    }, !0);
216  }
217  function d(r, e) {
218    var n = e.method,
219      o = r.i[n];
220    if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
221    var i = s(o, r.i, e.arg);
222    if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
223    var a = i.arg;
224    return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
225  }
226  function w(t) {
227    this.tryEntries.push(t);
228  }
229  function m(r) {
230    var e = r[4] || {};
231    e.type = "normal", e.arg = t, r[4] = e;
232  }
233  function Context(t) {
234    this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
235  }
236  function x(r) {
237    if (null != r) {
238      var e = r[i];
239      if (e) return e.call(r);
240      if ("function" == typeof r.next) return r;
241      if (!isNaN(r.length)) {
242        var o = -1,
243          a = function e() {
244            for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
245            return e.value = t, e.done = !0, e;
246          };
247        return a.next = a;
248      }
249    }
250    throw new TypeError(_typeof(r) + " is not iterable");
251  }
252  return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
253    var r = "function" == typeof t && t.constructor;
254    return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
255  }, r.mark = function (t) {
256    return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
257  }, r.awrap = function (t) {
258    return {
259      __await: t
260    };
261  }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
262    return this;
263  }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
264    void 0 === i && (i = Promise);
265    var a = new AsyncIterator(h(t, e, n, o), i);
266    return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
267      return t.done ? t.value : a.next();
268    });
269  }, g(v), c(v, u, "Generator"), c(v, i, function () {
270    return this;
271  }), c(v, "toString", function () {
272    return "[object Generator]";
273  }), r.keys = function (t) {
274    var r = Object(t),
275      e = [];
276    for (var n in r) e.unshift(n);
277    return function t() {
278      for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
279      return t.done = !0, t;
280    };
281  }, r.values = x, Context.prototype = {
282    constructor: Context,
283    reset: function reset(r) {
284      if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEac
284h(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
285    },
286    stop: function stop() {
287      this.done = !0;
288      var t = this.tryEntries[0][4];
289      if ("throw" === t.type) throw t.arg;
290      return this.rval;
291    },
292    dispatchException: function dispatchException(r) {
293      if (this.done) throw r;
294      var e = this;
295      function n(t) {
296        a.type = "throw", a.arg = r, e.next = t;
297      }
298      for (var o = e.tryEntries.length - 1; o >= 0; --o) {
299        var i = this.tryEntries[o],
300          a = i[4],
301          u = this.prev,
302          c = i[1],
303          h = i[2];
304        if (-1 === i[0]) return n("end"), !1;
305        if (!c && !h) throw Error("try statement without catch or finally");
306        if (null != i[0] && i[0] <= u) {
307          if (u < c) return this.method = "next", this.arg = t, n(c), !0;
308          if (u < h) return n(h), !1;
309        }
310      }
311    },
312    abrupt: function abrupt(t, r) {
313      for (var e = this.tryEntries.length - 1; e >= 0; --e) {
314        var n = this.tryEntries[e];
315        if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
316          var o = n;
317          break;
318        }
319      }
320      o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
321      var i = o ? o[4] : {};
322      return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
323    },
324    complete: function complete(t, r) {
325      if ("throw" === t.type) throw t.arg;
326      return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
327    },
328    finish: function finish(t) {
329      for (var r = this.tryEntries.length - 1; r >= 0; --r) {
330        var e = this.tryEntries[r];
331        if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
332      }
333    },
334    "catch": function _catch(t) {
335      for (var r = this.tryEntries.length - 1; r >= 0; --r) {
336        var e = this.tryEntries[r];
337        if (e[0] === t) {
338          var n = e[4];
339          if ("throw" === n.type) {
340            var o = n.arg;
341            m(e);
342          }
343          return o;
344        }
345      }
346      throw Error("illegal catch attempt");
347    },
348    delegateYield: function delegateYield(r, e, n) {
349      return this.delegate = {
350        i: x(r),
351        r: e,
352        n: n
353      }, "next" === this.method && (this.arg = t), f;
354    }
355  }, r;
356}
357function asyncGeneratorStep(n, t, e, r, o, a, c) {
358  try {
359    var i = n[a](c),
360      u = i.value;
361  } catch (n) {
362    return void e(n);
363  }
364  i.done ? t(u) : Promise.resolve(u).then(r, o);
365}
366function _asyncToGenerator(n) {
367  return function () {
368    var t = this,
369      e = arguments;
370    return new Promise(function (r, o) {
371      var a = n.apply(t, e);
372      function _next(n) {
373        asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
374      }
375      function _throw(n) {
376        asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
377      }
378      _next(void 0);
379    });
380  };
381}
382function _defineProperty(e, r, t) {
383  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
384    value: t,
385    enumerable: !0,
386    configurable: !0,
387    writable: !0
388  }) : e[r] = t, e;
389}
390function _classCallCheck(a, n) {
391  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
392}
393function _defineProperties(e, r) {
394  for (var t = 0; t < r.length; t++) {
395    var o = r[t];
396    o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
397  }
398}
399function _createClass(e, r, t) {
400  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
401    writable: !1
402  }), e;
403}
404function _toPropertyKey(t) {
405  var i = _toPrimitive(t, "string");
406  return "symbol" == _typeof(i) ? i : i + "";
407}
408function _toPrimitive(t, r) {
409  if ("object" != _typeof(t) || !t) return t;
410  var e = t[Symbol.toPrimitive];
411  if (void 0 !== e) {
412    var i = e.call(t, r || "default");
413    if ("object" != _typeof(i)) return i;
414    throw new TypeError("@@toPrimitive must return a primitive value.");
415  }
416  return ("string" === r ? String : Number)(t);
417}
418(function () {
419  "use strict";
420
421  var e, t, n;
422  !function (e) {
423    e.SUBSCRIBER = "paid", e.REGISTERED = "lgdin";
424  }(e || (e = {})), function (e) {
425    e.ANONYMOUS = "a6425154060c8437cb7d5e78b07c53f2c2b052450", e.DARKMODE = "dark", e.DESKTOP = "pb-desktop", e.HIDDEN = "hidden", e.INITIALIZED_ADS = "pb-ads-initialized", e.LIGHTMODE = "light", e.LOGGEDIN = "l26c434f4c22ce5a4c56cc4bcfda0b5ae66292b8b", e.NO_ADS = "na64bf0efc8f03047d171e48a7d6ad0fe98e5a4db", e.MOBILE = "pb-mobile", e.ONLY_MOBILE = "only-mobile", e.OVERFLOW_HIDDEN = "overflow-hidden", e.REGISTER = "rea9bf6dc47dbb2366c1afa36611a73648dbc3e74", e.SUBSCRIBER = "s20c9d4ef36eeca7c0e1f7d38398e98e01d305f60", e.TEMPORARY_NOTES = "temporary-notes", e.LEFT_0 = "left-0", e.REFRESH_AFTER_LOGIN = "refresh-after-login";
426  }(t || (t = {})), function (e) {
427    e.ADBLOCKER = "__adblocker", e.USER_TYPE = "pb-user-type", e.USER_ID = "pb-user-id", e.TEMPORARY_NOTES = "pb-temporary-notes", e.TEXT_SIZE = "pb-text-size", e.THEME = "pb-theme", e.LOGIN = "__utp";
428  }(n || (n = {}));
429  var a, s, i, o, r, c, d, l, u, p, m, h;
430  !function (e) {
431    e.DESKTOP = "desktop", e.TABLET = "tablet", e.MOBILE = "mobile";
432  }(a || (a = {})), function (e) {
433    e.BIG = "big", e.DEFAULT = "default", e.EXTRABIG = "extrabig", e.MEDIUM = "medium";
434  }(s || (s = {})), function (e) {
435    e.CHANGE_SIZE_MODAL = "change-size-modal", e.CHANGE_THEME_MODAL = "change-theme-modal", e.COMMENTS_MODAL = "comments-modal", e.MODAL_LANG = "data-modal-lang", e.MODAL_TARGET = "data-modal-target", e.MODAL_TARGET_OPTIONAL = "data-modal-target-optional", e.MODAL_TITLE = "data-modal-title", e.ORIGINAL_TEXT_SIZE = "data-original-text-size", e.READ_LATER_MODAL = "read-later-modal", e.TEXT_SIZE = "data-text-size", e.THEME = "data-theme", e.LISTEN_MODAL = "listen-modal", e.SHARE_MODAL = "share-modal", e.LANG_PUBLIC = "public", e.GOOGLE_AFTER_LOGIN_MODAL = "google-login", e.NEWSLETTER = "newsletter", e.NEWSLETTER_EXCLUSIVA = "newsletter-exclusiva";
436  }(i || (i = {})), function (e) {
437    e.DOMAIN_NAME = "diaripublic.cat", e.SECTION_SLUG = "public";
438  }(o || (o = {})), function (e) {
439    e.ARTICLE_TITLE = "article-title", e.ACTION_BUTTONS = ".action-buttons > li", e.ADS = ".pb-ads", e.ADS_CONTAINER = ".pb-ads-container", e.ADS_DYNAMIC_COUNT = ".pb-ads-count", e.ADS_DYNAMIC_POSITIONS = ".pb-desktop-dynamic-positions", e.ADS_DYNAMIC_MEGABANNER = ".pb-desktop-dynamic-megabanner", e.ADS_DYNAMIC_MEGABANNER_MOBILE = ".pb-mobile-dynamic-megabanner", e.ADS_DYNAMIC_OUTBRAIN = ".pb-desktop-dynamic-outbrain", e.ADS_DYNAMIC_OUTBRAIN_MOBILE = ".pb-mobile-dynamic-outbrain", e.ADS_DYNAMIC_ROBAPAGINAS = ".pb-desktop-dynamic-robapaginas", e.ADS_DYNAMIC_ROBAPAGINAS_MOBILE = ".pb-mobile-dynamic-robapaginas", e.ARTICLE = "article-page", e.ARTICLE_OUTBRAIN = "article-outbrain-container", e.AUTHOR = "author", e.BODY = "body", e.BTN_PUBLICO_COMMENTS = ".btn-publico-comments", e.BUTTON = "button", e.CHANGE_TEXT_SIZE_BT = ".change-text-size-bt", e.CHANGE_SIZE_MODAL_CLASS = ".change-size-modal", e.CHANGE_THEME = ".change-theme-bt", e.CHANGE_SHARE = ".change-share-bt", e.CHANGE_THEME_MODAL_CLASS = ".change-theme-modal", e.CLOSE = ".close", e.CLOSE_STICKY = ".sticky-botton-close", e.COMMENTS = ".comments", e.COMMENTS_ID = "comments", e.COMMENTS_BOX = ".comments-box", e.COMMENTS_CONTAINER = ".comment-container", e.COMMENTS_CONTAINER_ID = "comments-container", e.COMMENTS_COUNT = ".comments-count", e.COMMENTS_FORM = ".comment-form", e.COMMENTS_HEADER = ".comments-header", e.COMMENTS_LOGIN = ".comments-login", e.COMMENTS_RESPONSE = ".comment-responses", e.COPY_TEXT = ".copy-text", e.DATA_ID = "data-id", e.FOOTER_LEGAL_CONTAINER = "#footer_legal", e.DISCARD_COMMENT = ".discard-comment", e.DISCARD_RESPONSE = ".discard-response", e.EXCO_FOOTER = ".article-footer-exco", e.EXCO_INTEXT = ".article-intext-exco", e.FORM = "form", e.GOOGLE_LOGIN_FORM_MODAL = "#form-modal-google-login", e.HOME = "home", e.HEADER_NAV = "header-nav", e.HIDDEN_RESPONSES = ".hidden-responses", e.ID_COMMENTS = "comments", e.ICON_COPY_LINK = ".icon-copy-link", e.ICON_SPINNER_CONTAINER = ".icon-spinner-container", e.ICON_TWITTER = ".icon-x-twitter", e.ICON_BLUESKY = ".icon-bluesky", e.ICON_TELEGRAM = ".icon-telegram-plane", e.ICON_WHATSAPP = ".icon-whatsapp", e.ICON_WHATSAPP_DESKTOP = ".icon-whatsapp.wa-desktop", e.ICON_WHATSAPP_MOBILE = ".icon-whatsapp.wa-mobile", e.ICON_FACEBOOK = ".icon-facebook-f", e.INPUT_URL = ".input-url", e.INPUT_USER = ".input-user", e.INPUT_URL_RESPONSE = ".input-url-response", e.INPUT_USER_RESPONSE = ".input-user-response", e.INPUT_ID_RESPONSE = ".input-id-response", e.JOIN_US = ".join-us", e.LISTEN = ".listen", e.LISTEN_CONTAINER = ".listen-container", e.LOGIN = ".login", e.LOGIN_TEXT = ".login-text", e.LOGOUT = ".logout", e.MAIN_CONTENT = "main-content", e.MENU_ACTION_BUTTONS = ".menu-action-buttons > li", e.MODAL = ".modal", e.MODAL_CONTAINER = ".modal-container", e.MODAL_CONTAINER_ID = "modal
439-container", e.MODAL_CONTENT = ".modal-content", e.MODAL_CONTENT_ITEM = ".modal-content-item", e.MODAL_TITLE = ".modal-title", e.NAVBAR = ".navbar-menu", e.NAVBAR_POPUP = "navbar-menu-popup", e.NAVBAR_BACKGROUND = ".navbar-bg", e.NAVBAR_BT = ".navbar-menu-bt", e.NAVBAR_CLOSE_BT = ".navbar-close", e.NEW_COMMENT_ID = "new-comment", e.NEW_COMMENT = ".new-comment-btn", e.READ_LATER = ".read-later", e.READ_LATER_CONTAINER = ".read-later-container", e.READ_LATER_TEXT = ".read-later-text", e.RESPONSE_TEXTAREA = ".response-textarea", e.REGISTER = ".register", e.REPLY_COMMENT = ".reply-comment", e.SECTION = "page-category", e.SHARE_BTN = ".share-bt", e.SHARE_MODAL = ".share-modal", e.SEND_COMMENT = ".send-comment", e.SEND_RESPONSE = ".send-response", e.SELECT_NEWSLETTER = ".select-newsletter", e.SIDEBAR_FIXED_ROBAPAGINAS = "sidebar-fixed-robapaginas", e.SHOW_RESPONSES = ".show-responses", e.SUBSCRIPTION_BTN = ".subscribers-btn-container", e.SUBSCRIPTION_CLAIMS = ".subscription-claims", e.TAG = "tag", e.TEXTAREA = "textarea", e.TITLE = "title", e.SPAN = "span", e.SVG_CONTAINER = "svg-container", e.USER_LOGGED = ".user-logged";
440  }(r || (r = {})), function (e) {
441    e.ARTICLE_TITLE = "article-title", e.ARTICLE_IMAGE = "article-main-image", e.MAM_TIME_ELEMENT_CONTENT = "mam-main-container", e.MAM_TIME_ELEMENT_TITLE = "h2.highlighted", e.MAM_TIME_ELEMENT_IMAGE = ".main-image figure", e.MAM_TIME_PARAM = "mamTime";
442  }(c || (c = {})), function (e) {
443    e.MY_ACCOUNT = "Mi cuenta", e.NO_READ_LATER = "No leer después", e.READ_LATER = "Leer después", e.READ_LATER_PROCESO = "...", e.READ_LATER_ERROR = "Error al guardar", e.OCULTAR_RESPUESTAS = "Ocultar respuestas", e.MOSTRAR_RESPUESTAS = "Mostrar respuestas", e.MY_ACCOUNT_CAT = "El meu compte", e.NO_READ_LATER_CAT = "No llegir després", e.READ_LATER_CAT = "Llegir després", e.OCULTAR_RESPUESTAS_CAT = "Amagar respostes", e.MOSTRAR_RESPUESTAS_CAT = "Mostrar respostes";
444  }(d || (d = {})), function (e) {
445    e.DARK = "dark", e.LIGHT = "light";
446  }(l || (l = {})), function (e) {
447    e.ARTICLE = "article-page", e.CATEGORY = "category-page", e.HOME = "home-page";
448  }(u || (u = {})), function (e) {
449    e.DUDAS = "#dudas--bloque", e.PREGUNTAS = "#preguntas--bloque", e.VENTAJAS = "#ventajas--bloque";
450  }(p || (p = {})), function (e) {
451    e.FONT_SIZE = "pb-dbg-fontsize", e.LOGIN = "pb-login", e.THEME = "pb-dbg-theme";
452  }(m || (m = {})), function (e) {
453    e.ANONYMOUS = "false", e.REGISTERED = "Registrado", e.SUBSCRIBER = "Suscriptor";
454  }(h || (h = {}));
455  var g = ["text-xs", "text-sm", "text-base", "text-lg", "text-xl", "text-xl2", "text-xl4", "text-xl6", "text-xl8", "text-xxl", "text-xxl2", "text-xxl4", "text-xxl6", "text-xxl8", "text-xxxl", "text-xxxl2", "text-xxxl4", "text-xxxl6", "text-xxxl8", "text-xxxxl", "desktop:text-xs", "desktop:text-sm", "desktop:text-base", "desktop:text-lg", "desktop:text-xl", "desktop:text-xl2", "desktop:text-xl4", "desktop:text-xl6", "desktop:text-xl8", "desktop:text-xxl", "desktop:text-xxl2", "desktop:text-xxl4", "desktop:text-xxl6", "desktop:text-xxl8", "desktop:text-xxxl", "desktop:text-xxxl2", "desktop:text-xxxl4", "desktop:text-xxxl6", "desktop:text-xxxl8", "desktop:text-xxxxl"],
456    b = ["first-letter:text-x5l", "first-letter:text-x5l6", "first-letter:text-x6l2", "first-letter:text-x6l8", "desktop:first-letter:text-x5l4", "desktop:first-letter:text-x6l", "desktop:first-letter:text-x6l8", "desktop:first-letter:text-x7l2"],
457    E = ["manana-en-publico", "las-claves-de-ana"],
458    f = ["/mi-cuenta/cambiar-contrasena", "/mi-cuenta/login", "/mi-cuenta/logout", "/landing/registro"];
459  function A(e) {
460    var t = "".concat(encodeURIComponent(e), "="),
461      n = document.cookie.split(";").map(function (e) {
462        return e.trim();
463      }).find(function (e) {
464        return e.startsWith(t);
465      });
466    return n ? decodeURIComponent(n.substring(t.length)) : null;
467  }
468  function S(e, t, n) {
469    var a = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "/";
470    var s = "";
471    if (null != n) if ("number" == typeof n) {
472      var _e2 = new Date();
473      _e2.setTime(_e2.getTime() + 24 * n * 60 * 60 * 1e3), s = "; expires=".concat(_e2.toUTCString());
474    } else s = "; expires=".concat(n);
475    document.cookie = "".concat(encodeURIComponent(e), "=").concat(encodeURIComponent(t)).concat(s, "; path=").concat(a);
476  }
477  function T(e) {
478    var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "/";
479    document.cookie = "".concat(encodeURIComponent(e), "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=").concat(t);
480  }
481  var I = function I() {
482      var e = window.location.href;
483      return e.includes("admin-local") || e.includes("admin-pr") || e.includes("admin.");
484    },
485    _ = function _() {
486      return "undefined" != typeof document && (document.documentElement.classList.contains(t.MOBILE) || /iPhone|iPad|iPod|Android/i.test(navigator.userAgent));
487    },
488    C = {
489      debug: {
490        color: "#7f8c8d",
491        fontWeight: "normal"
492      },
493      info: {
494        color: "#2980b9",
495        fontWeight: "normal"
496      },
497      warn: {
498        color: "#f39c12",
499        fontWeight: "bold"
500      },
501      error: {
502        color: "#e74c3c",
503        fontWeight: "bold"
504      }
505    };
506  function L(e, t, n, a, s) {
507    if (!function (e) {
508      return "warn" === e || "error" === e || !1;
509    }(e)) return;
510    var i = C[e];
511    i.color, i.fontWeight;
512    s.length;
513  }
514  function y(e) {
515    return {
516      debug: function debug(e, t) {
517        for (var _len = arguments.length, n = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
518          n[_key - 2] = arguments[_key];
519        }
520        return L("debug", 0, 0, 0, n);
521      },
522      info: function info(e, t) {
523        for (var _len2 = arguments.length, n = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
524          n[_key2 - 2] = arguments[_key2];
525        }
526        return L("info", 0, 0, 0, n);
527      },
528      warn: function warn(e, t) {
529        for (var _len3 = arguments.length, n = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
530          n[_key3 - 2] = arguments[_key3];
531        }
532        return L("warn", 0, 0, 0, n);
533      },
534      error: function error(e, t) {
535        for (var _len4 = arguments.length, n = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
536          n[_key4 - 2] = arguments[_key4];
537        }
538        return L("error", 0, 0, 0, n);
539      }
540    };
541  }
542  var w = y();
543  var N = /*#__PURE__*/function () {
544    function N() {
545      _classCallCheck(this, N);
546    }
547    return _createClass(N, null, [{
548      key: "updateHtmlClasses",
549      value: function updateHtmlClasses(e, n) {
550        var a = document.documentElement;
551        a && (a.classList.remove(t.SUBSCRIBER, t.REGISTER, t.ANONYMOUS), n && e !== h.SUBSCRIBER ? e === h.REGISTERED ? a.classList.add(t.REGISTER) : a.classList.add(t.ANONYMOUS) : a.classList.add(t.SUBSCRIBER), w.info("updateHtmlClasses", "Perfil de usuario aplicado", {
552          userType: e,
553          canShowAds: n
554        }));
555      }
556    }, {
557      key: "changeLoginToMyAccount",
558      value: function changeLoginToMyAccount() {
559        var e = document.getElementById(r.HEADER_NAV);
560        if (!e) return;
561        e.querySelectorAll(r.LOGIN).forEach(function (e) {
562          var _e$parentNode;
563          var t = e.cloneNode(!0);
564          (_e$parentNode = e.parentNode) === null || _e$parentNode === void 0 || _e$parentNode.replaceChild(t, e);
565          var n = t.querySelector(r.LOGIN_TEXT);
566          n ? n.textContent = d.MY_ACCOUNT : t.textContent = d.MY_ACCOUNT, t.addEventListener("click", function (e) {
567            e.preventDefault(), window.location.href = t.getAttribute("href") || "/mi-cuenta";
568          });
569        }), w.debug("changeLoginToMyAccount", 'Botón de "Inicia sesión" transformado en "Mi cuenta"');
570      }
571    }]);
572  }();
573  var x = y();
574  var R = /*#__PURE__*/function () {
575    function R() {
576      _classCallCheck(this, R);
577      this.initialized = !1, this.id = "", this.doRedirectWhenDecline = !0;
578    }
579    return _createClass(R, [{
580      key: "setDoNotRedirectWhenDecline",
581      value: function setDoNotRedirectWhenDecline() {
582        x.debug("setDoNotRedirectWhenDecline", "Anulamos la redirección a DIDOMI_DECLINE_REDIRECT cuando declinen el consentimiento."), this.doRedirectWhenDecline = !1;
583      }
584    }, {
585      key: "onConsentResolved",
586      value: function onConsentResolved(e) {
587        var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
588        var _t$fallbackIfNoTcfApi = t.fallbackIfNoTcfApi,
589          n = _t$fallbackIfNoTcfApi === void 0 ? !1 : _t$fallbackIfNoTcfApi,
590          _t$pollForTcfApi = t.pollForTcfApi,
591          a = _t$pollForTcfApi === void 0 ? !1 : _t$pollForTcfApi,
592          _t$maxRetries = t.maxRetries,
593          s = _t$maxRetries === void 0 ? 20 : _t$maxRetries,
594          _t$retryDelayMs = t.retryDelayMs,
595          i = _t$retryDelayMs === void 0 ? 100 : _t$retryDelayMs,
596          _o = function o(t) {
597            "function" == typeof window.__tcfapi ? window.__tcfapi("addEventListener", 2, function (t, n) {
598              n && t && R.TCF_RESOLVED_STATUSES.includes(t.eventStatus) && t.gdprApplies && (x.debug("onConsentResolved", "Consentimiento GDPR (TCF) resuelto, ejecutando callback"), e());
599            }) : a && t > 0 ? setTimeout(function () {
600              return _o(t - 1);
601            }, i) : n && (x.warn("onConsentResolved", "No se detectó __tcfapi, se ejecuta el callback sin esperar consentimiento"), e());
602          };
603        _o(s);
604      }
605    }, {
606      key: "init",
607      value: function init() {
608        var _this = this;
609        var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
610        if (this.initialized) return void x.debug("init", "Didomi ya estaba inicializado, se omite");
611        x.info("init", "Inicializando CMP y eventos de consentimiento GDPR");
612        var t = location.pathname,
613          n = R.silentPages.includes(t);
614        window.didomiConfig = window.didomiConfig || {}, window.didomiConfig.user = {
615          bots: {
616            consentRequired: !1,
617            extraUserAgents: ["cXensebot"]
618          }
619        }, (e.suppressNotice || n) && (x.debug("init", "Modo silencioso activado, aviso de cookies oculto", {
620          isSilentPage: n,
621          suppressNotice: e.suppressNotice
622        }), window.didomiConfig.notice = {
623          enable: !1
624        }), this.loadPrivacyScript();
625        var a = window.didomiOnReady || [];
626        window.didomiOnReady = a;
627        ["notice.clickdisagree", "preferences.clickdisagreetoall", "preferences.clickvendordisagree", "preferences.clickpurposedisagree", "preferences.clickcategorydisagree", "consent.changed"].forEach(function (e) {
628          a.push(function (t) {
629            t.on(e, function (n) {
630              var a = !1;
631              if (x.debug("init", "Evento de Didomi recibido: ".concat(e), n), "consent.changed" === e) {
632                var _e3 = t.getUserConsentStatusForAll();
633                x.debug("init", "Estado de consentimientos", _e3), x.debug("init", "Contador de consents", "userConsents.purposes.disabled.length =", _e3.purposes.disabled.length, "userConsents.vendors.disabled.length =", _e3.vendors.disabled.length, "userConsents.purposes.enabled.length =", _e3.purposes.enabled.length, "userConsents.vendors.enabled.length =", _e3.vendors.enabled.length), "click" === n.action && (_e3.purposes.disabled.length > 2 || _e3.vendors.disabled.length > 2) && (a = !0);
634              } else a = !0;
635              if (a && (x.warn("init", "El usuario ha rechazado parte o todo el consentimiento, se resetea Didomi"), t.reset(), _this.doRedirectWhenDecline)) {
636                var _e4 = "//www.publico.es/landing/suscripciones?from=cmp";
637                _e4 ? location.href = _e4 : x.error("init", "Falta definir DIDOMI_DECLINE_REDIRECT en las variables de entorno");
638              }
639            });
640          });
641        }), a.push(function (e) {
642          var t = new URLSearchParams(location.search);
643          location.pathname.includes("landing/suscripciones") && "cmp" === t.get("from") && _this.hideNotice(e);
644        }), this.initialized = !0;
645      }
646    }, {
647      key: "loadPrivacyScript",
648      value: function loadPrivacyScript() {
649        if (!this.initialized) {
650          window.gdprAppliesGlobally = !0;
651          var _e7 = function _e5(t) {
652              if (!window.frames[t]) if (document.body && document.body.firstChild) {
653                var _e6 = document.createElement("iframe");
654                _e6.style.display = "none", _e6.name = t, _e6.title = t, document.body.insertBefore(_e6, document.body.firstChild);
655              } else setTimeout(function () {
656                return _e7(t);
657              }, 5);
658            },
659            _t = function _t(e, t, n, a, s) {
660              var i = function i(e, n, a, _i) {
661                if ("function" != typeof a) return;
662                var o = window[t] || [];
663                window[t] = o;
664                var r = !1;
665                s && (r = s(e, _i, a)), r || o.push({
666                  command: e,
667                  version: n,
668                  callback: a,
669                  parameter: _i
670                });
671              };
672              i.stub = !0, i.stubVersion = 2;
673              var o = function o(t) {
674                if (!window[e] || !0 !== window[e].stub || !t.data) return;
675                var s = "string" == typeof t.data;
676                var i;
677                try {
678                  i = s ? JSON.parse(t.data) : t.data;
679                } catch (_unused) {
680                  return;
681                }
682                if (i[n]) {
683                  var _o2 = i[n];
684                  window[e](_o2.command, _o2.version, function (e, n) {
685                    var i = _defineProperty({}, a, {
686                      returnValue: e,
687                      success: n,
688                      callId: _o2.callId
689                    });
690                    t.source && t.source.postMessage(s ? JSON.stringify(i) : i, "*");
691                  }, _o2.parameter);
692                }
693              };
694              "function" != typeof window[e] && (window[e] = i, window.addEventListener ? window.addEventListener("message", o, !1) : window.attachEvent("onmessage", o));
695            };
696          _t("__uspapi", "__uspapiBuffer", "__uspapiCall", "__uspapiReturn"), _e7("__uspapiLocator"), _t("__tcfapi", "__tcfapiBuffer", "__tcfapiCall", "__tcfapiReturn"), _e7("__tcfapiLocator"), function (e, _window$didomiConfig) {
697            var t = document.createElement("link");
698            t.rel = "preconnect", t.href = "https://sdk.privacy-center.org/";
699            var n = document.createElement("link");
700            n.rel = "dns-prefetch", n.href = "https://sdk.privacy-center.org/";
701            var a = "https://sdk.privacy-center.org/".concat(e, "/loader.js?target=").concat(document.location.hostname);
702            if ((_window$didomiConfig = window.didomiConfig) !== null && _window$didomiConfig !== void 0 && _window$didomiConfig.user) {
703              var _window$didomiConfig$ = window.didomiConfig.user,
704                _e8 = _window$didomiConfig$.country,
705                _t2 = _window$didomiConfig$.region;
706              _e8 && (a += "&country=".concat(_e8)), _e8 && _t2 && (a += "&region=".concat(_t2));
707            }
708            var s = document.createElement("link");
709            s.rel = "preload", s.as = "script", s.href = a;
710            var i = document.createElement("script");
711            i.id = "spcloader", i.type = "text/javascript", i.async = !0, i.charset = "utf-8", i.src = a;
712            var o = document.getElementsByTagName("script")[0];
713            (o === null || o === void 0 ? void 0 : o.parentNode) && (o.parentNode.insertBefore(t, o), o.parentNode.insertBefore(n, o), o.parentNode.insertBefore(s, o), o.parentNode.insertBefore(i, o));
714          }("d892ed41-2bfc-4977-a05e-07be26865229");
715        }
716      }
717    }, {
718      key: "handleSuscriber",
719      value: function handleSuscriber() {
720        window.Didomi && (x.info("handleSuscriber", "Usuario suscriptor, se oculta el aviso de consentimiento sin alterar la decisión del usuario"), this.hideNotice(window.Didomi));
721      }
722    }, {
723      key: "hideNotice",
724      value: function hideNotice(e) {
725        var _e$notice;
726        e === null || e === void 0 || (_e$notice = e.notice) === null || _e$notice === void 0 || _e$notice.hide();
727      }
728    }, {
729      key: "resetConsentAfterSubscriberLogout",
730      value: function resetConsentAfterSubscriberLogout() {
731        window.Didomi && "function" == typeof window.Didomi.reset && (x.info("resetConsentAfterSubscriberLogout", "Suscriptor cerró sesión, se resetea el consentimiento para volver a mostrar el aviso"), window.Didomi.reset());
732      }
733    }], [{
734      key: "getInstance",
735      value: function getInstance() {
736        var e = "__DidomiService_instance__";
737        return window[e] ? x.debug("getInstance", "Instancia creada previamente") : (x.debug("getInstance", "Creando instancia"), window[e] = new R(), window[e].id = crypto.randomUUID()), x.debug("getInstance", "Devolvemos instancia " + window[e].id), window[e];
738      }
739    }]);
740  }();
741  function k(_x, _x2, _x3, _x4) {
742    return _k.apply(this, arguments);
743  }
744  function _k() {
745    _k = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(e, t, n, a) {
746      var s,
747        i,
748        _args7 = arguments;
749      return _regeneratorRuntime().wrap(function _callee7$(_context7) {
750        while (1) switch (_context7.prev = _context7.next) {
751          case 0:
752            s = _args7.length > 4 && _args7[4] !== undefined ? _args7[4] : {};
753            i = "https://api-eu.piano.io/id/api/v1/identity/userinfo?lang=en_US&aid=".concat(e.aid, "&access_token=").concat(n);
754            _context7.next = 4;
755            return fetch(i, _objectSpread({
756              method: "PUT",
757              headers: {
758                "Content-Type": "application/json; charset=UTF-8"
759              },
760              body: JSON.stringify({
761                uid: t,
762                custom_field_values: a
763              })
764            }, s.keepalive && {
765              keepalive: !0
766            }));
767          case 4:
768            return _context7.abrupt("return", _context7.sent.json());
769          case 5:
770          case "end":
771            return _context7.stop();
772        }
773      }, _callee7);
774    }));
775    return _k.apply(this, arguments);
776  }
777  R.silentPages = f, R.TCF_RESOLVED_STATUSES = ["tcloaded", "useractioncomplete"];
778  var O = y();
779  var D = /*#__PURE__*/function () {
780    function D() {
781      _classCallCheck(this, D);
782      this.abandonCFQueue = Promise.resolve(), this.CF_MAX_LEN = 3e3;
783    }
784    return _createClass(D, [{
785      key: "track",
786      value: function track(e, t, n) {
787        var _this2 = this;
788        this.abandonCFQueue = this.abandonCFQueue.then(function () {
789          return _this2.processAbandonUpdate(e, t, n);
790        })["catch"](function (e) {
791          O.error("track", "Error procesando el seguimiento de abandono, se continúa sin bloquear", e);
792        });
793      }
794    }, {
795      key: "getExtendedUser",
796      value: function getExtendedUser(e) {
797        return new Promise(function (t) {
798          e.pianoId.loadExtendedUser({
799            formName: "customFieldsCustomForm",
800            extendedUserLoaded: function extendedUserLoaded(e) {
801              return t(e);
802            }
803          });
804        });
805      }
806    }, {
807      key: "processAbandonUpdate",
808      value: function () {
809        var _processAbandonUpdate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, t, n) {
810          var a, _s, _i3, _o3, _r, _e9, _c, _d, _l, _u, _p, _m, _h;
811          return _regeneratorRuntime().wrap(function _callee$(_context) {
812            while (1) switch (_context.prev = _context.next) {
813              case 0:
814                a = t.pianoId.getUser();
815                if (!a) {
816                  _context.next = 30;
817                  break;
818                }
819                _context.prev = 2;
820                _context.next = 5;
821                return this.getExtendedUser(t);
822              case 5:
823                _s = _context.sent;
824                _i3 = ((_s === null || _s === void 0 ? void 0 : _s.custom_field_values) || []).find(function (e) {
825                  return "abandonoHistoricoCustomField" === (e === null || e === void 0 ? void 0 : e.field_name);
826                });
827                _o3 = _i3 === null || _i3 === void 0 ? void 0 : _i3.value;
828                _r = [];
829                if ("string" == typeof _o3 && _o3) try {
830                  _e9 = JSON.parse(_o3);
831                  _r = Array.isArray(_e9) ? _e9 : [];
832                } catch (_unused2) {
833                  O.warn("processAbandonUpdate", "El JSON del custom field era inválido, se resetea");
834                }
835                _c = new Date().toISOString(), _d = _r.findIndex(function (t) {
836                  return (t === null || t === void 0 ? void 0 : t.paso) === e.paso && (t === null || t === void 0 ? void 0 : t.term) === n;
837                });
838                _d >= 0 ? (_r[_d].hits = (Number(_r[_d].hits) || 0) + 1, _r[_d].etiqueta = e.etiqueta, _r[_d].lastUpdated = _c) : _r.push({
839                  term: n,
840                  paso: e.paso,
841                  etiqueta: e.etiqueta,
842                  hits: 1,
843                  lastUpdated: _c
844                }), _r.sort(function (e, t) {
845                  return ((t === null || t === void 0 ? void 0 : t.lastUpdated) || "").localeCompare((e === null || e === void 0 ? void 0 : e.lastUpdated) || "");
846                });
847                _l = JSON.stringify(_r);
848                for (; _l.length > this.CF_MAX_LEN && _r.length > 0;) _r.pop(), _l = JSON.stringify(_r);
849                _l.length > this.CF_MAX_LEN && (_r = [], _l = "[]");
850                _u = new Date().toISOString().split("T")[0].replace(/-/g, "/"), _p = n;
851                50 === e.paso && (_p = "", _u = "");
852                _m = [{
853                  field_name: "abandonoHistoricoCustomField",
854                  value: _l
855                }, {
856                  field_name: "abandonoPlanCustomField",
857                  value: _p
858                }, {
859                  field_name: "abandonoFechaCustomField",
860                  value: _u
861                }], _h = t.pianoId.getToken();
862                _context.next = 20;
863                return k(t, a.uid, _h, _m, {
864                  keepalive: !0
865                });
866              case 20:
867                O.debug("processAbandonUpdate", "Histórico de abandono guardado en Piano");
868                _context.t0 = 50 !== e.paso;
869                if (!_context.t0) {
870                  _context.next = 25;
871                  break;
872                }
873                _context.next = 25;
874                return this.nullifyAbandonoIfHasAccess(t, a.uid, _h);
875              case 25:
876                _context.next = 30;
877                break;
878              case 27:
879                _context.prev = 27;
880                _context.t1 = _context["catch"](2);
881                O.error("processAbandonUpdate", "Error al procesar el seguimiento de abandono", _context.t1);
882              case 30:
883              case "end":
884                return _context.stop();
885            }
886          }, _callee, this, [[2, 27]]);
887        }));
888        function processAbandonUpdate(_x5, _x6, _x7) {
889          return _processAbandonUpdate.apply(this, arguments);
890        }
891        return processAbandonUpdate;
892      }()
893    }, {
894      key: "nullifyAbandonoIfHasAccess",
895      value: function nullifyAbandonoIfHasAccess(e, t, n) {
896        return new Promise(function (a) {
897          e.api.callApi("/access/list", {}, /*#__PURE__*/function () {
898            var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
899              var _a;
900              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
901                while (1) switch (_context2.prev = _context2.next) {
902                  case 0:
903                    if (!(s && s.count > 0)) {
904                      _context2.next = 11;
905                      break;
906                    }
907                    _context2.prev = 1;
908                    _a = [{
909                      field_name: "abandonoPlanCustomField",
910                      value: ""
911                    }, {
912                      field_name: "abandonoFechaCustomField",
913                      value: ""
914                    }];
915                    _context2.next = 5;
916                    return k(e, t, n, _a, {
917                      keepalive: !0
918                    });
919                  case 5:
920                    O.debug("nullifyAbandonoIfHasAccess", "Usuario con acceso, se limpian los campos de abandono de plan y fecha");
921                    _context2.next = 11;
922                    break;
923                  case 8:
924                    _context2.prev = 8;
925                    _context2.t0 = _context2["catch"](1);
926                    O.warn("nullifyAbandonoIfHasAccess", "Error al limpiar los campos de abandono", _context2.t0);
927                  case 11:
928                    a();
929                  case 12:
930                  case "end":
931                    return _context2.stop();
932                }
933              }, _callee2, null, [[1, 8]]);
934            }));
935            return function (_x8) {
936              return _ref.apply(this, arguments);
937            };
938          }());
939        });
940      }
941    }], [{
942      key: "getInstance",
943      value: function getInstance() {
944        return D.instance || (O.debug("getInstance", "Creando instancia"), D.instance = new D()), D.instance;
945      }
946    }]);
947  }();
948  var v = /*#__PURE__*/function () {
949    function v() {
950      _classCallCheck(this, v);
951    }
952    return _createClass(v, null, [{
953      key: "show",
954      value: function show(e) {
955        var t = document.getElementById("messageBox");
956        t || (t = document.createElement("div"), t.id = "messageBox", Object.assign(t.style, {
957          position: "fixed",
958          top: "100px",
959          right: "20px",
960          color: "white",
961          padding: "10px 20px",
962          borderRadius: "8px",
963          boxShadow: "0 2px 10px rgba(0, 0, 0, 0.2)",
964          opacity: "0",
965          transition: "opacity 0.5s ease",
966          zIndex: "99999",
967          width: "90%",
968          maxWidth: "400px"
969        }), document.body.appendChild(t));
970        var n = e.status ? "#38a169" : "#e53e3e";
971        t.textContent = e.msg, t.style.backgroundColor = n, setTimeout(function () {
972          t && (t.style.opacity = "1");
973        }, 0), setTimeout(function () {
974          t && (t.style.opacity = "0");
975        }, 3e3);
976      }
977    }]);
978  }();
979  var M = y();
980  var U = /*#__PURE__*/function () {
981    function U() {
982      _classCallCheck(this, U);
983    }
984    return _createClass(U, null, [{
985      key: "registerHandlers",
986      value: function registerHandlers(e, t, a) {
987        e && "function" == typeof e.push && (M.debug("registerHandlers", "Registrando los eventos globales de Piano"), e.push(["addHandler", "checkoutClose", function (e) {
988          M.debug("registerHandlers", "El usuario ha cerrado el checkout", e), e && "checkoutCompleted" === e.state ? location.reload() : a();
989        }]), e.push(["addHandler", "meterExpired", function (e) {
990          M.info("registerHandlers", "Límite de artículos gratuitos agotado para este usuario", e);
991        }]), e.push(["addHandler", "logout", function () {
992          M.info("registerHandlers", "Cierre de sesión detectado desde Piano"), t.getUserType() === h.SUBSCRIBER && R.getInstance().resetConsentAfterSubscriberLogout(), T(n.USER_ID), T(n.USER_TYPE), location.reload();
993        }]), e.push(["addHandler", "checkoutCustomEvent", function (t) {
994          M.debug("registerHandlers", "Evento personalizado de checkout detectado", t), t && "create-cookie" === t.eventName ? U.handleCreateCookie(t.params) : t && "update-custom-field" === t.eventName && U.handleUpdate
994CustomField(t.params, e);
995        }]), e.push(["addHandler", "submitPayment", function (t) {
996          M.info("registerHandlers", "El usuario ha intentado enviar el pago", t), U.submitCounter++, U.submitCounter > 3 && (v.show({
997            status: !1,
998            msg: "Por favor, comprueba que están todos los datos correctamente cumplimentados, incluido el método de pago."
999          }), U.submitCounter = 0), U.pushToDataLayer(49, "continuar-pago", e);
1000        }]), e.push(["addHandler", "loginDisplayed", function () {
1001          U.pushToDataLayer(32, "login", e);
1002        }]), e.push(["addHandler", "loginRequired", function () {
1003          U.pushToDataLayer(30, "registro", e);
1004        }]), e.push(["addHandler", "registrationSuccess", function () {
1005          U.pushToDataLayer(31, "conversion-registro", e);
1006        }]), e.push(["addHandler", "loginSuccess", function (t) {
1007          M.info("registerHandlers", "Inicio de sesión correcto", t), U.pushToDataLayer(32, "conversion-login", e);
1008          var n = !0;
1009          var a = document.querySelector("div.tp-modal iframe");
1010          a && a instanceof HTMLIFrameElement && a.src && (a.src.includes("offer") || a.src.includes("checkout")) && (n = !1, M.debug("registerHandlers", "No se recarga la página: el usuario está en medio de un proceso de compra")), n && location.reload();
1011        }]), e.push(["addHandler", "startCheckout", function (e) {
1012          M.info("registerHandlers", "El usuario ha iniciado el proceso de checkout", e), U.currentTermName = (e === null || e === void 0 ? void 0 : e.termName) || "";
1013        }]), e.push(["addHandler", "checkoutSelectTerm", function (e) {
1014          M.debug("registerHandlers", "Nuevo término de suscripción seleccionado", e), U.currentTermName = (e === null || e === void 0 ? void 0 : e.termName) || "";
1015        }]), e.push(["addHandler", "checkoutStateChange", function (t) {
1016          var n = (t === null || t === void 0 ? void 0 : t.stateName) && U.CHECKOUT_STATE_DATALAYER[t.stateName];
1017          n && U.pushToDataLayer(n.paso, n.etiqueta, e);
1018        }]), e.push(["addHandler", "checkoutComplete", function (t) {
1019          M.info("registerHandlers", "Suscripción completada con éxito", t), U.pushToDataLayer(50, "conversion-suscripcion", e);
1020        }]));
1021      }
1022    }, {
1023      key: "handleCreateCookie",
1024      value: function handleCreateCookie(e) {
1025        if (e && e.cookie) {
1026          var _t3 = "_pc_cookie_".concat(e.cookie),
1027            _n = e.expirationDays ? parseInt(e.expirationDays, 10) : 7,
1028            _a2 = new Date();
1029          _a2.setTime(_a2.getTime() + 24 * _n * 60 * 60 * 1e3), document.cookie = "".concat(_t3, "=true;expires=").concat(_a2.toUTCString(), ";path=/"), M.debug("handleCreateCookie", "Cookie creada desde el checkout", _t3);
1030        }
1031      }
1032    }, {
1033      key: "handleUpdateCustomField",
1034      value: function () {
1035        var _handleUpdateCustomField = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e, t) {
1036          var n, a, s, i, _e0;
1037          return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1038            while (1) switch (_context3.prev = _context3.next) {
1039              case 0:
1040                n = e === null || e === void 0 ? void 0 : e.field;
1041                a = e === null || e === void 0 ? void 0 : e.value;
1042                "now" === a && (a = new Date().toISOString().split("T")[0].replace(/-/g, "/"));
1043                s = t.pianoId.getUser(), i = t.pianoId.getToken();
1044                if (!(n && a && s && i)) {
1045                  _context3.next = 15;
1046                  break;
1047                }
1048                _context3.prev = 5;
1049                _context3.next = 8;
1050                return k(t, s.uid, i, [{
1051                  field_name: n,
1052                  value: a
1053                }]);
1054              case 8:
1055                _e0 = _context3.sent;
1056                M.debug("handleUpdateCustomField", "Campo personalizado actualizado", _e0);
1057                _context3.next = 15;
1058                break;
1059              case 12:
1060                _context3.prev = 12;
1061                _context3.t0 = _context3["catch"](5);
1062                M.error("handleUpdateCustomField", "Error al actualizar el campo personalizado", _context3.t0);
1063              case 15:
1064              case "end":
1065                return _context3.stop();
1066            }
1067          }, _callee3, null, [[5, 12]]);
1068        }));
1069        function handleUpdateCustomField(_x9, _x0) {
1070          return _handleUpdateCustomField.apply(this, arguments);
1071        }
1072        return handleUpdateCustomField;
1073      }()
1074    }, {
1075      key: "pushToDataLayer",
1076      value: function pushToDataLayer(e, t, n) {
1077        window.dataLayer && (window.dataLayer.push({
1078          event: "funnel",
1079          paso: e,
1080          etiqueta: t
1081        }), n && n.pianoId && n.pianoId.getUser() && e >= 40 && e <= 50 && D.getInstance().track({
1082          paso: e,
1083          etiqueta: t
1084        }, n, U.currentTermName));
1085      }
1086    }]);
1087  }();
1088  U.currentTermName = "", U.submitCounter = 0, U.CHECKOUT_STATE_DATALAYER = {
1089    state2: {
1090      paso: 40,
1091      etiqueta: "seleccion-metodo-de-pago"
1092    },
1093    giftParams: {
1094      paso: 33,
1095      etiqueta: "regala-datos"
1096    },
1097    redemptionCodeApplied: {
1098      paso: 21,
1099      etiqueta: "regala-codigo"
1100    }
1101  };
1102  var P = y();
1103  var B = /*#__PURE__*/function () {
1104    function B() {
1105      _classCallCheck(this, B);
1106    }
1107    return _createClass(B, null, [{
1108      key: "addDidomiConfigFooterLink",
1109      value: function addDidomiConfigFooterLink() {
1110        var _document$querySelect;
1111        var e = location.pathname;
1112        if (R.silentPages && R.silentPages.includes(e)) return;
1113        var t = (_document$querySelect = document.querySelector(r.FOOTER_LEGAL_CONTAINER)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.querySelector("ul");
1114        if (t) {
1115          var _e1 = document.createElement("li");
1116          _e1.className = "text-sm mb-1";
1117          var _n2 = document.createElement("a");
1118          _n2.className = "hover:underline", _n2.href = "javascript:Didomi.preferences.show()", _n2.textContent = function () {
1119            if ("undefined" == typeof document) return !1;
1120            var _document$location = document.location,
1121              e = _document$location.hostname,
1122              t = _document$location.pathname;
1123            return e.includes(o.DOMAIN_NAME) || t === o.SECTION_SLUG || t.includes("".concat(o.SECTION_SLUG, "/"));
1124          }() ? "Configuració de cookies" : "Configurar cookies", _e1.appendChild(_n2), t.appendChild(_e1);
1125        }
1126      }
1127    }, {
1128      key: "initPianoFaldonListener",
1129      value: function initPianoFaldonListener() {
1130        window.addEventListener("message", function (e) {
1131          if (e.data && "ajustar-footer-colapsable" === e.data.type) {
1132            var _e10 = document.querySelector("footer");
1133            _e10 && _e10.style.setProperty("padding-bottom", "5.25rem");
1134          }
1135        }, !1);
1136      }
1137    }, {
1138      key: "initCarousel",
1139      value: function initCarousel() {
1140        var _e$querySelectorAll;
1141        var e = document.querySelector(".carrousel"),
1142          t = (_e$querySelectorAll = e === null || e === void 0 ? void 0 : e.querySelectorAll("li")) !== null && _e$querySelectorAll !== void 0 ? _e$querySelectorAll : [],
1143          n = document.querySelector(".carrousel-prev"),
1144          a = document.querySelector(".carrousel-next");
1145        if (_() || !e || !n || !a || t.length <= 4) return n && (n.style.display = "none"), void (a && (a.style.display = "none"));
1146        var s = 1;
1147        var i = Math.ceil(t.length / 4),
1148          o = 4 * t[0].clientWidth,
1149          r = function r() {
1150            n.style.display = s <= 1 ? "none" : "block", a.style.display = s >= i ? "none" : "block";
1151          };
1152        r(), a.addEventListener("click", function () {
1153          s < i && (e.scrollBy({
1154            left: o,
1155            behavior: "smooth"
1156          }), s++, r());
1157        }), n.addEventListener("click", function () {
1158          s > 1 && (e.scrollBy({
1159            left: -o,
1160            behavior: "smooth"
1161          }), s--, r());
1162        });
1163      }
1164    }, {
1165      key: "initHeaderButtons",
1166      value: function initHeaderButtons() {
1167        var e = document.querySelector(r.NAVBAR_BT),
1168          n = document.querySelector(r.NAVBAR),
1169          a = document.getElementById("navbar-menu-popup"),
1170          s = n === null || n === void 0 ? void 0 : n.querySelector(r.NAVBAR_CLOSE_BT),
1171          i = n === null || n === void 0 ? void 0 : n.querySelector(r.NAVBAR_BACKGROUND),
1172          o = document.querySelector("main.container.relative"),
1173          c = document.getElementById("sub-fixed-footer"),
1174          d = document.getElementById("sub-fixed-footer2"),
1175          l = document.getElementById("pb-login-popup");
1176        e !== null && e !== void 0 && e.addEventListener("click", function (e) {
1177          e.preventDefault(), a !== null && a !== void 0 && a.classList.remove("-left-[600px]"), a !== null && a !== void 0 && a.classList.add(t.LEFT_0), i !== null && i !== void 0 && i.classList.remove(t.HIDDEN), document.body.classList.add(t.OVERFLOW_HIDDEN), o !== null && o !== void 0 && o.classList.remove("z-20"), o !== null && o !== void 0 && o.classList.add("z-[41]"), c !== null && c !== void 0 && c.classList.remove("z-[51]"), c !== null && c !== void 0 && c.classList.add("z-40"), d !== null && d !== void 0 && d.classList.remove("z-[51]"), d !== null && d !== void 0 && d.classList.add("z-40"), l !== null && l !== void 0 && l.classList.remove("z-[51]"), l === null || l === void 0 ? void 0 : l.classList.add("z-40");
1178        }), s !== null && s !== void 0 && s.addEventListener("click", function (e) {
1179          e.preventDefault(), a !== null && a !== void 0 && a.classList.add("-left-[600px]"), a !== null && a !== void 0 && a.classList.remove(t.LEFT_0), i !== null && i !== void 0 && i.classList.add(t.HIDDEN), document.body.classList.remove(t.OVERFLOW_HIDDEN), o !== null && o !== void 0 && o.classList.remove("z-[41]"), o !== null && o !== void 0 && o.classList.add("z-20"), c !== null && c !== void 0 && c.classList.remove("z-40"), c !== null && c !== void 0 && c.classList.add("z-[51]"), d !== null && d !== void 0 && d.classList.remove("z-40"), d !== null && d !== void 0 && d.classList.add("z-[51]"), l !== null && l !== void 0 && l.classList.remove("z-40"), l === null || l === void 0 ? void 0 : l.classList.add("z-[51]");
1180        }), i === null || i === void 0 ? void 0 : i.addEventListener("click", function (e) {
1181          e.preventDefault(), s === null || s === void 0 ? void 0 : s.dispatchEvent(new Event("click"));
1182        });
1183      }
1184    }, {
1185      key: "initTodayInterest",
1186      value: function initTodayInterest() {
1187        if (document.body.classList.contains("pb-desktop")) {
1188          var _e11 = document.getElementById("hoy-interesa");
1189          if (_e11) {
1190            var _t4 = _e11.querySelector("ul"),
1191              _n3 = _e11.querySelectorAll("li");
1192            if (!_t4 || !_n3) return;
1193            var _a3 = 0,
1194              _s2 = !1,
1195              _i4 = [],
1196              _o4 = document.createElement("li");
1197            _o4.innerHTML = '<span class="icon-chevron-down mr-1" style="font-size:0.5rem;"></span> <span class="hover:underline">Más</span><ul class="hidden absolute mt-2 px-1.5 z-[51] right-0 shadow bg-warm-gray-100 dark:bg-cold-gray-700"></ul>', _o4.classList.add("more-item", "tablet:hidden", "relative", "cursor-pointer", "px-1", "py-2", "flex-shrink-0", "dark:text-cold-gray-100"), _n3.forEach(function (e) {
1198              _a3 += e.clientWidth, _a3 > _t4.clientWidth && (_i4.push(e), _s2 = !0);
1199            });
1200            var _r2 = _o4.querySelector("ul");
1201            _r2 && (_i4.forEach(function (e) {
1202              e.remove(), e.classList.add("whitespace-nowrap"), _r2.appendChild(e);
1203            }), _s2 && (_t4.appendChild(_o4), _t4.classList.remove("desktop:w-[944px]"), _t4.classList.add("desktop:w-[990px]"), _o4.addEventListener("click", function (t) {
1204              t.preventDefault(), _o4.classList.contains("active") ? (_o4.classList.remove("active", "bg-warm-gray-100", "dark:bg-cold-gray-700"), _r2.classList.add("hidden"), _e11.classList.add("overflow-x-auto", "desktop:overflow-hidden")) : (_o4.classList.add("active", "bg-warm-gray-100", "dark:bg-cold-gray-700"), _r2.classList.remove("hidden"), _e11.classList.remove("overflow-x-auto", "desktop:overflow-hidden"));
1205            })));
1206          }
1207        }
1208      }
1209    }, {
1210      key: "handlerDesktopAdsDynamicPositions",
1211      value: function handlerDesktopAdsDynamicPositions() {
1212        if (!_()) {
1213          var _e12 = r.ADS_DYNAMIC_POSITIONS;
1214          var _t5 = {};
1215          document.querySelectorAll(_e12).forEach(function (e) {
1216            var n = e.getAttribute("data-id");
1217            n && (_t5[n] = _t5[n] ? _t5[n] + 1 : 1, e.id = n + _t5[n]);
1218          });
1219        }
1220      }
1221    }, {
1222      key: "handlerRobapaginasDesktopHeigth",
1223      value: function handlerRobapaginasDesktopHeigth() {
1224        if (document.documentElement.classList.contains(t.DESKTOP)) {
1225          P.debug("handlerRobapaginasDesktopHeigth", "Ajustando la altura del robapáginas");
1226          var _e13 = document.getElementById(r.SIDEBAR_FIXED_ROBAPAGINAS),
1227            _t6 = document.getElementById(r.MAIN_CONTENT);
1228          _e13 && _t6 && _t6.clientHeight > 0 && (_e13.style.height = parseInt(_t6.clientHeight.toString()) - 1500 + "px");
1229        }
1230      }
1231    }, {
1232      key: "removeDesktopMinHeightClass",
1233      value: function removeDesktopMinHeightClass(e) {
1234        if (e.canWriteComments()) {
1235          var _e14 = document.getElementById(r.MAIN_CONTENT);
1236          if (_e14) {
1237            var _t7 = Array.from(_e14.children).find(function (e) {
1238              return e.classList.contains("desktop:min-h-[1400px]");
1239            });
1240            _t7 && (_t7.classList.remove("desktop:min-h-[1400px]"), P.debug("removeDesktopMinHeightClass", "Clase de altura mínima eliminada (usuario con permiso para comentar)"));
1241          }
1242        }
1243      }
1244    }]);
1245  }();
1246  var H = y();
1247  var G = /*#__PURE__*/function () {
1248    function G() {
1249      _classCallCheck(this, G);
1250    }
1251    return _createClass(G, null, [{
1252      key: "handleActionButtons",
1253      value: function handleActionButtons(e) {
1254        H.debug("handleActionButtons", "Inicializando listeners de botones de acción");
1255        var t = "".concat(r.MENU_ACTION_BUTTONS, ", ").concat(r.ACTION_BUTTONS, ":not(").concat(r.SHARE_BTN, "), ").concat(r.BTN_PUBLICO_COMMENTS);
1256        document.querySelectorAll(t).forEach(function (t) {
1257          var n = t.getAttribute(i.MODAL_TARGET);
1258          n !== i.CHANGE_SIZE_MODAL && n !== i.CHANGE_THEME_MODAL && n !== i.LISTEN_MODAL && n !== i.READ_LATER_MODAL && n !== i.COMMENTS_MODAL || t.addEventListener("click", function (a) {
1259            a.preventDefault();
1260            var s = !0;
1261            var o = String(e.getUserType());
1262            if (!(o === String(h.REGISTERED) || o === String(h.SUBSCRIBER)) || n !== i.COMMENTS_MODAL && n !== i.READ_LATER_MODAL || (H.debug("handleActionButtons", "Usuario autenticado, se ejecuta la acción directamente en vez de mostrar el modal"), G.handleCustomActionButtons(e), s = !1), s) {
1263              var _t$getAttribute, _t$getAttribute2, _t$getAttribute3;
1264              var _n4 = (_t$getAttribute = t.getAttribute(i.MODAL_TARGET)) !== null && _t$getAttribute !== void 0 ? _t$getAttribute : "",
1265                _a4 = e.getFeatures(),
1266                _s3 = (_t$getAttribute2 = t.getAttribute(i.MODAL_TITLE)) !== null && _t$getAttribute2 !== void 0 ? _t$getAttribute2 : "",
1267                _o5 = (_t$getAttribute3 = t.getAttribute(i.MODAL_LANG)) !== null && _t$getAttribute3 !== void 0 ? _t$getAttribute3 : "",
1268                _r3 = K.getInstance();
1269              _r3.updateModalData({
1270                id: _n4,
1271                url: "",
1272                text: "",
1273                title: _s3,
1274                lang: _o5,
1275                userFeatures: _a4
1276              }), _r3.show();
1277            }
1278          });
1279        }), this.handleShareButtons(e);
1280      }
1281    }, {
1282      key: "handleShareButtons",
1283      value: function handleShareButtons(e) {
1284        var n = document.querySelectorAll(r.SHARE_BTN);
1285        0 !== n.length && n.forEach(function (n) {
1286          n.addEventListener("click", function (a) {
1287            var _document$querySelect2, _document$querySelect3, _document$querySelect4, _document$querySelect5, _document$querySelect6, _document$querySelect7;
1288            a.preventDefault();
1289            var s = (_document$querySelect2 = (_document$querySelect3 = document.querySelector('meta[property="og:title"]')) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.getAttribute("content")) !== null && _document$querySelect2 !== void 0 ? _document$querySelect2 : "",
1290              o = (_document$querySelect4 = (_document$querySelect5 = document.querySelector('meta[property="og:url"]')) === null || _document$querySelect5 === void 0 ? void 0 : _document$querySelect5.getAttribute("content")) !== null && _document$querySelect4 !== void 0 ? _document$querySelect4 : "";
1291            o || (o = (_document$querySelect6 = (_document$querySelect7 = document.querySelector('link[rel="canonical"]')) === null || _document$querySelect7 === void 0 ? void 0 : _document$querySelect7.getAttribute("href")) !== null && _document$querySelect6 !== void 0 ? _document$querySelect6 : "");
1292            var c = n.getAttribute("href"),
1293              d = n.parentElement,
1294              l = d === null || d === void 0 ? void 0 : d.nextElementSibling;
1295            if (c && l) {
1296              s = (l === null || l === void 0 ? void 0 : l.textContent) || s, o = c;
1297              var _e15 = new MutationObserver(function () {
1298                var n = document.querySelector(r.SHARE_MODAL);
1299                if (n) {
1300                  var _a5 = n.querySelector('li[title="Copiar enlace"]'),
1301                    _s4 = n.querySelector(r.COPY_TEXT);
1302                  _a5 && _s4 && (_a5.classList.remove(t.HIDDEN), _a5.addEventListener("click", function () {
1303                    navigator.clipboard.writeText(o), _s4.textContent = "Enlace copiado";
1304                  })), _e15.disconnect();
1305                }
1306              });
1307              _e15.observe(document.body, {
1308                childList: !0,
1309                subtree: !0
1310              });
1311            }
1312            var u = new URL(window.location.href).searchParams.get("action"),
1313              p = K.getInstance(),
1314              m = _();
1315            if (navigator.share && m && !u) H.debug("handleShareButtons", "Compartiendo mediante el menú nativo del dispositivo"), navigator.share({
1316              title: s,
1317              text: s,
1318              url: p.buildShareUrl(o, "native_share")
1319            });else {
1320              var _n$getAttribute, _n$getAttribute2, _n$getAttribute3;
1321              H.debug("handleShareButtons", "Mostrando modal de compartir");
1322              var _t8 = (_n$getAttribute = n.getAttribute(i.MODAL_TARGET)) !== null && _n$getAttribute !== void 0 ? _n$getAttribute : "",
1323                _a6 = e.getFeatures(),
1324                _r4 = (_n$getAttribute2 = n.getAttribute(i.MODAL_TITLE)) !== null && _n$getAttribute2 !== void 0 ? _n$getAttribute2 : "",
1325                _c2 = (_n$getAttribute3 = n.getAttribute(i.MODAL_LANG)) !== null && _n$getAttribute3 !== void 0 ? _n$getAttribute3 : "";
1326              p.updateModalData({
1327                id: _t8,
1328                url: o,
1329                text: s,
1330                title: _r4,
1331                lang: _c2,
1332                userFeatures: _a6
1333              }), p.show();
1334            }
1335          });
1336        });
1337      }
1338    }, {
1339      key: "handleCustomActionButtons",
1340      value: function handleCustomActionButtons(e) {
1341        var _document$body$getAtt;
1342        var t = e === null || e === void 0 ? void 0 : e.getReadLater(),
1343          n = (_document$body$getAtt = document.body.getAttribute(r.DATA_ID)) !== null && _document$body$getAtt !== void 0 ? _document$body$getAtt : "";
1344        t && t.includes(n) && (document.querySelectorAll(".read-later span").forEach(function (e) {
1345          e.classList.remove("icon-bookmark"), e.classList.add("icon-bookmark-solid");
1346        }), document.querySelectorAll(".read-later-text").forEach(function (e) {
1347          e.textContent = d.NO_READ_LATER;
1348        }));
1349        var a = document.querySelectorAll(r.ACTION_BUTTONS);
1350        e.canListenArticle() && G.handlerListenButton(a), e.canReadLater() && G.handlerReadLaterButton(a), e.canReadComments() && G.handlerCommentsButton(a);
1351      }
1352    }, {
1353      key: "handlerListenButton",
1354      value: function handlerListenButton(e) {
1355        var _this3 = this;
1356        e.forEach(function (e) {
1357          e.getAttribute(i.MODAL_TARGET) === i.LISTEN_MODAL && (e = _this3.unbindEvent(e)).addEventListener("click", function (e) {
1358            e.preventDefault(), H.debug("handlerListenButton", "Reproductor de audio activado");
1359          });
1360        });
1361      }
1362    }, {
1363      key: "handlerReadLaterButton",
1364      value: function handlerReadLaterButton(e) {
1365        var _this4 = this;
1366        e.forEach(function (e) {
1367          if (e.getAttribute(i.MODAL_TARGET) === i.READ_LATER_MODAL) {
1368            e = _this4.unbindEvent(e);
1369            var _t9 = document.body.getAttribute(r.DATA_ID);
1370            e.addEventListener("click", /*#__PURE__*/function () {
1371              var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(n) {
1372                var _e16, _e17;
1373                var a, s, i, o, c, l, u, _e18;
1374                return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1375                  while (1) switch (_context4.prev = _context4.next) {
1376                    case 0:
1377                      n.preventDefault();
1378                      a = (_e16 = e) === null || _e16 === void 0 ? void 0 : _e16.querySelector(r.SPAN), s = (_e17 = e) === null || _e17 === void 0 ? void 0 : _e17.querySelector(r.READ_LATER_TEXT), i = n.currentTarget.closest(".page-content"), o = i === null || i === void 0 ? void 0 : i.querySelectorAll(".read-later-container button span"), c = i === null || i === void 0 ? void 0 : i.querySelectorAll(r.READ_LATER_TEXT), l = a === null || a === void 0 ? void 0 : a.classList.contains("icon-bookmark-solid"), u = l ? "remove" : "add";
1379                      _context4.prev = 2;
1380                      s && (s.textContent = d.READ_LATER_PROCESO);
1381                      _context4.next = 6;
1382                      return fetch("/mi-cuenta/forms/readlater", {
1383                        method: "POST",
1384                        headers: {
1385                          "Content-Type": "application/json"
1386                        },
1387                        body: JSON.stringify({
1388                          id: _t9,
1389                          action: u
1390                        })
1391                      });
1392                    case 6:
1393                      _e18 = _context4.sent;
1394                      if (_e18.ok) {
1395                        _context4.next = 9;
1396                        break;
1397                      }
1398                      throw s && (s.textContent = d.READ_LATER_ER
1398ROR), new Error("Error en la respuesta: ".concat(_e18.status));
1399                    case 9:
1400                      "add" === u ? (a !== null && a !== void 0 && a.classList.remove("icon-bookmark"), a !== null && a !== void 0 && a.classList.add("icon-bookmark-solid"), s && (s.textContent = d.NO_READ_LATER)) : (o && o.forEach(function (e) {
1401                        e.classList.remove("icon-bookmark-solid"), e.classList.add("icon-bookmark");
1402                      }), c && c.forEach(function (e) {
1403                        return e.textContent = d.READ_LATER;
1404                      }), s && (s.textContent = d.READ_LATER));
1405                      _context4.next = 15;
1406                      break;
1407                    case 12:
1408                      _context4.prev = 12;
1409                      _context4.t0 = _context4["catch"](2);
1410                      s && (s.textContent = d.READ_LATER_ERROR), H.warn("handlerReadLaterButton", 'No se pudo actualizar el estado de "leer después"', _context4.t0);
1411                    case 15:
1412                    case "end":
1413                      return _context4.stop();
1414                  }
1415                }, _callee4, null, [[2, 12]]);
1416              }));
1417              return function (_x1) {
1418                return _ref2.apply(this, arguments);
1419              };
1420            }());
1421          }
1422        });
1423      }
1424    }, {
1425      key: "handlerCommentsButton",
1426      value: function handlerCommentsButton(e) {
1427        var _this5 = this;
1428        e.forEach(function (e) {
1429          e.getAttribute(i.MODAL_TARGET) === i.COMMENTS_MODAL && (e = _this5.unbindEvent(e)).addEventListener("click", function (e) {
1430            e.preventDefault();
1431            var t = document.getElementById(r.ID_COMMENTS);
1432            if (t) {
1433              var _e19 = t.getBoundingClientRect(),
1434                _n5 = window.scrollY || document.documentElement.scrollTop;
1435              window.scrollTo({
1436                top: _e19.top + _n5 - 70,
1437                behavior: "smooth"
1438              });
1439            }
1440          });
1441        });
1442      }
1443    }, {
1444      key: "unbindEvent",
1445      value: function unbindEvent(e) {
1446        var _e$parentNode2;
1447        var t = e.cloneNode(!0);
1448        return (_e$parentNode2 = e.parentNode) !== null && _e$parentNode2 !== void 0 && _e$parentNode2.replaceChild(t, e), t;
1449      }
1450    }]);
1451  }();
1452  var F = y();
1453  var z = /*#__PURE__*/function () {
1454    function z() {
1455      _classCallCheck(this, z);
1456    }
1457    return _createClass(z, null, [{
1458      key: "changeTheme",
1459      value: function changeTheme(e, a) {
1460        F.info("changeTheme", "Tema aplicado", e), e === l.DARK ? (document.documentElement.classList.add(t.DARKMODE), document.documentElement.classList.remove(t.LIGHTMODE)) : e === l.LIGHT && (document.documentElement.classList.add(t.LIGHTMODE), document.documentElement.classList.remove(t.DARKMODE)), a && S(n.THEME, e, 365);
1461        var s = document.querySelectorAll('iframe[src*="template"]');
1462        if (s && s.length > 0) {
1463          var _t0 = JSON.stringify({
1464            action: "publicoTheme",
1465            theme: e
1466          });
1467          s.forEach(function (e) {
1468            try {
1469              e.contentWindow && e.contentWindow.postMessage(_t0, "*");
1470            } catch (e) {
1471              F.warn("changeTheme", "No se pudo enviar el tema al iframe", e);
1472            }
1473          });
1474        }
1475      }
1476    }]);
1477  }();
1478  var q = y();
1479  var $ = /*#__PURE__*/function () {
1480    function $() {
1481      _classCallCheck(this, $);
1482    }
1483    return _createClass($, null, [{
1484      key: "changeFontSize",
1485      value: function changeFontSize(e, t) {
1486        var _this6 = this;
1487        if (q.info("changeFontSize", "Tamaño de fuente aplicado", e), !Object.values([s.DEFAULT, s.MEDIUM, s.BIG, s.EXTRABIG]).includes(e)) return;
1488        Array.from(document.querySelectorAll("[".concat(i.ORIGINAL_TEXT_SIZE, "]"))).filter(function (e) {
1489          return "" !== e.getAttribute(i.ORIGINAL_TEXT_SIZE);
1490        }
1490).forEach(function (t) {
1491          var n = t.getAttribute(i.ORIGINAL_TEXT_SIZE);
1492          if (!n) return;
1493          var a = n,
1494            o = n;
1495          if (n.includes(":")) {
1496            var _e20 = n.includes("desktop:") ? n.split("desktop:") : n.split(":");
1497            o = _e20[0].trim(), a = _e20[1].trim();
1498          }
1499          Array.from(t.classList).filter(function (e) {
1500            return g.includes(e);
1501          }).forEach(function (e) {
1502            return t.classList.remove(e);
1503          }), e === s.DEFAULT ? t.classList.add(o, "desktop:".concat(a)) : t.classList.add(_this6.getFontSizeToAdd(o, e), "desktop:".concat(_this6.getFontSizeToAdd(a, e)));
1504        }), this.applyFirstLetterOpinionSize(e), t && S(n.TEXT_SIZE, e, 365);
1505      }
1506    }, {
1507      key: "applyFirstLetterOpinionSize",
1508      value: function applyFirstLetterOpinionSize(e) {
1509        var t = document.getElementById("body-modules");
1510        if (!t || !t.classList.contains("opinion")) return;
1511        var n = 0;
1512        b.forEach(function (e) {
1513          t.classList.remove(e);
1514        }), e === s.MEDIUM ? n = 1 : e === s.BIG ? n = 2 : e === s.EXTRABIG && (n = 3), t.classList.add(b[0 + n], b[4 + n]);
1515      }
1516    }, {
1517      key: "getFontSizeToAdd",
1518      value: function getFontSizeToAdd(e, t) {
1519        var n = g.indexOf(e);
1520        return -1 === n && (n = 2), t === s.MEDIUM ? n += 1 : t === s.BIG ? n += 2 : t === s.EXTRABIG && (n += 3), g[Math.min(n, g.length - 1)];
1521      }
1522    }]);
1523  }();
1524  var W = y();
1525  var Y = /*#__PURE__*/function () {
1526    function Y() {
1527      _classCallCheck(this, Y);
1528      this.device = "";
1529    }
1530    return _createClass(Y, [{
1531      key: "init",
1532      value: function init() {
1533        W.info("init", "Inicializando componentes comunes de la página"), B.initHeaderButtons(), B.initTodayInterest(), B.initCarousel(), B.addDidomiConfigFooterLink(), B.initPianoFaldonListener();
1534        var e = se.getInstance().getCurrentFontSize();
1535        e && e !== s.DEFAULT && $.changeFontSize(e, !1);
1536      }
1537    }, {
1538      key: "handlerCustomActionButtons",
1539      value: function handlerCustomActionButtons(e) {
1540        G.handleCustomActionButtons(e);
1541      }
1542    }, {
1543      key: "handlerActionButtons",
1544      value: function handlerActionButtons(e) {
1545        G.handleActionButtons(e);
1546      }
1547    }, {
1548      key: "changeFontSize",
1549      value: function changeFontSize(e, t) {
1550        $.changeFontSize(e, t);
1551      }
1552    }, {
1553      key: "changeTheme",
1554      value: function changeTheme(e, t) {
1555        z.changeTheme(e, t);
1556      }
1557    }, {
1558      key: "handlerDesktopAdsDynamicPositions",
1559      value: function handlerDesktopAdsDynamicPositions() {
1560        B.handlerDesktopAdsDynamicPositions();
1561      }
1562    }, {
1563      key: "removeDesktopMinHeightClass",
1564      value: function removeDesktopMinHeightClass(e) {
1565        B.removeDesktopMinHeightClass(e);
1566      }
1567    }, {
1568      key: "handlerRobapaginasDesktopHeigth",
1569      value: function handlerRobapaginasDesktopHeigth() {
1570        B.handlerRobapaginasDesktopHeigth();
1571      }
1572    }], [{
1573      key: "getInstance",
1574      value: function getInstance() {
1575        return Y.instance || (W.debug("getInstance", "Creando instancia"), Y.instance = new Y()), Y.instance;
1576      }
1577    }]);
1578  }();
1579  var V = y();
1580  function j(e) {
1581    window.adk_subscribed = e, V.info("setAdkaoraVar", "Seteando adk_subscribed = ".concat(e));
1582  }
1583  var X = y();
1584  var K = /*#__PURE__*/function () {
1585    function K() {
1586      _classCallCheck(this, K);
1587      this.initialized = !1, this.data = {
1588        id: "",
1589        url: "",
1590        text: "",
1591        title: "",
1592        lang: "",
1593        userFeatures: {}
1594      };
1595    }
1596    return _createClass(K, [{
1597      key: "addSelectedText",
1598      value: function addSelectedText(e) {
1599        var _t$getCurrentTheme, _t$getCurrentFontSize;
1600        var t = se.getInstance(),
1601          n = ((_t$getCurrentTheme = t.getCurrentTheme) === null || _t$getCurrentTheme === void 0 ? void 0 : _t$getCurrentTheme.call(t)) || l.LIGHT,
1602          a = ((_t$getCurrentFontSize = t.getCurrentFontSize) === null || _t$getCurrentFontSize === void 0 ? void 0 : _t$getCurrentFontSize.call(t)) || s.DEFAULT;
1603        e && (this.insertSelectedText(e, "".concat(r.CHANGE_THEME, "[").concat(i.THEME, "=\"").concat(n, "\"]")), this.insertSelectedText(e, "".concat(r.CHANGE_TEXT_SIZE_BT, "[").concat(i.TEXT_SIZE, "=\"").concat(a, "\"]")));
1604      }
1605    }, {
1606      key: "changeIllustration",
1607      value: function changeIllustration(e) {
1608        if (e.includes(r.SVG_CONTAINER)) {
1609          var _t1 = "".concat(Math.floor(6 * Math.random())).concat(Math.floor(9 * Math.random()) + 1);
1610          e = e.replace('svg-container">', "svg-container\"><img src=\"/dist/publico/svg/".concat(_t1, ".svg\" class=\"pr-4 max-w-32 desktop:max-w-44 h-auto\" alt=\"Ilustraci\xF3n\">"));
1611        }
1612        return e;
1613      }
1614    }, {
1615      key: "getModalContent",
1616      value: function getModalContent() {
1617        var e = se.getInstance(),
1618          t = !e.canReadComments || e.canReadComments();
1619        var n = "";
1620        switch (this.data.id) {
1621          case i.CHANGE_SIZE_MODAL:
1622            n = '<ul class="change-size-modal modal-content-item">\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="default">\n        <span class="icon-font text-lg mr-2"></span>\n        <span>Por defecto</span>\n    </li>\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="medium">\n        <span class="icon-font text-xl mr-2"></span>\n        <span>Mediano</span>\n    </li>\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="big">\n        <span class="icon-font text-xl2 mr-2"></span>\n        <span>Grande</span>\n    </li>\n    <li class="change-text-size-bt p-3 flex w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="extrabig">\n        <span class="icon-font text-xl4 mr-2"></span>\n        <span>Extragrande</span>\n    </li>\n</ul>', this.data.lang == i.LANG_PUBLIC && (n = '<ul class="change-size-modal modal-content-item">\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="default">\n        <span class="icon-font text-lg mr-2"></span>\n        <span>Per defecte</span>\n    </li>\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="medium">\n        <span class="icon-font text-xl mr-2"></span>\n        <span>Mitjà</span>\n    </li>\n    <li class="change-text-size-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="big">\n        <span class="icon-font text-xl2 mr-2"></span>\n        <span>Gran</span>\n    </li>\n    <li class="change-text-size-bt p-3 flex w-full btn-secondary-left dark:bg-darkmode cursor-pointer" data-text-size="extrabig">\n        <span class="icon-font text-xl4 mr-2"></span>\n        <span>Molt gran</span>\n    </li>\n</ul>');
1623            break;
1624          case i.CHANGE_THEME_MODAL:
1625            n = '<ul class="change-theme-modal modal-content-item">\n    <li class="change-theme-bt dark:bg-darkmode p-3 mb-3 w-full btn-secondary-left desktop:min-w-48" data-theme="light">\n        <span class="icon-sun-solid text-lg mr-2"></span> <span>Claro</span>\n    </li>\n    <li class="change-theme-bt dark:bg-darkmode p-3 w-full btn-secondary-left desktop:min-w-48" data-theme="dark">\n        <span class="icon-moon-solid text-lg mr-2"></span> <span>Oscuro</span>\n    </li>\n</ul>', this.data.lang == i.LANG_PUBLIC && (n = '<ul class="change-theme-modal modal-content-item">\n    <li class="change-theme-bt dark:bg-darkmode p-3 mb-3 w-full btn-secondary-left desktop:min-w-48" data-theme="light">\n        <span class="icon-sun-solid text-lg mr-2"></span> <span>Clar</span>\n    </li>\n    <li class="change-theme-bt dark:bg-darkmode p-3 w-full btn-secondary-left desktop:min-w-48" data-theme="dark">\n        <span class="icon-moon-solid text-lg mr-2"></span> <span>Obscur</span>\n    </li>\n</ul>');
1626            break;
1627          case i.READ_LATER_MODAL:
1628            t || (n = this.changeIllustration('<div class="read-later-modal modal-content-item"> \n    <div class="flex gap-4 items-center"> \n        <div class="svg-container"></div>\n        <div>\n            <p class="block font-bold text-lg desktop:text-xl4 mb-1 leading-tight">Esta funcionalidad es solo para usuarios registrados. \n                <sp
1628an class="block mt-4 text-base desktop:text-xl font-normal leading-snug">Si no tienes usuario, puedes registrarte.</span> \n                <span class="block mt-2 desktop:mt-0 text-base desktop:text-xl font-normal underline leading-snug">Son solo dos minutos.</span>\n            </p> \n            <a href="/registro" title="Regístrate" class="register my-5 btn-secondary dark:bg-darkmode w-full justify-center">Regístrate</a>\n            <p class="text-center">Si ya tienes una cuenta, <a href="/login" title="inicia sesión" class="login text-link-normal underline dark:text-link-dark">inicia sesión</a></p> \n        </div> \n    </div>    \n</div>')), n = n.replace('href="/registro"', 'href="/registro?next=' + window.location.pathname + '"'), n = n.replace('href="/login"', 'href="/login?next=' + window.location.pathname + '"');
1629            break;
1630          case i.COMMENTS_MODAL:
1631            if (!t) {
1632              n = this.changeIllustration('<div class="comments-modal modal-content-item"> \n    <div class="flex gap-4 items-center"> \n        <div class="svg-container"></div>\n        <div>\n            <p class="block font-bold text-lg desktop:text-xl4 mb-3 leading-tight">Funcionalidad disponible solo con una suscripción activa. <span class="block mt-4 text-base desktop:text-xl font-normal leading-snug">Si quieres participar en la conversación, da un paso más y únete a nuestra comunidad.</span> </p> \n            <a href="/landing/suscripciones?tpcc=articulo_modal_comentarios" title="Únete a Público" class="p-4 my-5 btn-terciary-sm text-white bg-publico dark:bg-publico w-full justify-center">Únete a Público</a> \n            <p class="text-center">Si ya tienes una cuenta, <a href="/login" title="inicia sesión" class="login text-link-normal underline dark:text-link-dark">inicia sesión</a></p> \n        </div> \n    </div>    \n</div>'), n = n.replace('href="/login"', 'href="/login?next=' + window.location.pathname + '"');
1633              break;
1634            }
1635            break;
1636          case i.SHARE_MODAL:
1637            n = '<ul class="share-modal modal-content-item">\n    <li title="Whatsapp" class="tablet:hidden change-share-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="light"><span class="icon-whatsapp wa-desktop text-lg mr-2"></span> <span>Whatsapp</span></li>\n    <li title="Whatsapp" class="desktop:hidden change-share-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="light"><span class="icon-whatsapp wa-mobile text-lg mr-2"></span> <span>Whatsapp</span></li>\n\n    <li title="Telegram" class="change-share-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="dark"><span class="icon-telegram-plane text-lg mr-2"></span> <span>Telegram</span></li>\n    <li title="Bluesky" class="change-share-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="light"><span class="icon-bluesky text-lg mr-2"></span> <span>Bluesky</span></li>\n    <li title="Facebook" class="change-share-bt p-3 mb-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="light"><span class="icon-facebook-f text-lg mr-2"></span> <span>Facebook</span></li>\n    <li title="X" class="change-share-bt p-3 w-full btn-secondary-left dark:bg-darkmode min-w-64" data-theme="light"><span class="icon-x-twitter text-lg mr-2"></span> <span>X</span></li>\n    <li title="Copiar enlace" class="hidden change-share-bt p-3 w-full btn-secondary-left dark:bg-darkmode min-w-64 mt-3" data-theme="light"><span class="icon-link text-lg mr-2"></span> <span class=\'copy-text\'>Copiar enlace</span></li>\n</ul>';
1638            break;
1639          case i.LISTEN_MODAL:
1640            t || (n = this.changeIllustration('<div class="listen-modal modal-content-item"> \n    <div class="flex gap-4 items-center"> \n        <div class="svg-container"></div>\n        <div>\n            <p class="block font-bold text-lg desktop:text-xl4 mb-3 leading-tight">Escuchar los artículos es solo para nuestros suscriptores. <span class="block mt-4 text-base desktop:text-xl font-normal leading-snug">Si quieres disfrutar de esta y otras ventajas, da un paso más y únete a nuestra comunidad.</span> </p>\n            <a href="/landing/suscripciones?tpcc=articulo_modal_escuchar" title="Únete a Público" class="p-4 my-5 btn-terciary-sm text-white bg-publico dark:bg-publico w-full justify-center">Únete a Público</a> \n            <p class="text-center">Si ya tienes una cuenta, <a href="/login" title="inicia sesión" class="login text-link-normal underline dark:text-link-dark">inicia sesión</a></p> \n        </div> \n    </div>    \n</div>'));
1641            break;
1642          case i.NEWSLETTER:
1643            n = this.changeIllustration('<div class="newsletter modal-content-item">\n    <div class="flex items-center gap-4">\n      <div class="svg-container"></div>\n      <div>\n        <p class="block text-pretty font-bold text-lg desktop:text-xl6 mb-3 leading-tight">Para recibir newsletters de Público necesitas tener una cuenta <span class="block mt-4 desktop:mt-6 text-base desktop:text-xl font-normal leading-snug">Si estás interesado en recibir nuestros contenidos editoriales directamente en tu email, no dudes en crear tu cuenta con nosotros.</span>\n        </p>\n        <a href="/registro?next=/landing/newsletter" title="Registrate, es gratis" class="register refresh-after-login p-4 my-5 btn-terciary-sm bg-form-input-focus text-white w-full justify-center">¡Regístrate! Es gratis </a>\n      </div>\n    </div>\n    <p class="text-center mt-3 pt-3 border-t border-warm-gray-100 only-anonymous">Si ya tienes una cuenta, <a href="/login" title="inicia sesión" class="refresh-after-login login text-link-normal underline dark:text-link-dark">inicia sesión</a></p>\n</div>
1643'), "" !== this.data.url && (n = n.replace("/registro?next=/landing/newsletter", "/registro?next=".concat(this.data.url)));
1644            break;
1645          case i.NEWSLETTER_EXCLUSIVA:
1646            n = this.changeIllustration('<div class="newsletter-exclusiva comments-modal modal-content-item">\n    <div class="flex items-center gap-4">\n      <div class="svg-container"></div>\n      <div>\n        <p class="block text-pretty font-bold text-lg desktop:text-xl6 mb-3 leading-tight">Esta newsletter es exclusiva para socias y socios <span class="block mt-4 desktop:mt-6 text-base desktop:text-xl font-normal leading-snug">Solo si eres miembro de nuestra comunidad podrás recibir este contenido exclusivo en tu mail. Apoya el proyecto y disfruta de estas y otras ventajas solo para socias y socios.</span>\n        </p>\n        <a href="/landing/suscripciones?tpcc=landingnl_modal_nlsocios" title="Hazte socia/o" class="p-4 my-5 btn-terciary-sm bg-form-input-focus text-white w-full justify-center">Hazte socia/o</a>\n      </div>\n    </div>\n    <p class="text-center mt-3 pt-3 border-t border-warm-gray-100 only-anonymous">Si ya tienes una cuenta, <a href="/login" title="inicia sesión" class="login refresh-after-login text-link-normal underline dark:text-link-dark">inicia sesión</a></p>\n</div>');
1647            break;
1648          case i.GOOGLE_AFTER_LOGIN_MODAL:
1649            n = '<div class="google-login-modal modal-content-item">\n<div class="dark:text-neutral-gray-100">\n    <p class="mb-4">Acabas de iniciar sesión en Público con los datos de tu cuenta de Google. En unos minutos recibirás un correo de bienvenida y las instrucciones para establecer tu contraseña de acceso. Recuerda que tu acceso a nuestra web tendrá su propia contraseña y que no compartirá las credenciales de tu cuenta de Google.</p>\n    \n    <h2 class="font-bold text-lg desktop:text-xl mb-2">¿Quieres recibir nuestras newsletters?</h2>\n\n    <form id="form-modal-google-login" method="post" action="/mi-cuenta/forms/set_nl_preferences" class="pb-16">\n        <div class="mb-5">\n            <label for="googleLoginNewslettersComunicaciones" class="relative text-lg pl-9 mb-3 cursor-pointer select-none group/nl-comunicaciones"> Emails informativos sobre la República de <span class="italic">Público</span>\n                <input type="checkbox" id="googleLoginNewslettersComunicaciones" name="googleLoginNewsletters[]" value="comunicaciones" class="absolute opacity-0 cursor-pointer h-0 w-0 peer/nl-comunicaciones">\n                <span class="absolute top-0 left-0 h-6 w-6 bg-warm-gray-100 group-hover/nl-comunicaciones:bg-warm-gray-200 peer-checked/nl-comunicaciones:bg-darkmode peer-checked/nl-comunicaciones:after:block after:content-[\'\'] after:absolute after:hidden after:left-2 after:top-0.5 after:w-2 after:h-4 after:border-white after:border-r after:border-r-4 after:border-b after:border-b-4 after:rotate-45"></span>\n            </label>\n        </div>\n\n        <div class="mb-5">\n            <label for="googleLoginNewslettersEditorial" class="relative text-lg pl-9 mb-3 cursor-pointer select-none group/nl-editorial"> Envíos editoriales (descubre nuestras newsletters “Ponte al día”, “Hoy en Público” o “Tremending”)\n                <input type="checkbox" id="googleLoginNewslettersEditorial" name="googleLoginNewsletters[]" value="editorial" class="absolute opacity-0 cursor-pointer h-0 w-0 peer/nl-editorial">\n                <span class="absolute top-0 left-0 h-6 w-6 bg-warm-gray-100 group-hover/nl-editorial:bg-warm-gray-200 peer-checked/nl-editorial:bg-darkmode peer-checked/nl-editorial:after:block after:content-[\'\'] after:absolute after:hidden after:left-2 after:top-0.5 after:w-2 after:h-4 after:border-white after:border-r after:border-r-4 after:border-b after:border-b-4 after:rotate-45"></span>\n            </label>\n        </div>\n\n        <button class="btn-primary float-right" type="submit">Continuar</button>\n    </form>\n</div>\n</div>';
1650        }
1651        return n;
1652      }
1653    }, {
1654      key: "init",
1655      value: function init() {
1656        var _document$querySelect8,
1657          _this7 = this;
1658        X.debug("init", "Inicializando contenedor de ventana modal"), this.initialized = !0, (_document$querySelect8 = document.querySelector(r.BODY)) === null || _document$querySelect8 === void 0 ? void 0 : _document$querySelect8.insertAdjacentHTML("beforeend", '\n<div id="modal-container" tabindex="-1" aria-hidden="true" class="modal modal-container overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 bottom-0 z-50 w-full desktop:inset-0 hidden">\n    <div class="p-4 flex justify-center items-center relative w-full min-h-full bg-black/90">\n        <div class="flex justify-center items-center min-h-full">\n            <div class="relative bg-white rounded-lg shadow max-w-2xl dark:bg-gray-700 dark:bg-cold-gray-700">\n                <div class="p-4 flex items-center justify-between desktop:p-5 border-b border-neutral-gray-200 rounded-t dark:border-neutral-gray-600">\n                    <p class="modal-title text-xl text-left font-bold text-gray-900 dark:text-white"></p>\n                    <button title="Cerrar" type="button" class="close text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white">
1658\n                        <span class="icon-times text-xl4 dark:text-white"></span> <span class="sr-only">Cerrar</span>\n                    </button>\n                </div>\n                <div id="modal-content" class="modal-content p-4 desktop:mt-5 desktop:p-5 desktop:pt-0 space-y-4"></div>\n            </div>\n        </div>\n    </div>\n</div>\n');
1659        var e = document.getElementById(r.MODAL_CONTAINER_ID),
1660          t = e === null || e === void 0 ? void 0 : e.querySelector(r.CLOSE);
1661        e && t && t.addEventListener("click", function () {
1662          _this7.hide(e);
1663        });
1664      }
1665    }, {
1666      key: "insertSelectedText",
1667      value: function insertSelectedText(e, t) {
1668        var n = e.querySelector(t);
1669        if (n) {
1670          var _e21 = document.createElement(r.SPAN);
1671          _e21.textContent = this.data.lang == i.LANG_PUBLIC ? "Seleccionat" : "Seleccionado", _e21.className = "selected text-sm ml-auto", n === null || n === void 0 ? void 0 : n.appendChild(_e21);
1672        }
1673      }
1674    }, {
1675      key: "show",
1676      value: function show() {
1677        var _document$querySelect9;
1678        X.debug("show", "Mostrando ventana modal", this.data.id), j(!0), this.initialized || this.init();
1679        var e = document.getElementById(r.MODAL_CONTAINER_ID);
1680        e ? (this.updateModalContent(e), e.classList.remove(t.HIDDEN), (_document$querySelect9 = document.querySelector(r.BODY)) === null || _document$querySelect9 === void 0 ? void 0 : _document$querySelect9.classList.add(t.OVERFLOW_HIDDEN)) : X.error("show", "No se encuentra el contenedor de la ventana modal en el DOM");
1681      }
1682    }, {
1683      key: "handlerModalButtons",
1684      value: function handlerModalButtons(e) {
1685        var _this8 = this;
1686        var t = Y.getInstance(),
1687          n = e.querySelector(r.GOOGLE_LOGIN_FORM_MODAL);
1688        n && n.addEventListener("submit", /*#__PURE__*/function () {
1689          var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(t) {
1690            var n, a;
1691            return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1692              while (1) switch (_context5.prev = _context5.next) {
1693                case 0:
1694                  t.preventDefault();
1695                  n = t.target, a = new FormData(n);
1696                  _context5.prev = 2;
1697                  _context5.next = 5;
1698                  return fetch(n.action, {
1699                    method: n.method || "POST",
1700                    body: a,
1701                    credentials: "include"
1702                  });
1703                case 5:
1704                  _context5.next = 10;
1705                  break;
1706                case 7:
1707                  _context5.prev = 7;
1708                  _context5.t0 = _context5["catch"](2);
1709                  X.warn("handlerModalButtons", "Error al enviar el formulario de Google Login", _context5.t0);
1710                case 10:
1711                  _context5.prev = 10;
1712                  _this8.hide(e);
1713                  return _context5.finish(10);
1714                case 13:
1715                case "end":
1716                  return _context5.stop();
1717              }
1718            }, _callee5, null, [[2, 7, 10, 13]]);
1719          }));
1720          return function (_x10) {
1721            return _ref3.apply(this, arguments);
1722          };
1723        }());
1724        var a = e.querySelector(r.CHANGE_SIZE_MODAL_CLASS);
1725        a && a.querySelectorAll(r.CHANGE_TEXT_SIZE_BT).forEach(function (n) {
1726          n.addEventListener("click", function (a) {
1727            var _n$getAttribute4;
1728            a.preventDefault();
1729            var s = (_n$getAttribute4 = n.getAttribute(i.TEXT_SIZE)) !== null && _n$getAttribute4 !== void 0 ? _n$getAttribute4 : "";
1730            t.changeFontSize(s, !0), _this8.hide(e);
1731          });
1732        });
1733        var s = e.querySelector(r.CHANGE_THEME_MODAL_CLASS);
1734        s && s.querySelectorAll(r.CHANGE_THEME).forEach(function (n) {
1735          n.addEventListener("click", function (a) {
1736            var _n$getAttribute5;
1737            a.preventDefault();
1738            var s = (_n$getAttribute5 = n.getAttribute(i.THEME)) !== null && _n$getAttribute5 !== void 0 ? _n$getAttribute5 : "";
1739            t.changeTheme(s, !0), _this8.hide(e);
1740          });
1741        });
1742        var o = e.querySelector(r.SHARE_MODAL),
1743          c = _();
1744        o && o.querySelectorAll(r.CHANGE_SHARE).forEach(function (t) {
1745          t.addEventListener("click", function (n) {
1746            n.preventDefault();
1747            var a = _this8.data.url,
1748              s = _this8.data.text;
1749            if (navigator.share && c) navigator.share({
1750              title: s,
1751              text: s,
1752              url: _this8.buildShareUrl(a, "native_share")
1753            })["catch"](function () {});else {
1754              var _n6;
1755              t.querySelector(r.ICON_TWITTER) ? (_n6 = _this8.buildShareUrl(a, "twitter"), window.open("https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(_n6), "&text=").concat(encodeURIComponent(s), "&via=publico_es"), "_blank")) : t.querySelector(r.ICON_WHATSAPP_DESKTOP) ? (_n6 = _this8.buildShareUrl(a, "whatsapp"), window.open("https://web.whatsapp.com/send?text=".concat(encodeURIComponent(s ? "".concat(s, " ").concat(_n6) : _n6)), "_blank")) : t.querySelector(r.ICON_WHATSAPP_MOBILE) ? (_n6 = _this8.buildShareUrl(a, "whatsapp"), window.open("whatsapp://send?text=".concat(encodeURIComponent(s ? "".concat(s, " ").concat(_n6) : _n6)), "_blank")) : t.querySelector(r.ICON_TELEGRAM) ? (_n6 = _this8.buildShareUrl(a, "telegram"), window.open("https://t.me/share/url?url=".concat(encodeURIComponent(_n6), "&text=").concat(encodeURIComponent(s)), "_blank")) : t.querySelector(r.ICON_FACEBOOK) ? (_n6 = _this8.buildShareUrl(a, "facebook"), window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(_n6), "&quote=").concat(encodeURIComponent(s)), "_blank")) : t.querySelector(r.ICON_BLUESKY) && (_n6 = _this8.buildShareUrl(a, "Bluesky"), window.open("https://bsky.app/intent/compose?text=".concat(encodeURIComponent("".concat(s, " \n").concat(_n6))), "_blank")), _this8.hide(e);
1756            }
1757          });
1758        });
1759      }
1760    }, {
1761      key: "hide",
1762      value: function hide(e) {
1763        var _document$querySelect0;
1764        j(!1);
1765        var n = e || document.getElementById(r.MODAL_CONTAINER_ID);
1766        n && n.classList.add(t.HIDDEN), (_document$querySelect0 = document.querySelector(r.BODY)) !== null && _document$querySelect0 !== void 0 && _document$querySelect0.classList.remove(t.OVERFLOW_HIDDEN), "function" == typeof this.closeCallback && this.closeCallback();
1767      }
1768    }, {
1769      key: "render",
1770      value: function render(e) {
1771        this.updateModalData({
1772          id: e.id || "",
1773          url: e.url || "",
1774          text: e.text || "",
1775          title: e.title || "",
1776          lang: e.lang || "",
1777          userFeatures: e.userFeatures || {}
1778        }), this.show();
1779      }
1780    }, {
1781      key: "updateModalContent",
1782      value: function updateModalContent(e) {
1783        var t = e.querySelector(r.MODAL_TITLE),
1784          n = e.querySelector(r.MODAL_CONTENT);
1785        t && n && (t.innerText = this.data.title, n.innerHTML = this.getModalContent(), this.handlerModalButtons(e), this.addSelectedText(e));
1786      }
1787    }, {
1788      key: "updateModalData",
1789      value: function updateModalData(e) {
1790        this.data = e;
1791      }
1792    }, {
1793      key: "setCloseCallback",
1794      value: function setCloseCallback(e) {
1795        this.closeCallback = e;
1796      }
1797    }, {
1798      key: "buildShareUrl",
1799      value: function buildShareUrl(e, t) {
1800        var n = new URL(e);
1801        return n.searchParams.set("utm_source", t), n.searchParams.set("utm_medium", "social"), n.searchParams.set("utm_campaign", "web"), n.searchParams.set("via", "publico_es"), n.toString();
1802      }
1803    }], [{
1804      key: "getInstance",
1805      value: function getInstance() {
1806        return K.instance || (X.debug("getInstance", "Creando instancia"), K.instance = new K()), K.instance;
1807      }
1808    }]);
1809  }();
1810  var Z = y(),
1811    J = function J(e) {
1812      return e.trim().toLowerCase().replace(/\/+$/, "");
1813    },
1814    Q = "[https://pay.google.com, https://api-eu.piano.io, https://id-eu.piano.io/, https://buy-eu.piano.io, https://www.publico.es, https://admin.publico.es, https://pre.publico.es, https://admin-pre.publico.es, https://pro.publico.es, https://admin-pro.publico.es]".replace(/[[\]]/g, "").split(",").map(J).filter(function (e) {
1815      return e.length > 0;
1816    });
1817  var ee = /*#__PURE__*/function () {
1818    function ee() {
1819      _classCallCheck(this, ee);
1820      this.isListening = !1;
1821    }
1822    return _createClass(ee, [{
1823      key: "initListeners",
1824      value: function initListeners() {
1825        var _this9 = this;
1826        this.isListening || (0 !== Q.length ? (window.addEventListener("message", function (e) {
1827          var _t$params;
1828          if (!e.data) return;
1829          if (!Q.includes(J(e.origin))) return void Z.debug("initListeners", "Mensaje descartado por origen n
1829o autorizado", e.origin);
1830          var t = e.data;
1831          if ("string" == typeof t) {
1832            if ("showLoginCheckout" === t) return void _this9.handleShowLoginCheckout();
1833            try {
1834              t = JSON.parse(t);
1835            } catch (_unused3) {}
1836          }
1837          t && "object" == _typeof(t) && ("showTemplate" === ((_t$params = t.params) === null || _t$params === void 0 ? void 0 : _t$params.eventCategory) && _this9.syncThemeWithIframe(t.params.templateId), "string" == typeof t.type && t.type.startsWith("piano.") && _this9.handlePianoMessage(t.type, t), t.action && _this9.handleCustomAction(t.action, t));
1838        }), this.isListening = !0, Z.debug("initListeners", "Escuchando eventos postMessage")) : Z.error("initListeners", "PIANO_MESSAGE_ORIGIN no está definido: se descartan todos los postMessage entrantes"));
1839      }
1840    }, {
1841      key: "syncThemeWithIframe",
1842      value: function syncThemeWithIframe(e) {
1843        var t = document.querySelector("iframe[src*=\"".concat(e, "\"]")),
1844          n = document.documentElement.getAttribute("data-theme") || "light";
1845        t && t.contentWindow && (Z.debug("syncThemeWithIframe", "Sincronizando tema visual con la plantilla", e), t.contentWindow.postMessage(JSON.stringify({
1846          action: "publicoTheme",
1847          theme: n
1848        }), "*"));
1849      }
1850    }, {
1851      key: "handlePianoMessage",
1852      value: function handlePianoMessage(e, t) {
1853        "piano.action" === e && Z.debug("handlePianoMessage", "Acción específica de Piano detectada", t);
1854      }
1855    }, {
1856      key: "handleShowLoginCheckout",
1857      value: function handleShowLoginCheckout() {
1858        var e = window.tp || [];
1859        e && e.push && (j(!0), e.push(["init", function () {
1860          return e.pianoId.show({
1861            stage: "publicoweb"
1862          });
1863        }]));
1864      }
1865    }, {
1866      key: "handleCustomAction",
1867      value: function handleCustomAction(e, t) {
1868        var n = window.tp || [];
1869        switch (e) {
1870          case "funnel":
1871            {
1872              var _e22 = Number(t.paso);
1873              !Number.isNaN(_e22) && t.etiqueta && U.pushToDataLayer(_e22, t.etiqueta, n);
1874              break;
1875            }
1876          case "showPublicoOfferModal":
1877            U.pushToDataLayer(10, "composer", n), n && n.offer && n.template && (n.template.close(), t.tpcc && this.setCampaignCookie(t.tpcc), j(!0), n.offer.show({
1878              offerId: t.offerId,
1879              templateId: t.templateId,
1880              templateVariantId: t.templateVariantId || "",
1881              showCloseButton: "true" === String(t.closeBtn),
1882              displayMode: "modal"
1883            }));
1884            break;
1885          case "startPublicoCheckout":
1886            n && n.offer && n.template && (n.template.close(), t.tpcc && this.setCampaignCookie(t.tpcc), j(!0), n.offer.startCheckout({
1887              offerId: t.offerId,
1888              termId: t.termId,
1889              templateVariantId: t.templateVariantId || "",
1890              experienceId: t.experienceId || "",
1891              templateId: ""
1892            }));
1893            break;
1894          case "templateCaptacion":
1895            this.handleTemplateCaptacion(t.campaign);
1896            break;
1897          case "composerSubscribeNL":
1898            this.handleNewsletterSubscription(t, n);
1899        }
1900      }
1901    }, {
1902      key: "setCampaignCookie",
1903      value: function setCampaignCookie(e) {
1904        var t = new Date().getTime();
1905        S("tpcc_".concat(e), encodeURIComponent(JSON.stringify({
1906          date: t
1907        })), 90), Z.debug("setCampaignCookie", "Cookie de campaña registrada", e);
1908      }
1909    }, {
1910      key: "handleTemplateCaptacion",
1911      value: function handleTemplateCaptacion(e) {
1912        if (!e) return;
1913        var t = A("pb-campaigns") || "";
1914        "" === t ? t = e : t.includes(e) || (t += ",".concat(e)), S("pb-campaigns", t, 90), Z.debug("handleTemplateCaptacion", "Cookie de recogida de firmas actualizada", t);
1915      }
1916    }, {
1917      key: "handleNewsletterSubscription",
1918      value: function () {
1919        var _handleNewsletterSubscription = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e, t) {
1920          var n, a, s, o, r, c, _e23, _t10;
1921          return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1922            while (1) switch (_context6.prev = _context6.next) {
1923              case 0:
1924                n = e.slug, a = e.op, s = e.templateId, o = document.querySelector(".tp-container-inner iframe[src*=\"".concat(s, "\"]")), r = E.includes(n), c = se.getInstance();
1925                if (!(t.user && t.user.isUserValid())) {
1926                  _context6.next = 24;
1927                  break;
1928                }
1929                if (!(c.getUserType() !== h.SUBSCRIBER && r)) {
1930                  _context6.next = 6;
1931                  break;
1932                }
1933                this.showNewsletterModal(c, i.NEWSLETTER_EXCLUSIVA, o, a, n, "No tienes permisos de suscriptor");
1934                _context6.next = 22;
1935                break;
1936              case 6:
1937                if (!n) {
1938                  _context6.next = 22;
1939                  break;
1940                }
1941                if (!(!(c.getFeatures().newsletters || []).includes(n) && "subscribe" === a)) {
1942                  _context6.next = 22;
1943                  break;
1944                }
1945                _context6.prev = 8;
1946                Z.info("handleNewsletterSubscription", "Suscribiendo a newsletter", n);
1947                _context6.next = 12;
1948                return fetch("/mi-cuenta/async/newsletter/change", {
1949                  method: "POST",
1950                  headers: {
1951                    "Content-Type": "application/json"
1952                  },
1953                  body: JSON.stringify({
1954                    action: a,
1955                    slug: n
1956                  })
1957                });
1958              case 12:
1959                _e23 = _context6.sent;
1960                _context6.next = 15;
1961                return _e23.json();
1962              case 15:
1963                _t10 = _context6.sent;
1964                !_t10.status && o && o.contentWindow && o.contentWindow.postMessage({
1965                  action: "frontendStatus",
1966                  status: !1,
1967                  msg: _t10.msg,
1968                  op: a,
1969                  slug: n
1970                }, "*");
1971                _context6.next = 22;
1972                break;
1973              case 19:
1974                _context6.prev = 19;
1975                _context6.t0 = _context6["catch"](8);
1976                Z.error("handleNewsletterSubscription", "Error al suscribir a la newsletter", _context6.t0);
1977              case 22:
1978                _context6.next = 25;
1979                break;
1980              case 24:
1981                this.showNewsletterModal(c, r ? i.NEWSLETTER_EXCLUSIVA : i.NEWSLETTER, o, a, n, "No hay sesión iniciada");
1982              case 25:
1983              case "end":
1984                return _context6.stop();
1985            }
1986          }, _callee6, this, [[8, 19]]);
1987        }));
1988        function handleNewsletterSubscription(_x11, _x12) {
1989          return _handleNewsletterSubscription.apply(this, arguments);
1990        }
1991        return handleNewsletterSubscription;
1992      }()
1993    }, {
1994      key: "showNewsletterModal",
1995      value: function showNewsletterModal(e, t, n, a, s, i) {
1996        var o = K.getInstance();
1997        o.updateModalData({
1998          id: t,
1999          url: window.location.pathname,
2000          text: "",
2001          title: "",
2002          lang: "",
2003          userFeatures: e.getFeatures()
2004        }), o.show(), n && n.contentWindow && n.contentWindow.postMessage({
2005          action: "frontendStatus",
2006          status: !1,
2007          msg: i,
2008          op: a,
2009          slug: s
2010        }, "*");
2011      }
2012    }], [{
2013      key: "getInstance",
2014      value: function getInstance() {
2015        return ee.instance || (ee.instance = new ee()), ee.instance;
2016      }
2017    }]);
2018  }();
2019  var te = y();
2020  var ne = /*#__PURE__*/function () {
2021    function ne() {
2022      _classCallCheck(this, ne);
2023      this.cookieExpiration = 0, this.initialized = !1, this.pianoScriptLoaded = !1, this.pianoScriptCallbacks = [];
2024    }
2025    return _createClass(ne, [{
2026      key: "init",
2027      value: function init(e) {
2028        this.initialized || (te.info("init", "Arrancando el servicio de Piano y CRM"), I() ? te.debug("init", "Página de administración, se omite la carga del CRM") : (this.cookieExpiration = parseInt("365"), this.initPianoScriptAndConfig(e), this.initialized = !0));
2029      }
2030    }, {
2031      key: "initPianoScriptAndConfig",
2032      value: function initPianoScriptAndConfig(e) {
2033        var _this0 = this;
2034        this.insertPianoIdScript(function () {
2035          te.info("initPianoScriptAndConfig", "Configurando Piano ESP con ID 714022E3-11EB-492D-AE4C-87D3C8DF00B1"), window.PianoESPConfig = {
2036            hashId: "714022E3-11EB-492D-AE4C-87D3C8DF00B1"
2037          }, _this0.tp = window.tp || [], _this0.setConfig();
2038          var t = _this0.tp;
2039          t.push(["init", function () {
2040            t && t.user && te.debug("initPianoScriptAndConfig", "Validez de usuario según Piano", t.user.isUserValid());
2041            var n = "https://id-eu.piano.io";
2042            t.pianoId.init({
2043              iframeUrl: n
2044            }), U.registerHandlers(t, e, function () {
2045              _this0.checkUserData(e, function () {
2046                return location.reload();
2047              });
2048            }), ee.getInstance().initListeners(), _this0.checkUserData(e, function (e) {
2049              te.debug("initPianoScriptAndConfig", "Inicializando la experiencia visual de Piano"), t.experience.init(), e && _this0.handlerPostLoginActions(e);
2050            });
2051          }]), ne.bindPianoAuthButtons(document.body, e, _this0);
2052        });
2053      }
2054    }, {
2055      key: "setConfig",
2056      value: function setConfig() {
2057        var e = this.tp;
2058        e && (e.push(["setAid", "BrpcnPenpe"]), e.push(["setCxenseSiteId", "1137485112206018008,"]), e.push(["setEndpoint", "https://buy-eu.piano.io/api/v3"]), e.push(["setUseTinypassAccounts", !1]), e.push(["setUsePianoIdUserProvider", !0]), e.push(["setPianoIdUrl", "https://id-eu.piano.io"]), e.push(["setEspEndpoint", "https://api-esp-eu.piano.io"]));
2059      }
2060    }, {
2061      key: "checkUserData",
2062      value: function checkUserData(e, t) {
2063        var _this1 = this;
2064        var a = this.tp;
2065        if (a.user && a.user.isUserValid()) {
2066          var _s5 = a.pianoId.getUser();
2067          te.debug("checkUserData", "Datos de usuario recibidos de Piano", _s5), a.pianoId && _s5 ? a.pianoId.loadExtendedUser({
2068            extendedUserLoaded: function extendedUserLoaded(a) {
2069              if (a) {
2070                S(n.USER_ID, a.uid, _this1.cookieExpiration);
2071                var _s6 = {};
2072                a.custom_field_values && a.custom_field_values.forEach(function (e) {
2073                  if (e.field_name) {
2074                    var _t11 = e.value;
2075                    _t11 && "true" === _t11.toLowerCase() ? _s6[e.field_name] = !0 : _t11 && "false" === _t11.toLowerCase() ? _s6[e.field_name] = !1 : isNaN(_t11) || "" === _t11 ? _s6[e.field_name] = _t11 : _s6[e.field_name] = parseInt(_t11);
2076                  }
2077                }), e.determineUserTypeAndFeatures(_s6), t(e);
2078              } else te.warn("checkUserData", "Sesión válida sin perfil extendido, se resuelve como anónimo"), _this1.resolveAsAnonymous(e), t(null);
2079            },
2080            formName: "customFieldsCustomForm"
2081          }) : (this.resolveAsAnonymous(e), t(null));
2082        } else this.resolveAsAnonymous(e), t(null);
2083      }
2084    }, {
2085      key: "resolveAsAnonymous",
2086      value: function resolveAsAnonymous(e) {
2087        e.determineUserTypeAndFeatures(null), this.cleanCookies();
2088      }
2089    }, {
2090      key: "handlerPostLoginActions",
2091      value: function handlerPostLoginActions(e) {
2092        var t = e.getUserType();
2093        if (N.updateHtmlClasses(t, e.canShowAds()), t !== h.ANONYMOUS && (N.changeLoginToMyAccount(), this.bindLogoutButton()), t === h.SUBSCRIBER) {
2094          var _e24 = R.getInstance();
2095          _e24.handleSuscriber(), _e24.setDoNotRedirectWhenDecline();
2096        }
2097      }
2098    }, {
2099      key: "bindLogoutButton",
2100      value: function bindLogoutButton() {
2101        var _this10 = this;
2102        var e = document.getElementById(r.HEADER_NAV);
2103        e && e.querySelectorAll(r.LOGOUT).forEach(function (e) {
2104          e.addEventListener("click", function (e) {
2105            e.preventDefault(), _this10.cleanCookies(), _this10.tp && _this10.tp.pianoId ? _this10.tp.pianoId.logout() : location.reload();
2106          });
2107        });
2108      }
2109    }, {
2110      key: "cleanCookies",
2111      value: function cleanCookies() {
2112        T(n.USER_ID), T(n.USER_TYPE);
2113      }
2114    }, {
2115      key: "insertPianoIdScript",
2116      value: function insertPianoIdScript(e) {
2117        var _A,
2118          _this11 = this;
2119        var t = window.location.pathname,
2120          a = (_A = A(n.LOGIN)) !== null && _A !== void 0 ? _A : null;
2121        ne.PAGES_WITH_PIANO_NO_CONSENT.includes(t) || a ? (te.debug("insertPianoIdScript", "Ruta sin aviso de cookies, se inserta Piano directamente: ".concat(t)), this.realInsertPianoIdScript(e)) : R.getInstance().onConsentResolved(function () {
2122          return _this11.realInsertPianoIdScript(e);
2123        });
2124      }
2125    }, {
2126      key: "realInsertPianoIdScript",
2127      value: function realInsertPianoIdScript(e) {
2128        var _this12 = this;
2129        var t = "//cdn.tinypass.com/api/tinypass.min.js";
2130        if (document.querySelector("script[src=\"".concat(t, "\"]"))) this.pianoScriptLoaded ? e() : this.pianoScriptCallbacks.push(e);else {
2131          var _n7 = document.createElement("script");
2132          _n7.src = t, _n7.async = !0, this.pianoScriptCallbacks.push(e), _n7.onload = function () {
2133            _this12.pianoScriptLoaded = !0, _this12.pianoScriptCallbacks.forEach(function (e) {
2134              return e();
2135            }), _this12.pianoScriptCallbacks = [];
2136          }, document.body.appendChild(_n7);
2137        }
2138        this.insertPianoAdblockScript();
2139      }
2140    }, {
2141      key: "insertPianoAdblockScript",
2142      value: function insertPianoAdblockScript() {
2143        var e = "//www.npttech.com/advertising.js";
2144        T(n.ADBLOCKER);
2145        var t = document.createElement("script");
2146        t.src = e, t.async = !0, t.onload = function () {
2147          te.debug("insertPianoAdblockScript", "Detector de adblockers cargado correctamente");
2148        }, t.onerror = function () {
2149          te.info("insertPianoAdblockScript", "Un adblocker ha bloqueado el script de detección");
2150          var e = new Date();
2151          e.setTime(e.getTime() + 3e5), S(n.ADBLOCKER, "true", e.toUTCString());
2152        }, document.body.appendChild(t);
2153      }
2154    }], [{
2155      key: "getInstance",
2156      value: function getInstance() {
2157        return ne.instance || (te.debug("getInstance", "Creando instancia"), ne.instance = new ne()), ne.instance;
2158      }
2159    }, {
2160      key: "bindPianoAuthButtons",
2161      value: function bindPianoAuthButtons(e, n, a) {
2162        te.debug("bindPianoAuthButtons", "Configurando botones de autenticación en la interfaz");
2163        var s = window.tp || [];
2164        if (!s || !s.pianoId) return;
2165        var i = function i(_i5, o) {
2166          e.querySelectorAll(_i5).forEach(function (e) {
2167            var i = e.classList.contains(t.REFRESH_AFTER_LOGIN);
2168            e.addEventListener("click", function (e) {
2169              e.preventDefault(), j(!0), s.pianoId.show({
2170                disableSignUp: !1,
2171                displayMode: "modal",
2172                screen: o,
2173                loggedIn: function loggedIn(e) {
2174                  te.info("bindPianoAuthButtons", ("login" === o ? "Login" : "Registro") + " completado con éxito", e), a && n && !i ? a.checkUserData(n, function () {
2175                    return location.reload();
2176                  }) : i && location.reload();
2177                },
2178                loggedOut: function loggedOut() {
2179                  return te.info("bindPianoAuthButtons", "Cierre de sesión detectado desde el widget");
2180                },
2181                loginFailed: function loginFailed(e) {
2182                  return te.warn("bindPianoAuthButtons", "Fallo durante el " + ("login" === o ? "login" : "registro"), e);
2183                }
2184              });
2185            });
2186          });
2187        };
2188        i(r.LOGIN, "login"), i(r.REGISTER, "register");
2189      }
2190    }]);
2191  }();
2192  ne.PAGES_WITH_PIANO_NO_CONSENT = [].concat(f, ["/landing/suscripciones"]);
2193  var ae = y();
2194  var se = /*#__PURE__*/function () {
2195    function se() {
2196      _classCallCheck(this, se);
2197      this.isLoggedIn = !1, this.userType = h.ANONYMOUS, this.data = {
2198        username: "",
2199        features: {
2200          ads: !0,
2201          listenArticle: !1,
2202          readLater: !1,
2203          readLaterData: [],
2204          readComments: !1,
2205          writeComments: !1,
2206          newsletters: []
2207        }
2208      }, this.userResolvedListeners = [];
2209    }
2210    return _createClass(se, [{
2211      key: "getCurrentTheme",
2212      value: function getCurrentTheme() {
2213        return A(n.THEME) || l.LIGHT;
2214      }
2215    }, {
2216      key: "getCurrentFontSize",
2217      value: function getCurrentFontSize() {
2218        return A(n.TEXT_SIZE) || s.DEFAULT;
2219      }
2220    }, {
2221      key: "getUserType",
2222      value: function getUserType() {
2223        return this.userType;
2224      }
2225    }, {
2226      key: "getFeaturesFromCRM",
2227      value: function getFeaturesFromCRM() {
2228        ne.getInstance().init(this);
2229      }
2230    }, {
2231      key: "isLoggedInUser",
2232      value: function isLoggedInUser() {
2233        return this.isLoggedIn;
2234      }
2235    }, {
2236      key: "canShowAds",
2237      value: function canShowAds() {
2238        return this.data.features.ads;
2239      }
2240    }, {
2241      key: "canListenArticle",
2242      value: function canListenArticle() {
2243        return this.data.features.listenArticle;
2244      }
2245    }, {
2246      key: "canReadLater",
2247      value: function canReadLater() {
2248        return this.isLoggedIn;
2249      }
2250    }, {
2251      key: "canReadComments",
2252      value: function canReadComments() {
2253        return this.data.features.readComments;
2254      }
2255    }, {
2256      key: "canWriteComments",
2257      value: function canWriteComments() {
2258        return this.data.features.writeComments;
2259      }
2260    }, {
2261      key: "getNewsletters",
2262      value: function getNewsletters() {
2263        return this.data.features.newsletters;
2264      }
2265    }, {
2266      key: "getReadLater",
2267      value: function getReadLater() {
2268        return this.data.features.readLaterData;
2269      }
2270    }, {
2271      key: "getFeatures",
2272      value: function getFeatures() {
2273        return this.data.features;
2274      }
2275    }, {
2276      key: "setAfterUserLoginCallback",
2277      value: function setAfterUserLoginCallback(e) {
2278        this.userResolvedListeners.push(e);
2279      }
2280    }, {
2281      key: "emitUserResolved",
2282      value: function emitUserResolved() {
2283        if (0 === this.userResolvedListeners.length) return void ae.debug("emitUserResolved", "Sesión ya resuelta anteriormente, no se vuelve a notificar");
2284        var e = this.userResolvedListeners;
2285        this.userResolvedListeners = [], e.forEach(function (e) {
2286          return e();
2287        });
2288      }
2289    }, {
2290      key: "addNewsletter",
2291      value: function addNewsletter(e) {
2292        this.data.features.newsletters.includes(e) || (this.data.features.newsletters.push(e), ae.debug("addNewsletter", "Newsletter añadida", e));
2293      }
2294    }, {
2295      key: "removeNewsletter",
2296      value: function removeNewsletter(e) {
2297        this.data.features.newsletters = this.data.features.newsletters.filter(function (t) {
2298          return t !== e;
2299        }), ae.debug("removeNewsletter", "Newsletter eliminada", e);
2300      }
2301    }, {
2302      key: "determineUserTypeAndFeatures",
2303      value: function determineUserTypeAndFeatures(e) {
2304        if (!e) return this.setUserType(h.ANONYMOUS), void this.emitUserResolved();
2305        if ("userCanHideAds" in e && (this.data.features.ads = !e.userCanHideAds), "userCanReadComments" in e && (this.data.features.readComments = e.userCanReadComments), "userCanWriteComments" in e && (this.data.features.writeComments = e.userCanWriteComments), "userCanReadLater" in e && (this.data.features.readLater = e.userCanReadLater), "readLaterData" in e && (this.data.features.readLaterData = e.readLaterData), "editorialMLCustomField" in e) {
2306          var _t12 = e.editorialMLCustomField.toString();
2307          _t12.startsWith("%") ? this.data.features.newsletters = [] : this.data.features.newsletters = _t12.split(",").map(function (e) {
2308            return e.trim();
2309          });
2310        }
2311        !1 === this.data.features.ads ? this.setUserType(h.SUBSCRIBER) : !0 === this.data.features.readComments ? this.setUserType(h.REGISTERED) : this.setUserType(h.ANONYMOUS), this.emitUserResolved();
2312      }
2313    }, {
2314      key: "setUserType",
2315      value: function setUserType(e) {
2316        this.userType = e, this.isLoggedIn = e === h.REGISTERED || e === h.SUBSCRIBER;
2317        var t = parseInt("365");
2318        S(n.USER_TYPE, this.userType, t), ae.debug("setUserType", "Tipo de usuario actualizado", this.userType);
2319      }
2320    }, {
2321      key: "logUserSummary",
2322      value: function logUserSummary() {
2323        ae.info("logUserSummary", "Perfil de usuario", {
2324          type: this.userType,
2325          theme: this.getCurrentTheme(),
2326          fontSize: this.getCurrentFontSize(),
2327          features: {
2328            canShowAds: this.canShowAds(),
2329            canReadLater: this.canReadLater(),
2330            canReadComments: this.canReadComments(),
2331            canWriteComments: this.canWriteComments(),
2332            canListenArticle: this.canListenArticle(),
2333            newsletters: this.getNewsletters(),
2334            readLaterData: this.getReadLater()
2335          }
2336        });
2337      }
2338    }], [{
2339      key: "getInstance",
2340      value: function getInstance() {
2341        return se.instance || (ae.debug("getInstance", "Creando instancia"), se.instance = new se()), se.instance;
2342      }
2343    }]);
2344  }();
2345  var ie = y();
2346  function oe(e) {
2347    var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2348    return new Promise(function (n, a) {
2349      var _t$async;
2350      ie.debug("loadScript", "Inyectando script: ".concat(e));
2351      var s = document.createElement("script");
2352      s.src = e, t.defer ? s.defer = !0 : s.async = (_t$async = t.async) !== null && _t$async !== void 0 ? _t$async : !0, t.attributes && Object.entries(t.attributes).forEach(function (_ref4) {
2353        var _ref5 = _slicedToArray(_ref4, 2),
2354          e = _ref5[0],
2355          t = _ref5[1];
2356        s.setAttribute(e, t);
2357      }), s.onload = function () {
2358        ie.debug("loadScript", "Script cargado: ".concat(e)), n();
2359      }, s.onerror = function (t) {
2360        ie.error("loadScript", "Error al cargar el script: ".concat(e), t), a(t);
2361      }, document.head.appendChild(s);
2362    });
2363  }
2364  var re = /*#__PURE__*/function () {
2365    function re() {
2366      _classCallCheck(this, re);
2367      this.name = "smartclip", this.scripts = ["https://www.googletagservices.com/tag/js/gpt.js", "https://s3.eu-central-1.amazonaws.com/sc-devel/sc-tagmanager/publico.js", "https://s3.eu-central-1.amazonaws.com/sc-devel/Skins/SMCService.js", "https://cdn.smartclip-services.com/v1/Storage-a482323/smartclip-services/HeaderBidding/js/SmartclipConfig.js"];
2368    }
2369    return _createClass(re, [{
2370      key: "init",
2371      value: function init() {
2372        if (this.scripts.forEach(function (e) {
2373          return oe(e);
2374        }), document.body.classList.contains(r.ARTICLE)) {
2375          var _window$top;
2376          var _e25 = location.pathname;
2377          oe("https://des.smartclip.net/ads?type=dyn&sz=400x320&plc=112306&sc_sitName=publico&sc_cc=es&elementId=smartIntxt&cat=".concat(_e25.startsWith("/culturas") ? "cultura" : _e25.startsWith("/economia") ? "ec" : "", "&ref=").concat(encodeURIComponent(((_window$top = window.top) === null || _window$top === void 0 ? void 0 : _window$top.document.URL) || ""), "&rnd=").concat(Math.round(1e8 * Math.random())));
2378        }
2379      }
2380    }]);
2381  }();
2382  var ce = /*#__PURE__*/function () {
2383    function ce() {
2384      _classCallCheck(this, ce);
2385      this.name = "outbrain", this.scriptUrl = "https://widgets.outbrain.com/outbrain.js";
2386    }
2387    return _createClass(ce, [{
2388      key: "init",
2389      value: function init() {
2390        oe(this.scriptUrl);
2391      }
2392    }]);
2393  }();
2394  var de = /*#__PURE__*/function () {
2395    function de() {
2396      _classCallCheck(this, de);
2397      this.name = "adkaora", this.scriptUrl = "https://cdn.adkaora.space/publicoes/generic/prod/adk-init.js";
2398    }
2399    return _createClass(de, [{
2400      key: "init",
2401      value: function init() {
2402        oe(this.scriptUrl, {
2403          defer: !0,
2404          attributes: {
2405            "data-version": "3"
2406          }
2407        });
2408      }
2409    }]);
2410  }();
2411  var le = y();
2412  var ue = /*#__PURE__*/function () {
2413    function ue() {
2414      _classCallCheck(this, ue);
2415      this.providers = new Map(), this.registerProvider(new re()), this.registerProvider(new ce()), this.registerProvider(new de());
2416    }
2417    return _createClass(ue, [{
2418      key: "registerProvider",
2419      value: function registerProvider(e) {
2420        le.debug("registerProvider", "Proveedor registrado", e.name), this.providers.set(e.name, e);
2421      }
2422    }, {
2423      key: "loadPageScripts",
2424      value: function loadPageScripts(e) {
2425        var t = Array.isArray(e) && e.length > 0;
2426        this.providers.forEach(function (n, a) {
2427          !t || e.includes(a) ? (le.info("loadPageScripts", "Cargando proveedor de publicidad", a), n.init()) : le.debug("loadPageScripts", "Proveedor omitido por configuración de filtros", a);
2428        });
2429      }
2430    }], [{
2431      key: "getInstance",
2432      value: function getInstance() {
2433        return ue.instance || (le.debug("getInstance", "Creando instancia"), ue.instance = new ue()), ue.instance;
2434      }
2435    }]);
2436  }();
2437  var pe = y();
2438  var me = /*#__PURE__*/function () {
2439    function me() {
2440      _classCallCheck(this, me);
2441      this.initialized = !1, this.isVisible = !1;
2442    }
2443    return _createClass(me, [{
2444      key: "init",
2445      value: function init(e) {
2446        var _this13 = this;
2447        pe.info("init", "Inicializando publicidad", {
2448          allowedProviders: e !== null && e !== void 0 ? e : "todos"
2449        }), this.initialized ? pe.debug("init", "La publicidad ya estaba inicializada, se omite") : (this.initialized = !0, this.changeDynamicIds(), this.changeDynamicPositions(), R.getInstance().onConsentResolved(function () {
2450          return _this13.executeProviders(e);
2451        }, {
2452          fallbackIfNoTcfApi: !0
2453        }));
2454      }
2455    }, {
2456      key: "executeProviders",
2457      value: function executeProviders(e) {
2458        ue.getInstance().loadPageScripts(e), this.show();
2459      }
2460    }, {
2461      key: "changeDynamicIds",
2462      value: function changeDynamicIds() {
2463        var e = document.body.classList;
2464        if ([r.HOME, r.SECTION, r.AUTHOR, r.TAG, r.ARTICLE].some(function (t) {
2465          return e.contains(t);
2466        })) {
2467          pe.debug("changeDynamicIds", "Reasignando IDs de bloques publicitarios dinámicos");
2468          var _e26 = _(),
2469            _t13 = _e26 ? r.ADS_DYNAMIC_ROBAPAGINAS_MOBILE : r.ADS_DYNAMIC_ROBAPAGINAS;
2470          document.querySelectorAll(_t13).forEach(function (e, t) {
2471            var n = e.querySelector(r.ADS_DYNAMIC_COUNT);
2472            n && (n.id = "sc-mpu".concat(t + 1));
2473          });
2474          var _n8 = _e26 ? r.ADS_DYNAMIC_OUTBRAIN_MOBILE : r.ADS_DYNAMIC_OUTBRAIN;
2475          document.querySelectorAll(_n8).forEach(function (e, t) {
2476            var n = e.querySelector(r.ADS_DYNAMIC_COUNT);
2477            n && n.setAttribute("data-widget-id", "SF_".concat(t + 1));
2478          });
2479          var _a7 = _e26 ? r.ADS_DYNAMIC_MEGABANNER_MOBILE : r.ADS_DYNAMIC_MEGABANNER;
2480          document.querySelectorAll(_a7).forEach(function (e, t) {
2481            var n = e.querySelector(r.ADS_DYNAMIC_COUNT);
2482            n && (n.id = "sc-superbanner-btf".concat(t + 1));
2483          });
2484        }
2485      }
2486    }, {
2487      key: "changeDynamicPositions",
2488      value: function changeDynamicPositions() {
2489        var e = document.body.classList.contains(r.ARTICLE),
2490          t = _();
2491        if (e && t) {
2492          pe.debug("changeDynamicPositions", "Reubicando contenedores publicitarios para artículo móvil");
2493          var _e27 = document.querySelector(r.EXCO_FOOTER),
2494            _t14 = document.querySelector(r.EXCO_INTEXT);
2495          _e27 && _t14 && _t14.appendChild(_e27);
2496        }
2497      }
2498    }, {
2499      key: "isInitialized",
2500      value: function isInitialized() {
2501        return this.initialized;
2502      }
2503    }, {
2504      key: "show",
2505      value: function show() {
2506        pe.debug("show", "Mostrando espacios publicitarios"), this.isVisible = !0, document.body.classList.remove(t.NO_ADS), document.body.classList.add(t.INITIALIZED_ADS), document.querySelectorAll(r.ADS_DYNAMIC_COUNT).forEach(function (e) {
2507          e.style.display = "";
2508        });
2509      }
2510    }, {
2511      key: "hide",
2512      value: function hide() {
2513        pe.debug("hide", "Ocultando espacios publicitarios"), this.isVisible = !1, document.body.classList.add(t.NO_ADS), document.body.classList.remove(t.INITIALIZED_ADS), document.querySelectorAll(r.ADS_DYNAMIC_COUNT).forEach(function (e) {
2514          e.style.display = "none";
2515        });
2516      }
2517    }, {
2518      key: "getIsVisible",
2519      value: function getIsVisible() {
2520        return this.isVisible;
2521      }
2522    }], [{
2523      key: "getInstance",
2524      value: function getInstance() {
2525        return me.instance || (pe.debug("getInstance", "Creando instancia"), me.
2525instance = new me()), me.instance;
2526      }
2527    }]);
2528  }();
2529  var he = y();
2530  var ge = /*#__PURE__*/function () {
2531    function ge() {
2532      _classCallCheck(this, ge);
2533    }
2534    return _createClass(ge, null, [{
2535      key: "run",
2536      value: function run(e) {
2537        var _this14 = this;
2538        var t = e.pageType,
2539          n = e.onInit,
2540          a = e.onReady,
2541          s = e.requiresCRM,
2542          i = e.requiresAds,
2543          o = e.allowedAdsProviders;
2544        if (he.info("run", "Arrancando aplicación", {
2545          pageType: t,
2546          requiresCRM: !1 !== s,
2547          requiresAds: !1 !== i
2548        }), I()) return void he.info("run", "Entorno de administración detectado, no se ejecuta la lógica de la página");
2549        n && n();
2550        var r = se.getInstance(),
2551          c = Y.getInstance();
2552        !1 !== s ? (he.debug("run", "Validando usuario contra el CRM"), r.setAfterUserLoginCallback(function () {
2553          he.info("afterUserLoginCallback", "Usuario validado en el CRM"), r.logUserSummary(), !1 !== i && (r.canShowAds() ? (he.debug("afterUserLoginCallback", "Cargando publicidad"), _this14.initAds(o)) : he.debug("afterUserLoginCallback", "Publicidad omitida (suscriptor o usuario sin anuncios)")), a && a({
2554            user: r,
2555            page: c
2556          });
2557        }), r.getFeaturesFromCRM()) : (he.debug("run", "CRM desactivado para esta página"), R.getInstance().setDoNotRedirectWhenDecline(), !1 !== i && this.initAds(o), a && a({
2558          page: c
2559        }));
2560      }
2561    }, {
2562      key: "initAds",
2563      value: function initAds(e) {
2564        he.debug("initAds", "Inicializando gestor de anuncios");
2565        me.getInstance().init(e);
2566      }
2567    }]);
2568  }();
2569  var be = y();
2570  var Ee = y();
2571  var fe = y();
2572  var Ae = /*#__PURE__*/function () {
2573    function Ae() {
2574      _classCallCheck(this, Ae);
2575    }
2576    return _createClass(Ae, null, [{
2577      key: "route",
2578      value: function route(e, t) {
2579        var _this15 = this;
2580        var n = document.body,
2581          a = n.getAttribute("pb-next"),
2582          s = window.tp || [];
2583        s.push(["init", function () {
2584          switch (e) {
2585            case "login":
2586            case "register":
2587              _this15.handleLoginRegister(s, e, a);
2588              break;
2589            case "password":
2590              _this15.handlePassword(s, a, n.getAttribute("pb-next-logged"));
2591              break;
2592            case "logout":
2593              _this15.handleLogout(s, a);
2594              break;
2595            case "feedback":
2596            case "mis-intereses":
2597              _this15.handleForms(s, e, a);
2598              break;
2599            case "mis-datos":
2600              _this15.handleMyData(s);
2601              break;
2602            case "activa-tu-regalo":
2603              _this15.handleRedeemVoucher(s);
2604              break;
2605            case "oferta":
2606              _this15.handleOffer(s);
2607              break;
2608            case "leer-mas-tarde":
2609            case "sumate":
2610              _this15.handleExperience(s);
2611              break;
2612            case "join-us":
2613              _this15.handleJoinUs(s);
2614              break;
2615            case "encuesta":
2616            case "completar-datos":
2617              fe.debug("route", "Ruta inicializada en modo pasivo", e);
2618              break;
2619            default:
2620              fe.warn("route", "Ruta no reconocida o pendiente de implementar", e);
2621          }
2622        }]);
2623      }
2624    }, {
2625      key: "handleLoginRegister",
2626      value: function handleLoginRegister(e, t, n) {
2627        var a = location.hash;
2628        j(!0), e.pianoId.show({
2629          stage: "publicoweb",
2630          screen: t,
2631          displayMode: "inline",
2632          containerSelector: "#pb-iframe-login",
2633          loggedIn: function loggedIn() {
2634            var e = document.getElementById("pb-iframe-login");
2635            e && (e.innerHTML = '<p class="block text-center text-lg">Cargando los datos de tu cuenta...</p>', n && "" !== n && (location.href = "#comments" === a ? n + a : n));
2636          }
2637        });
2638      }
2639    }, {
2640      key: "handlePassword",
2641      value: function handlePassword(e, t, n) {
2642        if (e.user && e.user.isUserValid()) n && "" !== n && (location.href = n);else {
2643          var _n9 = location.search.match(/reset_token=([A-Za-z0-9]+)/);
2644          j(!0), _n9 ? e.pianoId.show({
2645            resetPasswordToken: _n9[1],
2646            loggedIn: function loggedIn() {
2647              t && "" !== t && (location.href = t);
2648            }
2649          }) : e.pianoId.show({
2650            stage: "publicoweb",
2651            screen: "restore"
2652          });
2653        }
2654      }
2655    }, {
2656      key: "handleLogout",
2657      value: function handleLogout(e, t) {
2658        e.push(["addHandler", "logout", function () {
2659          fe.debug("handleLogout", "Callback de logout de Piano recibido"), t ? location.href = t : location.reload();
2660        }]), e.pianoId.logout();
2661      }
2662    }, {
2663      key: "handleForms",
2664      value: function handleForms(e, t, n) {
2665        var a = "feedback" === t ? "feedbackV2Form" : "preferenciasCustomForm";
2666        j(!0), e.user && e.user.isUserValid() ? e.pianoId.showForm({
2667          formName: a,
2668          displayMode: "inline",
2669          containerSelector: "#pb-loading",
2670          profileUpdate: function profileUpdate() {
2671            location.href = n || "/";
2672          }
2673        }) : e.pianoId.show({
2674          stage: "publicoweb",
2675          screen: "login",
2676          loggedIn: function loggedIn() {
2677            location.reload();
2678          }
2679        });
2680      }
2681    }, {
2682      key: "handleMyData",
2683      value: function handleMyData(e) {
2684        e.myaccount.show({
2685          displayMode: "inline",
2686          containerSelector: "#pb-iframe-my-account"
2687        });
2688      }
2689    }, {
2690      key: "handleRedeemVoucher",
2691      value: function handleRedeemVoucher(e) {
2692        j(!0), e.offer.startRedeemVoucher(), e.push(["addHandler", "checkoutClose", function (e) {
2693          "checkoutCompleted" === (e === null || e === void 0 ? void 0 : e.state) ? location.href = "/mi-cuenta" : location.reload();
2694        }]);
2695      }
2696    }, {
2697      key: "handleOffer",
2698      value: function handleOffer(e) {
2699        var _document$body;
2700        (_document$body = document.body) !== null && _document$body !== void 0 && _document$body.classList.add(t.NO_ADS), fe.info("handleOffer", "Inicializando experiencia de oferta"), e.experience.init(), e.push(["addHandler", "checkoutClose", function (e) {
2701          "checkoutCompleted" === (e === null || e === void 0 ? void 0 : e.state) && (location.href = "/mi-cuenta");
2702        }]);
2703      }
2704    }, {
2705      key: "handleExperience",
2706      value: function handleExperience(e) {
2707        fe.debug("handleExperience", "Inicializando experiencia de lectura/sumate"), e.experience.init();
2708      }
2709    }, {
2710      key: "handleJoinUs",
2711      value: function handleJoinUs(e) {
2712        fe.info("handleJoinUs", "Inicializando experiencia de captación"), e.experience.init(), function () {
2713          try {
2714            [{
2715              id: "OTSU18199M1S",
2716              container: p.VENTAJAS
2717            }, {
2718              id: "OT51UKKWVWB1",
2719              container: p.PREGUNTAS
2720            }, {
2721              id: "OT4BNQGEA6E9",
2722              container: p.DUDAS
2723            }].forEach(function (e) {
2724              var _window$tp;
2725              e.id && e.container && ((_window$tp = window.tp) === null || _window$tp === void 0 ? void 0 : _window$tp.template) && window.tp.template.show({
2726                templateId: e.id,
2727                displayMode: "inline",
2728                containerSelector: e.container
2729              });
2730            });
2731          } catch (e) {
2732            Ee.warn("injectPianoCaptationTemplates", "Error al inyectar las plantillas de Piano", e);
2733          }
2734        }();
2735        !function (e) {
2736          var t = new URLSearchParams(location.search),
2737            n = t.get("checkoutStart");
2738          var a;
2739          e.forEach(function (e) {
2740            var s = e.getAttribute("data-slug"),
2741              i = e.getAttribute("data-term"),
2742              o = e.getAttribute("data-offer"),
2743              r = e.getAttribute("data-funnel-paso"),
2744              c = e.getAttribute("data-funnel-etiqueta");
2745            n && n === s && (a = e), e.addEventListener("click", function (e) {
2746              if (e.preventDefault(), i) {
2747                var _e28 = {
2748                  offerId: o,
2749                  termId: i,
2750                  templateId: ""
2751                };
2752                t.get("templateId") && (_e28.templateId = t.get("templateId")), window.tp.template.close(), j(!0), window.tp.offer.startCheckout(_e28), window.postMessage({
2753                  paso: r,
2754                  etiqueta: c,
2755                  action: "funnel"
2756                }, "*");
2757              }
2758            });
2759          }), a && (Ee.info("bindPianoCheckoutButtons", "Auto-checkout lanzado por parámetro de URL"), a.click());
2760        }(document.querySelectorAll("a[data-term], li[data-term]")), e.push(["addHandler", "checkoutClose", function (e) {
2761          "checkoutCompleted" === (e === null || e === void 0 ? void 0 : e.state) && (location.href = "/mi-cuenta");
2762        }]), e.push(["addHandler", "checkoutSelectTerm", function (e) {
2763          fe.debug("handleJoinUs", "Término de suscripción seleccionado en el checkout", e);
2764        }]);
2765      }
2766    }]);
2767  }();
2768  var Se = y();
2769  var Te = /*#__PURE__*/function () {
2770    function Te() {
2771      _classCallCheck(this, Te);
2772    }
2773    return _createClass(Te, null, [{
2774      key: "init",
2775      value: function init(e) {
2776        var _document$body$getAtt2;
2777        Se.info("init", "Iniciando flujos de Mi Cuenta"), ee.getInstance().initListeners();
2778        var t = (_document$body$getAtt2 = document.body.getAttribute("pb-my-account")) !== null && _document$body$getAtt2 !== void 0 ? _document$body$getAtt2 : "";
2779        t ? Ae.route(t, e) : Se.error("init", "Falta el atributo pb-my-account en el body, no se puede enrutar la página");
2780      }
2781    }]);
2782  }();
2783  var Ie, _e, Ce;
2784  (Ie = "my-account", _e = "my-account.entry.ts", Ce = function Ce(_ref6) {
2785    var e = _ref6.user,
2786      t = _ref6.page;
2787    t !== null && t !== void 0 && t.init(), e && Te.init(e);
2788  }, function () {
2789    var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2790    var _e$requiresCRM = e.requiresCRM,
2791      t = _e$requiresCRM === void 0 ? !0 : _e$requiresCRM,
2792      _e$requiresAds = e.requiresAds,
2793      n = _e$requiresAds === void 0 ? !0 : _e$requiresAds,
2794      a = e.allowedAdsProviders,
2795      _e$entryName = e.entryName,
2796      s = _e$entryName === void 0 ? _e : _e$entryName,
2797      i = e.onInit;
2798    ge.run(_objectSpread(_objectSpread({
2799      pageType: Ie,
2800      requiresCRM: t,
2801      requiresAds: n
2802    }, a && {
2803      allowedAdsProviders: a
2804    }), {}, {
2805      onReady: function onReady(_ref7) {
2806        var e = _ref7.user,
2807          t = _ref7.page;
2808        if (i) return be.info("run", "onInit personalizado ejecutado (".concat(s, ")")), void i({
2809          page: t
2810        });
2811        Ce({
2812          user: e,
2813          page: t,
2814          entryName: s
2815        });
2816      }
2817    }));
2818  })({
2819    requiresAds: !1,
2820    entryName: "my-account.entry.ts"
2821  });
2822})();
2823
2824/***/ }),
2825
2826/***/ 757:
2827/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2828
2829module.exports = function () {
2830  __webpack_require__(434);
2831}();
2832
2833/***/ })
2834
2835/******/ 	});
2836/************************************************************************/
2837/******/ 	// The module cache
2838/******/ 	var __webpack_module_cache__ = {};
2839/******/ 	
2840/******/ 	// The require function
2841/******/ 	function __webpack_require__(moduleId) {
2842/******/ 		// Check if module is in cache
2843/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
2844/******/ 		if (cachedModule !== undefined) {
2845/******/ 			return cachedModule.exports;
2846/******/ 		}
2847/******/ 		// Create a new module (and put it into the cache)
2848/******/ 		var module = __webpack_module_cache__[moduleId] = {
2849/******/ 			// no module.id needed
2850/******/ 			// no module.loaded needed
2851/******/ 			exports: {}
2852/******/ 		};
2853/******/ 	
2854/******/ 		// Execute the module function
2855/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2856/******/ 	
2857/******/ 		// Return the exports of the module
2858/******/ 		return module.exports;
2859/******/ 	}
2860/******/ 	
2861/************************************************************************/
2862/******/ 	
2863/******/ 	// startup
2864/******/ 	// Load entry module and return exports
2865/******/ 	// This entry module is referenced by other modules so it can't be inlined
2866/******/ 	var __webpack_exports__ = __webpack_require__(757);
2867/******/ 	
2868/******/ })()
2869;

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.