1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[67910],{910(e,t,i){i.r(t),i.d(t,{default:()=>o});let s="loader",r={BEFORE:"before",INNER:"inner"};class n{constructor(e,t=r.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===r.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=n.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),n.getTemplate())}}remove(){if(this.position===r.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===r.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status"> 2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return s}}let l="element-loader-backdrop";class a extends n{static create(e){e.classList.add("has-element-loader"),a.exists(e)||(a.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${l}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${l}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${l}`).length>0}static getTemplate(){return` 4 <div class="${l}"> 5 <div class="loader" role="status"> 6 <span class="visually-hidden">Loading...</span> 7 </div> 8 </div> 9 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",a.getTemplate())}}/** 10 * digitvision 11 * 12 * @category digitvision 13 * @package Shopware\Plugins\DvsnProductSubscription 14 * @copyright (c) 2020 digitvision 15 */class o extends window.PluginBaseClass{static #e=this.options={product:{id:""},subscription:{url:""}};init(){0!==this.el.querySelectorAll("button").length&&this.el.querySelector("button").addEventListener("click",()=>{this.onButtonClick()})}onButtonClick(){let e=this.el;if(!1===e.querySelector(".email-input").checkValidity()){e.querySelector(".email-input").focus(),e.querySelector(".email-input").reportValidity();return}let t={productId:this.options.product.id,email:e.querySelector('input[name="email"]').value,types:[]};e.querySelectorAll('input[type="checkbox"]').forEach(e=>{let i=e.getAttribute("data-type"),s=e.checked;t.types.push({type:i,checked:s})}),a.create(e),fetch(this.options.subscription.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(e=>e.text()).then(t=>{a.remove(this.el),e.innerHTML=t})}}}}]);
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.