PageSourceSearch

https://www.bayard.com.hk/cdn/shop/t/22/assets/DynamicInstagramFeed.bundle.js?v=159581208799061571931759165399

js bayard.com.hk collected 2026-09-24 10:17:20 UTC 7,326 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{23:(function(module,__webpack_exports__,__webpack_require__){"use strict";var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__),eventHandlers=[],previousBreakpoint=null;function getBreakpoint(){return window.getComputedStyle(document.documentElement,":after").getPropertyValue("content").replace(/"/g,"")}jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("resize",function(event){var currentBreakpoint=getBreakpoint();previousBreakpoint!==currentBreakpoint&&eventHandlers.forEach(function(eventHandler){eventHandler(event,{previous:previousBreakpoint,current:currentBreakpoint})}),previousBreakpoint=currentBreakpoint});function isBreakpoint(breakpoint){return getBreakpoint()===breakpoint}function onBreakpointChange(eventHandler){eventHandlers.indexOf(eventHandler)===-1&&eventHandlers.push(eventHandler)}function offBreakpointChange(eventHandler){var index=eventHandlers.indexOf(eventHandler);index!==-1&&eventHandlers.splice(index,1)}__webpack_exports__.a={isBreakpoint:isBreakpoint,onBreakpointChange:onBreakpointChange,offBreakpointChange:offBreakpointChange}}),24:(function(module,exports){module.exports=debounce;function debounce(fn,delay,at_start,guarantee){var timeout,args,self;return function(){if(self=this,args=Array.prototype.slice.call(arguments),timeout&&(at_start||guarantee))return;if(!at_start)return clear(),timeout=setTimeout(run,delay),timeout;timeout=setTimeout(clear,delay),fn.apply(self,args);function run(){clear(),fn.apply(self,args)}function clear(){clearTimeout(timeout),timeout=null}}}}),68:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return DynamicInstagramFeed});var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__),just_debounce__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(24),just_debounce__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(just_debounce__WEBPACK_IMPORTED_MODULE_1__),flickity__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(6),flickity__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(flickity__WEBPACK_IMPORTED_MODULE_2__),_Layout__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(23);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var DynamicInstagramFeed=(function(){function DynamicInstagramFeed2(section){_classCallCheck(this,DynamicInstagramFeed2),this.settings=section.data,this.onboarding=this.settings.onboarding,this.photoCount=this.settings.photo_count,this.accessToken=this.settings.access_token,this.$el=jquery__WEBPACK_IMPORTED_MODULE_0___default()(section.el),this._load()}return _createClass(DynamicInstagramFeed2,[{key:"_load",value:function(){var _this=this;this.$window=jquery__WEBPACK_IMPORTED_MODULE_0___default()(window),this.$photoContainer=this.$el.find("[data-instagram-content]"),this.$ph
1otoContainerPlaceholder=this.$el.find("[data-instagram-photo-placeholder]"),this.$photoTemplate=jquery__WEBPACK_IMPORTED_MODULE_0___default()('<figure class="instagram--photo" data-instagram-photo />'),this._mobileSlider=this._mobileSlider.bind(this),_Layout__WEBPACK_IMPORTED_MODULE_3__.a.onBreakpointChange(this._mobileSlider),this._mobileSlider(),!(this.onboarding||!this.accessToken)&&this._getPhotos().done(function(photos){return _this._renderPhotos(photos)}).fail(function(error){console.warn("Instagram: ".concat(error))})}},{key:"_getPhotos",value:function(){var url="https://api.instagram.com/v1/users/self/media/recent?access_token=".concat(this.accessToken,"&count=").concat(this.photoCount,"&callback="),photoPromise=jquery__WEBPACK_IMPORTED_MODULE_0___default.a.ajax(url,{dataType:"jsonp"});return photoPromise.then(function(response){if(response.meta.code!==200){var error="".concat(response.meta.error_message," (").concat(response.meta.error_type,")");return jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Deferred().reject(error).promise()}return response.data})}},{key:"_renderPhotos",value:function(photos){var _this2=this,photoArray=[],photoIndex=0;photos.forEach(function(photo){photoIndex+=1;var $template=_this2.$photoTemplate.clone(),lowResolution=photo.images.low_resolution,standardResolution=photo.images.standard_resolution,imageURL=lowResolution.url;window.devicePixelRatio>=2&&(imageURL=standardResolution.url);var $link=jquery__WEBPACK_IMPORTED_MODULE_0___default()('<a aria-label="view photo '.concat(photoIndex," by ").concat(photo.user.username,' on instagram" target="_blank" href="').concat(photo.link,'"></a>')),$photo=jquery__WEBPACK_IMPORTED_MODULE_0___default()('\n        <div\n          class="instagram--photo-img"\n          role="img"\n          style="background-image: url('.concat(imageURL,');"\n          aria-label="photo ').concat(photoIndex," by ").concat(photo.user.username,' on instagram"\n        >\n      '));$link.append($photo),$template.append($link),photoArray.push($template)}),this.$photoContainerPlaceholder.fadeOut(function(){_this2._destroyFlickity(),_this2.$photoContainer.append(photoArray),_this2.$photoContainerPlaceholder.remove(),_this2._mobileSlider()})}},{key:"_initFlickity",value:function(){this.flickity=new flickity__WEBPACK_IMPORTED_MODULE_2___default.a(this.$photoContainer[0],{cellSelector:".instagram--photo",contain:!0,freeScroll:!0,percentPosition:!1,prevNextButtons:!1,pageDots:!1,setGallerySize:!1}),this._bindSlider()}},{key:"_destroyFlickity",value:function(){this.flickity&&(this.$window.off(".instagram-feed"),this.$ph
1otoContainer.off(".instagram-feed"),this.flickity.destroy(),this.flickity=null)}},{key:"_mobileSlider",value:function(){if(_Layout__WEBPACK_IMPORTED_MODULE_3__.a.isBreakpoint("L")||_Layout__WEBPACK_IMPORTED_MODULE_3__.a.isBreakpoint("M")){this._destroyFlickity();return}this.flickity||this._initFlickity()}},{key:"_bindSlider",value:function(){var _this3=this,$slider=this.$photoContainer.find(".flickity-slider");this.$window.on("resize.instagram-feed",just_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function(){_this3.$photoContainer.trigger("heightUpdate.instagram-feed")})),this.flickity.on("cellSelect",function(){_this3.$photoContainer.trigger("heightUpdate.instagram-feed")}),this.$photoContainer.on("heightUpdate.instagram-feed",function(){_this3.flickity&&$slider.height(Math.ceil(_this3.flickity.maxCellHeight))}),this.$photoContainer.trigger("heightUpdate.instagram-feed")}}]),DynamicInstagramFeed2})()})}]);
2//# sourceMappingURL=/cdn/shop/t/22/assets/DynamicInstagramFeed.bundle.js.map?v=159581208799061571931759165399

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.