PageSourceSearch

https://www.schmedt.com/theme/a8823d846a14671cc3f820d1bc772444/js/…ersavecustomerinput-plugin.plugin.41b886.js

js schmedt.com collected 2026-09-26 11:08:24 UTC 7,184 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1367],{68(e,t,r){r.d(t,{A:()=>s});class s{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,r);return this._sendRequest(s,null,t)}post(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("POST",e,s);return this._sendRequest(i,t,r)}delete(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(i,t,r)}patch(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(i,t,r)}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 ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}},88(e,t,r){r.d(t,{A:()=>s});class s{static serialize(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if("FORM"!==e.nodeName){if(t)throw Error("The passed element is not a form!");return{}}return new FormData(e)}static serializeJson(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=s.serialize(e,t);if(!(r instanceof FormData)&&0===Object.keys(r).length||r instanceof FormData&&0===Array.from(r.entries()).length)return{};let i={};for(let[e,t]of r.entries())i[e]=t;return i}}},367(e,t,r){r.r(t),r.d(t,{default:()=>u});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 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 r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===i.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),o=s.toLowerCamelCase(n,"-");if(!i.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[o];if(void 0===a){if(r)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return a}return s.parsePrimitive(a)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelector(t)||!1;if(r&&!1===s)throw Error(`The required element "${t}" does not exist in parent node!`);return s}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelectorAll(t);if(0===s.length&&(s=!1),r&&!1===s)throw Error(`At least one item of "${t}" must exist in parent node!`);return s}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
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 e.querySelectorAll(t)}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]}}var n=r(88),o=r(68);let{PluginBaseClass:a}=window;class u extends a{init(){this.$emitter.publish("beforeInitRepeatOrderSaveCustomerInput"),this.client=new o.A,this._subscriptions=[];let e=window.PluginManager.getPluginInstances("AddToCart");e&&e.forEach(e=>{let t=e=>{let t=e&&e.target?e.target:null;if(!t||"function"!=typeof t.getAttribute){this.$emitter.publish("repeatOrderSaveCustomerInputError",{message:"Missing submit target element."});return}let r=t.getAttribute("id");if(!r||!r.startsWith("orderDetailForm-"))return;let s=r.replace("orderDetailForm-","").replace(/[^a-zA-Z0-9_-]/g,"");if(!s){this.$emitter.publish("repeatOrderSaveCustomerInputError",{message:"Invalid order id."});return}let o=i.querySelectorAll(document,`.order-item-tmms-customer-input-form[data-orderId='${s}']`,!1);o&&0!==o.length&&o.forEach(e=>{let t=e&&"function"==typeof e.getAttribute?e.getAttribute("action"):null;if(!t){this.$emitter.publish("repeatOrderSaveCustomerInputError",{message:"Missing form action URL."});return}try{let r=n.A.serialize(e);this.$emitter.publish("beforeRepeatOrderSaveCustomerInputSendPostRequest",r),this.client.post(t,r,()=>{this.$emitter.publish("afterRepeatOrderSaveCustomerInputSendPostRequest")})}catch(e){this.$emitter.publish("repeatOrderSaveCustomerInputError",{message:"Failed to send repeat order customer input.",error:e})}})};e.$emitter.subscribe("beforeFormSubmit",t),this._subscriptions.push({emitter:e.$emitter,handler:t})})}destroy(){Array.isArray(this._subscriptions)&&this._subscriptions.forEach(e=>{let{emitter:t,handler:r}=e;t&&"function"==typeof t.unsubscribe&&t.unsubscribe("beforeFormSubmit",r)}),this._subscriptions=[],"function"==typeof super.destroy&&super.destroy()}}}}]);

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.