PageSourceSearch

https://flowerson14th.com/cdn/shop/t/97/assets/media-gallery.js?v=124551742486323041571790755916

js flowerson14th.com collected 2026-10-04 08:00:25 UTC 8,112 bytes, 2 lines download raw bytes

1function _typeof(a){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a2){return typeof a2}:function(a2){return a2&&typeof Symbol=="function"&&a2.constructor===Symbol&&a2!==Symbol.prototype?"symbol":typeof a2},_typeof(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,_toPropertyKey(c.key),c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return _typeof(b)==="symbol"?b:b+""}function _toPrimitive(a,b){if(_typeof(a)!=="object"||a===null)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if(_typeof(d)!=="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(a)}function _inherits(a,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&_setPrototypeOf(a,b)}function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _possibleConstructorReturn(a,b){if(b&&(_typeof(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(a)}function _assertThisInitialized(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _wrapNativeSuper(a){var b=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(a2){function c(){return _construct(a2,arguments,_getPrototypeOf(this).constructor)}if(a2===null||!_isNativeFunction(a2))return a2;if(typeof a2!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(a2))return b.get(a2);b.set(a2,c)}return c.prototype=Object.create(a2.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(c,a2)},_wrapNativeSuper(a)}function _construct(){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(b,c,d){var e=[null];e.push.apply(e,c);var a=Function.bind.apply(b,e),f=new a;return d&&_setPrototypeOf(f,d.prototype),f},_construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function _isNativeFunction(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a2,b2){return a2.__proto__=b2,a2},_setPrototypeOf(a,b)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a2){return a2.__proto__||Object.getPrototypeOf(a2)},_getPrototypeOf(a)}customElements.get("media-gallery")||customElements.define("media-gallery",(function(a){function b(){var a2;return _classCallCheck(this,b),a2=c.call(this),a2.elements={liveRegion:a2.querySelector('[id^="GalleryStatus"]'),viewer:a2.querySelector('[id^="GalleryViewer"]'),thumbnails:a2.querySelector('[id^="GalleryThumbnails"]')},a2.productVariants=document.querySelector("variant-radios")||document.querySelector("variant-selects"),a2.mql=window.matchMedia("(min-width: 750px)"),a2.elements.thumbnails?(a2.elements.viewer.addEventListener("slideChanged",debounce(a2.onSlideChanged.bind(_assertThisInitialized(a2)),500)),a2.elements.thumbnails.addEventListener("click",a2.onThumbnailClick.bind(_assertThisInitialized(a2))),a2.dataset.desktopLayout.includes("thumbnail")&&a2.mql.matches&&a2.removeListSemantic(),a2):_possibleConstructorReturn(a2)}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"onThumbnailClick",value:function(a2){var b2=a2.target.closest("[data-target]");b2&&this.setActiveMedia(b2.dataset.target,!1)}},{key:"onSlideChanged",value:function(a2){var b2;if((b2=a2.detail)!==null&&b2!==void 0&&b2.currentElement){var c2=this.elements.thumbnails.querySelector('[data-target="'.concat(a2.detail.currentElement.dataset.mediaId,'"]'));
1c2&&(this.setActiveThumbnail(c2),this.setActiveVariant(c2))}}},{key:"setActiveMedia",value:function(a2,b2){var c2,d=this,e=this.elements.viewer.querySelector('[data-media-id="'.concat(a2,'"]'))||this.elements.viewer.querySelector("[data-media-id]");if(e){if(this.elements.viewer.querySelectorAll("[data-media-id]").forEach(function(a3){a3.classList.remove("is-active")}),e==null||(c2=e.classList)===null||c2===void 0||c2.add("is-active"),b2){if(e.parentElement.firstChild!==e&&e.parentElement.prepend(e),this.elements.thumbnails){var f=this.elements.thumbnails.querySelector('[data-target="'.concat(a2,'"]'));f&&f.parentElement.firstChild!==f&&f.parentElement.prepend(f)}this.elements.viewer.slider&&this.elements.viewer.resetPages()}if(this.preventStickyHeader(),window.setTimeout(function(){(!d.mql.matches||d.elements.thumbnails)&&e.parentElement.scrollTo({left:e.offsetLeft});var a3=e.getBoundingClientRect();if(!(-.5<a3.top)){var b3=a3.top+window.scrollY;window.scrollTo({top:b3,behavior:"smooth"})}}),this.playActiveMedia(e),!!this.elements.thumbnails){var g=this.elements.thumbnails.querySelector('[data-target="'.concat(a2,'"]'));g&&(this.setActiveThumbnail(g),this.setActiveVariant(),this.announceLiveRegion(e,g.dataset.mediaPosition))}}}},{key:"setActiveThumbnail",value:function(a2){this.elements.thumbnails&&a2&&(this.elements.thumbnails.querySelectorAll("button").forEach(function(a3){return a3.removeAttribute("aria-current")}),a2.querySelector("button").setAttribute("aria-current",!0),this.elements.thumbnails.isSlideVisible(a2,10)||this.elements.thumbnails.slider.scrollTo({left:a2.offsetLeft}))}},{key:"announceLiveRegion",value:function(a2,b2){var c2=this,d=a2.querySelector(".product__modal-opener--image img");d&&(d.onload=function(){c2.elements.liveRegion.setAttribute("aria-hidden",!1),c2.elements.liveRegion.innerHTML=window.accessibilityStrings.imageAvailable.replace("[index]",b2),setTimeout(function(){c2.elements.liveRegion.setAttribute("aria-hidden",!0)},2e3)},d.src=d.src)}},{key:"playActiveMedia",value:function(a2){window.pauseAllMedia();var b2=a2.querySelector(".deferred-media");b2&&b2.loadContent(!1)}},{key:"preventStickyHeader",value:function(){this.stickyHeader=this.stickyHeader||document.querySelector("sticky-header"),this.stickyHeader&&this.stickyHeader.dispatchEvent(new Event("preventHeaderReveal"))}},{key:"removeListSemantic",value:function(){this.elements.viewer.slider&&(this.elements.viewer.slider.setAttribute("role","presentation"),this.elements.viewer.sliderItems.forEach(function(a2){return a2.setAttribute("role","presentation")}))}},{key:"setActiveVariant",value:function(){var a2=this.querySelector("[aria-current]"),b2=a2==null?void 0:a2.getAttribute("data-section");if(b2){var c2=document.querySelector("variant-radios")||document.querySelector("variant-selects");if(c2){var d=c2.querySelector("input#".concat(b2));if(d&&!d.checked)return d.checked=!0,void d.dispatchEvent(new Event("change",{bubbles:!0}));var e=c2.querySelector("select#".concat(b2));if(e){var f=e.querySelector("option#".concat(b2));f&&!f.selected&&(f.selected=!0,e.dispatchEvent(new Event("change",{bubbles:!0})))}}}}}]),b})(_wrapNativeSuper(HTMLElement)));
2//# sourceMappingURL=/cdn/shop/t/97/assets/media-gallery.js.map?v=124551742486323041571790755916

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.