PageSourceSearch

https://webers-world.com/theme/fd7c036558e922757bfb8b0e0f00cb44/js…omized-products-image-zoom.plugin.84b0ec.js

js webers-world.com collected 2026-10-07 03:39:36 UTC 11,958 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[71063],{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!==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 s(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function n(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,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=r;var c,u,d=Array.isArray(i);return d!==Array.isArray(e)?r(i,l):d?l.arrayMerge(e,i,l):(u={},(c=l).isMergeableObject(e)&&n(e).forEach(function(t){u[t]=r(e[t],c)}),n(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(i[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,c)(e[t],i[t],c):u[t]=r(i[t],c))}),u)}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},795:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(707);class s{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!s.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===s.hasAttribute(e,t))throw Error(`The required property "${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],n=t.replace(/^data(|-)/,""),o=r.A.toLowerCamelCase(n,"-");if(!s.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 "${t}" does not exist on ${e}!`);return a}return r.A.parsePrimitive(a)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!s.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 "${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&&!s.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 "${t}" must exist in parent node!`);return r}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]}}},707:(e,t,i)=>{i.d(t,{A:()=>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=>
8r.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()}}}},737:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(156),s=i.n(r),n=i(707);class o{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}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,s=e.split("."),n=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=n;n=function(i){r.unsubscribe(e),t(i)}}return this.el.addEventListener(s[0],n),this.listeners.push({splitEventName:s,opts:i,cb:n}),!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}}class a{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),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()),s().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=n.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}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}}},63:(e,t,i)=>{i.r(t),i.d(t,{default:()=>p});var r=i(737),s=i(795);class n{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return n.isIPhoneDevice()||n.isIPadDevice()}static isNativeWindowsBrowser(){return n.isIEBrowser()||n.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":n.isTouchDevice(),"is-ios":n.isIOSDevice(),"is-native-windows":n.isNativeWindowsBrowser(),"is-iphone":n.isIPhoneDevice(),"is-ipad":n.isIPadDevice(),"is-ie":n.isIEBrowser(),"is-edge":n.isEdgeBrowser()}}}let o="modal-backdrop",a="modal-backdrop-open",l="no-scroll",c={ON_CLICK:"backdrop/onclick"};class u{constructor(){return u.instance||(u.instance=this),u.instance}create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(l),setTimeout(function(){t.classList.add(a),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;
8this._getBackdrops().forEach(e=>e.classList.remove(a)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(l)}_dispatchEvents(){let e=n.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(o)&&document.dispatchEvent(new CustomEvent(c.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(`.${o}`)}_removeExistingBackdrops(){!1!==this._exists()&&this._getBackdrops().forEach(e=>e.remove())}_exists(){return document.querySelectorAll(`.${o}`).length>0}_getTemplate(){return`<div class="${o}"></div>`}}let d=Object.freeze(new u);class h{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;d.remove(e)}static SELECTOR_CLASS(){return o}}class p extends r.A{static #e=this.options={imageSelector:".swag-customized-products-option__image",templateSelector:".swag-customized-products-image-zoom__template",template:{imageSelector:".swag-customized-products-image-zoom__image",captionSelector:".swag-customized-products-image-zoom__caption",closeButtonSelector:".swag-customized-products-image-zoom__icon-close"}};init(){this.template=s.A.querySelector(this.el,this.options.templateSelector),this.imageEl=s.A.querySelector(this.el,this.options.imageSelector),this.contentEl=null,this.closeButtonEl=null,this.prepareModalContent(),this.registerEvents()}registerEvents(){this.el.addEventListener("click",this.onImageClicked.bind(this)),this.el.addEventListener("keypress",e=>{"Enter"!==e.key&&" "!==e.key||this.contentEl||this.onImageClicked(e)})}registerKeyUpEventListener(){s.A.querySelector(document,"body").addEventListener("keyup",this.onEscapePressed.bind(this),{once:!0})}prepareModalContent(){let e=s.A.getAttribute(this.imageEl,"src"),t=s.A.getAttribute(this.imageEl,"alt"),i=this.template,r=s.A.querySelector(i,this.options.template.imageSelector),n=s.A.querySelector(i,this.options.template.captionSelector);return r.setAttribute("src",e),r.setAttribute("alt",t),n.innerText=t,this.$emitter.publish("prepareModalContent",{content:i,imageCaption:t,imageSrc:e}),!0}onImageClicked(e){e.preventDefault(),this.$emitter.publish("onImageClicked",{event:e}),this.spawnZoomModal()}onCloseClicked(e){e.preventDefault(),this.$emitter.publish("onCloseClicked",{event:e}),h.remove(),s.A.querySelector(document,"body").removeChild(this.contentEl)}onEscapePressed(e){if(e.preventDefault(),"Escape"!==e.code){this.registerKeyUpEventListener();return}this.$emitter.publish("onEscapeKeyUp",{event:e}),h.remove(),s.A.querySelector(document,"body").removeChild(this.contentEl),this.contentEl=null}spawnZoomModal(){return this.contentEl=this.template.firstElementChild.cloneNode(!0),this.contentEl.setAttribute("aria-modal",!0),this.contentEl.setAttribute("role","dialog"),this.contentEl.setAttribute("aria-labelledby","imageZoomModal"),this.closeButtonEl=s.A.querySelector(this.contentEl,this.options.template.closeButtonSelector),this.closeButtonEl.addEventListener("click",this.onCloseClicked.bind(this),{once:!0}),this.registerKeyUpEventListener(),h.create(()=>{s.A.querySelector(document,"body").appendChild(this.contentEl)}),this.$emitter.publish("spawnZoomModal",{contentEl:this.contentEl}),!0}}}}]);

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.