PageSourceSearch

https://www.rijksmuseum.nl/statics/generated/visitor-journey-carousel.4c9c17b0d0a684190065.js

js rijksmuseum.nl collected 2026-09-24 07:50:25 UTC 10,309 bytes, 2 lines download raw bytes

1/*! For license information please see visitor-journey-carousel.4c9c17b0d0a684190065.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3823,9897],{8662:function(t,e,i){i.r(e),i.d(e,{SLIDE_TIME_MILLISECONDS:function(){return c},START_PLAYING_VISIBLE_RATIO:function(){return u}});i(29305),i(32733),i(26437),i(52697),i(78557),i(90076),i(23630);var o=i(41827),n=i(44899);function r(){var t,e,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",n=i.toStringTag||"@@toStringTag";function a(i,o,n,r){var a=o&&o.prototype instanceof u?o:u,c=Object.create(a.prototype);return s(c,"_invoke",function(i,o,n){var r,s,a,u=0,c=n||[],h=!1,d={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,i){return r=e,s=0,a=t,d.n=i,l}};function f(i,o){for(s=i,a=o,e=0;!h&&u&&!n&&e<c.length;e++){var n,r=c[e],f=d.p,p=r[2];i>3?(n=p===o)&&(a=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=f&&((n=i<2&&f<r[1])?(s=0,d.v=o,d.n=r[1]):f<p&&(n=i<3||r[0]>o||o>p)&&(r[4]=i,r[5]=o,d.n=p,s=0))}if(n||i>1)return l;throw h=!0,o}return function(n,c,p){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&f(c,p),s=c,a=p;(e=s<2?t:a)||!h;){r||(s?s<3?(s>1&&(d.n=-1),f(s,a)):d.n=a:d.v=a);try{if(u=2,r){if(s||(n="next"),e=r[n]){if(!(e=e.call(r,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(a=TypeError("The iterator does not provide a '"+n+"' method"),s=1);r=t}else if((e=(h=d.n<0)?a:i.call(o,d))!==l)break}catch(e){r=t,s=1,a=e}finally{u=1}}return{value:e,done:h}}}(i,n,r),!0),c}var l={};function u(){}function c(){}function h(){}e=Object.getPrototypeOf;var d=[][o]?e(e([][o]())):(s(e={},o,function(){return this}),e),f=h.prototype=u.prototype=Object.create(d);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=h,s(f,"constructor",h),s(h,"constructor",c),c.displayName="GeneratorFunction",s(h,n,"GeneratorFunction"),s(f),s(f,n,"Generator"),s(f,o,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:p}})()}function s(t,e,i,o){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}s=function(t,e,i,o){function r(e,i){s(t,e,function(t){return this._invoke(e,i,t)})}e?n?n(t,e,{value:i,enumerable:!o,configurable:!o,writable:!o}):t[e]=i:(r("next",0),r("throw",1),r("return",2))},s(t,e,i,o)}function a(t,e,i,o,n,r,s){try{var a=t[r](s),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(o,n)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}var u=.8,c=4e3,h=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).slideIndex=0,e.observer=void 0,e.isPlaying=!1,e.inactivityTimer=0,e.automaticSlidingTimer=0,e.slideTimeRemaining=0,e.slideTimeRemainingUpdatorInterval=0,e.touchStartAmount=void 0,e.touchMoveAmount=void 0,e.moveAmount=void 0,e.carouselWidth=0,e.isDesktopQuery=window.matchMedia("only screen and (min-width: 80rem)"),e.isDesktop=e.isDesktopQuery.matches,e}var i,o;o=t,(i=e).prototype=Object.create(o.prototype),i.prototype.constructor=i,l(i,o);var n=e.prototype;return n.mounted=function(){var t=this;this.observer=new window.IntersectionObserver(this.onEntry.bind(this),{threshold:u}),this.observer.observe(this.$refs.carousel),this.$refs.carousel.addEventListener("touchstart",function(e){t.touchStart(e)}),this.$refs.carousel.addEventListener("touchmove",function(e){t.touchMove(e)}),this.$refs.carousel.addEventListener("touchend",function(e){t.touchEnd(e)}),window.addEventListener("resize",this.onResize),this.onResize()},n.beforeDestroy=function(){window.removeEventListener("resize",this.onResize)},n.onResize=function(){this.isDesktop=this.isDesktopQuery.matches,this.carouselWidth=this.$refs.carousel.scrollWidth},n.onEntry=function(t){var e=this;t.forEach(function(t){t.isIntersecting&&void 0!==e.observer&&t.intersectionRatio>u?e.isPlaying=!0:e.isPlaying=!1,e.handleAutoMoveToNextSlide()})},n.handleAutoMoveToNextSlide=function(t){var e=this;void 0===t&&(t=!0),this.clearTimers(),this.isPlaying&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(t&&(this.slideTimeRemaining=1),this.slideTimeRemainingUpdatorInterval=setInterval(function(){e.slideTimeRemaining-=50/c},50),this.automaticSlidingTimer=window.setTimeout(function(){e.handleAutoMoveToNextSlide(),e.nextSlide()},c*this.slideTimeRemaining))},n.nextSlide=function(t){t&&this.handlePausePlaying(t),this.slideIndex<this.amount-1?this.slideIndex+=1:this.slideIndex=0,this.handleAutoMoveToNextSlide()},n.previousSlide=function(t){t&&this.handlePausePlaying(t),this.slideIndex>0?this.slideIndex-=1:this.slideIndex=this.amount-1,this.handleAutoMoveToNextSlide()},n.playPauseCarousel=function(){this.isPlaying=!this.isPlaying,this.handleAutoMoveToNextSlide()},n.onClickCarousel=function(t){this.handlePausePlaying(t)},n.handlePausePlaying=function(t){var e=this;if(t instanceof KeyboardEvent){var i=t.key.toLowerCase();if("enter"!==i&&"space"!==i&&" "!==i)return}this.playPauseCarousel(),this.inactivityTimer=window.setTimeout(function(){e.isPlaying=!0,e.handleAutoMoveToNextSlide()},1e4)},n.touchStart=function(t){this.touchStartAmount=t.touches[0].pageX},n.touchMove=function(t){this.touchMoveAmount=t.touches[0].pageX,this.touchStartAmount&&this.touchMoveAmount&&(this.moveAmount=this.touchStartAmount-this.touchMoveAmount)},n.touchEnd=function(t){this.moveAmount&&this.moveAmount>40?(this.clearTimers(),this.slideTimeRemaining=1,this.nextSlide(t)):this.moveAmount&&this.moveAmount<-40&&(this.clearTimers(),this.slideTimeRemaining=1,this.previousSlide(t)),this.moveAmount=void 0},n.lazyLoadSlide=function(t){return this.slideIndex===t||this.slideIndex+1===t||this.slideIndex-1===t||this.slideIndex+1===this.amount&&0===t||0===this.slideIndex&&t+1===this.amount},n.handleKeyUp=function(){var t,e=(t=r().m(function t(e){var i,o,n;return r().w(function(t){for(;;)switch(t.n){case 0:if("arrowleft"===(i=e.key.toLowerCase())||"arrowright"===i){t.n=1;break}return t.a(2);case 1:return"arrowleft"===i?(this.clearTimers(),this.handlePausePlaying(),this.previousSlide()):"arrowright"===i&&(this.clearTimers(),this.handlePausePlaying(),this.nextSlide()),t.n=2,this.$nextTick();case 2:o=document,(n=o.activeElement)instanceof HTMLElement&&-1===n.tabIndex&&this.$refs.carousel.focus();case 3:return t.a(2)}},t,this)}),function(){var e=this,i=arguments;return new Promise(function(o,n){var r=t.apply(e,i);
2function s(t){a(r,o,n,s,l,"next",t)}function l(t){a(r,o,n,s,l,"throw",t)}s(void 0)})});return function(t){return e.apply(this,arguments)}}(),n.clearTimers=function(){clearTimeout(this.automaticSlidingTimer),clearTimeout(this.inactivityTimer),clearInterval(this.slideTimeRemainingUpdatorInterval)},e}(n.Vue);(0,o.Cg)([(0,n.Prop)()],h.prototype,"amount",void 0),h=(0,o.Cg)([(0,n.Component)({filters:{clippedString:function(t){var e=window.matchMedia("only screen and (max-width: 35.5625rem)").matches?85:115;return t.length>e?t.substr(0,e-1)+"...":t}}})],h),e.default=h},81522:function(t,e,i){i.r(e),i.d(e,{default:function(){return u}});i(52697);var o=i(41827),n=i(44899),r=i(8662);i(51908);function s(t,e){var i=t.constructor,o=i.super;if(o&&o.options&&o.options.methods){var n=o.options.methods[e];if("function"==typeof n){for(var r=arguments.length,s=new Array(r>2?r-2:0),a=2;a<r;a++)s[a-2]=arguments[a];return n.apply(t,s)}console.warn("[callSuper]: Method '"+e+"' does not exist on super class")}else console.warn("[callSuper]: No super class or methods found for "+i.name)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var l=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).startHorizontalScrollPos=0,e.horizontalScrollPosition=0,e.horizontalScrollEndPos=0,e}var i,o;o=t,(i=e).prototype=Object.create(o.prototype),i.prototype.constructor=i,a(i,o);var n=e.prototype;return n.mounted=function(){window.addEventListener("scroll",this.onScroll)},n.beforeDestroy=function(){window.removeEventListener("scroll",this.onScroll)},n.onResize=function(){s(this,"onResize"),this.isDesktop&&(this.startHorizontalScrollPos=this.$refs.carouselWrapper.getBoundingClientRect().top+window.pageYOffset,this.horizontalScrollEndPos=-this.$refs.carousel.scrollWidth+window.innerWidth,this.onScroll())},n.onScroll=function(){this.isDesktop&&(this.horizontalScrollPosition=Math.max(this.horizontalScrollEndPos,Math.min(0,this.startHorizontalScrollPos-window.pageYOffset)))},n.handleAutoMoveToNextSlide=function(t){void 0===t&&(t=!0),this.isDesktop||s(this,"handleAutoMoveToNextSlide",t)},n.onClickCarousel=function(t){if(s(this,"onClickCarousel",t),!this.isDesktop){var e=Math.abs(this.$refs.carouselWrapper.getBoundingClientRect().bottom-t.clientY)<100;t.clientX<window.innerWidth/4&&!e&&this.previousSlide(),t.clientX>3*window.innerWidth/4&&!e&&this.nextSlide()}},n.handlePausePlaying=function(){},n.touchStart=function(t){s(this,"touchStart",t),this.isDesktop||this.clearTimers()},n.touchEnd=function(t){s(this,"touchEnd",t),this.isDesktop||this.handleAutoMoveToNextSlide(!1)},n.lazyLoadSlide=function(t){return!!this.isDesktop||s(this,"lazyLoadSlide",t)},n.horizontalScrollPositionChanged=function(){this.$refs.carouselWrapper.style.setProperty("--visitor-journey-scroll-position",""+this.horizontalScrollPosition)},n.horizontalScrollEndPosChanged=function(){this.$refs.carouselWrapper.style.setProperty("--visitor-journey-end-scroll-position",""+this.horizontalScrollEndPos)},n.carouselWidthChanged=function(){this.$refs.carouselWrapper.style.setProperty("--carousel-width",this.carouselWidth+"px")},n.slideTimeRemainingChanged=function(){this.$refs.carouselWrapper.style.setProperty("--slide-time-remaining",""+this.slideTimeRemaining)},e}((0,n.Mixins)(r.default));(0,o.Cg)([(0,n.Watch)("horizontalScrollPosition")],l.prototype,"horizontalScrollPositionChanged",null),(0,o.Cg)([(0,n.Watch)("horizontalScrollEndPos")],l.prototype,"horizontalScrollEndPosChanged",null),(0,o.Cg)([(0,n.Watch)("carouselWidth")],l.prototype,"carouselWidthChanged",null),(0,o.Cg)([(0,n.Watch)("slideTimeRemaining")],l.prototype,"slideTimeRemainingChanged",null);var u=l=(0,o.Cg)([n.Component],l)}}]);

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.