PageSourceSearch

https://www.ewn.co.za/_nuxt/CzgTz5To.js

js ewn.co.za collected 2026-10-02 02:33:07 UTC 13,313 bytes, 15 lines download raw bytes

1function R(p,v){for(var c=0;c<v.length;c++){const s=v[c];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in p)){const b=Object.getOwnPropertyDescriptor(s,a);b&&Object.defineProperty(p,a,b.get?b:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var x=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function U(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}function S(p){throw new Error('Could not dynamically require "'+p+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var M={};/*!
2 * smartbanner.js v1.25.0 <https://github.com/ain/smartbanner.js#readme>
3 * Copyright © 2024 Ain Tohvri, contributors. Licensed under GPL-3.0.
4 */var C;function N(){return C||(C=1,function(){(function(){function p(v,c,s){function a(d,h){if(!c[d]){if(!v[d]){var l=typeof S=="function"&&S;if(!h&&l)return l(d,!0);if(b)return b(d,!0);var r=new Error("Cannot find module '"+d+"'");throw r.code="MODULE_NOT_FOUND",r}var e=c[d]={exports:{}};v[d][0].call(e.exports,function(t){var u=v[d][1][t];return a(u||t)},e,e.exports,p,v,c,s)}return c[d].exports}for(var b=typeof S=="function"&&S,y=0;y<s.length;y++)a(s[y]);return a}return p})()({1:[function(p,v,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;function s(l){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},s(l)}function a(l,r){if(!(l instanceof r))throw new TypeError("Cannot call a class as a function")}function b(l,r){for(var e=0;e<r.length;e++){var t=r[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,d(t.key),t)}}function y(l,r,e){return e&&b(l,e),Object.defineProperty(l,"prototype",{writable:!1}),l}function d(l){var r=h(l,"string");return s(r)=="symbol"?r:r+""}function h(l,r){if(s(l)!="object"||!l)return l;var e=l[Symbol.toPrimitive];if(e!==void 0){var t=e.call(l,r);if(s(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}c.default=function(){function l(){a(this,l)}return y(l,null,[{key:"getCookieExpiresString",value:function(e){var t=new Date,u=new Date(t.getTime()+e);return"expires=".concat(u.toGMTString(),";")}},{key:"bake",value:function(e,t){document.cookie="smartbanner_exited=1; ".concat(e?l.getCookieExpiresString(e):""," path=").concat(t)}},{key:"unbake",value:function(){document.cookie="smartbanner_exited=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}},{key:"baked",get:function(){var e=document.cookie.replace(/(?:(?:^|.*;\s*)smartbanner_exited\s*=\s*([^;]*).*$)|^.*$/,"$1");return e==="1"}}])}()},{}],2:[function(p,v,c){(function(s){(function(){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;function a(r){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(r)}function b(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function y(r,e){for(var t=0;t<e.length;t++){var u=e[t];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,h(u.key),u)}}function d(r,e,t){return t&&y(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function h(r){var e=l(r,"string");return a(e)=="symbol"?e:e+""}function l(r,e){if(a(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var u=t.call(r,e);if(a(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}c.default=function(){function r(){b(this,r)}return d(r,null,[{key:"platform",value:function(){var t=window.navigator.maxTouchPoints,u=window.navigator.userAgent;if(/Android/i.test(u))return"android";if(!window.MSStream&&!/X11|Linux|Windows/i.test(u)&&t&&t>0||/iPhone|iPad|iPod/i.test(u))return"ios"}},{key:"userAgentMatchesRegex",value:function(t){return new RegExp(t).test(window.navigator.userAgent)}},{key:"jQueryMobilePage",value:function(){return typeof s.$<"u"&&s.$.mobile!=="undefined"&&document.querySelector(".ui-page")!==null}},{key:"wrapperElement",value:function(){var t=r.jQueryMobilePage()?".ui-page":"html";return document.querySelectorAll(t)}}])}()}).call(this)}).call(this,typeof x<"u"?x:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(p,v,c){var s=a(p("./smartbanner.js"));function a(y){return y&&y.__esModule?y:{default:y}}var b;window.addEventListener("load",function(){b=new s.default,b.apiEnabled?window.smartbanner=b:b.publish()})},{"./smartbanner.js":5}],4:[function(p,v,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;function s(e){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var u=0;u<t.length;u++){var m=t[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(e,d(m.key),m)}}function y(e,t,u){return t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=h(e,"string");return s(t)=="symbol"?t:t+""}function h(e,t){if(s(e)!="object"||!e)return e;var u=e[Symbol.toPrimitive];if(u!==void 0){var m=u.call(e,t);if(s(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function l(e){return e.indexOf("smartbanner:")!==-1&&e.split(":")[1].length>0}function r(e){var t=e.split("-");return t.map(function(u,m){m>0&&(t[m]=u.charAt(0).toUpperCase()+u.substring(1))}),t.join("")}c.default=function(){function e(){a(this,e)}return y(e,[{key:"parse",value:function(){var u=document.getElementsByTagName("meta"),m={};return Array.apply(null,u).forEach(function(P){var g=null,k=P.getAttribute("name"),w=P.getAttribute("content");k&&w&&l(k)&&w.length>0&&(g=k.split(":")[1],g.indexOf("-")!==-1&&(g=r(g)),m[g]=w)}),m}}])}()},{}],5:[function(p,v,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var s=y(p("./optionparser.js")),a=y(p("./detector.js")),b=y(p("./bakery.js"));function y(o){return o&&o.__esModule?o:{default:o}}function d(o){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d(o)}function h(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function l(o,n){for(var i=0;i<n.length;i++){var f=n[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(o,e(f.key),f)}}function r(o,n,i){return n&&l(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o}function e(o){var n=t(o,"string");return d(n)=="symbol"?n:n+""}function t(o,n){if(d(o)!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var f=i.call(o,n);if(d(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}var u="android,ios",m="Close",P="View",g={originalTop:"data-smartbanner-original-top",originalMarginTop:"data-smartbanner-original-margin-top"};
4function k(o,n){n.exit(),o.preventDefault()}function w(o,n){n.clickout()}function j(o){this.positioningDisabled||E(o.data.height)}function L(o){var n=document.querySelector(".js_smartbanner__exit");n.addEventListener("click",function(f){return k(f,o)});var i=document.querySelector(".js_smartbanner__button");i.addEventListener("click",function(f){return w(f,o)}),a.default.jQueryMobilePage()&&$(document).on("pagebeforeshow",o,j)}function D(){a.default.jQueryMobilePage()&&$(document).off("pagebeforeshow",j)}function E(o){for(var n=a.default.wrapperElement(),i=0,f=n.length,_;i<f;i++)if(_=n[i],a.default.jQueryMobilePage()){if(_.getAttribute(g.originalTop))continue;var T=parseFloat(getComputedStyle(_).top);_.setAttribute(g.originalTop,isNaN(T)?0:T),_.style.top=o+"px"}else{if(_.getAttribute(g.originalMarginTop))continue;var A=parseFloat(getComputedStyle(_).marginTop);_.setAttribute(g.originalMarginTop,isNaN(A)?0:A),_.style.marginTop=o+"px"}}function q(){for(var o=a.default.wrapperElement(),n=0,i=o.length,f;n<i;n++)f=o[n],a.default.jQueryMobilePage()&&f.getAttribute(g.originalTop)?f.style.top=f.getAttribute(g.originalTop)+"px":f.getAttribute(g.originalMarginTop)&&(f.style.marginTop=f.getAttribute(g.originalMarginTop)+"px")}c.default=function(){function o(){h(this,o);var n=new s.default;this.options=n.parse(),this.platform=a.default.platform();var i=new Event("smartbanner.init");document.dispatchEvent(i)}return r(o,[{key:"originalTop",get:function(){var i=a.default.wrapperElement()[0];return parseFloat(i.getAttribute(g.originalTop))}},{key:"originalTopMargin",get:function(){var i=a.default.wrapperElement()[0];return parseFloat(i.getAttribute(g.originalMarginTop))}},{key:"priceSuffix",get:function(){return this.platform==="ios"&&this.options.priceSuffixApple?this.options.priceSuffixApple:this.platform==="android"&&this.options.priceSuffixGoogle?this.options.priceSuffixGoogle:""}},{key:"price",get:function(){return this.options.price&&this.options.price!==""?this.options.price:""}},{key:"icon",get:function(){return this.platform==="android"?this.options.iconGoogle:this.options.iconApple}},{key:"buttonUrl",get:function(){return this.platform==="android"?this.options.buttonUrlGoogle:this.platform==="ios"?this.options.buttonUrlApple:"#"}},{key:"closeLabel",get:function(){return this.options.closeLabel!==void 0?this.options.closeLabel:m}},{key:"buttonLabel",get:function(){var i=this.options.button;return this.platform==="android"&&this.options.buttonGoogle?i=this.options.buttonGoogle:this.platform==="ios"&&this.options.buttonApple&&(i=this.options.buttonApple),i||P}},{key:"html",get:function(){var i=this.options.customDesignModifier?this.options.customDesignModifier:this.platform;return'<div class="smartbanner smartbanner--'.concat(i,` js_smartbanner">
5      <a href="#" class="smartbanner__exit js_smartbanner__exit" title="`).concat(this.closeLabel,`" rel="nofollow"></a>
6      <div class="smartbanner__icon" style="background-image: url(`).concat(this.icon,`);"></div>
7      <div class="smartbanner__info">
8        <div>
9          <div class="smartbanner__info__title">`).concat(this.options.title,`</div>
10          <div class="smartbanner__info__author">`).concat(this.options.author,`</div>
11          <div class="smartbanner__info__price">`).concat(this.price).concat(this.priceSuffix,`</div>
12        </div>
13      </div>
14      <a href="`).concat(this.buttonUrl,'" target="_blank" class="smartbanner__button js_smartbanner__button" rel="noopener" aria-label="').concat(this.buttonLabel,'"><span class="smartbanner__button__label">').concat(this.buttonLabel,`</span></a>
15    </div>`)}},{key:"height",get:function(){try{return document.querySelector(".js_smartbanner").offsetHeight}catch{return 0}}},{key:"platformEnabled",get:function(){var i=this.options.enabledPlatforms||u;return i.replace(/\s+/g,"").split(",").indexOf(this.platform)!==-1}},{key:"positioningDisabled",get:function(){return this.options.disablePositioning==="true"}},{key:"apiEnabled",get:function(){return this.options.api==="true"||this.options.api==="yes"}},{key:"userAgentExcluded",get:function(){return this.options.excludeUserAgentRegex?a.default.userAgentMatchesRegex(this.options.excludeUserAgentRegex):!1}},{key:"userAgentIncluded",get:function(){return this.options.includeUserAgentRegex?a.default.userAgentMatchesRegex(this.options.includeUserAgentRegex):!1}},{key:"hideTtl",get:function(){return this.options.hideTtl?parseInt(this.options.hideTtl):!1}},{key:"hidePath",get:function(){return this.options.hidePath?this.options.hidePath:"/"}},{key:"publish",value:function(){if(Object.keys(this.options).length===0)throw new Error("No options detected. Please consult documentation.");
15if(b.default.baked||this.userAgentExcluded||!(this.platformEnabled||this.userAgentIncluded))return!1;var i=document.createElement("div");document.querySelector("body").prepend(i),i.outerHTML=this.html;var f=new Event("smartbanner.view");document.dispatchEvent(f),this.positioningDisabled||E(this.height),L(this)}},{key:"exit",value:function(){D(),this.positioningDisabled||q();var i=document.querySelector(".js_smartbanner");document.querySelector("body").removeChild(i);var f=new Event("smartbanner.exit");document.dispatchEvent(f),b.default.bake(this.hideTtl,this.hidePath)}},{key:"clickout",value:function(){var i=new Event("smartbanner.clickout");document.dispatchEvent(i)}}])}()},{"./bakery.js":1,"./detector.js":2,"./optionparser.js":4}]},{},[3])}()),M}var O=N();const F=U(O),G=R({__proto__:null,default:F},[O]);export{G as s};

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.