{"version":3,"file":"scripts.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC//KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACptBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl8FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACv2BA;AACA;AACA;AACA;AACA;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrpBA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://cubiclefugitive/./.yarn/__virtual__/@fancyapps-fancybox-virtual-b0907576e4/0/cache/@fancyapps-fancybox-npm-3.5.7-d46fb53d3c-cf0850cf26.zip/node_modules/@fancyapps/fancybox/dist/jquery.fancybox.js","webpack://cubiclefugitive/./Scripts/src/master.js","webpack://cubiclefugitive/./Scripts/src/mobile-menu.js","webpack://cubiclefugitive/./Styles/styles.js","webpack://cubiclefugitive/./Styles/src/_animations.scss","webpack://cubiclefugitive/./Styles/src/_global.scss","webpack://cubiclefugitive/./Styles/src/_home.scss","webpack://cubiclefugitive/./Styles/src/_navigation.scss","webpack://cubiclefugitive/./Styles/src/_print.scss","webpack://cubiclefugitive/./Styles/src/_responsive.scss","webpack://cubiclefugitive/./Styles/src/_sf-editor-overrides.scss","webpack://cubiclefugitive/./.yarn/__virtual__/slick-carousel-virtual-55fb1c85fd/0/cache/slick-carousel-npm-1.8.1-8382d373c2-e8c9c9a454.zip/node_modules/slick-carousel/slick/slick.js","webpack://cubiclefugitive/./.yarn/cache/jquery-backstretch-npm-2.1.18-cb47c26877-e138ddd6b9.zip/node_modules/jquery-backstretch/jquery.backstretch.js","webpack://cubiclefugitive/./.yarn/cache/jquery-lazy-npm-1.7.11-4fb6a8234b-050c5c77d8.zip/node_modules/jquery-lazy/jquery.lazy.js","webpack://cubiclefugitive/./.yarn/cache/jquery-popup-overlay-npm-2.1.5-b87afb9c55-8927eab747.zip/node_modules/jquery-popup-overlay/index.js","webpack://cubiclefugitive/./.yarn/cache/jquery-popup-overlay-npm-2.1.5-b87afb9c55-8927eab747.zip/node_modules/jquery-popup-overlay/jquery.popupoverlay.js","webpack://cubiclefugitive/./.yarn/cache/jquery-ui-npm-1.13.2-7a757aa85c-a7895115cb.zip/node_modules/jquery-ui/ui/focusable.js","webpack://cubiclefugitive/./.yarn/cache/jquery-ui-npm-1.13.2-7a757aa85c-a7895115cb.zip/node_modules/jquery-ui/ui/tabbable.js","webpack://cubiclefugitive/./.yarn/cache/jquery-ui-npm-1.13.2-7a757aa85c-a7895115cb.zip/node_modules/jquery-ui/ui/unique-id.js","webpack://cubiclefugitive/./.yarn/cache/jquery-ui-npm-1.13.2-7a757aa85c-a7895115cb.zip/node_modules/jquery-ui/ui/version.js","webpack://cubiclefugitive/./.yarn/cache/jquery.cookie-npm-1.4.1-e006b4cd39-5ab9015704.zip/node_modules/jquery.cookie/jquery.cookie.js","webpack://cubiclefugitive/./.yarn/cache/parallax-js-npm-3.1.0-cb9726a07f-16344d31d6.zip/node_modules/parallax-js/dist/parallax.js","webpack://cubiclefugitive/./.yarn/cache/waypoints-npm-4.0.1-ab29afe19d-386943ba74.zip/node_modules/waypoints/lib/jquery.waypoints.js","webpack://cubiclefugitive/external var \"jQuery\"","webpack://cubiclefugitive/webpack/bootstrap","webpack://cubiclefugitive/webpack/runtime/compat get default export","webpack://cubiclefugitive/webpack/runtime/define property getters","webpack://cubiclefugitive/webpack/runtime/global","webpack://cubiclefugitive/webpack/runtime/hasOwnProperty shorthand","webpack://cubiclefugitive/webpack/runtime/make namespace object","webpack://cubiclefugitive/./Scripts/scripts.js"],"sourcesContent":["// ==================================================\n// fancyBox v3.5.7\n//\n// Licensed GPLv3 for open source use\n// or fancyBox Commercial License for commercial use\n//\n// http://fancyapps.com/fancybox/\n// Copyright 2019 fancyApps\n//\n// ==================================================\n(function (window, document, $, undefined) {\r\n \"use strict\";\r\n\r\n window.console = window.console || {\r\n info: function (stuff) {}\r\n };\r\n\r\n // If there's no jQuery, fancyBox can't work\r\n // =========================================\r\n\r\n if (!$) {\r\n return;\r\n }\r\n\r\n // Check if fancyBox is already initialized\r\n // ========================================\r\n\r\n if ($.fn.fancybox) {\r\n console.info(\"fancyBox already initialized\");\r\n\r\n return;\r\n }\r\n\r\n // Private default settings\r\n // ========================\r\n\r\n var defaults = {\r\n // Close existing modals\r\n // Set this to false if you do not need to stack multiple instances\r\n closeExisting: false,\r\n\r\n // Enable infinite gallery navigation\r\n loop: false,\r\n\r\n // Horizontal space between slides\r\n gutter: 50,\r\n\r\n // Enable keyboard navigation\r\n keyboard: true,\r\n\r\n // Should allow caption to overlap the content\r\n preventCaptionOverlap: true,\r\n\r\n // Should display navigation arrows at the screen edges\r\n arrows: true,\r\n\r\n // Should display counter at the top left corner\r\n infobar: true,\r\n\r\n // Should display close button (using `btnTpl.smallBtn` template) over the content\r\n // Can be true, false, \"auto\"\r\n // If \"auto\" - will be automatically enabled for \"html\", \"inline\" or \"ajax\" items\r\n smallBtn: \"auto\",\r\n\r\n // Should display toolbar (buttons at the top)\r\n // Can be true, false, \"auto\"\r\n // If \"auto\" - will be automatically hidden if \"smallBtn\" is enabled\r\n toolbar: \"auto\",\r\n\r\n // What buttons should appear in the top right corner.\r\n // Buttons will be created using templates from `btnTpl` option\r\n // and they will be placed into toolbar (class=\"fancybox-toolbar\"` element)\r\n buttons: [\r\n \"zoom\",\r\n //\"share\",\r\n \"slideShow\",\r\n //\"fullScreen\",\r\n //\"download\",\r\n \"thumbs\",\r\n \"close\"\r\n ],\r\n\r\n // Detect \"idle\" time in seconds\r\n idleTime: 3,\r\n\r\n // Disable right-click and use simple image protection for images\r\n protect: false,\r\n\r\n // Shortcut to make content \"modal\" - disable keyboard navigtion, hide buttons, etc\r\n modal: false,\r\n\r\n image: {\r\n // Wait for images to load before displaying\r\n // true - wait for image to load and then display;\r\n // false - display thumbnail and load the full-sized image over top,\r\n // requires predefined image dimensions (`data-width` and `data-height` attributes)\r\n preload: false\r\n },\r\n\r\n ajax: {\r\n // Object containing settings for ajax request\r\n settings: {\r\n // This helps to indicate that request comes from the modal\r\n // Feel free to change naming\r\n data: {\r\n fancybox: true\r\n }\r\n }\r\n },\r\n\r\n iframe: {\r\n // Iframe template\r\n tpl: '<iframe id=\"fancybox-frame{rnd}\" name=\"fancybox-frame{rnd}\" class=\"fancybox-iframe\" allowfullscreen=\"allowfullscreen\" allow=\"autoplay; fullscreen\" src=\"\"></iframe>',\r\n\r\n // Preload iframe before displaying it\r\n // This allows to calculate iframe content width and height\r\n // (note: Due to \"Same Origin Policy\", you can't get cross domain data).\r\n preload: true,\r\n\r\n // Custom CSS styling for iframe wrapping element\r\n // You can use this to set custom iframe dimensions\r\n css: {},\r\n\r\n // Iframe tag attributes\r\n attr: {\r\n scrolling: \"auto\"\r\n }\r\n },\r\n\r\n // For HTML5 video only\r\n video: {\r\n tpl: '<video class=\"fancybox-video\" controls controlsList=\"nodownload\" poster=\"{{poster}}\">' +\r\n '<source src=\"{{src}}\" type=\"{{format}}\" />' +\r\n 'Sorry, your browser doesn\\'t support embedded videos, <a href=\"{{src}}\">download</a> and watch with your favorite video player!' +\r\n \"</video>\",\r\n format: \"\", // custom video format\r\n autoStart: true\r\n },\r\n\r\n // Default content type if cannot be detected automatically\r\n defaultType: \"image\",\r\n\r\n // Open/close animation type\r\n // Possible values:\r\n // false - disable\r\n // \"zoom\" - zoom images from/to thumbnail\r\n // \"fade\"\r\n // \"zoom-in-out\"\r\n //\r\n animationEffect: \"zoom\",\r\n\r\n // Duration in ms for open/close animation\r\n animationDuration: 366,\r\n\r\n // Should image change opacity while zooming\r\n // If opacity is \"auto\", then opacity will be changed if image and thumbnail have different aspect ratios\r\n zoomOpacity: \"auto\",\r\n\r\n // Transition effect between slides\r\n //\r\n // Possible values:\r\n // false - disable\r\n // \"fade'\r\n // \"slide'\r\n // \"circular'\r\n // \"tube'\r\n // \"zoom-in-out'\r\n // \"rotate'\r\n //\r\n transitionEffect: \"fade\",\r\n\r\n // Duration in ms for transition animation\r\n transitionDuration: 366,\r\n\r\n // Custom CSS class for slide element\r\n slideClass: \"\",\r\n\r\n // Custom CSS class for layout\r\n baseClass: \"\",\r\n\r\n // Base template for layout\r\n baseTpl: '<div class=\"fancybox-container\" role=\"dialog\" tabindex=\"-1\">' +\r\n '<div class=\"fancybox-bg\"></div>' +\r\n '<div class=\"fancybox-inner\">' +\r\n '<div class=\"fancybox-infobar\"><span data-fancybox-index></span> / <span data-fancybox-count></span></div>' +\r\n '<div class=\"fancybox-toolbar\">{{buttons}}</div>' +\r\n '<div class=\"fancybox-navigation\">{{arrows}}</div>' +\r\n '<div class=\"fancybox-stage\"></div>' +\r\n '<div class=\"fancybox-caption\"><div class=\"fancybox-caption__body\"></div></div>' +\r\n \"</div>\" +\r\n \"</div>\",\r\n\r\n // Loading indicator template\r\n spinnerTpl: '<div class=\"fancybox-loading\"></div>',\r\n\r\n // Error message template\r\n errorTpl: '<div class=\"fancybox-error\"><p>{{ERROR}}</p></div>',\r\n\r\n btnTpl: {\r\n download: '<a download data-fancybox-download class=\"fancybox-button fancybox-button--download\" title=\"{{DOWNLOAD}}\" href=\"javascript:;\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z\"/></svg>' +\r\n \"</a>\",\r\n\r\n zoom: '<button data-fancybox-zoom class=\"fancybox-button fancybox-button--zoom\" title=\"{{ZOOM}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z\"/></svg>' +\r\n \"</button>\",\r\n\r\n close: '<button data-fancybox-close class=\"fancybox-button fancybox-button--close\" title=\"{{CLOSE}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z\"/></svg>' +\r\n \"</button>\",\r\n\r\n // Arrows\r\n arrowLeft: '<button data-fancybox-prev class=\"fancybox-button fancybox-button--arrow_left\" title=\"{{PREV}}\">' +\r\n '<div><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z\"/></svg></div>' +\r\n \"</button>\",\r\n\r\n arrowRight: '<button data-fancybox-next class=\"fancybox-button fancybox-button--arrow_right\" title=\"{{NEXT}}\">' +\r\n '<div><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z\"/></svg></div>' +\r\n \"</button>\",\r\n\r\n // This small close button will be appended to your html/inline/ajax content by default,\r\n // if \"smallBtn\" option is not set to false\r\n smallBtn: '<button type=\"button\" data-fancybox-close class=\"fancybox-button fancybox-close-small\" title=\"{{CLOSE}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1\" viewBox=\"0 0 24 24\"><path d=\"M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z\"/></svg>' +\r\n \"</button>\"\r\n },\r\n\r\n // Container is injected into this element\r\n parentEl: \"body\",\r\n\r\n // Hide browser vertical scrollbars; use at your own risk\r\n hideScrollbar: true,\r\n\r\n // Focus handling\r\n // ==============\r\n\r\n // Try to focus on the first focusable element after opening\r\n autoFocus: true,\r\n\r\n // Put focus back to active element after closing\r\n backFocus: true,\r\n\r\n // Do not let user to focus on element outside modal content\r\n trapFocus: true,\r\n\r\n // Module specific options\r\n // =======================\r\n\r\n fullScreen: {\r\n autoStart: false\r\n },\r\n\r\n // Set `touch: false` to disable panning/swiping\r\n touch: {\r\n vertical: true, // Allow to drag content vertically\r\n momentum: true // Continue movement after releasing mouse/touch when panning\r\n },\r\n\r\n // Hash value when initializing manually,\r\n // set `false` to disable hash change\r\n hash: null,\r\n\r\n // Customize or add new media types\r\n // Example:\r\n /*\r\n media : {\r\n youtube : {\r\n params : {\r\n autoplay : 0\r\n }\r\n }\r\n }\r\n */\r\n media: {},\r\n\r\n slideShow: {\r\n autoStart: false,\r\n speed: 3000\r\n },\r\n\r\n thumbs: {\r\n autoStart: false, // Display thumbnails on opening\r\n hideOnClose: true, // Hide thumbnail grid when closing animation starts\r\n parentEl: \".fancybox-container\", // Container is injected into this element\r\n axis: \"y\" // Vertical (y) or horizontal (x) scrolling\r\n },\r\n\r\n // Use mousewheel to navigate gallery\r\n // If 'auto' - enabled for images only\r\n wheel: \"auto\",\r\n\r\n // Callbacks\r\n //==========\r\n\r\n // See Documentation/API/Events for more information\r\n // Example:\r\n /*\r\n afterShow: function( instance, current ) {\r\n console.info( 'Clicked element:' );\r\n console.info( current.opts.$orig );\r\n }\r\n */\r\n\r\n onInit: $.noop, // When instance has been initialized\r\n\r\n beforeLoad: $.noop, // Before the content of a slide is being loaded\r\n afterLoad: $.noop, // When the content of a slide is done loading\r\n\r\n beforeShow: $.noop, // Before open animation starts\r\n afterShow: $.noop, // When content is done loading and animating\r\n\r\n beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close.\r\n afterClose: $.noop, // After instance has been closed\r\n\r\n onActivate: $.noop, // When instance is brought to front\r\n onDeactivate: $.noop, // When other instance has been activated\r\n\r\n // Interaction\r\n // ===========\r\n\r\n // Use options below to customize taken action when user clicks or double clicks on the fancyBox area,\r\n // each option can be string or method that returns value.\r\n //\r\n // Possible values:\r\n // \"close\" - close instance\r\n // \"next\" - move to next gallery item\r\n // \"nextOrClose\" - move to next gallery item or close if gallery has only one item\r\n // \"toggleControls\" - show/hide controls\r\n // \"zoom\" - zoom image (if loaded)\r\n // false - do nothing\r\n\r\n // Clicked on the content\r\n clickContent: function (current, event) {\r\n return current.type === \"image\" ? \"zoom\" : false;\r\n },\r\n\r\n // Clicked on the slide\r\n clickSlide: \"close\",\r\n\r\n // Clicked on the background (backdrop) element;\r\n // if you have not changed the layout, then most likely you need to use `clickSlide` option\r\n clickOutside: \"close\",\r\n\r\n // Same as previous two, but for double click\r\n dblclickContent: false,\r\n dblclickSlide: false,\r\n dblclickOutside: false,\r\n\r\n // Custom options when mobile device is detected\r\n // =============================================\r\n\r\n mobile: {\r\n preventCaptionOverlap: false,\r\n idleTime: false,\r\n clickContent: function (current, event) {\r\n return current.type === \"image\" ? \"toggleControls\" : false;\r\n },\r\n clickSlide: function (current, event) {\r\n return current.type === \"image\" ? \"toggleControls\" : \"close\";\r\n },\r\n dblclickContent: function (current, event) {\r\n return current.type === \"image\" ? \"zoom\" : false;\r\n },\r\n dblclickSlide: function (current, event) {\r\n return current.type === \"image\" ? \"zoom\" : false;\r\n }\r\n },\r\n\r\n // Internationalization\r\n // ====================\r\n\r\n lang: \"en\",\r\n i18n: {\r\n en: {\r\n CLOSE: \"Close\",\r\n NEXT: \"Next\",\r\n PREV: \"Previous\",\r\n ERROR: \"The requested content cannot be loaded. <br/> Please try again later.\",\r\n PLAY_START: \"Start slideshow\",\r\n PLAY_STOP: \"Pause slideshow\",\r\n FULL_SCREEN: \"Full screen\",\r\n THUMBS: \"Thumbnails\",\r\n DOWNLOAD: \"Download\",\r\n SHARE: \"Share\",\r\n ZOOM: \"Zoom\"\r\n },\r\n de: {\r\n CLOSE: \"Schließen\",\r\n NEXT: \"Weiter\",\r\n PREV: \"Zurück\",\r\n ERROR: \"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.\",\r\n PLAY_START: \"Diaschau starten\",\r\n PLAY_STOP: \"Diaschau beenden\",\r\n FULL_SCREEN: \"Vollbild\",\r\n THUMBS: \"Vorschaubilder\",\r\n DOWNLOAD: \"Herunterladen\",\r\n SHARE: \"Teilen\",\r\n ZOOM: \"Vergrößern\"\r\n }\r\n }\r\n };\r\n\r\n // Few useful variables and methods\r\n // ================================\r\n\r\n var $W = $(window);\r\n var $D = $(document);\r\n\r\n var called = 0;\r\n\r\n // Check if an object is a jQuery object and not a native JavaScript object\r\n // ========================================================================\r\n var isQuery = function (obj) {\r\n return obj && obj.hasOwnProperty && obj instanceof $;\r\n };\r\n\r\n // Handle multiple browsers for \"requestAnimationFrame\" and \"cancelAnimationFrame\"\r\n // ===============================================================================\r\n var requestAFrame = (function () {\r\n return (\r\n window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.oRequestAnimationFrame ||\r\n // if all else fails, use setTimeout\r\n function (callback) {\r\n return window.setTimeout(callback, 1000 / 60);\r\n }\r\n );\r\n })();\r\n\r\n var cancelAFrame = (function () {\r\n return (\r\n window.cancelAnimationFrame ||\r\n window.webkitCancelAnimationFrame ||\r\n window.mozCancelAnimationFrame ||\r\n window.oCancelAnimationFrame ||\r\n function (id) {\r\n window.clearTimeout(id);\r\n }\r\n );\r\n })();\r\n\r\n // Detect the supported transition-end event property name\r\n // =======================================================\r\n var transitionEnd = (function () {\r\n var el = document.createElement(\"fakeelement\"),\r\n t;\r\n\r\n var transitions = {\r\n transition: \"transitionend\",\r\n OTransition: \"oTransitionEnd\",\r\n MozTransition: \"transitionend\",\r\n WebkitTransition: \"webkitTransitionEnd\"\r\n };\r\n\r\n for (t in transitions) {\r\n if (el.style[t] !== undefined) {\r\n return transitions[t];\r\n }\r\n }\r\n\r\n return \"transitionend\";\r\n })();\r\n\r\n // Force redraw on an element.\r\n // This helps in cases where the browser doesn't redraw an updated element properly\r\n // ================================================================================\r\n var forceRedraw = function ($el) {\r\n return $el && $el.length && $el[0].offsetHeight;\r\n };\r\n\r\n // Exclude array (`buttons`) options from deep merging\r\n // ===================================================\r\n var mergeOpts = function (opts1, opts2) {\r\n var rez = $.extend(true, {}, opts1, opts2);\r\n\r\n $.each(opts2, function (key, value) {\r\n if ($.isArray(value)) {\r\n rez[key] = value;\r\n }\r\n });\r\n\r\n return rez;\r\n };\r\n\r\n // How much of an element is visible in viewport\r\n // =============================================\r\n\r\n var inViewport = function (elem) {\r\n var elemCenter, rez;\r\n\r\n if (!elem || elem.ownerDocument !== document) {\r\n return false;\r\n }\r\n\r\n $(\".fancybox-container\").css(\"pointer-events\", \"none\");\r\n\r\n elemCenter = {\r\n x: elem.getBoundingClientRect().left + elem.offsetWidth / 2,\r\n y: elem.getBoundingClientRect().top + elem.offsetHeight / 2\r\n };\r\n\r\n rez = document.elementFromPoint(elemCenter.x, elemCenter.y) === elem;\r\n\r\n $(\".fancybox-container\").css(\"pointer-events\", \"\");\r\n\r\n return rez;\r\n };\r\n\r\n // Class definition\r\n // ================\r\n\r\n var FancyBox = function (content, opts, index) {\r\n var self = this;\r\n\r\n self.opts = mergeOpts({\r\n index: index\r\n }, $.fancybox.defaults);\r\n\r\n if ($.isPlainObject(opts)) {\r\n self.opts = mergeOpts(self.opts, opts);\r\n }\r\n\r\n if ($.fancybox.isMobile) {\r\n self.opts = mergeOpts(self.opts, self.opts.mobile);\r\n }\r\n\r\n self.id = self.opts.id || ++called;\r\n\r\n self.currIndex = parseInt(self.opts.index, 10) || 0;\r\n self.prevIndex = null;\r\n\r\n self.prevPos = null;\r\n self.currPos = 0;\r\n\r\n self.firstRun = true;\r\n\r\n // All group items\r\n self.group = [];\r\n\r\n // Existing slides (for current, next and previous gallery items)\r\n self.slides = {};\r\n\r\n // Create group elements\r\n self.addContent(content);\r\n\r\n if (!self.group.length) {\r\n return;\r\n }\r\n\r\n self.init();\r\n };\r\n\r\n $.extend(FancyBox.prototype, {\r\n // Create DOM structure\r\n // ====================\r\n\r\n init: function () {\r\n var self = this,\r\n firstItem = self.group[self.currIndex],\r\n firstItemOpts = firstItem.opts,\r\n $container,\r\n buttonStr;\r\n\r\n if (firstItemOpts.closeExisting) {\r\n $.fancybox.close(true);\r\n }\r\n\r\n // Hide scrollbars\r\n // ===============\r\n\r\n $(\"body\").addClass(\"fancybox-active\");\r\n\r\n if (\r\n !$.fancybox.getInstance() &&\r\n firstItemOpts.hideScrollbar !== false &&\r\n !$.fancybox.isMobile &&\r\n document.body.scrollHeight > window.innerHeight\r\n ) {\r\n $(\"head\").append(\r\n '<style id=\"fancybox-style-noscroll\" type=\"text/css\">.compensate-for-scrollbar{margin-right:' +\r\n (window.innerWidth - document.documentElement.clientWidth) +\r\n \"px;}</style>\"\r\n );\r\n\r\n $(\"body\").addClass(\"compensate-for-scrollbar\");\r\n }\r\n\r\n // Build html markup and set references\r\n // ====================================\r\n\r\n // Build html code for buttons and insert into main template\r\n buttonStr = \"\";\r\n\r\n $.each(firstItemOpts.buttons, function (index, value) {\r\n buttonStr += firstItemOpts.btnTpl[value] || \"\";\r\n });\r\n\r\n // Create markup from base template, it will be initially hidden to\r\n // avoid unnecessary work like painting while initializing is not complete\r\n $container = $(\r\n self.translate(\r\n self,\r\n firstItemOpts.baseTpl\r\n .replace(\"{{buttons}}\", buttonStr)\r\n .replace(\"{{arrows}}\", firstItemOpts.btnTpl.arrowLeft + firstItemOpts.btnTpl.arrowRight)\r\n )\r\n )\r\n .attr(\"id\", \"fancybox-container-\" + self.id)\r\n .addClass(firstItemOpts.baseClass)\r\n .data(\"FancyBox\", self)\r\n .appendTo(firstItemOpts.parentEl);\r\n\r\n // Create object holding references to jQuery wrapped nodes\r\n self.$refs = {\r\n container: $container\r\n };\r\n\r\n [\"bg\", \"inner\", \"infobar\", \"toolbar\", \"stage\", \"caption\", \"navigation\"].forEach(function (item) {\r\n self.$refs[item] = $container.find(\".fancybox-\" + item);\r\n });\r\n\r\n self.trigger(\"onInit\");\r\n\r\n // Enable events, deactive previous instances\r\n self.activate();\r\n\r\n // Build slides, load and reveal content\r\n self.jumpTo(self.currIndex);\r\n },\r\n\r\n // Simple i18n support - replaces object keys found in template\r\n // with corresponding values\r\n // ============================================================\r\n\r\n translate: function (obj, str) {\r\n var arr = obj.opts.i18n[obj.opts.lang] || obj.opts.i18n.en;\r\n\r\n return str.replace(/\\{\\{(\\w+)\\}\\}/g, function (match, n) {\r\n return arr[n] === undefined ? match : arr[n];\r\n });\r\n },\r\n\r\n // Populate current group with fresh content\r\n // Check if each object has valid type and content\r\n // ===============================================\r\n\r\n addContent: function (content) {\r\n var self = this,\r\n items = $.makeArray(content),\r\n thumbs;\r\n\r\n $.each(items, function (i, item) {\r\n var obj = {},\r\n opts = {},\r\n $item,\r\n type,\r\n found,\r\n src,\r\n srcParts;\r\n\r\n // Step 1 - Make sure we have an object\r\n // ====================================\r\n\r\n if ($.isPlainObject(item)) {\r\n // We probably have manual usage here, something like\r\n // $.fancybox.open( [ { src : \"image.jpg\", type : \"image\" } ] )\r\n\r\n obj = item;\r\n opts = item.opts || item;\r\n } else if ($.type(item) === \"object\" && $(item).length) {\r\n // Here we probably have jQuery collection returned by some selector\r\n $item = $(item);\r\n\r\n // Support attributes like `data-options='{\"touch\" : false}'` and `data-touch='false'`\r\n opts = $item.data() || {};\r\n opts = $.extend(true, {}, opts, opts.options);\r\n\r\n // Here we store clicked element\r\n opts.$orig = $item;\r\n\r\n obj.src = self.opts.src || opts.src || $item.attr(\"href\");\r\n\r\n // Assume that simple syntax is used, for example:\r\n // `$.fancybox.open( $(\"#test\"), {} );`\r\n if (!obj.type && !obj.src) {\r\n obj.type = \"inline\";\r\n obj.src = item;\r\n }\r\n } else {\r\n // Assume we have a simple html code, for example:\r\n // $.fancybox.open( '<div><h1>Hi!</h1></div>' );\r\n obj = {\r\n type: \"html\",\r\n src: item + \"\"\r\n };\r\n }\r\n\r\n // Each gallery object has full collection of options\r\n obj.opts = $.extend(true, {}, self.opts, opts);\r\n\r\n // Do not merge buttons array\r\n if ($.isArray(opts.buttons)) {\r\n obj.opts.buttons = opts.buttons;\r\n }\r\n\r\n if ($.fancybox.isMobile && obj.opts.mobile) {\r\n obj.opts = mergeOpts(obj.opts, obj.opts.mobile);\r\n }\r\n\r\n // Step 2 - Make sure we have content type, if not - try to guess\r\n // ==============================================================\r\n\r\n type = obj.type || obj.opts.type;\r\n src = obj.src || \"\";\r\n\r\n if (!type && src) {\r\n if ((found = src.match(/\\.(mp4|mov|ogv|webm)((\\?|#).*)?$/i))) {\r\n type = \"video\";\r\n\r\n if (!obj.opts.video.format) {\r\n obj.opts.video.format = \"video/\" + (found[1] === \"ogv\" ? \"ogg\" : found[1]);\r\n }\r\n } else if (src.match(/(^data:image\\/[a-z0-9+\\/=]*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\\?|#).*)?$)/i)) {\r\n type = \"image\";\r\n } else if (src.match(/\\.(pdf)((\\?|#).*)?$/i)) {\r\n type = \"iframe\";\r\n obj = $.extend(true, obj, {\r\n contentType: \"pdf\",\r\n opts: {\r\n iframe: {\r\n preload: false\r\n }\r\n }\r\n });\r\n } else if (src.charAt(0) === \"#\") {\r\n type = \"inline\";\r\n }\r\n }\r\n\r\n if (type) {\r\n obj.type = type;\r\n } else {\r\n self.trigger(\"objectNeedsType\", obj);\r\n }\r\n\r\n if (!obj.contentType) {\r\n obj.contentType = $.inArray(obj.type, [\"html\", \"inline\", \"ajax\"]) > -1 ? \"html\" : obj.type;\r\n }\r\n\r\n // Step 3 - Some adjustments\r\n // =========================\r\n\r\n obj.index = self.group.length;\r\n\r\n if (obj.opts.smallBtn == \"auto\") {\r\n obj.opts.smallBtn = $.inArray(obj.type, [\"html\", \"inline\", \"ajax\"]) > -1;\r\n }\r\n\r\n if (obj.opts.toolbar === \"auto\") {\r\n obj.opts.toolbar = !obj.opts.smallBtn;\r\n }\r\n\r\n // Find thumbnail image, check if exists and if is in the viewport\r\n obj.$thumb = obj.opts.$thumb || null;\r\n\r\n if (obj.opts.$trigger && obj.index === self.opts.index) {\r\n obj.$thumb = obj.opts.$trigger.find(\"img:first\");\r\n\r\n if (obj.$thumb.length) {\r\n obj.opts.$orig = obj.opts.$trigger;\r\n }\r\n }\r\n\r\n if (!(obj.$thumb && obj.$thumb.length) && obj.opts.$orig) {\r\n obj.$thumb = obj.opts.$orig.find(\"img:first\");\r\n }\r\n\r\n if (obj.$thumb && !obj.$thumb.length) {\r\n obj.$thumb = null;\r\n }\r\n\r\n obj.thumb = obj.opts.thumb || (obj.$thumb ? obj.$thumb[0].src : null);\r\n\r\n // \"caption\" is a \"special\" option, it can be used to customize caption per gallery item\r\n if ($.type(obj.opts.caption) === \"function\") {\r\n obj.opts.caption = obj.opts.caption.apply(item, [self, obj]);\r\n }\r\n\r\n if ($.type(self.opts.caption) === \"function\") {\r\n obj.opts.caption = self.opts.caption.apply(item, [self, obj]);\r\n }\r\n\r\n // Make sure we have caption as a string or jQuery object\r\n if (!(obj.opts.caption instanceof $)) {\r\n obj.opts.caption = obj.opts.caption === undefined ? \"\" : obj.opts.caption + \"\";\r\n }\r\n\r\n // Check if url contains \"filter\" used to filter the content\r\n // Example: \"ajax.html #something\"\r\n if (obj.type === \"ajax\") {\r\n srcParts = src.split(/\\s+/, 2);\r\n\r\n if (srcParts.length > 1) {\r\n obj.src = srcParts.shift();\r\n\r\n obj.opts.filter = srcParts.shift();\r\n }\r\n }\r\n\r\n // Hide all buttons and disable interactivity for modal items\r\n if (obj.opts.modal) {\r\n obj.opts = $.extend(true, obj.opts, {\r\n trapFocus: true,\r\n // Remove buttons\r\n infobar: 0,\r\n toolbar: 0,\r\n\r\n smallBtn: 0,\r\n\r\n // Disable keyboard navigation\r\n keyboard: 0,\r\n\r\n // Disable some modules\r\n slideShow: 0,\r\n fullScreen: 0,\r\n thumbs: 0,\r\n touch: 0,\r\n\r\n // Disable click event handlers\r\n clickContent: false,\r\n clickSlide: false,\r\n clickOutside: false,\r\n dblclickContent: false,\r\n dblclickSlide: false,\r\n dblclickOutside: false\r\n });\r\n }\r\n\r\n // Step 4 - Add processed object to group\r\n // ======================================\r\n\r\n self.group.push(obj);\r\n });\r\n\r\n // Update controls if gallery is already opened\r\n if (Object.keys(self.slides).length) {\r\n self.updateControls();\r\n\r\n // Update thumbnails, if needed\r\n thumbs = self.Thumbs;\r\n\r\n if (thumbs && thumbs.isActive) {\r\n thumbs.create();\r\n\r\n thumbs.focus();\r\n }\r\n }\r\n },\r\n\r\n // Attach an event handler functions for:\r\n // - navigation buttons\r\n // - browser scrolling, resizing;\r\n // - focusing\r\n // - keyboard\r\n // - detecting inactivity\r\n // ======================================\r\n\r\n addEvents: function () {\r\n var self = this;\r\n\r\n self.removeEvents();\r\n\r\n // Make navigation elements clickable\r\n // ==================================\r\n\r\n self.$refs.container\r\n .on(\"click.fb-close\", \"[data-fancybox-close]\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n self.close(e);\r\n })\r\n .on(\"touchstart.fb-prev click.fb-prev\", \"[data-fancybox-prev]\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n self.previous();\r\n })\r\n .on(\"touchstart.fb-next click.fb-next\", \"[data-fancybox-next]\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n self.next();\r\n })\r\n .on(\"click.fb\", \"[data-fancybox-zoom]\", function (e) {\r\n // Click handler for zoom button\r\n self[self.isScaledDown() ? \"scaleToActual\" : \"scaleToFit\"]();\r\n });\r\n\r\n // Handle page scrolling and browser resizing\r\n // ==========================================\r\n\r\n $W.on(\"orientationchange.fb resize.fb\", function (e) {\r\n if (e && e.originalEvent && e.originalEvent.type === \"resize\") {\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n }\r\n\r\n self.requestId = requestAFrame(function () {\r\n self.update(e);\r\n });\r\n } else {\r\n if (self.current && self.current.type === \"iframe\") {\r\n self.$refs.stage.hide();\r\n }\r\n\r\n setTimeout(\r\n function () {\r\n self.$refs.stage.show();\r\n\r\n self.update(e);\r\n },\r\n $.fancybox.isMobile ? 600 : 250\r\n );\r\n }\r\n });\r\n\r\n $D.on(\"keydown.fb\", function (e) {\r\n var instance = $.fancybox ? $.fancybox.getInstance() : null,\r\n current = instance.current,\r\n keycode = e.keyCode || e.which;\r\n\r\n // Trap keyboard focus inside of the modal\r\n // =======================================\r\n\r\n if (keycode == 9) {\r\n if (current.opts.trapFocus) {\r\n self.focus(e);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Enable keyboard navigation\r\n // ==========================\r\n\r\n if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is(\"input,textarea,video,audio,select\")) {\r\n return;\r\n }\r\n\r\n // Backspace and Esc keys\r\n if (keycode === 8 || keycode === 27) {\r\n e.preventDefault();\r\n\r\n self.close(e);\r\n\r\n return;\r\n }\r\n\r\n // Left arrow and Up arrow\r\n if (keycode === 37 || keycode === 38) {\r\n e.preventDefault();\r\n\r\n self.previous();\r\n\r\n return;\r\n }\r\n\r\n // Righ arrow and Down arrow\r\n if (keycode === 39 || keycode === 40) {\r\n e.preventDefault();\r\n\r\n self.next();\r\n\r\n return;\r\n }\r\n\r\n self.trigger(\"afterKeydown\", e, keycode);\r\n });\r\n\r\n // Hide controls after some inactivity period\r\n if (self.group[self.currIndex].opts.idleTime) {\r\n self.idleSecondsCounter = 0;\r\n\r\n $D.on(\r\n \"mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle\",\r\n function (e) {\r\n self.idleSecondsCounter = 0;\r\n\r\n if (self.isIdle) {\r\n self.showControls();\r\n }\r\n\r\n self.isIdle = false;\r\n }\r\n );\r\n\r\n self.idleInterval = window.setInterval(function () {\r\n self.idleSecondsCounter++;\r\n\r\n if (self.idleSecondsCounter >= self.group[self.currIndex].opts.idleTime && !self.isDragging) {\r\n self.isIdle = true;\r\n self.idleSecondsCounter = 0;\r\n\r\n self.hideControls();\r\n }\r\n }, 1000);\r\n }\r\n },\r\n\r\n // Remove events added by the core\r\n // ===============================\r\n\r\n removeEvents: function () {\r\n var self = this;\r\n\r\n $W.off(\"orientationchange.fb resize.fb\");\r\n $D.off(\"keydown.fb .fb-idle\");\r\n\r\n this.$refs.container.off(\".fb-close .fb-prev .fb-next\");\r\n\r\n if (self.idleInterval) {\r\n window.clearInterval(self.idleInterval);\r\n\r\n self.idleInterval = null;\r\n }\r\n },\r\n\r\n // Change to previous gallery item\r\n // ===============================\r\n\r\n previous: function (duration) {\r\n return this.jumpTo(this.currPos - 1, duration);\r\n },\r\n\r\n // Change to next gallery item\r\n // ===========================\r\n\r\n next: function (duration) {\r\n return this.jumpTo(this.currPos + 1, duration);\r\n },\r\n\r\n // Switch to selected gallery item\r\n // ===============================\r\n\r\n jumpTo: function (pos, duration) {\r\n var self = this,\r\n groupLen = self.group.length,\r\n firstRun,\r\n isMoved,\r\n loop,\r\n current,\r\n previous,\r\n slidePos,\r\n stagePos,\r\n prop,\r\n diff;\r\n\r\n if (self.isDragging || self.isClosing || (self.isAnimating && self.firstRun)) {\r\n return;\r\n }\r\n\r\n // Should loop?\r\n pos = parseInt(pos, 10);\r\n loop = self.current ? self.current.opts.loop : self.opts.loop;\r\n\r\n if (!loop && (pos < 0 || pos >= groupLen)) {\r\n return false;\r\n }\r\n\r\n // Check if opening for the first time; this helps to speed things up\r\n firstRun = self.firstRun = !Object.keys(self.slides).length;\r\n\r\n // Create slides\r\n previous = self.current;\r\n\r\n self.prevIndex = self.currIndex;\r\n self.prevPos = self.currPos;\r\n\r\n current = self.createSlide(pos);\r\n\r\n if (groupLen > 1) {\r\n if (loop || current.index < groupLen - 1) {\r\n self.createSlide(pos + 1);\r\n }\r\n\r\n if (loop || current.index > 0) {\r\n self.createSlide(pos - 1);\r\n }\r\n }\r\n\r\n self.current = current;\r\n self.currIndex = current.index;\r\n self.currPos = current.pos;\r\n\r\n self.trigger(\"beforeShow\", firstRun);\r\n\r\n self.updateControls();\r\n\r\n // Validate duration length\r\n current.forcedDuration = undefined;\r\n\r\n if ($.isNumeric(duration)) {\r\n current.forcedDuration = duration;\r\n } else {\r\n duration = current.opts[firstRun ? \"animationDuration\" : \"transitionDuration\"];\r\n }\r\n\r\n duration = parseInt(duration, 10);\r\n\r\n // Check if user has swiped the slides or if still animating\r\n isMoved = self.isMoved(current);\r\n\r\n // Make sure current slide is visible\r\n current.$slide.addClass(\"fancybox-slide--current\");\r\n\r\n // Fresh start - reveal container, current slide and start loading content\r\n if (firstRun) {\r\n if (current.opts.animationEffect && duration) {\r\n self.$refs.container.css(\"transition-duration\", duration + \"ms\");\r\n }\r\n\r\n self.$refs.container.addClass(\"fancybox-is-open\").trigger(\"focus\");\r\n\r\n // Attempt to load content into slide\r\n // This will later call `afterLoad` -> `revealContent`\r\n self.loadSlide(current);\r\n\r\n self.preload(\"image\");\r\n\r\n return;\r\n }\r\n\r\n // Get actual slide/stage positions (before cleaning up)\r\n slidePos = $.fancybox.getTranslate(previous.$slide);\r\n stagePos = $.fancybox.getTranslate(self.$refs.stage);\r\n\r\n // Clean up all slides\r\n $.each(self.slides, function (index, slide) {\r\n $.fancybox.stop(slide.$slide, true);\r\n });\r\n\r\n if (previous.pos !== current.pos) {\r\n previous.isComplete = false;\r\n }\r\n\r\n previous.$slide.removeClass(\"fancybox-slide--complete fancybox-slide--current\");\r\n\r\n // If slides are out of place, then animate them to correct position\r\n if (isMoved) {\r\n // Calculate horizontal swipe distance\r\n diff = slidePos.left - (previous.pos * slidePos.width + previous.pos * previous.opts.gutter);\r\n\r\n $.each(self.slides, function (index, slide) {\r\n slide.$slide.removeClass(\"fancybox-animated\").removeClass(function (index, className) {\r\n return (className.match(/(^|\\s)fancybox-fx-\\S+/g) || []).join(\" \");\r\n });\r\n\r\n // Make sure that each slide is in equal distance\r\n // This is mostly needed for freshly added slides, because they are not yet positioned\r\n var leftPos = slide.pos * slidePos.width + slide.pos * slide.opts.gutter;\r\n\r\n $.fancybox.setTranslate(slide.$slide, {\r\n top: 0,\r\n left: leftPos - stagePos.left + diff\r\n });\r\n\r\n if (slide.pos !== current.pos) {\r\n slide.$slide.addClass(\"fancybox-slide--\" + (slide.pos > current.pos ? \"next\" : \"previous\"));\r\n }\r\n\r\n // Redraw to make sure that transition will start\r\n forceRedraw(slide.$slide);\r\n\r\n // Animate the slide\r\n $.fancybox.animate(\r\n slide.$slide, {\r\n top: 0,\r\n left: (slide.pos - current.pos) * slidePos.width + (slide.pos - current.pos) * slide.opts.gutter\r\n },\r\n duration,\r\n function () {\r\n slide.$slide\r\n .css({\r\n transform: \"\",\r\n opacity: \"\"\r\n })\r\n .removeClass(\"fancybox-slide--next fancybox-slide--previous\");\r\n\r\n if (slide.pos === self.currPos) {\r\n self.complete();\r\n }\r\n }\r\n );\r\n });\r\n } else if (duration && current.opts.transitionEffect) {\r\n // Set transition effect for previously active slide\r\n prop = \"fancybox-animated fancybox-fx-\" + current.opts.transitionEffect;\r\n\r\n previous.$slide.addClass(\"fancybox-slide--\" + (previous.pos > current.pos ? \"next\" : \"previous\"));\r\n\r\n $.fancybox.animate(\r\n previous.$slide,\r\n prop,\r\n duration,\r\n function () {\r\n previous.$slide.removeClass(prop).removeClass(\"fancybox-slide--next fancybox-slide--previous\");\r\n },\r\n false\r\n );\r\n }\r\n\r\n if (current.isLoaded) {\r\n self.revealContent(current);\r\n } else {\r\n self.loadSlide(current);\r\n }\r\n\r\n self.preload(\"image\");\r\n },\r\n\r\n // Create new \"slide\" element\r\n // These are gallery items that are actually added to DOM\r\n // =======================================================\r\n\r\n createSlide: function (pos) {\r\n var self = this,\r\n $slide,\r\n index;\r\n\r\n index = pos % self.group.length;\r\n index = index < 0 ? self.group.length + index : index;\r\n\r\n if (!self.slides[pos] && self.group[index]) {\r\n $slide = $('<div class=\"fancybox-slide\"></div>').appendTo(self.$refs.stage);\r\n\r\n self.slides[pos] = $.extend(true, {}, self.group[index], {\r\n pos: pos,\r\n $slide: $slide,\r\n isLoaded: false\r\n });\r\n\r\n self.updateSlide(self.slides[pos]);\r\n }\r\n\r\n return self.slides[pos];\r\n },\r\n\r\n // Scale image to the actual size of the image;\r\n // x and y values should be relative to the slide\r\n // ==============================================\r\n\r\n scaleToActual: function (x, y, duration) {\r\n var self = this,\r\n current = self.current,\r\n $content = current.$content,\r\n canvasWidth = $.fancybox.getTranslate(current.$slide).width,\r\n canvasHeight = $.fancybox.getTranslate(current.$slide).height,\r\n newImgWidth = current.width,\r\n newImgHeight = current.height,\r\n imgPos,\r\n posX,\r\n posY,\r\n scaleX,\r\n scaleY;\r\n\r\n if (self.isAnimating || self.isMoved() || !$content || !(current.type == \"image\" && current.isLoaded && !current.hasError)) {\r\n return;\r\n }\r\n\r\n self.isAnimating = true;\r\n\r\n $.fancybox.stop($content);\r\n\r\n x = x === undefined ? canvasWidth * 0.5 : x;\r\n y = y === undefined ? canvasHeight * 0.5 : y;\r\n\r\n imgPos = $.fancybox.getTranslate($content);\r\n\r\n imgPos.top -= $.fancybox.getTranslate(current.$slide).top;\r\n imgPos.left -= $.fancybox.getTranslate(current.$slide).left;\r\n\r\n scaleX = newImgWidth / imgPos.width;\r\n scaleY = newImgHeight / imgPos.height;\r\n\r\n // Get center position for original image\r\n posX = canvasWidth * 0.5 - newImgWidth * 0.5;\r\n posY = canvasHeight * 0.5 - newImgHeight * 0.5;\r\n\r\n // Make sure image does not move away from edges\r\n if (newImgWidth > canvasWidth) {\r\n posX = imgPos.left * scaleX - (x * scaleX - x);\r\n\r\n if (posX > 0) {\r\n posX = 0;\r\n }\r\n\r\n if (posX < canvasWidth - newImgWidth) {\r\n posX = canvasWidth - newImgWidth;\r\n }\r\n }\r\n\r\n if (newImgHeight > canvasHeight) {\r\n posY = imgPos.top * scaleY - (y * scaleY - y);\r\n\r\n if (posY > 0) {\r\n posY = 0;\r\n }\r\n\r\n if (posY < canvasHeight - newImgHeight) {\r\n posY = canvasHeight - newImgHeight;\r\n }\r\n }\r\n\r\n self.updateCursor(newImgWidth, newImgHeight);\r\n\r\n $.fancybox.animate(\r\n $content, {\r\n top: posY,\r\n left: posX,\r\n scaleX: scaleX,\r\n scaleY: scaleY\r\n },\r\n duration || 366,\r\n function () {\r\n self.isAnimating = false;\r\n }\r\n );\r\n\r\n // Stop slideshow\r\n if (self.SlideShow && self.SlideShow.isActive) {\r\n self.SlideShow.stop();\r\n }\r\n },\r\n\r\n // Scale image to fit inside parent element\r\n // ========================================\r\n\r\n scaleToFit: function (duration) {\r\n var self = this,\r\n current = self.current,\r\n $content = current.$content,\r\n end;\r\n\r\n if (self.isAnimating || self.isMoved() || !$content || !(current.type == \"image\" && current.isLoaded && !current.hasError)) {\r\n return;\r\n }\r\n\r\n self.isAnimating = true;\r\n\r\n $.fancybox.stop($content);\r\n\r\n end = self.getFitPos(current);\r\n\r\n self.updateCursor(end.width, end.height);\r\n\r\n $.fancybox.animate(\r\n $content, {\r\n top: end.top,\r\n left: end.left,\r\n scaleX: end.width / $content.width(),\r\n scaleY: end.height / $content.height()\r\n },\r\n duration || 366,\r\n function () {\r\n self.isAnimating = false;\r\n }\r\n );\r\n },\r\n\r\n // Calculate image size to fit inside viewport\r\n // ===========================================\r\n\r\n getFitPos: function (slide) {\r\n var self = this,\r\n $content = slide.$content,\r\n $slide = slide.$slide,\r\n width = slide.width || slide.opts.width,\r\n height = slide.height || slide.opts.height,\r\n maxWidth,\r\n maxHeight,\r\n minRatio,\r\n aspectRatio,\r\n rez = {};\r\n\r\n if (!slide.isLoaded || !$content || !$content.length) {\r\n return false;\r\n }\r\n\r\n maxWidth = $.fancybox.getTranslate(self.$refs.stage).width;\r\n maxHeight = $.fancybox.getTranslate(self.$refs.stage).height;\r\n\r\n maxWidth -=\r\n parseFloat($slide.css(\"paddingLeft\")) +\r\n parseFloat($slide.css(\"paddingRight\")) +\r\n parseFloat($content.css(\"marginLeft\")) +\r\n parseFloat($content.css(\"marginRight\"));\r\n\r\n maxHeight -=\r\n parseFloat($slide.css(\"paddingTop\")) +\r\n parseFloat($slide.css(\"paddingBottom\")) +\r\n parseFloat($content.css(\"marginTop\")) +\r\n parseFloat($content.css(\"marginBottom\"));\r\n\r\n if (!width || !height) {\r\n width = maxWidth;\r\n height = maxHeight;\r\n }\r\n\r\n minRatio = Math.min(1, maxWidth / width, maxHeight / height);\r\n\r\n width = minRatio * width;\r\n height = minRatio * height;\r\n\r\n // Adjust width/height to precisely fit into container\r\n if (width > maxWidth - 0.5) {\r\n width = maxWidth;\r\n }\r\n\r\n if (height > maxHeight - 0.5) {\r\n height = maxHeight;\r\n }\r\n\r\n if (slide.type === \"image\") {\r\n rez.top = Math.floor((maxHeight - height) * 0.5) + parseFloat($slide.css(\"paddingTop\"));\r\n rez.left = Math.floor((maxWidth - width) * 0.5) + parseFloat($slide.css(\"paddingLeft\"));\r\n } else if (slide.contentType === \"video\") {\r\n // Force aspect ratio for the video\r\n // \"I say the whole world must learn of our peaceful ways… by force!\"\r\n aspectRatio = slide.opts.width && slide.opts.height ? width / height : slide.opts.ratio || 16 / 9;\r\n\r\n if (height > width / aspectRatio) {\r\n height = width / aspectRatio;\r\n } else if (width > height * aspectRatio) {\r\n width = height * aspectRatio;\r\n }\r\n }\r\n\r\n rez.width = width;\r\n rez.height = height;\r\n\r\n return rez;\r\n },\r\n\r\n // Update content size and position for all slides\r\n // ==============================================\r\n\r\n update: function (e) {\r\n var self = this;\r\n\r\n $.each(self.slides, function (key, slide) {\r\n self.updateSlide(slide, e);\r\n });\r\n },\r\n\r\n // Update slide content position and size\r\n // ======================================\r\n\r\n updateSlide: function (slide, e) {\r\n var self = this,\r\n $content = slide && slide.$content,\r\n width = slide.width || slide.opts.width,\r\n height = slide.height || slide.opts.height,\r\n $slide = slide.$slide;\r\n\r\n // First, prevent caption overlap, if needed\r\n self.adjustCaption(slide);\r\n\r\n // Then resize content to fit inside the slide\r\n if ($content && (width || height || slide.contentType === \"video\") && !slide.hasError) {\r\n $.fancybox.stop($content);\r\n\r\n $.fancybox.setTranslate($content, self.getFitPos(slide));\r\n\r\n if (slide.pos === self.currPos) {\r\n self.isAnimating = false;\r\n\r\n self.updateCursor();\r\n }\r\n }\r\n\r\n // Then some adjustments\r\n self.adjustLayout(slide);\r\n\r\n if ($slide.length) {\r\n $slide.trigger(\"refresh\");\r\n\r\n if (slide.pos === self.currPos) {\r\n self.$refs.toolbar\r\n .add(self.$refs.navigation.find(\".fancybox-button--arrow_right\"))\r\n .toggleClass(\"compensate-for-scrollbar\", $slide.get(0).scrollHeight > $slide.get(0).clientHeight);\r\n }\r\n }\r\n\r\n self.trigger(\"onUpdate\", slide, e);\r\n },\r\n\r\n // Horizontally center slide\r\n // =========================\r\n\r\n centerSlide: function (duration) {\r\n var self = this,\r\n current = self.current,\r\n $slide = current.$slide;\r\n\r\n if (self.isClosing || !current) {\r\n return;\r\n }\r\n\r\n $slide.siblings().css({\r\n transform: \"\",\r\n opacity: \"\"\r\n });\r\n\r\n $slide\r\n .parent()\r\n .children()\r\n .removeClass(\"fancybox-slide--previous fancybox-slide--next\");\r\n\r\n $.fancybox.animate(\r\n $slide, {\r\n top: 0,\r\n left: 0,\r\n opacity: 1\r\n },\r\n duration === undefined ? 0 : duration,\r\n function () {\r\n // Clean up\r\n $slide.css({\r\n transform: \"\",\r\n opacity: \"\"\r\n });\r\n\r\n if (!current.isComplete) {\r\n self.complete();\r\n }\r\n },\r\n false\r\n );\r\n },\r\n\r\n // Check if current slide is moved (swiped)\r\n // ========================================\r\n\r\n isMoved: function (slide) {\r\n var current = slide || this.current,\r\n slidePos,\r\n stagePos;\r\n\r\n if (!current) {\r\n return false;\r\n }\r\n\r\n stagePos = $.fancybox.getTranslate(this.$refs.stage);\r\n slidePos = $.fancybox.getTranslate(current.$slide);\r\n\r\n return (\r\n !current.$slide.hasClass(\"fancybox-animated\") &&\r\n (Math.abs(slidePos.top - stagePos.top) > 0.5 || Math.abs(slidePos.left - stagePos.left) > 0.5)\r\n );\r\n },\r\n\r\n // Update cursor style depending if content can be zoomed\r\n // ======================================================\r\n\r\n updateCursor: function (nextWidth, nextHeight) {\r\n var self = this,\r\n current = self.current,\r\n $container = self.$refs.container,\r\n canPan,\r\n isZoomable;\r\n\r\n if (!current || self.isClosing || !self.Guestures) {\r\n return;\r\n }\r\n\r\n $container.removeClass(\"fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan\");\r\n\r\n canPan = self.canPan(nextWidth, nextHeight);\r\n\r\n isZoomable = canPan ? true : self.isZoomable();\r\n\r\n $container.toggleClass(\"fancybox-is-zoomable\", isZoomable);\r\n\r\n $(\"[data-fancybox-zoom]\").prop(\"disabled\", !isZoomable);\r\n\r\n if (canPan) {\r\n $container.addClass(\"fancybox-can-pan\");\r\n } else if (\r\n isZoomable &&\r\n (current.opts.clickContent === \"zoom\" || ($.isFunction(current.opts.clickContent) && current.opts.clickContent(current) == \"zoom\"))\r\n ) {\r\n $container.addClass(\"fancybox-can-zoomIn\");\r\n } else if (current.opts.touch && (current.opts.touch.vertical || self.group.length > 1) && current.contentType !== \"video\") {\r\n $container.addClass(\"fancybox-can-swipe\");\r\n }\r\n },\r\n\r\n // Check if current slide is zoomable\r\n // ==================================\r\n\r\n isZoomable: function () {\r\n var self = this,\r\n current = self.current,\r\n fitPos;\r\n\r\n // Assume that slide is zoomable if:\r\n // - image is still loading\r\n // - actual size of the image is smaller than available area\r\n if (current && !self.isClosing && current.type === \"image\" && !current.hasError) {\r\n if (!current.isLoaded) {\r\n return true;\r\n }\r\n\r\n fitPos = self.getFitPos(current);\r\n\r\n if (fitPos && (current.width > fitPos.width || current.height > fitPos.height)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n // Check if current image dimensions are smaller than actual\r\n // =========================================================\r\n\r\n isScaledDown: function (nextWidth, nextHeight) {\r\n var self = this,\r\n rez = false,\r\n current = self.current,\r\n $content = current.$content;\r\n\r\n if (nextWidth !== undefined && nextHeight !== undefined) {\r\n rez = nextWidth < current.width && nextHeight < current.height;\r\n } else if ($content) {\r\n rez = $.fancybox.getTranslate($content);\r\n rez = rez.width < current.width && rez.height < current.height;\r\n }\r\n\r\n return rez;\r\n },\r\n\r\n // Check if image dimensions exceed parent element\r\n // ===============================================\r\n\r\n canPan: function (nextWidth, nextHeight) {\r\n var self = this,\r\n current = self.current,\r\n pos = null,\r\n rez = false;\r\n\r\n if (current.type === \"image\" && (current.isComplete || (nextWidth && nextHeight)) && !current.hasError) {\r\n rez = self.getFitPos(current);\r\n\r\n if (nextWidth !== undefined && nextHeight !== undefined) {\r\n pos = {\r\n width: nextWidth,\r\n height: nextHeight\r\n };\r\n } else if (current.isComplete) {\r\n pos = $.fancybox.getTranslate(current.$content);\r\n }\r\n\r\n if (pos && rez) {\r\n rez = Math.abs(pos.width - rez.width) > 1.5 || Math.abs(pos.height - rez.height) > 1.5;\r\n }\r\n }\r\n\r\n return rez;\r\n },\r\n\r\n // Load content into the slide\r\n // ===========================\r\n\r\n loadSlide: function (slide) {\r\n var self = this,\r\n type,\r\n $slide,\r\n ajaxLoad;\r\n\r\n if (slide.isLoading || slide.isLoaded) {\r\n return;\r\n }\r\n\r\n slide.isLoading = true;\r\n\r\n if (self.trigger(\"beforeLoad\", slide) === false) {\r\n slide.isLoading = false;\r\n\r\n return false;\r\n }\r\n\r\n type = slide.type;\r\n $slide = slide.$slide;\r\n\r\n $slide\r\n .off(\"refresh\")\r\n .trigger(\"onReset\")\r\n .addClass(slide.opts.slideClass);\r\n\r\n // Create content depending on the type\r\n switch (type) {\r\n case \"image\":\r\n self.setImage(slide);\r\n\r\n break;\r\n\r\n case \"iframe\":\r\n self.setIframe(slide);\r\n\r\n break;\r\n\r\n case \"html\":\r\n self.setContent(slide, slide.src || slide.content);\r\n\r\n break;\r\n\r\n case \"video\":\r\n self.setContent(\r\n slide,\r\n slide.opts.video.tpl\r\n .replace(/\\{\\{src\\}\\}/gi, slide.src)\r\n .replace(\"{{format}}\", slide.opts.videoFormat || slide.opts.video.format || \"\")\r\n .replace(\"{{poster}}\", slide.thumb || \"\")\r\n );\r\n\r\n break;\r\n\r\n case \"inline\":\r\n if ($(slide.src).length) {\r\n self.setContent(slide, $(slide.src));\r\n } else {\r\n self.setError(slide);\r\n }\r\n\r\n break;\r\n\r\n case \"ajax\":\r\n self.showLoading(slide);\r\n\r\n ajaxLoad = $.ajax(\r\n $.extend({}, slide.opts.ajax.settings, {\r\n url: slide.src,\r\n success: function (data, textStatus) {\r\n if (textStatus === \"success\") {\r\n self.setContent(slide, data);\r\n }\r\n },\r\n error: function (jqXHR, textStatus) {\r\n if (jqXHR && textStatus !== \"abort\") {\r\n self.setError(slide);\r\n }\r\n }\r\n })\r\n );\r\n\r\n $slide.one(\"onReset\", function () {\r\n ajaxLoad.abort();\r\n });\r\n\r\n break;\r\n\r\n default:\r\n self.setError(slide);\r\n\r\n break;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n // Use thumbnail image, if possible\r\n // ================================\r\n\r\n setImage: function (slide) {\r\n var self = this,\r\n ghost;\r\n\r\n // Check if need to show loading icon\r\n setTimeout(function () {\r\n var $img = slide.$image;\r\n\r\n if (!self.isClosing && slide.isLoading && (!$img || !$img.length || !$img[0].complete) && !slide.hasError) {\r\n self.showLoading(slide);\r\n }\r\n }, 50);\r\n\r\n //Check if image has srcset\r\n self.checkSrcset(slide);\r\n\r\n // This will be wrapper containing both ghost and actual image\r\n slide.$content = $('<div class=\"fancybox-content\"></div>')\r\n .addClass(\"fancybox-is-hidden\")\r\n .appendTo(slide.$slide.addClass(\"fancybox-slide--image\"));\r\n\r\n // If we have a thumbnail, we can display it while actual image is loading\r\n // Users will not stare at black screen and actual image will appear gradually\r\n if (slide.opts.preload !== false && slide.opts.width && slide.opts.height && slide.thumb) {\r\n slide.width = slide.opts.width;\r\n slide.height = slide.opts.height;\r\n\r\n ghost = document.createElement(\"img\");\r\n\r\n ghost.onerror = function () {\r\n $(this).remove();\r\n\r\n slide.$ghost = null;\r\n };\r\n\r\n ghost.onload = function () {\r\n self.afterLoad(slide);\r\n };\r\n\r\n slide.$ghost = $(ghost)\r\n .addClass(\"fancybox-image\")\r\n .appendTo(slide.$content)\r\n .attr(\"src\", slide.thumb);\r\n }\r\n\r\n // Start loading actual image\r\n self.setBigImage(slide);\r\n },\r\n\r\n // Check if image has srcset and get the source\r\n // ============================================\r\n checkSrcset: function (slide) {\r\n var srcset = slide.opts.srcset || slide.opts.image.srcset,\r\n found,\r\n temp,\r\n pxRatio,\r\n windowWidth;\r\n\r\n // If we have \"srcset\", then we need to find first matching \"src\" value.\r\n // This is necessary, because when you set an src attribute, the browser will preload the image\r\n // before any javascript or even CSS is applied.\r\n if (srcset) {\r\n pxRatio = window.devicePixelRatio || 1;\r\n windowWidth = window.innerWidth * pxRatio;\r\n\r\n temp = srcset.split(\",\").map(function (el) {\r\n var ret = {};\r\n\r\n el.trim()\r\n .split(/\\s+/)\r\n .forEach(function (el, i) {\r\n var value = parseInt(el.substring(0, el.length - 1), 10);\r\n\r\n if (i === 0) {\r\n return (ret.url = el);\r\n }\r\n\r\n if (value) {\r\n ret.value = value;\r\n ret.postfix = el[el.length - 1];\r\n }\r\n });\r\n\r\n return ret;\r\n });\r\n\r\n // Sort by value\r\n temp.sort(function (a, b) {\r\n return a.value - b.value;\r\n });\r\n\r\n // Ok, now we have an array of all srcset values\r\n for (var j = 0; j < temp.length; j++) {\r\n var el = temp[j];\r\n\r\n if ((el.postfix === \"w\" && el.value >= windowWidth) || (el.postfix === \"x\" && el.value >= pxRatio)) {\r\n found = el;\r\n break;\r\n }\r\n }\r\n\r\n // If not found, take the last one\r\n if (!found && temp.length) {\r\n found = temp[temp.length - 1];\r\n }\r\n\r\n if (found) {\r\n slide.src = found.url;\r\n\r\n // If we have default width/height values, we can calculate height for matching source\r\n if (slide.width && slide.height && found.postfix == \"w\") {\r\n slide.height = (slide.width / slide.height) * found.value;\r\n slide.width = found.value;\r\n }\r\n\r\n slide.opts.srcset = srcset;\r\n }\r\n }\r\n },\r\n\r\n // Create full-size image\r\n // ======================\r\n\r\n setBigImage: function (slide) {\r\n var self = this,\r\n img = document.createElement(\"img\"),\r\n $img = $(img);\r\n\r\n slide.$image = $img\r\n .one(\"error\", function () {\r\n self.setError(slide);\r\n })\r\n .one(\"load\", function () {\r\n var sizes;\r\n\r\n if (!slide.$ghost) {\r\n self.resolveImageSlideSize(slide, this.naturalWidth, this.naturalHeight);\r\n\r\n self.afterLoad(slide);\r\n }\r\n\r\n if (self.isClosing) {\r\n return;\r\n }\r\n\r\n if (slide.opts.srcset) {\r\n sizes = slide.opts.sizes;\r\n\r\n if (!sizes || sizes === \"auto\") {\r\n sizes =\r\n (slide.width / slide.height > 1 && $W.width() / $W.height() > 1 ? \"100\" : Math.round((slide.width / slide.height) * 100)) +\r\n \"vw\";\r\n }\r\n\r\n $img.attr(\"sizes\", sizes).attr(\"srcset\", slide.opts.srcset);\r\n }\r\n\r\n // Hide temporary image after some delay\r\n if (slide.$ghost) {\r\n setTimeout(function () {\r\n if (slide.$ghost && !self.isClosing) {\r\n slide.$ghost.hide();\r\n }\r\n }, Math.min(300, Math.max(1000, slide.height / 1600)));\r\n }\r\n\r\n self.hideLoading(slide);\r\n })\r\n .addClass(\"fancybox-image\")\r\n .attr(\"src\", slide.src)\r\n .appendTo(slide.$content);\r\n\r\n if ((img.complete || img.readyState == \"complete\") && $img.naturalWidth && $img.naturalHeight) {\r\n $img.trigger(\"load\");\r\n } else if (img.error) {\r\n $img.trigger(\"error\");\r\n }\r\n },\r\n\r\n // Computes the slide size from image size and maxWidth/maxHeight\r\n // ==============================================================\r\n\r\n resolveImageSlideSize: function (slide, imgWidth, imgHeight) {\r\n var maxWidth = parseInt(slide.opts.width, 10),\r\n maxHeight = parseInt(slide.opts.height, 10);\r\n\r\n // Sets the default values from the image\r\n slide.width = imgWidth;\r\n slide.height = imgHeight;\r\n\r\n if (maxWidth > 0) {\r\n slide.width = maxWidth;\r\n slide.height = Math.floor((maxWidth * imgHeight) / imgWidth);\r\n }\r\n\r\n if (maxHeight > 0) {\r\n slide.width = Math.floor((maxHeight * imgWidth) / imgHeight);\r\n slide.height = maxHeight;\r\n }\r\n },\r\n\r\n // Create iframe wrapper, iframe and bindings\r\n // ==========================================\r\n\r\n setIframe: function (slide) {\r\n var self = this,\r\n opts = slide.opts.iframe,\r\n $slide = slide.$slide,\r\n $iframe;\r\n\r\n slide.$content = $('<div class=\"fancybox-content' + (opts.preload ? \" fancybox-is-hidden\" : \"\") + '\"></div>')\r\n .css(opts.css)\r\n .appendTo($slide);\r\n\r\n $slide.addClass(\"fancybox-slide--\" + slide.contentType);\r\n\r\n slide.$iframe = $iframe = $(opts.tpl.replace(/\\{rnd\\}/g, new Date().getTime()))\r\n .attr(opts.attr)\r\n .appendTo(slide.$content);\r\n\r\n if (opts.preload) {\r\n self.showLoading(slide);\r\n\r\n // Unfortunately, it is not always possible to determine if iframe is successfully loaded\r\n // (due to browser security policy)\r\n\r\n $iframe.on(\"load.fb error.fb\", function (e) {\r\n this.isReady = 1;\r\n\r\n slide.$slide.trigger(\"refresh\");\r\n\r\n self.afterLoad(slide);\r\n });\r\n\r\n // Recalculate iframe content size\r\n // ===============================\r\n\r\n $slide.on(\"refresh.fb\", function () {\r\n var $content = slide.$content,\r\n frameWidth = opts.css.width,\r\n frameHeight = opts.css.height,\r\n $contents,\r\n $body;\r\n\r\n if ($iframe[0].isReady !== 1) {\r\n return;\r\n }\r\n\r\n try {\r\n $contents = $iframe.contents();\r\n $body = $contents.find(\"body\");\r\n } catch (ignore) {}\r\n\r\n // Calculate content dimensions, if it is accessible\r\n if ($body && $body.length && $body.children().length) {\r\n // Avoid scrolling to top (if multiple instances)\r\n $slide.css(\"overflow\", \"visible\");\r\n\r\n $content.css({\r\n width: \"100%\",\r\n \"max-width\": \"100%\",\r\n height: \"9999px\"\r\n });\r\n\r\n if (frameWidth === undefined) {\r\n frameWidth = Math.ceil(Math.max($body[0].clientWidth, $body.outerWidth(true)));\r\n }\r\n\r\n $content.css(\"width\", frameWidth ? frameWidth : \"\").css(\"max-width\", \"\");\r\n\r\n if (frameHeight === undefined) {\r\n frameHeight = Math.ceil(Math.max($body[0].clientHeight, $body.outerHeight(true)));\r\n }\r\n\r\n $content.css(\"height\", frameHeight ? frameHeight : \"\");\r\n\r\n $slide.css(\"overflow\", \"auto\");\r\n }\r\n\r\n $content.removeClass(\"fancybox-is-hidden\");\r\n });\r\n } else {\r\n self.afterLoad(slide);\r\n }\r\n\r\n $iframe.attr(\"src\", slide.src);\r\n\r\n // Remove iframe if closing or changing gallery item\r\n $slide.one(\"onReset\", function () {\r\n // This helps IE not to throw errors when closing\r\n try {\r\n $(this)\r\n .find(\"iframe\")\r\n .hide()\r\n .unbind()\r\n .attr(\"src\", \"//about:blank\");\r\n } catch (ignore) {}\r\n\r\n $(this)\r\n .off(\"refresh.fb\")\r\n .empty();\r\n\r\n slide.isLoaded = false;\r\n slide.isRevealed = false;\r\n });\r\n },\r\n\r\n // Wrap and append content to the slide\r\n // ======================================\r\n\r\n setContent: function (slide, content) {\r\n var self = this;\r\n\r\n if (self.isClosing) {\r\n return;\r\n }\r\n\r\n self.hideLoading(slide);\r\n\r\n if (slide.$content) {\r\n $.fancybox.stop(slide.$content);\r\n }\r\n\r\n slide.$slide.empty();\r\n\r\n // If content is a jQuery object, then it will be moved to the slide.\r\n // The placeholder is created so we will know where to put it back.\r\n if (isQuery(content) && content.parent().length) {\r\n // Make sure content is not already moved to fancyBox\r\n if (content.hasClass(\"fancybox-content\") || content.parent().hasClass(\"fancybox-content\")) {\r\n content.parents(\".fancybox-slide\").trigger(\"onReset\");\r\n }\r\n\r\n // Create temporary element marking original place of the content\r\n slide.$placeholder = $(\"<div>\")\r\n .hide()\r\n .insertAfter(content);\r\n\r\n // Make sure content is visible\r\n content.css(\"display\", \"inline-block\");\r\n } else if (!slide.hasError) {\r\n // If content is just a plain text, try to convert it to html\r\n if ($.type(content) === \"string\") {\r\n content = $(\"<div>\")\r\n .append($.trim(content))\r\n .contents();\r\n }\r\n\r\n // If \"filter\" option is provided, then filter content\r\n if (slide.opts.filter) {\r\n content = $(\"<div>\")\r\n .html(content)\r\n .find(slide.opts.filter);\r\n }\r\n }\r\n\r\n slide.$slide.one(\"onReset\", function () {\r\n // Pause all html5 video/audio\r\n $(this)\r\n .find(\"video,audio\")\r\n .trigger(\"pause\");\r\n\r\n // Put content back\r\n if (slide.$placeholder) {\r\n slide.$placeholder.after(content.removeClass(\"fancybox-content\").hide()).remove();\r\n\r\n slide.$placeholder = null;\r\n }\r\n\r\n // Remove custom close button\r\n if (slide.$smallBtn) {\r\n slide.$smallBtn.remove();\r\n\r\n slide.$smallBtn = null;\r\n }\r\n\r\n // Remove content and mark slide as not loaded\r\n if (!slide.hasError) {\r\n $(this).empty();\r\n\r\n slide.isLoaded = false;\r\n slide.isRevealed = false;\r\n }\r\n });\r\n\r\n $(content).appendTo(slide.$slide);\r\n\r\n if ($(content).is(\"video,audio\")) {\r\n $(content).addClass(\"fancybox-video\");\r\n\r\n $(content).wrap(\"<div></div>\");\r\n\r\n slide.contentType = \"video\";\r\n\r\n slide.opts.width = slide.opts.width || $(content).attr(\"width\");\r\n slide.opts.height = slide.opts.height || $(content).attr(\"height\");\r\n }\r\n\r\n slide.$content = slide.$slide\r\n .children()\r\n .filter(\"div,form,main,video,audio,article,.fancybox-content\")\r\n .first();\r\n\r\n slide.$content.siblings().hide();\r\n\r\n // Re-check if there is a valid content\r\n // (in some cases, ajax response can contain various elements or plain text)\r\n if (!slide.$content.length) {\r\n slide.$content = slide.$slide\r\n .wrapInner(\"<div></div>\")\r\n .children()\r\n .first();\r\n }\r\n\r\n slide.$content.addClass(\"fancybox-content\");\r\n\r\n slide.$slide.addClass(\"fancybox-slide--\" + slide.contentType);\r\n\r\n self.afterLoad(slide);\r\n },\r\n\r\n // Display error message\r\n // =====================\r\n\r\n setError: function (slide) {\r\n slide.hasError = true;\r\n\r\n slide.$slide\r\n .trigger(\"onReset\")\r\n .removeClass(\"fancybox-slide--\" + slide.contentType)\r\n .addClass(\"fancybox-slide--error\");\r\n\r\n slide.contentType = \"html\";\r\n\r\n this.setContent(slide, this.translate(slide, slide.opts.errorTpl));\r\n\r\n if (slide.pos === this.currPos) {\r\n this.isAnimating = false;\r\n }\r\n },\r\n\r\n // Show loading icon inside the slide\r\n // ==================================\r\n\r\n showLoading: function (slide) {\r\n var self = this;\r\n\r\n slide = slide || self.current;\r\n\r\n if (slide && !slide.$spinner) {\r\n slide.$spinner = $(self.translate(self, self.opts.spinnerTpl))\r\n .appendTo(slide.$slide)\r\n .hide()\r\n .fadeIn(\"fast\");\r\n }\r\n },\r\n\r\n // Remove loading icon from the slide\r\n // ==================================\r\n\r\n hideLoading: function (slide) {\r\n var self = this;\r\n\r\n slide = slide || self.current;\r\n\r\n if (slide && slide.$spinner) {\r\n slide.$spinner.stop().remove();\r\n\r\n delete slide.$spinner;\r\n }\r\n },\r\n\r\n // Adjustments after slide content has been loaded\r\n // ===============================================\r\n\r\n afterLoad: function (slide) {\r\n var self = this;\r\n\r\n if (self.isClosing) {\r\n return;\r\n }\r\n\r\n slide.isLoading = false;\r\n slide.isLoaded = true;\r\n\r\n self.trigger(\"afterLoad\", slide);\r\n\r\n self.hideLoading(slide);\r\n\r\n // Add small close button\r\n if (slide.opts.smallBtn && (!slide.$smallBtn || !slide.$smallBtn.length)) {\r\n slide.$smallBtn = $(self.translate(slide, slide.opts.btnTpl.smallBtn)).appendTo(slide.$content);\r\n }\r\n\r\n // Disable right click\r\n if (slide.opts.protect && slide.$content && !slide.hasError) {\r\n slide.$content.on(\"contextmenu.fb\", function (e) {\r\n if (e.button == 2) {\r\n e.preventDefault();\r\n }\r\n\r\n return true;\r\n });\r\n\r\n // Add fake element on top of the image\r\n // This makes a bit harder for user to select image\r\n if (slide.type === \"image\") {\r\n $('<div class=\"fancybox-spaceball\"></div>').appendTo(slide.$content);\r\n }\r\n }\r\n\r\n self.adjustCaption(slide);\r\n\r\n self.adjustLayout(slide);\r\n\r\n if (slide.pos === self.currPos) {\r\n self.updateCursor();\r\n }\r\n\r\n self.revealContent(slide);\r\n },\r\n\r\n // Prevent caption overlap,\r\n // fix css inconsistency across browsers\r\n // =====================================\r\n\r\n adjustCaption: function (slide) {\r\n var self = this,\r\n current = slide || self.current,\r\n caption = current.opts.caption,\r\n preventOverlap = current.opts.preventCaptionOverlap,\r\n $caption = self.$refs.caption,\r\n $clone,\r\n captionH = false;\r\n\r\n $caption.toggleClass(\"fancybox-caption--separate\", preventOverlap);\r\n\r\n if (preventOverlap && caption && caption.length) {\r\n if (current.pos !== self.currPos) {\r\n $clone = $caption.clone().appendTo($caption.parent());\r\n\r\n $clone\r\n .children()\r\n .eq(0)\r\n .empty()\r\n .html(caption);\r\n\r\n captionH = $clone.outerHeight(true);\r\n\r\n $clone.empty().remove();\r\n } else if (self.$caption) {\r\n captionH = self.$caption.outerHeight(true);\r\n }\r\n\r\n current.$slide.css(\"padding-bottom\", captionH || \"\");\r\n }\r\n },\r\n\r\n // Simple hack to fix inconsistency across browsers, described here (affects Edge, too):\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=748518\r\n // ====================================================================================\r\n\r\n adjustLayout: function (slide) {\r\n var self = this,\r\n current = slide || self.current,\r\n scrollHeight,\r\n marginBottom,\r\n inlinePadding,\r\n actualPadding;\r\n\r\n if (current.isLoaded && current.opts.disableLayoutFix !== true) {\r\n current.$content.css(\"margin-bottom\", \"\");\r\n\r\n // If we would always set margin-bottom for the content,\r\n // then it would potentially break vertical align\r\n if (current.$content.outerHeight() > current.$slide.height() + 0.5) {\r\n inlinePadding = current.$slide[0].style[\"padding-bottom\"];\r\n actualPadding = current.$slide.css(\"padding-bottom\");\r\n\r\n if (parseFloat(actualPadding) > 0) {\r\n scrollHeight = current.$slide[0].scrollHeight;\r\n\r\n current.$slide.css(\"padding-bottom\", 0);\r\n\r\n if (Math.abs(scrollHeight - current.$slide[0].scrollHeight) < 1) {\r\n marginBottom = actualPadding;\r\n }\r\n\r\n current.$slide.css(\"padding-bottom\", inlinePadding);\r\n }\r\n }\r\n\r\n current.$content.css(\"margin-bottom\", marginBottom);\r\n }\r\n },\r\n\r\n // Make content visible\r\n // This method is called right after content has been loaded or\r\n // user navigates gallery and transition should start\r\n // ============================================================\r\n\r\n revealContent: function (slide) {\r\n var self = this,\r\n $slide = slide.$slide,\r\n end = false,\r\n start = false,\r\n isMoved = self.isMoved(slide),\r\n isRevealed = slide.isRevealed,\r\n effect,\r\n effectClassName,\r\n duration,\r\n opacity;\r\n\r\n slide.isRevealed = true;\r\n\r\n effect = slide.opts[self.firstRun ? \"animationEffect\" : \"transitionEffect\"];\r\n duration = slide.opts[self.firstRun ? \"animationDuration\" : \"transitionDuration\"];\r\n\r\n duration = parseInt(slide.forcedDuration === undefined ? duration : slide.forcedDuration, 10);\r\n\r\n if (isMoved || slide.pos !== self.currPos || !duration) {\r\n effect = false;\r\n }\r\n\r\n // Check if can zoom\r\n if (effect === \"zoom\") {\r\n if (slide.pos === self.currPos && duration && slide.type === \"image\" && !slide.hasError && (start = self.getThumbPos(slide))) {\r\n end = self.getFitPos(slide);\r\n } else {\r\n effect = \"fade\";\r\n }\r\n }\r\n\r\n // Zoom animation\r\n // ==============\r\n if (effect === \"zoom\") {\r\n self.isAnimating = true;\r\n\r\n end.scaleX = end.width / start.width;\r\n end.scaleY = end.height / start.height;\r\n\r\n // Check if we need to animate opacity\r\n opacity = slide.opts.zoomOpacity;\r\n\r\n if (opacity == \"auto\") {\r\n opacity = Math.abs(slide.width / slide.height - start.width / start.height) > 0.1;\r\n }\r\n\r\n if (opacity) {\r\n start.opacity = 0.1;\r\n end.opacity = 1;\r\n }\r\n\r\n // Draw image at start position\r\n $.fancybox.setTranslate(slide.$content.removeClass(\"fancybox-is-hidden\"), start);\r\n\r\n forceRedraw(slide.$content);\r\n\r\n // Start animation\r\n $.fancybox.animate(slide.$content, end, duration, function () {\r\n self.isAnimating = false;\r\n\r\n self.complete();\r\n });\r\n\r\n return;\r\n }\r\n\r\n self.updateSlide(slide);\r\n\r\n // Simply show content if no effect\r\n // ================================\r\n if (!effect) {\r\n slide.$content.removeClass(\"fancybox-is-hidden\");\r\n\r\n if (!isRevealed && isMoved && slide.type === \"image\" && !slide.hasError) {\r\n slide.$content.hide().fadeIn(\"fast\");\r\n }\r\n\r\n if (slide.pos === self.currPos) {\r\n self.complete();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Prepare for CSS transiton\r\n // =========================\r\n $.fancybox.stop($slide);\r\n\r\n //effectClassName = \"fancybox-animated fancybox-slide--\" + (slide.pos >= self.prevPos ? \"next\" : \"previous\") + \" fancybox-fx-\" + effect;\r\n effectClassName = \"fancybox-slide--\" + (slide.pos >= self.prevPos ? \"next\" : \"previous\") + \" fancybox-animated fancybox-fx-\" + effect;\r\n\r\n $slide.addClass(effectClassName).removeClass(\"fancybox-slide--current\"); //.addClass(effectClassName);\r\n\r\n slide.$content.removeClass(\"fancybox-is-hidden\");\r\n\r\n // Force reflow\r\n forceRedraw($slide);\r\n\r\n if (slide.type !== \"image\") {\r\n slide.$content.hide().show(0);\r\n }\r\n\r\n $.fancybox.animate(\r\n $slide,\r\n \"fancybox-slide--current\",\r\n duration,\r\n function () {\r\n $slide.removeClass(effectClassName).css({\r\n transform: \"\",\r\n opacity: \"\"\r\n });\r\n\r\n if (slide.pos === self.currPos) {\r\n self.complete();\r\n }\r\n },\r\n true\r\n );\r\n },\r\n\r\n // Check if we can and have to zoom from thumbnail\r\n //================================================\r\n\r\n getThumbPos: function (slide) {\r\n var rez = false,\r\n $thumb = slide.$thumb,\r\n thumbPos,\r\n btw,\r\n brw,\r\n bbw,\r\n blw;\r\n\r\n if (!$thumb || !inViewport($thumb[0])) {\r\n return false;\r\n }\r\n\r\n thumbPos = $.fancybox.getTranslate($thumb);\r\n\r\n btw = parseFloat($thumb.css(\"border-top-width\") || 0);\r\n brw = parseFloat($thumb.css(\"border-right-width\") || 0);\r\n bbw = parseFloat($thumb.css(\"border-bottom-width\") || 0);\r\n blw = parseFloat($thumb.css(\"border-left-width\") || 0);\r\n\r\n rez = {\r\n top: thumbPos.top + btw,\r\n left: thumbPos.left + blw,\r\n width: thumbPos.width - brw - blw,\r\n height: thumbPos.height - btw - bbw,\r\n scaleX: 1,\r\n scaleY: 1\r\n };\r\n\r\n return thumbPos.width > 0 && thumbPos.height > 0 ? rez : false;\r\n },\r\n\r\n // Final adjustments after current gallery item is moved to position\r\n // and it`s content is loaded\r\n // ==================================================================\r\n\r\n complete: function () {\r\n var self = this,\r\n current = self.current,\r\n slides = {},\r\n $el;\r\n\r\n if (self.isMoved() || !current.isLoaded) {\r\n return;\r\n }\r\n\r\n if (!current.isComplete) {\r\n current.isComplete = true;\r\n\r\n current.$slide.siblings().trigger(\"onReset\");\r\n\r\n self.preload(\"inline\");\r\n\r\n // Trigger any CSS transiton inside the slide\r\n forceRedraw(current.$slide);\r\n\r\n current.$slide.addClass(\"fancybox-slide--complete\");\r\n\r\n // Remove unnecessary slides\r\n $.each(self.slides, function (key, slide) {\r\n if (slide.pos >= self.currPos - 1 && slide.pos <= self.currPos + 1) {\r\n slides[slide.pos] = slide;\r\n } else if (slide) {\r\n $.fancybox.stop(slide.$slide);\r\n\r\n slide.$slide.off().remove();\r\n }\r\n });\r\n\r\n self.slides = slides;\r\n }\r\n\r\n self.isAnimating = false;\r\n\r\n self.updateCursor();\r\n\r\n self.trigger(\"afterShow\");\r\n\r\n // Autoplay first html5 video/audio\r\n if (!!current.opts.video.autoStart) {\r\n current.$slide\r\n .find(\"video,audio\")\r\n .filter(\":visible:first\")\r\n .trigger(\"play\")\r\n .one(\"ended\", function () {\r\n if (Document.exitFullscreen) {\r\n Document.exitFullscreen();\r\n } else if (this.webkitExitFullscreen) {\r\n this.webkitExitFullscreen();\r\n }\r\n\r\n self.next();\r\n });\r\n }\r\n\r\n // Try to focus on the first focusable element\r\n if (current.opts.autoFocus && current.contentType === \"html\") {\r\n // Look for the first input with autofocus attribute\r\n $el = current.$content.find(\"input[autofocus]:enabled:visible:first\");\r\n\r\n if ($el.length) {\r\n $el.trigger(\"focus\");\r\n } else {\r\n self.focus(null, true);\r\n }\r\n }\r\n\r\n // Avoid jumping\r\n current.$slide.scrollTop(0).scrollLeft(0);\r\n },\r\n\r\n // Preload next and previous slides\r\n // ================================\r\n\r\n preload: function (type) {\r\n var self = this,\r\n prev,\r\n next;\r\n\r\n if (self.group.length < 2) {\r\n return;\r\n }\r\n\r\n next = self.slides[self.currPos + 1];\r\n prev = self.slides[self.currPos - 1];\r\n\r\n if (prev && prev.type === type) {\r\n self.loadSlide(prev);\r\n }\r\n\r\n if (next && next.type === type) {\r\n self.loadSlide(next);\r\n }\r\n },\r\n\r\n // Try to find and focus on the first focusable element\r\n // ====================================================\r\n\r\n focus: function (e, firstRun) {\r\n var self = this,\r\n focusableStr = [\r\n \"a[href]\",\r\n \"area[href]\",\r\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\r\n \"select:not([disabled]):not([aria-hidden])\",\r\n \"textarea:not([disabled]):not([aria-hidden])\",\r\n \"button:not([disabled]):not([aria-hidden])\",\r\n \"iframe\",\r\n \"object\",\r\n \"embed\",\r\n \"video\",\r\n \"audio\",\r\n \"[contenteditable]\",\r\n '[tabindex]:not([tabindex^=\"-\"])'\r\n ].join(\",\"),\r\n focusableItems,\r\n focusedItemIndex;\r\n\r\n if (self.isClosing) {\r\n return;\r\n }\r\n\r\n if (e || !self.current || !self.current.isComplete) {\r\n // Focus on any element inside fancybox\r\n focusableItems = self.$refs.container.find(\"*:visible\");\r\n } else {\r\n // Focus inside current slide\r\n focusableItems = self.current.$slide.find(\"*:visible\" + (firstRun ? \":not(.fancybox-close-small)\" : \"\"));\r\n }\r\n\r\n focusableItems = focusableItems.filter(focusableStr).filter(function () {\r\n return $(this).css(\"visibility\") !== \"hidden\" && !$(this).hasClass(\"disabled\");\r\n });\r\n\r\n if (focusableItems.length) {\r\n focusedItemIndex = focusableItems.index(document.activeElement);\r\n\r\n if (e && e.shiftKey) {\r\n // Back tab\r\n if (focusedItemIndex < 0 || focusedItemIndex == 0) {\r\n e.preventDefault();\r\n\r\n focusableItems.eq(focusableItems.length - 1).trigger(\"focus\");\r\n }\r\n } else {\r\n // Outside or Forward tab\r\n if (focusedItemIndex < 0 || focusedItemIndex == focusableItems.length - 1) {\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n\r\n focusableItems.eq(0).trigger(\"focus\");\r\n }\r\n }\r\n } else {\r\n self.$refs.container.trigger(\"focus\");\r\n }\r\n },\r\n\r\n // Activates current instance - brings container to the front and enables keyboard,\r\n // notifies other instances about deactivating\r\n // =================================================================================\r\n\r\n activate: function () {\r\n var self = this;\r\n\r\n // Deactivate all instances\r\n $(\".fancybox-container\").each(function () {\r\n var instance = $(this).data(\"FancyBox\");\r\n\r\n // Skip self and closing instances\r\n if (instance && instance.id !== self.id && !instance.isClosing) {\r\n instance.trigger(\"onDeactivate\");\r\n\r\n instance.removeEvents();\r\n\r\n instance.isVisible = false;\r\n }\r\n });\r\n\r\n self.isVisible = true;\r\n\r\n if (self.current || self.isIdle) {\r\n self.update();\r\n\r\n self.updateControls();\r\n }\r\n\r\n self.trigger(\"onActivate\");\r\n\r\n self.addEvents();\r\n },\r\n\r\n // Start closing procedure\r\n // This will start \"zoom-out\" animation if needed and clean everything up afterwards\r\n // =================================================================================\r\n\r\n close: function (e, d) {\r\n var self = this,\r\n current = self.current,\r\n effect,\r\n duration,\r\n $content,\r\n domRect,\r\n opacity,\r\n start,\r\n end;\r\n\r\n var done = function () {\r\n self.cleanUp(e);\r\n };\r\n\r\n if (self.isClosing) {\r\n return false;\r\n }\r\n\r\n self.isClosing = true;\r\n\r\n // If beforeClose callback prevents closing, make sure content is centered\r\n if (self.trigger(\"beforeClose\", e) === false) {\r\n self.isClosing = false;\r\n\r\n requestAFrame(function () {\r\n self.update();\r\n });\r\n\r\n return false;\r\n }\r\n\r\n // Remove all events\r\n // If there are multiple instances, they will be set again by \"activate\" method\r\n self.removeEvents();\r\n\r\n $content = current.$content;\r\n effect = current.opts.animationEffect;\r\n duration = $.isNumeric(d) ? d : effect ? current.opts.animationDuration : 0;\r\n\r\n current.$slide.removeClass(\"fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated\");\r\n\r\n if (e !== true) {\r\n $.fancybox.stop(current.$slide);\r\n } else {\r\n effect = false;\r\n }\r\n\r\n // Remove other slides\r\n current.$slide\r\n .siblings()\r\n .trigger(\"onReset\")\r\n .remove();\r\n\r\n // Trigger animations\r\n if (duration) {\r\n self.$refs.container\r\n .removeClass(\"fancybox-is-open\")\r\n .addClass(\"fancybox-is-closing\")\r\n .css(\"transition-duration\", duration + \"ms\");\r\n }\r\n\r\n // Clean up\r\n self.hideLoading(current);\r\n\r\n self.hideControls(true);\r\n\r\n self.updateCursor();\r\n\r\n // Check if possible to zoom-out\r\n if (\r\n effect === \"zoom\" &&\r\n !($content && duration && current.type === \"image\" && !self.isMoved() && !current.hasError && (end = self.getThumbPos(current)))\r\n ) {\r\n effect = \"fade\";\r\n }\r\n\r\n if (effect === \"zoom\") {\r\n $.fancybox.stop($content);\r\n\r\n domRect = $.fancybox.getTranslate($content);\r\n\r\n start = {\r\n top: domRect.top,\r\n left: domRect.left,\r\n scaleX: domRect.width / end.width,\r\n scaleY: domRect.height / end.height,\r\n width: end.width,\r\n height: end.height\r\n };\r\n\r\n // Check if we need to animate opacity\r\n opacity = current.opts.zoomOpacity;\r\n\r\n if (opacity == \"auto\") {\r\n opacity = Math.abs(current.width / current.height - end.width / end.height) > 0.1;\r\n }\r\n\r\n if (opacity) {\r\n end.opacity = 0;\r\n }\r\n\r\n $.fancybox.setTranslate($content, start);\r\n\r\n forceRedraw($content);\r\n\r\n $.fancybox.animate($content, end, duration, done);\r\n\r\n return true;\r\n }\r\n\r\n if (effect && duration) {\r\n $.fancybox.animate(\r\n current.$slide.addClass(\"fancybox-slide--previous\").removeClass(\"fancybox-slide--current\"),\r\n \"fancybox-animated fancybox-fx-\" + effect,\r\n duration,\r\n done\r\n );\r\n } else {\r\n // If skip animation\r\n if (e === true) {\r\n setTimeout(done, duration);\r\n } else {\r\n done();\r\n }\r\n }\r\n\r\n return true;\r\n },\r\n\r\n // Final adjustments after removing the instance\r\n // =============================================\r\n\r\n cleanUp: function (e) {\r\n var self = this,\r\n instance,\r\n $focus = self.current.opts.$orig,\r\n x,\r\n y;\r\n\r\n self.current.$slide.trigger(\"onReset\");\r\n\r\n self.$refs.container.empty().remove();\r\n\r\n self.trigger(\"afterClose\", e);\r\n\r\n // Place back focus\r\n if (!!self.current.opts.backFocus) {\r\n if (!$focus || !$focus.length || !$focus.is(\":visible\")) {\r\n $focus = self.$trigger;\r\n }\r\n\r\n if ($focus && $focus.length) {\r\n x = window.scrollX;\r\n y = window.scrollY;\r\n\r\n $focus.trigger(\"focus\");\r\n\r\n $(\"html, body\")\r\n .scrollTop(y)\r\n .scrollLeft(x);\r\n }\r\n }\r\n\r\n self.current = null;\r\n\r\n // Check if there are other instances\r\n instance = $.fancybox.getInstance();\r\n\r\n if (instance) {\r\n instance.activate();\r\n } else {\r\n $(\"body\").removeClass(\"fancybox-active compensate-for-scrollbar\");\r\n\r\n $(\"#fancybox-style-noscroll\").remove();\r\n }\r\n },\r\n\r\n // Call callback and trigger an event\r\n // ==================================\r\n\r\n trigger: function (name, slide) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n self = this,\r\n obj = slide && slide.opts ? slide : self.current,\r\n rez;\r\n\r\n if (obj) {\r\n args.unshift(obj);\r\n } else {\r\n obj = self;\r\n }\r\n\r\n args.unshift(self);\r\n\r\n if ($.isFunction(obj.opts[name])) {\r\n rez = obj.opts[name].apply(obj, args);\r\n }\r\n\r\n if (rez === false) {\r\n return rez;\r\n }\r\n\r\n if (name === \"afterClose\" || !self.$refs) {\r\n $D.trigger(name + \".fb\", args);\r\n } else {\r\n self.$refs.container.trigger(name + \".fb\", args);\r\n }\r\n },\r\n\r\n // Update infobar values, navigation button states and reveal caption\r\n // ==================================================================\r\n\r\n updateControls: function () {\r\n var self = this,\r\n current = self.current,\r\n index = current.index,\r\n $container = self.$refs.container,\r\n $caption = self.$refs.caption,\r\n caption = current.opts.caption;\r\n\r\n // Recalculate content dimensions\r\n current.$slide.trigger(\"refresh\");\r\n\r\n // Set caption\r\n if (caption && caption.length) {\r\n self.$caption = $caption;\r\n\r\n $caption\r\n .children()\r\n .eq(0)\r\n .html(caption);\r\n } else {\r\n self.$caption = null;\r\n }\r\n\r\n if (!self.hasHiddenControls && !self.isIdle) {\r\n self.showControls();\r\n }\r\n\r\n // Update info and navigation elements\r\n $container.find(\"[data-fancybox-count]\").html(self.group.length);\r\n $container.find(\"[data-fancybox-index]\").html(index + 1);\r\n\r\n $container.find(\"[data-fancybox-prev]\").prop(\"disabled\", !current.opts.loop && index <= 0);\r\n $container.find(\"[data-fancybox-next]\").prop(\"disabled\", !current.opts.loop && index >= self.group.length - 1);\r\n\r\n if (current.type === \"image\") {\r\n // Re-enable buttons; update download button source\r\n $container\r\n .find(\"[data-fancybox-zoom]\")\r\n .show()\r\n .end()\r\n .find(\"[data-fancybox-download]\")\r\n .attr(\"href\", current.opts.image.src || current.src)\r\n .show();\r\n } else if (current.opts.toolbar) {\r\n $container.find(\"[data-fancybox-download],[data-fancybox-zoom]\").hide();\r\n }\r\n\r\n // Make sure focus is not on disabled button/element\r\n if ($(document.activeElement).is(\":hidden,[disabled]\")) {\r\n self.$refs.container.trigger(\"focus\");\r\n }\r\n },\r\n\r\n // Hide toolbar and caption\r\n // ========================\r\n\r\n hideControls: function (andCaption) {\r\n var self = this,\r\n arr = [\"infobar\", \"toolbar\", \"nav\"];\r\n\r\n if (andCaption || !self.current.opts.preventCaptionOverlap) {\r\n arr.push(\"caption\");\r\n }\r\n\r\n this.$refs.container.removeClass(\r\n arr\r\n .map(function (i) {\r\n return \"fancybox-show-\" + i;\r\n })\r\n .join(\" \")\r\n );\r\n\r\n this.hasHiddenControls = true;\r\n },\r\n\r\n showControls: function () {\r\n var self = this,\r\n opts = self.current ? self.current.opts : self.opts,\r\n $container = self.$refs.container;\r\n\r\n self.hasHiddenControls = false;\r\n self.idleSecondsCounter = 0;\r\n\r\n $container\r\n .toggleClass(\"fancybox-show-toolbar\", !!(opts.toolbar && opts.buttons))\r\n .toggleClass(\"fancybox-show-infobar\", !!(opts.infobar && self.group.length > 1))\r\n .toggleClass(\"fancybox-show-caption\", !!self.$caption)\r\n .toggleClass(\"fancybox-show-nav\", !!(opts.arrows && self.group.length > 1))\r\n .toggleClass(\"fancybox-is-modal\", !!opts.modal);\r\n },\r\n\r\n // Toggle toolbar and caption\r\n // ==========================\r\n\r\n toggleControls: function () {\r\n if (this.hasHiddenControls) {\r\n this.showControls();\r\n } else {\r\n this.hideControls();\r\n }\r\n }\r\n });\r\n\r\n $.fancybox = {\r\n version: \"3.5.7\",\r\n defaults: defaults,\r\n\r\n // Get current instance and execute a command.\r\n //\r\n // Examples of usage:\r\n //\r\n // $instance = $.fancybox.getInstance();\r\n // $.fancybox.getInstance().jumpTo( 1 );\r\n // $.fancybox.getInstance( 'jumpTo', 1 );\r\n // $.fancybox.getInstance( function() {\r\n // console.info( this.currIndex );\r\n // });\r\n // ======================================================\r\n\r\n getInstance: function (command) {\r\n var instance = $('.fancybox-container:not(\".fancybox-is-closing\"):last').data(\"FancyBox\"),\r\n args = Array.prototype.slice.call(arguments, 1);\r\n\r\n if (instance instanceof FancyBox) {\r\n if ($.type(command) === \"string\") {\r\n instance[command].apply(instance, args);\r\n } else if ($.type(command) === \"function\") {\r\n command.apply(instance, args);\r\n }\r\n\r\n return instance;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n // Create new instance\r\n // ===================\r\n\r\n open: function (items, opts, index) {\r\n return new FancyBox(items, opts, index);\r\n },\r\n\r\n // Close current or all instances\r\n // ==============================\r\n\r\n close: function (all) {\r\n var instance = this.getInstance();\r\n\r\n if (instance) {\r\n instance.close();\r\n\r\n // Try to find and close next instance\r\n if (all === true) {\r\n this.close(all);\r\n }\r\n }\r\n },\r\n\r\n // Close all instances and unbind all events\r\n // =========================================\r\n\r\n destroy: function () {\r\n this.close(true);\r\n\r\n $D.add(\"body\").off(\"click.fb-start\", \"**\");\r\n },\r\n\r\n // Try to detect mobile devices\r\n // ============================\r\n\r\n isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\r\n // Detect if 'translate3d' support is available\r\n // ============================================\r\n\r\n use3d: (function () {\r\n var div = document.createElement(\"div\");\r\n\r\n return (\r\n window.getComputedStyle &&\r\n window.getComputedStyle(div) &&\r\n window.getComputedStyle(div).getPropertyValue(\"transform\") &&\r\n !(document.documentMode && document.documentMode < 11)\r\n );\r\n })(),\r\n\r\n // Helper function to get current visual state of an element\r\n // returns array[ top, left, horizontal-scale, vertical-scale, opacity ]\r\n // =====================================================================\r\n\r\n getTranslate: function ($el) {\r\n var domRect;\r\n\r\n if (!$el || !$el.length) {\r\n return false;\r\n }\r\n\r\n domRect = $el[0].getBoundingClientRect();\r\n\r\n return {\r\n top: domRect.top || 0,\r\n left: domRect.left || 0,\r\n width: domRect.width,\r\n height: domRect.height,\r\n opacity: parseFloat($el.css(\"opacity\"))\r\n };\r\n },\r\n\r\n // Shortcut for setting \"translate3d\" properties for element\r\n // Can set be used to set opacity, too\r\n // ========================================================\r\n\r\n setTranslate: function ($el, props) {\r\n var str = \"\",\r\n css = {};\r\n\r\n if (!$el || !props) {\r\n return;\r\n }\r\n\r\n if (props.left !== undefined || props.top !== undefined) {\r\n str =\r\n (props.left === undefined ? $el.position().left : props.left) +\r\n \"px, \" +\r\n (props.top === undefined ? $el.position().top : props.top) +\r\n \"px\";\r\n\r\n if (this.use3d) {\r\n str = \"translate3d(\" + str + \", 0px)\";\r\n } else {\r\n str = \"translate(\" + str + \")\";\r\n }\r\n }\r\n\r\n if (props.scaleX !== undefined && props.scaleY !== undefined) {\r\n str += \" scale(\" + props.scaleX + \", \" + props.scaleY + \")\";\r\n } else if (props.scaleX !== undefined) {\r\n str += \" scaleX(\" + props.scaleX + \")\";\r\n }\r\n\r\n if (str.length) {\r\n css.transform = str;\r\n }\r\n\r\n if (props.opacity !== undefined) {\r\n css.opacity = props.opacity;\r\n }\r\n\r\n if (props.width !== undefined) {\r\n css.width = props.width;\r\n }\r\n\r\n if (props.height !== undefined) {\r\n css.height = props.height;\r\n }\r\n\r\n return $el.css(css);\r\n },\r\n\r\n // Simple CSS transition handler\r\n // =============================\r\n\r\n animate: function ($el, to, duration, callback, leaveAnimationName) {\r\n var self = this,\r\n from;\r\n\r\n if ($.isFunction(duration)) {\r\n callback = duration;\r\n duration = null;\r\n }\r\n\r\n self.stop($el);\r\n\r\n from = self.getTranslate($el);\r\n\r\n $el.on(transitionEnd, function (e) {\r\n // Skip events from child elements and z-index change\r\n if (e && e.originalEvent && (!$el.is(e.originalEvent.target) || e.originalEvent.propertyName == \"z-index\")) {\r\n return;\r\n }\r\n\r\n self.stop($el);\r\n\r\n if ($.isNumeric(duration)) {\r\n $el.css(\"transition-duration\", \"\");\r\n }\r\n\r\n if ($.isPlainObject(to)) {\r\n if (to.scaleX !== undefined && to.scaleY !== undefined) {\r\n self.setTranslate($el, {\r\n top: to.top,\r\n left: to.left,\r\n width: from.width * to.scaleX,\r\n height: from.height * to.scaleY,\r\n scaleX: 1,\r\n scaleY: 1\r\n });\r\n }\r\n } else if (leaveAnimationName !== true) {\r\n $el.removeClass(to);\r\n }\r\n\r\n if ($.isFunction(callback)) {\r\n callback(e);\r\n }\r\n });\r\n\r\n if ($.isNumeric(duration)) {\r\n $el.css(\"transition-duration\", duration + \"ms\");\r\n }\r\n\r\n // Start animation by changing CSS properties or class name\r\n if ($.isPlainObject(to)) {\r\n if (to.scaleX !== undefined && to.scaleY !== undefined) {\r\n delete to.width;\r\n delete to.height;\r\n\r\n if ($el.parent().hasClass(\"fancybox-slide--image\")) {\r\n $el.parent().addClass(\"fancybox-is-scaling\");\r\n }\r\n }\r\n\r\n $.fancybox.setTranslate($el, to);\r\n } else {\r\n $el.addClass(to);\r\n }\r\n\r\n // Make sure that `transitionend` callback gets fired\r\n $el.data(\r\n \"timer\",\r\n setTimeout(function () {\r\n $el.trigger(transitionEnd);\r\n }, duration + 33)\r\n );\r\n },\r\n\r\n stop: function ($el, callCallback) {\r\n if ($el && $el.length) {\r\n clearTimeout($el.data(\"timer\"));\r\n\r\n if (callCallback) {\r\n $el.trigger(transitionEnd);\r\n }\r\n\r\n $el.off(transitionEnd).css(\"transition-duration\", \"\");\r\n\r\n $el.parent().removeClass(\"fancybox-is-scaling\");\r\n }\r\n }\r\n };\r\n\r\n // Default click handler for \"fancyboxed\" links\r\n // ============================================\r\n\r\n function _run(e, opts) {\r\n var items = [],\r\n index = 0,\r\n $target,\r\n value,\r\n instance;\r\n\r\n // Avoid opening multiple times\r\n if (e && e.isDefaultPrevented()) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n\r\n opts = opts || {};\r\n\r\n if (e && e.data) {\r\n opts = mergeOpts(e.data.options, opts);\r\n }\r\n\r\n $target = opts.$target || $(e.currentTarget).trigger(\"blur\");\r\n instance = $.fancybox.getInstance();\r\n\r\n if (instance && instance.$trigger && instance.$trigger.is($target)) {\r\n return;\r\n }\r\n\r\n if (opts.selector) {\r\n items = $(opts.selector);\r\n } else {\r\n // Get all related items and find index for clicked one\r\n value = $target.attr(\"data-fancybox\") || \"\";\r\n\r\n if (value) {\r\n items = e.data ? e.data.items : [];\r\n items = items.length ? items.filter('[data-fancybox=\"' + value + '\"]') : $('[data-fancybox=\"' + value + '\"]');\r\n } else {\r\n items = [$target];\r\n }\r\n }\r\n\r\n index = $(items).index($target);\r\n\r\n // Sometimes current item can not be found\r\n if (index < 0) {\r\n index = 0;\r\n }\r\n\r\n instance = $.fancybox.open(items, opts, index);\r\n\r\n // Save last active element\r\n instance.$trigger = $target;\r\n }\r\n\r\n // Create a jQuery plugin\r\n // ======================\r\n\r\n $.fn.fancybox = function (options) {\r\n var selector;\r\n\r\n options = options || {};\r\n selector = options.selector || false;\r\n\r\n if (selector) {\r\n // Use body element instead of document so it executes first\r\n $(\"body\")\r\n .off(\"click.fb-start\", selector)\r\n .on(\"click.fb-start\", selector, {\r\n options: options\r\n }, _run);\r\n } else {\r\n this.off(\"click.fb-start\").on(\r\n \"click.fb-start\", {\r\n items: this,\r\n options: options\r\n },\r\n _run\r\n );\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // Self initializing plugin for all elements having `data-fancybox` attribute\r\n // ==========================================================================\r\n\r\n $D.on(\"click.fb-start\", \"[data-fancybox]\", _run);\r\n\r\n // Enable \"trigger elements\"\r\n // =========================\r\n\r\n $D.on(\"click.fb-start\", \"[data-fancybox-trigger]\", function (e) {\r\n $('[data-fancybox=\"' + $(this).attr(\"data-fancybox-trigger\") + '\"]')\r\n .eq($(this).attr(\"data-fancybox-index\") || 0)\r\n .trigger(\"click.fb-start\", {\r\n $trigger: $(this)\r\n });\r\n });\r\n\r\n // Track focus event for better accessibility styling\r\n // ==================================================\r\n (function () {\r\n var buttonStr = \".fancybox-button\",\r\n focusStr = \"fancybox-focus\",\r\n $pressed = null;\r\n\r\n $D.on(\"mousedown mouseup focus blur\", buttonStr, function (e) {\r\n switch (e.type) {\r\n case \"mousedown\":\r\n $pressed = $(this);\r\n break;\r\n case \"mouseup\":\r\n $pressed = null;\r\n break;\r\n case \"focusin\":\r\n $(buttonStr).removeClass(focusStr);\r\n\r\n if (!$(this).is($pressed) && !$(this).is(\"[disabled]\")) {\r\n $(this).addClass(focusStr);\r\n }\r\n break;\r\n case \"focusout\":\r\n $(buttonStr).removeClass(focusStr);\r\n break;\r\n }\r\n });\r\n })();\r\n})(window, document, jQuery);\n// ==========================================================================\r\n//\r\n// Media\r\n// Adds additional media type support\r\n//\r\n// ==========================================================================\r\n(function ($) {\r\n \"use strict\";\r\n\r\n // Object containing properties for each media type\r\n var defaults = {\r\n youtube: {\r\n matcher: /(youtube\\.com|youtu\\.be|youtube\\-nocookie\\.com)\\/(watch\\?(.*&)?v=|v\\/|u\\/|embed\\/?)?(videoseries\\?list=(.*)|[\\w-]{11}|\\?listType=(.*)&list=(.*))(.*)/i,\r\n params: {\r\n autoplay: 1,\r\n autohide: 1,\r\n fs: 1,\r\n rel: 0,\r\n hd: 1,\r\n wmode: \"transparent\",\r\n enablejsapi: 1,\r\n html5: 1\r\n },\r\n paramPlace: 8,\r\n type: \"iframe\",\r\n url: \"https://www.youtube-nocookie.com/embed/$4\",\r\n thumb: \"https://img.youtube.com/vi/$4/hqdefault.jpg\"\r\n },\r\n\r\n vimeo: {\r\n matcher: /^.+vimeo.com\\/(.*\\/)?([\\d]+)(.*)?/,\r\n params: {\r\n autoplay: 1,\r\n hd: 1,\r\n show_title: 1,\r\n show_byline: 1,\r\n show_portrait: 0,\r\n fullscreen: 1\r\n },\r\n paramPlace: 3,\r\n type: \"iframe\",\r\n url: \"//player.vimeo.com/video/$2\"\r\n },\r\n\r\n instagram: {\r\n matcher: /(instagr\\.am|instagram\\.com)\\/p\\/([a-zA-Z0-9_\\-]+)\\/?/i,\r\n type: \"image\",\r\n url: \"//$1/p/$2/media/?size=l\"\r\n },\r\n\r\n // Examples:\r\n // http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16\r\n // https://www.google.com/maps/@37.7852006,-122.4146355,14.65z\r\n // https://www.google.com/maps/@52.2111123,2.9237542,6.61z?hl=en\r\n // https://www.google.com/maps/place/Googleplex/@37.4220041,-122.0833494,17z/data=!4m5!3m4!1s0x0:0x6c296c66619367e0!8m2!3d37.4219998!4d-122.0840572\r\n gmap_place: {\r\n matcher: /(maps\\.)?google\\.([a-z]{2,3}(\\.[a-z]{2})?)\\/(((maps\\/(place\\/(.*)\\/)?\\@(.*),(\\d+.?\\d+?)z))|(\\?ll=))(.*)?/i,\r\n type: \"iframe\",\r\n url: function (rez) {\r\n return (\r\n \"//maps.google.\" +\r\n rez[2] +\r\n \"/?ll=\" +\r\n (rez[9] ? rez[9] + \"&z=\" + Math.floor(rez[10]) + (rez[12] ? rez[12].replace(/^\\//, \"&\") : \"\") : rez[12] + \"\").replace(/\\?/, \"&\") +\r\n \"&output=\" +\r\n (rez[12] && rez[12].indexOf(\"layer=c\") > 0 ? \"svembed\" : \"embed\")\r\n );\r\n }\r\n },\r\n\r\n // Examples:\r\n // https://www.google.com/maps/search/Empire+State+Building/\r\n // https://www.google.com/maps/search/?api=1&query=centurylink+field\r\n // https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393\r\n gmap_search: {\r\n matcher: /(maps\\.)?google\\.([a-z]{2,3}(\\.[a-z]{2})?)\\/(maps\\/search\\/)(.*)/i,\r\n type: \"iframe\",\r\n url: function (rez) {\r\n return \"//maps.google.\" + rez[2] + \"/maps?q=\" + rez[5].replace(\"query=\", \"q=\").replace(\"api=1\", \"\") + \"&output=embed\";\r\n }\r\n }\r\n };\r\n\r\n // Formats matching url to final form\r\n var format = function (url, rez, params) {\r\n if (!url) {\r\n return;\r\n }\r\n\r\n params = params || \"\";\r\n\r\n if ($.type(params) === \"object\") {\r\n params = $.param(params, true);\r\n }\r\n\r\n $.each(rez, function (key, value) {\r\n url = url.replace(\"$\" + key, value || \"\");\r\n });\r\n\r\n if (params.length) {\r\n url += (url.indexOf(\"?\") > 0 ? \"&\" : \"?\") + params;\r\n }\r\n\r\n return url;\r\n };\r\n\r\n $(document).on(\"objectNeedsType.fb\", function (e, instance, item) {\r\n var url = item.src || \"\",\r\n type = false,\r\n media,\r\n thumb,\r\n rez,\r\n params,\r\n urlParams,\r\n paramObj,\r\n provider;\r\n\r\n media = $.extend(true, {}, defaults, item.opts.media);\r\n\r\n // Look for any matching media type\r\n $.each(media, function (providerName, providerOpts) {\r\n rez = url.match(providerOpts.matcher);\r\n\r\n if (!rez) {\r\n return;\r\n }\r\n\r\n type = providerOpts.type;\r\n provider = providerName;\r\n paramObj = {};\r\n\r\n if (providerOpts.paramPlace && rez[providerOpts.paramPlace]) {\r\n urlParams = rez[providerOpts.paramPlace];\r\n\r\n if (urlParams[0] == \"?\") {\r\n urlParams = urlParams.substring(1);\r\n }\r\n\r\n urlParams = urlParams.split(\"&\");\r\n\r\n for (var m = 0; m < urlParams.length; ++m) {\r\n var p = urlParams[m].split(\"=\", 2);\r\n\r\n if (p.length == 2) {\r\n paramObj[p[0]] = decodeURIComponent(p[1].replace(/\\+/g, \" \"));\r\n }\r\n }\r\n }\r\n\r\n params = $.extend(true, {}, providerOpts.params, item.opts[providerName], paramObj);\r\n\r\n url =\r\n $.type(providerOpts.url) === \"function\" ? providerOpts.url.call(this, rez, params, item) : format(providerOpts.url, rez, params);\r\n\r\n thumb =\r\n $.type(providerOpts.thumb) === \"function\" ? providerOpts.thumb.call(this, rez, params, item) : format(providerOpts.thumb, rez);\r\n\r\n if (providerName === \"youtube\") {\r\n url = url.replace(/&t=((\\d+)m)?(\\d+)s/, function (match, p1, m, s) {\r\n return \"&start=\" + ((m ? parseInt(m, 10) * 60 : 0) + parseInt(s, 10));\r\n });\r\n } else if (providerName === \"vimeo\") {\r\n url = url.replace(\"&%23\", \"#\");\r\n }\r\n\r\n return false;\r\n });\r\n\r\n // If it is found, then change content type and update the url\r\n\r\n if (type) {\r\n if (!item.opts.thumb && !(item.opts.$thumb && item.opts.$thumb.length)) {\r\n item.opts.thumb = thumb;\r\n }\r\n\r\n if (type === \"iframe\") {\r\n item.opts = $.extend(true, item.opts, {\r\n iframe: {\r\n preload: false,\r\n attr: {\r\n scrolling: \"no\"\r\n }\r\n }\r\n });\r\n }\r\n\r\n $.extend(item, {\r\n type: type,\r\n src: url,\r\n origSrc: item.src,\r\n contentSource: provider,\r\n contentType: type === \"image\" ? \"image\" : provider == \"gmap_place\" || provider == \"gmap_search\" ? \"map\" : \"video\"\r\n });\r\n } else if (url) {\r\n item.type = item.opts.defaultType;\r\n }\r\n });\r\n\r\n // Load YouTube/Video API on request to detect when video finished playing\r\n var VideoAPILoader = {\r\n youtube: {\r\n src: \"https://www.youtube.com/iframe_api\",\r\n class: \"YT\",\r\n loading: false,\r\n loaded: false\r\n },\r\n\r\n vimeo: {\r\n src: \"https://player.vimeo.com/api/player.js\",\r\n class: \"Vimeo\",\r\n loading: false,\r\n loaded: false\r\n },\r\n\r\n load: function (vendor) {\r\n var _this = this,\r\n script;\r\n\r\n if (this[vendor].loaded) {\r\n setTimeout(function () {\r\n _this.done(vendor);\r\n });\r\n return;\r\n }\r\n\r\n if (this[vendor].loading) {\r\n return;\r\n }\r\n\r\n this[vendor].loading = true;\r\n\r\n script = document.createElement(\"script\");\r\n script.type = \"text/javascript\";\r\n script.src = this[vendor].src;\r\n\r\n if (vendor === \"youtube\") {\r\n window.onYouTubeIframeAPIReady = function () {\r\n _this[vendor].loaded = true;\r\n _this.done(vendor);\r\n };\r\n } else {\r\n script.onload = function () {\r\n _this[vendor].loaded = true;\r\n _this.done(vendor);\r\n };\r\n }\r\n\r\n document.body.appendChild(script);\r\n },\r\n done: function (vendor) {\r\n var instance, $el, player;\r\n\r\n if (vendor === \"youtube\") {\r\n delete window.onYouTubeIframeAPIReady;\r\n }\r\n\r\n instance = $.fancybox.getInstance();\r\n\r\n if (instance) {\r\n $el = instance.current.$content.find(\"iframe\");\r\n\r\n if (vendor === \"youtube\" && YT !== undefined && YT) {\r\n player = new YT.Player($el.attr(\"id\"), {\r\n events: {\r\n onStateChange: function (e) {\r\n if (e.data == 0) {\r\n instance.next();\r\n }\r\n }\r\n }\r\n });\r\n } else if (vendor === \"vimeo\" && Vimeo !== undefined && Vimeo) {\r\n player = new Vimeo.Player($el);\r\n\r\n player.on(\"ended\", function () {\r\n instance.next();\r\n });\r\n }\r\n }\r\n }\r\n };\r\n\r\n $(document).on({\r\n \"afterShow.fb\": function (e, instance, current) {\r\n if (instance.group.length > 1 && (current.contentSource === \"youtube\" || current.contentSource === \"vimeo\")) {\r\n VideoAPILoader.load(current.contentSource);\r\n }\r\n }\r\n });\r\n})(jQuery);\n// ==========================================================================\r\n//\r\n// Guestures\r\n// Adds touch guestures, handles click and tap events\r\n//\r\n// ==========================================================================\r\n(function (window, document, $) {\r\n \"use strict\";\r\n\r\n var requestAFrame = (function () {\r\n return (\r\n window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.oRequestAnimationFrame ||\r\n // if all else fails, use setTimeout\r\n function (callback) {\r\n return window.setTimeout(callback, 1000 / 60);\r\n }\r\n );\r\n })();\r\n\r\n var cancelAFrame = (function () {\r\n return (\r\n window.cancelAnimationFrame ||\r\n window.webkitCancelAnimationFrame ||\r\n window.mozCancelAnimationFrame ||\r\n window.oCancelAnimationFrame ||\r\n function (id) {\r\n window.clearTimeout(id);\r\n }\r\n );\r\n })();\r\n\r\n var getPointerXY = function (e) {\r\n var result = [];\r\n\r\n e = e.originalEvent || e || window.e;\r\n e = e.touches && e.touches.length ? e.touches : e.changedTouches && e.changedTouches.length ? e.changedTouches : [e];\r\n\r\n for (var key in e) {\r\n if (e[key].pageX) {\r\n result.push({\r\n x: e[key].pageX,\r\n y: e[key].pageY\r\n });\r\n } else if (e[key].clientX) {\r\n result.push({\r\n x: e[key].clientX,\r\n y: e[key].clientY\r\n });\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n var distance = function (point2, point1, what) {\r\n if (!point1 || !point2) {\r\n return 0;\r\n }\r\n\r\n if (what === \"x\") {\r\n return point2.x - point1.x;\r\n } else if (what === \"y\") {\r\n return point2.y - point1.y;\r\n }\r\n\r\n return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));\r\n };\r\n\r\n var isClickable = function ($el) {\r\n if (\r\n $el.is('a,area,button,[role=\"button\"],input,label,select,summary,textarea,video,audio,iframe') ||\r\n $.isFunction($el.get(0).onclick) ||\r\n $el.data(\"selectable\")\r\n ) {\r\n return true;\r\n }\r\n\r\n // Check for attributes like data-fancybox-next or data-fancybox-close\r\n for (var i = 0, atts = $el[0].attributes, n = atts.length; i < n; i++) {\r\n if (atts[i].nodeName.substr(0, 14) === \"data-fancybox-\") {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n var hasScrollbars = function (el) {\r\n var overflowY = window.getComputedStyle(el)[\"overflow-y\"],\r\n overflowX = window.getComputedStyle(el)[\"overflow-x\"],\r\n vertical = (overflowY === \"scroll\" || overflowY === \"auto\") && el.scrollHeight > el.clientHeight,\r\n horizontal = (overflowX === \"scroll\" || overflowX === \"auto\") && el.scrollWidth > el.clientWidth;\r\n\r\n return vertical || horizontal;\r\n };\r\n\r\n var isScrollable = function ($el) {\r\n var rez = false;\r\n\r\n while (true) {\r\n rez = hasScrollbars($el.get(0));\r\n\r\n if (rez) {\r\n break;\r\n }\r\n\r\n $el = $el.parent();\r\n\r\n if (!$el.length || $el.hasClass(\"fancybox-stage\") || $el.is(\"body\")) {\r\n break;\r\n }\r\n }\r\n\r\n return rez;\r\n };\r\n\r\n var Guestures = function (instance) {\r\n var self = this;\r\n\r\n self.instance = instance;\r\n\r\n self.$bg = instance.$refs.bg;\r\n self.$stage = instance.$refs.stage;\r\n self.$container = instance.$refs.container;\r\n\r\n self.destroy();\r\n\r\n self.$container.on(\"touchstart.fb.touch mousedown.fb.touch\", $.proxy(self, \"ontouchstart\"));\r\n };\r\n\r\n Guestures.prototype.destroy = function () {\r\n var self = this;\r\n\r\n self.$container.off(\".fb.touch\");\r\n\r\n $(document).off(\".fb.touch\");\r\n\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n self.requestId = null;\r\n }\r\n\r\n if (self.tapped) {\r\n clearTimeout(self.tapped);\r\n self.tapped = null;\r\n }\r\n };\r\n\r\n Guestures.prototype.ontouchstart = function (e) {\r\n var self = this,\r\n $target = $(e.target),\r\n instance = self.instance,\r\n current = instance.current,\r\n $slide = current.$slide,\r\n $content = current.$content,\r\n isTouchDevice = e.type == \"touchstart\";\r\n\r\n // Do not respond to both (touch and mouse) events\r\n if (isTouchDevice) {\r\n self.$container.off(\"mousedown.fb.touch\");\r\n }\r\n\r\n // Ignore right click\r\n if (e.originalEvent && e.originalEvent.button == 2) {\r\n return;\r\n }\r\n\r\n // Ignore taping on links, buttons, input elements\r\n if (!$slide.length || !$target.length || isClickable($target) || isClickable($target.parent())) {\r\n return;\r\n }\r\n // Ignore clicks on the scrollbar\r\n if (!$target.is(\"img\") && e.originalEvent.clientX > $target[0].clientWidth + $target.offset().left) {\r\n return;\r\n }\r\n\r\n // Ignore clicks while zooming or closing\r\n if (!current || instance.isAnimating || current.$slide.hasClass(\"fancybox-animated\")) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n return;\r\n }\r\n\r\n self.realPoints = self.startPoints = getPointerXY(e);\r\n\r\n if (!self.startPoints.length) {\r\n return;\r\n }\r\n\r\n // Allow other scripts to catch touch event if \"touch\" is set to false\r\n if (current.touch) {\r\n e.stopPropagation();\r\n }\r\n\r\n self.startEvent = e;\r\n\r\n self.canTap = true;\r\n self.$target = $target;\r\n self.$content = $content;\r\n self.opts = current.opts.touch;\r\n\r\n self.isPanning = false;\r\n self.isSwiping = false;\r\n self.isZooming = false;\r\n self.isScrolling = false;\r\n self.canPan = instance.canPan();\r\n\r\n self.startTime = new Date().getTime();\r\n self.distanceX = self.distanceY = self.distance = 0;\r\n\r\n self.canvasWidth = Math.round($slide[0].clientWidth);\r\n self.canvasHeight = Math.round($slide[0].clientHeight);\r\n\r\n self.contentLastPos = null;\r\n self.contentStartPos = $.fancybox.getTranslate(self.$content) || {\r\n top: 0,\r\n left: 0\r\n };\r\n self.sliderStartPos = $.fancybox.getTranslate($slide);\r\n\r\n // Since position will be absolute, but we need to make it relative to the stage\r\n self.stagePos = $.fancybox.getTranslate(instance.$refs.stage);\r\n\r\n self.sliderStartPos.top -= self.stagePos.top;\r\n self.sliderStartPos.left -= self.stagePos.left;\r\n\r\n self.contentStartPos.top -= self.stagePos.top;\r\n self.contentStartPos.left -= self.stagePos.left;\r\n\r\n $(document)\r\n .off(\".fb.touch\")\r\n .on(isTouchDevice ? \"touchend.fb.touch touchcancel.fb.touch\" : \"mouseup.fb.touch mouseleave.fb.touch\", $.proxy(self, \"ontouchend\"))\r\n .on(isTouchDevice ? \"touchmove.fb.touch\" : \"mousemove.fb.touch\", $.proxy(self, \"ontouchmove\"));\r\n\r\n if ($.fancybox.isMobile) {\r\n document.addEventListener(\"scroll\", self.onscroll, true);\r\n }\r\n\r\n // Skip if clicked outside the sliding area\r\n if (!(self.opts || self.canPan) || !($target.is(self.$stage) || self.$stage.find($target).length)) {\r\n if ($target.is(\".fancybox-image\")) {\r\n e.preventDefault();\r\n }\r\n\r\n if (!($.fancybox.isMobile && $target.parents(\".fancybox-caption\").length)) {\r\n return;\r\n }\r\n }\r\n\r\n self.isScrollable = isScrollable($target) || isScrollable($target.parent());\r\n\r\n // Check if element is scrollable and try to prevent default behavior (scrolling)\r\n if (!($.fancybox.isMobile && self.isScrollable)) {\r\n e.preventDefault();\r\n }\r\n\r\n // One finger or mouse click - swipe or pan an image\r\n if (self.startPoints.length === 1 || current.hasError) {\r\n if (self.canPan) {\r\n $.fancybox.stop(self.$content);\r\n\r\n self.isPanning = true;\r\n } else {\r\n self.isSwiping = true;\r\n }\r\n\r\n self.$container.addClass(\"fancybox-is-grabbing\");\r\n }\r\n\r\n // Two fingers - zoom image\r\n if (self.startPoints.length === 2 && current.type === \"image\" && (current.isLoaded || current.$ghost)) {\r\n self.canTap = false;\r\n self.isSwiping = false;\r\n self.isPanning = false;\r\n\r\n self.isZooming = true;\r\n\r\n $.fancybox.stop(self.$content);\r\n\r\n self.centerPointStartX = (self.startPoints[0].x + self.startPoints[1].x) * 0.5 - $(window).scrollLeft();\r\n self.centerPointStartY = (self.startPoints[0].y + self.startPoints[1].y) * 0.5 - $(window).scrollTop();\r\n\r\n self.percentageOfImageAtPinchPointX = (self.centerPointStartX - self.contentStartPos.left) / self.contentStartPos.width;\r\n self.percentageOfImageAtPinchPointY = (self.centerPointStartY - self.contentStartPos.top) / self.contentStartPos.height;\r\n\r\n self.startDistanceBetweenFingers = distance(self.startPoints[0], self.startPoints[1]);\r\n }\r\n };\r\n\r\n Guestures.prototype.onscroll = function (e) {\r\n var self = this;\r\n\r\n self.isScrolling = true;\r\n\r\n document.removeEventListener(\"scroll\", self.onscroll, true);\r\n };\r\n\r\n Guestures.prototype.ontouchmove = function (e) {\r\n var self = this;\r\n\r\n // Make sure user has not released over iframe or disabled element\r\n if (e.originalEvent.buttons !== undefined && e.originalEvent.buttons === 0) {\r\n self.ontouchend(e);\r\n return;\r\n }\r\n\r\n if (self.isScrolling) {\r\n self.canTap = false;\r\n return;\r\n }\r\n\r\n self.newPoints = getPointerXY(e);\r\n\r\n if (!(self.opts || self.canPan) || !self.newPoints.length || !self.newPoints.length) {\r\n return;\r\n }\r\n\r\n if (!(self.isSwiping && self.isSwiping === true)) {\r\n e.preventDefault();\r\n }\r\n\r\n self.distanceX = distance(self.newPoints[0], self.startPoints[0], \"x\");\r\n self.distanceY = distance(self.newPoints[0], self.startPoints[0], \"y\");\r\n\r\n self.distance = distance(self.newPoints[0], self.startPoints[0]);\r\n\r\n // Skip false ontouchmove events (Chrome)\r\n if (self.distance > 0) {\r\n if (self.isSwiping) {\r\n self.onSwipe(e);\r\n } else if (self.isPanning) {\r\n self.onPan();\r\n } else if (self.isZooming) {\r\n self.onZoom();\r\n }\r\n }\r\n };\r\n\r\n Guestures.prototype.onSwipe = function (e) {\r\n var self = this,\r\n instance = self.instance,\r\n swiping = self.isSwiping,\r\n left = self.sliderStartPos.left || 0,\r\n angle;\r\n\r\n // If direction is not yet determined\r\n if (swiping === true) {\r\n // We need at least 10px distance to correctly calculate an angle\r\n if (Math.abs(self.distance) > 10) {\r\n self.canTap = false;\r\n\r\n if (instance.group.length < 2 && self.opts.vertical) {\r\n self.isSwiping = \"y\";\r\n } else if (instance.isDragging || self.opts.vertical === false || (self.opts.vertical === \"auto\" && $(window).width() > 800)) {\r\n self.isSwiping = \"x\";\r\n } else {\r\n angle = Math.abs((Math.atan2(self.distanceY, self.distanceX) * 180) / Math.PI);\r\n\r\n self.isSwiping = angle > 45 && angle < 135 ? \"y\" : \"x\";\r\n }\r\n\r\n if (self.isSwiping === \"y\" && $.fancybox.isMobile && self.isScrollable) {\r\n self.isScrolling = true;\r\n\r\n return;\r\n }\r\n\r\n instance.isDragging = self.isSwiping;\r\n\r\n // Reset points to avoid jumping, because we dropped first swipes to calculate the angle\r\n self.startPoints = self.newPoints;\r\n\r\n $.each(instance.slides, function (index, slide) {\r\n var slidePos, stagePos;\r\n\r\n $.fancybox.stop(slide.$slide);\r\n\r\n slidePos = $.fancybox.getTranslate(slide.$slide);\r\n stagePos = $.fancybox.getTranslate(instance.$refs.stage);\r\n\r\n slide.$slide\r\n .css({\r\n transform: \"\",\r\n opacity: \"\",\r\n \"transition-duration\": \"\"\r\n })\r\n .removeClass(\"fancybox-animated\")\r\n .removeClass(function (index, className) {\r\n return (className.match(/(^|\\s)fancybox-fx-\\S+/g) || []).join(\" \");\r\n });\r\n\r\n if (slide.pos === instance.current.pos) {\r\n self.sliderStartPos.top = slidePos.top - stagePos.top;\r\n self.sliderStartPos.left = slidePos.left - stagePos.left;\r\n }\r\n\r\n $.fancybox.setTranslate(slide.$slide, {\r\n top: slidePos.top - stagePos.top,\r\n left: slidePos.left - stagePos.left\r\n });\r\n });\r\n\r\n // Stop slideshow\r\n if (instance.SlideShow && instance.SlideShow.isActive) {\r\n instance.SlideShow.stop();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Sticky edges\r\n if (swiping == \"x\") {\r\n if (\r\n self.distanceX > 0 &&\r\n (self.instance.group.length < 2 || (self.instance.current.index === 0 && !self.instance.current.opts.loop))\r\n ) {\r\n left = left + Math.pow(self.distanceX, 0.8);\r\n } else if (\r\n self.distanceX < 0 &&\r\n (self.instance.group.length < 2 ||\r\n (self.instance.current.index === self.instance.group.length - 1 && !self.instance.current.opts.loop))\r\n ) {\r\n left = left - Math.pow(-self.distanceX, 0.8);\r\n } else {\r\n left = left + self.distanceX;\r\n }\r\n }\r\n\r\n self.sliderLastPos = {\r\n top: swiping == \"x\" ? 0 : self.sliderStartPos.top + self.distanceY,\r\n left: left\r\n };\r\n\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n\r\n self.requestId = null;\r\n }\r\n\r\n self.requestId = requestAFrame(function () {\r\n if (self.sliderLastPos) {\r\n $.each(self.instance.slides, function (index, slide) {\r\n var pos = slide.pos - self.instance.currPos;\r\n\r\n $.fancybox.setTranslate(slide.$slide, {\r\n top: self.sliderLastPos.top,\r\n left: self.sliderLastPos.left + pos * self.canvasWidth + pos * slide.opts.gutter\r\n });\r\n });\r\n\r\n self.$container.addClass(\"fancybox-is-sliding\");\r\n }\r\n });\r\n };\r\n\r\n Guestures.prototype.onPan = function () {\r\n var self = this;\r\n\r\n // Prevent accidental movement (sometimes, when tapping casually, finger can move a bit)\r\n if (distance(self.newPoints[0], self.realPoints[0]) < ($.fancybox.isMobile ? 10 : 5)) {\r\n self.startPoints = self.newPoints;\r\n return;\r\n }\r\n\r\n self.canTap = false;\r\n\r\n self.contentLastPos = self.limitMovement();\r\n\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n }\r\n\r\n self.requestId = requestAFrame(function () {\r\n $.fancybox.setTranslate(self.$content, self.contentLastPos);\r\n });\r\n };\r\n\r\n // Make panning sticky to the edges\r\n Guestures.prototype.limitMovement = function () {\r\n var self = this;\r\n\r\n var canvasWidth = self.canvasWidth;\r\n var canvasHeight = self.canvasHeight;\r\n\r\n var distanceX = self.distanceX;\r\n var distanceY = self.distanceY;\r\n\r\n var contentStartPos = self.contentStartPos;\r\n\r\n var currentOffsetX = contentStartPos.left;\r\n var currentOffsetY = contentStartPos.top;\r\n\r\n var currentWidth = contentStartPos.width;\r\n var currentHeight = contentStartPos.height;\r\n\r\n var minTranslateX, minTranslateY, maxTranslateX, maxTranslateY, newOffsetX, newOffsetY;\r\n\r\n if (currentWidth > canvasWidth) {\r\n newOffsetX = currentOffsetX + distanceX;\r\n } else {\r\n newOffsetX = currentOffsetX;\r\n }\r\n\r\n newOffsetY = currentOffsetY + distanceY;\r\n\r\n // Slow down proportionally to traveled distance\r\n minTranslateX = Math.max(0, canvasWidth * 0.5 - currentWidth * 0.5);\r\n minTranslateY = Math.max(0, canvasHeight * 0.5 - currentHeight * 0.5);\r\n\r\n maxTranslateX = Math.min(canvasWidth - currentWidth, canvasWidth * 0.5 - currentWidth * 0.5);\r\n maxTranslateY = Math.min(canvasHeight - currentHeight, canvasHeight * 0.5 - currentHeight * 0.5);\r\n\r\n // ->\r\n if (distanceX > 0 && newOffsetX > minTranslateX) {\r\n newOffsetX = minTranslateX - 1 + Math.pow(-minTranslateX + currentOffsetX + distanceX, 0.8) || 0;\r\n }\r\n\r\n // <-\r\n if (distanceX < 0 && newOffsetX < maxTranslateX) {\r\n newOffsetX = maxTranslateX + 1 - Math.pow(maxTranslateX - currentOffsetX - distanceX, 0.8) || 0;\r\n }\r\n\r\n // \\/\r\n if (distanceY > 0 && newOffsetY > minTranslateY) {\r\n newOffsetY = minTranslateY - 1 + Math.pow(-minTranslateY + currentOffsetY + distanceY, 0.8) || 0;\r\n }\r\n\r\n // /\\\r\n if (distanceY < 0 && newOffsetY < maxTranslateY) {\r\n newOffsetY = maxTranslateY + 1 - Math.pow(maxTranslateY - currentOffsetY - distanceY, 0.8) || 0;\r\n }\r\n\r\n return {\r\n top: newOffsetY,\r\n left: newOffsetX\r\n };\r\n };\r\n\r\n Guestures.prototype.limitPosition = function (newOffsetX, newOffsetY, newWidth, newHeight) {\r\n var self = this;\r\n\r\n var canvasWidth = self.canvasWidth;\r\n var canvasHeight = self.canvasHeight;\r\n\r\n if (newWidth > canvasWidth) {\r\n newOffsetX = newOffsetX > 0 ? 0 : newOffsetX;\r\n newOffsetX = newOffsetX < canvasWidth - newWidth ? canvasWidth - newWidth : newOffsetX;\r\n } else {\r\n // Center horizontally\r\n newOffsetX = Math.max(0, canvasWidth / 2 - newWidth / 2);\r\n }\r\n\r\n if (newHeight > canvasHeight) {\r\n newOffsetY = newOffsetY > 0 ? 0 : newOffsetY;\r\n newOffsetY = newOffsetY < canvasHeight - newHeight ? canvasHeight - newHeight : newOffsetY;\r\n } else {\r\n // Center vertically\r\n newOffsetY = Math.max(0, canvasHeight / 2 - newHeight / 2);\r\n }\r\n\r\n return {\r\n top: newOffsetY,\r\n left: newOffsetX\r\n };\r\n };\r\n\r\n Guestures.prototype.onZoom = function () {\r\n var self = this;\r\n\r\n // Calculate current distance between points to get pinch ratio and new width and height\r\n var contentStartPos = self.contentStartPos;\r\n\r\n var currentWidth = contentStartPos.width;\r\n var currentHeight = contentStartPos.height;\r\n\r\n var currentOffsetX = contentStartPos.left;\r\n var currentOffsetY = contentStartPos.top;\r\n\r\n var endDistanceBetweenFingers = distance(self.newPoints[0], self.newPoints[1]);\r\n\r\n var pinchRatio = endDistanceBetweenFingers / self.startDistanceBetweenFingers;\r\n\r\n var newWidth = Math.floor(currentWidth * pinchRatio);\r\n var newHeight = Math.floor(currentHeight * pinchRatio);\r\n\r\n // This is the translation due to pinch-zooming\r\n var translateFromZoomingX = (currentWidth - newWidth) * self.percentageOfImageAtPinchPointX;\r\n var translateFromZoomingY = (currentHeight - newHeight) * self.percentageOfImageAtPinchPointY;\r\n\r\n // Point between the two touches\r\n var centerPointEndX = (self.newPoints[0].x + self.newPoints[1].x) / 2 - $(window).scrollLeft();\r\n var centerPointEndY = (self.newPoints[0].y + self.newPoints[1].y) / 2 - $(window).scrollTop();\r\n\r\n // And this is the translation due to translation of the centerpoint\r\n // between the two fingers\r\n var translateFromTranslatingX = centerPointEndX - self.centerPointStartX;\r\n var translateFromTranslatingY = centerPointEndY - self.centerPointStartY;\r\n\r\n // The new offset is the old/current one plus the total translation\r\n var newOffsetX = currentOffsetX + (translateFromZoomingX + translateFromTranslatingX);\r\n var newOffsetY = currentOffsetY + (translateFromZoomingY + translateFromTranslatingY);\r\n\r\n var newPos = {\r\n top: newOffsetY,\r\n left: newOffsetX,\r\n scaleX: pinchRatio,\r\n scaleY: pinchRatio\r\n };\r\n\r\n self.canTap = false;\r\n\r\n self.newWidth = newWidth;\r\n self.newHeight = newHeight;\r\n\r\n self.contentLastPos = newPos;\r\n\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n }\r\n\r\n self.requestId = requestAFrame(function () {\r\n $.fancybox.setTranslate(self.$content, self.contentLastPos);\r\n });\r\n };\r\n\r\n Guestures.prototype.ontouchend = function (e) {\r\n var self = this;\r\n\r\n var swiping = self.isSwiping;\r\n var panning = self.isPanning;\r\n var zooming = self.isZooming;\r\n var scrolling = self.isScrolling;\r\n\r\n self.endPoints = getPointerXY(e);\r\n self.dMs = Math.max(new Date().getTime() - self.startTime, 1);\r\n\r\n self.$container.removeClass(\"fancybox-is-grabbing\");\r\n\r\n $(document).off(\".fb.touch\");\r\n\r\n document.removeEventListener(\"scroll\", self.onscroll, true);\r\n\r\n if (self.requestId) {\r\n cancelAFrame(self.requestId);\r\n\r\n self.requestId = null;\r\n }\r\n\r\n self.isSwiping = false;\r\n self.isPanning = false;\r\n self.isZooming = false;\r\n self.isScrolling = false;\r\n\r\n self.instance.isDragging = false;\r\n\r\n if (self.canTap) {\r\n return self.onTap(e);\r\n }\r\n\r\n self.speed = 100;\r\n\r\n // Speed in px/ms\r\n self.velocityX = (self.distanceX / self.dMs) * 0.5;\r\n self.velocityY = (self.distanceY / self.dMs) * 0.5;\r\n\r\n if (panning) {\r\n self.endPanning();\r\n } else if (zooming) {\r\n self.endZooming();\r\n } else {\r\n self.endSwiping(swiping, scrolling);\r\n }\r\n\r\n return;\r\n };\r\n\r\n Guestures.prototype.endSwiping = function (swiping, scrolling) {\r\n var self = this,\r\n ret = false,\r\n len = self.instance.group.length,\r\n distanceX = Math.abs(self.distanceX),\r\n canAdvance = swiping == \"x\" && len > 1 && ((self.dMs > 130 && distanceX > 10) || distanceX > 50),\r\n speedX = 300;\r\n\r\n self.sliderLastPos = null;\r\n\r\n // Close if swiped vertically / navigate if horizontally\r\n if (swiping == \"y\" && !scrolling && Math.abs(self.distanceY) > 50) {\r\n // Continue vertical movement\r\n $.fancybox.animate(\r\n self.instance.current.$slide, {\r\n top: self.sliderStartPos.top + self.distanceY + self.velocityY * 150,\r\n opacity: 0\r\n },\r\n 200\r\n );\r\n ret = self.instance.close(true, 250);\r\n } else if (canAdvance && self.distanceX > 0) {\r\n ret = self.instance.previous(speedX);\r\n } else if (canAdvance && self.distanceX < 0) {\r\n ret = self.instance.next(speedX);\r\n }\r\n\r\n if (ret === false && (swiping == \"x\" || swiping == \"y\")) {\r\n self.instance.centerSlide(200);\r\n }\r\n\r\n self.$container.removeClass(\"fancybox-is-sliding\");\r\n };\r\n\r\n // Limit panning from edges\r\n // ========================\r\n Guestures.prototype.endPanning = function () {\r\n var self = this,\r\n newOffsetX,\r\n newOffsetY,\r\n newPos;\r\n\r\n if (!self.contentLastPos) {\r\n return;\r\n }\r\n\r\n if (self.opts.momentum === false || self.dMs > 350) {\r\n newOffsetX = self.contentLastPos.left;\r\n newOffsetY = self.contentLastPos.top;\r\n } else {\r\n // Continue movement\r\n newOffsetX = self.contentLastPos.left + self.velocityX * 500;\r\n newOffsetY = self.contentLastPos.top + self.velocityY * 500;\r\n }\r\n\r\n newPos = self.limitPosition(newOffsetX, newOffsetY, self.contentStartPos.width, self.contentStartPos.height);\r\n\r\n newPos.width = self.contentStartPos.width;\r\n newPos.height = self.contentStartPos.height;\r\n\r\n $.fancybox.animate(self.$content, newPos, 366);\r\n };\r\n\r\n Guestures.prototype.endZooming = function () {\r\n var self = this;\r\n\r\n var current = self.instance.current;\r\n\r\n var newOffsetX, newOffsetY, newPos, reset;\r\n\r\n var newWidth = self.newWidth;\r\n var newHeight = self.newHeight;\r\n\r\n if (!self.contentLastPos) {\r\n return;\r\n }\r\n\r\n newOffsetX = self.contentLastPos.left;\r\n newOffsetY = self.contentLastPos.top;\r\n\r\n reset = {\r\n top: newOffsetY,\r\n left: newOffsetX,\r\n width: newWidth,\r\n height: newHeight,\r\n scaleX: 1,\r\n scaleY: 1\r\n };\r\n\r\n // Reset scalex/scaleY values; this helps for perfomance and does not break animation\r\n $.fancybox.setTranslate(self.$content, reset);\r\n\r\n if (newWidth < self.canvasWidth && newHeight < self.canvasHeight) {\r\n self.instance.scaleToFit(150);\r\n } else if (newWidth > current.width || newHeight > current.height) {\r\n self.instance.scaleToActual(self.centerPointStartX, self.centerPointStartY, 150);\r\n } else {\r\n newPos = self.limitPosition(newOffsetX, newOffsetY, newWidth, newHeight);\r\n\r\n $.fancybox.animate(self.$content, newPos, 150);\r\n }\r\n };\r\n\r\n Guestures.prototype.onTap = function (e) {\r\n var self = this;\r\n var $target = $(e.target);\r\n\r\n var instance = self.instance;\r\n var current = instance.current;\r\n\r\n var endPoints = (e && getPointerXY(e)) || self.startPoints;\r\n\r\n var tapX = endPoints[0] ? endPoints[0].x - $(window).scrollLeft() - self.stagePos.left : 0;\r\n var tapY = endPoints[0] ? endPoints[0].y - $(window).scrollTop() - self.stagePos.top : 0;\r\n\r\n var where;\r\n\r\n var process = function (prefix) {\r\n var action = current.opts[prefix];\r\n\r\n if ($.isFunction(action)) {\r\n action = action.apply(instance, [current, e]);\r\n }\r\n\r\n if (!action) {\r\n return;\r\n }\r\n\r\n switch (action) {\r\n case \"close\":\r\n instance.close(self.startEvent);\r\n\r\n break;\r\n\r\n case \"toggleControls\":\r\n instance.toggleControls();\r\n\r\n break;\r\n\r\n case \"next\":\r\n instance.next();\r\n\r\n break;\r\n\r\n case \"nextOrClose\":\r\n if (instance.group.length > 1) {\r\n instance.next();\r\n } else {\r\n instance.close(self.startEvent);\r\n }\r\n\r\n break;\r\n\r\n case \"zoom\":\r\n if (current.type == \"image\" && (current.isLoaded || current.$ghost)) {\r\n if (instance.canPan()) {\r\n instance.scaleToFit();\r\n } else if (instance.isScaledDown()) {\r\n instance.scaleToActual(tapX, tapY);\r\n } else if (instance.group.length < 2) {\r\n instance.close(self.startEvent);\r\n }\r\n }\r\n\r\n break;\r\n }\r\n };\r\n\r\n // Ignore right click\r\n if (e.originalEvent && e.originalEvent.button == 2) {\r\n return;\r\n }\r\n\r\n // Skip if clicked on the scrollbar\r\n if (!$target.is(\"img\") && tapX > $target[0].clientWidth + $target.offset().left) {\r\n return;\r\n }\r\n\r\n // Check where is clicked\r\n if ($target.is(\".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container\")) {\r\n where = \"Outside\";\r\n } else if ($target.is(\".fancybox-slide\")) {\r\n where = \"Slide\";\r\n } else if (\r\n instance.current.$content &&\r\n instance.current.$content\r\n .find($target)\r\n .addBack()\r\n .filter($target).length\r\n ) {\r\n where = \"Content\";\r\n } else {\r\n return;\r\n }\r\n\r\n // Check if this is a double tap\r\n if (self.tapped) {\r\n // Stop previously created single tap\r\n clearTimeout(self.tapped);\r\n self.tapped = null;\r\n\r\n // Skip if distance between taps is too big\r\n if (Math.abs(tapX - self.tapX) > 50 || Math.abs(tapY - self.tapY) > 50) {\r\n return this;\r\n }\r\n\r\n // OK, now we assume that this is a double-tap\r\n process(\"dblclick\" + where);\r\n } else {\r\n // Single tap will be processed if user has not clicked second time within 300ms\r\n // or there is no need to wait for double-tap\r\n self.tapX = tapX;\r\n self.tapY = tapY;\r\n\r\n if (current.opts[\"dblclick\" + where] && current.opts[\"dblclick\" + where] !== current.opts[\"click\" + where]) {\r\n self.tapped = setTimeout(function () {\r\n self.tapped = null;\r\n\r\n if (!instance.isAnimating) {\r\n process(\"click\" + where);\r\n }\r\n }, 500);\r\n } else {\r\n process(\"click\" + where);\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n $(document)\r\n .on(\"onActivate.fb\", function (e, instance) {\r\n if (instance && !instance.Guestures) {\r\n instance.Guestures = new Guestures(instance);\r\n }\r\n })\r\n .on(\"beforeClose.fb\", function (e, instance) {\r\n if (instance && instance.Guestures) {\r\n instance.Guestures.destroy();\r\n }\r\n });\r\n})(window, document, jQuery);\n// ==========================================================================\r\n//\r\n// SlideShow\r\n// Enables slideshow functionality\r\n//\r\n// Example of usage:\r\n// $.fancybox.getInstance().SlideShow.start()\r\n//\r\n// ==========================================================================\r\n(function (document, $) {\r\n \"use strict\";\r\n\r\n $.extend(true, $.fancybox.defaults, {\r\n btnTpl: {\r\n slideShow: '<button data-fancybox-play class=\"fancybox-button fancybox-button--play\" title=\"{{PLAY_START}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M6.5 5.4v13.2l11-6.6z\"/></svg>' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z\"/></svg>' +\r\n \"</button>\"\r\n },\r\n slideShow: {\r\n autoStart: false,\r\n speed: 3000,\r\n progress: true\r\n }\r\n });\r\n\r\n var SlideShow = function (instance) {\r\n this.instance = instance;\r\n this.init();\r\n };\r\n\r\n $.extend(SlideShow.prototype, {\r\n timer: null,\r\n isActive: false,\r\n $button: null,\r\n\r\n init: function () {\r\n var self = this,\r\n instance = self.instance,\r\n opts = instance.group[instance.currIndex].opts.slideShow;\r\n\r\n self.$button = instance.$refs.toolbar.find(\"[data-fancybox-play]\").on(\"click\", function () {\r\n self.toggle();\r\n });\r\n\r\n if (instance.group.length < 2 || !opts) {\r\n self.$button.hide();\r\n } else if (opts.progress) {\r\n self.$progress = $('<div class=\"fancybox-progress\"></div>').appendTo(instance.$refs.inner);\r\n }\r\n },\r\n\r\n set: function (force) {\r\n var self = this,\r\n instance = self.instance,\r\n current = instance.current;\r\n\r\n // Check if reached last element\r\n if (current && (force === true || current.opts.loop || instance.currIndex < instance.group.length - 1)) {\r\n if (self.isActive && current.contentType !== \"video\") {\r\n if (self.$progress) {\r\n $.fancybox.animate(self.$progress.show(), {\r\n scaleX: 1\r\n }, current.opts.slideShow.speed);\r\n }\r\n\r\n self.timer = setTimeout(function () {\r\n if (!instance.current.opts.loop && instance.current.index == instance.group.length - 1) {\r\n instance.jumpTo(0);\r\n } else {\r\n instance.next();\r\n }\r\n }, current.opts.slideShow.speed);\r\n }\r\n } else {\r\n self.stop();\r\n instance.idleSecondsCounter = 0;\r\n instance.showControls();\r\n }\r\n },\r\n\r\n clear: function () {\r\n var self = this;\r\n\r\n clearTimeout(self.timer);\r\n\r\n self.timer = null;\r\n\r\n if (self.$progress) {\r\n self.$progress.removeAttr(\"style\").hide();\r\n }\r\n },\r\n\r\n start: function () {\r\n var self = this,\r\n current = self.instance.current;\r\n\r\n if (current) {\r\n self.$button\r\n .attr(\"title\", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_STOP)\r\n .removeClass(\"fancybox-button--play\")\r\n .addClass(\"fancybox-button--pause\");\r\n\r\n self.isActive = true;\r\n\r\n if (current.isComplete) {\r\n self.set(true);\r\n }\r\n\r\n self.instance.trigger(\"onSlideShowChange\", true);\r\n }\r\n },\r\n\r\n stop: function () {\r\n var self = this,\r\n current = self.instance.current;\r\n\r\n self.clear();\r\n\r\n self.$button\r\n .attr(\"title\", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_START)\r\n .removeClass(\"fancybox-button--pause\")\r\n .addClass(\"fancybox-button--play\");\r\n\r\n self.isActive = false;\r\n\r\n self.instance.trigger(\"onSlideShowChange\", false);\r\n\r\n if (self.$progress) {\r\n self.$progress.removeAttr(\"style\").hide();\r\n }\r\n },\r\n\r\n toggle: function () {\r\n var self = this;\r\n\r\n if (self.isActive) {\r\n self.stop();\r\n } else {\r\n self.start();\r\n }\r\n }\r\n });\r\n\r\n $(document).on({\r\n \"onInit.fb\": function (e, instance) {\r\n if (instance && !instance.SlideShow) {\r\n instance.SlideShow = new SlideShow(instance);\r\n }\r\n },\r\n\r\n \"beforeShow.fb\": function (e, instance, current, firstRun) {\r\n var SlideShow = instance && instance.SlideShow;\r\n\r\n if (firstRun) {\r\n if (SlideShow && current.opts.slideShow.autoStart) {\r\n SlideShow.start();\r\n }\r\n } else if (SlideShow && SlideShow.isActive) {\r\n SlideShow.clear();\r\n }\r\n },\r\n\r\n \"afterShow.fb\": function (e, instance, current) {\r\n var SlideShow = instance && instance.SlideShow;\r\n\r\n if (SlideShow && SlideShow.isActive) {\r\n SlideShow.set();\r\n }\r\n },\r\n\r\n \"afterKeydown.fb\": function (e, instance, current, keypress, keycode) {\r\n var SlideShow = instance && instance.SlideShow;\r\n\r\n // \"P\" or Spacebar\r\n if (SlideShow && current.opts.slideShow && (keycode === 80 || keycode === 32) && !$(document.activeElement).is(\"button,a,input\")) {\r\n keypress.preventDefault();\r\n\r\n SlideShow.toggle();\r\n }\r\n },\r\n\r\n \"beforeClose.fb onDeactivate.fb\": function (e, instance) {\r\n var SlideShow = instance && instance.SlideShow;\r\n\r\n if (SlideShow) {\r\n SlideShow.stop();\r\n }\r\n }\r\n });\r\n\r\n // Page Visibility API to pause slideshow when window is not active\r\n $(document).on(\"visibilitychange\", function () {\r\n var instance = $.fancybox.getInstance(),\r\n SlideShow = instance && instance.SlideShow;\r\n\r\n if (SlideShow && SlideShow.isActive) {\r\n if (document.hidden) {\r\n SlideShow.clear();\r\n } else {\r\n SlideShow.set();\r\n }\r\n }\r\n });\r\n})(document, jQuery);\n// ==========================================================================\r\n//\r\n// FullScreen\r\n// Adds fullscreen functionality\r\n//\r\n// ==========================================================================\r\n(function (document, $) {\r\n \"use strict\";\r\n\r\n // Collection of methods supported by user browser\r\n var fn = (function () {\r\n var fnMap = [\r\n [\"requestFullscreen\", \"exitFullscreen\", \"fullscreenElement\", \"fullscreenEnabled\", \"fullscreenchange\", \"fullscreenerror\"],\r\n // new WebKit\r\n [\r\n \"webkitRequestFullscreen\",\r\n \"webkitExitFullscreen\",\r\n \"webkitFullscreenElement\",\r\n \"webkitFullscreenEnabled\",\r\n \"webkitfullscreenchange\",\r\n \"webkitfullscreenerror\"\r\n ],\r\n // old WebKit (Safari 5.1)\r\n [\r\n \"webkitRequestFullScreen\",\r\n \"webkitCancelFullScreen\",\r\n \"webkitCurrentFullScreenElement\",\r\n \"webkitCancelFullScreen\",\r\n \"webkitfullscreenchange\",\r\n \"webkitfullscreenerror\"\r\n ],\r\n [\r\n \"mozRequestFullScreen\",\r\n \"mozCancelFullScreen\",\r\n \"mozFullScreenElement\",\r\n \"mozFullScreenEnabled\",\r\n \"mozfullscreenchange\",\r\n \"mozfullscreenerror\"\r\n ],\r\n [\"msRequestFullscreen\", \"msExitFullscreen\", \"msFullscreenElement\", \"msFullscreenEnabled\", \"MSFullscreenChange\", \"MSFullscreenError\"]\r\n ];\r\n\r\n var ret = {};\r\n\r\n for (var i = 0; i < fnMap.length; i++) {\r\n var val = fnMap[i];\r\n\r\n if (val && val[1] in document) {\r\n for (var j = 0; j < val.length; j++) {\r\n ret[fnMap[0][j]] = val[j];\r\n }\r\n\r\n return ret;\r\n }\r\n }\r\n\r\n return false;\r\n })();\r\n\r\n if (fn) {\r\n var FullScreen = {\r\n request: function (elem) {\r\n elem = elem || document.documentElement;\r\n\r\n elem[fn.requestFullscreen](elem.ALLOW_KEYBOARD_INPUT);\r\n },\r\n exit: function () {\r\n document[fn.exitFullscreen]();\r\n },\r\n toggle: function (elem) {\r\n elem = elem || document.documentElement;\r\n\r\n if (this.isFullscreen()) {\r\n this.exit();\r\n } else {\r\n this.request(elem);\r\n }\r\n },\r\n isFullscreen: function () {\r\n return Boolean(document[fn.fullscreenElement]);\r\n },\r\n enabled: function () {\r\n return Boolean(document[fn.fullscreenEnabled]);\r\n }\r\n };\r\n\r\n $.extend(true, $.fancybox.defaults, {\r\n btnTpl: {\r\n fullScreen: '<button data-fancybox-fullscreen class=\"fancybox-button fancybox-button--fsenter\" title=\"{{FULL_SCREEN}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\"/></svg>' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z\"/></svg>' +\r\n \"</button>\"\r\n },\r\n fullScreen: {\r\n autoStart: false\r\n }\r\n });\r\n\r\n $(document).on(fn.fullscreenchange, function () {\r\n var isFullscreen = FullScreen.isFullscreen(),\r\n instance = $.fancybox.getInstance();\r\n\r\n if (instance) {\r\n // If image is zooming, then force to stop and reposition properly\r\n if (instance.current && instance.current.type === \"image\" && instance.isAnimating) {\r\n instance.isAnimating = false;\r\n\r\n instance.update(true, true, 0);\r\n\r\n if (!instance.isComplete) {\r\n instance.complete();\r\n }\r\n }\r\n\r\n instance.trigger(\"onFullscreenChange\", isFullscreen);\r\n\r\n instance.$refs.container.toggleClass(\"fancybox-is-fullscreen\", isFullscreen);\r\n\r\n instance.$refs.toolbar\r\n .find(\"[data-fancybox-fullscreen]\")\r\n .toggleClass(\"fancybox-button--fsenter\", !isFullscreen)\r\n .toggleClass(\"fancybox-button--fsexit\", isFullscreen);\r\n }\r\n });\r\n }\r\n\r\n $(document).on({\r\n \"onInit.fb\": function (e, instance) {\r\n var $container;\r\n\r\n if (!fn) {\r\n instance.$refs.toolbar.find(\"[data-fancybox-fullscreen]\").remove();\r\n\r\n return;\r\n }\r\n\r\n if (instance && instance.group[instance.currIndex].opts.fullScreen) {\r\n $container = instance.$refs.container;\r\n\r\n $container.on(\"click.fb-fullscreen\", \"[data-fancybox-fullscreen]\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n FullScreen.toggle();\r\n });\r\n\r\n if (instance.opts.fullScreen && instance.opts.fullScreen.autoStart === true) {\r\n FullScreen.request();\r\n }\r\n\r\n // Expose API\r\n instance.FullScreen = FullScreen;\r\n } else if (instance) {\r\n instance.$refs.toolbar.find(\"[data-fancybox-fullscreen]\").hide();\r\n }\r\n },\r\n\r\n \"afterKeydown.fb\": function (e, instance, current, keypress, keycode) {\r\n // \"F\"\r\n if (instance && instance.FullScreen && keycode === 70) {\r\n keypress.preventDefault();\r\n\r\n instance.FullScreen.toggle();\r\n }\r\n },\r\n\r\n \"beforeClose.fb\": function (e, instance) {\r\n if (instance && instance.FullScreen && instance.$refs.container.hasClass(\"fancybox-is-fullscreen\")) {\r\n FullScreen.exit();\r\n }\r\n }\r\n });\r\n})(document, jQuery);\n// ==========================================================================\r\n//\r\n// Thumbs\r\n// Displays thumbnails in a grid\r\n//\r\n// ==========================================================================\r\n(function (document, $) {\r\n \"use strict\";\r\n\r\n var CLASS = \"fancybox-thumbs\",\r\n CLASS_ACTIVE = CLASS + \"-active\";\r\n\r\n // Make sure there are default values\r\n $.fancybox.defaults = $.extend(\r\n true, {\r\n btnTpl: {\r\n thumbs: '<button data-fancybox-thumbs class=\"fancybox-button fancybox-button--thumbs\" title=\"{{THUMBS}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z\"/></svg>' +\r\n \"</button>\"\r\n },\r\n thumbs: {\r\n autoStart: false, // Display thumbnails on opening\r\n hideOnClose: true, // Hide thumbnail grid when closing animation starts\r\n parentEl: \".fancybox-container\", // Container is injected into this element\r\n axis: \"y\" // Vertical (y) or horizontal (x) scrolling\r\n }\r\n },\r\n $.fancybox.defaults\r\n );\r\n\r\n var FancyThumbs = function (instance) {\r\n this.init(instance);\r\n };\r\n\r\n $.extend(FancyThumbs.prototype, {\r\n $button: null,\r\n $grid: null,\r\n $list: null,\r\n isVisible: false,\r\n isActive: false,\r\n\r\n init: function (instance) {\r\n var self = this,\r\n group = instance.group,\r\n enabled = 0;\r\n\r\n self.instance = instance;\r\n self.opts = group[instance.currIndex].opts.thumbs;\r\n\r\n instance.Thumbs = self;\r\n\r\n self.$button = instance.$refs.toolbar.find(\"[data-fancybox-thumbs]\");\r\n\r\n // Enable thumbs if at least two group items have thumbnails\r\n for (var i = 0, len = group.length; i < len; i++) {\r\n if (group[i].thumb) {\r\n enabled++;\r\n }\r\n\r\n if (enabled > 1) {\r\n break;\r\n }\r\n }\r\n\r\n if (enabled > 1 && !!self.opts) {\r\n self.$button.removeAttr(\"style\").on(\"click\", function () {\r\n self.toggle();\r\n });\r\n\r\n self.isActive = true;\r\n } else {\r\n self.$button.hide();\r\n }\r\n },\r\n\r\n create: function () {\r\n var self = this,\r\n instance = self.instance,\r\n parentEl = self.opts.parentEl,\r\n list = [],\r\n src;\r\n\r\n if (!self.$grid) {\r\n // Create main element\r\n self.$grid = $('<div class=\"' + CLASS + \" \" + CLASS + \"-\" + self.opts.axis + '\"></div>').appendTo(\r\n instance.$refs.container\r\n .find(parentEl)\r\n .addBack()\r\n .filter(parentEl)\r\n );\r\n\r\n // Add \"click\" event that performs gallery navigation\r\n self.$grid.on(\"click\", \"a\", function () {\r\n instance.jumpTo($(this).attr(\"data-index\"));\r\n });\r\n }\r\n\r\n // Build the list\r\n if (!self.$list) {\r\n self.$list = $('<div class=\"' + CLASS + '__list\">').appendTo(self.$grid);\r\n }\r\n\r\n $.each(instance.group, function (i, item) {\r\n src = item.thumb;\r\n\r\n if (!src && item.type === \"image\") {\r\n src = item.src;\r\n }\r\n\r\n list.push(\r\n '<a href=\"javascript:;\" tabindex=\"0\" data-index=\"' +\r\n i +\r\n '\"' +\r\n (src && src.length ? ' style=\"background-image:url(' + src + ')\"' : 'class=\"fancybox-thumbs-missing\"') +\r\n \"></a>\"\r\n );\r\n });\r\n\r\n self.$list[0].innerHTML = list.join(\"\");\r\n\r\n if (self.opts.axis === \"x\") {\r\n // Set fixed width for list element to enable horizontal scrolling\r\n self.$list.width(\r\n parseInt(self.$grid.css(\"padding-right\"), 10) +\r\n instance.group.length *\r\n self.$list\r\n .children()\r\n .eq(0)\r\n .outerWidth(true)\r\n );\r\n }\r\n },\r\n\r\n focus: function (duration) {\r\n var self = this,\r\n $list = self.$list,\r\n $grid = self.$grid,\r\n thumb,\r\n thumbPos;\r\n\r\n if (!self.instance.current) {\r\n return;\r\n }\r\n\r\n thumb = $list\r\n .children()\r\n .removeClass(CLASS_ACTIVE)\r\n .filter('[data-index=\"' + self.instance.current.index + '\"]')\r\n .addClass(CLASS_ACTIVE);\r\n\r\n thumbPos = thumb.position();\r\n\r\n // Check if need to scroll to make current thumb visible\r\n if (self.opts.axis === \"y\" && (thumbPos.top < 0 || thumbPos.top > $list.height() - thumb.outerHeight())) {\r\n $list.stop().animate({\r\n scrollTop: $list.scrollTop() + thumbPos.top\r\n },\r\n duration\r\n );\r\n } else if (\r\n self.opts.axis === \"x\" &&\r\n (thumbPos.left < $grid.scrollLeft() || thumbPos.left > $grid.scrollLeft() + ($grid.width() - thumb.outerWidth()))\r\n ) {\r\n $list\r\n .parent()\r\n .stop()\r\n .animate({\r\n scrollLeft: thumbPos.left\r\n },\r\n duration\r\n );\r\n }\r\n },\r\n\r\n update: function () {\r\n var that = this;\r\n that.instance.$refs.container.toggleClass(\"fancybox-show-thumbs\", this.isVisible);\r\n\r\n if (that.isVisible) {\r\n if (!that.$grid) {\r\n that.create();\r\n }\r\n\r\n that.instance.trigger(\"onThumbsShow\");\r\n\r\n that.focus(0);\r\n } else if (that.$grid) {\r\n that.instance.trigger(\"onThumbsHide\");\r\n }\r\n\r\n // Update content position\r\n that.instance.update();\r\n },\r\n\r\n hide: function () {\r\n this.isVisible = false;\r\n this.update();\r\n },\r\n\r\n show: function () {\r\n this.isVisible = true;\r\n this.update();\r\n },\r\n\r\n toggle: function () {\r\n this.isVisible = !this.isVisible;\r\n this.update();\r\n }\r\n });\r\n\r\n $(document).on({\r\n \"onInit.fb\": function (e, instance) {\r\n var Thumbs;\r\n\r\n if (instance && !instance.Thumbs) {\r\n Thumbs = new FancyThumbs(instance);\r\n\r\n if (Thumbs.isActive && Thumbs.opts.autoStart === true) {\r\n Thumbs.show();\r\n }\r\n }\r\n },\r\n\r\n \"beforeShow.fb\": function (e, instance, item, firstRun) {\r\n var Thumbs = instance && instance.Thumbs;\r\n\r\n if (Thumbs && Thumbs.isVisible) {\r\n Thumbs.focus(firstRun ? 0 : 250);\r\n }\r\n },\r\n\r\n \"afterKeydown.fb\": function (e, instance, current, keypress, keycode) {\r\n var Thumbs = instance && instance.Thumbs;\r\n\r\n // \"G\"\r\n if (Thumbs && Thumbs.isActive && keycode === 71) {\r\n keypress.preventDefault();\r\n\r\n Thumbs.toggle();\r\n }\r\n },\r\n\r\n \"beforeClose.fb\": function (e, instance) {\r\n var Thumbs = instance && instance.Thumbs;\r\n\r\n if (Thumbs && Thumbs.isVisible && Thumbs.opts.hideOnClose !== false) {\r\n Thumbs.$grid.hide();\r\n }\r\n }\r\n });\r\n})(document, jQuery);\n//// ==========================================================================\r\n//\r\n// Share\r\n// Displays simple form for sharing current url\r\n//\r\n// ==========================================================================\r\n(function (document, $) {\r\n \"use strict\";\r\n\r\n $.extend(true, $.fancybox.defaults, {\r\n btnTpl: {\r\n share: '<button data-fancybox-share class=\"fancybox-button fancybox-button--share\" title=\"{{SHARE}}\">' +\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z\"/></svg>' +\r\n \"</button>\"\r\n },\r\n share: {\r\n url: function (instance, item) {\r\n return (\r\n (!instance.currentHash && !(item.type === \"inline\" || item.type === \"html\") ? item.origSrc || item.src : false) || window.location\r\n );\r\n },\r\n tpl: '<div class=\"fancybox-share\">' +\r\n \"<h1>{{SHARE}}</h1>\" +\r\n \"<p>\" +\r\n '<a class=\"fancybox-share__button fancybox-share__button--fb\" href=\"https://www.facebook.com/sharer/sharer.php?u={{url}}\">' +\r\n '<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196\" /></svg>' +\r\n \"<span>Facebook</span>\" +\r\n \"</a>\" +\r\n '<a class=\"fancybox-share__button fancybox-share__button--tw\" href=\"https://twitter.com/intent/tweet?url={{url}}&text={{descr}}\">' +\r\n '<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z\" /></svg>' +\r\n \"<span>Twitter</span>\" +\r\n \"</a>\" +\r\n '<a class=\"fancybox-share__button fancybox-share__button--pt\" href=\"https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}\">' +\r\n '<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z\" fill=\"#fff\"/></svg>' +\r\n \"<span>Pinterest</span>\" +\r\n \"</a>\" +\r\n \"</p>\" +\r\n '<p><input class=\"fancybox-share__input\" type=\"text\" value=\"{{url_raw}}\" onclick=\"select()\" /></p>' +\r\n \"</div>\"\r\n }\r\n });\r\n\r\n function escapeHtml(string) {\r\n var entityMap = {\r\n \"&\": \"&\",\r\n \"<\": \"<\",\r\n \">\": \">\",\r\n '\"': \""\",\r\n \"'\": \"'\",\r\n \"/\": \"/\",\r\n \"`\": \"`\",\r\n \"=\": \"=\"\r\n };\r\n\r\n return String(string).replace(/[&<>\"'`=\\/]/g, function (s) {\r\n return entityMap[s];\r\n });\r\n }\r\n\r\n $(document).on(\"click\", \"[data-fancybox-share]\", function () {\r\n var instance = $.fancybox.getInstance(),\r\n current = instance.current || null,\r\n url,\r\n tpl;\r\n\r\n if (!current) {\r\n return;\r\n }\r\n\r\n if ($.type(current.opts.share.url) === \"function\") {\r\n url = current.opts.share.url.apply(current, [instance, current]);\r\n }\r\n\r\n tpl = current.opts.share.tpl\r\n .replace(/\\{\\{media\\}\\}/g, current.type === \"image\" ? encodeURIComponent(current.src) : \"\")\r\n .replace(/\\{\\{url\\}\\}/g, encodeURIComponent(url))\r\n .replace(/\\{\\{url_raw\\}\\}/g, escapeHtml(url))\r\n .replace(/\\{\\{descr\\}\\}/g, instance.$caption ? encodeURIComponent(instance.$caption.text()) : \"\");\r\n\r\n $.fancybox.open({\r\n src: instance.translate(instance, tpl),\r\n type: \"html\",\r\n opts: {\r\n touch: false,\r\n animationEffect: false,\r\n afterLoad: function (shareInstance, shareCurrent) {\r\n // Close self if parent instance is closing\r\n instance.$refs.container.one(\"beforeClose.fb\", function () {\r\n shareInstance.close(null, 0);\r\n });\r\n\r\n // Opening links in a popup window\r\n shareCurrent.$content.find(\".fancybox-share__button\").click(function () {\r\n window.open(this.href, \"Share\", \"width=550, height=450\");\r\n return false;\r\n });\r\n },\r\n mobile: {\r\n autoFocus: false\r\n }\r\n }\r\n });\r\n });\r\n})(document, jQuery);\n// ==========================================================================\r\n//\r\n// Hash\r\n// Enables linking to each modal\r\n//\r\n// ==========================================================================\r\n(function (window, document, $) {\r\n \"use strict\";\r\n\r\n // Simple $.escapeSelector polyfill (for jQuery prior v3)\r\n if (!$.escapeSelector) {\r\n $.escapeSelector = function (sel) {\r\n var rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\r\n var fcssescape = function (ch, asCodePoint) {\r\n if (asCodePoint) {\r\n // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\r\n if (ch === \"\\0\") {\r\n return \"\\uFFFD\";\r\n }\r\n\r\n // Control characters and (dependent upon position) numbers get escaped as code points\r\n return ch.slice(0, -1) + \"\\\\\" + ch.charCodeAt(ch.length - 1).toString(16) + \" \";\r\n }\r\n\r\n // Other potentially-special ASCII characters get backslash-escaped\r\n return \"\\\\\" + ch;\r\n };\r\n\r\n return (sel + \"\").replace(rcssescape, fcssescape);\r\n };\r\n }\r\n\r\n // Get info about gallery name and current index from url\r\n function parseUrl() {\r\n var hash = window.location.hash.substr(1),\r\n rez = hash.split(\"-\"),\r\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\r\n gallery = rez.join(\"-\");\r\n\r\n return {\r\n hash: hash,\r\n /* Index is starting from 1 */\r\n index: index < 1 ? 1 : index,\r\n gallery: gallery\r\n };\r\n }\r\n\r\n // Trigger click evnt on links to open new fancyBox instance\r\n function triggerFromUrl(url) {\r\n if (url.gallery !== \"\") {\r\n // If we can find element matching 'data-fancybox' atribute,\r\n // then triggering click event should start fancyBox\r\n $(\"[data-fancybox='\" + $.escapeSelector(url.gallery) + \"']\")\r\n .eq(url.index - 1)\r\n .focus()\r\n .trigger(\"click.fb-start\");\r\n }\r\n }\r\n\r\n // Get gallery name from current instance\r\n function getGalleryID(instance) {\r\n var opts, ret;\r\n\r\n if (!instance) {\r\n return false;\r\n }\r\n\r\n opts = instance.current ? instance.current.opts : instance.opts;\r\n ret = opts.hash || (opts.$orig ? opts.$orig.data(\"fancybox\") || opts.$orig.data(\"fancybox-trigger\") : \"\");\r\n\r\n return ret === \"\" ? false : ret;\r\n }\r\n\r\n // Start when DOM becomes ready\r\n $(function () {\r\n // Check if user has disabled this module\r\n if ($.fancybox.defaults.hash === false) {\r\n return;\r\n }\r\n\r\n // Update hash when opening/closing fancyBox\r\n $(document).on({\r\n \"onInit.fb\": function (e, instance) {\r\n var url, gallery;\r\n\r\n if (instance.group[instance.currIndex].opts.hash === false) {\r\n return;\r\n }\r\n\r\n url = parseUrl();\r\n gallery = getGalleryID(instance);\r\n\r\n // Make sure gallery start index matches index from hash\r\n if (gallery && url.gallery && gallery == url.gallery) {\r\n instance.currIndex = url.index - 1;\r\n }\r\n },\r\n\r\n \"beforeShow.fb\": function (e, instance, current, firstRun) {\r\n var gallery;\r\n\r\n if (!current || current.opts.hash === false) {\r\n return;\r\n }\r\n\r\n // Check if need to update window hash\r\n gallery = getGalleryID(instance);\r\n\r\n if (!gallery) {\r\n return;\r\n }\r\n\r\n // Variable containing last hash value set by fancyBox\r\n // It will be used to determine if fancyBox needs to close after hash change is detected\r\n instance.currentHash = gallery + (instance.group.length > 1 ? \"-\" + (current.index + 1) : \"\");\r\n\r\n // If current hash is the same (this instance most likely is opened by hashchange), then do nothing\r\n if (window.location.hash === \"#\" + instance.currentHash) {\r\n return;\r\n }\r\n\r\n if (firstRun && !instance.origHash) {\r\n instance.origHash = window.location.hash;\r\n }\r\n\r\n if (instance.hashTimer) {\r\n clearTimeout(instance.hashTimer);\r\n }\r\n\r\n // Update hash\r\n instance.hashTimer = setTimeout(function () {\r\n if (\"replaceState\" in window.history) {\r\n window.history[firstRun ? \"pushState\" : \"replaceState\"]({},\r\n document.title,\r\n window.location.pathname + window.location.search + \"#\" + instance.currentHash\r\n );\r\n\r\n if (firstRun) {\r\n instance.hasCreatedHistory = true;\r\n }\r\n } else {\r\n window.location.hash = instance.currentHash;\r\n }\r\n\r\n instance.hashTimer = null;\r\n }, 300);\r\n },\r\n\r\n \"beforeClose.fb\": function (e, instance, current) {\r\n if (!current || current.opts.hash === false) {\r\n return;\r\n }\r\n\r\n clearTimeout(instance.hashTimer);\r\n\r\n // Goto previous history entry\r\n if (instance.currentHash && instance.hasCreatedHistory) {\r\n window.history.back();\r\n } else if (instance.currentHash) {\r\n if (\"replaceState\" in window.history) {\r\n window.history.replaceState({}, document.title, window.location.pathname + window.location.search + (instance.origHash || \"\"));\r\n } else {\r\n window.location.hash = instance.origHash;\r\n }\r\n }\r\n\r\n instance.currentHash = null;\r\n }\r\n });\r\n\r\n // Check if need to start/close after url has changed\r\n $(window).on(\"hashchange.fb\", function () {\r\n var url = parseUrl(),\r\n fb = null;\r\n\r\n // Find last fancyBox instance that has \"hash\"\r\n $.each(\r\n $(\".fancybox-container\")\r\n .get()\r\n .reverse(),\r\n function (index, value) {\r\n var tmp = $(value).data(\"FancyBox\");\r\n\r\n if (tmp && tmp.currentHash) {\r\n fb = tmp;\r\n return false;\r\n }\r\n }\r\n );\r\n\r\n if (fb) {\r\n // Now, compare hash values\r\n if (fb.currentHash !== url.gallery + \"-\" + url.index && !(url.index === 1 && fb.currentHash == url.gallery)) {\r\n fb.currentHash = null;\r\n\r\n fb.close();\r\n }\r\n } else if (url.gallery !== \"\") {\r\n triggerFromUrl(url);\r\n }\r\n });\r\n\r\n // Check current hash and trigger click event on matching element to start fancyBox, if needed\r\n setTimeout(function () {\r\n if (!$.fancybox.getInstance()) {\r\n triggerFromUrl(parseUrl());\r\n }\r\n }, 50);\r\n });\r\n})(window, document, jQuery);\n// ==========================================================================\r\n//\r\n// Wheel\r\n// Basic mouse weheel support for gallery navigation\r\n//\r\n// ==========================================================================\r\n(function (document, $) {\r\n \"use strict\";\r\n\r\n var prevTime = new Date().getTime();\r\n\r\n $(document).on({\r\n \"onInit.fb\": function (e, instance, current) {\r\n instance.$refs.stage.on(\"mousewheel DOMMouseScroll wheel MozMousePixelScroll\", function (e) {\r\n var current = instance.current,\r\n currTime = new Date().getTime();\r\n\r\n if (instance.group.length < 2 || current.opts.wheel === false || (current.opts.wheel === \"auto\" && current.type !== \"image\")) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if (current.$slide.hasClass(\"fancybox-animated\")) {\r\n return;\r\n }\r\n\r\n e = e.originalEvent || e;\r\n\r\n if (currTime - prevTime < 250) {\r\n return;\r\n }\r\n\r\n prevTime = currTime;\r\n\r\n instance[(-e.deltaY || -e.deltaX || e.wheelDelta || -e.detail) < 0 ? \"next\" : \"previous\"]();\r\n });\r\n }\r\n });\r\n})(document, jQuery);","////////////////////////////////////////////////////////////////////////////////////\n// MODULE IMPORTS:\n////////////////////////////////////////////////////////////////////////////////////\n\nimport Parallax from 'parallax-js';\nvar popup = require(\"jquery-popup-overlay\");\n//import quicklink from \"quicklink/dist/quicklink.js\";\n\nconsole.log(\"working\");\n$();\n\n////////////////////////////////////////////////////////////////////////////////////\n// PAGE-PRELOADING WITH QUICKLINK (Just trying this out)\n// https://github.com/GoogleChromeLabs/quicklink\n////////////////////////////////////////////////////////////////////////////////////\n\n//window.quicklink = require('quicklink');\n//quicklink.listen();\n\n//const urlsToPrefetch = new Set([]);\n\n//// loop through all hyperlinks inside nav elements and add the url to the set of prefetch Urls\n//$(\"nav a\").each(function () {\n// var url = this.href;\n// if (url !== \"\" && this.protocol.indexOf(\"http\") >= 0 ) {\n// urlsToPrefetch.add(url);\n// }\n// //console.log(urlsToPrefetch);\n//});\n//quicklink.prefetch(urlsToPrefetch).catch(err => {\n// // Handle own errors\n//});\n\n////////////////////////////////////////////////////////////////////////////////////\n// POLYFILLS\n////////////////////////////////////////////////////////////////////////////////////\n\n// Focus without scrolllng (not working)\n//require(\"./polyfills/focus-options-polyfill.js\");\n\n////////////////////////////////////////////////////////////////////////////////////\n// GLOBAL VARS:\n////////////////////////////////////////////////////////////////////////////////////\n\nvar ww; // window width\nvar wh; // window width\nvar hh;\nvar selectedClassName = 'selected'; // the selected class name for menu items\nvar menuOpenClassName = 'open'; // the class that defines the open state of the menu\nvar fadeInSpeed = 50; // the fade in transition speed\nvar fadeOutSpeed = 75; // the fade out transition speed\nvar navMouseOutDelay = 600; // the delay before the nav disappears on mouseout\nvar mouseOutTimer; // the MouseOut timeout timer \nvar is_responsive = false;\nvar $header = $(\"header\");\nvar st; // scroll top\nvar lastScrollTop = 0; // used for tracking scroll position and direction\nvar scrollDirection = \"down\"; // default\n\nfunction refreshScrollData() {\n // Gets the scrollTop and direction and updates the global variables accordingly\n st = window.pageYOffset || document.documentElement.scrollTop;\n if (st > lastScrollTop) {\n scrollDirection = \"down\";\n } else {\n scrollDirection = \"up\";\n }\n lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling\n}\nrefreshScrollData();\nfunction refreshDimensions() {\n // update calculated dimensions (to be used on resize events, or anytime a manual refresh is required)\n ww = $(window).width();\n wh = $(window).height();\n hh = $(\"header\").outerHeight();\n\n // ### Check if we are in Mobile (ie Responsive mode)\n if ($('.mobileHeader').css('display') === 'block') {\n is_responsive = true;\n } else {\n is_responsive = false;\n }\n\n // padding to match fixed header height\n //if ($header && $header.length) {\n // $(\"#wrapper > main\").css({ marginTop: \"calc(\" + $header.height() + \"px - 2rem)\" }); // header height minus the difference in height upon animation\n //}\n\n refreshScrollData(); // refresh scroll data just in case...\n}\nfunction updateHeaderScrollClasses() {\n // Scroll-to-top link\n if (lastScrollTop > 450) {\n //$('.scrollToTop').fadeIn();\n $('.scrollToTop').addClass(\"visible\");\n } else {\n //$('.scrollToTop').fadeOut();\n $('.scrollToTop').removeClass(\"visible\");\n }\n\n // Hide / show the header when scrolling up\n $header.removeClass(\"down up\").addClass(scrollDirection);\n if (lastScrollTop === 0) {\n $header.addClass(\"top\");\n } else {\n $header.removeClass(\"top\");\n }\n}\nupdateHeaderScrollClasses();\n\n////////////////////////////////////////////////////////////////////////////////////\n// MAIN DOCUMENT READY\n////////////////////////////////////////////////////////////////////////////////////\n\n$(document).ready(function () {\n $header = $(\"#wrapper > header\");\n refreshDimensions();\n $(window).trigger('resize');\n});\n\n// Play Audio \nwindow.addEventListener('DOMContentLoaded', function () {\n $(document).on(\"click\", \".audioFile a\", function () {\n playAudio($(this).attr(\"data-audioid\"));\n return false;\n }).on(\"keypress\", function (e) {\n if (e.which === 13) {\n // enter key code\n playAudio($(this).attr(\"data-audioid\"));\n return false;\n }\n });\n\n // Play Audio\n function playAudio($audioid) {\n var audioFile = $('#' + $audioid).addClass(\"playing\").get(0).play();\n }\n});\n\n////////////////////////////////////////////////////////////////////////////////////\n// STICKY HEADER\n////////////////////////////////////////////////////////////////////////////////////\n\n//$(document).ready(function () {\n// var sticky = new Waypoint.Sticky({\n// element: $('.header')[0]\n// });\n//});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n/// SMOOTH PAGE TRANSITIONS / LOADING SPINNERS\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// Page loading spinner animation\nif (isSitefinityEditor()) {\n $(\"body\").addClass(\"loaded\");\n}\nwindow.destinationUrl = \"\"; // explicit global declaration\n\n$(document).ready(function () {\n // Add a \"loaded\" class when the document is finshed loading\n $(\"body\").addClass(\"loaded\");\n $(\"body\").removeClass(\"loading\");\n\n // Revert to initial state\n //window.onbeforeunload = function (event) {\n // console.log(\"unload event\", event);\n // if (!isExternal(destinationUrl)) {\n // $(\"body\").addClass(\"unloading\");\n // $(\"body\").removeClass(\"loaded\");\n // }\n //};\n\n //window.onpageshow = function (event) {\n // if (event.persisted) {\n // //window.location.reload();\n // // Add a \"loaded\" class when the document is finshed loading\n // $(\"body\").addClass(\"loaded\");\n // $(\"body\").removeClass(\"loading\");\n // }\n //};\n});\n\n// store the destination url to be used for page loading animation logic\n$(document).on(\"click\", \"a[href]\", function (event) {\n destinationUrl = $(this).attr(\"href\");\n});\n\n////////////////////////////////////////////////////////////////////////////////////\n// SCROLL EVENTS\n////////////////////////////////////////////////////////////////////////////////////\n\n$(window).on(\"scroll\", function () {\n $header = $(\"#wrapper > header\");\n refreshScrollData();\n updateHeaderScrollClasses();\n});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n/// SMOOTH SCROLL \n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// SMOOTH SCROLL (IN-PAGE ANCHOR LINKS)\n$(document).on(\"click\", 'a[href*=\"#\"]:not([href=\"#0\"]):not([href=\"#\"])', function (event) {\n // On-page anchor links\n if (location.pathname.replace(/^\\//, '') === this.pathname.replace(/^\\//, '') && location.hostname === this.hostname) {\n // Figure out which element to scroll to\n var $target = $(this.hash);\n $target = $target.length ? $target : $('[name=' + this.hash.slice(1) + ']');\n // Does a scroll target exist?\n if ($target.length) {\n // Only prevent default if animation is actually gonna happen\n event.preventDefault();\n smoothScrollTo($target);\n }\n }\n});\n\n// SCROLL TO LOCATION ON PAGE\nfunction smoothScrollTo($target) {\n if (!$target.length) {\n return;\n }\n $('html, body').animate({\n scrollTop: $target.offset().top - $(\"header\").outerHeight() - 20\n }, 400, 'swing', function () {\n $target.focusWithoutScrolling();\n if ($target.is(\":focus\")) {\n // Checking if the target was focused\n return false;\n } else {\n $target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable\n $target.focusWithoutScrolling(); // Set focus again\n }\n\n // open accordion if this content is inside\n var $parentAccordion = $target.parents(\".accordion\");\n if ($parentAccordion.length) {\n expandAccordion($parentAccordion);\n }\n });\n}\n\n// Scroll to anchor links properly on page load (accounting for sticky header)\nif (!isSitefinityEditor()) {\n if (window.location.hash) {\n smoothScrollTo($(window.location.hash));\n }\n $(document).ready(function () {\n if (window.location.hash) {\n smoothScrollTo($(window.location.hash));\n }\n });\n}\n\n// Focusing usually scrolls the page automatically - this prevents that.\n$.fn.focusWithoutScrolling = function () {\n $(this).focus(e => {\n e.preventDefault();\n e.target.focus({\n preventScroll: true\n });\n });\n};\n\n// ###### Scroll to Tab Content\n// ### Click event for the \"Scroll to Tab\" for TabStrip (works for all RadTabs)\n$(document).on(\"click\", \".RadTabStrip a.rtsLink\", function () {\n if (is_responsive) {\n scrollToAnchorTab();\n }\n});\n\n// ### \"Scroll to Tab Content function\nfunction scrollToAnchorTab() {\n var aTag = $(\".tabContainer\"); // need to add this class \"tabContainer\" on any manually added RadMultiPage\n $('html,body').animate({\n scrollTop: aTag.offset().top\n }, 'slow');\n}\n\n// ###### Scroll to Top\n// ### Check to see if the window is top if not then display \"Scroll to Top\" button\n// ### Click event for the \"Scroll to Top\" button\n$(document).on('click', '.scrollToTop', function () {\n $('html, body').animate({\n scrollTop: 0\n }, 800);\n return false;\n});\n\n////////////////////////////////////////////////////////////////////////////////////\n// WINDOW RESIZING\n////////////////////////////////////////////////////////////////////////////////////\n\n$(window).on('resize', function () {\n refreshDimensions();\n});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n///SEARCH BOX FUNCTIONALITY\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n//$(function () {\n// var searchWrapper = $('.sfsearchBox');\n// var searchInput = searchWrapper.find('input[name=\"search\"]');\n// var searchIndex = searchWrapper.find('input[id=\"hdnSearchIndex\"]');\n// var searchLocation = searchWrapper.find('input[id=\"hdnSearchLocation\"]');\n// var searchButton = searchWrapper.find('button');\n\n// searchButton.click(function (e) {\n// e.preventDefault();\n\n// var index = searchIndex.val();\n// var value = searchInput.val().trim();\n// var location = searchLocation.val().trim();\n// if (index && value !== '' && location !== '') {\n// window.location = location\n// + '?indexCatalogue='\n// + index + '&searchQuery='\n// + value + '&wordsMode=0';\n// }\n// });\n\n// searchInput.keypress(function (e) {\n// var key = e.which;\n\n// // the enter key code\n// if (key === 13) {\n// searchButton.click();\n// return false;\n// }\n// });\n//});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n/// LAZY http://jquery.eisbehr.de/lazy/\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n$('.lazy').lazy({\n threshold: 0 // images will load when 100 px from viewport edge\n});\n\n// Needed for lazy loading in some sliders to load images on click/swipe of next slide\nfunction scrollUpDown1px() {\n setTimeout(function () {\n $(window).scrollTop($(window).scrollTop() - 1);\n $(window).scrollTop($(window).scrollTop() + 1);\n }, 250);\n}\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n/// FORMS / AUTO-FILL\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// SEARCH BOX - PLACEHOLDER TEXT\n$('.search input[type=\"text\"]').attr(\"placeholder\", \"How Can We Help You?\");\n\n// Fix for Chrome Form Autofill for our contact form\n$(\".contactForm input[name*=Name]\").attr('autocomplete', 'name');\n$(\".contactForm input[name*=Email]\").attr('autocomplete', 'email');\n$(\".contactForm input[name*=Phone]\").attr('autocomplete', 'tel');\n// Or you could turn it off\n//$('form').attr('autocomplete', 'off');\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n/// Resize Items based on the content inside them. Useful for sliders so that items remain same height\n/// called like in window resize event: resizeItemsVertically($('.servicesList'), $('.servicesList .items .item .bottom'));\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nfunction resizeItemsVertically(baseElement, itemHeightElement) {\n if (baseElement.length > 0) {\n // check for element\n var itemsMaxHeight = 0;\n itemHeightElement.each(function () {\n var thisItemHeight = $(this).height();\n if (thisItemHeight > itemsMaxHeight) {\n itemsMaxHeight = thisItemHeight;\n }\n });\n itemHeightElement.height(itemsMaxHeight);\n }\n}\n\n// Clear Text Selection\nfunction clearSelection() {\n if (document.selection) {\n document.selection.empty();\n } else if (window.getSelection) {\n window.getSelection().removeAllRanges();\n }\n}\n\n// Email link warning message\n$(document).ready(function () {\n $('a[href^=\"mailto\"]').on(\"click\", function () {\n return confirm(\"Sending an e-mail to us will not make us your lawyers. Please do not include any confidential information in your e-mail.\");\n });\n});\n\n//////////////////////////////////////////////////////\n/// Accordions\n//////////////////////////////////////////////////////\n\nvar groupClass = \"group\";\nvar expandedClass = \"active\";\n$(document).ready(function () {\n var $accordions = $(\".accordion\"); //.not(\".disabled\");\n if ($accordions.length && !isSitefinityEditor()) {\n // Add accessibility attributes\n updateAccordionAccessibilityAtts();\n\n // Add expand/collapse all button to first accordion\n //$accordions = $(\".accordion\");\n //if ($accordions.length > 1) {\n // $(\"<div class='btnExpandAll expand'>Expand All</div>\").prependTo($accordions.first());\n // $accordions.first().addClass(\"hasExpandAll\");\n //}\n // ToDo: Find a better way of adding the expand/collapse all button without making the <dl> markup invalid\n\n // Expand first \n if ($(\".accordion.\" + expandedClass).length) {\n expandAccordion($(\".accordion.\" + expandedClass).first());\n }\n\n // Open all accordions with the \"active\" class\n $(\".accordion.active\").each(function () {\n var $accordion = $(this);\n expandAccordion($accordion);\n });\n\n // Click & Keypress handlers\n $(\".accordion .accordionTop\").on(\"click\", function (ev) {\n //if ($(this).is(\".disabled\")) {\n // return false;\n //}\n toggleAccordion($(this).parent(\".accordion\"));\n return false;\n }).on(\"keypress\", function (ev) {\n if (ev.which === 13) {\n // enter key code\n //if ($(this).is(\".disabled\")) {\n // return false;\n //}\n toggleAccordion($(this).parent(\".accordion\"));\n return false;\n }\n });\n\n // Expand / Collapse All accordions\n $(\".btnExpandAll\").on(\"click\", function () {\n //debugger;\n var $button = $(this);\n if ($button.hasClass(\"expand\")) {\n $accordions.each(function () {\n expandAccordion($(this)); // expand each accordion\n });\n updateExpandAllButton();\n } else {\n $accordions.each(function () {\n collapseAccordion($(this)); // close each accordion\n });\n updateExpandAllButton();\n }\n });\n }\n});\nfunction updateAccordionAccessibilityAtts() {\n // Make sure they're tab navigable/focusable\n $(\".accordion\").each(function (i, el) {\n var $accordion = $(el);\n var $accordionTop = $accordion.find(\".accordionTop\");\n var $accordionBottom = $accordion.find(\".accordionBottom\");\n if ($accordionTop.length && $accordionBottom.length) {\n // make sure accordionBottoms have unique Ids\n var accordionBottomId = $accordionBottom.uniqueId().attr(\"id\"); // ToDo: get this\n\n // make accodions focusable\n $accordionTop.attr(\"tabindex\", \"0\");\n var accordionTitle = $accordionTop.text().trim();\n if (!$accordionTop[0].hasAttribute(\"aria-label\") && $accordionTop.attr(\"aria-label\") !== \"\") {\n $accordionTop.attr(\"aria-label\", accordionTitle);\n $accordionTop.attr(\"aria-controls\", accordionBottomId);\n if ($accordionTop.is(\".active\")) {\n $accordionTop.attr(\"aria-expanded\", \"true\");\n $accordionBottom.attr(\"aria-hidden\", \"false\");\n } else {\n $accordionTop.attr(\"aria-expanded\", \"false\");\n $accordionBottom.attr(\"aria-hidden\", \"true\");\n }\n }\n }\n });\n}\n\n// Update the expand button to reflect current state of accordions\nfunction updateExpandAllButton() {\n var $button = $(\".btnExpandAll\");\n var $accordions = $(\".accordion\");\n var $activeAccordions = $accordions.filter(\".active\");\n if ($button.length && $accordions.length > $activeAccordions.length) {\n // if some are open (but not all) then set to expand\n $button.addClass(\"expand\");\n $button.text(\"Expand All\");\n } else {\n $button.removeClass(\"expand\");\n $button.text(\"Collapse All\");\n }\n}\n\n// Toggle the target accordion\nfunction toggleAccordion($accordion) {\n if ($accordion.hasClass(expandedClass)) {\n collapseAccordion($accordion);\n } else {\n closeGroupMembers($accordion); // close group members first\n expandAccordion($accordion);\n }\n updateExpandAllButton();\n}\n\n// Expand single accordion (and upate group)\nfunction expandAccordion($accordion) {\n $accordion.addClass(expandedClass);\n $accordion.find(\".accordionTop\").addClass(expandedClass);\n $accordion.find(\".accordionTop\").attr(\"aria-expanded\", \"true\");\n $accordion.find(\".accordionBottom\").addClass(expandedClass).slideDown();\n $accordion.find(\".accordionBottom\").attr(\"aria-hidden\", \"false\");\n updateExpandAllButton();\n}\n\n// Close single accordion (and upate group)\nfunction collapseAccordion($accordion) {\n $accordion.removeClass(expandedClass);\n $accordion.find(\".accordionTop\").removeClass(expandedClass);\n $accordion.find(\".accordionTop\").attr(\"aria-expanded\", \"false\");\n $accordion.find(\".accordionBottom\").removeClass(expandedClass).slideUp();\n $accordion.find(\".accordionBottom\").attr(\"aria-hidden\", \"true\");\n updateExpandAllButton();\n}\n\n// Check if accordion in group. If so, update group members\nfunction closeGroupMembers($accordion) {\n var classes = $accordion[0].className.trim().split(/ |\\t|\\|/); // get array of classes (regex to account for space, tab, and pipe separators)\n var groups = $.grep(classes, function (classes, i) {\n // get only the classes containing groupClass\n return classes.indexOf(groupClass) === 0;\n });\n $.each(groups, function (i, group) {\n $(\".accordion.\" + group).each(function () {\n collapseAccordion($(this)); // close each grouped accordion\n });\n });\n}\n\n// accordianUL \n$(document).ready(function () {\n var groupClass = \"group\";\n var expandedClass = \"active\";\n $(\".accordionUL span.toggle\").on(\"click\", function () {\n toggleAccordion($(this).parent());\n return false;\n }).on(\"keypress\", function (e) {\n if (e.which === 13) {\n // enter key code\n toggleAccordion($(this).parent());\n return false;\n }\n });\n\n // Toggle the target accordion\n function toggleAccordion($accordion) {\n if ($accordion.hasClass(expandedClass)) {\n collapseAccordion($accordion);\n } else {\n expandAccordion($accordion);\n }\n }\n function expandAccordion($accordion) {\n $(\".accordionUL li.\" + expandedClass + \">ul\").slideUp();\n $(\".accordionUL li\").removeClass(expandedClass);\n $accordion.addClass(expandedClass).children('ul').slideDown();\n }\n\n // Close single accordion (and update group)\n function collapseAccordion($accordion) {\n $(\".accordionUL li\").removeClass(expandedClass);\n $accordion.children('ul').slideUp();\n }\n});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Misc\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// Check if sitefinity page editor is open\nfunction isSitefinityEditor() {\n return $(\"body\").hasClass(\"sfPageEditor\");\n}\n\n// Check if a link element has \nfunction isRelativeUrl(url) {\n var regex = new RegExp('^(?:[a-z]+:)?//', 'i');\n return regex.test(url);\n}\nfunction isExternal(url) {\n var match = url.match(/^([^:\\/?#]+:)?(?:\\/\\/([^\\/?#]*))?([^?#]+)?(\\?[^#]*)?(#.*)?/);\n if (typeof match[1] === \"string\" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true;\n if (typeof match[2] === \"string\" && match[2].length > 0 && match[2].replace(new RegExp(\":(\" + {\n \"http:\": 80,\n \"https:\": 443\n }[location.protocol] + \")?$\"), \"\") !== location.host) return true;\n return false;\n}\n\n// Clickable items (e.g. a clickable article card with nested links)\n$(document).on(\"click\", \".clickable\", function (event) {\n var $this = $(this);\n\n // If there's not data-url, then find the first child el with an href and use that\n var itemUrl = \"\";\n var target = \"_self\"; // default\n\n // First check for data atts. If none, use the first child link\n if (typeof $this.data(\"url\") !== 'undefined' && $this.data(\"url\").length) {\n itemUrl = $this.data(\"url\");\n if (typeof $this.data(\"target\") !== 'undefined' && $this.data(\"target\").length) {\n target = $this.data(\"target\");\n }\n } else {\n var $firstLinkFound = $this.find(\"a[href]\").not(\"[href^=tel]\").not(\"[href^=mailto]\").first();\n itemUrl = $firstLinkFound.attr(\"href\");\n target = $firstLinkFound.attr(\"target\") ? $firstLinkFound.attr(\"target\") : target;\n }\n if (itemUrl) {\n window.open(itemUrl, target);\n }\n});\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Event hook \n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nwindow.scriptBottom = window.scriptBottom || [];\nwindow.scriptBottom.push(function () {});\n$(document).ready(function () {\n // loop through the queued functions and run them\n if (scriptBottom.length) {\n for (var i = 0; i < scriptBottom.length; i++) {\n try {\n scriptBottom[i]();\n } catch (error) {\n console.error(error);\n }\n }\n }\n});\n\n// Wrap link text with a span to be styled. This allows custom content link styles that don't underline images or icons\nif (!isSitefinityEditor()) {\n var $contentLinks = $(\".cmsContent a, .sf-Long-text a\");\n $contentLinks.has(\"img\").addClass(\"contentImageLink\");\n $contentLinks.has(\".fa,.far,.fal,.fab,.fad,.fas,.fak\").each(function () {\n var $link = $(this);\n var $contents = $link.contents();\n var linkTextWrapper = \"<span class='linkText'></span>\";\n $link.addClass(\"contentIconLink\");\n var $textNodes = $contents.filter(function () {\n return this.nodeType === 3;\n }).wrap(linkTextWrapper);\n var supportedNestedTags = [\"address\", \"strong\", \"bold\", \"em\", \"i\", \"small\", \"sub\", \"sup\"];\n $contents.filter(supportedNestedTags.join(\",\")).wrapInner(linkTextWrapper);\n });\n}\n\n////////////////////////////////////////////////////\n//$(document).on(\"click\", \"a\", function(ev, el) {\n// var $link = $(el);\n// var a = $link[0];\n// var url = $link.attr(\"href\");\n// if (url) {\n\n// }\n\n// //if ($link.) {\n\n// //}\n\n//});\n\n//$(\"a[href*=#]\").each(function() {\n\n// var $link = $(this);\n// var a = $link[0];\n// var hash = $link.attr(\"href\");\n\n// // if the anchor is somewhere on this page, then remove the\n// if (a.pathname === window.location.pathname) {\n// $link.attr(\"href\", \"#\" + hash);\n// }\n\n//});\n\n//$(\".secondaryContent > nav\").stick_in_parent();\n\n// History Timeline Filters\nwindow.addEventListener('DOMContentLoaded', function () {\n var $filters = $('.timelinePointTypes [data-filter]'),\n $filterItems = $('.filterable [data-pointtype]');\n $filters.on('click', function (e) {\n e.preventDefault();\n var $this = $(this);\n $filters.removeClass('active');\n $this.addClass('active');\n var $filterPointType = $this.attr('data-filter');\n if ($filterPointType === 'all') {\n $filterItems.removeClass('is-selected').fadeOut().promise().done(function () {\n $filterItems.addClass('is-selected').fadeIn();\n });\n } else {\n $filterItems.removeClass('is-selected').fadeOut().promise().done(function () {\n $filterItems.filter('[data-pointtype*= \"' + $filterPointType + '\"]').addClass('is-selected').fadeIn();\n });\n }\n });\n});","////////////////////////////////////////////////////////////////////////////////////////////////////////////\n///// MOBILE MENU NAVIGATION\n////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nvar mobileMenu = function () {\n \"use strict\";\n\n // Private Properties\n var pageUrlPath = window.location.pathname;\n var selectedClassName = 'selected'; // the selected class name for menu items\n var selectedParentClassName = 'selected-parent'; // the selected class name for menu items\n var openStatusClassName = 'open';\n var didUserScroll;\n var lastScrollTop = 0;\n var minScrollBeforeAction = 5; // pixels\n var navbarHeight = $('header').outerHeight();\n\n // Private Methods\n function init() {\n if ($('nav.mobile').length > 0) {\n //watchHamburgerClick();\n // Select the nav item and add arrow div to each has-children link\n selectSectionNavItem();\n $('.mobileNavWrapper input[type=\"text\"]').attr(\"placeholder\", \"Search\");\n }\n hideHeaderOnScrollInit();\n }\n $(document).on(\"click\", '.hamburger', function (e) {\n if ($('nav.mobile').hasClass(openStatusClassName)) {\n closeMenu();\n } else {\n openMenu();\n }\n e.stopPropagation();\n });\n function onResize() {\n if ($('nav.mobile').length > 0 && window.innerWidth > 1024) {\n closeMenu();\n }\n }\n function selectSectionNavItem() {\n pageUrlPath = pageUrlPath === '/' ? '/home' : '/';\n $('nav.mobile').children().find('a[href$=\"' + pageUrlPath + '\"], a[href$=\"' + pageUrlPath + '/\"]').last().each(function () {\n findParentNavItem(this);\n });\n }\n function findParentNavItem(anchorElem) {\n if (anchorElem.href.indexOf(pageUrlPath) !== -1 && pageUrlPath !== '/') {\n // found the menu item\n $(anchorElem).parent().addClass(selectedClassName);\n highLightParentNavItem($(anchorElem).parent());\n }\n }\n function highLightParentNavItem(anchorElem) {\n var elem = $(anchorElem).closest('.hasChildren'); // find the closest previous .hasChildren and the anchor in that li and highlight it\n if (elem.length > 0 && !elem.hasClass(selectedParentClassName)) {\n elem.addClass(selectedParentClassName + ' ' + openStatusClassName);\n highLightParentNavItem(elem); // recursively call this function\n } else if (elem.length > 0) {\n // highlight the main nav item\n elem.parent().parent().closest('.hasChildren').addClass(selectedParentClassName); // needed to jump out of the \n }\n }\n function openMenu() {\n //var navContent = $('header nav').html();\n\n $('.hamburger').addClass(openStatusClassName);\n $('nav.mobile').addClass(openStatusClassName);\n $('body, .pageWrapper, .mobileHeader').addClass('withNavOpen');\n $('.hamburger').attr(\"aria-expanded\", true);\n setTimeout(function () {\n // wait for the animation to finish\n $('nav.mobile').find(\":focusable\").eq(0).focus(); // focus the first focusable element\n }, 200);\n }\n function closeMenu() {\n $('.hamburger').removeClass(openStatusClassName);\n $('nav.mobile').removeClass(openStatusClassName);\n $('body, .pageWrapper, .mobileHeader').removeClass('withNavOpen');\n $('.hamburger').attr(\"aria-expanded\", false);\n $(\"nav.mobile\").trigger(\"menuClose\"); // custom event to make it easier to trigger actions in other widgets / components.\n }\n function hideHeaderOnScrollInit() {\n setInterval(function () {\n if (didUserScroll) {\n userDidScroll();\n didUserScroll = false;\n }\n }, 250);\n }\n function onUserScroll() {\n didUserScroll = true;\n }\n function userDidScroll() {\n var scrollTopLocation = $(window).scrollTop();\n\n // Make sure they scroll more than minScrollBeforeAction\n if (Math.abs(lastScrollTop - scrollTopLocation) <= minScrollBeforeAction) return;\n\n // If they scrolled down and are past the navbar, add class .nav-up.\n // This is necessary so you never see what is \"behind\" the navbar.\n if (scrollTopLocation > lastScrollTop && scrollTopLocation > navbarHeight) {\n // Scroll Down\n if (!$('nav.mobile').hasClass('open')) {\n // If mobile nav is not open\n $('.mobileHeader').removeClass('nav-down').addClass('nav-up');\n }\n } else {\n // Scroll Up\n if (scrollTopLocation + $(window).height() < $(document).height()) {\n $('.mobileHeader').removeClass('nav-up').addClass('nav-down');\n }\n }\n lastScrollTop = scrollTopLocation;\n }\n\n // Public Methods\n return {\n Init: function () {\n init();\n },\n OnResize: function () {\n onResize();\n },\n OnUserScroll: function () {\n onUserScroll(); // Hide/Show the fixed header https://codepen.io/vivinantony/pen/XXWoQx\n },\n closeMenu\n };\n}();\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// INITIALIZE THE MOBILE MENU\n////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nmobileMenu.Init();\n$(window).on('resize', function () {\n mobileMenu.OnResize();\n});\n$(window).scroll(function () {\n mobileMenu.OnUserScroll();\n});\n$(document).on(\"keydown\", function (event) {\n if ($('nav.mobile').is(\".open\")) {\n if (event.keyCode === 27) {\n // escape key pressed so close the menu\n mobileMenu.closeMenu();\n $('.hamburger').focus(); // return focus to the menu button (accessibility requirement)\n }\n }\n});\n\n// close menu when clicking outside\n$(window).click(function () {\n if ($('nav.mobile').is(\".open\")) {\n // Hide the menus if visible\n mobileMenu.closeMenu();\n $('.hamburger').focus(); // return focus to the menu button (accessibility requirement)\n }\n});\n$('nav.mobile').on(\"click\", function (event) {\n event.stopPropagation();\n});","/*\r\n * MAIN STYLES ENTRY FILE\r\n */\n\n// Third Party\n// ToDo: leftovers to replace with npm call\n//require('../Styles/src/ThirdParty/_fancybox.scss');\n//require('@fancyapps/fancybox/dist/jquery.fancybox.css');\n//require('../Styles/src/ThirdParty/_slick.scss');\n//require('../Styles/src/ThirdParty/_slick-theme.scss');\n//require('../Styles/src/_reset.scss');\n\n//// Main Styles \nrequire('../Styles/src/_animations.scss');\nrequire('../Styles/src/_global.scss');\nrequire('../Styles/src/_navigation.scss');\nrequire('../Styles/src/_home.scss');\nrequire('../Styles/src/_responsive.scss');\nrequire('../Styles/src/_print.scss');\n\n// Overrides + Fixes \nrequire('../Styles/src/_sf-editor-overrides.scss');\n//require('../Styles/src/_ie-edge-hacks.scss');","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","/*\n _ _ _ _\n ___| (_) ___| | __ (_)___\n/ __| | |/ __| |/ / | / __|\n\\__ \\ | | (__| < _ | \\__ \\\n|___/_|_|\\___|_|\\_(_)/ |___/\n |__/\n\n Version: 1.8.1\n Author: Ken Wheeler\n Website: http://kenwheeler.github.io\n Docs: http://kenwheeler.github.io/slick\n Repo: http://github.com/kenwheeler/slick\n Issues: http://github.com/kenwheeler/slick/issues\n\n */\n/* global window, document, define, jQuery, setInterval, clearInterval */\n;(function(factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports !== 'undefined') {\n module.exports = factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n\n}(function($) {\n 'use strict';\n var Slick = window.Slick || {};\n\n Slick = (function() {\n\n var instanceUid = 0;\n\n function Slick(element, settings) {\n\n var _ = this, dataSettings;\n\n _.defaults = {\n accessibility: true,\n adaptiveHeight: false,\n appendArrows: $(element),\n appendDots: $(element),\n arrows: true,\n asNavFor: null,\n prevArrow: '<button class=\"slick-prev\" aria-label=\"Previous\" type=\"button\">Previous</button>',\n nextArrow: '<button class=\"slick-next\" aria-label=\"Next\" type=\"button\">Next</button>',\n autoplay: false,\n autoplaySpeed: 3000,\n centerMode: false,\n centerPadding: '50px',\n cssEase: 'ease',\n customPaging: function(slider, i) {\n return $('<button type=\"button\" />').text(i + 1);\n },\n dots: false,\n dotsClass: 'slick-dots',\n draggable: true,\n easing: 'linear',\n edgeFriction: 0.35,\n fade: false,\n focusOnSelect: false,\n focusOnChange: false,\n infinite: true,\n initialSlide: 0,\n lazyLoad: 'ondemand',\n mobileFirst: false,\n pauseOnHover: true,\n pauseOnFocus: true,\n pauseOnDotsHover: false,\n respondTo: 'window',\n responsive: null,\n rows: 1,\n rtl: false,\n slide: '',\n slidesPerRow: 1,\n slidesToShow: 1,\n slidesToScroll: 1,\n speed: 500,\n swipe: true,\n swipeToSlide: false,\n touchMove: true,\n touchThreshold: 5,\n useCSS: true,\n useTransform: true,\n variableWidth: false,\n vertical: false,\n verticalSwiping: false,\n waitForAnimate: true,\n zIndex: 1000\n };\n\n _.initials = {\n animating: false,\n dragging: false,\n autoPlayTimer: null,\n currentDirection: 0,\n currentLeft: null,\n currentSlide: 0,\n direction: 1,\n $dots: null,\n listWidth: null,\n listHeight: null,\n loadIndex: 0,\n $nextArrow: null,\n $prevArrow: null,\n scrolling: false,\n slideCount: null,\n slideWidth: null,\n $slideTrack: null,\n $slides: null,\n sliding: false,\n slideOffset: 0,\n swipeLeft: null,\n swiping: false,\n $list: null,\n touchObject: {},\n transformsEnabled: false,\n unslicked: false\n };\n\n $.extend(_, _.initials);\n\n _.activeBreakpoint = null;\n _.animType = null;\n _.animProp = null;\n _.breakpoints = [];\n _.breakpointSettings = [];\n _.cssTransitions = false;\n _.focussed = false;\n _.interrupted = false;\n _.hidden = 'hidden';\n _.paused = true;\n _.positionProp = null;\n _.respondTo = null;\n _.rowCount = 1;\n _.shouldClick = true;\n _.$slider = $(element);\n _.$slidesCache = null;\n _.transformType = null;\n _.transitionType = null;\n _.visibilityChange = 'visibilitychange';\n _.windowWidth = 0;\n _.windowTimer = null;\n\n dataSettings = $(element).data('slick') || {};\n\n _.options = $.extend({}, _.defaults, settings, dataSettings);\n\n _.currentSlide = _.options.initialSlide;\n\n _.originalSettings = _.options;\n\n if (typeof document.mozHidden !== 'undefined') {\n _.hidden = 'mozHidden';\n _.visibilityChange = 'mozvisibilitychange';\n } else if (typeof document.webkitHidden !== 'undefined') {\n _.hidden = 'webkitHidden';\n _.visibilityChange = 'webkitvisibilitychange';\n }\n\n _.autoPlay = $.proxy(_.autoPlay, _);\n _.autoPlayClear = $.proxy(_.autoPlayClear, _);\n _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);\n _.changeSlide = $.proxy(_.changeSlide, _);\n _.clickHandler = $.proxy(_.clickHandler, _);\n _.selectHandler = $.proxy(_.selectHandler, _);\n _.setPosition = $.proxy(_.setPosition, _);\n _.swipeHandler = $.proxy(_.swipeHandler, _);\n _.dragHandler = $.proxy(_.dragHandler, _);\n _.keyHandler = $.proxy(_.keyHandler, _);\n\n _.instanceUid = instanceUid++;\n\n // A simple way to check for HTML strings\n // Strict HTML recognition (must start with <)\n // Extracted from jQuery v1.11 source\n _.htmlExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*)$/;\n\n\n _.registerBreakpoints();\n _.init(true);\n\n }\n\n return Slick;\n\n }());\n\n Slick.prototype.activateADA = function() {\n var _ = this;\n\n _.$slideTrack.find('.slick-active').attr({\n 'aria-hidden': 'false'\n }).find('a, input, button, select').attr({\n 'tabindex': '0'\n });\n\n };\n\n Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {\n\n var _ = this;\n\n if (typeof(index) === 'boolean') {\n addBefore = index;\n index = null;\n } else if (index < 0 || (index >= _.slideCount)) {\n return false;\n }\n\n _.unload();\n\n if (typeof(index) === 'number') {\n if (index === 0 && _.$slides.length === 0) {\n $(markup).appendTo(_.$slideTrack);\n } else if (addBefore) {\n $(markup).insertBefore(_.$slides.eq(index));\n } else {\n $(markup).insertAfter(_.$slides.eq(index));\n }\n } else {\n if (addBefore === true) {\n $(markup).prependTo(_.$slideTrack);\n } else {\n $(markup).appendTo(_.$slideTrack);\n }\n }\n\n _.$slides = _.$slideTrack.children(this.options.slide);\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.append(_.$slides);\n\n _.$slides.each(function(index, element) {\n $(element).attr('data-slick-index', index);\n });\n\n _.$slidesCache = _.$slides;\n\n _.reinit();\n\n };\n\n Slick.prototype.animateHeight = function() {\n var _ = this;\n if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n _.$list.animate({\n height: targetHeight\n }, _.options.speed);\n }\n };\n\n Slick.prototype.animateSlide = function(targetLeft, callback) {\n\n var animProps = {},\n _ = this;\n\n _.animateHeight();\n\n if (_.options.rtl === true && _.options.vertical === false) {\n targetLeft = -targetLeft;\n }\n if (_.transformsEnabled === false) {\n if (_.options.vertical === false) {\n _.$slideTrack.animate({\n left: targetLeft\n }, _.options.speed, _.options.easing, callback);\n } else {\n _.$slideTrack.animate({\n top: targetLeft\n }, _.options.speed, _.options.easing, callback);\n }\n\n } else {\n\n if (_.cssTransitions === false) {\n if (_.options.rtl === true) {\n _.currentLeft = -(_.currentLeft);\n }\n $({\n animStart: _.currentLeft\n }).animate({\n animStart: targetLeft\n }, {\n duration: _.options.speed,\n easing: _.options.easing,\n step: function(now) {\n now = Math.ceil(now);\n if (_.options.vertical === false) {\n animProps[_.animType] = 'translate(' +\n now + 'px, 0px)';\n _.$slideTrack.css(animProps);\n } else {\n animProps[_.animType] = 'translate(0px,' +\n now + 'px)';\n _.$slideTrack.css(animProps);\n }\n },\n complete: function() {\n if (callback) {\n callback.call();\n }\n }\n });\n\n } else {\n\n _.applyTransition();\n targetLeft = Math.ceil(targetLeft);\n\n if (_.options.vertical === false) {\n animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';\n } else {\n animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';\n }\n _.$slideTrack.css(animProps);\n\n if (callback) {\n setTimeout(function() {\n\n _.disableTransition();\n\n callback.call();\n }, _.options.speed);\n }\n\n }\n\n }\n\n };\n\n Slick.prototype.getNavTarget = function() {\n\n var _ = this,\n asNavFor = _.options.asNavFor;\n\n if ( asNavFor && asNavFor !== null ) {\n asNavFor = $(asNavFor).not(_.$slider);\n }\n\n return asNavFor;\n\n };\n\n Slick.prototype.asNavFor = function(index) {\n\n var _ = this,\n asNavFor = _.getNavTarget();\n\n if ( asNavFor !== null && typeof asNavFor === 'object' ) {\n asNavFor.each(function() {\n var target = $(this).slick('getSlick');\n if(!target.unslicked) {\n target.slideHandler(index, true);\n }\n });\n }\n\n };\n\n Slick.prototype.applyTransition = function(slide) {\n\n var _ = this,\n transition = {};\n\n if (_.options.fade === false) {\n transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;\n } else {\n transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;\n }\n\n if (_.options.fade === false) {\n _.$slideTrack.css(transition);\n } else {\n _.$slides.eq(slide).css(transition);\n }\n\n };\n\n Slick.prototype.autoPlay = function() {\n\n var _ = this;\n\n _.autoPlayClear();\n\n if ( _.slideCount > _.options.slidesToShow ) {\n _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );\n }\n\n };\n\n Slick.prototype.autoPlayClear = function() {\n\n var _ = this;\n\n if (_.autoPlayTimer) {\n clearInterval(_.autoPlayTimer);\n }\n\n };\n\n Slick.prototype.autoPlayIterator = function() {\n\n var _ = this,\n slideTo = _.currentSlide + _.options.slidesToScroll;\n\n if ( !_.paused && !_.interrupted && !_.focussed ) {\n\n if ( _.options.infinite === false ) {\n\n if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {\n _.direction = 0;\n }\n\n else if ( _.direction === 0 ) {\n\n slideTo = _.currentSlide - _.options.slidesToScroll;\n\n if ( _.currentSlide - 1 === 0 ) {\n _.direction = 1;\n }\n\n }\n\n }\n\n _.slideHandler( slideTo );\n\n }\n\n };\n\n Slick.prototype.buildArrows = function() {\n\n var _ = this;\n\n if (_.options.arrows === true ) {\n\n _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');\n _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');\n\n if( _.slideCount > _.options.slidesToShow ) {\n\n _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');\n _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');\n\n if (_.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.prependTo(_.options.appendArrows);\n }\n\n if (_.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.appendTo(_.options.appendArrows);\n }\n\n if (_.options.infinite !== true) {\n _.$prevArrow\n .addClass('slick-disabled')\n .attr('aria-disabled', 'true');\n }\n\n } else {\n\n _.$prevArrow.add( _.$nextArrow )\n\n .addClass('slick-hidden')\n .attr({\n 'aria-disabled': 'true',\n 'tabindex': '-1'\n });\n\n }\n\n }\n\n };\n\n Slick.prototype.buildDots = function() {\n\n var _ = this,\n i, dot;\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n _.$slider.addClass('slick-dotted');\n\n dot = $('<ul />').addClass(_.options.dotsClass);\n\n for (i = 0; i <= _.getDotCount(); i += 1) {\n dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));\n }\n\n _.$dots = dot.appendTo(_.options.appendDots);\n\n _.$dots.find('li').first().addClass('slick-active');\n\n }\n\n };\n\n Slick.prototype.buildOut = function() {\n\n var _ = this;\n\n _.$slides =\n _.$slider\n .children( _.options.slide + ':not(.slick-cloned)')\n .addClass('slick-slide');\n\n _.slideCount = _.$slides.length;\n\n _.$slides.each(function(index, element) {\n $(element)\n .attr('data-slick-index', index)\n .data('originalStyling', $(element).attr('style') || '');\n });\n\n _.$slider.addClass('slick-slider');\n\n _.$slideTrack = (_.slideCount === 0) ?\n $('<div class=\"slick-track\"/>').appendTo(_.$slider) :\n _.$slides.wrapAll('<div class=\"slick-track\"/>').parent();\n\n _.$list = _.$slideTrack.wrap(\n '<div class=\"slick-list\"/>').parent();\n _.$slideTrack.css('opacity', 0);\n\n if (_.options.centerMode === true || _.options.swipeToSlide === true) {\n _.options.slidesToScroll = 1;\n }\n\n $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');\n\n _.setupInfinite();\n\n _.buildArrows();\n\n _.buildDots();\n\n _.updateDots();\n\n\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n if (_.options.draggable === true) {\n _.$list.addClass('draggable');\n }\n\n };\n\n Slick.prototype.buildRows = function() {\n\n var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;\n\n newSlides = document.createDocumentFragment();\n originalSlides = _.$slider.children();\n\n if(_.options.rows > 0) {\n\n slidesPerSection = _.options.slidesPerRow * _.options.rows;\n numOfSlides = Math.ceil(\n originalSlides.length / slidesPerSection\n );\n\n for(a = 0; a < numOfSlides; a++){\n var slide = document.createElement('div');\n for(b = 0; b < _.options.rows; b++) {\n var row = document.createElement('div');\n for(c = 0; c < _.options.slidesPerRow; c++) {\n var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));\n if (originalSlides.get(target)) {\n row.appendChild(originalSlides.get(target));\n }\n }\n slide.appendChild(row);\n }\n newSlides.appendChild(slide);\n }\n\n _.$slider.empty().append(newSlides);\n _.$slider.children().children().children()\n .css({\n 'width':(100 / _.options.slidesPerRow) + '%',\n 'display': 'inline-block'\n });\n\n }\n\n };\n\n Slick.prototype.checkResponsive = function(initial, forceUpdate) {\n\n var _ = this,\n breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;\n var sliderWidth = _.$slider.width();\n var windowWidth = window.innerWidth || $(window).width();\n\n if (_.respondTo === 'window') {\n respondToWidth = windowWidth;\n } else if (_.respondTo === 'slider') {\n respondToWidth = sliderWidth;\n } else if (_.respondTo === 'min') {\n respondToWidth = Math.min(windowWidth, sliderWidth);\n }\n\n if ( _.options.responsive &&\n _.options.responsive.length &&\n _.options.responsive !== null) {\n\n targetBreakpoint = null;\n\n for (breakpoint in _.breakpoints) {\n if (_.breakpoints.hasOwnProperty(breakpoint)) {\n if (_.originalSettings.mobileFirst === false) {\n if (respondToWidth < _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n } else {\n if (respondToWidth > _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n }\n }\n }\n\n if (targetBreakpoint !== null) {\n if (_.activeBreakpoint !== null) {\n if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {\n _.activeBreakpoint =\n targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings,\n _.breakpointSettings[\n targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n _.activeBreakpoint = targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings,\n _.breakpointSettings[\n targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n if (_.activeBreakpoint !== null) {\n _.activeBreakpoint = null;\n _.options = _.originalSettings;\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n triggerBreakpoint = targetBreakpoint;\n }\n }\n\n // only trigger breakpoints during an actual break. not on initialize.\n if( !initial && triggerBreakpoint !== false ) {\n _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);\n }\n }\n\n };\n\n Slick.prototype.changeSlide = function(event, dontAnimate) {\n\n var _ = this,\n $target = $(event.currentTarget),\n indexOffset, slideOffset, unevenOffset;\n\n // If target is a link, prevent default action.\n if($target.is('a')) {\n event.preventDefault();\n }\n\n // If target is not the <li> element (ie: a child), find the <li>.\n if(!$target.is('li')) {\n $target = $target.closest('li');\n }\n\n unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);\n indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;\n\n switch (event.data.message) {\n\n case 'previous':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);\n }\n break;\n\n case 'next':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);\n }\n break;\n\n case 'index':\n var index = event.data.index === 0 ? 0 :\n event.data.index || $target.index() * _.options.slidesToScroll;\n\n _.slideHandler(_.checkNavigable(index), false, dontAnimate);\n $target.children().trigger('focus');\n break;\n\n default:\n return;\n }\n\n };\n\n Slick.prototype.checkNavigable = function(index) {\n\n var _ = this,\n navigables, prevNavigable;\n\n navigables = _.getNavigableIndexes();\n prevNavigable = 0;\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n prevNavigable = navigables[n];\n }\n }\n\n return index;\n };\n\n Slick.prototype.cleanUpEvents = function() {\n\n var _ = this;\n\n if (_.options.dots && _.$dots !== null) {\n\n $('li', _.$dots)\n .off('click.slick', _.changeSlide)\n .off('mouseenter.slick', $.proxy(_.interrupt, _, true))\n .off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n if (_.options.accessibility === true) {\n _.$dots.off('keydown.slick', _.keyHandler);\n }\n }\n\n _.$slider.off('focus.slick blur.slick');\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);\n _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);\n _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);\n }\n }\n\n _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);\n _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);\n _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);\n _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);\n\n _.$list.off('click.slick', _.clickHandler);\n\n $(document).off(_.visibilityChange, _.visibility);\n\n _.cleanUpSlideEvents();\n\n if (_.options.accessibility === true) {\n _.$list.off('keydown.slick', _.keyHandler);\n }\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().off('click.slick', _.selectHandler);\n }\n\n $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);\n\n $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);\n\n $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);\n\n $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);\n\n };\n\n Slick.prototype.cleanUpSlideEvents = function() {\n\n var _ = this;\n\n _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));\n _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n };\n\n Slick.prototype.cleanUpRows = function() {\n\n var _ = this, originalSlides;\n\n if(_.options.rows > 0) {\n originalSlides = _.$slides.children().children();\n originalSlides.removeAttr('style');\n _.$slider.empty().append(originalSlides);\n }\n\n };\n\n Slick.prototype.clickHandler = function(event) {\n\n var _ = this;\n\n if (_.shouldClick === false) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n }\n\n };\n\n Slick.prototype.destroy = function(refresh) {\n\n var _ = this;\n\n _.autoPlayClear();\n\n _.touchObject = {};\n\n _.cleanUpEvents();\n\n $('.slick-cloned', _.$slider).detach();\n\n if (_.$dots) {\n _.$dots.remove();\n }\n\n if ( _.$prevArrow && _.$prevArrow.length ) {\n\n _.$prevArrow\n .removeClass('slick-disabled slick-arrow slick-hidden')\n .removeAttr('aria-hidden aria-disabled tabindex')\n .css('display','');\n\n if ( _.htmlExpr.test( _.options.prevArrow )) {\n _.$prevArrow.remove();\n }\n }\n\n if ( _.$nextArrow && _.$nextArrow.length ) {\n\n _.$nextArrow\n .removeClass('slick-disabled slick-arrow slick-hidden')\n .removeAttr('aria-hidden aria-disabled tabindex')\n .css('display','');\n\n if ( _.htmlExpr.test( _.options.nextArrow )) {\n _.$nextArrow.remove();\n }\n }\n\n\n if (_.$slides) {\n\n _.$slides\n .removeClass('slick-slide slick-active slick-center slick-visible slick-current')\n .removeAttr('aria-hidden')\n .removeAttr('data-slick-index')\n .each(function(){\n $(this).attr('style', $(this).data('originalStyling'));\n });\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.detach();\n\n _.$list.detach();\n\n _.$slider.append(_.$slides);\n }\n\n _.cleanUpRows();\n\n _.$slider.removeClass('slick-slider');\n _.$slider.removeClass('slick-initialized');\n _.$slider.removeClass('slick-dotted');\n\n _.unslicked = true;\n\n if(!refresh) {\n _.$slider.trigger('destroy', [_]);\n }\n\n };\n\n Slick.prototype.disableTransition = function(slide) {\n\n var _ = this,\n transition = {};\n\n transition[_.transitionType] = '';\n\n if (_.options.fade === false) {\n _.$slideTrack.css(transition);\n } else {\n _.$slides.eq(slide).css(transition);\n }\n\n };\n\n Slick.prototype.fadeSlide = function(slideIndex, callback) {\n\n var _ = this;\n\n if (_.cssTransitions === false) {\n\n _.$slides.eq(slideIndex).css({\n zIndex: _.options.zIndex\n });\n\n _.$slides.eq(slideIndex).animate({\n opacity: 1\n }, _.options.speed, _.options.easing, callback);\n\n } else {\n\n _.applyTransition(slideIndex);\n\n _.$slides.eq(slideIndex).css({\n opacity: 1,\n zIndex: _.options.zIndex\n });\n\n if (callback) {\n setTimeout(function() {\n\n _.disableTransition(slideIndex);\n\n callback.call();\n }, _.options.speed);\n }\n\n }\n\n };\n\n Slick.prototype.fadeSlideOut = function(slideIndex) {\n\n var _ = this;\n\n if (_.cssTransitions === false) {\n\n _.$slides.eq(slideIndex).animate({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n }, _.options.speed, _.options.easing);\n\n } else {\n\n _.applyTransition(slideIndex);\n\n _.$slides.eq(slideIndex).css({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n });\n\n }\n\n };\n\n Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {\n\n var _ = this;\n\n if (filter !== null) {\n\n _.$slidesCache = _.$slides;\n\n _.unload();\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slidesCache.filter(filter).appendTo(_.$slideTrack);\n\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.focusHandler = function() {\n\n var _ = this;\n\n _.$slider\n .off('focus.slick blur.slick')\n .on('focus.slick blur.slick', '*', function(event) {\n\n event.stopImmediatePropagation();\n var $sf = $(this);\n\n setTimeout(function() {\n\n if( _.options.pauseOnFocus ) {\n _.focussed = $sf.is(':focus');\n _.autoPlay();\n }\n\n }, 0);\n\n });\n };\n\n Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {\n\n var _ = this;\n return _.currentSlide;\n\n };\n\n Slick.prototype.getDotCount = function() {\n\n var _ = this;\n\n var breakPoint = 0;\n var counter = 0;\n var pagerQty = 0;\n\n if (_.options.infinite === true) {\n if (_.slideCount <= _.options.slidesToShow) {\n ++pagerQty;\n } else {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n }\n } else if (_.options.centerMode === true) {\n pagerQty = _.slideCount;\n } else if(!_.options.asNavFor) {\n pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);\n }else {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n }\n\n return pagerQty - 1;\n\n };\n\n Slick.prototype.getLeft = function(slideIndex) {\n\n var _ = this,\n targetLeft,\n verticalHeight,\n verticalOffset = 0,\n targetSlide,\n coef;\n\n _.slideOffset = 0;\n verticalHeight = _.$slides.first().outerHeight(true);\n\n if (_.options.infinite === true) {\n if (_.slideCount > _.options.slidesToShow) {\n _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;\n coef = -1\n\n if (_.options.vertical === true && _.options.centerMode === true) {\n if (_.options.slidesToShow === 2) {\n coef = -1.5;\n } else if (_.options.slidesToShow === 1) {\n coef = -2\n }\n }\n verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;\n }\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {\n if (slideIndex > _.slideCount) {\n _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;\n verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;\n } else {\n _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;\n verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;\n }\n }\n }\n } else {\n if (slideIndex + _.options.slidesToShow > _.slideCount) {\n _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;\n verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;\n }\n }\n\n if (_.slideCount <= _.options.slidesToShow) {\n _.slideOffset = 0;\n verticalOffset = 0;\n }\n\n if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {\n _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);\n } else if (_.options.centerMode === true && _.options.infinite === true) {\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;\n } else if (_.options.centerMode === true) {\n _.slideOffset = 0;\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);\n }\n\n if (_.options.vertical === false) {\n targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;\n } else {\n targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;\n }\n\n if (_.options.variableWidth === true) {\n\n if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);\n }\n\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n\n if (_.options.centerMode === true) {\n if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);\n }\n\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n\n targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;\n }\n }\n\n return targetLeft;\n\n };\n\n Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {\n\n var _ = this;\n\n return _.options[option];\n\n };\n\n Slick.prototype.getNavigableIndexes = function() {\n\n var _ = this,\n breakPoint = 0,\n counter = 0,\n indexes = [],\n max;\n\n if (_.options.infinite === false) {\n max = _.slideCount;\n } else {\n breakPoint = _.options.slidesToScroll * -1;\n counter = _.options.slidesToScroll * -1;\n max = _.slideCount * 2;\n }\n\n while (breakPoint < max) {\n indexes.push(breakPoint);\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n\n return indexes;\n\n };\n\n Slick.prototype.getSlick = function() {\n\n return this;\n\n };\n\n Slick.prototype.getSlideCount = function() {\n\n var _ = this,\n slidesTraversed, swipedSlide, centerOffset;\n\n centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;\n\n if (_.options.swipeToSlide === true) {\n _.$slideTrack.find('.slick-slide').each(function(index, slide) {\n if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {\n swipedSlide = slide;\n return false;\n }\n });\n\n slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;\n\n return slidesTraversed;\n\n } else {\n return _.options.slidesToScroll;\n }\n\n };\n\n Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {\n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'index',\n index: parseInt(slide)\n }\n }, dontAnimate);\n\n };\n\n Slick.prototype.init = function(creation) {\n\n var _ = this;\n\n if (!$(_.$slider).hasClass('slick-initialized')) {\n\n $(_.$slider).addClass('slick-initialized');\n\n _.buildRows();\n _.buildOut();\n _.setProps();\n _.startLoad();\n _.loadSlider();\n _.initializeEvents();\n _.updateArrows();\n _.updateDots();\n _.checkResponsive(true);\n _.focusHandler();\n\n }\n\n if (creation) {\n _.$slider.trigger('init', [_]);\n }\n\n if (_.options.accessibility === true) {\n _.initADA();\n }\n\n if ( _.options.autoplay ) {\n\n _.paused = false;\n _.autoPlay();\n\n }\n\n };\n\n Slick.prototype.initADA = function() {\n var _ = this,\n numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),\n tabControlIndexes = _.getNavigableIndexes().filter(function(val) {\n return (val >= 0) && (val < _.slideCount);\n });\n\n _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({\n 'aria-hidden': 'true',\n 'tabindex': '-1'\n }).find('a, input, button, select').attr({\n 'tabindex': '-1'\n });\n\n if (_.$dots !== null) {\n _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {\n var slideControlIndex = tabControlIndexes.indexOf(i);\n\n $(this).attr({\n 'role': 'tabpanel',\n 'id': 'slick-slide' + _.instanceUid + i,\n 'tabindex': -1\n });\n\n if (slideControlIndex !== -1) {\n var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex\n if ($('#' + ariaButtonControl).length) {\n $(this).attr({\n 'aria-describedby': ariaButtonControl\n });\n }\n }\n });\n\n _.$dots.attr('role', 'tablist').find('li').each(function(i) {\n var mappedSlideIndex = tabControlIndexes[i];\n\n $(this).attr({\n 'role': 'presentation'\n });\n\n $(this).find('button').first().attr({\n 'role': 'tab',\n 'id': 'slick-slide-control' + _.instanceUid + i,\n 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,\n 'aria-label': (i + 1) + ' of ' + numDotGroups,\n 'aria-selected': null,\n 'tabindex': '-1'\n });\n\n }).eq(_.currentSlide).find('button').attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n }).end();\n }\n\n for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {\n if (_.options.focusOnChange) {\n _.$slides.eq(i).attr({'tabindex': '0'});\n } else {\n _.$slides.eq(i).removeAttr('tabindex');\n }\n }\n\n _.activateADA();\n\n };\n\n Slick.prototype.initArrowEvents = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow\n .off('click.slick')\n .on('click.slick', {\n message: 'previous'\n }, _.changeSlide);\n _.$nextArrow\n .off('click.slick')\n .on('click.slick', {\n message: 'next'\n }, _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$prevArrow.on('keydown.slick', _.keyHandler);\n _.$nextArrow.on('keydown.slick', _.keyHandler);\n }\n }\n\n };\n\n Slick.prototype.initDotEvents = function() {\n\n var _ = this;\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n $('li', _.$dots).on('click.slick', {\n message: 'index'\n }, _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$dots.on('keydown.slick', _.keyHandler);\n }\n }\n\n if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {\n\n $('li', _.$dots)\n .on('mouseenter.slick', $.proxy(_.interrupt, _, true))\n .on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n }\n\n };\n\n Slick.prototype.initSlideEvents = function() {\n\n var _ = this;\n\n if ( _.options.pauseOnHover ) {\n\n _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));\n _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n }\n\n };\n\n Slick.prototype.initializeEvents = function() {\n\n var _ = this;\n\n _.initArrowEvents();\n\n _.initDotEvents();\n _.initSlideEvents();\n\n _.$list.on('touchstart.slick mousedown.slick', {\n action: 'start'\n }, _.swipeHandler);\n _.$list.on('touchmove.slick mousemove.slick', {\n action: 'move'\n }, _.swipeHandler);\n _.$list.on('touchend.slick mouseup.slick', {\n action: 'end'\n }, _.swipeHandler);\n _.$list.on('touchcancel.slick mouseleave.slick', {\n action: 'end'\n }, _.swipeHandler);\n\n _.$list.on('click.slick', _.clickHandler);\n\n $(document).on(_.visibilityChange, $.proxy(_.visibility, _));\n\n if (_.options.accessibility === true) {\n _.$list.on('keydown.slick', _.keyHandler);\n }\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n\n $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));\n\n $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));\n\n $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);\n\n $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);\n $(_.setPosition);\n\n };\n\n Slick.prototype.initUI = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n _.$prevArrow.show();\n _.$nextArrow.show();\n\n }\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n _.$dots.show();\n\n }\n\n };\n\n Slick.prototype.keyHandler = function(event) {\n\n var _ = this;\n //Dont slide if the cursor is inside the form fields and arrow keys are pressed\n if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {\n if (event.keyCode === 37 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'next' : 'previous'\n }\n });\n } else if (event.keyCode === 39 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'previous' : 'next'\n }\n });\n }\n }\n\n };\n\n Slick.prototype.lazyLoad = function() {\n\n var _ = this,\n loadRange, cloneRange, rangeStart, rangeEnd;\n\n function loadImages(imagesScope) {\n\n $('img[data-lazy]', imagesScope).each(function() {\n\n var image = $(this),\n imageSource = $(this).attr('data-lazy'),\n imageSrcSet = $(this).attr('data-srcset'),\n imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),\n imageToLoad = document.createElement('img');\n\n imageToLoad.onload = function() {\n\n image\n .animate({ opacity: 0 }, 100, function() {\n\n if (imageSrcSet) {\n image\n .attr('srcset', imageSrcSet );\n\n if (imageSizes) {\n image\n .attr('sizes', imageSizes );\n }\n }\n\n image\n .attr('src', imageSource)\n .animate({ opacity: 1 }, 200, function() {\n image\n .removeAttr('data-lazy data-srcset data-sizes')\n .removeClass('slick-loading');\n });\n _.$slider.trigger('lazyLoaded', [_, image, imageSource]);\n });\n\n };\n\n imageToLoad.onerror = function() {\n\n image\n .removeAttr( 'data-lazy' )\n .removeClass( 'slick-loading' )\n .addClass( 'slick-lazyload-error' );\n\n _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n };\n\n imageToLoad.src = imageSource;\n\n });\n\n }\n\n if (_.options.centerMode === true) {\n if (_.options.infinite === true) {\n rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);\n rangeEnd = rangeStart + _.options.slidesToShow + 2;\n } else {\n rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));\n rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;\n }\n } else {\n rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;\n rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);\n if (_.options.fade === true) {\n if (rangeStart > 0) rangeStart--;\n if (rangeEnd <= _.slideCount) rangeEnd++;\n }\n }\n\n loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);\n\n if (_.options.lazyLoad === 'anticipated') {\n var prevSlide = rangeStart - 1,\n nextSlide = rangeEnd,\n $slides = _.$slider.find('.slick-slide');\n\n for (var i = 0; i < _.options.slidesToScroll; i++) {\n if (prevSlide < 0) prevSlide = _.slideCount - 1;\n loadRange = loadRange.add($slides.eq(prevSlide));\n loadRange = loadRange.add($slides.eq(nextSlide));\n prevSlide--;\n nextSlide++;\n }\n }\n\n loadImages(loadRange);\n\n if (_.slideCount <= _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-slide');\n loadImages(cloneRange);\n } else\n if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);\n loadImages(cloneRange);\n } else if (_.currentSlide === 0) {\n cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);\n loadImages(cloneRange);\n }\n\n };\n\n Slick.prototype.loadSlider = function() {\n\n var _ = this;\n\n _.setPosition();\n\n _.$slideTrack.css({\n opacity: 1\n });\n\n _.$slider.removeClass('slick-loading');\n\n _.initUI();\n\n if (_.options.lazyLoad === 'progressive') {\n _.progressiveLazyLoad();\n }\n\n };\n\n Slick.prototype.next = Slick.prototype.slickNext = function() {\n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'next'\n }\n });\n\n };\n\n Slick.prototype.orientationChange = function() {\n\n var _ = this;\n\n _.checkResponsive();\n _.setPosition();\n\n };\n\n Slick.prototype.pause = Slick.prototype.slickPause = function() {\n\n var _ = this;\n\n _.autoPlayClear();\n _.paused = true;\n\n };\n\n Slick.prototype.play = Slick.prototype.slickPlay = function() {\n\n var _ = this;\n\n _.autoPlay();\n _.options.autoplay = true;\n _.paused = false;\n _.focussed = false;\n _.interrupted = false;\n\n };\n\n Slick.prototype.postSlide = function(index) {\n\n var _ = this;\n\n if( !_.unslicked ) {\n\n _.$slider.trigger('afterChange', [_, index]);\n\n _.animating = false;\n\n if (_.slideCount > _.options.slidesToShow) {\n _.setPosition();\n }\n\n _.swipeLeft = null;\n\n if ( _.options.autoplay ) {\n _.autoPlay();\n }\n\n if (_.options.accessibility === true) {\n _.initADA();\n\n if (_.options.focusOnChange) {\n var $currentSlide = $(_.$slides.get(_.currentSlide));\n $currentSlide.attr('tabindex', 0).focus();\n }\n }\n\n }\n\n };\n\n Slick.prototype.prev = Slick.prototype.slickPrev = function() {\n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'previous'\n }\n });\n\n };\n\n Slick.prototype.preventDefault = function(event) {\n\n event.preventDefault();\n\n };\n\n Slick.prototype.progressiveLazyLoad = function( tryCount ) {\n\n tryCount = tryCount || 1;\n\n var _ = this,\n $imgsToLoad = $( 'img[data-lazy]', _.$slider ),\n image,\n imageSource,\n imageSrcSet,\n imageSizes,\n imageToLoad;\n\n if ( $imgsToLoad.length ) {\n\n image = $imgsToLoad.first();\n imageSource = image.attr('data-lazy');\n imageSrcSet = image.attr('data-srcset');\n imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');\n imageToLoad = document.createElement('img');\n\n imageToLoad.onload = function() {\n\n if (imageSrcSet) {\n image\n .attr('srcset', imageSrcSet );\n\n if (imageSizes) {\n image\n .attr('sizes', imageSizes );\n }\n }\n\n image\n .attr( 'src', imageSource )\n .removeAttr('data-lazy data-srcset data-sizes')\n .removeClass('slick-loading');\n\n if ( _.options.adaptiveHeight === true ) {\n _.setPosition();\n }\n\n _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);\n _.progressiveLazyLoad();\n\n };\n\n imageToLoad.onerror = function() {\n\n if ( tryCount < 3 ) {\n\n /**\n * try to load the image 3 times,\n * leave a slight delay so we don't get\n * servers blocking the request.\n */\n setTimeout( function() {\n _.progressiveLazyLoad( tryCount + 1 );\n }, 500 );\n\n } else {\n\n image\n .removeAttr( 'data-lazy' )\n .removeClass( 'slick-loading' )\n .addClass( 'slick-lazyload-error' );\n\n _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n _.progressiveLazyLoad();\n\n }\n\n };\n\n imageToLoad.src = imageSource;\n\n } else {\n\n _.$slider.trigger('allImagesLoaded', [ _ ]);\n\n }\n\n };\n\n Slick.prototype.refresh = function( initializing ) {\n\n var _ = this, currentSlide, lastVisibleIndex;\n\n lastVisibleIndex = _.slideCount - _.options.slidesToShow;\n\n // in non-infinite sliders, we don't want to go past the\n // last visible index.\n if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {\n _.currentSlide = lastVisibleIndex;\n }\n\n // if less slides than to show, go to start.\n if ( _.slideCount <= _.options.slidesToShow ) {\n _.currentSlide = 0;\n\n }\n\n currentSlide = _.currentSlide;\n\n _.destroy(true);\n\n $.extend(_, _.initials, { currentSlide: currentSlide });\n\n _.init();\n\n if( !initializing ) {\n\n _.changeSlide({\n data: {\n message: 'index',\n index: currentSlide\n }\n }, false);\n\n }\n\n };\n\n Slick.prototype.registerBreakpoints = function() {\n\n var _ = this, breakpoint, currentBreakpoint, l,\n responsiveSettings = _.options.responsive || null;\n\n if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {\n\n _.respondTo = _.options.respondTo || 'window';\n\n for ( breakpoint in responsiveSettings ) {\n\n l = _.breakpoints.length-1;\n\n if (responsiveSettings.hasOwnProperty(breakpoint)) {\n currentBreakpoint = responsiveSettings[breakpoint].breakpoint;\n\n // loop through the breakpoints and cut out any existing\n // ones with the same breakpoint number, we don't want dupes.\n while( l >= 0 ) {\n if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {\n _.breakpoints.splice(l,1);\n }\n l--;\n }\n\n _.breakpoints.push(currentBreakpoint);\n _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;\n\n }\n\n }\n\n _.breakpoints.sort(function(a, b) {\n return ( _.options.mobileFirst ) ? a-b : b-a;\n });\n\n }\n\n };\n\n Slick.prototype.reinit = function() {\n\n var _ = this;\n\n _.$slides =\n _.$slideTrack\n .children(_.options.slide)\n .addClass('slick-slide');\n\n _.slideCount = _.$slides.length;\n\n if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {\n _.currentSlide = _.currentSlide - _.options.slidesToScroll;\n }\n\n if (_.slideCount <= _.options.slidesToShow) {\n _.currentSlide = 0;\n }\n\n _.registerBreakpoints();\n\n _.setProps();\n _.setupInfinite();\n _.buildArrows();\n _.updateArrows();\n _.initArrowEvents();\n _.buildDots();\n _.updateDots();\n _.initDotEvents();\n _.cleanUpSlideEvents();\n _.initSlideEvents();\n\n _.checkResponsive(false, true);\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n _.setPosition();\n _.focusHandler();\n\n _.paused = !_.options.autoplay;\n _.autoPlay();\n\n _.$slider.trigger('reInit', [_]);\n\n };\n\n Slick.prototype.resize = function() {\n\n var _ = this;\n\n if ($(window).width() !== _.windowWidth) {\n clearTimeout(_.windowDelay);\n _.windowDelay = window.setTimeout(function() {\n _.windowWidth = $(window).width();\n _.checkResponsive();\n if( !_.unslicked ) { _.setPosition(); }\n }, 50);\n }\n };\n\n Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {\n\n var _ = this;\n\n if (typeof(index) === 'boolean') {\n removeBefore = index;\n index = removeBefore === true ? 0 : _.slideCount - 1;\n } else {\n index = removeBefore === true ? --index : index;\n }\n\n if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {\n return false;\n }\n\n _.unload();\n\n if (removeAll === true) {\n _.$slideTrack.children().remove();\n } else {\n _.$slideTrack.children(this.options.slide).eq(index).remove();\n }\n\n _.$slides = _.$slideTrack.children(this.options.slide);\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.append(_.$slides);\n\n _.$slidesCache = _.$slides;\n\n _.reinit();\n\n };\n\n Slick.prototype.setCSS = function(position) {\n\n var _ = this,\n positionProps = {},\n x, y;\n\n if (_.options.rtl === true) {\n position = -position;\n }\n x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';\n y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';\n\n positionProps[_.positionProp] = position;\n\n if (_.transformsEnabled === false) {\n _.$slideTrack.css(positionProps);\n } else {\n positionProps = {};\n if (_.cssTransitions === false) {\n positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';\n _.$slideTrack.css(positionProps);\n } else {\n positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';\n _.$slideTrack.css(positionProps);\n }\n }\n\n };\n\n Slick.prototype.setDimensions = function() {\n\n var _ = this;\n\n if (_.options.vertical === false) {\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: ('0px ' + _.options.centerPadding)\n });\n }\n } else {\n _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: (_.options.centerPadding + ' 0px')\n });\n }\n }\n\n _.listWidth = _.$list.width();\n _.listHeight = _.$list.height();\n\n\n if (_.options.vertical === false && _.options.variableWidth === false) {\n _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);\n _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));\n\n } else if (_.options.variableWidth === true) {\n _.$slideTrack.width(5000 * _.slideCount);\n } else {\n _.slideWidth = Math.ceil(_.listWidth);\n _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));\n }\n\n var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();\n if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);\n\n };\n\n Slick.prototype.setFade = function() {\n\n var _ = this,\n targetLeft;\n\n _.$slides.each(function(index, element) {\n targetLeft = (_.slideWidth * index) * -1;\n if (_.options.rtl === true) {\n $(element).css({\n position: 'relative',\n right: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n } else {\n $(element).css({\n position: 'relative',\n left: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n }\n });\n\n _.$slides.eq(_.currentSlide).css({\n zIndex: _.options.zIndex - 1,\n opacity: 1\n });\n\n };\n\n Slick.prototype.setHeight = function() {\n\n var _ = this;\n\n if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n _.$list.css('height', targetHeight);\n }\n\n };\n\n Slick.prototype.setOption =\n Slick.prototype.slickSetOption = function() {\n\n /**\n * accepts arguments in format of:\n *\n * - for changing a single option's value:\n * .slick(\"setOption\", option, value, refresh )\n *\n * - for changing a set of responsive options:\n * .slick(\"setOption\", 'responsive', [{}, ...], refresh )\n *\n * - for updating multiple values at once (not responsive)\n * .slick(\"setOption\", { 'option': value, ... }, refresh )\n */\n\n var _ = this, l, item, option, value, refresh = false, type;\n\n if( $.type( arguments[0] ) === 'object' ) {\n\n option = arguments[0];\n refresh = arguments[1];\n type = 'multiple';\n\n } else if ( $.type( arguments[0] ) === 'string' ) {\n\n option = arguments[0];\n value = arguments[1];\n refresh = arguments[2];\n\n if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {\n\n type = 'responsive';\n\n } else if ( typeof arguments[1] !== 'undefined' ) {\n\n type = 'single';\n\n }\n\n }\n\n if ( type === 'single' ) {\n\n _.options[option] = value;\n\n\n } else if ( type === 'multiple' ) {\n\n $.each( option , function( opt, val ) {\n\n _.options[opt] = val;\n\n });\n\n\n } else if ( type === 'responsive' ) {\n\n for ( item in value ) {\n\n if( $.type( _.options.responsive ) !== 'array' ) {\n\n _.options.responsive = [ value[item] ];\n\n } else {\n\n l = _.options.responsive.length-1;\n\n // loop through the responsive object and splice out duplicates.\n while( l >= 0 ) {\n\n if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {\n\n _.options.responsive.splice(l,1);\n\n }\n\n l--;\n\n }\n\n _.options.responsive.push( value[item] );\n\n }\n\n }\n\n }\n\n if ( refresh ) {\n\n _.unload();\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.setPosition = function() {\n\n var _ = this;\n\n _.setDimensions();\n\n _.setHeight();\n\n if (_.options.fade === false) {\n _.setCSS(_.getLeft(_.currentSlide));\n } else {\n _.setFade();\n }\n\n _.$slider.trigger('setPosition', [_]);\n\n };\n\n Slick.prototype.setProps = function() {\n\n var _ = this,\n bodyStyle = document.body.style;\n\n _.positionProp = _.options.vertical === true ? 'top' : 'left';\n\n if (_.positionProp === 'top') {\n _.$slider.addClass('slick-vertical');\n } else {\n _.$slider.removeClass('slick-vertical');\n }\n\n if (bodyStyle.WebkitTransition !== undefined ||\n bodyStyle.MozTransition !== undefined ||\n bodyStyle.msTransition !== undefined) {\n if (_.options.useCSS === true) {\n _.cssTransitions = true;\n }\n }\n\n if ( _.options.fade ) {\n if ( typeof _.options.zIndex === 'number' ) {\n if( _.options.zIndex < 3 ) {\n _.options.zIndex = 3;\n }\n } else {\n _.options.zIndex = _.defaults.zIndex;\n }\n }\n\n if (bodyStyle.OTransform !== undefined) {\n _.animType = 'OTransform';\n _.transformType = '-o-transform';\n _.transitionType = 'OTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.MozTransform !== undefined) {\n _.animType = 'MozTransform';\n _.transformType = '-moz-transform';\n _.transitionType = 'MozTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.webkitTransform !== undefined) {\n _.animType = 'webkitTransform';\n _.transformType = '-webkit-transform';\n _.transitionType = 'webkitTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.msTransform !== undefined) {\n _.animType = 'msTransform';\n _.transformType = '-ms-transform';\n _.transitionType = 'msTransition';\n if (bodyStyle.msTransform === undefined) _.animType = false;\n }\n if (bodyStyle.transform !== undefined && _.animType !== false) {\n _.animType = 'transform';\n _.transformType = 'transform';\n _.transitionType = 'transition';\n }\n _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);\n };\n\n\n Slick.prototype.setSlideClasses = function(index) {\n\n var _ = this,\n centerOffset, allSlides, indexOffset, remainder;\n\n allSlides = _.$slider\n .find('.slick-slide')\n .removeClass('slick-active slick-center slick-current')\n .attr('aria-hidden', 'true');\n\n _.$slides\n .eq(index)\n .addClass('slick-current');\n\n if (_.options.centerMode === true) {\n\n var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;\n\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n if (_.options.infinite === true) {\n\n if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {\n _.$slides\n .slice(index - centerOffset + evenCoef, index + centerOffset + 1)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n indexOffset = _.options.slidesToShow + index;\n allSlides\n .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n }\n\n if (index === 0) {\n\n allSlides\n .eq(allSlides.length - 1 - _.options.slidesToShow)\n .addClass('slick-center');\n\n } else if (index === _.slideCount - 1) {\n\n allSlides\n .eq(_.options.slidesToShow)\n .addClass('slick-center');\n\n }\n\n }\n\n _.$slides\n .eq(index)\n .addClass('slick-center');\n\n } else {\n\n if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {\n\n _.$slides\n .slice(index, index + _.options.slidesToShow)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else if (allSlides.length <= _.options.slidesToShow) {\n\n allSlides\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n remainder = _.slideCount % _.options.slidesToShow;\n indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;\n\n if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {\n\n allSlides\n .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n allSlides\n .slice(indexOffset, indexOffset + _.options.slidesToShow)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n }\n\n }\n\n }\n\n if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {\n _.lazyLoad();\n }\n };\n\n Slick.prototype.setupInfinite = function() {\n\n var _ = this,\n i, slideIndex, infiniteCount;\n\n if (_.options.fade === true) {\n _.options.centerMode = false;\n }\n\n if (_.options.infinite === true && _.options.fade === false) {\n\n slideIndex = null;\n\n if (_.slideCount > _.options.slidesToShow) {\n\n if (_.options.centerMode === true) {\n infiniteCount = _.options.slidesToShow + 1;\n } else {\n infiniteCount = _.options.slidesToShow;\n }\n\n for (i = _.slideCount; i > (_.slideCount -\n infiniteCount); i -= 1) {\n slideIndex = i - 1;\n $(_.$slides[slideIndex]).clone(true).attr('id', '')\n .attr('data-slick-index', slideIndex - _.slideCount)\n .prependTo(_.$slideTrack).addClass('slick-cloned');\n }\n for (i = 0; i < infiniteCount + _.slideCount; i += 1) {\n slideIndex = i;\n $(_.$slides[slideIndex]).clone(true).attr('id', '')\n .attr('data-slick-index', slideIndex + _.slideCount)\n .appendTo(_.$slideTrack).addClass('slick-cloned');\n }\n _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {\n $(this).attr('id', '');\n });\n\n }\n\n }\n\n };\n\n Slick.prototype.interrupt = function( toggle ) {\n\n var _ = this;\n\n if( !toggle ) {\n _.autoPlay();\n }\n _.interrupted = toggle;\n\n };\n\n Slick.prototype.selectHandler = function(event) {\n\n var _ = this;\n\n var targetElement =\n $(event.target).is('.slick-slide') ?\n $(event.target) :\n $(event.target).parents('.slick-slide');\n\n var index = parseInt(targetElement.attr('data-slick-index'));\n\n if (!index) index = 0;\n\n if (_.slideCount <= _.options.slidesToShow) {\n\n _.slideHandler(index, false, true);\n return;\n\n }\n\n _.slideHandler(index);\n\n };\n\n Slick.prototype.slideHandler = function(index, sync, dontAnimate) {\n\n var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,\n _ = this, navTarget;\n\n sync = sync || false;\n\n if (_.animating === true && _.options.waitForAnimate === true) {\n return;\n }\n\n if (_.options.fade === true && _.currentSlide === index) {\n return;\n }\n\n if (sync === false) {\n _.asNavFor(index);\n }\n\n targetSlide = index;\n targetLeft = _.getLeft(targetSlide);\n slideLeft = _.getLeft(_.currentSlide);\n\n _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;\n\n if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n _.animateSlide(slideLeft, function() {\n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n _.animateSlide(slideLeft, function() {\n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n }\n\n if ( _.options.autoplay ) {\n clearInterval(_.autoPlayTimer);\n }\n\n if (targetSlide < 0) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);\n } else {\n animSlide = _.slideCount + targetSlide;\n }\n } else if (targetSlide >= _.slideCount) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = 0;\n } else {\n animSlide = targetSlide - _.slideCount;\n }\n } else {\n animSlide = targetSlide;\n }\n\n _.animating = true;\n\n _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);\n\n oldSlide = _.currentSlide;\n _.currentSlide = animSlide;\n\n _.setSlideClasses(_.currentSlide);\n\n if ( _.options.asNavFor ) {\n\n navTarget = _.getNavTarget();\n navTarget = navTarget.slick('getSlick');\n\n if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {\n navTarget.setSlideClasses(_.currentSlide);\n }\n\n }\n\n _.updateDots();\n _.updateArrows();\n\n if (_.options.fade === true) {\n if (dontAnimate !== true) {\n\n _.fadeSlideOut(oldSlide);\n\n _.fadeSlide(animSlide, function() {\n _.postSlide(animSlide);\n });\n\n } else {\n _.postSlide(animSlide);\n }\n _.animateHeight();\n return;\n }\n\n if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n _.animateSlide(targetLeft, function() {\n _.postSlide(animSlide);\n });\n } else {\n _.postSlide(animSlide);\n }\n\n };\n\n Slick.prototype.startLoad = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n _.$prevArrow.hide();\n _.$nextArrow.hide();\n\n }\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n _.$dots.hide();\n\n }\n\n _.$slider.addClass('slick-loading');\n\n };\n\n Slick.prototype.swipeDirection = function() {\n\n var xDist, yDist, r, swipeAngle, _ = this;\n\n xDist = _.touchObject.startX - _.touchObject.curX;\n yDist = _.touchObject.startY - _.touchObject.curY;\n r = Math.atan2(yDist, xDist);\n\n swipeAngle = Math.round(r * 180 / Math.PI);\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n\n if ((swipeAngle <= 45) && (swipeAngle >= 0)) {\n return (_.options.rtl === false ? 'left' : 'right');\n }\n if ((swipeAngle <= 360) && (swipeAngle >= 315)) {\n return (_.options.rtl === false ? 'left' : 'right');\n }\n if ((swipeAngle >= 135) && (swipeAngle <= 225)) {\n return (_.options.rtl === false ? 'right' : 'left');\n }\n if (_.options.verticalSwiping === true) {\n if ((swipeAngle >= 35) && (swipeAngle <= 135)) {\n return 'down';\n } else {\n return 'up';\n }\n }\n\n return 'vertical';\n\n };\n\n Slick.prototype.swipeEnd = function(event) {\n\n var _ = this,\n slideCount,\n direction;\n\n _.dragging = false;\n _.swiping = false;\n\n if (_.scrolling) {\n _.scrolling = false;\n return false;\n }\n\n _.interrupted = false;\n _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;\n\n if ( _.touchObject.curX === undefined ) {\n return false;\n }\n\n if ( _.touchObject.edgeHit === true ) {\n _.$slider.trigger('edge', [_, _.swipeDirection() ]);\n }\n\n if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {\n\n direction = _.swipeDirection();\n\n switch ( direction ) {\n\n case 'left':\n case 'down':\n\n slideCount =\n _.options.swipeToSlide ?\n _.checkNavigable( _.currentSlide + _.getSlideCount() ) :\n _.currentSlide + _.getSlideCount();\n\n _.currentDirection = 0;\n\n break;\n\n case 'right':\n case 'up':\n\n slideCount =\n _.options.swipeToSlide ?\n _.checkNavigable( _.currentSlide - _.getSlideCount() ) :\n _.currentSlide - _.getSlideCount();\n\n _.currentDirection = 1;\n\n break;\n\n default:\n\n\n }\n\n if( direction != 'vertical' ) {\n\n _.slideHandler( slideCount );\n _.touchObject = {};\n _.$slider.trigger('swipe', [_, direction ]);\n\n }\n\n } else {\n\n if ( _.touchObject.startX !== _.touchObject.curX ) {\n\n _.slideHandler( _.currentSlide );\n _.touchObject = {};\n\n }\n\n }\n\n };\n\n Slick.prototype.swipeHandler = function(event) {\n\n var _ = this;\n\n if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {\n return;\n } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {\n return;\n }\n\n _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?\n event.originalEvent.touches.length : 1;\n\n _.touchObject.minSwipe = _.listWidth / _.options\n .touchThreshold;\n\n if (_.options.verticalSwiping === true) {\n _.touchObject.minSwipe = _.listHeight / _.options\n .touchThreshold;\n }\n\n switch (event.data.action) {\n\n case 'start':\n _.swipeStart(event);\n break;\n\n case 'move':\n _.swipeMove(event);\n break;\n\n case 'end':\n _.swipeEnd(event);\n break;\n\n }\n\n };\n\n Slick.prototype.swipeMove = function(event) {\n\n var _ = this,\n edgeWasHit = false,\n curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;\n\n touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;\n\n if (!_.dragging || _.scrolling || touches && touches.length !== 1) {\n return false;\n }\n\n curLeft = _.getLeft(_.currentSlide);\n\n _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;\n _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;\n\n _.touchObject.swipeLength = Math.round(Math.sqrt(\n Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));\n\n verticalSwipeLength = Math.round(Math.sqrt(\n Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));\n\n if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {\n _.scrolling = true;\n return false;\n }\n\n if (_.options.verticalSwiping === true) {\n _.touchObject.swipeLength = verticalSwipeLength;\n }\n\n swipeDirection = _.swipeDirection();\n\n if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {\n _.swiping = true;\n event.preventDefault();\n }\n\n positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);\n if (_.options.verticalSwiping === true) {\n positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;\n }\n\n\n swipeLength = _.touchObject.swipeLength;\n\n _.touchObject.edgeHit = false;\n\n if (_.options.infinite === false) {\n if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {\n swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;\n _.touchObject.edgeHit = true;\n }\n }\n\n if (_.options.vertical === false) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n } else {\n _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;\n }\n if (_.options.verticalSwiping === true) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n }\n\n if (_.options.fade === true || _.options.touchMove === false) {\n return false;\n }\n\n if (_.animating === true) {\n _.swipeLeft = null;\n return false;\n }\n\n _.setCSS(_.swipeLeft);\n\n };\n\n Slick.prototype.swipeStart = function(event) {\n\n var _ = this,\n touches;\n\n _.interrupted = true;\n\n if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {\n _.touchObject = {};\n return false;\n }\n\n if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {\n touches = event.originalEvent.touches[0];\n }\n\n _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;\n _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;\n\n _.dragging = true;\n\n };\n\n Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {\n\n var _ = this;\n\n if (_.$slidesCache !== null) {\n\n _.unload();\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slidesCache.appendTo(_.$slideTrack);\n\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.unload = function() {\n\n var _ = this;\n\n $('.slick-cloned', _.$slider).remove();\n\n if (_.$dots) {\n _.$dots.remove();\n }\n\n if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.remove();\n }\n\n if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.remove();\n }\n\n _.$slides\n .removeClass('slick-slide slick-active slick-visible slick-current')\n .attr('aria-hidden', 'true')\n .css('width', '');\n\n };\n\n Slick.prototype.unslick = function(fromBreakpoint) {\n\n var _ = this;\n _.$slider.trigger('unslick', [_, fromBreakpoint]);\n _.destroy();\n\n };\n\n Slick.prototype.updateArrows = function() {\n\n var _ = this,\n centerOffset;\n\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n if ( _.options.arrows === true &&\n _.slideCount > _.options.slidesToShow &&\n !_.options.infinite ) {\n\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n if (_.currentSlide === 0) {\n\n _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {\n\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {\n\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n }\n\n }\n\n };\n\n Slick.prototype.updateDots = function() {\n\n var _ = this;\n\n if (_.$dots !== null) {\n\n _.$dots\n .find('li')\n .removeClass('slick-active')\n .end();\n\n _.$dots\n .find('li')\n .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))\n .addClass('slick-active');\n\n }\n\n };\n\n Slick.prototype.visibility = function() {\n\n var _ = this;\n\n if ( _.options.autoplay ) {\n\n if ( document[_.hidden] ) {\n\n _.interrupted = true;\n\n } else {\n\n _.interrupted = false;\n\n }\n\n }\n\n };\n\n $.fn.slick = function() {\n var _ = this,\n opt = arguments[0],\n args = Array.prototype.slice.call(arguments, 1),\n l = _.length,\n i,\n ret;\n for (i = 0; i < l; i++) {\n if (typeof opt == 'object' || typeof opt == 'undefined')\n _[i].slick = new Slick(_[i], opt);\n else\n ret = _[i].slick[opt].apply(_[i].slick, args);\n if (typeof ret != 'undefined') return ret;\n }\n return _;\n };\n\n}));\n","/*\r\n * Backstretch\r\n * http://srobbin.com/jquery-plugins/backstretch/\r\n *\r\n * Copyright (c) 2013 Scott Robbin\r\n * Licensed under the MIT license.\r\n */\r\n\r\n;(function ($, window, undefined) {\r\n 'use strict';\r\n\r\n /** @const */\r\n var YOUTUBE_REGEXP = /^.*(youtu\\.be\\/|youtube\\.com\\/v\\/|youtube\\.com\\/embed\\/|youtube\\.com\\/watch\\?v=|youtube\\.com\\/watch\\?.*\\&v=)([^#\\&\\?]*).*/i;\r\n\r\n /* PLUGIN DEFINITION\r\n * ========================= */\r\n\r\n $.fn.backstretch = function (images, options) {\r\n var args = arguments;\r\n\r\n /*\r\n * Scroll the page one pixel to get the right window height on iOS\r\n * Pretty harmless for everyone else\r\n */\r\n if ($(window).scrollTop() === 0) {\r\n window.scrollTo(0, 0);\r\n }\r\n\r\n var returnValues;\r\n\r\n this.each(function (eachIndex) {\r\n var $this = $(this)\r\n , obj = $this.data('backstretch');\r\n\r\n // Do we already have an instance attached to this element?\r\n if (obj) {\r\n\r\n // Is this a method they're trying to execute?\r\n if (typeof args[0] === 'string' &&\r\n typeof obj[args[0]] === 'function') {\r\n\r\n // Call the method\r\n var returnValue = obj[args[0]].apply(obj, Array.prototype.slice.call(args, 1));\r\n if (returnValue === obj) { // If a method is chaining\r\n returnValue = undefined;\r\n }\r\n if (returnValue !== undefined) {\r\n returnValues = returnValues || [];\r\n returnValues[eachIndex] = returnValue;\r\n }\r\n\r\n return; // Nothing further to do\r\n }\r\n\r\n // Merge the old options with the new\r\n options = $.extend(obj.options, options);\r\n\r\n // Remove the old instance\r\n if (typeof obj === 'object' && 'destroy' in obj) {\r\n obj.destroy(true);\r\n }\r\n }\r\n\r\n // We need at least one image\r\n if (!images || (images && images.length === 0)) {\r\n var cssBackgroundImage = $this.css('background-image');\r\n if (cssBackgroundImage && cssBackgroundImage !== 'none') {\r\n images = [{url: $this.css('backgroundImage').replace(/url\\(|\\)|\"|'/g, \"\")}];\r\n }\r\n else {\r\n $.error('No images were supplied for Backstretch, or element must have a CSS-defined background image.');\r\n }\r\n }\r\n\r\n obj = new Backstretch(this, images, options || {});\r\n $this.data('backstretch', obj);\r\n });\r\n\r\n return returnValues ? returnValues.length === 1 ? returnValues[0] : returnValues : this;\r\n };\r\n\r\n // If no element is supplied, we'll attach to body\r\n $.backstretch = function (images, options) {\r\n // Return the instance\r\n return $('body')\r\n .backstretch(images, options)\r\n .data('backstretch');\r\n };\r\n\r\n // Custom selector\r\n $.expr[':'].backstretch = function (elem) {\r\n return $(elem).data('backstretch') !== undefined;\r\n };\r\n\r\n /* DEFAULTS\r\n * ========================= */\r\n\r\n $.fn.backstretch.defaults = {\r\n duration: 5000 // Amount of time in between slides (if slideshow)\r\n , transition: 'fade' // Type of transition between slides\r\n , transitionDuration: 0 // Duration of transition between slides\r\n , animateFirst: true // Animate the transition of first image of slideshow in?\r\n , alignX: 0.5 // The x-alignment for the image, can be 'left'|'center'|'right' or any number between 0.0 and 1.0\r\n , alignY: 0.5 // The y-alignment for the image, can be 'top'|'center'|'bottom' or any number between 0.0 and 1.0\r\n , paused: false // Whether the images should slide after given duration\r\n , start: 0 // Index of the first image to show\r\n , preload: 2 // How many images preload at a time?\r\n , preloadSize: 1 // How many images can we preload in parallel?\r\n , resolutionRefreshRate: 2500 // How long to wait before switching resolution?\r\n , resolutionChangeRatioThreshold: 0.1 // How much a change should it be before switching resolution?\r\n };\r\n\r\n /* STYLES\r\n *\r\n * Baked-in styles that we'll apply to our elements.\r\n * In an effort to keep the plugin simple, these are not exposed as options.\r\n * That said, anyone can override these in their own stylesheet.\r\n * ========================= */\r\n var styles = {\r\n wrap: {\r\n left: 0\r\n , top: 0\r\n , overflow: 'hidden'\r\n , margin: 0\r\n , padding: 0\r\n , height: '100%'\r\n , width: '100%'\r\n , zIndex: -999999\r\n }\r\n , itemWrapper: {\r\n position: 'absolute'\r\n , display: 'none'\r\n , margin: 0\r\n , padding: 0\r\n , border: 'none'\r\n , width: '100%'\r\n , height: '100%'\r\n , zIndex: -999999\r\n }\r\n , item: {\r\n position: 'absolute'\r\n , margin: 0\r\n , padding: 0\r\n , border: 'none'\r\n , width: '100%'\r\n , height: '100%'\r\n , maxWidth: 'none'\r\n }\r\n };\r\n\r\n /* Given an array of different options for an image,\r\n * choose the optimal image for the container size.\r\n *\r\n * Given an image template (a string with {{ width }} and/or\r\n * {{height}} inside) and a container object, returns the\r\n * image url with the exact values for the size of that\r\n * container.\r\n *\r\n * Returns an array of urls optimized for the specified resolution.\r\n *\r\n */\r\n var optimalSizeImages = (function () {\r\n\r\n /* Sorts the array of image sizes based on width */\r\n var widthInsertSort = function (arr) {\r\n for (var i = 1; i < arr.length; i++) {\r\n var tmp = arr[i],\r\n j = i;\r\n while (arr[j - 1] && parseInt(arr[j - 1].width, 10) > parseInt(tmp.width, 10)) {\r\n arr[j] = arr[j - 1];\r\n --j;\r\n }\r\n arr[j] = tmp;\r\n }\r\n\r\n return arr;\r\n };\r\n\r\n /* Given an array of various sizes of the same image and a container width,\r\n * return the best image.\r\n */\r\n var selectBest = function (containerWidth, containerHeight, imageSizes) {\r\n\r\n var devicePixelRatio = window.devicePixelRatio || 1;\r\n var deviceOrientation = getDeviceOrientation();\r\n var windowOrientation = getWindowOrientation();\r\n var wrapperOrientation = (containerHeight > containerWidth) ?\r\n 'portrait' :\r\n (containerWidth > containerHeight ? 'landscape' : 'square');\r\n\r\n var lastAllowedImage = 0;\r\n var testWidth;\r\n\r\n for (var j = 0, image; j < imageSizes.length; j++) {\r\n\r\n image = imageSizes[j];\r\n\r\n // In case a new image was pushed in, process it:\r\n if (typeof image === 'string') {\r\n image = imageSizes[j] = {url: image};\r\n }\r\n\r\n if (image.pixelRatio && image.pixelRatio !== 'auto' && parseFloat(image.pixelRatio) !== devicePixelRatio) {\r\n // We disallowed choosing this image for current device pixel ratio,\r\n // So skip this one.\r\n continue;\r\n }\r\n\r\n if (image.deviceOrientation && image.deviceOrientation !== deviceOrientation) {\r\n // We disallowed choosing this image for current device orientation,\r\n // So skip this one.\r\n continue;\r\n }\r\n\r\n if (image.windowOrientation && image.windowOrientation !== deviceOrientation) {\r\n // We disallowed choosing this image for current window orientation,\r\n // So skip this one.\r\n continue;\r\n }\r\n\r\n if (image.orientation && image.orientation !== wrapperOrientation) {\r\n // We disallowed choosing this image for current element's orientation,\r\n // So skip this one.\r\n continue;\r\n }\r\n\r\n // Mark this one as the last one we investigated\r\n // which does not violate device pixel ratio rules.\r\n // We may choose this one later if there's no match.\r\n lastAllowedImage = j;\r\n\r\n // For most images, we match the specified width against element width,\r\n // And enforcing a limit depending on the \"pixelRatio\" property if specified.\r\n // But if a pixelRatio=\"auto\", then we consider the width as the physical width of the image,\r\n // And match it while considering the device's pixel ratio.\r\n testWidth = containerWidth;\r\n if (image.pixelRatio === 'auto') {\r\n containerWidth *= devicePixelRatio;\r\n }\r\n\r\n // Stop when the width of the image is larger or equal to the container width\r\n if (image.width >= testWidth) {\r\n break;\r\n }\r\n }\r\n\r\n // Use the image located at where we stopped\r\n return imageSizes[Math.min(j, lastAllowedImage)];\r\n };\r\n\r\n var replaceTagsInUrl = function (url, templateReplacer) {\r\n\r\n if (typeof url === 'string') {\r\n url = url.replace(/{{(width|height)}}/g, templateReplacer);\r\n }\r\n else if (url instanceof Array) {\r\n for (var i = 0; i < url.length; i++) {\r\n if (url[i].src) {\r\n url[i].src = replaceTagsInUrl(url[i].src, templateReplacer);\r\n }\r\n else {\r\n url[i] = replaceTagsInUrl(url[i], templateReplacer);\r\n }\r\n }\r\n }\r\n\r\n return url;\r\n };\r\n\r\n return function ($container, images) {\r\n var containerWidth = $container.width(),\r\n containerHeight = $container.height();\r\n\r\n var chosenImages = [];\r\n\r\n var templateReplacer = function (match, key) {\r\n if (key === 'width') {\r\n return containerWidth;\r\n }\r\n if (key === 'height') {\r\n return containerHeight;\r\n }\r\n return match;\r\n };\r\n\r\n for (var i = 0; i < images.length; i++) {\r\n if ($.isArray(images[i])) {\r\n images[i] = widthInsertSort(images[i]);\r\n var chosen = selectBest(containerWidth, containerHeight, images[i]);\r\n chosenImages.push(chosen);\r\n }\r\n else {\r\n // In case a new image was pushed in, process it:\r\n if (typeof images[i] === 'string') {\r\n images[i] = {url: images[i]};\r\n }\r\n\r\n var item = $.extend({}, images[i]);\r\n item.url = replaceTagsInUrl(item.url, templateReplacer);\r\n chosenImages.push(item);\r\n }\r\n }\r\n return chosenImages;\r\n };\r\n\r\n })();\r\n\r\n var isVideoSource = function (source) {\r\n return YOUTUBE_REGEXP.test(source.url) || source.isVideo;\r\n };\r\n\r\n /* Preload images */\r\n var preload = (function (sources, startAt, count, batchSize, callback) {\r\n // Plugin cache\r\n var cache = [];\r\n\r\n // Wrapper for cache\r\n var caching = function (image) {\r\n for (var i = 0; i < cache.length; i++) {\r\n if (cache[i].src === image.src) {\r\n return cache[i];\r\n }\r\n }\r\n cache.push(image);\r\n return image;\r\n };\r\n\r\n // Execute callback\r\n var exec = function (sources, callback, last) {\r\n if (typeof callback === 'function') {\r\n callback.call(sources, last);\r\n }\r\n };\r\n\r\n // Closure to hide cache\r\n return function preload(sources, startAt, count, batchSize, callback) {\r\n // Check input data\r\n if (typeof sources === 'undefined') {\r\n return;\r\n }\r\n if (!$.isArray(sources)) {\r\n sources = [sources];\r\n }\r\n\r\n if (arguments.length < 5 && typeof arguments[arguments.length - 1] === 'function') {\r\n callback = arguments[arguments.length - 1];\r\n }\r\n\r\n startAt = (typeof startAt === 'function' || !startAt) ? 0 : startAt;\r\n count = (typeof count === 'function' || !count || count < 0) ? sources.length : Math.min(count, sources.length);\r\n batchSize = (typeof batchSize === 'function' || !batchSize) ? 1 : batchSize;\r\n\r\n if (startAt >= sources.length) {\r\n startAt = 0;\r\n count = 0;\r\n }\r\n if (batchSize < 0) {\r\n batchSize = count;\r\n }\r\n batchSize = Math.min(batchSize, count);\r\n\r\n var next = sources.slice(startAt + batchSize, count - batchSize);\r\n sources = sources.slice(startAt, batchSize);\r\n count = sources.length;\r\n\r\n // If sources array is empty\r\n if (!count) {\r\n exec(sources, callback, true);\r\n return;\r\n }\r\n\r\n // Image loading callback\r\n var countLoaded = 0;\r\n\r\n var loaded = function () {\r\n countLoaded++;\r\n if (countLoaded !== count) {\r\n return;\r\n }\r\n\r\n exec(sources, callback, !next);\r\n preload(next, 0, 0, batchSize, callback);\r\n };\r\n\r\n // Loop sources to preload\r\n var image;\r\n\r\n for (var i = 0; i < sources.length; i++) {\r\n\r\n if (isVideoSource(sources[i])) {\r\n\r\n // Do not preload videos. There are issues with that.\r\n // First - we need to keep an instance of the preloaded and use that exactly, not a copy.\r\n // Second - there are memory issues.\r\n // If there will be a requirement from users - I'll try to implement this.\r\n\r\n continue;\r\n\r\n }\r\n else {\r\n\r\n image = new Image();\r\n image.src = sources[i].url;\r\n\r\n image = caching(image);\r\n\r\n if (image.complete) {\r\n loaded();\r\n }\r\n else {\r\n $(image).on('load error', loaded);\r\n }\r\n\r\n }\r\n\r\n }\r\n };\r\n })();\r\n\r\n /* Process images array */\r\n var processImagesArray = function (images) {\r\n var processed = [];\r\n for (var i = 0; i < images.length; i++) {\r\n if (typeof images[i] === 'string') {\r\n processed.push({url: images[i]});\r\n }\r\n else if ($.isArray(images[i])) {\r\n processed.push(processImagesArray(images[i]));\r\n }\r\n else {\r\n processed.push(processOptions(images[i]));\r\n }\r\n }\r\n return processed;\r\n };\r\n\r\n /* Process options */\r\n var processOptions = function (options, required) {\r\n\r\n // Convert old options\r\n\r\n // centeredX/centeredY are deprecated\r\n if (options.centeredX || options.centeredY) {\r\n if (window.console && window.console.log) {\r\n window.console.log('jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`');\r\n }\r\n if (options.centeredX) {\r\n options.alignX = 0.5;\r\n }\r\n if (options.centeredY) {\r\n options.alignY = 0.5;\r\n }\r\n }\r\n\r\n // Deprecated spec\r\n if (options.speed !== undefined) {\r\n\r\n if (window.console && window.console.log) {\r\n window.console.log('jquery.backstretch: `speed` is deprecated, please use `transitionDuration`');\r\n }\r\n\r\n options.transitionDuration = options.speed;\r\n options.transition = 'fade';\r\n }\r\n\r\n // Typo\r\n if (options.resolutionChangeRatioTreshold !== undefined) {\r\n window.console.log('jquery.backstretch: `treshold` is a typo!');\r\n options.resolutionChangeRatioThreshold = options.resolutionChangeRatioTreshold;\r\n }\r\n\r\n // Current spec that needs processing\r\n\r\n if (options.fadeFirst !== undefined) {\r\n options.animateFirst = options.fadeFirst;\r\n }\r\n\r\n if (options.fade !== undefined) {\r\n options.transitionDuration = options.fade;\r\n options.transition = 'fade';\r\n }\r\n\r\n if (options.scale) {\r\n options.scale = validScale(options.scale);\r\n }\r\n\r\n return processAlignOptions(options);\r\n };\r\n\r\n /* Process align options */\r\n var processAlignOptions = function (options, required) {\r\n if (options.alignX === 'left') {\r\n options.alignX = 0.0;\r\n }\r\n else if (options.alignX === 'center') {\r\n options.alignX = 0.5;\r\n }\r\n else if (options.alignX === 'right') {\r\n options.alignX = 1.0;\r\n }\r\n else {\r\n if (options.alignX !== undefined || required) {\r\n options.alignX = parseFloat(options.alignX);\r\n if (isNaN(options.alignX)) {\r\n options.alignX = 0.5;\r\n }\r\n }\r\n }\r\n\r\n if (options.alignY === 'top') {\r\n options.alignY = 0.0;\r\n }\r\n else if (options.alignY === 'center') {\r\n options.alignY = 0.5;\r\n }\r\n else if (options.alignY === 'bottom') {\r\n options.alignY = 1.0;\r\n }\r\n else {\r\n if (options.alignX !== undefined || required) {\r\n options.alignY = parseFloat(options.alignY);\r\n if (isNaN(options.alignY)) {\r\n options.alignY = 0.5;\r\n }\r\n }\r\n }\r\n\r\n return options;\r\n };\r\n\r\n var SUPPORTED_SCALE_OPTIONS = {\r\n 'cover': 'cover',\r\n 'fit': 'fit',\r\n 'fit-smaller': 'fit-smaller',\r\n 'fill': 'fill'\r\n };\r\n\r\n function validScale(scale) {\r\n if (!SUPPORTED_SCALE_OPTIONS.hasOwnProperty(scale)) {\r\n return 'cover';\r\n }\r\n return scale;\r\n }\r\n\r\n /* CLASS DEFINITION\r\n * ========================= */\r\n var Backstretch = function (container, images, options) {\r\n this.options = $.extend({}, $.fn.backstretch.defaults, options || {});\r\n\r\n this.firstShow = true;\r\n\r\n // Process options\r\n processOptions(this.options, true);\r\n\r\n /* In its simplest form, we allow Backstretch to be called on an image path.\r\n * e.g. $.backstretch('/path/to/image.jpg')\r\n * So, we need to turn this back into an array.\r\n */\r\n this.images = processImagesArray($.isArray(images) ? images : [images]);\r\n\r\n /**\r\n * Paused-Option\r\n */\r\n if (this.options.paused) {\r\n this.paused = true;\r\n }\r\n\r\n /**\r\n * Start-Option (Index)\r\n */\r\n if (this.options.start >= this.images.length) {\r\n this.options.start = this.images.length - 1;\r\n }\r\n if (this.options.start < 0) {\r\n this.options.start = 0;\r\n }\r\n\r\n // Convenience reference to know if the container is body.\r\n this.isBody = container === document.body;\r\n\r\n /* We're keeping track of a few different elements\r\n *\r\n * Container: the element that Backstretch was called on.\r\n * Wrap: a DIV that we place the image into, so we can hide the overflow.\r\n * Root: Convenience reference to help calculate the correct height.\r\n */\r\n var $window = $(window);\r\n this.$container = $(container);\r\n this.$root = this.isBody ? supportsFixedPosition ? $window : $(document) : this.$container;\r\n\r\n this.originalImages = this.images;\r\n this.images = optimalSizeImages(\r\n this.options.alwaysTestWindowResolution ? $window : this.$root,\r\n this.originalImages);\r\n\r\n /**\r\n * Pre-Loading.\r\n * This is the first image, so we will preload a minimum of 1 images.\r\n */\r\n preload(this.images, this.options.start || 0, this.options.preload || 1);\r\n\r\n // Don't create a new wrap if one already exists (from a previous instance of Backstretch)\r\n var $existing = this.$container.children(\".backstretch\").first();\r\n this.$wrap = $existing.length ? $existing :\r\n $('<div class=\"backstretch\"></div>')\r\n .css(this.options.bypassCss ? {} : styles.wrap)\r\n .appendTo(this.$container);\r\n\r\n if (!this.options.bypassCss) {\r\n\r\n // Non-body elements need some style adjustments\r\n if (!this.isBody) {\r\n // If the container is statically positioned, we need to make it relative,\r\n // and if no zIndex is defined, we should set it to zero.\r\n var position = this.$container.css('position')\r\n , zIndex = this.$container.css('zIndex');\r\n\r\n this.$container.css({\r\n position: position === 'static' ? 'relative' : position\r\n , zIndex: zIndex === 'auto' ? 0 : zIndex\r\n });\r\n\r\n // Needs a higher z-index\r\n this.$wrap.css({zIndex: -999998});\r\n }\r\n\r\n // Fixed or absolute positioning?\r\n this.$wrap.css({\r\n position: this.isBody && supportsFixedPosition ? 'fixed' : 'absolute'\r\n });\r\n\r\n }\r\n\r\n // Set the first image\r\n this.index = this.options.start;\r\n this.show(this.index);\r\n\r\n // Listen for resize\r\n $window.on('resize.backstretch', $.proxy(this.resize, this))\r\n .on('orientationchange.backstretch', $.proxy(function () {\r\n // Need to do this in order to get the right window height\r\n if (this.isBody && window.pageYOffset === 0) {\r\n window.scrollTo(0, 1);\r\n this.resize();\r\n }\r\n }, this));\r\n };\r\n\r\n var performTransition = function (options) {\r\n\r\n var transition = options.transition || 'fade';\r\n\r\n // Look for multiple options\r\n if (typeof transition === 'string' && transition.indexOf('|') > -1) {\r\n transition = transition.split('|');\r\n }\r\n\r\n if (transition instanceof Array) {\r\n transition = transition[Math.round(Math.random() * (transition.length - 1))];\r\n }\r\n\r\n var $new = options['new'];\r\n var $old = options['old'] ? options['old'] : $([]);\r\n\r\n switch (transition.toString().toLowerCase()) {\r\n\r\n default:\r\n case 'fade':\r\n $new.fadeIn({\r\n duration: options.duration,\r\n complete: options.complete,\r\n easing: options.easing || undefined\r\n });\r\n break;\r\n\r\n case 'fadeinout':\r\n case 'fade_in_out':\r\n\r\n var fadeInNew = function () {\r\n $new.fadeIn({\r\n duration: options.duration / 2,\r\n complete: options.complete,\r\n easing: options.easing || undefined\r\n });\r\n };\r\n\r\n if ($old.length) {\r\n $old.fadeOut({\r\n duration: options.duration / 2,\r\n complete: fadeInNew,\r\n easing: options.easing || undefined\r\n });\r\n }\r\n else {\r\n fadeInNew();\r\n }\r\n\r\n break;\r\n\r\n case 'pushleft':\r\n case 'push_left':\r\n case 'pushright':\r\n case 'push_right':\r\n case 'pushup':\r\n case 'push_up':\r\n case 'pushdown':\r\n case 'push_down':\r\n case 'coverleft':\r\n case 'cover_left':\r\n case 'coverright':\r\n case 'cover_right':\r\n case 'coverup':\r\n case 'cover_up':\r\n case 'coverdown':\r\n case 'cover_down':\r\n\r\n var transitionParts = transition.match(/^(cover|push)_?(.*)$/);\r\n\r\n var animProp = transitionParts[2] === 'left' ? 'right' :\r\n transitionParts[2] === 'right' ? 'left' :\r\n transitionParts[2] === 'down' ? 'top' :\r\n transitionParts[2] === 'up' ? 'bottom' :\r\n 'right';\r\n\r\n var newCssStart = {\r\n 'display': ''\r\n }, newCssAnim = {};\r\n newCssStart[animProp] = '-100%';\r\n newCssAnim[animProp] = 0;\r\n\r\n $new\r\n .css(newCssStart)\r\n .animate(newCssAnim, {\r\n duration: options.duration,\r\n complete: function () {\r\n $new.css(animProp, '');\r\n options.complete.apply(this, arguments);\r\n },\r\n easing: options.easing || undefined\r\n });\r\n\r\n if (transitionParts[1] === 'push' && $old.length) {\r\n var oldCssAnim = {};\r\n oldCssAnim[animProp] = '100%';\r\n\r\n $old\r\n .animate(oldCssAnim, {\r\n duration: options.duration,\r\n complete: function () {\r\n $old.css('display', 'none');\r\n },\r\n easing: options.easing || undefined\r\n });\r\n }\r\n\r\n break;\r\n }\r\n\r\n };\r\n\r\n /* PUBLIC METHODS\r\n * ========================= */\r\n Backstretch.prototype = {\r\n\r\n resize: function () {\r\n try {\r\n\r\n // Check for a better suited image after the resize\r\n var $resTest = this.options.alwaysTestWindowResolution ? $(window) : this.$root;\r\n var newContainerWidth = $resTest.width();\r\n var newContainerHeight = $resTest.height();\r\n var changeRatioW = newContainerWidth / (this._lastResizeContainerWidth || 0);\r\n var changeRatioH = newContainerHeight / (this._lastResizeContainerHeight || 0);\r\n var resolutionChangeRatioThreshold = this.options.resolutionChangeRatioThreshold || 0.0;\r\n\r\n // check for big changes in container size\r\n if ((newContainerWidth !== this._lastResizeContainerWidth ||\r\n newContainerHeight !== this._lastResizeContainerHeight) &&\r\n ((Math.abs(changeRatioW - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioW)) ||\r\n (Math.abs(changeRatioH - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioH)))) {\r\n\r\n this._lastResizeContainerWidth = newContainerWidth;\r\n this._lastResizeContainerHeight = newContainerHeight;\r\n\r\n // Big change: rebuild the entire images array\r\n this.images = optimalSizeImages($resTest, this.originalImages);\r\n\r\n // Preload them (they will be automatically inserted on the next cycle)\r\n if (this.options.preload) {\r\n preload(this.images, (this.index + 1) % this.images.length, this.options.preload);\r\n }\r\n\r\n // In case there is no cycle and the new source is different than the current\r\n if (this.images.length === 1 &&\r\n this._currentImage.url !== this.images[0].url) {\r\n\r\n // Wait a little an update the image being showed\r\n var that = this;\r\n clearTimeout(that._selectAnotherResolutionTimeout);\r\n that._selectAnotherResolutionTimeout = setTimeout(function () {\r\n that.show(0);\r\n }, this.options.resolutionRefreshRate);\r\n }\r\n }\r\n\r\n var bgCSS = {left: 0, top: 0, right: 'auto', bottom: 'auto'}\r\n\r\n , boxWidth = this.isBody ? this.$root.width() : this.$root.innerWidth()\r\n , boxHeight = this.isBody\r\n ? (window.innerHeight ? window.innerHeight : this.$root.height())\r\n : this.$root.innerHeight()\r\n\r\n , naturalWidth = this.$itemWrapper.data('width')\r\n , naturalHeight = this.$itemWrapper.data('height')\r\n\r\n , ratio = (naturalWidth / naturalHeight) || 1\r\n\r\n , alignX = this._currentImage.alignX === undefined ? this.options.alignX : this._currentImage.alignX\r\n , alignY = this._currentImage.alignY === undefined ? this.options.alignY : this._currentImage.alignY\r\n , scale = validScale(this._currentImage.scale || this.options.scale);\r\n\r\n var width, height;\r\n\r\n if (scale === 'fit' || scale === 'fit-smaller') {\r\n width = naturalWidth;\r\n height = naturalHeight;\r\n\r\n if (width > boxWidth ||\r\n height > boxHeight ||\r\n scale === 'fit-smaller') {\r\n var boxRatio = boxWidth / boxHeight;\r\n if (boxRatio > ratio) {\r\n width = Math.floor(boxHeight * ratio);\r\n height = boxHeight;\r\n }\r\n else if (boxRatio < ratio) {\r\n width = boxWidth;\r\n height = Math.floor(boxWidth / ratio);\r\n }\r\n else {\r\n width = boxWidth;\r\n height = boxHeight;\r\n }\r\n }\r\n }\r\n else if (scale === 'fill') {\r\n width = boxWidth;\r\n height = boxHeight;\r\n }\r\n else { // 'cover'\r\n width = Math.max(boxHeight * ratio, boxWidth);\r\n height = Math.max(width / ratio, boxHeight);\r\n }\r\n\r\n // Make adjustments based on image ratio\r\n bgCSS.top = -(height - boxHeight) * alignY;\r\n bgCSS.left = -(width - boxWidth) * alignX;\r\n bgCSS.width = width;\r\n bgCSS.height = height;\r\n\r\n if (!this.options.bypassCss) {\r\n\r\n this.$wrap\r\n .css({width: boxWidth, height: boxHeight})\r\n .find('>.backstretch-item').not('.deleteable')\r\n .each(function () {\r\n var $wrapper = $(this);\r\n $wrapper.find('img,video,iframe')\r\n .css(bgCSS);\r\n });\r\n }\r\n\r\n var evt = $.Event('backstretch.resize', {\r\n relatedTarget: this.$container[0]\r\n });\r\n this.$container.trigger(evt, this);\r\n\r\n }\r\n catch (err) {\r\n // IE7 seems to trigger resize before the image is loaded.\r\n // This try/catch block is a hack to let it fail gracefully.\r\n }\r\n\r\n return this;\r\n }\r\n\r\n // Show the slide at a certain position\r\n , show: function (newIndex, overrideOptions) {\r\n\r\n // Validate index\r\n if (Math.abs(newIndex) > this.images.length - 1) {\r\n return;\r\n }\r\n\r\n // Vars\r\n var that = this\r\n , $oldItemWrapper = that.$wrap.find('>.backstretch-item').addClass('deleteable')\r\n , oldVideoWrapper = that.videoWrapper\r\n , evtOptions = {relatedTarget: that.$container[0]};\r\n\r\n // Trigger the \"before\" event\r\n that.$container.trigger($.Event('backstretch.before', evtOptions), [that, newIndex]);\r\n\r\n // Set the new frame index\r\n this.index = newIndex;\r\n var selectedImage = that.images[newIndex];\r\n\r\n // Pause the slideshow\r\n clearTimeout(that._cycleTimeout);\r\n\r\n // New image\r\n\r\n delete that.videoWrapper; // Current item may not be a video\r\n\r\n var isVideo = isVideoSource(selectedImage);\r\n if (isVideo) {\r\n that.videoWrapper = new VideoWrapper(selectedImage);\r\n that.$item = that.videoWrapper.$video.css('pointer-events', 'none');\r\n }\r\n else {\r\n that.$item = $('<img />');\r\n }\r\n\r\n that.$itemWrapper = $('<div class=\"backstretch-item\">')\r\n .append(that.$item);\r\n\r\n if (this.options.bypassCss) {\r\n that.$itemWrapper.css({\r\n 'display': 'none'\r\n });\r\n }\r\n else {\r\n that.$itemWrapper.css(styles.itemWrapper);\r\n that.$item.css(styles.item);\r\n }\r\n\r\n that.$item.bind(isVideo ? 'canplay' : 'load', function (e) {\r\n var $this = $(this)\r\n , $wrapper = $this.parent()\r\n , options = $wrapper.data('options');\r\n\r\n if (overrideOptions) {\r\n options = $.extend({}, options, overrideOptions);\r\n }\r\n\r\n var imgWidth = this.naturalWidth || this.videoWidth || this.width\r\n , imgHeight = this.naturalHeight || this.videoHeight || this.height;\r\n\r\n // Save the natural dimensions\r\n $wrapper\r\n .data('width', imgWidth)\r\n .data('height', imgHeight);\r\n\r\n var getOption = function (opt) {\r\n return options[opt] !== undefined ?\r\n options[opt] :\r\n that.options[opt];\r\n };\r\n\r\n var transition = getOption('transition');\r\n var transitionEasing = getOption('transitionEasing');\r\n var transitionDuration = getOption('transitionDuration');\r\n\r\n // Show the image, then delete the old one\r\n var bringInNextImage = function () {\r\n\r\n if (oldVideoWrapper) {\r\n oldVideoWrapper.stop();\r\n oldVideoWrapper.destroy();\r\n }\r\n\r\n $oldItemWrapper.remove();\r\n\r\n // Resume the slideshow\r\n if (!that.paused && that.images.length > 1) {\r\n that.cycle();\r\n }\r\n\r\n // Now we can clear the background on the element, to spare memory\r\n if (!that.options.bypassCss && !that.isBody) {\r\n that.$container.css('background-image', 'none');\r\n }\r\n\r\n // Trigger the \"after\" and \"show\" events\r\n // \"show\" is being deprecated\r\n $(['after', 'show']).each(function () {\r\n that.$container.trigger($.Event('backstretch.' + this, evtOptions), [that, newIndex]);\r\n });\r\n\r\n if (isVideo) {\r\n that.videoWrapper.play();\r\n }\r\n };\r\n\r\n if ((that.firstShow && !that.options.animateFirst) || !transitionDuration || !transition) {\r\n // Avoid transition on first show or if there's no transitionDuration value\r\n $wrapper.show();\r\n bringInNextImage();\r\n }\r\n else {\r\n\r\n performTransition({\r\n 'new': $wrapper,\r\n old: $oldItemWrapper,\r\n transition: transition,\r\n duration: transitionDuration,\r\n easing: transitionEasing,\r\n complete: bringInNextImage\r\n });\r\n\r\n }\r\n\r\n that.firstShow = false;\r\n\r\n // Resize\r\n that.resize();\r\n });\r\n\r\n that.$itemWrapper.appendTo(that.$wrap);\r\n\r\n that.$item.attr('alt', selectedImage.alt || '');\r\n that.$itemWrapper.data('options', selectedImage);\r\n\r\n if (!isVideo) {\r\n that.$item.attr('src', selectedImage.url);\r\n }\r\n\r\n that._currentImage = selectedImage;\r\n\r\n return that;\r\n }\r\n\r\n , current: function () {\r\n return this.index;\r\n }\r\n\r\n , next: function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args.unshift(this.index < this.images.length - 1 ? this.index + 1 : 0);\r\n return this.show.apply(this, args);\r\n }\r\n\r\n , prev: function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args.unshift(this.index === 0 ? this.images.length - 1 : this.index - 1);\r\n return this.show.apply(this, args);\r\n }\r\n\r\n , pause: function () {\r\n // Pause the slideshow\r\n this.paused = true;\r\n\r\n if (this.videoWrapper) {\r\n this.videoWrapper.pause();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n , resume: function () {\r\n // Resume the slideshow\r\n this.paused = false;\r\n\r\n if (this.videoWrapper) {\r\n this.videoWrapper.play();\r\n }\r\n\r\n this.cycle();\r\n return this;\r\n }\r\n\r\n , cycle: function () {\r\n // Start/resume the slideshow\r\n if (this.images.length > 1) {\r\n // Clear the timeout, just in case\r\n clearTimeout(this._cycleTimeout);\r\n\r\n var duration = (this._currentImage && this._currentImage.duration) || this.options.duration;\r\n var isVideo = isVideoSource(this._currentImage);\r\n\r\n var callNext = function () {\r\n this.$item.off('.cycle');\r\n\r\n // Check for paused slideshow\r\n if (!this.paused) {\r\n this.next();\r\n }\r\n };\r\n\r\n // Special video handling\r\n if (isVideo) {\r\n\r\n // Leave video at last frame\r\n if (!this._currentImage.loop) {\r\n var lastFrameTimeout = 0;\r\n\r\n this.$item\r\n .on('playing.cycle', function () {\r\n var player = $(this).data('player');\r\n\r\n clearTimeout(lastFrameTimeout);\r\n lastFrameTimeout = setTimeout(function () {\r\n player.pause();\r\n player.$video.trigger('ended');\r\n }, (player.getDuration() - player.getCurrentTime()) * 1000);\r\n })\r\n .on('ended.cycle', function () {\r\n clearTimeout(lastFrameTimeout);\r\n });\r\n }\r\n\r\n // On error go to next\r\n this.$item.on('error.cycle initerror.cycle', $.proxy(callNext, this));\r\n }\r\n\r\n if (isVideo && !this._currentImage.duration) {\r\n // It's a video - playing until end\r\n this.$item.on('ended.cycle', $.proxy(callNext, this));\r\n\r\n }\r\n else {\r\n // Cycling according to specified duration\r\n this._cycleTimeout = setTimeout($.proxy(callNext, this), duration);\r\n }\r\n\r\n }\r\n return this;\r\n }\r\n\r\n , destroy: function (preserveBackground) {\r\n // Stop the resize events\r\n $(window).off('resize.backstretch orientationchange.backstretch');\r\n\r\n // Stop any videos\r\n if (this.videoWrapper) {\r\n this.videoWrapper.destroy();\r\n }\r\n\r\n // Clear the timeout\r\n clearTimeout(this._cycleTimeout);\r\n\r\n // Remove Backstretch\r\n if (!preserveBackground) {\r\n this.$wrap.remove();\r\n }\r\n this.$container.removeData('backstretch');\r\n }\r\n };\r\n\r\n /**\r\n * Video Abstraction Layer\r\n *\r\n * Static methods:\r\n * > VideoWrapper.loadYoutubeAPI() -> Call in order to load the Youtube API.\r\n * An 'youtube_api_load' event will be triggered on $(window) when the API is loaded.\r\n *\r\n * Generic:\r\n * > player.type -> type of the video\r\n * > player.video / player.$video -> contains the element holding the video\r\n * > player.play() -> plays the video\r\n * > player.pause() -> pauses the video\r\n * > player.setCurrentTime(position) -> seeks to a position by seconds\r\n *\r\n * Youtube:\r\n * > player.ytId will contain the youtube ID if the source is a youtube url\r\n * > player.ytReady is a flag telling whether the youtube source is ready for playback\r\n * */\r\n\r\n var VideoWrapper = function () { this.init.apply(this, arguments); };\r\n\r\n /**\r\n * @param {Object} options\r\n * @param {String|Array<String>|Array<{{src: String, type: String?}}>} options.url\r\n * @param {Boolean} options.loop=false\r\n * @param {Boolean?} options.mute=true\r\n * @param {String?} options.poster\r\n * loop, mute, poster\r\n */\r\n VideoWrapper.prototype.init = function (options) {\r\n\r\n var that = this;\r\n\r\n var $video;\r\n\r\n var setVideoElement = function () {\r\n that.$video = $video;\r\n that.video = $video[0];\r\n };\r\n\r\n // Determine video type\r\n\r\n var videoType = 'video';\r\n\r\n if (!(options.url instanceof Array) &&\r\n YOUTUBE_REGEXP.test(options.url)) {\r\n videoType = 'youtube';\r\n }\r\n\r\n that.type = videoType;\r\n\r\n if (videoType === 'youtube') {\r\n\r\n // Try to load the API in the meantime\r\n VideoWrapper.loadYoutubeAPI();\r\n\r\n that.ytId = options.url.match(YOUTUBE_REGEXP)[2];\r\n var src = 'https://www.youtube.com/embed/' + that.ytId +\r\n '?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1' +\r\n '&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0' +\r\n '&enablejsapi=1&origin=' + encodeURIComponent(window.location.origin);\r\n\r\n that.__ytStartMuted = !!options.mute || options.mute === undefined;\r\n\r\n $video = $('<iframe />')\r\n .attr({'src_to_load': src})\r\n .css({'border': 0, 'margin': 0, 'padding': 0})\r\n .data('player', that);\r\n\r\n if (options.loop) {\r\n $video.on('ended.loop', function () {\r\n if (!that.__manuallyStopped) {\r\n that.play();\r\n }\r\n });\r\n }\r\n\r\n that.ytReady = false;\r\n\r\n setVideoElement();\r\n\r\n if (window['YT'] && window['YT'].loaded) {\r\n that._initYoutube();\r\n $video.trigger('initsuccess');\r\n }\r\n else {\r\n $(window).one('youtube_api_load', function () {\r\n that._initYoutube();\r\n $video.trigger('initsuccess');\r\n });\r\n }\r\n\r\n }\r\n else {\r\n // Traditional <video> tag with multiple sources\r\n\r\n $video = $('<video>')\r\n .prop('autoplay', false)\r\n .prop('controls', false)\r\n .prop('loop', !!options.loop)\r\n .prop('muted', !!options.mute || options.mute === undefined)\r\n\r\n // Let the first frames be available before playback, as we do transitions\r\n .prop('preload', 'auto')\r\n .prop('poster', options.poster || '');\r\n\r\n var sources = (options.url instanceof Array) ? options.url : [options.url];\r\n\r\n for (var i = 0; i < sources.length; i++) {\r\n var sourceItem = sources[i];\r\n if (typeof (sourceItem) === 'string') {\r\n sourceItem = {src: sourceItem};\r\n }\r\n $('<source>')\r\n .attr('src', sourceItem.src)\r\n // Make sure to not specify type if unknown -\r\n // so the browser will try to autodetect.\r\n .attr('type', sourceItem.type || null)\r\n .appendTo($video);\r\n }\r\n\r\n if (!$video[0].canPlayType || !sources.length) {\r\n $video.trigger('initerror');\r\n }\r\n else {\r\n $video.trigger('initsuccess');\r\n }\r\n\r\n setVideoElement();\r\n }\r\n\r\n };\r\n\r\n VideoWrapper.prototype._initYoutube = function () {\r\n var that = this;\r\n\r\n var YT = window['YT'];\r\n\r\n that.$video\r\n .attr('src', that.$video.attr('src_to_load'))\r\n .removeAttr('src_to_load');\r\n\r\n // It won't init if it's not in the DOM, so we emulate that\r\n var hasParent = !!that.$video[0].parentNode;\r\n if (!hasParent) {\r\n var $tmpParent = $('<div>').css('display', 'none !important').appendTo(document.body);\r\n that.$video.appendTo($tmpParent);\r\n }\r\n\r\n var player = new YT.Player(that.video, {\r\n events: {\r\n 'onReady': function () {\r\n\r\n if (that.__ytStartMuted) {\r\n player.mute();\r\n }\r\n\r\n if (!hasParent) {\r\n // Restore parent to old state - without interrupting any changes\r\n if (that.$video[0].parentNode === $tmpParent[0]) {\r\n that.$video.detach();\r\n }\r\n $tmpParent.remove();\r\n }\r\n\r\n that.ytReady = true;\r\n that._updateYoutubeSize();\r\n that.$video.trigger('canplay');\r\n },\r\n 'onStateChange': function (event) {\r\n switch (event.data) {\r\n case YT.PlayerState.PLAYING:\r\n that.$video.trigger('playing');\r\n break;\r\n case YT.PlayerState.ENDED:\r\n that.$video.trigger('ended');\r\n break;\r\n case YT.PlayerState.PAUSED:\r\n that.$video.trigger('pause');\r\n break;\r\n case YT.PlayerState.BUFFERING:\r\n that.$video.trigger('waiting');\r\n break;\r\n case YT.PlayerState.CUED:\r\n that.$video.trigger('canplay');\r\n break;\r\n }\r\n },\r\n 'onPlaybackQualityChange': function () {\r\n that._updateYoutubeSize();\r\n that.$video.trigger('resize');\r\n },\r\n 'onError': function (err) {\r\n that.hasError = true;\r\n that.$video.trigger({'type': 'error', 'error': err});\r\n }\r\n }\r\n });\r\n\r\n that.ytPlayer = player;\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype._updateYoutubeSize = function () {\r\n var that = this;\r\n\r\n switch (that.ytPlayer.getPlaybackQuality() || 'medium') {\r\n case 'small':\r\n that.video.videoWidth = 426;\r\n that.video.videoHeight = 240;\r\n break;\r\n case 'medium':\r\n that.video.videoWidth = 640;\r\n that.video.videoHeight = 360;\r\n break;\r\n default:\r\n case 'large':\r\n that.video.videoWidth = 854;\r\n that.video.videoHeight = 480;\r\n break;\r\n case 'hd720':\r\n that.video.videoWidth = 1280;\r\n that.video.videoHeight = 720;\r\n break;\r\n case 'hd1080':\r\n that.video.videoWidth = 1920;\r\n that.video.videoHeight = 1080;\r\n break;\r\n case 'highres':\r\n that.video.videoWidth = 2560;\r\n that.video.videoHeight = 1440;\r\n break;\r\n }\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.play = function () {\r\n var that = this;\r\n\r\n that.__manuallyStopped = false;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n that.$video.trigger('play');\r\n that.ytPlayer.playVideo();\r\n }\r\n }\r\n else {\r\n that.video.play();\r\n }\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.pause = function () {\r\n var that = this;\r\n\r\n that.__manuallyStopped = false;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n that.ytPlayer.pauseVideo();\r\n }\r\n }\r\n else {\r\n that.video.pause();\r\n }\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.stop = function () {\r\n var that = this;\r\n\r\n that.__manuallyStopped = true;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n that.ytPlayer.pauseVideo();\r\n that.ytPlayer.seekTo(0);\r\n }\r\n }\r\n else {\r\n that.video.pause();\r\n that.video.currentTime = 0;\r\n }\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.destroy = function () {\r\n var that = this;\r\n\r\n if (that.ytPlayer) {\r\n that.ytPlayer.destroy();\r\n }\r\n\r\n that.$video.remove();\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.getCurrentTime = function (seconds) {\r\n var that = this;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n return that.ytPlayer.getCurrentTime();\r\n }\r\n }\r\n else {\r\n return that.video.currentTime;\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n VideoWrapper.prototype.setCurrentTime = function (seconds) {\r\n var that = this;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n that.ytPlayer.seekTo(seconds, true);\r\n }\r\n }\r\n else {\r\n that.video.currentTime = seconds;\r\n }\r\n\r\n return that;\r\n };\r\n\r\n VideoWrapper.prototype.getDuration = function () {\r\n var that = this;\r\n\r\n if (that.type === 'youtube') {\r\n if (that.ytReady) {\r\n return that.ytPlayer.getDuration();\r\n }\r\n }\r\n else {\r\n return that.video.duration;\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n /**\r\n * This will load the youtube API (if not loaded yet)\r\n * Use $(window).one('youtube_api_load', ...) to listen for API loaded event\r\n */\r\n VideoWrapper.loadYoutubeAPI = function () {\r\n if (window['YT'] && window['__yt_load_event_interval__']) {\r\n return;\r\n }\r\n \r\n if (!window['YT'] && !$('script[src*=www\\\\.youtube\\\\.com\\\\/iframe_api]').length) {\r\n $('<script type=\"text/javascript\" src=\"https://www.youtube.com/iframe_api\">').appendTo('body');\r\n }\r\n \r\n window['__yt_load_event_interval__'] = setInterval(function () {\r\n if (window['YT'] && window['YT'].loaded) {\r\n $(window).trigger('youtube_api_load');\r\n clearTimeout(window['__yt_load_event_interval__']);\r\n delete window['__yt_load_event_interval__'];\r\n }\r\n }, 50);\r\n };\r\n\r\n var getDeviceOrientation = function () {\r\n\r\n if ('matchMedia' in window) {\r\n if (window.matchMedia(\"(orientation: portrait)\").matches) {\r\n return 'portrait';\r\n }\r\n else if (window.matchMedia(\"(orientation: landscape)\").matches) {\r\n return 'landscape';\r\n }\r\n }\r\n\r\n if (screen.height > screen.width) {\r\n return 'portrait';\r\n }\r\n\r\n // Even square devices have orientation,\r\n // but a desktop browser may be too old for `matchMedia`.\r\n // Defaulting to `landscape` for the VERY rare case of a square desktop screen is good enough.\r\n return 'landscape';\r\n };\r\n\r\n var getWindowOrientation = function () {\r\n if (window.innerHeight > window.innerWidth) {\r\n return 'portrait';\r\n }\r\n if (window.innerWidth > window.innerHeight) {\r\n return 'landscape';\r\n }\r\n\r\n return 'square';\r\n };\r\n\r\n /* SUPPORTS FIXED POSITION?\r\n *\r\n * Based on code from jQuery Mobile 1.1.0\r\n * http://jquerymobile.com/\r\n *\r\n * In a nutshell, we need to figure out if fixed positioning is supported.\r\n * Unfortunately, this is very difficult to do on iOS, and usually involves\r\n * injecting content, scrolling the page, etc.. It's ugly.\r\n * jQuery Mobile uses this workaround. It's not ideal, but works.\r\n *\r\n * Modified to detect IE6\r\n * ========================= */\r\n\r\n var supportsFixedPosition = (function () {\r\n var ua = navigator.userAgent\r\n , platform = navigator.platform\r\n // Rendering engine is Webkit, and capture major version\r\n , wkmatch = ua.match(/AppleWebKit\\/([0-9]+)/)\r\n , wkversion = !!wkmatch && wkmatch[1]\r\n , ffmatch = ua.match(/Fennec\\/([0-9]+)/)\r\n , ffversion = !!ffmatch && ffmatch[1]\r\n , operammobilematch = ua.match(/Opera Mobi\\/([0-9]+)/)\r\n , omversion = !!operammobilematch && operammobilematch[1]\r\n , iematch = ua.match(/MSIE ([0-9]+)/)\r\n , ieversion = !!iematch && iematch[1];\r\n\r\n return !(\r\n // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)\r\n ((platform.indexOf(\"iPhone\") > -1 || platform.indexOf(\"iPad\") > -1 || platform.indexOf(\r\n \"iPod\") > -1) && wkversion && wkversion < 534) ||\r\n\r\n // Opera Mini\r\n (window.operamini && ({}).toString.call(window.operamini) === \"[object OperaMini]\") ||\r\n (operammobilematch && omversion < 7458) ||\r\n\r\n //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)\r\n (ua.indexOf(\"Android\") > -1 && wkversion && wkversion < 533) ||\r\n\r\n // Firefox Mobile before 6.0 -\r\n (ffversion && ffversion < 6) ||\r\n\r\n // WebOS less than 3\r\n (\"palmGetResource\" in window && wkversion && wkversion < 534) ||\r\n\r\n // MeeGo\r\n (ua.indexOf(\"MeeGo\") > -1 && ua.indexOf(\"NokiaBrowser/8.5.0\") > -1) ||\r\n\r\n // IE6\r\n (ieversion && ieversion <= 6)\r\n );\r\n }());\r\n\r\n}(jQuery, window));\r\n","/*!\r\n * jQuery & Zepto Lazy - v1.7.10\r\n * http://jquery.eisbehr.de/lazy/\r\n *\r\n * Copyright 2012 - 2018, Daniel 'Eisbehr' Kern\r\n *\r\n * Dual licensed under the MIT and GPL-2.0 licenses:\r\n * http://www.opensource.org/licenses/mit-license.php\r\n * http://www.gnu.org/licenses/gpl-2.0.html\r\n *\r\n * $(\"img.lazy\").lazy();\r\n */\r\n\r\n;(function(window, undefined) {\r\n \"use strict\";\r\n\r\n // noinspection JSUnresolvedVariable\r\n /**\r\n * library instance - here and not in construct to be shorter in minimization\r\n * @return void\r\n */\r\n var $ = window.jQuery || window.Zepto,\r\n\r\n /**\r\n * unique plugin instance id counter\r\n * @type {number}\r\n */\r\n lazyInstanceId = 0,\r\n\r\n /**\r\n * helper to register window load for jQuery 3\r\n * @type {boolean}\r\n */ \r\n windowLoaded = false;\r\n\r\n /**\r\n * make lazy available to jquery - and make it a bit more case-insensitive :)\r\n * @access public\r\n * @type {function}\r\n * @param {object} settings\r\n * @return {LazyPlugin}\r\n */\r\n $.fn.Lazy = $.fn.lazy = function(settings) {\r\n return new LazyPlugin(this, settings);\r\n };\r\n\r\n /**\r\n * helper to add plugins to lazy prototype configuration\r\n * @access public\r\n * @type {function}\r\n * @param {string|Array} names\r\n * @param {string|Array|function} [elements]\r\n * @param {function} loader\r\n * @return void\r\n */\r\n $.Lazy = $.lazy = function(names, elements, loader) {\r\n // make second parameter optional\r\n if ($.isFunction(elements)) {\r\n loader = elements;\r\n elements = [];\r\n }\r\n\r\n // exit here if parameter is not a callable function\r\n if (!$.isFunction(loader)) {\r\n return;\r\n }\r\n\r\n // make parameters an array of names to be sure\r\n names = $.isArray(names) ? names : [names];\r\n elements = $.isArray(elements) ? elements : [elements];\r\n\r\n var config = LazyPlugin.prototype.config,\r\n forced = config._f || (config._f = {});\r\n\r\n // add the loader plugin for every name\r\n for (var i = 0, l = names.length; i < l; i++) {\r\n if (config[names[i]] === undefined || $.isFunction(config[names[i]])) {\r\n config[names[i]] = loader;\r\n }\r\n }\r\n\r\n // add forced elements loader\r\n for (var c = 0, a = elements.length; c < a; c++) {\r\n forced[elements[c]] = names[0];\r\n }\r\n };\r\n\r\n /**\r\n * contains all logic and the whole element handling\r\n * is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance\r\n * @access private\r\n * @type {function}\r\n * @param {LazyPlugin} instance\r\n * @param {object} config\r\n * @param {object|Array} items\r\n * @param {object} events\r\n * @param {string} namespace\r\n * @return void\r\n */\r\n function _executeLazy(instance, config, items, events, namespace) {\r\n /**\r\n * a helper to trigger the 'onFinishedAll' callback after all other events\r\n * @access private\r\n * @type {number}\r\n */\r\n var _awaitingAfterLoad = 0,\r\n\r\n /**\r\n * visible content width\r\n * @access private\r\n * @type {number}\r\n */\r\n _actualWidth = -1,\r\n\r\n /**\r\n * visible content height\r\n * @access private\r\n * @type {number}\r\n */\r\n _actualHeight = -1,\r\n\r\n /**\r\n * determine possibly detected high pixel density\r\n * @access private\r\n * @type {boolean}\r\n */\r\n _isRetinaDisplay = false, \r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _afterLoad = 'afterLoad',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _load = 'load',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _error = 'error',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _img = 'img',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _src = 'src',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _srcset = 'srcset',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _sizes = 'sizes',\r\n\r\n /**\r\n * dictionary entry for better minimization\r\n * @access private\r\n * @type {string}\r\n */\r\n _backgroundImage = 'background-image';\r\n\r\n /**\r\n * initialize plugin\r\n * bind loading to events or set delay time to load all items at once\r\n * @access private\r\n * @return void\r\n */\r\n function _initialize() {\r\n // detect actual device pixel ratio\r\n // noinspection JSUnresolvedVariable\r\n _isRetinaDisplay = window.devicePixelRatio > 1;\r\n\r\n // prepare all initial items\r\n items = _prepareItems(items);\r\n\r\n // if delay time is set load all items at once after delay time\r\n if (config.delay >= 0) {\r\n setTimeout(function() {\r\n _lazyLoadItems(true);\r\n }, config.delay);\r\n }\r\n\r\n // if no delay is set or combine usage is active bind events\r\n if (config.delay < 0 || config.combined) {\r\n // create unique event function\r\n events.e = _throttle(config.throttle, function(event) {\r\n // reset detected window size on resize event\r\n if (event.type === 'resize') {\r\n _actualWidth = _actualHeight = -1;\r\n }\r\n\r\n // execute 'lazy magic'\r\n _lazyLoadItems(event.all);\r\n });\r\n\r\n // create function to add new items to instance\r\n events.a = function(additionalItems) {\r\n additionalItems = _prepareItems(additionalItems);\r\n items.push.apply(items, additionalItems);\r\n };\r\n\r\n // create function to get all instance items left\r\n events.g = function() {\r\n // filter loaded items before return in case internal filter was not running until now\r\n return (items = $(items).filter(function() {\r\n return !$(this).data(config.loadedName);\r\n }));\r\n };\r\n\r\n // create function to force loading elements\r\n events.f = function(forcedItems) {\r\n for (var i = 0; i < forcedItems.length; i++) {\r\n // only handle item if available in current instance\r\n // use a compare function, because Zepto can't handle object parameter for filter\r\n // var item = items.filter(forcedItems[i]);\r\n /* jshint loopfunc: true */\r\n var item = items.filter(function() {\r\n return this === forcedItems[i];\r\n });\r\n\r\n if (item.length) {\r\n _lazyLoadItems(false, item); \r\n }\r\n }\r\n };\r\n\r\n // load initial items\r\n _lazyLoadItems();\r\n\r\n // bind lazy load functions to scroll and resize event\r\n // noinspection JSUnresolvedVariable\r\n $(config.appendScroll).on('scroll.' + namespace + ' resize.' + namespace, events.e);\r\n }\r\n }\r\n\r\n /**\r\n * prepare items before handle them\r\n * @access private\r\n * @param {Array|object|jQuery} items\r\n * @return {Array|object|jQuery}\r\n */\r\n function _prepareItems(items) {\r\n // fetch used configurations before loops\r\n var defaultImage = config.defaultImage,\r\n placeholder = config.placeholder,\r\n imageBase = config.imageBase,\r\n srcsetAttribute = config.srcsetAttribute,\r\n loaderAttribute = config.loaderAttribute,\r\n forcedTags = config._f || {};\r\n\r\n // filter items and only add those who not handled yet and got needed attributes available\r\n items = $(items).filter(function() {\r\n var element = $(this),\r\n tag = _getElementTagName(this);\r\n\r\n return !element.data(config.handledName) && \r\n (element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined);\r\n })\r\n\r\n // append plugin instance to all elements\r\n .data('plugin_' + config.name, instance);\r\n\r\n for (var i = 0, l = items.length; i < l; i++) {\r\n var element = $(items[i]),\r\n tag = _getElementTagName(items[i]),\r\n elementImageBase = element.attr(config.imageBaseAttribute) || imageBase;\r\n\r\n // generate and update source set if an image base is set\r\n if (tag === _img && elementImageBase && element.attr(srcsetAttribute)) {\r\n element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase));\r\n }\r\n\r\n // add loader to forced element types\r\n if (forcedTags[tag] !== undefined && !element.attr(loaderAttribute)) {\r\n element.attr(loaderAttribute, forcedTags[tag]);\r\n }\r\n\r\n // set default image on every element without source\r\n if (tag === _img && defaultImage && !element.attr(_src)) {\r\n element.attr(_src, defaultImage);\r\n }\r\n\r\n // set placeholder on every element without background image\r\n else if (tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === 'none')) {\r\n element.css(_backgroundImage, \"url('\" + placeholder + \"')\");\r\n }\r\n }\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * the 'lazy magic' - check all items\r\n * @access private\r\n * @param {boolean} [allItems]\r\n * @param {object} [forced]\r\n * @return void\r\n */\r\n function _lazyLoadItems(allItems, forced) {\r\n // skip if no items where left\r\n if (!items.length) {\r\n // destroy instance if option is enabled\r\n if (config.autoDestroy) {\r\n // noinspection JSUnresolvedFunction\r\n instance.destroy();\r\n }\r\n\r\n return;\r\n }\r\n\r\n var elements = forced || items,\r\n loadTriggered = false,\r\n imageBase = config.imageBase || '',\r\n srcsetAttribute = config.srcsetAttribute,\r\n handledName = config.handledName;\r\n\r\n // loop all available items\r\n for (var i = 0; i < elements.length; i++) {\r\n // item is at least in loadable area\r\n if (allItems || forced || _isInLoadableArea(elements[i])) {\r\n var element = $(elements[i]),\r\n tag = _getElementTagName(elements[i]),\r\n attribute = element.attr(config.attribute),\r\n elementImageBase = element.attr(config.imageBaseAttribute) || imageBase,\r\n customLoader = element.attr(config.loaderAttribute);\r\n\r\n // is not already handled \r\n if (!element.data(handledName) &&\r\n // and is visible or visibility doesn't matter\r\n (!config.visibleOnly || element.is(':visible')) && (\r\n // and image source or source set attribute is available\r\n (attribute || element.attr(srcsetAttribute)) && (\r\n // and is image tag where attribute is not equal source or source set\r\n (tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) ||\r\n // or is non image tag where attribute is not equal background\r\n (tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage))\r\n ) ||\r\n // or custom loader is available\r\n customLoader))\r\n {\r\n // mark element always as handled as this point to prevent double handling\r\n loadTriggered = true;\r\n element.data(handledName, true);\r\n\r\n // load item\r\n _handleItem(element, tag, elementImageBase, customLoader);\r\n }\r\n }\r\n }\r\n\r\n // when something was loaded remove them from remaining items\r\n if (loadTriggered) {\r\n items = $(items).filter(function() {\r\n return !$(this).data(handledName);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * load the given element the lazy way\r\n * @access private\r\n * @param {object} element\r\n * @param {string} tag\r\n * @param {string} imageBase\r\n * @param {function} [customLoader]\r\n * @return void\r\n */\r\n function _handleItem(element, tag, imageBase, customLoader) {\r\n // increment count of items waiting for after load\r\n ++_awaitingAfterLoad;\r\n\r\n // extended error callback for correct 'onFinishedAll' handling\r\n var errorCallback = function() {\r\n _triggerCallback('onError', element);\r\n _reduceAwaiting();\r\n\r\n // prevent further callback calls\r\n errorCallback = $.noop;\r\n };\r\n\r\n // trigger function before loading image\r\n _triggerCallback('beforeLoad', element);\r\n\r\n // fetch all double used data here for better code minimization\r\n var srcAttribute = config.attribute,\r\n srcsetAttribute = config.srcsetAttribute,\r\n sizesAttribute = config.sizesAttribute,\r\n retinaAttribute = config.retinaAttribute,\r\n removeAttribute = config.removeAttribute,\r\n loadedName = config.loadedName,\r\n elementRetina = element.attr(retinaAttribute);\r\n\r\n // handle custom loader\r\n if (customLoader) {\r\n // on load callback\r\n var loadCallback = function() {\r\n // remove attribute from element\r\n if (removeAttribute) {\r\n element.removeAttr(config.loaderAttribute);\r\n }\r\n\r\n // mark element as loaded\r\n element.data(loadedName, true);\r\n\r\n // call after load event\r\n _triggerCallback(_afterLoad, element);\r\n\r\n // remove item from waiting queue and possibly trigger finished event\r\n // it's needed to be asynchronous to run after filter was in _lazyLoadItems\r\n setTimeout(_reduceAwaiting, 1);\r\n\r\n // prevent further callback calls\r\n loadCallback = $.noop;\r\n };\r\n\r\n // bind error event to trigger callback and reduce waiting amount\r\n element.off(_error).one(_error, errorCallback)\r\n\r\n // bind after load callback to element\r\n .one(_load, loadCallback);\r\n\r\n // trigger custom loader and handle response\r\n if (!_triggerCallback(customLoader, element, function(response) {\r\n if(response) {\r\n element.off(_load);\r\n loadCallback();\r\n }\r\n else {\r\n element.off(_error);\r\n errorCallback();\r\n }\r\n })) {\r\n element.trigger(_error);\r\n }\r\n }\r\n\r\n // handle images\r\n else {\r\n // create image object\r\n var imageObj = $(new Image());\r\n\r\n // bind error event to trigger callback and reduce waiting amount\r\n imageObj.one(_error, errorCallback)\r\n\r\n // bind after load callback to image\r\n .one(_load, function() {\r\n // remove element from view\r\n element.hide();\r\n\r\n // set image back to element\r\n // do it as single 'attr' calls, to be sure 'src' is set after 'srcset'\r\n if (tag === _img) {\r\n element.attr(_sizes, imageObj.attr(_sizes))\r\n .attr(_srcset, imageObj.attr(_srcset))\r\n .attr(_src, imageObj.attr(_src));\r\n }\r\n else {\r\n element.css(_backgroundImage, \"url('\" + imageObj.attr(_src) + \"')\");\r\n }\r\n\r\n // bring it back with some effect!\r\n element[config.effect](config.effectTime);\r\n\r\n // remove attribute from element\r\n if (removeAttribute) {\r\n element.removeAttr(srcAttribute + ' ' + srcsetAttribute + ' ' + retinaAttribute + ' ' + config.imageBaseAttribute);\r\n\r\n // only remove 'sizes' attribute, if it was a custom one\r\n if (sizesAttribute !== _sizes) {\r\n element.removeAttr(sizesAttribute);\r\n }\r\n }\r\n\r\n // mark element as loaded\r\n element.data(loadedName, true);\r\n\r\n // call after load event\r\n _triggerCallback(_afterLoad, element);\r\n\r\n // cleanup image object\r\n imageObj.remove();\r\n\r\n // remove item from waiting queue and possibly trigger finished event\r\n _reduceAwaiting();\r\n });\r\n\r\n // set sources\r\n // do it as single 'attr' calls, to be sure 'src' is set after 'srcset'\r\n var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || '';\r\n imageObj.attr(_sizes, element.attr(sizesAttribute))\r\n .attr(_srcset, element.attr(srcsetAttribute))\r\n .attr(_src, imageSrc ? imageBase + imageSrc : null);\r\n\r\n // call after load even on cached image\r\n imageObj.complete && imageObj.trigger(_load); // jshint ignore : line\r\n }\r\n }\r\n\r\n /**\r\n * check if the given element is inside the current viewport or threshold\r\n * @access private\r\n * @param {object} element\r\n * @return {boolean}\r\n */\r\n function _isInLoadableArea(element) {\r\n var elementBound = element.getBoundingClientRect(),\r\n direction = config.scrollDirection,\r\n threshold = config.threshold,\r\n vertical = // check if element is in loadable area from top\r\n ((_getActualHeight() + threshold) > elementBound.top) &&\r\n // check if element is even in loadable are from bottom\r\n (-threshold < elementBound.bottom),\r\n horizontal = // check if element is in loadable area from left\r\n ((_getActualWidth() + threshold) > elementBound.left) &&\r\n // check if element is even in loadable area from right\r\n (-threshold < elementBound.right);\r\n\r\n if (direction === 'vertical') {\r\n return vertical;\r\n }\r\n else if (direction === 'horizontal') {\r\n return horizontal;\r\n }\r\n\r\n return vertical && horizontal;\r\n }\r\n\r\n /**\r\n * receive the current viewed width of the browser\r\n * @access private\r\n * @return {number}\r\n */\r\n function _getActualWidth() {\r\n return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width());\r\n }\r\n\r\n /**\r\n * receive the current viewed height of the browser\r\n * @access private\r\n * @return {number}\r\n */\r\n function _getActualHeight() {\r\n return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height());\r\n }\r\n\r\n /**\r\n * get lowercase tag name of an element\r\n * @access private\r\n * @param {object} element\r\n * @returns {string}\r\n */\r\n function _getElementTagName(element) {\r\n return element.tagName.toLowerCase();\r\n }\r\n\r\n /**\r\n * prepend image base to all srcset entries\r\n * @access private\r\n * @param {string} srcset\r\n * @param {string} imageBase\r\n * @returns {string}\r\n */\r\n function _getCorrectedSrcSet(srcset, imageBase) {\r\n if (imageBase) {\r\n // trim, remove unnecessary spaces and split entries\r\n var entries = srcset.split(',');\r\n srcset = '';\r\n\r\n for (var i = 0, l = entries.length; i < l; i++) {\r\n srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : '');\r\n }\r\n }\r\n\r\n return srcset;\r\n }\r\n\r\n /**\r\n * helper function to throttle down event triggering\r\n * @access private\r\n * @param {number} delay\r\n * @param {function} callback\r\n * @return {function}\r\n */\r\n function _throttle(delay, callback) {\r\n var timeout,\r\n lastExecute = 0;\r\n\r\n return function(event, ignoreThrottle) {\r\n var elapsed = +new Date() - lastExecute;\r\n\r\n function run() {\r\n lastExecute = +new Date();\r\n // noinspection JSUnresolvedFunction\r\n callback.call(instance, event);\r\n }\r\n\r\n timeout && clearTimeout(timeout); // jshint ignore : line\r\n\r\n if (elapsed > delay || !config.enableThrottle || ignoreThrottle) {\r\n run();\r\n }\r\n else {\r\n timeout = setTimeout(run, delay - elapsed);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero\r\n * @access private\r\n * @return void\r\n */\r\n function _reduceAwaiting() {\r\n --_awaitingAfterLoad;\r\n\r\n // if no items were left trigger finished event\r\n if (!items.length && !_awaitingAfterLoad) {\r\n _triggerCallback('onFinishedAll');\r\n }\r\n }\r\n\r\n /**\r\n * single implementation to handle callbacks, pass element and set 'this' to current instance\r\n * @access private\r\n * @param {string|function} callback\r\n * @param {object} [element]\r\n * @param {*} [args]\r\n * @return {boolean}\r\n */\r\n function _triggerCallback(callback, element, args) {\r\n if ((callback = config[callback])) {\r\n // jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads\r\n // below is shorthand of 'Array.prototype.slice.call(arguments, 1)'\r\n callback.apply(instance, [].slice.call(arguments, 1));\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n // if event driven or window is already loaded don't wait for page loading\r\n if (config.bind === 'event' || windowLoaded) {\r\n _initialize();\r\n }\r\n\r\n // otherwise load initial items and start lazy after page load\r\n else {\r\n // noinspection JSUnresolvedVariable\r\n $(window).on(_load + '.' + namespace, _initialize);\r\n } \r\n }\r\n\r\n /**\r\n * lazy plugin class constructor\r\n * @constructor\r\n * @access private\r\n * @param {object} elements\r\n * @param {object} settings\r\n * @return {object|LazyPlugin}\r\n */\r\n function LazyPlugin(elements, settings) {\r\n /**\r\n * this lazy plugin instance\r\n * @access private\r\n * @type {object|LazyPlugin|LazyPlugin.prototype}\r\n */\r\n var _instance = this,\r\n\r\n /**\r\n * this lazy plugin instance configuration\r\n * @access private\r\n * @type {object}\r\n */\r\n _config = $.extend({}, _instance.config, settings),\r\n\r\n /**\r\n * instance generated event executed on container scroll or resize\r\n * packed in an object to be referenceable and short named because properties will not be minified\r\n * @access private\r\n * @type {object}\r\n */\r\n _events = {},\r\n\r\n /**\r\n * unique namespace for instance related events\r\n * @access private\r\n * @type {string}\r\n */\r\n _namespace = _config.name + '-' + (++lazyInstanceId);\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * wrapper to get or set an entry from plugin instance configuration\r\n * much smaller on minify as direct access\r\n * @access public\r\n * @type {function}\r\n * @param {string} entryName\r\n * @param {*} [value]\r\n * @return {LazyPlugin|*}\r\n */\r\n _instance.config = function(entryName, value) {\r\n if (value === undefined) {\r\n return _config[entryName];\r\n }\r\n\r\n _config[entryName] = value;\r\n return _instance;\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * add additional items to current instance\r\n * @access public\r\n * @param {Array|object|string} items\r\n * @return {LazyPlugin}\r\n */\r\n _instance.addItems = function(items) {\r\n _events.a && _events.a($.type(items) === 'string' ? $(items) : items); // jshint ignore : line\r\n return _instance;\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * get all left items of this instance\r\n * @access public\r\n * @returns {object}\r\n */\r\n _instance.getItems = function() {\r\n return _events.g ? _events.g() : {};\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * force lazy to load all items in loadable area right now\r\n * by default without throttle\r\n * @access public\r\n * @type {function}\r\n * @param {boolean} [useThrottle]\r\n * @return {LazyPlugin}\r\n */\r\n _instance.update = function(useThrottle) {\r\n _events.e && _events.e({}, !useThrottle); // jshint ignore : line\r\n return _instance;\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * force element(s) to load directly, ignoring the viewport\r\n * @access public\r\n * @param {Array|object|string} items\r\n * @return {LazyPlugin}\r\n */\r\n _instance.force = function(items) {\r\n _events.f && _events.f($.type(items) === 'string' ? $(items) : items); // jshint ignore : line\r\n return _instance;\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * force lazy to load all available items right now\r\n * this call ignores throttling\r\n * @access public\r\n * @type {function}\r\n * @return {LazyPlugin}\r\n */\r\n _instance.loadAll = function() {\r\n _events.e && _events.e({all: true}, true); // jshint ignore : line\r\n return _instance;\r\n };\r\n\r\n // noinspection JSUndefinedPropertyAssignment\r\n /**\r\n * destroy this plugin instance\r\n * @access public\r\n * @type {function}\r\n * @return undefined\r\n */\r\n _instance.destroy = function() {\r\n // unbind instance generated events\r\n // noinspection JSUnresolvedFunction, JSUnresolvedVariable\r\n $(_config.appendScroll).off('.' + _namespace, _events.e);\r\n // noinspection JSUnresolvedVariable\r\n $(window).off('.' + _namespace);\r\n\r\n // clear events\r\n _events = {};\r\n\r\n return undefined;\r\n };\r\n\r\n // start using lazy and return all elements to be chainable or instance for further use\r\n // noinspection JSUnresolvedVariable\r\n _executeLazy(_instance, _config, elements, _events, _namespace);\r\n return _config.chainable ? elements : _instance;\r\n }\r\n\r\n /**\r\n * settings and configuration data\r\n * @access public\r\n * @type {object|*}\r\n */\r\n LazyPlugin.prototype.config = {\r\n // general\r\n name : 'lazy',\r\n chainable : true,\r\n autoDestroy : true,\r\n bind : 'load',\r\n threshold : 500,\r\n visibleOnly : false,\r\n appendScroll : window,\r\n scrollDirection : 'both',\r\n imageBase : null,\r\n defaultImage : 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',\r\n placeholder : null,\r\n delay : -1,\r\n combined : false,\r\n\r\n // attributes\r\n attribute : 'data-src',\r\n srcsetAttribute : 'data-srcset',\r\n sizesAttribute : 'data-sizes',\r\n retinaAttribute : 'data-retina',\r\n loaderAttribute : 'data-loader',\r\n imageBaseAttribute : 'data-imagebase',\r\n removeAttribute : true,\r\n handledName : 'handled',\r\n loadedName : 'loaded',\r\n\r\n // effect\r\n effect : 'show',\r\n effectTime : 0,\r\n\r\n // throttle\r\n enableThrottle : true,\r\n throttle : 250,\r\n\r\n // callbacks\r\n beforeLoad : undefined,\r\n afterLoad : undefined,\r\n onError : undefined,\r\n onFinishedAll : undefined\r\n };\r\n\r\n // register window load event globally to prevent not loading elements\r\n // since jQuery 3.X ready state is fully async and may be executed after 'load' \r\n $(window).on('load', function() {\r\n windowLoaded = true;\r\n });\r\n})(window);","/* eslint-disable */\nif (!jQuery) {\n console.log('jquery.popupoverlay - jQuery not defined.');\n}\nrequire('./jquery.popupoverlay');","/*!\r\n * jQuery Popup Overlay\r\n *\r\n * @requires jQuery v1.7.1+\r\n * @link https://vast-engineering.github.com/jquery-popup-overlay/\r\n */\r\n;(function ($) { /* eslint-disable-line */\r\n\r\n var $window = $(window);\r\n var options = {};\r\n var zindexvalues = [];\r\n var lastclicked = [];\r\n var scrollbarwidth;\r\n var bodymarginright = null;\r\n var opensuffix = '_open';\r\n var closesuffix = '_close';\r\n var visiblePopupsArray = [];\r\n var transitionsupport = null;\r\n var opentimer;\r\n var iOS = /(iPad|iPhone|iPod)/.test(navigator.userAgent);\r\n var focusableElementsString = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]\";\r\n\r\n var methods = {\r\n\r\n _init: function (el) {\r\n var $el = $(el);\r\n var options = $el.data('popupoptions');\r\n lastclicked[el.id] = false;\r\n zindexvalues[el.id] = 0;\r\n\r\n if (!$el.data('popup-initialized')) {\r\n $el.attr('data-popup-initialized', 'true');\r\n methods._initonce(el);\r\n }\r\n\r\n if (options.autoopen) {\r\n setTimeout(function() {\r\n methods.show(el, 0);\r\n }, 0);\r\n }\r\n },\r\n\r\n _initonce: function (el) {\r\n var $el = $(el);\r\n var $body = $('body');\r\n var $wrapper;\r\n var options = $el.data('popupoptions');\r\n\r\n bodymarginright = parseInt($body.css('margin-right'), 10);\r\n transitionsupport = document.body.style.webkitTransition !== undefined ||\r\n document.body.style.MozTransition !== undefined ||\r\n document.body.style.msTransition !== undefined ||\r\n document.body.style.OTransition !== undefined ||\r\n document.body.style.transition !== undefined;\r\n\r\n if (options.scrolllock) {\r\n // Calculate the browser's scrollbar width dynamically\r\n var parent;\r\n var child;\r\n if (typeof scrollbarwidth === 'undefined') {\r\n parent = $('<div style=\"width:50px;height:50px;overflow:auto\"><div/></div>').appendTo('body');\r\n child = parent.children();\r\n scrollbarwidth = child.innerWidth() - child.height(99).innerWidth();\r\n parent.remove();\r\n }\r\n }\r\n\r\n if (!$el.attr('id')) {\r\n $el.attr('id', 'j-popup-' + parseInt((Math.random() * 100000000), 10));\r\n }\r\n\r\n $el.addClass('popup_content');\r\n\r\n if ((options.background) && (!$('#' + el.id + '_background').length)) {\r\n\r\n $body.append('<div id=\"' + el.id + '_background\" class=\"popup_background\"></div>');\r\n\r\n var $background = $('#' + el.id + '_background');\r\n\r\n $background.css({\r\n opacity: 0,\r\n visibility: 'hidden',\r\n backgroundColor: options.color,\r\n position: 'fixed',\r\n top: 0,\r\n right: 0,\r\n bottom: 0,\r\n left: 0\r\n });\r\n\r\n if (options.setzindex && !options.autozindex) {\r\n $background.css('z-index', '100000');\r\n }\r\n\r\n if (options.transition) {\r\n $background.css('transition', options.transition);\r\n }\r\n }\r\n\r\n $body.append(el);\r\n\r\n $el.wrap('<div id=\"' + el.id + '_wrapper\" class=\"popup_wrapper\" />');\r\n\r\n $wrapper = $('#' + el.id + '_wrapper');\r\n\r\n $wrapper.css({\r\n opacity: 0,\r\n visibility: 'hidden',\r\n position: 'absolute'\r\n });\r\n\r\n // Make div clickable in iOS\r\n if (iOS) {\r\n $background = $('#' + el.id + '_background');\r\n $background.css('cursor', 'pointer');\r\n $(options.pagecontainer).css('cursor', 'pointer');\r\n }\r\n\r\n if (options.type == 'overlay' && !options.absolute && options.background) {\r\n $wrapper.css('overflow','auto');\r\n $wrapper[0].style.WebkitOverflowScrolling = 'touch'; // for smooth scrolling in overflow:auto divs in iOS\r\n }\r\n\r\n $el.css({\r\n opacity: 0,\r\n visibility: 'hidden',\r\n 'pointer-events': 'auto', // reset pointer events back to default for a child element\r\n display: 'inline-block'\r\n });\r\n\r\n if (options.setzindex && !options.autozindex) {\r\n $wrapper.css('z-index', '100001');\r\n }\r\n\r\n if (!options.outline) {\r\n $el.css('outline', 'none');\r\n }\r\n\r\n if (options.transition) {\r\n $el.css('transition', options.transition);\r\n $wrapper.css('transition', options.transition);\r\n }\r\n\r\n // Hide popup content from screen readers initially\r\n $el.attr('aria-hidden', true);\r\n\r\n if (options.type == 'overlay') {\r\n $el.css({\r\n textAlign: 'left',\r\n position: 'relative',\r\n verticalAlign: 'middle'\r\n });\r\n\r\n $wrapper.css({\r\n position: 'fixed',\r\n width: '100%',\r\n height: '100%',\r\n top: 0,\r\n left: 0,\r\n textAlign: 'center'\r\n });\r\n\r\n // CSS vertical align helper\r\n $wrapper.append('<div class=\"popup_align\" />');\r\n\r\n $('.popup_align').css({\r\n display: 'inline-block',\r\n verticalAlign: 'middle',\r\n height: '100%'\r\n });\r\n }\r\n\r\n // Add WAI ARIA role to announce dialog to screen readers\r\n $el.attr('role', 'dialog');\r\n\r\n var openelement = (options.openelement) ? options.openelement : ('.' + el.id + opensuffix);\r\n\r\n $(openelement).each(function (i, item) {\r\n $(item).attr('data-popup-ordinal', i);\r\n\r\n if (!item.id) {\r\n $(item).attr('id', 'open_' + parseInt((Math.random() * 100000000), 10));\r\n }\r\n });\r\n\r\n // Set aria-labelledby (if aria-label or aria-labelledby is not set in html)\r\n if (!($el.attr('aria-labelledby') || $el.attr('aria-label'))) {\r\n $el.attr('aria-labelledby', $(openelement).attr('id'));\r\n }\r\n\r\n // Show and hide tooltips on hover\r\n if(options.action == 'hover'){\r\n options.keepfocus = false;\r\n\r\n // Handler: mouseenter, focusin\r\n $(openelement).on('mouseenter', function () {\r\n methods.show(el, $(this).data('popup-ordinal'));\r\n });\r\n\r\n // Handler: mouseleave, focusout\r\n $(openelement).on('mouseleave', function () {\r\n methods.hide(el);\r\n });\r\n\r\n } else {\r\n\r\n // Handler: Show popup when clicked on `open` element\r\n $(document).on('click.jqp', openelement, function (event) {\r\n event.preventDefault();\r\n\r\n var ord = $(this).data('popup-ordinal');\r\n setTimeout(function() { // setTimeout is to allow `close` method to finish (for issues with multiple tooltips)\r\n methods.show(el, ord);\r\n }, 0);\r\n });\r\n }\r\n\r\n if (options.closebutton) {\r\n methods.addclosebutton(el);\r\n }\r\n\r\n if (options.detach) {\r\n $el.detach();\r\n } else {\r\n $el.hide();\r\n }\r\n },\r\n\r\n /**\r\n * Show method\r\n *\r\n * @param {object} el - popup instance DOM node\r\n * @param {number} ordinal - order number of an `open` element\r\n */\r\n show: function (el, ordinal) {\r\n var $el = $(el);\r\n\r\n if ($el.data('popup-visible')) return;\r\n\r\n // Initialize if not initialized. Required for: $('#popup').popup('show')\r\n if (!$el.data('popup-initialized')) {\r\n methods._init(el);\r\n }\r\n $el.attr('data-popup-initialized', 'true');\r\n\r\n var $body = $('body');\r\n var options = $el.data('popupoptions');\r\n var $wrapper = $('#' + el.id + '_wrapper');\r\n var $background = $('#' + el.id + '_background');\r\n\r\n // `beforeopen` callback event\r\n callback(el, ordinal, options.beforeopen);\r\n\r\n // Remember last clicked place\r\n lastclicked[el.id] = ordinal;\r\n\r\n // Add popup id to visiblePopupsArray\r\n setTimeout(function() {\r\n visiblePopupsArray.push(el.id);\r\n }, 0);\r\n\r\n // Calculating maximum z-index\r\n if (options.autozindex) {\r\n\r\n var elements = document.getElementsByTagName('*');\r\n var len = elements.length;\r\n var maxzindex = 0;\r\n\r\n for(var i=0; i<len; i++){\r\n\r\n var elementzindex = $(elements[i]).css('z-index');\r\n\r\n if(elementzindex !== 'auto'){\r\n\r\n elementzindex = parseInt(elementzindex, 10);\r\n\r\n if(maxzindex < elementzindex){\r\n maxzindex = elementzindex;\r\n }\r\n }\r\n }\r\n\r\n zindexvalues[el.id] = maxzindex;\r\n\r\n // Add z-index to the background\r\n if (options.background) {\r\n if (zindexvalues[el.id] >= 0) {\r\n $('#' + el.id + '_background').css({\r\n zIndex: (zindexvalues[el.id] + 1)\r\n });\r\n }\r\n }\r\n\r\n // Add z-index to the wrapper\r\n if (zindexvalues[el.id] >= 0) {\r\n $wrapper.css({\r\n zIndex: (zindexvalues[el.id] + 2)\r\n });\r\n }\r\n }\r\n\r\n if (options.detach) {\r\n $wrapper.prepend(el);\r\n $el.show();\r\n } else {\r\n $el.show();\r\n }\r\n\r\n opentimer = setTimeout(function() {\r\n $wrapper.css({\r\n visibility: 'visible',\r\n opacity: 1\r\n });\r\n\r\n $('html').addClass('popup_visible').addClass('popup_visible_' + el.id);\r\n $wrapper.addClass('popup_wrapper_visible');\r\n }, 20); // 20ms required for opening animation to occur in FF\r\n\r\n // Disable background layer scrolling when popup is opened\r\n if (options.scrolllock) {\r\n $body.css('overflow', 'hidden');\r\n if ($body.height() > $window.height()) {\r\n $body.css('margin-right', bodymarginright + scrollbarwidth);\r\n }\r\n }\r\n\r\n $el.css({\r\n 'visibility': 'visible',\r\n 'opacity': 1\r\n });\r\n\r\n // Show background\r\n if (options.background) {\r\n $background.css({\r\n 'visibility': 'visible',\r\n 'opacity': options.opacity\r\n });\r\n\r\n // Fix IE8 issue with background not appearing\r\n setTimeout(function() {\r\n $background.css({\r\n 'opacity': options.opacity\r\n });\r\n }, 0);\r\n }\r\n\r\n $el.data('popup-visible', true);\r\n\r\n // Position popup\r\n methods.reposition(el, ordinal);\r\n\r\n // Remember which element had focus before opening a popup\r\n $el.data('focusedelementbeforepopup', document.activeElement);\r\n\r\n // Make holder div programatically focusable with tabindex:-1 (tabindex:0 is keyboard focusable)\r\n $el.attr('tabindex', -1);\r\n\r\n // Focus the popup or user specified element.\r\n // Initial timeout of 50ms is set to give some time to popup to show after clicking on\r\n // `open` element, and after animation is complete to prevent background scrolling.\r\n setTimeout(function() {\r\n if (options.focuselement === 'closebutton') { // e.g. focuselement:'closebutton'\r\n $('#' + el.id + ' .' + el.id + closesuffix + ':first').focus();\r\n } else if (options.focuselement) { // e.g. focuselement:'#my-close-button'\r\n $(options.focuselement).focus();\r\n } else if (options.focuselement === true || options.keepfocus) { // e.g. focuselement:true OR keepfocus:true\r\n $el.focus();\r\n }\r\n }, options.focusdelay);\r\n\r\n // Hide main content from screen readers\r\n if (options.keepfocus) {\r\n $(options.pagecontainer).attr('aria-hidden', true);\r\n }\r\n\r\n // Reveal popup content to screen readers\r\n $el.attr('aria-hidden', false);\r\n\r\n callback(el, ordinal, options.onopen);\r\n\r\n if (transitionsupport) {\r\n $wrapper.one('transitionend', function() {\r\n callback(el, ordinal, options.opentransitionend);\r\n });\r\n } else {\r\n callback(el, ordinal, options.opentransitionend);\r\n }\r\n\r\n // Handler: Reposition tooltip when window is resized\r\n if (options.type == 'tooltip') {\r\n $(window).on('resize.' + el.id, function () {\r\n methods.reposition(el, ordinal);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Hide method\r\n *\r\n * @param object el - popup instance DOM node\r\n * @param boolean outerClick - click on the outer content below popup\r\n */\r\n hide: function (el, outerClick) {\r\n // Get index of popup ID inside of visiblePopupsArray\r\n var popupIdIndex = $.inArray(el.id, visiblePopupsArray);\r\n\r\n // If popup is not opened, ignore the rest of the function\r\n if (popupIdIndex === -1) {\r\n return;\r\n }\r\n\r\n if(opentimer) clearTimeout(opentimer);\r\n\r\n var $body = $('body');\r\n var $el = $(el);\r\n var options = $el.data('popupoptions');\r\n var $wrapper = $('#' + el.id + '_wrapper');\r\n var $background = $('#' + el.id + '_background');\r\n\r\n $el.data('popup-visible', false);\r\n\r\n if (visiblePopupsArray.length === 1) {\r\n $('html').removeClass('popup_visible').removeClass('popup_visible_' + el.id);\r\n } else {\r\n if($('html').hasClass('popup_visible_' + el.id)) {\r\n $('html').removeClass('popup_visible_' + el.id);\r\n }\r\n }\r\n\r\n // Remove popup from the visiblePopupsArray\r\n visiblePopupsArray.splice(popupIdIndex, 1);\r\n\r\n if($wrapper.hasClass('popup_wrapper_visible')) {\r\n $wrapper.removeClass('popup_wrapper_visible');\r\n }\r\n\r\n // Focus back on saved element\r\n if (options.keepfocus && !outerClick) {\r\n setTimeout(function() {\r\n if ($($el.data('focusedelementbeforepopup')).is(':visible')) {\r\n $el.data('focusedelementbeforepopup').focus();\r\n }\r\n }, 0);\r\n }\r\n\r\n // Hide popup\r\n $wrapper.css({\r\n 'visibility': 'hidden',\r\n 'opacity': 0\r\n });\r\n $el.css({\r\n 'visibility': 'hidden',\r\n 'opacity': 0\r\n });\r\n\r\n // Hide background\r\n if (options.background) {\r\n $background.css({\r\n 'visibility': 'hidden',\r\n 'opacity': 0\r\n });\r\n }\r\n\r\n // Reveal main content to screen readers\r\n $(options.pagecontainer).attr('aria-hidden', false);\r\n\r\n // Hide popup content from screen readers\r\n $el.attr('aria-hidden', true);\r\n\r\n // `onclose` callback event\r\n callback(el, lastclicked[el.id], options.onclose);\r\n\r\n if (transitionsupport && $el.css('transition-duration') !== '0s') {\r\n $el.one('transitionend', function() {\r\n\r\n if (!($el.data('popup-visible'))) {\r\n if (options.detach) {\r\n $el.detach();\r\n } else {\r\n $el.hide();\r\n }\r\n }\r\n\r\n // Re-enable scrolling of background layer, if needed\r\n if (options.scrolllock) {\r\n setTimeout(function() {\r\n if ($.grep(visiblePopupsArray, function(eid) { return $(\"#\"+eid).data('popupoptions').scrolllock }).length) {\r\n // Some \"scolllock=true\" popup is currently visible, leave scrolling disabled\r\n return;\r\n }\r\n $body.css({\r\n overflow: 'visible',\r\n 'margin-right': bodymarginright\r\n });\r\n }, 10); // 10ms added for CSS transition in Firefox which doesn't like overflow:auto\r\n }\r\n\r\n callback(el, lastclicked[el.id], options.closetransitionend);\r\n });\r\n } else {\r\n if (options.detach) {\r\n $el.detach();\r\n } else {\r\n $el.hide();\r\n }\r\n\r\n // Re-enable scrolling of background layer, if needed\r\n if (options.scrolllock) {\r\n setTimeout(function() {\r\n if ($.grep(visiblePopupsArray, function(eid) { return $(\"#\"+eid).data('popupoptions').scrolllock }).length) {\r\n // Some \"scrolllock=true\" popup is currently visible, leave scrolling disabled\r\n return;\r\n }\r\n $body.css({\r\n overflow: 'visible',\r\n 'margin-right': bodymarginright\r\n });\r\n }, 10); // 10ms added for CSS transition in Firefox which doesn't like overflow:auto\r\n }\r\n\r\n callback(el, lastclicked[el.id], options.closetransitionend);\r\n }\r\n\r\n if (options.type == 'tooltip') {\r\n $(window).off('resize.' + el.id);\r\n }\r\n },\r\n\r\n /**\r\n * Toggle method\r\n *\r\n * @param {object} el - popup instance DOM node\r\n * @param {number} ordinal - order number of an `open` element\r\n */\r\n toggle: function (el, ordinal) {\r\n if ($(el).data('popup-visible')) {\r\n methods.hide(el);\r\n } else {\r\n setTimeout(function() {\r\n methods.show(el, ordinal);\r\n }, 0);\r\n }\r\n },\r\n\r\n /**\r\n * Reposition method\r\n *\r\n * @param {object} el - popup instance DOM node\r\n * @param {number} ordinal - order number of an `open` element\r\n */\r\n reposition: function (el, ordinal) {\r\n var $el = $(el);\r\n var options = $el.data('popupoptions');\r\n var $wrapper = $('#' + el.id + '_wrapper');\r\n\r\n ordinal = ordinal || 0;\r\n\r\n // Tooltip type\r\n if (options.type == 'tooltip') {\r\n // TODO: this static assignments should probably be moved to init method\r\n $wrapper.css({\r\n 'position': 'absolute'\r\n });\r\n\r\n var $tooltipanchor;\r\n if (options.tooltipanchor) {\r\n $tooltipanchor = $(options.tooltipanchor);\r\n } else if (options.openelement) {\r\n $tooltipanchor = $(options.openelement).filter('[data-popup-ordinal=\"' + ordinal + '\"]');\r\n } else {\r\n $tooltipanchor = $('.' + el.id + opensuffix + '[data-popup-ordinal=\"' + ordinal + '\"]');\r\n }\r\n\r\n var linkOffset = $tooltipanchor.offset() || { left: 0, top: 0 };\r\n\r\n // Horizontal position for tooltip\r\n if (options.horizontal == 'right') {\r\n $wrapper.css('left', linkOffset.left + $tooltipanchor.outerWidth() + options.offsetleft);\r\n } else if (options.horizontal == 'leftedge') {\r\n $wrapper.css('left', linkOffset.left + options.offsetleft);\r\n } else if (options.horizontal == 'left') {\r\n $wrapper.css('right', $window.width() - linkOffset.left - options.offsetleft);\r\n } else if (options.horizontal == 'rightedge') {\r\n $wrapper.css('right', $window.width() - linkOffset.left - $tooltipanchor.outerWidth() - options.offsetleft);\r\n } else {\r\n $wrapper.css('left', linkOffset.left + ($tooltipanchor.outerWidth() / 2) - ($el.outerWidth() / 2) - parseFloat($el.css('marginLeft')) + options.offsetleft);\r\n }\r\n\r\n // Vertical position for tooltip\r\n if (options.vertical == 'bottom') {\r\n $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() + options.offsettop);\r\n } else if (options.vertical == 'bottomedge') {\r\n $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() - $el.outerHeight() + options.offsettop);\r\n } else if (options.vertical == 'top') {\r\n $wrapper.css('bottom', $window.height() - linkOffset.top - options.offsettop);\r\n } else if (options.vertical == 'topedge') {\r\n $wrapper.css('bottom', $window.height() - linkOffset.top - $el.outerHeight() - options.offsettop);\r\n } else {\r\n $wrapper.css('top', linkOffset.top + ($tooltipanchor.outerHeight() / 2) - ($el.outerHeight() / 2) - parseFloat($el.css('marginTop')) + options.offsettop);\r\n }\r\n\r\n // Overlay type\r\n } else if (options.type == 'overlay') {\r\n // TODO all static assignments in this block should probably be moved to init method\r\n\r\n // Horizontal position for overlay\r\n if (options.horizontal) {\r\n $wrapper.css('text-align', options.horizontal);\r\n } else {\r\n $wrapper.css('text-align', 'center');\r\n }\r\n\r\n // Vertical position for overlay\r\n if (options.vertical) {\r\n $el.css('vertical-align', options.vertical);\r\n } else {\r\n $el.css('vertical-align', 'middle');\r\n }\r\n\r\n if (options.absolute) {\r\n $wrapper.css({\r\n position: 'absolute',\r\n top: window.scrollY\r\n });\r\n }\r\n\r\n if (!options.background) {\r\n $wrapper.css({ 'pointer-events': 'none' });\r\n\r\n // If popup doesnt fit the viewport, and if background doesn't exist, add scrollbar to popup div instead of wrapper\r\n if (!options.absolute && !isInViewport(el)) {\r\n $el.css('overflow', 'auto');\r\n $el[0].style.WebkitOverflowScrolling = 'touch'; // for smooth scrolling in overflow:auto divs in iOS\r\n $el.css('max-height', 'calc(100% - ' + $el.css('margin-top') + ' - ' + $el.css('margin-bottom') + ')');\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Add-close-button method\r\n *\r\n * @param {object} el - popup instance DOM node\r\n */\r\n addclosebutton: function (el) {\r\n var genericCloseButton;\r\n\r\n if ($(el).data('popupoptions').closebuttonmarkup) {\r\n genericCloseButton = $(options.closebuttonmarkup).addClass(el.id + '_close');\r\n } else {\r\n genericCloseButton = '<button class=\"popup_close ' + el.id + '_close\" title=\"Close\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>';\r\n }\r\n\r\n if ($(el).data('popup-initialized')){\r\n $(el).append(genericCloseButton);\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Callback event calls\r\n *\r\n * @param {object} el - popup instance DOM node\r\n * @param {number} ordinal - order number of an `open` element\r\n * @param {function} func - callback function\r\n */\r\n var callback = function (el, ordinal, func) {\r\n var options = $(el).data('popupoptions');\r\n var openelement;\r\n var elementclicked;\r\n if (typeof options === 'undefined') return;\r\n openelement = options.openelement ? options.openelement : ('.' + el.id + opensuffix);\r\n elementclicked = $(openelement + '[data-popup-ordinal=\"' + ordinal + '\"]');\r\n if (typeof func == 'function') {\r\n func.call($(el), el, elementclicked);\r\n }\r\n };\r\n\r\n /**\r\n * Check if element is fully in viewport\r\n *\r\n * @param {object} el - popup instance DOM node\r\n */\r\n var isInViewport = function (el) {\r\n var bounding = el.getBoundingClientRect();\r\n return (\r\n bounding.top >= 0 &&\r\n bounding.left >= 0 &&\r\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n };\r\n\r\n // Hide popup if ESC key is pressed\r\n $(document).on('keydown', function (event) {\r\n if(visiblePopupsArray.length) {\r\n var elementId = visiblePopupsArray[visiblePopupsArray.length - 1];\r\n var el = document.getElementById(elementId);\r\n\r\n if ($(el).data('popupoptions').escape && event.keyCode == 27) {\r\n methods.hide(el);\r\n }\r\n }\r\n });\r\n\r\n var mousedownTarget;\r\n\r\n $(document).on('mousedown', function (event) {\r\n mousedownTarget = event.target;\r\n });\r\n\r\n // Hide popup on click\r\n $(document).on('click', function (event) {\r\n if(visiblePopupsArray.length) {\r\n var elementId = visiblePopupsArray[visiblePopupsArray.length - 1];\r\n var el = document.getElementById(elementId);\r\n var closeButton = ($(el).data('popupoptions').closeelement) ? $(el).data('popupoptions').closeelement : ('.' + el.id + closesuffix);\r\n\r\n // If Close button clicked\r\n if ($(event.target).closest(closeButton).length) {\r\n event.preventDefault();\r\n methods.hide(el);\r\n }\r\n\r\n // If clicked outside of popup\r\n if ($(el).data('popupoptions')\r\n && $(el).data('popupoptions').blur\r\n && !$(event.target).closest($(el).data('popupoptions').blurignore).length\r\n && !$(event.target).closest('#' + elementId).length\r\n && !$(mousedownTarget).closest('#' + elementId).length\r\n && event.which !== 2\r\n && $(event.target).is(':visible')) {\r\n\r\n if ($(el).data('popupoptions').background) {\r\n // If clicked on popup cover\r\n methods.hide(el);\r\n\r\n // Older iOS/Safari will trigger a click on the elements below the cover,\r\n // when tapping on the cover, so the default action needs to be prevented.\r\n event.preventDefault();\r\n\r\n } else {\r\n // If clicked on outer content\r\n methods.hide(el, true);\r\n }\r\n }\r\n }\r\n });\r\n\r\n // Keep keyboard focus inside of popup\r\n $(document).on('keydown', function(event) {\r\n if(visiblePopupsArray.length && event.which == 9) {\r\n // If tab or shift-tab pressed\r\n var elementId = visiblePopupsArray[visiblePopupsArray.length - 1];\r\n var el = document.getElementById(elementId);\r\n var options = $(el).data('popupoptions');\r\n\r\n // If the last opened popup doesn't have `keepfocus` option, ignore the rest and don't lock the focus inside of popup.\r\n if (!options.keepfocus) {\r\n return;\r\n }\r\n\r\n // Get list of all children elements in given object\r\n var popupItems = $(el).find('*');\r\n\r\n // Get list of focusable items\r\n var focusableItems = popupItems.filter(focusableElementsString).filter(':visible');\r\n\r\n // Get currently focused item\r\n var focusedItem = $(':focus');\r\n\r\n // Get the number of focusable items\r\n var numberOfFocusableItems = focusableItems.length;\r\n\r\n // Get the index of the currently focused item\r\n var focusedItemIndex = focusableItems.index(focusedItem);\r\n\r\n // If popup doesn't contain focusable elements, focus popup itself\r\n if (numberOfFocusableItems === 0) {\r\n $(el).focus();\r\n event.preventDefault();\r\n } else {\r\n if (event.shiftKey) {\r\n // Back tab\r\n // If focused on first item and user preses back-tab, go to the last focusable item\r\n if (focusedItemIndex === 0) {\r\n focusableItems.get(numberOfFocusableItems - 1).focus();\r\n event.preventDefault();\r\n }\r\n\r\n } else {\r\n // Forward tab\r\n // If focused on the last item and user preses tab, go to the first focusable item\r\n if (focusedItemIndex == numberOfFocusableItems - 1) {\r\n focusableItems.get(0).focus();\r\n event.preventDefault();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Plugin API\r\n */\r\n $.fn.popup = function (customoptions) {\r\n return this.each(function () {\r\n\r\n var $el = $(this);\r\n var newDefaults = $.extend(true, {}, $.fn.popup.defaults);\r\n\r\n // Set defaults for tooltips dynamically instead of implicitly, so they can be overriden with custom options.\r\n if (customoptions && customoptions.type === 'tooltip') {\r\n newDefaults.background = false;\r\n }\r\n\r\n if (typeof customoptions === 'object') { // e.g. $('#popup').popup({'color':'blue'})\r\n var opt = $.extend({}, newDefaults, $el.data('popupoptions'), customoptions);\r\n $el.data('popupoptions', opt);\r\n options = $el.data('popupoptions');\r\n\r\n methods._init(this);\r\n\r\n } else if (typeof customoptions === 'string') { // e.g. $('#popup').popup('hide')\r\n if (!($el.data('popupoptions'))) {\r\n $el.data('popupoptions', newDefaults);\r\n options = $el.data('popupoptions');\r\n }\r\n\r\n methods[customoptions].call(this, this);\r\n\r\n } else { // e.g. $('#popup').popup()\r\n if (!($el.data('popupoptions'))) {\r\n $el.data('popupoptions', newDefaults);\r\n options = $el.data('popupoptions');\r\n }\r\n\r\n methods._init(this);\r\n\r\n }\r\n\r\n });\r\n };\r\n\r\n // destroy all popups\r\n $.fn.popup.destroyall = function () {\r\n // TODO: create tests to check if we can use `hide` method (perhaps we'll need to remove transitions)\r\n // or we need another way of removing the data when destroying.\r\n for(var i=0; i < visiblePopupsArray.length; i++) {\r\n $('#' + visiblePopupsArray[i]).popup('hide');\r\n }\r\n $('.popup_wrapper').remove();\r\n $('.popup_background').remove();\r\n // visiblePopupsArray = []; // TODO: check if we need this for SPA and popups with fadeOut animation and scrolllock\r\n $(document).off('click.jqp');\r\n };\r\n\r\n $.fn.popup.defaults = {\r\n type: 'overlay',\r\n absolute: false,\r\n autoopen: false,\r\n background: true,\r\n color: 'black',\r\n opacity: '0.5',\r\n horizontal: 'center',\r\n vertical: 'middle',\r\n offsettop: 0,\r\n offsetleft: 0,\r\n escape: true,\r\n blur: true,\r\n blurignore: null,\r\n setzindex: true,\r\n autozindex: false,\r\n scrolllock: false,\r\n closebutton: false,\r\n closebuttonmarkup: null,\r\n keepfocus: true,\r\n focuselement: null,\r\n focusdelay: 50,\r\n outline: false,\r\n pagecontainer: null,\r\n detach: false,\r\n openelement: null,\r\n closeelement: null,\r\n transition: null,\r\n tooltipanchor: null,\r\n beforeopen: null,\r\n onclose: null,\r\n onopen: null,\r\n opentransitionend: null,\r\n closetransitionend: null\r\n };\r\n\r\n})(jQuery); /* eslint-disable-line */\r\n","/*!\n * jQuery UI Focusable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :focusable Selector\n//>>group: Core\n//>>description: Selects elements which can be focused.\n//>>docs: http://api.jqueryui.com/focusable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Selectors\n$.ui.focusable = function( element, hasTabindex ) {\n\tvar map, mapName, img, focusableIfVisible, fieldset,\n\t\tnodeName = element.nodeName.toLowerCase();\n\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap='#\" + mapName + \"']\" );\n\t\treturn img.length > 0 && img.is( \":visible\" );\n\t}\n\n\tif ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {\n\t\tfocusableIfVisible = !element.disabled;\n\n\t\tif ( focusableIfVisible ) {\n\n\t\t\t// Form controls within a disabled fieldset are disabled.\n\t\t\t// However, controls within the fieldset's legend do not get disabled.\n\t\t\t// Since controls generally aren't placed inside legends, we skip\n\t\t\t// this portion of the check.\n\t\t\tfieldset = $( element ).closest( \"fieldset\" )[ 0 ];\n\t\t\tif ( fieldset ) {\n\t\t\t\tfocusableIfVisible = !fieldset.disabled;\n\t\t\t}\n\t\t}\n\t} else if ( \"a\" === nodeName ) {\n\t\tfocusableIfVisible = element.href || hasTabindex;\n\t} else {\n\t\tfocusableIfVisible = hasTabindex;\n\t}\n\n\treturn focusableIfVisible && $( element ).is( \":visible\" ) && visible( $( element ) );\n};\n\n// Support: IE 8 only\n// IE 8 doesn't resolve inherit to visible/hidden for computed values\nfunction visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility === \"visible\";\n}\n\n$.extend( $.expr.pseudos, {\n\tfocusable: function( element ) {\n\t\treturn $.ui.focusable( element, $.attr( element, \"tabindex\" ) != null );\n\t}\n} );\n\nreturn $.ui.focusable;\n\n} );\n","/*!\n * jQuery UI Tabbable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :tabbable Selector\n//>>group: Core\n//>>description: Selects elements which can be tabbed to.\n//>>docs: http://api.jqueryui.com/tabbable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\", \"./focusable\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\thasTabindex = tabIndex != null;\n\t\treturn ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );\n\t}\n} );\n\n} );\n","/*!\n * jQuery UI Unique ID 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.ui = $.ui || {};\n\nreturn $.ui.version = \"1.13.2\";\n\n} );\n","/*!\n * jQuery Cookie Plugin v1.4.1\n * https://github.com/carhartl/jquery-cookie\n *\n * Copyright 2013 Klaus Hartl\n * Released under the MIT license\n */\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD\n\t\tdefine(['jquery'], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// CommonJS\n\t\tfactory(require('jquery'));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n}(function ($) {\n\n\tvar pluses = /\\+/g;\n\n\tfunction encode(s) {\n\t\treturn config.raw ? s : encodeURIComponent(s);\n\t}\n\n\tfunction decode(s) {\n\t\treturn config.raw ? s : decodeURIComponent(s);\n\t}\n\n\tfunction stringifyCookieValue(value) {\n\t\treturn encode(config.json ? JSON.stringify(value) : String(value));\n\t}\n\n\tfunction parseCookieValue(s) {\n\t\tif (s.indexOf('\"') === 0) {\n\t\t\t// This is a quoted cookie as according to RFC2068, unescape...\n\t\t\ts = s.slice(1, -1).replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, '\\\\');\n\t\t}\n\n\t\ttry {\n\t\t\t// Replace server-side written pluses with spaces.\n\t\t\t// If we can't decode the cookie, ignore it, it's unusable.\n\t\t\t// If we can't parse the cookie, ignore it, it's unusable.\n\t\t\ts = decodeURIComponent(s.replace(pluses, ' '));\n\t\t\treturn config.json ? JSON.parse(s) : s;\n\t\t} catch(e) {}\n\t}\n\n\tfunction read(s, converter) {\n\t\tvar value = config.raw ? s : parseCookieValue(s);\n\t\treturn $.isFunction(converter) ? converter(value) : value;\n\t}\n\n\tvar config = $.cookie = function (key, value, options) {\n\n\t\t// Write\n\n\t\tif (value !== undefined && !$.isFunction(value)) {\n\t\t\toptions = $.extend({}, config.defaults, options);\n\n\t\t\tif (typeof options.expires === 'number') {\n\t\t\t\tvar days = options.expires, t = options.expires = new Date();\n\t\t\t\tt.setTime(+t + days * 864e+5);\n\t\t\t}\n\n\t\t\treturn (document.cookie = [\n\t\t\t\tencode(key), '=', stringifyCookieValue(value),\n\t\t\t\toptions.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE\n\t\t\t\toptions.path ? '; path=' + options.path : '',\n\t\t\t\toptions.domain ? '; domain=' + options.domain : '',\n\t\t\t\toptions.secure ? '; secure' : ''\n\t\t\t].join(''));\n\t\t}\n\n\t\t// Read\n\n\t\tvar result = key ? undefined : {};\n\n\t\t// To prevent the for loop in the first place assign an empty array\n\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t// calling $.cookie().\n\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\n\t\tfor (var i = 0, l = cookies.length; i < l; i++) {\n\t\t\tvar parts = cookies[i].split('=');\n\t\t\tvar name = decode(parts.shift());\n\t\t\tvar cookie = parts.join('=');\n\n\t\t\tif (key && key === name) {\n\t\t\t\t// If second argument (value) is a function it's a converter...\n\t\t\t\tresult = read(cookie, value);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Prevent storing a cookie that we couldn't decode.\n\t\t\tif (!key && (cookie = read(cookie)) !== undefined) {\n\t\t\t\tresult[name] = cookie;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconfig.defaults = {};\n\n\t$.removeCookie = function (key, options) {\n\t\tif ($.cookie(key) === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Must not alter options, thus extending a fresh object...\n\t\t$.cookie(key, '', $.extend({}, options, { expires: -1 }));\n\t\treturn !$.cookie(key);\n\t};\n\n}));\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Parallax = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],2:[function(require,module,exports){\n(function (process){\n// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n}).call(this,require('_process'))\n\n},{\"_process\":3}],3:[function(require,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],4:[function(require,module,exports){\n(function (global){\nvar now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"performance-now\":2}],5:[function(require,module,exports){\n'use strict';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n* Parallax.js\n* @author Matthew Wagerfield - @wagerfield, René Roth - mail@reneroth.org\n* @description Creates a parallax effect between an array of layers,\n* driving the motion from the gyroscope output of a smartdevice.\n* If no gyroscope is available, the cursor position is used.\n*/\n\nvar rqAnFr = require('raf');\nvar objectAssign = require('object-assign');\n\nvar helpers = {\n propertyCache: {},\n vendors: [null, ['-webkit-', 'webkit'], ['-moz-', 'Moz'], ['-o-', 'O'], ['-ms-', 'ms']],\n\n clamp: function clamp(value, min, max) {\n return min < max ? value < min ? min : value > max ? max : value : value < max ? max : value > min ? min : value;\n },\n data: function data(element, name) {\n return helpers.deserialize(element.getAttribute('data-' + name));\n },\n deserialize: function deserialize(value) {\n if (value === 'true') {\n return true;\n } else if (value === 'false') {\n return false;\n } else if (value === 'null') {\n return null;\n } else if (!isNaN(parseFloat(value)) && isFinite(value)) {\n return parseFloat(value);\n } else {\n return value;\n }\n },\n camelCase: function camelCase(value) {\n return value.replace(/-+(.)?/g, function (match, character) {\n return character ? character.toUpperCase() : '';\n });\n },\n accelerate: function accelerate(element) {\n helpers.css(element, 'transform', 'translate3d(0,0,0) rotate(0.0001deg)');\n helpers.css(element, 'transform-style', 'preserve-3d');\n helpers.css(element, 'backface-visibility', 'hidden');\n },\n transformSupport: function transformSupport(value) {\n var element = document.createElement('div'),\n propertySupport = false,\n propertyValue = null,\n featureSupport = false,\n cssProperty = null,\n jsProperty = null;\n for (var i = 0, l = helpers.vendors.length; i < l; i++) {\n if (helpers.vendors[i] !== null) {\n cssProperty = helpers.vendors[i][0] + 'transform';\n jsProperty = helpers.vendors[i][1] + 'Transform';\n } else {\n cssProperty = 'transform';\n jsProperty = 'transform';\n }\n if (element.style[jsProperty] !== undefined) {\n propertySupport = true;\n break;\n }\n }\n switch (value) {\n case '2D':\n featureSupport = propertySupport;\n break;\n case '3D':\n if (propertySupport) {\n var body = document.body || document.createElement('body'),\n documentElement = document.documentElement,\n documentOverflow = documentElement.style.overflow,\n isCreatedBody = false;\n\n if (!document.body) {\n isCreatedBody = true;\n documentElement.style.overflow = 'hidden';\n documentElement.appendChild(body);\n body.style.overflow = 'hidden';\n body.style.background = '';\n }\n\n body.appendChild(element);\n element.style[jsProperty] = 'translate3d(1px,1px,1px)';\n propertyValue = window.getComputedStyle(element).getPropertyValue(cssProperty);\n featureSupport = propertyValue !== undefined && propertyValue.length > 0 && propertyValue !== 'none';\n documentElement.style.overflow = documentOverflow;\n body.removeChild(element);\n\n if (isCreatedBody) {\n body.removeAttribute('style');\n body.parentNode.removeChild(body);\n }\n }\n break;\n }\n return featureSupport;\n },\n css: function css(element, property, value) {\n var jsProperty = helpers.propertyCache[property];\n if (!jsProperty) {\n for (var i = 0, l = helpers.vendors.length; i < l; i++) {\n if (helpers.vendors[i] !== null) {\n jsProperty = helpers.camelCase(helpers.vendors[i][1] + '-' + property);\n } else {\n jsProperty = property;\n }\n if (element.style[jsProperty] !== undefined) {\n helpers.propertyCache[property] = jsProperty;\n break;\n }\n }\n }\n element.style[jsProperty] = value;\n }\n};\n\nvar MAGIC_NUMBER = 30,\n DEFAULTS = {\n relativeInput: false,\n clipRelativeInput: false,\n inputElement: null,\n hoverOnly: false,\n calibrationThreshold: 100,\n calibrationDelay: 500,\n supportDelay: 500,\n calibrateX: false,\n calibrateY: true,\n invertX: true,\n invertY: true,\n limitX: false,\n limitY: false,\n scalarX: 10.0,\n scalarY: 10.0,\n frictionX: 0.1,\n frictionY: 0.1,\n originX: 0.5,\n originY: 0.5,\n pointerEvents: false,\n precision: 1,\n onReady: null,\n selector: null\n};\n\nvar Parallax = function () {\n function Parallax(element, options) {\n _classCallCheck(this, Parallax);\n\n this.element = element;\n\n var data = {\n calibrateX: helpers.data(this.element, 'calibrate-x'),\n calibrateY: helpers.data(this.element, 'calibrate-y'),\n invertX: helpers.data(this.element, 'invert-x'),\n invertY: helpers.data(this.element, 'invert-y'),\n limitX: helpers.data(this.element, 'limit-x'),\n limitY: helpers.data(this.element, 'limit-y'),\n scalarX: helpers.data(this.element, 'scalar-x'),\n scalarY: helpers.data(this.element, 'scalar-y'),\n frictionX: helpers.data(this.element, 'friction-x'),\n frictionY: helpers.data(this.element, 'friction-y'),\n originX: helpers.data(this.element, 'origin-x'),\n originY: helpers.data(this.element, 'origin-y'),\n pointerEvents: helpers.data(this.element, 'pointer-events'),\n precision: helpers.data(this.element, 'precision'),\n relativeInput: helpers.data(this.element, 'relative-input'),\n clipRelativeInput: helpers.data(this.element, 'clip-relative-input'),\n hoverOnly: helpers.data(this.element, 'hover-only'),\n inputElement: document.querySelector(helpers.data(this.element, 'input-element')),\n selector: helpers.data(this.element, 'selector')\n };\n\n for (var key in data) {\n if (data[key] === null) {\n delete data[key];\n }\n }\n\n objectAssign(this, DEFAULTS, data, options);\n\n if (!this.inputElement) {\n this.inputElement = this.element;\n }\n\n this.calibrationTimer = null;\n this.calibrationFlag = true;\n this.enabled = false;\n this.depthsX = [];\n this.depthsY = [];\n this.raf = null;\n\n this.bounds = null;\n this.elementPositionX = 0;\n this.elementPositionY = 0;\n this.elementWidth = 0;\n this.elementHeight = 0;\n\n this.elementCenterX = 0;\n this.elementCenterY = 0;\n\n this.elementRangeX = 0;\n this.elementRangeY = 0;\n\n this.calibrationX = 0;\n this.calibrationY = 0;\n\n this.inputX = 0;\n this.inputY = 0;\n\n this.motionX = 0;\n this.motionY = 0;\n\n this.velocityX = 0;\n this.velocityY = 0;\n\n this.onMouseMove = this.onMouseMove.bind(this);\n this.onDeviceOrientation = this.onDeviceOrientation.bind(this);\n this.onDeviceMotion = this.onDeviceMotion.bind(this);\n this.onOrientationTimer = this.onOrientationTimer.bind(this);\n this.onMotionTimer = this.onMotionTimer.bind(this);\n this.onCalibrationTimer = this.onCalibrationTimer.bind(this);\n this.onAnimationFrame = this.onAnimationFrame.bind(this);\n this.onWindowResize = this.onWindowResize.bind(this);\n\n this.windowWidth = null;\n this.windowHeight = null;\n this.windowCenterX = null;\n this.windowCenterY = null;\n this.windowRadiusX = null;\n this.windowRadiusY = null;\n this.portrait = false;\n this.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i);\n this.motionSupport = !!window.DeviceMotionEvent && !this.desktop;\n this.orientationSupport = !!window.DeviceOrientationEvent && !this.desktop;\n this.orientationStatus = 0;\n this.motionStatus = 0;\n\n this.initialise();\n }\n\n _createClass(Parallax, [{\n key: 'initialise',\n value: function initialise() {\n if (this.transform2DSupport === undefined) {\n this.transform2DSupport = helpers.transformSupport('2D');\n this.transform3DSupport = helpers.transformSupport('3D');\n }\n\n // Configure Context Styles\n if (this.transform3DSupport) {\n helpers.accelerate(this.element);\n }\n\n var style = window.getComputedStyle(this.element);\n if (style.getPropertyValue('position') === 'static') {\n this.element.style.position = 'relative';\n }\n\n // Pointer events\n if (!this.pointerEvents) {\n this.element.style.pointerEvents = 'none';\n }\n\n // Setup\n this.updateLayers();\n this.updateDimensions();\n this.enable();\n this.queueCalibration(this.calibrationDelay);\n }\n }, {\n key: 'doReadyCallback',\n value: function doReadyCallback() {\n if (this.onReady) {\n this.onReady();\n }\n }\n }, {\n key: 'updateLayers',\n value: function updateLayers() {\n if (this.selector) {\n this.layers = this.element.querySelectorAll(this.selector);\n } else {\n this.layers = this.element.children;\n }\n\n if (!this.layers.length) {\n console.warn('ParallaxJS: Your scene does not have any layers.');\n }\n\n this.depthsX = [];\n this.depthsY = [];\n\n for (var index = 0; index < this.layers.length; index++) {\n var layer = this.layers[index];\n\n if (this.transform3DSupport) {\n helpers.accelerate(layer);\n }\n\n layer.style.position = index ? 'absolute' : 'relative';\n layer.style.display = 'block';\n layer.style.left = 0;\n layer.style.top = 0;\n\n var depth = helpers.data(layer, 'depth') || 0;\n this.depthsX.push(helpers.data(layer, 'depth-x') || depth);\n this.depthsY.push(helpers.data(layer, 'depth-y') || depth);\n }\n }\n }, {\n key: 'updateDimensions',\n value: function updateDimensions() {\n this.windowWidth = window.innerWidth;\n this.windowHeight = window.innerHeight;\n this.windowCenterX = this.windowWidth * this.originX;\n this.windowCenterY = this.windowHeight * this.originY;\n this.windowRadiusX = Math.max(this.windowCenterX, this.windowWidth - this.windowCenterX);\n this.windowRadiusY = Math.max(this.windowCenterY, this.windowHeight - this.windowCenterY);\n }\n }, {\n key: 'updateBounds',\n value: function updateBounds() {\n this.bounds = this.inputElement.getBoundingClientRect();\n this.elementPositionX = this.bounds.left;\n this.elementPositionY = this.bounds.top;\n this.elementWidth = this.bounds.width;\n this.elementHeight = this.bounds.height;\n this.elementCenterX = this.elementWidth * this.originX;\n this.elementCenterY = this.elementHeight * this.originY;\n this.elementRangeX = Math.max(this.elementCenterX, this.elementWidth - this.elementCenterX);\n this.elementRangeY = Math.max(this.elementCenterY, this.elementHeight - this.elementCenterY);\n }\n }, {\n key: 'queueCalibration',\n value: function queueCalibration(delay) {\n clearTimeout(this.calibrationTimer);\n this.calibrationTimer = setTimeout(this.onCalibrationTimer, delay);\n }\n }, {\n key: 'enable',\n value: function enable() {\n if (this.enabled) {\n return;\n }\n this.enabled = true;\n\n if (this.orientationSupport) {\n this.portrait = false;\n window.addEventListener('deviceorientation', this.onDeviceOrientation);\n this.detectionTimer = setTimeout(this.onOrientationTimer, this.supportDelay);\n } else if (this.motionSupport) {\n this.portrait = false;\n window.addEventListener('devicemotion', this.onDeviceMotion);\n this.detectionTimer = setTimeout(this.onMotionTimer, this.supportDelay);\n } else {\n this.calibrationX = 0;\n this.calibrationY = 0;\n this.portrait = false;\n window.addEventListener('mousemove', this.onMouseMove);\n this.doReadyCallback();\n }\n\n window.addEventListener('resize', this.onWindowResize);\n this.raf = rqAnFr(this.onAnimationFrame);\n }\n }, {\n key: 'disable',\n value: function disable() {\n if (!this.enabled) {\n return;\n }\n this.enabled = false;\n\n if (this.orientationSupport) {\n window.removeEventListener('deviceorientation', this.onDeviceOrientation);\n } else if (this.motionSupport) {\n window.removeEventListener('devicemotion', this.onDeviceMotion);\n } else {\n window.removeEventListener('mousemove', this.onMouseMove);\n }\n\n window.removeEventListener('resize', this.onWindowResize);\n rqAnFr.cancel(this.raf);\n }\n }, {\n key: 'calibrate',\n value: function calibrate(x, y) {\n this.calibrateX = x === undefined ? this.calibrateX : x;\n this.calibrateY = y === undefined ? this.calibrateY : y;\n }\n }, {\n key: 'invert',\n value: function invert(x, y) {\n this.invertX = x === undefined ? this.invertX : x;\n this.invertY = y === undefined ? this.invertY : y;\n }\n }, {\n key: 'friction',\n value: function friction(x, y) {\n this.frictionX = x === undefined ? this.frictionX : x;\n this.frictionY = y === undefined ? this.frictionY : y;\n }\n }, {\n key: 'scalar',\n value: function scalar(x, y) {\n this.scalarX = x === undefined ? this.scalarX : x;\n this.scalarY = y === undefined ? this.scalarY : y;\n }\n }, {\n key: 'limit',\n value: function limit(x, y) {\n this.limitX = x === undefined ? this.limitX : x;\n this.limitY = y === undefined ? this.limitY : y;\n }\n }, {\n key: 'origin',\n value: function origin(x, y) {\n this.originX = x === undefined ? this.originX : x;\n this.originY = y === undefined ? this.originY : y;\n }\n }, {\n key: 'setInputElement',\n value: function setInputElement(element) {\n this.inputElement = element;\n this.updateDimensions();\n }\n }, {\n key: 'setPosition',\n value: function setPosition(element, x, y) {\n x = x.toFixed(this.precision) + 'px';\n y = y.toFixed(this.precision) + 'px';\n if (this.transform3DSupport) {\n helpers.css(element, 'transform', 'translate3d(' + x + ',' + y + ',0)');\n } else if (this.transform2DSupport) {\n helpers.css(element, 'transform', 'translate(' + x + ',' + y + ')');\n } else {\n element.style.left = x;\n element.style.top = y;\n }\n }\n }, {\n key: 'onOrientationTimer',\n value: function onOrientationTimer() {\n if (this.orientationSupport && this.orientationStatus === 0) {\n this.disable();\n this.orientationSupport = false;\n this.enable();\n } else {\n this.doReadyCallback();\n }\n }\n }, {\n key: 'onMotionTimer',\n value: function onMotionTimer() {\n if (this.motionSupport && this.motionStatus === 0) {\n this.disable();\n this.motionSupport = false;\n this.enable();\n } else {\n this.doReadyCallback();\n }\n }\n }, {\n key: 'onCalibrationTimer',\n value: function onCalibrationTimer() {\n this.calibrationFlag = true;\n }\n }, {\n key: 'onWindowResize',\n value: function onWindowResize() {\n this.updateDimensions();\n }\n }, {\n key: 'onAnimationFrame',\n value: function onAnimationFrame() {\n this.updateBounds();\n var calibratedInputX = this.inputX - this.calibrationX,\n calibratedInputY = this.inputY - this.calibrationY;\n if (Math.abs(calibratedInputX) > this.calibrationThreshold || Math.abs(calibratedInputY) > this.calibrationThreshold) {\n this.queueCalibration(0);\n }\n if (this.portrait) {\n this.motionX = this.calibrateX ? calibratedInputY : this.inputY;\n this.motionY = this.calibrateY ? calibratedInputX : this.inputX;\n } else {\n this.motionX = this.calibrateX ? calibratedInputX : this.inputX;\n this.motionY = this.calibrateY ? calibratedInputY : this.inputY;\n }\n this.motionX *= this.elementWidth * (this.scalarX / 100);\n this.motionY *= this.elementHeight * (this.scalarY / 100);\n if (!isNaN(parseFloat(this.limitX))) {\n this.motionX = helpers.clamp(this.motionX, -this.limitX, this.limitX);\n }\n if (!isNaN(parseFloat(this.limitY))) {\n this.motionY = helpers.clamp(this.motionY, -this.limitY, this.limitY);\n }\n this.velocityX += (this.motionX - this.velocityX) * this.frictionX;\n this.velocityY += (this.motionY - this.velocityY) * this.frictionY;\n for (var index = 0; index < this.layers.length; index++) {\n var layer = this.layers[index],\n depthX = this.depthsX[index],\n depthY = this.depthsY[index],\n xOffset = this.velocityX * (depthX * (this.invertX ? -1 : 1)),\n yOffset = this.velocityY * (depthY * (this.invertY ? -1 : 1));\n this.setPosition(layer, xOffset, yOffset);\n }\n this.raf = rqAnFr(this.onAnimationFrame);\n }\n }, {\n key: 'rotate',\n value: function rotate(beta, gamma) {\n // Extract Rotation\n var x = (beta || 0) / MAGIC_NUMBER,\n // -90 :: 90\n y = (gamma || 0) / MAGIC_NUMBER; // -180 :: 180\n\n // Detect Orientation Change\n var portrait = this.windowHeight > this.windowWidth;\n if (this.portrait !== portrait) {\n this.portrait = portrait;\n this.calibrationFlag = true;\n }\n\n if (this.calibrationFlag) {\n this.calibrationFlag = false;\n this.calibrationX = x;\n this.calibrationY = y;\n }\n\n this.inputX = x;\n this.inputY = y;\n }\n }, {\n key: 'onDeviceOrientation',\n value: function onDeviceOrientation(event) {\n var beta = event.beta;\n var gamma = event.gamma;\n if (beta !== null && gamma !== null) {\n this.orientationStatus = 1;\n this.rotate(beta, gamma);\n }\n }\n }, {\n key: 'onDeviceMotion',\n value: function onDeviceMotion(event) {\n var beta = event.rotationRate.beta;\n var gamma = event.rotationRate.gamma;\n if (beta !== null && gamma !== null) {\n this.motionStatus = 1;\n this.rotate(beta, gamma);\n }\n }\n }, {\n key: 'onMouseMove',\n value: function onMouseMove(event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n\n // reset input to center if hoverOnly is set and we're not hovering the element\n if (this.hoverOnly && (clientX < this.elementPositionX || clientX > this.elementPositionX + this.elementWidth || clientY < this.elementPositionY || clientY > this.elementPositionY + this.elementHeight)) {\n this.inputX = 0;\n this.inputY = 0;\n return;\n }\n\n if (this.relativeInput) {\n // Clip mouse coordinates inside element bounds.\n if (this.clipRelativeInput) {\n clientX = Math.max(clientX, this.elementPositionX);\n clientX = Math.min(clientX, this.elementPositionX + this.elementWidth);\n clientY = Math.max(clientY, this.elementPositionY);\n clientY = Math.min(clientY, this.elementPositionY + this.elementHeight);\n }\n // Calculate input relative to the element.\n if (this.elementRangeX && this.elementRangeY) {\n this.inputX = (clientX - this.elementPositionX - this.elementCenterX) / this.elementRangeX;\n this.inputY = (clientY - this.elementPositionY - this.elementCenterY) / this.elementRangeY;\n }\n } else {\n // Calculate input relative to the window.\n if (this.windowRadiusX && this.windowRadiusY) {\n this.inputX = (clientX - this.windowCenterX) / this.windowRadiusX;\n this.inputY = (clientY - this.windowCenterY) / this.windowRadiusY;\n }\n }\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n this.disable();\n\n clearTimeout(this.calibrationTimer);\n clearTimeout(this.detectionTimer);\n\n this.element.removeAttribute('style');\n for (var index = 0; index < this.layers.length; index++) {\n this.layers[index].removeAttribute('style');\n }\n\n delete this.element;\n delete this.layers;\n }\n }, {\n key: 'version',\n value: function version() {\n return '3.1.0';\n }\n }]);\n\n return Parallax;\n}();\n\nmodule.exports = Parallax;\n\n},{\"object-assign\":1,\"raf\":4}]},{},[5])(5)\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvb2JqZWN0LWFzc2lnbi9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9wZXJmb3JtYW5jZS1ub3cvbGliL3BlcmZvcm1hbmNlLW5vdy5qcyIsIm5vZGVfbW9kdWxlcy9wcm9jZXNzL2Jyb3dzZXIuanMiLCJub2RlX21vZHVsZXMvcmFmL2luZGV4LmpzIiwic3JjL3BhcmFsbGF4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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dGhpcy5lbGVtZW50Q2VudGVyWSkgLyB0aGlzLmVsZW1lbnRSYW5nZVlcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgLy8gQ2FsY3VsYXRlIGlucHV0IHJlbGF0aXZlIHRvIHRoZSB3aW5kb3cuXG4gICAgICBpZih0aGlzLndpbmRvd1JhZGl1c1ggJiYgdGhpcy53aW5kb3dSYWRpdXNZKSB7XG4gICAgICAgIHRoaXMuaW5wdXRYID0gKGNsaWVudFggLSB0aGlzLndpbmRvd0NlbnRlclgpIC8gdGhpcy53aW5kb3dSYWRpdXNYXG4gICAgICAgIHRoaXMuaW5wdXRZID0gKGNsaWVudFkgLSB0aGlzLndpbmRvd0NlbnRlclkpIC8gdGhpcy53aW5kb3dSYWRpdXNZXG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgZGVzdHJveSgpIHtcbiAgICB0aGlzLmRpc2FibGUoKVxuXG4gICAgY2xlYXJUaW1lb3V0KHRoaXMuY2FsaWJyYXRpb25UaW1lcilcbiAgICBjbGVhclRpbWVvdXQodGhpcy5kZXRlY3Rpb25UaW1lcilcblxuICAgIHRoaXMuZWxlbWVudC5yZW1vdmVBdHRyaWJ1dGUoJ3N0eWxlJylcbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5sYXllcnMubGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICB0aGlzLmxheWVyc1tpbmRleF0ucmVtb3ZlQXR0cmlidXRlKCdzdHlsZScpXG4gICAgfVxuXG4gICAgZGVsZXRlIHRoaXMuZWxlbWVudFxuICAgIGRlbGV0ZSB0aGlzLmxheWVyc1xuICB9XG5cbiAgdmVyc2lvbigpIHtcbiAgICByZXR1cm4gJzMuMS4wJ1xuICB9XG5cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBQYXJhbGxheFxuIl19\n","/*!\nWaypoints - 4.0.1\nCopyright © 2011-2016 Caleb Troughton\nLicensed under the MIT license.\nhttps://github.com/imakewebthings/waypoints/blob/master/licenses.txt\n*/\n(function() {\n 'use strict'\n\n var keyCounter = 0\n var allWaypoints = {}\n\n /* http://imakewebthings.com/waypoints/api/waypoint */\n function Waypoint(options) {\n if (!options) {\n throw new Error('No options passed to Waypoint constructor')\n }\n if (!options.element) {\n throw new Error('No element option passed to Waypoint constructor')\n }\n if (!options.handler) {\n throw new Error('No handler option passed to Waypoint constructor')\n }\n\n this.key = 'waypoint-' + keyCounter\n this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)\n this.element = this.options.element\n this.adapter = new Waypoint.Adapter(this.element)\n this.callback = options.handler\n this.axis = this.options.horizontal ? 'horizontal' : 'vertical'\n this.enabled = this.options.enabled\n this.triggerPoint = null\n this.group = Waypoint.Group.findOrCreate({\n name: this.options.group,\n axis: this.axis\n })\n this.context = Waypoint.Context.findOrCreateByElement(this.options.context)\n\n if (Waypoint.offsetAliases[this.options.offset]) {\n this.options.offset = Waypoint.offsetAliases[this.options.offset]\n }\n this.group.add(this)\n this.context.add(this)\n allWaypoints[this.key] = this\n keyCounter += 1\n }\n\n /* Private */\n Waypoint.prototype.queueTrigger = function(direction) {\n this.group.queueTrigger(this, direction)\n }\n\n /* Private */\n Waypoint.prototype.trigger = function(args) {\n if (!this.enabled) {\n return\n }\n if (this.callback) {\n this.callback.apply(this, args)\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy */\n Waypoint.prototype.destroy = function() {\n this.context.remove(this)\n this.group.remove(this)\n delete allWaypoints[this.key]\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable */\n Waypoint.prototype.disable = function() {\n this.enabled = false\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable */\n Waypoint.prototype.enable = function() {\n this.context.refresh()\n this.enabled = true\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/next */\n Waypoint.prototype.next = function() {\n return this.group.next(this)\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/previous */\n Waypoint.prototype.previous = function() {\n return this.group.previous(this)\n }\n\n /* Private */\n Waypoint.invokeAll = function(method) {\n var allWaypointsArray = []\n for (var waypointKey in allWaypoints) {\n allWaypointsArray.push(allWaypoints[waypointKey])\n }\n for (var i = 0, end = allWaypointsArray.length; i < end; i++) {\n allWaypointsArray[i][method]()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy-all */\n Waypoint.destroyAll = function() {\n Waypoint.invokeAll('destroy')\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable-all */\n Waypoint.disableAll = function() {\n Waypoint.invokeAll('disable')\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable-all */\n Waypoint.enableAll = function() {\n Waypoint.Context.refreshAll()\n for (var waypointKey in allWaypoints) {\n allWaypoints[waypointKey].enabled = true\n }\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/refresh-all */\n Waypoint.refreshAll = function() {\n Waypoint.Context.refreshAll()\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-height */\n Waypoint.viewportHeight = function() {\n return window.innerHeight || document.documentElement.clientHeight\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-width */\n Waypoint.viewportWidth = function() {\n return document.documentElement.clientWidth\n }\n\n Waypoint.adapters = []\n\n Waypoint.defaults = {\n context: window,\n continuous: true,\n enabled: true,\n group: 'default',\n horizontal: false,\n offset: 0\n }\n\n Waypoint.offsetAliases = {\n 'bottom-in-view': function() {\n return this.context.innerHeight() - this.adapter.outerHeight()\n },\n 'right-in-view': function() {\n return this.context.innerWidth() - this.adapter.outerWidth()\n }\n }\n\n window.Waypoint = Waypoint\n}())\n;(function() {\n 'use strict'\n\n function requestAnimationFrameShim(callback) {\n window.setTimeout(callback, 1000 / 60)\n }\n\n var keyCounter = 0\n var contexts = {}\n var Waypoint = window.Waypoint\n var oldWindowLoad = window.onload\n\n /* http://imakewebthings.com/waypoints/api/context */\n function Context(element) {\n this.element = element\n this.Adapter = Waypoint.Adapter\n this.adapter = new this.Adapter(element)\n this.key = 'waypoint-context-' + keyCounter\n this.didScroll = false\n this.didResize = false\n this.oldScroll = {\n x: this.adapter.scrollLeft(),\n y: this.adapter.scrollTop()\n }\n this.waypoints = {\n vertical: {},\n horizontal: {}\n }\n\n element.waypointContextKey = this.key\n contexts[element.waypointContextKey] = this\n keyCounter += 1\n if (!Waypoint.windowContext) {\n Waypoint.windowContext = true\n Waypoint.windowContext = new Context(window)\n }\n\n this.createThrottledScrollHandler()\n this.createThrottledResizeHandler()\n }\n\n /* Private */\n Context.prototype.add = function(waypoint) {\n var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'\n this.waypoints[axis][waypoint.key] = waypoint\n this.refresh()\n }\n\n /* Private */\n Context.prototype.checkEmpty = function() {\n var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)\n var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)\n var isWindow = this.element == this.element.window\n if (horizontalEmpty && verticalEmpty && !isWindow) {\n this.adapter.off('.waypoints')\n delete contexts[this.key]\n }\n }\n\n /* Private */\n Context.prototype.createThrottledResizeHandler = function() {\n var self = this\n\n function resizeHandler() {\n self.handleResize()\n self.didResize = false\n }\n\n this.adapter.on('resize.waypoints', function() {\n if (!self.didResize) {\n self.didResize = true\n Waypoint.requestAnimationFrame(resizeHandler)\n }\n })\n }\n\n /* Private */\n Context.prototype.createThrottledScrollHandler = function() {\n var self = this\n function scrollHandler() {\n self.handleScroll()\n self.didScroll = false\n }\n\n this.adapter.on('scroll.waypoints', function() {\n if (!self.didScroll || Waypoint.isTouch) {\n self.didScroll = true\n Waypoint.requestAnimationFrame(scrollHandler)\n }\n })\n }\n\n /* Private */\n Context.prototype.handleResize = function() {\n Waypoint.Context.refreshAll()\n }\n\n /* Private */\n Context.prototype.handleScroll = function() {\n var triggeredGroups = {}\n var axes = {\n horizontal: {\n newScroll: this.adapter.scrollLeft(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left'\n },\n vertical: {\n newScroll: this.adapter.scrollTop(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up'\n }\n }\n\n for (var axisKey in axes) {\n var axis = axes[axisKey]\n var isForward = axis.newScroll > axis.oldScroll\n var direction = isForward ? axis.forward : axis.backward\n\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey]\n if (waypoint.triggerPoint === null) {\n continue\n }\n var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint\n var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint\n var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint\n var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint\n if (crossedForward || crossedBackward) {\n waypoint.queueTrigger(direction)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n }\n }\n\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers()\n }\n\n this.oldScroll = {\n x: axes.horizontal.newScroll,\n y: axes.vertical.newScroll\n }\n }\n\n /* Private */\n Context.prototype.innerHeight = function() {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportHeight()\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerHeight()\n }\n\n /* Private */\n Context.prototype.remove = function(waypoint) {\n delete this.waypoints[waypoint.axis][waypoint.key]\n this.checkEmpty()\n }\n\n /* Private */\n Context.prototype.innerWidth = function() {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportWidth()\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerWidth()\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-destroy */\n Context.prototype.destroy = function() {\n var allWaypoints = []\n for (var axis in this.waypoints) {\n for (var waypointKey in this.waypoints[axis]) {\n allWaypoints.push(this.waypoints[axis][waypointKey])\n }\n }\n for (var i = 0, end = allWaypoints.length; i < end; i++) {\n allWaypoints[i].destroy()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-refresh */\n Context.prototype.refresh = function() {\n /*eslint-disable eqeqeq */\n var isWindow = this.element == this.element.window\n /*eslint-enable eqeqeq */\n var contextOffset = isWindow ? undefined : this.adapter.offset()\n var triggeredGroups = {}\n var axes\n\n this.handleScroll()\n axes = {\n horizontal: {\n contextOffset: isWindow ? 0 : contextOffset.left,\n contextScroll: isWindow ? 0 : this.oldScroll.x,\n contextDimension: this.innerWidth(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left',\n offsetProp: 'left'\n },\n vertical: {\n contextOffset: isWindow ? 0 : contextOffset.top,\n contextScroll: isWindow ? 0 : this.oldScroll.y,\n contextDimension: this.innerHeight(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up',\n offsetProp: 'top'\n }\n }\n\n for (var axisKey in axes) {\n var axis = axes[axisKey]\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey]\n var adjustment = waypoint.options.offset\n var oldTriggerPoint = waypoint.triggerPoint\n var elementOffset = 0\n var freshWaypoint = oldTriggerPoint == null\n var contextModifier, wasBeforeScroll, nowAfterScroll\n var triggeredBackward, triggeredForward\n\n if (waypoint.element !== waypoint.element.window) {\n elementOffset = waypoint.adapter.offset()[axis.offsetProp]\n }\n\n if (typeof adjustment === 'function') {\n adjustment = adjustment.apply(waypoint)\n }\n else if (typeof adjustment === 'string') {\n adjustment = parseFloat(adjustment)\n if (waypoint.options.offset.indexOf('%') > - 1) {\n adjustment = Math.ceil(axis.contextDimension * adjustment / 100)\n }\n }\n\n contextModifier = axis.contextScroll - axis.contextOffset\n waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)\n wasBeforeScroll = oldTriggerPoint < axis.oldScroll\n nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll\n triggeredBackward = wasBeforeScroll && nowAfterScroll\n triggeredForward = !wasBeforeScroll && !nowAfterScroll\n\n if (!freshWaypoint && triggeredBackward) {\n waypoint.queueTrigger(axis.backward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n else if (!freshWaypoint && triggeredForward) {\n waypoint.queueTrigger(axis.forward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {\n waypoint.queueTrigger(axis.forward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n }\n }\n\n Waypoint.requestAnimationFrame(function() {\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers()\n }\n })\n\n return this\n }\n\n /* Private */\n Context.findOrCreateByElement = function(element) {\n return Context.findByElement(element) || new Context(element)\n }\n\n /* Private */\n Context.refreshAll = function() {\n for (var contextId in contexts) {\n contexts[contextId].refresh()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-find-by-element */\n Context.findByElement = function(element) {\n return contexts[element.waypointContextKey]\n }\n\n window.onload = function() {\n if (oldWindowLoad) {\n oldWindowLoad()\n }\n Context.refreshAll()\n }\n\n\n Waypoint.requestAnimationFrame = function(callback) {\n var requestFn = window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n requestAnimationFrameShim\n requestFn.call(window, callback)\n }\n Waypoint.Context = Context\n}())\n;(function() {\n 'use strict'\n\n function byTriggerPoint(a, b) {\n return a.triggerPoint - b.triggerPoint\n }\n\n function byReverseTriggerPoint(a, b) {\n return b.triggerPoint - a.triggerPoint\n }\n\n var groups = {\n vertical: {},\n horizontal: {}\n }\n var Waypoint = window.Waypoint\n\n /* http://imakewebthings.com/waypoints/api/group */\n function Group(options) {\n this.name = options.name\n this.axis = options.axis\n this.id = this.name + '-' + this.axis\n this.waypoints = []\n this.clearTriggerQueues()\n groups[this.axis][this.name] = this\n }\n\n /* Private */\n Group.prototype.add = function(waypoint) {\n this.waypoints.push(waypoint)\n }\n\n /* Private */\n Group.prototype.clearTriggerQueues = function() {\n this.triggerQueues = {\n up: [],\n down: [],\n left: [],\n right: []\n }\n }\n\n /* Private */\n Group.prototype.flushTriggers = function() {\n for (var direction in this.triggerQueues) {\n var waypoints = this.triggerQueues[direction]\n var reverse = direction === 'up' || direction === 'left'\n waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)\n for (var i = 0, end = waypoints.length; i < end; i += 1) {\n var waypoint = waypoints[i]\n if (waypoint.options.continuous || i === waypoints.length - 1) {\n waypoint.trigger([direction])\n }\n }\n }\n this.clearTriggerQueues()\n }\n\n /* Private */\n Group.prototype.next = function(waypoint) {\n this.waypoints.sort(byTriggerPoint)\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n var isLast = index === this.waypoints.length - 1\n return isLast ? null : this.waypoints[index + 1]\n }\n\n /* Private */\n Group.prototype.previous = function(waypoint) {\n this.waypoints.sort(byTriggerPoint)\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n return index ? this.waypoints[index - 1] : null\n }\n\n /* Private */\n Group.prototype.queueTrigger = function(waypoint, direction) {\n this.triggerQueues[direction].push(waypoint)\n }\n\n /* Private */\n Group.prototype.remove = function(waypoint) {\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n if (index > -1) {\n this.waypoints.splice(index, 1)\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/first */\n Group.prototype.first = function() {\n return this.waypoints[0]\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/last */\n Group.prototype.last = function() {\n return this.waypoints[this.waypoints.length - 1]\n }\n\n /* Private */\n Group.findOrCreate = function(options) {\n return groups[options.axis][options.name] || new Group(options)\n }\n\n Waypoint.Group = Group\n}())\n;(function() {\n 'use strict'\n\n var $ = window.jQuery\n var Waypoint = window.Waypoint\n\n function JQueryAdapter(element) {\n this.$element = $(element)\n }\n\n $.each([\n 'innerHeight',\n 'innerWidth',\n 'off',\n 'offset',\n 'on',\n 'outerHeight',\n 'outerWidth',\n 'scrollLeft',\n 'scrollTop'\n ], function(i, method) {\n JQueryAdapter.prototype[method] = function() {\n var args = Array.prototype.slice.call(arguments)\n return this.$element[method].apply(this.$element, args)\n }\n })\n\n $.each([\n 'extend',\n 'inArray',\n 'isEmptyObject'\n ], function(i, method) {\n JQueryAdapter[method] = $[method]\n })\n\n Waypoint.adapters.push({\n name: 'jquery',\n Adapter: JQueryAdapter\n })\n Waypoint.Adapter = JQueryAdapter\n}())\n;(function() {\n 'use strict'\n\n var Waypoint = window.Waypoint\n\n function createExtension(framework) {\n return function() {\n var waypoints = []\n var overrides = arguments[0]\n\n if (framework.isFunction(arguments[0])) {\n overrides = framework.extend({}, arguments[1])\n overrides.handler = arguments[0]\n }\n\n this.each(function() {\n var options = framework.extend({}, overrides, {\n element: this\n })\n if (typeof options.context === 'string') {\n options.context = framework(this).closest(options.context)[0]\n }\n waypoints.push(new Waypoint(options))\n })\n\n return waypoints\n }\n }\n\n if (window.jQuery) {\n window.jQuery.fn.waypoint = createExtension(window.jQuery)\n }\n if (window.Zepto) {\n window.Zepto.fn.waypoint = createExtension(window.Zepto)\n }\n}())\n;","module.exports = jQuery;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*\r\n * MAIN SCRIPTS ENTRY FILE\r\n */\n\n// Dependencies\nrequire('slick-carousel');\nrequire('jquery-lazy');\nrequire('jquery-backstretch');\nrequire(\"jquery-ui/ui/tabbable.js\"); // imports a \":focusable\" selector from jQuery UI (we obviously don't want to )\nrequire(\"jquery-ui/ui/unique-id.js\"); // imports a function for generating unique ids (useful for accessibility when auto-ID'ing things for aria-controls labels)\nrequire(\"waypoints/lib/jquery.waypoints.js\"); // ToDo: revisit. it makes sense that we need the jquery build ... but not sure if the resolve alias is required in webpack.config.\n//require(\"waypoints/lib/shortcuts/sticky.js\");\nrequire('@fancyapps/fancybox/dist/jquery.fancybox.js');\nrequire('jquery.cookie');\n\n//require('sticky-kit/dist/sticky-kit.js');\n\n// Old bundle files which have not been changes to npm dependencies:\n//require(\"./src/ThirdParty/svg-inject.js\");\n//require(\"./src/ThirdParty/jquery.fancybox.min.js\"); // installed but not imported yet -- need to figure out CSS. For now still using this local copy\n\n// MAIN SCRIPTS\nrequire(\"./src/master.js\");\nrequire(\"./src/mobile-menu.js\");\n\n// Main Styles (moved here after Yarn 2 and Webpack 5 upgrade)\nrequire(\"../Styles/styles.js\");"],"names":[],"sourceRoot":""}