PageSourceSearch

https://www.sniper-as.de/theme/6b71d1ef88554a9bd0415d1ce5c3bc98/js…-c-s.acris-recently-viewed.plugin.b8f9a9.js

js sniper-as.de collected 2026-10-08 02:55:58 UTC 14,100 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[77729],{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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=r;var l,d,u=Array.isArray(i);return u!==Array.isArray(e)?r(i,c):u?c.arrayMerge(e,i,c):(d={},(l=c).isMergeableObject(e)&&s(e).forEach(function(t){d[t]=r(e[t],l)}),s(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&l.isMergeableObject(i[t])?d[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,l)(e[t],i[t],l):d[t]=r(i[t],l))}),d)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a},49:(e,t,i)=>{i.d(t,{Z:()=>n});var r=i(140);class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.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 i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),o=r.Z.toLowerCamelCase(s,"-");if(!n.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[o];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return a}return r.Z.parsePrimitive(a)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelector(t)||!1;if(i&&!1===r)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return r}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelectorAll(t);if(0===r.length&&(r=!1),i&&!1===r)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return r}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]}}},374:(e,t,i)=>{i.d(t,{Z:()=>r});class r{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,i){if(null==e)throw Error("You must specify a key to set a cookie");let r=new Date;r.setTime(r.getTime()+864e5*i);let n="";"https:"===location.protocol&&(n="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(r.toUTCString(),";path=/;sameSite=lax;").concat(n)}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let r=i[e];for(;" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return!1}static removeItem(e){document.cookie="".concat(e,"= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/")}
1static key(){return""}static clear(){}}},140:(e,t,i)=>{i.d(t,{Z:()=>r});class r{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 i=r.toUpperCamelCase(e,t);return r.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},2:(e,t,i)=>{i.d(t,{Z:()=>n});class r{static debounce(e,t){let i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var n=arguments.length,s=Array(n),o=0;o<n;o++)s[o]=arguments[o];r&&!i&&setTimeout(e.bind(e,...s),0),clearTimeout(i),i=setTimeout(e.bind(e,...s),t)}}}class n{_registerEvents(){window.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this)),window.addEventListener("resize",r.debounce(this._onResize.bind(this),200),{capture:!0,passive:!0})}_onDOMContentLoaded(){this._dispatchEvents()}_onResize(){this._viewportHasChanged(n.getCurrentViewport())&&(this._dispatchEvents(),this._dispatchViewportEvent("Viewport/hasChanged"))}_dispatchEvents(){n.isXS()?this._dispatchViewportEvent("Viewport/isXS"):n.isSM()?this._dispatchViewportEvent("Viewport/isSM"):n.isMD()?this._dispatchViewportEvent("Viewport/isMD"):n.isLG()?this._dispatchViewportEvent("Viewport/isLG"):n.isXL()?this._dispatchViewportEvent("Viewport/isXL"):n.isXXL()&&this._dispatchViewportEvent("Viewport/isXXL")}_viewportHasChanged(e){let t=e!==this.currentViewport;return t&&(this.previousViewport=this.currentViewport,this.currentViewport=e),t}_dispatchViewportEvent(e){document.$emitter.publish(e,{previousViewport:this.previousViewport})}static isXS(){return"XS"===n.getCurrentViewport()}static isSM(){return"SM"===n.getCurrentViewport()}static isMD(){return"MD"===n.getCurrentViewport()}static isLG(){return"LG"===n.getCurrentViewport()}static isXL(){return"XL"===n.getCurrentViewport()}static isXXL(){return"XXL"===n.getCurrentViewport()}static getCurrentViewport(){return window.getComputedStyle(document.documentElement).getPropertyValue("--sw-current-breakpoint").replace(/['"]+/g,"").toUpperCase()}constructor(){this.previousViewport=null,this.currentViewport=n.getCurrentViewport(),this._registerEvents()}}},293:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(857),n=i.n(r),s=i(49),o=i(140);class a{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(r),r}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,n=e.split("."),s=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=s;s=function(i){r.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:i,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){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=[]}}class c{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=o.Z.toDashCase(this._pluginName),i=s.Z.getDataAttribute(this.el,"data-".concat(t,"-config"),!1),r=s.Z.getAttribute(this.el,"data-".concat(t,"-options"),!1),a=[this.constructor.options,this.options,e];i&&a.push(window.PluginConfigManager.get(this._pluginName,i));try{r&&a.push(JSON.parse(r))}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 n().all(a.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={},i=!1){if(!s.Z.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}},729:(e,t,i)=>{i.r(t),i.d(t,{default:()=>c});var r=i(293);class n{get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=this._createPreparedRequest("GET",e,i);
1return this._sendRequest(r,null,t)}post(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("POST",e,r);return this._sendRequest(n,t,i)}delete(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("DELETE",e,r);return this._sendRequest(n,t,i)}patch(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("PATCH",e,r);return this._sendRequest(n,t,i)}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,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}var s=i(374),o=i(2);let a="acris-suggested-recentlyViewed";class c extends r.Z{init(){this._client=new n(window.accessKey,window.contextToken);let e=s.Z.getItem("acris_recently_viewed");if(e){let t=e.split("|");1===t.length&&"1"===t[0]||2===t.length&&"1"===t[0]&&t[1]===this.options.id?this.addCookiesAfterRender(e):this._client.post(this.options.url,JSON.stringify({productId:this.options.id,config:this.options.sliderConfig}),t=>{t&&(this.renderResponse(t),this.showResponse()),this.addCookiesAfterRender(e)})}else void 0===window.useDefaultCookieConsent&&this.initiateCookie()}renderResponse(e){document.querySelector(this.options.recentlyViewedContainerSelector).insertAdjacentHTML("beforeend",e),window.PluginManager.initializePlugins(),this.$emitter.publish("RecentlyView/afterRenderResponse",{response:e})}showResponse(){let e=document.getElementById(a),t=document.getElementById("recently-viewed-products-container");e&&t&&(e.classList.remove("d-none"),t.classList.remove("d-none"),(this.isRecentlyViewedFirst()||"XS"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeMobile||"SM"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeMobile||"MD"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeTablet||"LG"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeTablet||"XL"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeDesktop||"XXL"===o.Z.getCurrentViewport()&&"among"===this.options.displayModeDesktop)&&this.activateRecentlyViewedTab())}rebuildSlider(){DomAccess.querySelector(correspondingContent,this.options.productSliderSelector,!1)}initiateCookie(){s.Z.setItem("acris_recently_viewed",this.options.id,this.options.recentlyViewedDuration)}addCookiesAfterRender(e){let t=this.adjustCookieToMaxLimit(e),i="";if(t.includes(this.options.id)){let e=t.replace(this.options.id+"|","");i=this.options.id=this.options.id+"|"+e}else i=this.options.id+"|"+t;i&&s.Z.setItem("acris_recently_viewed",i,this.options.recentlyViewedDuration)}adjustCookieToMaxLimit(e){let t=e.split("|");return t.length>=this.options.recentlyViewedItemLimit?t.slice(1-this.options.recentlyViewedItemLimit).join("|"):e}isRecentlyViewedFirst(){let e=document.getElementById(a);return!!e&&e.classList.contains("recentlyViewedIsFirst")}activateRecentlyViewedTab(){let e=document.getElementById("cs-recentlyViewed-tab");e&&e.click()}}c.options={id:"",url:"",recentlyViewedContainerSelector:".recently-viewed-products-container",recentlyViewedItemLimit:7,recentlyViewedDuration:365,productSliderSelector:'[data-product-slider="true"]',sliderConfig:[],displayModeDesktop:"",displayModeTablet:"",displayModeMobile:""}}}]);

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.