PageSourceSearch

https://www.sportvoedingwebshop.com/theme/5a5579922d30ec5e6b18ba51…web-upsell-off-canvas-cart.plugin.4305d4.js

js sportvoedingwebshop.com collected 2026-10-08 10:52:33 UTC 16,324 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["h1web-upsell-off-canvas-cart.plugin"],{857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function i(e,t,s){return e.concat(t).map(function(e){return n(e,s)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,s,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c,d,u=Array.isArray(s);return u!==Array.isArray(e)?n(s,l):u?l.arrayMerge(e,s,l):(d={},(c=l).isMergeableObject(e)&&r(e).forEach(function(t){d[t]=n(e[t],c)}),r(s).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(s[t])?d[t]=(function(e,t){if(!t.customMerge)return o;var s=t.customMerge(e);return"function"==typeof s?s:o})(t,c)(e[t],s[t],c):d[t]=n(s[t],c))}),d)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,s){return o(e,s,t)},{})},e.exports=o},49:(e,t,s)=>{s.d(t,{Z:()=>i});var n=s(140);class i{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!i.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===i.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=t.replace(/^data(|-)/,""),a=n.Z.toLowerCamelCase(r,"-");if(!i.isNode(e)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[a];if(void 0===o){if(s)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return o}return n.Z.parsePrimitive(o)}static querySelector(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(s&&!1===n)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return n}static querySelectorAll(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),s&&!1===n)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return n}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}},830:(e,t,s)=>{s.d(t,{Z:()=>n});class n{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(e,{detail:t,cancelable:s});return this.el.dispatchEvent(n),n}subscribe(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,i=e.split("."),r=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=r;r=function(s){n.unsubscribe(e),t(s)}}return this.el.addEventListener(i[0],r),this.listeners.push({splitEventName:i,opts:s,cb:r}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,s)=>([...s.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):e.push(s),e),[]),!0}
1reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}},266:(e,t,s)=>{s.d(t,{Z:()=>n});class n{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var s of e.entries())t(s[1],s[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(s=>{t(e[s],s)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},140:(e,t,s)=>{s.d(t,{Z:()=>n});class n{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let s=n.toUpperCamelCase(e,t);return n.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>n.ucFirst(e.toLowerCase())).join(""):n.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},568:(e,t,s)=>{s.d(t,{Z:()=>l});var n=s(857),i=s.n(n),r=s(49),a=s(140),o=s(830);class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=a.Z.toDashCase(this._pluginName),s=r.Z.getDataAttribute(this.el,"data-".concat(t,"-config"),!1),n=r.Z.getAttribute(this.el,"data-".concat(t,"-options"),!1),o=[this.constructor.options,this.options,e];s&&o.push(window.PluginConfigManager.get(this._pluginName,s));try{n&&o.push(JSON.parse(n))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(t,'-options" could not be parsed to json: ').concat(e.message))}return i().all(o.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},s=!1){if(!r.Z.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new o.Z(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}},107:(e,t,s)=>{s.d(t,{Z:()=>n});class n{get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,s);return this._sendRequest(n,null,t)}post(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("POST",e,n);return this._sendRequest(i,t,s)}delete(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(i,t,s)}patch(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(i,t,s)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},387:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var n=s(568),i=s(49);class r{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return r.isIPhoneDevice()||r.isIPadDevice()}static isNativeWindowsBrowser(){return r.isIEBrowser()||r.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":r.isTouchDevice(),"is-ios":r.
1isIOSDevice(),"is-native-windows":r.isNativeWindowsBrowser(),"is-iphone":r.isIPhoneDevice(),"is-ipad":r.isIPadDevice(),"is-ie":r.isIEBrowser(),"is-edge":r.isEdgeBrowser()}}}var a=s(830),o=s(266);let l="offcanvas";class c{open(e,t,s,n,i,r,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,r,a,n);this.setContent(e,n,i),this._openOffcanvas(o,t)}setContent(e,t){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=e,this._registerEvents(t))}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(".".concat(l))}close(e){let t=this.getOffCanvas();o.Z.iterate(t,e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){window.focusHandler.saveFocusState("offcanvas"),c.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=r.isTouchDevice()?"touchend":"click",
1s=this.getOffCanvas();o.Z.iterate(s,t=>{let n=()=>{setTimeout(()=>{t.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:s})},e),t.removeEventListener("hide.bs.offcanvas",n)};t.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let n=document.querySelectorAll(".".concat("js-offcanvas-close"));o.Z.iterate(n,s=>s.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){c.bsOffcanvas=null;let e=this.getOffCanvas();return o.Z.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,s,n){let i=document.createElement("div");if(i.classList.add(l),i.classList.add(this._getPositionClass(e)),i.setAttribute("tabindex","-1"),!0===t&&i.classList.add("is-fullwidth"),s){let e=typeof s;if("string"===e)i.classList.add(s);else if(Array.isArray(s))s.forEach(e=>{i.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(i),c.bsOffcanvas=new bootstrap.Offcanvas(i,{backdrop:!1!==n||"static"}),i}constructor(){this.$emitter=new a.Z}}let d=Object.freeze(new c);class u{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";d.open(e,t,s,n,i,r,a)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;d.setContent(e,t,s)}static setAdditionalClassName(e){d.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;d.close(e)}static exists(){return d.exists()}static getOffCanvas(){return d.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}var h=s(107);let f="loader",p={BEFORE:"before",INNER:"inner"};class g{create(){if(!this.exists()){if(this.position===p.INNER){this.parent.innerHTML=g.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),g.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(f));o.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(f)).length>0}_getPosition(){return this.position===p.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(f,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return f}constructor(e,t=p.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}let v=null;class b extends u{static open(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",i=!(arguments.length>4)||void 0===arguments[4]||arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:u.REMOVE_OFF_CANVAS_DELAY(),a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");d._removeExistingOffCanvas();let l=d._createOffCanvas(n,a,o,i);this.setContent(e,t,s,i,r),d._openOffcanvas(l)}static setContent(e,t,s,n,i){let r=new h.Z;super.setContent('<div class="offcanvas-body">'.concat(g.getTemplate(),"</div>"),n,i),v&&v.abort();let a=e=>{super.setContent(e,n,i),"function"==typeof s&&s(e)};v=t?r.post(e,t,b.executeCallback.bind(this,a)):r.get(e,b.executeCallback.bind(this,a))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}class m extends n.Z{init(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this._wrapOffCanvasCart()):this._wrapOffCanvasCart()}_wrapOffCanvasCart(){let e=window.PluginManager.getPluginInstances("OffCanvasCart"),t=null==e?void 0:e[0];if((null==t?void 0:t.openOffCanvas)&&!t._upsellWrapped){let e=t.openOffCanvas.bind(t),s=this.options,n=this._openUpsellModal.bind(this);t.openOffCanvas=(r,a,o)=>"true"===i.Z.getAttribute(t.el,s.upsellModalSelector)?n(t,r,a,o):e(r,a,o),t._upsellWrapped=!0}}_openUpsellModal(e,t,s,n){var r,a;"true"===i.Z.getAttribute(e.el,this.options.upsellSidebarSelector)?(b.open(t,s,(r=e._onOffCanvasOpened)===null||void 0===r?void 0:r.bind(e,n),"right"),b.setAdditionalClassName(this.options.cartOffcanvasClass),b.setAdditionalClassName(this.options.upsellSidebarClass)):(b.open(t,s,(a=e._onOffCanvasOpened)===null||void 0===a?void 0:a.bind(e,n),"upsell-center"),b.setAdditionalClassName(this.options.upsellModalClass))}destroy(){super.destroy()}}m.options={upsellModalSelector:"data-upsell-modal",upsellSidebarSelector:"data-upsell-modal-sidebar",cartOffcanvasClass:"cart-offcanvas",upsellSidebarClass:"upsell-sidebar",upsellModalClass:"upsell-modal"}}}]);

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.