PageSourceSearch

https://www.waffenfuzzi.de/theme/b96818612ff407d5c94d21574c4bf577/…/easy-credit-ratenkauf.js?1791282879

js waffenfuzzi.de collected 2026-10-06 20:41:17 UTC 10,201 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={156(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!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function s(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,r,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=i;var l,u,d=Array.isArray(r);return d!==Array.isArray(e)?i(r,c):d?c.arrayMerge(e,r,c):(u={},(l=c).isMergeableObject(e)&&s(e).forEach(function(t){u[t]=i(e[t],l)}),s(r).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&l.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return o;var r=t.customMerge(e);return"function"==typeof r?r:o})(t,l)(e[t],r[t],l):u[t]=i(r[t],l))}),u)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return o(e,r,t)},{})},e.exports=o}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=r(156),n=r.n(i);class s{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 r=s.toUpperCamelCase(e,t);return s.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>s.ucFirst(e.toLowerCase())).join(""):s.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),s=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=s;s=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),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}}class o{constructor(e,t={},r=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=e,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),n().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=s.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return 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}}let c=async()=>{let e;if(void 0===window.csrf)return;let t=window.csrf;return"1"===t.enabled&&"ajax"===t.mode&&(e=await fetch(window.router["frontend.csrf.generateToken"],{method:"POST",headers:new Headers({"content-type":"application/json"})}).then(e=>e.json()).then(e=>e.token)),e},l=(e,t)=>
1{var r=document.createElement("input");return r.setAttribute("type","hidden"),r.setAttribute("name",e),r.setAttribute("value",t),r};PluginManager.register("EasyCreditRatenkaufCheckout",class extends o{init(){document.querySelector("easycredit-checkout")&&document.addEventListener("easycredit-submit",async e=>{if(!e.target.matches("easycredit-checkout"))return;var t=document.getElementById("changePaymentForm");let r=await c();return r&&t.append(l("_csrf_token",r)),t.append(l("easycredit[submit]","1")),t.append(l("easycredit[number-of-installments]",e.detail.numberOfInstallments)),t.submit(),!1})}},".is-ctl-checkout.is-act-confirmpage"),PluginManager.register("EasyCreditRatenkaufCheckoutExpress",class extends o{init(){document.addEventListener("easycredit-submit",async e=>{if(!e.target.matches("easycredit-express-button"))return;let t=e.target,r=this.buildAdditionalParams(e.detail);if(document.querySelector(".is-ctl-checkout.is-act-cartpage")||t.closest(".cart-offcanvas")){let e=new URLSearchParams(r).toString(),t=window.router["frontend.easycredit.express"]??"/easycredit/express";window.location.href=[t,e].join("?");return}let i=document.getElementById("productDetailPageBuyProductForm");if(i){var n;let e={},t=await c();if(t&&(e._csrf_token=t),e.redirectTo="frontend.easycredit.express",e.redirectParameters=JSON.stringify(r),n=await this.replicateForm(i,e)){n.submit();return}}window.alert("Die Express-Zahlung mit easyCredit konnte nicht gestartet werden."),console.error("easyCredit payment could not be started. Please check the integration.")})}replicateForm(e,t){if(!(e instanceof HTMLFormElement))return!1;let r=e.getAttribute("action"),i=e.getAttribute("method");if(!r||!i)return!1;let n=document.createElement("form");n.setAttribute("action",r),n.setAttribute("method",i),n.style.display="none";let s=new FormData(e);for(let[e,r]of Object.entries(t))s.set(e,r);for(let e of s.keys()){let t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name",e),t.setAttribute("value",s.get(e)),n.appendChild(t)}return document.body.appendChild(n),n}constructor(...e){super(...e),this.buildAdditionalParams=e=>{let t={};for(let[r,i]of(e.express="1",Object.entries(e)))t["easycredit["+r+"]"]=i;return t}}},"easycredit-express-button"),PluginManager.register("EasyCreditRatenkaufWidget",class extends o{init(){this.initWidget(document.querySelector(".product-detail-buy")),this.initWidget(document.querySelector(".cms-element-product-listing")),this.registerOffCanvas()}registerOffCanvas(){let e=document.querySelector("[data-off-canvas-cart]");e&&window.PluginManager.getPluginInstanceFromElement(e,"OffCanvasCart").$emitter.subscribe("offCanvasOpened",this.onOffCanvasOpened.bind(this))}onOffCanvasOpened(){this.initWidget(document.querySelector("div.cart-offcanvas"))}initWidget(e){if(!e)return;let t=this.getMeta("widget-selector",e);if(null===t||null===this.getMeta("api-key"))return;let r=this.processSelector(t);e.querySelectorAll(r.selector).forEach(e=>{this.applyWidget(e,r.attributes)})}applyWidget(e,t){let r=this.getMeta("amount",e);if(null===r||isNaN(r)){let t=e.parentNode;r=t&&t.querySelector("[itemprop=price]")?t.querySelector("[itemprop=price]").content:null}if(null===r||isNaN(r))return;let i=document.createElement("easycredit-widget");if(i.setAttribute("webshop-id",this.getMeta("api-key")),i.setAttribute("amount",r),i.setAttribute("payment-types",this.getMeta("payment-types",e)),this.getMeta("disable-flexprice")?i.setAttribute("disable-flexprice","true"):i.removeAttribute("disable-flexprice"),t)for(let[e,r]of Object.entries(t))i.setAttribute(e,r);e.appendChild(i)}getMeta(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i="meta[name=easycredit-"+e+"]";return(t=r?this.searchUpTheTree(r,i):document.querySelector(i))?t.content:null}processSelector(e){let t;if(t=e.match(/(.+) easycredit-widget(\[.+?\])$/)){let e=t[2].split("]").map(e=>e.slice(1).split("=")).filter(e=>{let[t,r]=e;return t}).reduce((e,t)=>{let[r,i]=t;return{...e,[r]:i}},{});return{selector:t[1],attributes:e}}return{selector:e}}searchUpTheTree(e,t){for(;e&&e.parentElement;){let r=e.parentElement,i=Array.from(r.children).find(r=>r!==e&&r.matches(t));if(i)return i;e=r}return e===document.documentElement&&Array.from(document.head.children).find(e=>e.matches(t))||null}},"body"),PluginManager.register("EasyCreditRatenkaufMarketing",class extends o{init(){this.initMarketing()}initMarketing(){if(this.body=document.querySelector("body"),this.bar=document.querySelector("easycredit-box-top"),this.bar&&this.body.classList.add("easycredit-box-top"),this.card=document.querySelector(".easycredit-box-listing"),this.card){let n;var e=[...(n=this.card).parentElement.children].filter(e=>e!=n),t=this.card.querySelector("easycredit-box-listing").getAttribute("position"),r=Number(t-1),i=Number(t-2);!t||r<=0||(i in e?e[i].after(this.card):this.card.parentElement.append(this.card))}}},"body")})();

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.