!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,o=i(e);o;)o=i(e=o.ownerDocument);return e}(),e=[],o=null,n=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return o||(o=function(t,o){n=t&&o?l(t,o):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),o},s._resetCrossOriginUpdater=function(){o=null,n=null},s.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,o){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==o[e-1]}))},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var o=e.defaultView;if(o&&-1==this._monitoringDocuments.indexOf(e)){var n=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=o.setInterval(n,this.POLL_INTERVAL):(h(o,"resize",n,!0),h(e,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in o&&(s=new o.MutationObserver(n)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),c(t,"resize",n,!0)),c(e,"scroll",n,!0),s&&s.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=u){var a=i(e);a&&this._monitorIntersections(a.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var o=this._monitoringDocuments.indexOf(e);if(-1!=o){var n=this.root&&(this.root.ownerDocument||this.root)||t,r=this._observationTargets.some((function(t){var o=t.element.ownerDocument;if(o==e)return!0;for(;o&&o!=n;){var r=i(o);if((o=r&&r.ownerDocument)==e)return!0}return!1}));if(!r){var s=this._monitoringUnsubscribes[o];if(this._monitoringDocuments.splice(o,1),this._monitoringUnsubscribes.splice(o,1),s(),e!=n){var h=i(e);h&&this._unmonitorIntersections(h.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&m>=0&&{top:c,bottom:a,left:f,right:d,width:g,height:m}||null),!v)break;_=_&&p(_)}return v}},s.prototype._getRootRect=function(){var e;if(this.root&&!d(this.root))e=u(this.root);else{var o=d(this.root)?this.root:t,n=o.documentElement,i=o.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,o){return"px"==e.unit?e.value:e.value*(o%2?t.width:t.height)/100})),o={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return o.width=o.right-o.left,o.height=o.bottom-o.top,o},s.prototype._hasCrossedThreshold=function(t,e){var o=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(o!==n)for(var i=0;i0;)s(n[0])}function c(e){for(let t=0;t0&&(i.unobserve(n.target),s(n.target))}0===n.length&&i.disconnect()}function l(){if(!a&&(n.length>0||t.length>0)){a=document.createElement("div"),a.id="loadingWarning",a.style.fontWeight="bold",a.innerText=jetpackLazyImagesL10n.loading_warning;const e=document.createElement("style");e.innerHTML="#loadingWarning { display: none; }\n@media print {\n#loadingWarning { display: block; }\nbody > #loadingWarning ~ * { display: none !important; }\n}",a.appendChild(e),o.insertBefore(a,o.firstChild)}n.length>0&&r(),a&&alert(jetpackLazyImagesL10n.loading_warning)}function s(e){let a;if(!(e instanceof HTMLImageElement))return;const i=e.getAttribute("data-lazy-srcset"),o=e.getAttribute("data-lazy-sizes");e.removeAttribute("data-lazy-srcset"),e.removeAttribute("data-lazy-sizes"),e.removeAttribute("data-lazy-src"),e.classList.add("jetpack-lazy-image--handled"),e.setAttribute("data-lazy-loaded",1),o&&e.setAttribute("sizes",o),i?e.setAttribute("srcset",i):e.removeAttribute("srcset"),e.setAttribute("loading","eager"),t.push(e);const d=n.indexOf(e);d>=0&&n.splice(d,1),e.complete?u.call(e,null):(e.addEventListener("load",u,{once:!0}),e.addEventListener("error",u,{once:!0})),"undefined"!=typeof safari&&(e.outerHTML=e.outerHTML);try{a=new Event("jetpack-lazy-loaded-image",{bubbles:!0,cancelable:!0})}catch(e){a=document.createEvent("Event"),a.initEvent("jetpack-lazy-loaded-image",!0,!0)}e.dispatchEvent(a)}function u(){const e=t.indexOf(this);e>=0&&t.splice(e,1),a&&0===n.length&&0===t.length&&(a.parentNode.removeChild(a),a=null)}o&&(o.addEventListener("is.post-load",d),o.addEventListener("jetpack-lazy-images-load",d))};"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();; ; const vfCookieName = 'loggedinCookie_sid'; const vfCookieValPrefix = 'DdTp_'; function createCookie(name, value) { const expires = "; expires=Session"; document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; } function eraseCookie(name) { createCookie(name, "", -1); } function initVfQ() { console.log('vf: safely initialize vfQ'); window.vfQ = window.vfQ || []; window.vfQ.push(() => { console.log('window.vf.* is now ready'); }); window.vfQ.push(() => { window.vf.$subscribe('authentication', 'logout', () => { eraseCookie(vfCookieName); }); }); } function checkTPUserAccess() { console.log('vf: check TPUser Access'); return new Promise(function (resolve, reject) { try { window.tp.api.callApi('/access/list', {}, (response) => { if (Array.isArray(response.data) && response.data.length > 0) { console.log('/access/list', response); resolve(response); } else { reject(new Error('vf: user has no access')); } }); } catch (err) { reject(err); } }); } function createViafouraAuthCookie() { let user = window.tp.user.getProvider().getUser(); console.log("vf: create Viafoura Auth Cookie", user); const token = `${vfCookieValPrefix}${user.uid}_${new Date().toISOString()}`; const encodedToken = window.btoa(token); // Create a session that will be used to authorize a user in Viafoura createCookie(vfCookieName, encodedToken); } function subscribeOnVFRequiredAuthEvents(callback) { // subscribe on Viafoura required authentication events window.vf.$prepublish((channel, event, ...args) => { if (channel === 'authentication' && event === 'required') { if (typeof callback === 'function') { callback() } return false; } else { return {channel, event, args}; } }); } jQuery(document).ready(() => { // Retrieving Piano settings from the Piano module in the Digiday Media Network plugin const pianoSettings = window.pianoSettings; if (!pianoSettings) { console.log('Piano module not configured. Please do this in the Digiday Media Network plugin settings.'); return; } if (!pianoSettings.aid) { console.log('Piano aid is undefined. Please configure Piano module in Digiday Media Network plugin settings.'); return; } // Tinypass init // It should be done before initializing Viafoura let tp = window["tp"] || []; tp.push(["setAid", pianoSettings.aid]); tp.push(["setEndpoint", 'https://buy.tinypass.com/api/v3']); tp.push(["setUseTinypassAccounts", false]); tp.push(["setUsePianoIdUserProvider", true]); if (pianoSettings.debug === "1") { tp.push(['setDebug', true]); } if (pianoSettings.sandbox === "1") { tp.push(['setSandbox', true]); } tp.push(['init', () => { initVfQ(); if (window.tp.user.isUserValid()) { checkTPUserAccess().then((access) => { console.log('vf: user access', access); createViafouraAuthCookie(); }).catch((err) => { console.log(err); window.vfQ.push(() => { subscribeOnVFRequiredAuthEvents(() => { // @todo we need to show offer for unsubscribed users // @todo something like window.tp.offer.show({offerId: 'OF14OO5FO4WV'}) for MR console.log('show offer by Viafoura'); }) }); }) } else { console.log('vf: need auth') window.vfQ.push(() => { subscribeOnVFRequiredAuthEvents(() => { console.log('showLogin by Viafoura'); // show login for unauthorized users window.tp.user.showLogin({}); }) }); } }]); tp.push(['addHandler', 'logout', () => { if (typeof window.vf !== "undefined") { window.vf.session.logout(); } eraseCookie(vfCookieName); // I hate setTimeout, but window.vf.session.logout() hasn't any callbacks( // and this method has no time to execute before the page reloads setTimeout(() => window.location.reload(), 100); }]) }); ; jQuery(document).ready(function($) { $('.pricing-tabs-nav a').on('click', function (e) { e.preventDefault(); $('.tab-active').removeClass('tab-active'); $(this).parent().addClass('tab-active'); $('.pricing-tabs-content .pricing-tab').hide(); $($(this).attr('href')).show(); }); }); ; !function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([,function(e,n,t){e.exports=t(2)},function(e,n){jQuery((function(){const e=jQuery;e(".schema-faq").length>0&&e(".schema-faq .schema-faq-section .schema-faq-question").on("click",(function(){var n=e(this).parents(".schema-faq-section");n.find(".schema-faq-answer").slideToggle(200),n.hasClass("expanded")?n.removeClass("expanded"):n.addClass("expanded")}))}))}]);;