PageSourceSearch

https://arbeitsschutz-arbeitskleidung.de/theme/ad557531112df2178c4…commendy-tracking-purchase.plugin.a02c0a.js

js arbeitsschutz-arbeitskleidung.de collected 2026-10-05 09:45:19 UTC 7,198 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunkrecommendy=self.webpackChunkrecommendy||[]).push([[16358],{68(t,e,r){r.d(e,{A:()=>n});class n{constructor(){this._request=null,this._errorHandlingInternal=!1}get(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",t,r);return this._sendRequest(n,null,e)}post(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let i=this._createPreparedRequest("POST",t,n);return this._sendRequest(i,e,r)}delete(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let i=this._createPreparedRequest("DELETE",t,n);return this._sendRequest(i,e,r)}patch(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let i=this._createPreparedRequest("PATCH",t,n);return this._sendRequest(i,e,r)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn(`the request to ${t.responseURL} was aborted`)}),t.addEventListener("error",()=>{console.warn(`the request to ${t.responseURL} failed with status ${t.status}`)}),t.addEventListener("timeout",()=>{console.warn(`the request to ${t.responseURL} timed out`)})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,r){return this._registerOnLoaded(t,r),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,r){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}},338(t,e,r){r.d(e,{A:()=>i});var n=r(68);class i{static getSessionId(){let t=localStorage.getItem("vai_session");if(!t){try{t=crypto.randomUUID()}catch{t=this._generateUuid()}localStorage.setItem("vai_session",t)}return t}static _generateUuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}static track(t,e,r,i){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.httpClient||(this.httpClient=new n.A);let d=this.getSessionId();s?this.httpClient.post(t,JSON.stringify({productId:e,actionId:r,sessionId:d,quantity:i,price:o,currentProductId:a}),function(t){}):localStorage.setItem("RecommendyTracking",JSON.stringify({url:t,productId:e,actionId:r,sessionId:d,quantity:i,price:o,currentProductId:a}))}static checkLocalStorage(){this.httpClient||(this.httpClient=new n.A);let t=localStorage.getItem("RecommendyTracking");t&&(localStorage.removeItem("RecommendyTracking"),t=JSON.parse(t),this.track(t.url,t.productId,t.actionId,t.quantity,!0,t.price,t.currentProductId));let e=localStorage.getItem("RecommendyOrderTracking");e&&(localStorage.removeItem("RecommendyOrderTracking"),(e=JSON.parse(e)).forEach(t=>{this.track(t.url,t.productId,t.actionId,t.quantity,!0,t.price)}))}static getUrl(){return window.vairouter["frontend.vai.track"]}}},358(t,e,r){r.r(e),r.d(e,{default:()=>s});var n=r(710),i=r(338);class s extends window.PluginBaseClass{static #t=this.options={terms:"#tos"};init(){i.A.checkLocalStorage(),this.registerSubscriptions()}registerSubscriptions(){let t=n.A.querySelector(document,"#tos");this.el.addEventListener("click",this._onConfirm.bind(this,t))}_onConfirm(t){if(!t.checked)return;let e=i.A.getSessionId(),r=n.A.querySelector(document,".hidden-line-items-information"),s=n.A.querySelectorAll(r,".hidden-line-item"),o=[],a=i.A.getUrl();s.forEach(t=>{o.push({url:a,productId:n.A.getDataAttribute(t,"id"),actionId:90,sessionId:e,price:n.A.getDataAttribute(t,"price"),quantity:n.A.getDataAttribute(t,"quantity")})}),localStorage.setItem("RecommendyOrderTracking",JSON.stringify(o))}}},710(t,e,r){r.d(e,{A:()=>i});
1class n{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=n.toUpperCamelCase(t,e);return n.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>n.ucFirst(t.toLowerCase())).join(""):n.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class i{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!i.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===i.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=e.replace(/^data(|-)/,""),o=n.toLowerCamelCase(s,"-");if(!i.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(r)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return a}return n.parsePrimitive(a)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelector(e)||!1;if(r&&!1===n)throw Error(`The required element "${e}" does not exist in parent node!`);return n}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelectorAll(e);if(0===n.length&&(n=!1),r&&!1===n)throw Error(`At least one item of "${e}" must exist in parent node!`);return n}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}}}]);

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.