@visitscotland/component-library 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +1736 -0
  2. package/dist/client/fonts/fa-duotone-900.ttf +0 -0
  3. package/dist/client/fonts/fa-duotone-900.woff2 +0 -0
  4. package/dist/client/manifest.json +207 -210
  5. package/dist/client/scripts/2c9771b621321ebce2f1.js +1 -0
  6. package/dist/client/scripts/{87c81786aba52ad2c8de.js → 2ec96066459c23785cbe.js} +1 -1
  7. package/dist/client/scripts/{57f474f5e19eb8baccea.js → 317bf5d5727006b94afd.js} +1 -1
  8. package/dist/client/scripts/369660f549d80a83b319.js +1 -0
  9. package/dist/client/scripts/{ce05b548e362b5886d8d.js → 3f076d8e7a9978382389.js} +1 -1
  10. package/dist/client/scripts/54bee03d4647544c11f5.js +1 -0
  11. package/dist/client/scripts/{ce3e6734cb84e74451cd.js → 6207179e793d6e2f8d9e.js} +1 -1
  12. package/dist/client/scripts/62dee53b5ff29bcdf2a4.js +1 -0
  13. package/dist/client/scripts/{48d53e3631b7bf81ef29.js → 645e6203105968ad0f41.js} +1 -1
  14. package/dist/client/scripts/{4f262ff6d88d67a5edb0.js → 6fc9b98332d4c5c0030e.js} +1 -1
  15. package/dist/client/scripts/71e47f081f1872f4933e.js +1 -0
  16. package/dist/client/scripts/{31f9d972fa4753eaee60.js → 8e0a1eb35d5006bcaf29.js} +1 -1
  17. package/dist/client/scripts/8e3fa387146c24502ada.js +1 -0
  18. package/dist/client/scripts/{83e6099b792b76d2ee7f.js → 9101e0f2b766ea15df2e.js} +1 -1
  19. package/dist/client/scripts/9f065385334d4171c659.js +1 -0
  20. package/dist/client/scripts/adb997ae050ff11118c3.js +1 -0
  21. package/dist/client/scripts/b54e126bdfc77cdd9070.js +1 -0
  22. package/dist/client/scripts/{b6a50a2b854d09970111.js → bef607c592b6cb0a9124.js} +1 -1
  23. package/dist/client/scripts/c95930ffa2e73a2cc9f9.js +1 -0
  24. package/dist/client/scripts/cebe2ecd315979d611b4.js +1 -0
  25. package/dist/client/scripts/d98904f0243929183f90.js +1 -0
  26. package/dist/client/scripts/{31a2579101bbbb9e5f30.js → dd2e53bdbe88461c7844.js} +1 -1
  27. package/dist/client/scripts/{8751d1ac21308fc7e78b.js → ee1669cbdcce1bd4b354.js} +1 -1
  28. package/dist/client/scripts/{1ea58060bdd59b73f2cc.js → eeed4d3e9c67f63e7289.js} +1 -1
  29. package/dist/client/scripts/f20d9d2c0dba637ea47e.js +1 -0
  30. package/dist/client/scripts/{43310958bc4363082dd8.js → f35abe8b7b5ef124937e.js} +1 -1
  31. package/dist/client/scripts/{829fb548fb318cc6c227.js → f4970884abfc851ae32f.js} +1 -1
  32. package/dist/client/scripts/{8fc24289899913dd4b9c.js → fea0e33760eef6a2afcc.js} +1 -1
  33. package/dist/client/styles/{87c81786aba52ad2c8de.css → 2ec96066459c23785cbe.css} +1 -1
  34. package/dist/client/styles/3f076d8e7a9978382389.css +1 -0
  35. package/dist/client/styles/{c01ba1121e07f8275c28.css → 54bee03d4647544c11f5.css} +1 -1
  36. package/dist/client/styles/{ce3e6734cb84e74451cd.css → 6207179e793d6e2f8d9e.css} +1 -1
  37. package/dist/client/styles/{48d53e3631b7bf81ef29.css → 645e6203105968ad0f41.css} +1 -1
  38. package/dist/client/styles/{4f262ff6d88d67a5edb0.css → 6fc9b98332d4c5c0030e.css} +1 -1
  39. package/dist/client/styles/71e47f081f1872f4933e.css +1 -0
  40. package/dist/client/styles/{f304d9429842a3472c24.css → 8e3fa387146c24502ada.css} +1 -1
  41. package/dist/client/styles/{7f0830b7d5e434d7a977.css → a4bf5693a18f72023719.css} +1 -1
  42. package/dist/client/styles/{f03a2509e55a384da74a.css → b54e126bdfc77cdd9070.css} +1 -1
  43. package/dist/client/styles/{37a9f1240efe0ca78ea6.css → bd26b75ba38ccee0dc01.css} +2 -2
  44. package/dist/client/styles/{1ce57deef9f60d08e168.css → d98904f0243929183f90.css} +1 -1
  45. package/dist/client/styles/{31a2579101bbbb9e5f30.css → dd2e53bdbe88461c7844.css} +1 -1
  46. package/dist/client/styles/{70ed495c15ada9f41f04.css → ec0a9a2c688a656c0695.css} +1 -1
  47. package/dist/client/styles/{829fb548fb318cc6c227.css → f4970884abfc851ae32f.css} +1 -1
  48. package/dist/client/styles/third-party/_cludo-search-results.css +1 -1
  49. package/dist/client/styles/third-party/_font-awesome.css +2 -2
  50. package/dist/components/components/accordion/components/AccordionItem.vue.d.ts +1 -1
  51. package/dist/components/components/accordion/index.d.ts +1 -1
  52. package/dist/components/components/button/Button.vue.d.ts +2 -2
  53. package/dist/components/components/canned-search/CannedSearch.vue.d.ts +1 -1
  54. package/dist/components/components/canned-search/components/CannedSearchDuration.vue.d.ts +1 -1
  55. package/dist/components/components/canned-search/components/CannedSearchLogos.vue.d.ts +1 -1
  56. package/dist/components/components/canned-search/components/CannedSearchPrice.vue.d.ts +1 -1
  57. package/dist/components/components/canned-search/components/CannedSearchSummaryBox.vue.d.ts +1 -1
  58. package/dist/components/components/caption/Caption.vue.d.ts +260 -1
  59. package/dist/components/components/carbon-calculator/components/CarbonCalculatorResults.vue.d.ts +262 -1
  60. package/dist/components/components/carousel/Carousel.vue.d.ts +2 -2
  61. package/dist/components/components/carousel/components/CarouselSlide.vue.d.ts +3 -3
  62. package/dist/components/components/checkbox/Checkbox.vue.d.ts +2 -2
  63. package/dist/components/components/embed-wrapper/EmbedWrapper.vue.d.ts +1 -1
  64. package/dist/components/components/footer/components/FooterAccordionItem.vue.d.ts +1 -1
  65. package/dist/components/components/form/Form.vue.d.ts +2 -1
  66. package/dist/components/components/heading/Heading.vue.d.ts +1 -1
  67. package/dist/components/components/icon/Icon.vue.d.ts +1 -1
  68. package/dist/components/components/icon/index.d.ts +1 -1
  69. package/dist/components/components/image-with-caption/ImageWithCaption.vue.d.ts +6 -6
  70. package/dist/components/components/img/Img.vue.d.ts +11 -4
  71. package/dist/components/components/input/Input.vue.d.ts +2 -2
  72. package/dist/components/components/link/Link.vue.d.ts +1 -1
  73. package/dist/components/components/link-list/components/LinkListItem.vue.d.ts +12 -1
  74. package/dist/components/components/list/List.vue.d.ts +1 -1
  75. package/dist/components/components/mega-nav/MegaNav.vue.d.ts +282 -1
  76. package/dist/components/components/mega-nav/components/MegaNavDropdownContainer.vue.d.ts +1 -1
  77. package/dist/components/components/megalinks/Megalinks.vue.d.ts +1 -1
  78. package/dist/components/components/megalinks/components/megalink-link-list/MegalinkLinkList.vue.d.ts +5 -5
  79. package/dist/components/components/megalinks/components/megalink-multi-image/MegalinkMultiImage.vue.d.ts +5 -5
  80. package/dist/components/components/number-input/NumberInput.vue.d.ts +4 -4
  81. package/dist/components/components/radio-button/RadioButton.vue.d.ts +1 -1
  82. package/dist/components/components/select/Select.vue.d.ts +1 -1
  83. package/dist/components/components/ski-scotland/ski-scotland-status/SkiScotlandStatus.vue.d.ts +272 -1
  84. package/dist/components/components/stretched-link-card/StretchedLinkCard.vue.d.ts +26 -6
  85. package/dist/components/components/svg-link/SvgLink.vue.d.ts +2 -2
  86. package/dist/components/components/video/Video.vue.d.ts +1 -1
  87. package/dist/components/components/video-caption/VideoCaption.vue.d.ts +23 -3
  88. package/dist/components/icons.css +2 -2
  89. package/dist/components/mixins/verifyCookiesMixin.d.ts +1 -1
  90. package/dist/components/stores/map.store.d.ts +2 -2
  91. package/dist/components/stores/video.store.d.ts +1 -1
  92. package/dist/components/utils/breakpoints.d.ts +1 -1
  93. package/dist/components/vs-component-library.css +1 -1
  94. package/dist/components/vs-component-library.js +216 -181
  95. package/dist/components/vs-component-library.mjs +18289 -10977
  96. package/dist/ssr/fonts/fa-duotone-900.ttf +0 -0
  97. package/dist/ssr/fonts/fa-duotone-900.woff2 +0 -0
  98. package/dist/ssr/index.js +1 -1
  99. package/dist/ssr/manifest.json +1 -1
  100. package/dist/ssr/styles/{8d13415be9d7633cf1b5.css → f6729228ac24b0bedea4.css} +16 -16
  101. package/package.json +230 -231
  102. package/dist/client/scripts/1ce57deef9f60d08e168.js +0 -1
  103. package/dist/client/scripts/4a4ba7ebd4b744564fb1.js +0 -1
  104. package/dist/client/scripts/5d2e8fcc89de9881e3f0.js +0 -1
  105. package/dist/client/scripts/5e005447771fd3cd6b2b.js +0 -1
  106. package/dist/client/scripts/6cd0e09564354b3d5ff2.js +0 -1
  107. package/dist/client/scripts/86ef112affb6b291623a.js +0 -1
  108. package/dist/client/scripts/b9d33994c69b2a8de5fe.js +0 -1
  109. package/dist/client/scripts/ba790fc15aa9dd2a524f.js +0 -1
  110. package/dist/client/scripts/c01ba1121e07f8275c28.js +0 -1
  111. package/dist/client/scripts/ebfecb5cb9655ada3826.js +0 -1
  112. package/dist/client/scripts/ec98e9fccfc20586c905.js +0 -1
  113. package/dist/client/scripts/f03a2509e55a384da74a.js +0 -1
  114. package/dist/client/scripts/f304d9429842a3472c24.js +0 -1
  115. package/dist/client/scripts/ff019a30624b95c825db.js +0 -1
  116. package/dist/client/styles/ba790fc15aa9dd2a524f.css +0 -1
  117. package/dist/client/styles/ce05b548e362b5886d8d.css +0 -1
  118. package/dist/components/components/map/Map.vue.d.ts +0 -370
  119. package/dist/components/components/map/components/MapMarker.vue.d.ts +0 -87
  120. package/dist/components/components/map-marker-icon/MapMarkerIcon.vue.d.ts +0 -50
  121. package/dist/components/components/map-with-sidebar/MapWithSidebar.vue.d.ts +0 -366
  122. package/dist/components/components/map-with-sidebar/components/MapWithSidebarButtons.vue.d.ts +0 -39
  123. package/dist/components/components/map-with-sidebar/components/MapWithSidebarCategory.vue.d.ts +0 -57
  124. package/dist/components/components/map-with-sidebar/components/MapWithSidebarControls.vue.d.ts +0 -16
  125. package/dist/components/components/map-with-sidebar/components/MapWithSidebarDetail.vue.d.ts +0 -36
  126. package/dist/components/components/map-with-sidebar/components/MapWithSidebarListItem.vue.d.ts +0 -65
  127. package/dist/components/components/map-with-sidebar/components/MapWithSidebarPanel.vue.d.ts +0 -274
  128. package/dist/components/components/map-with-sidebar/components/MapWithSidebarSubcategory.vue.d.ts +0 -35
  129. package/dist/components/maps.css +0 -1
  130. package/dist/components/maps.js +0 -508
  131. package/dist/components/maps.mjs +0 -20815
  132. package/dist/components/v4-Dx4zqkIC.mjs +0 -7197
  133. package/dist/components/v4-tWlzORDj.js +0 -36
  134. package/dist/components/v4.css +0 -1
  135. /package/dist/client/scripts/{7f0830b7d5e434d7a977.js → a4bf5693a18f72023719.js} +0 -0
  136. /package/dist/client/scripts/{37a9f1240efe0ca78ea6.js → bd26b75ba38ccee0dc01.js} +0 -0
  137. /package/dist/client/scripts/{70ed495c15ada9f41f04.js → ec0a9a2c688a656c0695.js} +0 -0
  138. /package/dist/client/styles/{ec98e9fccfc20586c905.css → 2c9771b621321ebce2f1.css} +0 -0
  139. /package/dist/client/styles/{57f474f5e19eb8baccea.css → 317bf5d5727006b94afd.css} +0 -0
  140. /package/dist/client/styles/{b9d33994c69b2a8de5fe.css → 369660f549d80a83b319.css} +0 -0
  141. /package/dist/client/styles/{ebfecb5cb9655ada3826.css → 62dee53b5ff29bcdf2a4.css} +0 -0
  142. /package/dist/client/styles/{31f9d972fa4753eaee60.css → 8e0a1eb35d5006bcaf29.css} +0 -0
  143. /package/dist/client/styles/{5d2e8fcc89de9881e3f0.css → 9f065385334d4171c659.css} +0 -0
  144. /package/dist/client/styles/{ff019a30624b95c825db.css → adb997ae050ff11118c3.css} +0 -0
  145. /package/dist/client/styles/{5e005447771fd3cd6b2b.css → c95930ffa2e73a2cc9f9.css} +0 -0
  146. /package/dist/client/styles/{8751d1ac21308fc7e78b.css → ee1669cbdcce1bd4b354.css} +0 -0
  147. /package/dist/client/styles/{1ea58060bdd59b73f2cc.css → eeed4d3e9c67f63e7289.css} +0 -0
  148. /package/dist/client/styles/{4a4ba7ebd4b744564fb1.css → f20d9d2c0dba637ea47e.css} +0 -0
  149. /package/dist/client/styles/{8fc24289899913dd4b9c.css → fea0e33760eef6a2afcc.css} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4079],{74218:function(){},70146:function(t,e,o){"use strict";var i=o(64467),a=o(79122),s=o(35025),n=o(42904),r=o(18562),p=o(20641),u=o(53751),l=o(10810),d=o(79920),c=o(60842),m=o.n(c),h=o(25879),g=o.n(h),f=o(30681);function y(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}var v=null;e.A={name:"VsMap",status:"prototype",release:"0.0.1",components:{VsWarning:a.default,VsLoading:s.default},props:{overviewMapLatitude:{type:String,default:"57.81"},overviewMapLongitude:{type:String,default:"-5.51748"},overviewMapZoom:{type:String,default:"5"},mapId:{type:String,required:!0},isVisible:{type:Boolean,required:!0},places:{type:Array,required:!0},filters:{type:Array,default:function(){return[]}},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:Object,default:null},boundsData:{type:Object,default:function(){}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1},showMarkerPopups:{type:Boolean,default:!0}},setup:function(){v=(0,d.A)()},data:function(){return{isDesktop:!1,geojsonData:{type:"FeatureCollection",features:[]},polygons:{type:"FeatureCollection",features:[]},multiPolygons:[],mapbox:{map:null,bounds:null,rotation:0,config:{container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",pitchWithRotate:!1,dragRotate:!1}},markers:[],popup:null,hoveredStateId:null,activeStateId:null,showMapMessage:!0,isLoading:!0,showZoomMessage:null}},computed:function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?y(Object(o),!0).forEach((function(e){(0,i.A)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({getZoom:function(){return this.mapbox.map?this.mapbox.map.getZoom():null}},(0,l.aH)(d.A,{activeMarkerPostion:function(t){return this.mapbox.map?t.activeMarkerPos:null},highlightedPlace:function(t){return this.mapbox.map?t.getHoveredStop(this.mapId):null},activePlace:function(t){return this.mapbox.map?t.getActivePlace(this.mapId):null}})),watch:{isVisible:function(t){var e=this;t&&null!==this.mapbox.map&&setTimeout((function(){e.mapbox.map.resize()}),20)},places:{handler:function(){this.geojsonData.features=[],this.initialiseMapFeatures(),this.initialiseMapMarkers()},deep:!0},showPolygons:function(t){!0===t?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace:function(t){t&&(0===t.length?this.removeHoveredPolygon():"Point"!==t.geometry.type&&this.addHoveredPolygon(t))},selectedItem:function(t){t&&"Point"!==t.geometry.type&&this.polygons.features.filter((function(e){return e.properties.id===t.properties.id})).length>0&&this.addActivePolygon(t),t||this.removeActivePolygon()},activeMarkerPostion:function(t){this.checkPointIsVisible(t)||this.centreMapOnPoint(t)},showInfoMessage:function(t){this.showMapMessage=!!t},resetZoom:function(t){t&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted:function(){var t=this;v.addMapInstance({id:this.mapId,filters:this.filters,places:this.places,activePins:this.places}),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),window.addEventListener("DOMContentLoaded",(function(){n.A.init({div:t.mapId})}))},methods:{addMap:function(){var t=this,e=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new(m().Map)({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:e,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",(function(){t.mapbox.rotation=t.mapbox.map.transform.angle})),this.mapbox.map.resize(),this.mapbox.map.on("load",(function(){t.addMapPolygons(),t.showMapMessage=!1,t.isLoading=!1,t.$emit("map-ready",!0),t.mapbox.map.boxZoom.enable()})),this.mapbox.map.on("zoomend",(function(){4===t.mapbox.map.getZoom()?(t.showZoomMessage="too-far",t.showMapMessage=!0):18===t.mapbox.map.getZoom()?(t.showZoomMessage="too-close",t.showMapMessage=!0):t.showInfoMessage||(t.showZoomMessage=null,t.showMapMessage=!1)}))},addMapControls:function(){var t=new(m().NavigationControl);this.mapbox.map.addControl(t,"top-right"),this.mapbox.map.addControl(new(m().FullscreenControl))},initialiseMapFeatures:function(){var t=this;this.places.map((function(e){if(void 0!==e.geometry){var o=t.getCoordinateArray(e);return t.getMapFeatures(e,o)}return!(!e.latitude||!e.longitude)&&t.getItineraryMapFeatures(e)}))},getCoordinateArray:function(t){return"Polygon"===t.geometry.type?[t.geometry.coordinates[0]]:"MultiPolygon"===t.geometry.type?[t.geometry.coordinates]:[t.geometry.coordinates[0],t.geometry.coordinates[1]]},getMapFeatures:function(t,e){return this.geojsonData.features.push({type:"Feature",geometry:{type:t.geometry.type,coordinates:e},properties:{title:t.properties.title,imageSrc:t.image,type:void 0!==t.properties.category?t.properties.category.id:"",id:t.properties.id},id:t.properties.id})},getItineraryMapFeatures:function(t){var e=(0,r.A)();return this.geojsonData.features.push({type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(t.longitude),parseFloat(t.latitude)]},properties:{title:t.title,imageSrc:t.imageSrc,type:"itinerary-stop",stopCount:t.stopCount,id:e},id:e})},initialiseMapMarkers:function(){var t=this,e=0;this.initialLoad&&(e=1e3),setTimeout((function(){if(null!==t.markers){for(var e=t.markers.length-1;e>=0;e--)t.markers[e].remove();t.markers=[]}t.geojsonData.features.forEach((function(e){"Point"===e.geometry.type&&t.createMapMarker(e)}))}),e)},createMapMarker:function(t){var e=this,o=(0,p.h)(f.default,{feature:t,mapId:this.mapId,hasPopups:this.showMarkerPopups,onShowDetail:function(t){e.$emit("showDetail",t)},onSetCategory:function(t){e.$emit("setCategory",t)}}),i=document.createElement("div");this.$refs.mapboxOuter.appendChild(i),(0,u.render)(o,i),t&&this.showMarkerPopups&&this.addMapPopup(t);var a=new(m().Marker)(i.children[0]).setLngLat(t.geometry.coordinates).setPopup(this.popup).addTo(this.mapbox.map);this.setupMarkerListeners(a),this.markers.push(a),i.remove()},hideMapPolygons:function(){this.mapbox.map.setLayoutProperty("regionFills","visibility","none"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","none")},showMapPolygons:function(){this.mapbox.map.setLayoutProperty("regionFills","visibility","visible"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","visible")},addMapPolygons:function(){var t=this;this.geojsonData.features.forEach((function(e){"Polygon"===e.geometry.type?t.polygons.features.includes(e.properties.id)||t.polygons.features.push(e):"MultiPolygon"===e.geometry.type&&(t.polygons.features.includes(e.properties.id)||t.multiPolygons.push(e))})),this.multiPolygons.forEach((function(e){var o=e.properties;e.geometry.coordinates[0].forEach((function(e){t.polygons.features.push({geometry:{type:"Polygon",coordinates:e},id:o.id,properties:{id:o.id,imageSrc:o.imageSrc,title:o.title,type:o.type},type:"Feature"})}))})),this.polygons.features.length>0&&(this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regionFills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(168,48,140,0.5)",["==",["feature-state","interaction-state"],"active"],"rgba(168,48,140,0.5)","rgba(25,200,197,0.6)"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regionBorders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regionFills",(function(e){e.features.length>0&&(t.addMapPopup(e),t.removeHoveredPolygon(),t.addHoveredPolygon(e.features[0]))})),this.mapbox.map.on("mouseleave","regionFills",(function(e){t.removeMapPopup(e),t.removeHoveredPolygon()})),this.mapbox.map.on("click","regionFills",(function(e){t.removeActivePolygon(),t.addActivePolygon(e.features[0]),t.addMapPopup(e.features[0])})))},removeActivePolygon:function(){this.mapbox.map.style._layers.regionFills&&(this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null)},addActivePolygon:function(t){this.activeStateId=t.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),v.setActivePlace({mapId:this.mapId,activeFeature:t}),this.$emit("showDetail",t),this.$emit("setCategory","regions")},removeHoveredPolygon:function(){if(this.hoveredStateId){var t="";this.hoveredStateId===this.activeStateId&&(t="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":t})}v.setHoveredPlace({mapId:this.mapId,hoveredFeature:""}),this.hoveredStateId=null},addHoveredPolygon:function(t){this.hoveredStateId=t.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),this.addMapPopup(t),v.setHoveredPlace({mapId:this.mapId,hoveredFeature:t})},addMapPopup:function(t){var e;e=t.features?t.features[0]:t;var o=this.getCoordinates(e),i=this.getPopupHtml(e);e.properties.id&&(this.removeMapPopup(t),this.popup=new(m().Popup)({closeButton:!1,offset:{top:[0,20],bottom:[0,-40],left:[30,-20],right:[-30,-20]}}).setLngLat(o).setHTML(i).addTo(this.mapbox.map))},removeMapPopup:function(t){this.popup&&(this.popup.remove(),this.popup=null),t._popup&&t._popup.remove()},getCoordinates:function(t){return"Polygon"===t.geometry.type?this.findFeatureCentre(t.geometry.coordinates):"MultiPolygon"===t.geometry.type?this.findFeatureCentre(t.geometry.coordinates[0]):t.geometry.coordinates},findFeatureCentre:function(t){var e=[],o=[];return t[0].forEach((function(t){e.push(t[1]),o.push(t[0])})),{lat:(Math.min.apply(Math,e)+Math.max.apply(Math,e))/2,lng:(Math.min.apply(Math,o)+Math.max.apply(Math,o))/2}},getPopupHtml:function(t){return t.properties.imageSrc&&t.properties.stopCount?'\n <img class="vs-map__popup-image" src="'.concat(t.properties.imageSrc,'" />\n <div>\n <h4 class="vs-map__popup-subtitle">Stop ').concat(t.properties.stopCount,'</h4>\n <p class="vs-map__popup-title">').concat(t.properties.title,"</p>\n </div>\n "):'\n <p class="vs-map__popup-title">'.concat(t.properties.title,"</p>\n ")},setupMarkerListeners:function(t){var e=this;document.body.addEventListener("keyup",(function(o){"Escape"!==o.key&&"Tab"!==o.key||(e.removeMapPopup(t),e.showMarkerPopups&&v.setActivePlace({mapId:e.mapId,activeFeature:null}))})),t.getElement().addEventListener("keyup",(function(o){"Enter"===o.key&&(t._popup.isOpen()||t._popup.addTo(e.mapbox.map))}))},fitToBounds:function(){this.mapbox.map.fitBounds(g()(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent:function(){this.addMap(),this.addMapControls(),this.places.length&&this.initialiseMapFeatures(),this.geojsonData.features.length&&(this.initialiseMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent:function(){var t=this;m().supported({failIfMajorPerformanceCaveat:!0}),"IntersectionObserver"in window?(this.observer=new IntersectionObserver((function(e){e[0].intersectionRatio>0&&(t.observer.unobserve(t.$el),t.initialiseMapComponent())})),this.observer.observe(this.$el)):this.initialiseMapComponent()},onResize:function(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon:function(){var t=this.boundsData.coordinates[0];return t.reduce((function(t,e){return t.extend(e)}),new(m().LngLatBounds)(t[0],t[0]))},checkPointIsVisible:function(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint:function(t){this.mapbox.map.flyTo({center:t})},calculateBoundingBox:function(){var t;if(void 0===this.boundsData||"undefined"===this.boundsData.type)t=[[-7.555827,54.608836],[-.778285,60.880894]];else if("bounds"===this.boundsData.type){var e=new(m().LngLat)(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),o=new(m().LngLat)(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);t=new(m().LngLatBounds)(e,o)}else t="Polygon"===this.boundsData.type?this.getBoundsFromPolygon():[[-7.555827,54.608836],[-.778285,60.880894]];return t}}}},52374:function(t,e,o){"use strict";o.d(e,{X:function(){return l}});var i=o(20641),a=o(90033),s={class:"vs-map","data-test":"vs-map"},n={class:"vs-map__message-box"},r={class:"vs-map__message-text"},p={ref:"mapboxOuter",class:"vs-map__map-outer"},u=["id"];function l(t,e,o,l,d,c){var m=(0,i.g2)("VsLoading"),h=(0,i.g2)("VsWarning");return(0,i.uX)(),(0,i.CE)("div",s,[d.showMapMessage?((0,i.uX)(),(0,i.CE)("div",{key:0,class:(0,a.normalizeClass)(["vs-map__message",d.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[(0,i.Lk)("div",n,[d.isLoading?((0,i.uX)(),(0,i.Wv)(m,{key:0,class:"vs-map__loading"})):(0,i.Q3)("",!0),(0,i.Lk)("p",r,[d.isLoading?(0,i.RG)(t.$slots,"map-loading-text",{key:0}):o.showInfoMessage?(0,i.RG)(t.$slots,"info-message",{key:1}):"too-close"===d.showZoomMessage?(0,i.RG)(t.$slots,"zoom-too-close",{key:2}):"too-far"===d.showZoomMessage?(0,i.RG)(t.$slots,"zoom-too-far",{key:3}):(0,i.Q3)("",!0)])])],2)):(0,i.Q3)("",!0),(0,i.Lk)("div",p,[(0,i.Lk)("div",{id:o.mapId,class:"vs-map__map",ref:"mapbox"},null,8,u)],512),(0,i.bF)(h,{class:"vs-map__no-js"},{default:(0,i.k6)((function(){return[(0,i.RG)(t.$slots,"no-js")]})),_:3})])}},42904:function(t,e){"use strict";var o="";"undefined"!=typeof window&&(o=document.currentScript);var i={options:{div:"map",logo:"os-logo-maps",statement:"Contains OS data &copy; Crown copyright and database rights YYYY",prefix:"",suffix:""},init:function(t){if(""!==o){this.options.div=o.getAttribute("data-div")||this.options.div,this.options.logo=o.getAttribute("data-logo")||this.options.logo,this.options.statement=o.getAttribute("data-statement")||this.options.statement,this.options.prefix=o.getAttribute("data-prefix")||this.options.prefix,this.options.suffix=o.getAttribute("data-suffix")||this.options.suffix,t=void 0!==t?t:{},Object.assign(this.options,t);var e=document.getElementById(this.options.div),i="os-api-branding logo";"os-logo-maps-white"===this.options.logo&&(i="os-api-branding logo white");var a=this.options.statement;a=a.replace("YYYY",(new Date).getFullYear()),""!==this.options.prefix&&(a="".concat(this.options.prefix,"<span>|</span>").concat(a)),""!==this.options.suffix&&(a="".concat(a,"<span>|</span>").concat(this.options.suffix)),document.querySelectorAll("#".concat(this.options.div," .os-api-branding")).forEach((function(t){return t.remove()}));var s=document.createElement("div");s.className=i,e.appendChild(s);var n=document.createElement("div");n.className="os-api-branding copyright",n.innerHTML=a,e.appendChild(n)}}};e.A=i},20364:function(t,e,o){"use strict";var i=o(85072),a=o.n(i),s=o(97825),n=o.n(s),r=o(77659),p=o.n(r),u=o(55056),l=o.n(u),d=o(10540),c=o.n(d),m=o(41113),h=o.n(m),g=o(74218),f=o.n(g),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=n(),y.insertStyleElement=c(),a()(f(),y),f()&&f().locals&&f().locals},81610:function(t,e,o){"use strict";o.r(e);var i=o(77510),a=o(3878);o(66544);const s=(0,o(66262).A)(a.A,[["render",i.X]]);e.default=s},3878:function(t,e,o){"use strict";o.d(e,{A:function(){return i.A}});var i=o(70146)},77510:function(t,e,o){"use strict";o.d(e,{X:function(){return i.X}});var i=o(52374)},66544:function(t,e,o){"use strict";o(20364)},42634:function(){}}]);
@@ -1 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VsMegaNavDropdownContainer=e():t.VsMegaNavDropdownContainer=e()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[9205],{30980:function(){},2044:function(t,e,n){"use strict";var a=n(62329),o=n(45676),r=n(37511);e.A={name:"VsMegaNavDropdownContainer",status:"prototype",release:"0.1.0",components:{VsMegaNavDropdown:a.default,VsLink:o.default,LazyHydrationWrapper:r.A},props:{href:{type:String,default:""},ctaText:{type:String,default:""},align:{type:String,default:"top",validator:function(t){return t.match(/(left|bottom|top)/)}}},computed:{hasFeaturedItem:function(){return this.$slots["nav-featured-item"]&&this.$slots["nav-featured-item"]()},hasFeaturedItemLeft:function(){return this.$slots["nav-featured-item-left"]&&this.$slots["nav-featured-item-left"]()},hasFeaturedEvent:function(){return this.$slots["nav-featured-event"]&&this.$slots["nav-featured-event"]()},alignmentClass:function(){return"bottom"===this.align?"vs-mega-nav-dropdown-container__featured--bottom":""}}}},71802:function(t,e,n){"use strict";n.d(e,{X:function(){return d}});var a=n(20641),o=n(90033),r={class:"vs-mega-nav-dropdown-container","data-test":"vs-mega-nav-dropdown-container",ref:"menuToggle"},s=(0,a.Lk)("hr",{class:"vs-mega-nav-dropdown-container__divider"},null,-1),i={class:"vs-mega-nav-dropdown-container__columns-wrapper"},u={key:2,class:"vs-mega-nav-dropdown-container__featured-event","data-test":"vs-mega-nav-dropdown-container__featured-event"};function d(t,e,n,d,c,f){var l=(0,a.g2)("VsLink"),v=(0,a.g2)("VsMegaNavDropdown"),p=(0,a.g2)("LazyHydrationWrapper");return(0,a.uX)(),(0,a.CE)("li",r,[(0,a.bF)(p,{"on-interaction":["focus","click"]},{default:(0,a.k6)((function(){return[(0,a.bF)(v,{"menu-toggle-alt-text":"Toggle Menu"},{"button-content":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"button-content")]})),"cta-link":(0,a.k6)((function(){return[n.href&&n.ctaText?((0,a.uX)(),(0,a.Wv)(l,{key:0,href:n.href,role:"menuitem","data-test":"vs-mega-nav-dropdown-container__cta-link",class:"vs-mega-nav-dropdown-container__cta-link"},{default:(0,a.k6)((function(){return[(0,a.eW)((0,o.toDisplayString)(n.ctaText),1)]})),_:1},8,["href"])):(0,a.Q3)("",!0),s]})),"dropdown-content":(0,a.k6)((function(){return[(0,a.Lk)("div",i,[(0,a.RG)(t.$slots,"dropdown-content"),f.hasFeaturedItemLeft?((0,a.uX)(),(0,a.CE)("div",{key:0,class:(0,o.normalizeClass)(["vs-mega-nav-dropdown-container__featured vs-mega-nav-dropdown-container__featured--left",f.alignmentClass]),"data-test":"vs-mega-nav-dropdown-container__featured"},[(0,a.RG)(t.$slots,"nav-featured-item-left")],2)):(0,a.Q3)("",!0),f.hasFeaturedItem?((0,a.uX)(),(0,a.CE)("div",{key:1,class:(0,o.normalizeClass)(["vs-mega-nav-dropdown-container__featured",f.alignmentClass]),"data-test":"vs-mega-nav-dropdown-container__featured"},[(0,a.RG)(t.$slots,"nav-featured-item")],2)):(0,a.Q3)("",!0),f.hasFeaturedEvent?((0,a.uX)(),(0,a.CE)("div",u,[(0,a.RG)(t.$slots,"nav-featured-event")])):(0,a.Q3)("",!0)])]})),_:3})]})),_:3})],512)}},87434:function(t,e,n){"use strict";var a=n(85072),o=n.n(a),r=n(97825),s=n.n(r),i=n(77659),u=n.n(i),d=n(55056),c=n.n(d),f=n(10540),l=n.n(f),v=n(41113),p=n.n(v),m=n(30980),g=n.n(m),_={};_.styleTagTransform=p(),_.setAttributes=c(),_.insert=u().bind(null,"head"),_.domAPI=s(),_.insertStyleElement=l(),o()(g(),_),g()&&g().locals&&g().locals},62810:function(t,e,n){"use strict";n.r(e);var a=n(45962),o=n(69368);n(97566);const r=(0,n(66262).A)(o.A,[["render",a.X]]);e.default=r},69368:function(t,e,n){"use strict";n.d(e,{A:function(){return a.A}});var a=n(2044)},45962:function(t,e,n){"use strict";n.d(e,{X:function(){return a.X}});var a=n(71802)},97566:function(t,e,n){"use strict";n(87434)}},function(t){return t.O(0,[641,6262,7510,3751,4352,4467,7527,8086,810,7511,6422,8745,8836,8638,2368,7521,1438,5676,2329],(function(){return 62810,t(t.s=62810)})),t.O()}])}));
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[6618],{88353:function(){},58014:function(n,e,t){"use strict";var s=t(13838);e.A={name:"VsCannedSearchSubHeading",status:"prototype",release:"0.0.1",components:{VsHeading:s.default},props:{subHeading:{type:String,default:""},lineLimit:{type:Number,default:null,validator:function(n){return[1,2].includes(n)}}}}},62577:function(n,e,t){"use strict";t.d(e,{X:function(){return a}});var s=t(20641),i=t(90033);function a(n,e,t,a,r,u){var c=(0,s.g2)("VsHeading");return(0,s.uX)(),(0,s.Wv)(c,{level:"4",class:(0,i.normalizeClass)(["vs-canned-search-sub-heading",t.lineLimit?"vs-canned-search-sub-heading--lines-"+t.lineLimit:""]),"data-test":"vs-canned-search-sub-heading"},{default:(0,s.k6)((function(){return[(0,s.eW)((0,i.toDisplayString)(t.subHeading),1)]})),_:1},8,["class"])}},19527:function(n,e,t){"use strict";var s=t(85072),i=t.n(s),a=t(97825),r=t.n(a),u=t(77659),c=t.n(u),l=t(55056),o=t.n(l),d=t(10540),f=t.n(d),v=t(41113),b=t.n(v),p=t(88353),g=t.n(p),m={};m.styleTagTransform=b(),m.setAttributes=o(),m.insert=c().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=f(),i()(g(),m),g()&&g().locals&&g().locals},36618:function(n,e,t){"use strict";t.r(e);var s=t(62577),i=t(37186);t(41275);const a=(0,t(66262).A)(i.A,[["render",s.X]]);e.default=a},37186:function(n,e,t){"use strict";t.d(e,{A:function(){return s.A}});var s=t(58014)},41275:function(n,e,t){"use strict";t(19527)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[8836],{36905:function(){},5468:function(t,n,i){"use strict";var e=i(34352),a=i(46422),s=i(98745);n.A={name:"VsButton",status:"prototype",release:"0.0.1",components:{BButton:e.PF,VsIcon:a.default},mixins:[s.default],props:{href:{type:String,default:null},tabindex:{type:String,default:null},variant:{type:String,default:"primary",validator:function(t){return t.match(/(primary|secondary|transparent)/)}},size:{type:String,default:"md",validator:function(t){return t.match(/(sm|md|lg)/)}},animate:{type:Boolean,default:!0},onDark:{type:Boolean,default:!1},icon:{type:String,default:""},iconOrientation:{type:String,default:null,validator:function(t){return t.match(/(up|down|left|right)/)}},iconOnly:{type:Boolean,default:!1},iconWithText:{type:Boolean,default:!1},iconPosition:{type:String,default:"left",validator:function(t){return t.match(/(left|right)/)}}},data:function(){return{isAnimating:!1}},computed:{buttonClasses:function(){return[{"vs-button--animated":this.animate&&!this.iconOnly&&!this.iconWithText,"vs-button--is-animating":this.isAnimating,"vs-button--on-dark":this.onDark,"vs-button--icon-only":this.iconOnly,"vs-button--icon-with-text":this.iconWithText,"button-flex":this.icon&&!this.iconOnly&&!this.iconWithText,"vs-button--flex-reverse":"right"===this.iconPosition}]},iconClasses:function(){return[{"vs-icon--right":"right"===this.iconPosition,"vs-icon--left":"left"===this.iconPosition}]},calcIconSize:function(){switch(this.size){case"sm":return"xs";case"md":return"sm";default:return"md"}}},methods:{animateHandler:function(t){var n=this;this.isAnimating=!0,setTimeout((function(){n.isAnimating=!1}),1e3),null!==this.href&&(t.preventDefault(),this.trackLink(t))},tabbedIn:function(t){this.$emit("btnFocus",t)},trackLink:function(t){var n;n=this.href.includes("http")?"externalLinkDataEvent":"internalLinkDataEvent",this.createDataLayerObject(n,t,this.href),"#"!==this.href&&null!==this.href&&(window.location.href=this.href)}}}},90801:function(t,n,i){"use strict";i.d(n,{X:function(){return r}});var e=i(20641),a=i(53751),s=i(90033),o={class:"vs-button__text"};function r(t,n,i,r,u,c){var l=(0,e.g2)("VsIcon"),f=(0,e.g2)("BButton");return(0,e.uX)(),(0,e.Wv)(f,(0,e.v6)({variant:i.variant,href:i.href,tabindex:i.tabindex,class:["vs-button",c.buttonClasses],size:i.size},t.$attrs,{onClick:n[0]||(n[0]=function(t){return c.animateHandler(t)}),onKeyup:(0,a.withKeys)(c.tabbedIn,["tab"])}),{default:(0,e.k6)((function(){return[i.icon?((0,e.uX)(),(0,e.Wv)(l,{key:0,class:(0,s.normalizeClass)(["align-self-center",c.iconClasses]),name:i.icon,size:c.calcIconSize,padding:0,orientation:i.iconOrientation},null,8,["name","class","size","orientation"])):(0,e.Q3)("",!0),(0,e.Lk)("span",o,[(0,e.RG)(t.$slots,"default")])]})),_:3},16,["variant","href","tabindex","class","size","onKeyup"])}},33559:function(t,n,i){"use strict";var e=i(85072),a=i.n(e),s=i(97825),o=i.n(s),r=i(77659),u=i.n(r),c=i(55056),l=i.n(c),f=i(10540),h=i.n(f),d=i(41113),m=i.n(d),v=i(36905),p=i.n(v),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=u().bind(null,"head"),y.domAPI=o(),y.insertStyleElement=h(),a()(p(),y),p()&&p().locals&&p().locals},48836:function(t,n,i){"use strict";i.r(n);var e=i(71489),a=i(68176);i(34003);const s=(0,i(66262).A)(a.A,[["render",e.X]]);n.default=s},68176:function(t,n,i){"use strict";i.d(n,{A:function(){return e.A}});var e=i(5468)},71489:function(t,n,i){"use strict";i.d(n,{X:function(){return e.X}});var e=i(90801)},34003:function(t,n,i){"use strict";i(33559)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4900],{7202:function(){},7148:function(e,t,n){"use strict";var l=n(85072),a=n.n(l),o=n(97825),u=n.n(o),s=n(77659),r=n.n(s),i=n(55056),c=n.n(i),d=n(10540),v=n.n(d),m=n(41113),f=n.n(m),g=n(7202),p=n.n(g),b={};b.styleTagTransform=f(),b.setAttributes=c(),b.insert=r().bind(null,"head"),b.domAPI=u(),b.insertStyleElement=v(),a()(p(),b),p()&&p().locals&&p().locals},38300:function(e,t,n){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(17527),o=n(17527),u={class:"form-group vs-guest-selector","data-test":"vs-guest-selector"},s={class:"vs-guest-selector__label"},r=["disabled"],i={class:"visually-hidden"},c={class:"vs-guest-selector__button-row mb-3"},d={class:"d-flex justify-content-between"},v=["value","disabled"],m=["value","disabled"],f=n(17527),g=n(378),p=n(22831),b=l(n(26216)),_=l(n(48836));t.default=(0,a.defineComponent)({__name:"GuestSelector",props:{availability:{type:Boolean}},setup:function(e){var t=(0,g.getLabelText)("add_room_label","Add a Room","guests_rooms"),n=(0,g.getLabelText)("save_changes","Save","guests_rooms"),l=(0,f.ref)(2),a=(0,g.getLabelText)("guest","Guest","guests_rooms"),h=(0,g.getLabelText)("guests","Guests","guests_rooms"),C=(0,f.ref)(!1),k=(0,f.ref)(0),x=(0,f.ref)([{id:(0,p.v4)(),showRemoveBtn:!1,numberGroups:{adults:{minCount:1,maxCount:30,count:2,name:"r1a",unitLabel:(0,g.getLabelText)("adults","Adults","guests_rooms")},children:{minCount:0,maxCount:30,count:0,name:"r1children",unitLabel:(0,g.getLabelText)("children","Children","guests_rooms")},infants:{minCount:0,maxCount:30,count:0,name:"r1infants",unitLabel:(0,g.getLabelText)("infants","Infants","guests_rooms")}}}]),y=(0,f.ref)(1),L=(0,g.getLabelText)("room","Room","guests_rooms"),N=(0,g.getLabelText)("rooms","Rooms","guests_rooms"),T=(0,f.ref)(!1),V=(0,f.ref)(!1),B=function(){V.value=!1},w=function(){V.value=!V.value},E=function(){if(x.value.length<5){var e={id:(0,p.v4)(),showRemoveBtn:!0,numberGroups:{adults:{minCount:1,maxCount:30,count:1,name:"r"+(x.value.length+1)+"a",unitLabel:(0,g.getLabelText)("adults","Adults","guests_rooms")},children:{minCount:0,maxCount:30,count:0,name:"r"+(x.value.length+1)+"children",unitLabel:(0,g.getLabelText)("children","Children","guests_rooms")},infants:{minCount:0,maxCount:30,count:0,name:"r"+(x.value.length+1)+"infants",unitLabel:(0,g.getLabelText)("infants","Infants","guests_rooms")}}},t=x.value.slice();t.push(e),x.value=t,y.value=t.length,C.value=!0,l.value=l.value+1}},S=function(e,t,n){var a=x.value.findIndex((function(e){return e.id===n}));x.value.splice(a,1),y.value=x.value.length,T.value=!0,l.value=l.value-e,k.value=k.value-t,1===x.value.length&&(C.value=!1)},D=function(e,t,n){l.value="increase"===e?l.value+1:l.value-1,"adults"!==t&&(k.value="increase"===e?k.value+1:k.value-1);var a=x.value.findIndex((function(e){return e.id===n}));x.value[a].numberGroups[t].count="increase"===e?x.value[a].numberGroups[t].count+1:x.value[a].numberGroups[t].count-1};return function(e,f){return(0,o.openBlock)(),(0,o.createElementBlock)("div",u,[(0,o.createElementVNode)("span",s,(0,o.toDisplayString)((0,o.unref)(h)),1),(0,o.createElementVNode)("button",{tabIndex:"availability ? '0' : ''",class:"vs-guest-selector__trigger form-control vs-input",onClick:(0,o.withModifiers)(w,["prevent"]),disabled:!e.availability},[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(y.value)+" ",1),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(y.value>1?(0,o.unref)(N):(0,o.unref)(L)),1),(0,o.createTextVNode)(",  "),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(l.value)+" ",1),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(l.value>1?(0,o.unref)(h):(0,o.unref)(a)),1)],8,r),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["vs-guest-selector__modal",V.value?"vs-guest-selector__modal--visible":""])},[(0,o.createVNode)(_.default,{class:"align-self-end","data-test":"vs-guest-selector__close-btn",variant:"transparent",icon:"close-circle",size:"md","icon-only":"",onClick:(0,o.withModifiers)(B,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("span",i,(0,o.toDisplayString)((0,o.unref)(g.getLabelText)("close","Close","guests_rooms")),1)]})),_:1}),(0,o.createElementVNode)("div",c,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(x.value,(function(e,t){return(0,o.openBlock)(),(0,o.createBlock)(b.default,{key:e.id,name:"r"+(t+1),"show-remove-btn":C.value,"unit-label":(0,o.unref)(g.getLabelText)("room","Room","guests_rooms")+" "+(t+1),"unit-options":e,"unit-removed":T.value,onNumberChange:D,onOnRemove:S},null,8,["name","show-remove-btn","unit-label","unit-options","unit-removed"])})),128))]),(0,o.createElementVNode)("div",d,[x.value.length<5?((0,o.openBlock)(),(0,o.createBlock)(_.default,{key:0,variant:"secondary",class:"c-search__popup__btn-link me-2 align-self-start",onClick:(0,o.withModifiers)(E,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(t)),1)]})),_:1})):(0,o.createCommentVNode)("",!0),x.value.length<5?((0,o.openBlock)(),(0,o.createBlock)(_.default,{key:1,class:"c-search__popup__btn-link c-search__popup__btn-link--pull-right align-self-end",onClick:(0,o.withModifiers)(B,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(n)),1)]})),_:1})):(0,o.createCommentVNode)("",!0)])],2),x.value?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:0,type:"hidden",name:"rooms",id:"room-count",value:y.value,disabled:!e.availability},null,8,v)):(0,o.createCommentVNode)("",!0),x.value?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:1,type:"hidden",name:"guests",id:"guest-count",value:l.value,disabled:!e.availability},null,8,m)):(0,o.createCommentVNode)("",!0)])}}})},34900:function(e,t,n){"use strict";n.r(t);var l=n(21726),a={};for(var o in l)"default"!==o&&(a[o]=function(e){return l[e]}.bind(0,o));n.d(t,a),n(7688);const u=l.default;t.default=u},7688:function(e,t,n){"use strict";n(7148)},21726:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a.a}});var l=n(38300),a=n.n(l),o={};for(var u in l)"default"!==u&&(o[u]=function(e){return l[e]}.bind(0,u));n.d(t,o)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1718],{70054:function(){},71848:function(t,n,e){"use strict";var s=e(54448);n.A={name:"VsMegaNavTopMenu",status:"prototype",release:"0.1.0",components:{VsList:s.default}}},95108:function(t,n,e){"use strict";e.d(n,{X:function(){return u}});var s=e(20641);function u(t,n,e,u,r,a){var o=(0,s.g2)("VsList");return(0,s.uX)(),(0,s.Wv)(o,{unstyled:"",class:"vs-mega-nav-top-menu","data-test":"vs-mega-nav-top-menu"},{default:(0,s.k6)((function(){return[(0,s.RG)(t.$slots,"default")]})),_:3})}},86584:function(t,n,e){"use strict";var s=e(85072),u=e.n(s),r=e(97825),a=e.n(r),o=e(77659),i=e.n(o),c=e(55056),l=e.n(c),f=e(10540),d=e.n(f),v=e(41113),m=e.n(v),p=e(70054),A=e.n(p),_={};_.styleTagTransform=m(),_.setAttributes=l(),_.insert=i().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=d(),u()(A(),_),A()&&A().locals&&A().locals},61718:function(t,n,e){"use strict";e.r(n);var s=e(95108),u=e(65996);e(15812);const r=(0,e(66262).A)(u.A,[["render",s.X]]);n.default=r},65996:function(t,n,e){"use strict";e.d(n,{A:function(){return s.A}});var s=e(71848)},15812:function(t,n,e){"use strict";e(86584)}}]);
@@ -1 +0,0 @@
1
- .vs-social-share--module-list{display:none}.vs-social-share__popover{max-width:600px;width:96% !important;font-size:inherit;text-align:center;border:0;top:60px !important;left:unset !important;right:10px}.vs-social-share__popover .popover-arrow{display:none}.vs-social-share__popover.bs-popover-right{margin-left:0}.vs-social-share__popover .hidden-anchor{position:absolute;left:0;top:0;width:0px;height:0px;border:none;background:rgba(0,0,0,0) !important}.vs-social-share__popover .hidden-anchor:focus{outline:none;border:0}@media(min-width: 576px){.vs-social-share__popover{max-width:450px;width:450px !important;box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 2px 6px 2px rgba(0,0,0,.15);right:50px !important}}@media(min-width: 768px){.vs-social-share__popover{max-width:600px;width:600px !important;top:60px !important}}@media(min-width: 992px){.vs-social-share__popover{max-width:700px;width:700px !important}}@media(min-width: 1200px){.vs-social-share__popover{max-width:800px;width:800px !important}}.vs-social-share__popover .popover-body{padding:2rem .5rem}@media(min-width: 576px)and (max-width: 767.98px){.vs-social-share__popover .popover-body{padding:1rem 1.75rem 2rem}.vs-social-share__popover .popover-body .row{margin-right:-4px;margin-left:-4px}.vs-social-share__popover .popover-body .row>[class*=col-]{padding-right:4px;padding-left:4px}}@media(min-width: 768px){.vs-social-share__popover .popover-body{padding:3rem}}@media(min-width: 1200px){.vs-social-share__popover .popover-body{padding:3rem 6rem}}.vs-social-share__popover .popover-body h3.vs-heading{margin-bottom:3rem}.vs-social-share__header:focus{outline:none}.vs-social-share__close-btn{position:absolute;right:1rem;top:1rem}.no-js .vs-social-share--module-list{display:block}.no-js .vs-social-share__share-btn{display:none}.no-js .vs-social-share__popover{position:relative !important;display:block !important;opacity:1 !important;outline:0 !important}
@@ -1 +0,0 @@
1
- .vs-global-menu__dropdown .btn,.vs-global-menu__dropdown{position:initial;flex:auto;padding:0;background:rgba(0,0,0,0);border:none}.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle,.vs-global-menu__dropdown .btn-primary.dropdown-toggle{padding:.3rem .75rem;font-size:.75rem;align-items:center}.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active,.vs-global-menu__dropdown .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active{background:#fff;color:#200f2e}.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active:after,.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active .vs-icon,.vs-global-menu__dropdown .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active:after,.vs-global-menu__dropdown .btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active .vs-icon{color:#200f2e;transition:.2s color}.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle:focus,.vs-global-menu__dropdown .btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 2px #ffe45c inset}.vs-global-menu__dropdown .btn .btn-primary.dropdown-toggle:hover,.vs-global-menu__dropdown .btn-primary.dropdown-toggle:hover{background:#23014a}.vs-global-menu__dropdown .btn~.dropdown-menu,.vs-global-menu__dropdown~.dropdown-menu{min-width:auto;margin:0;background:#5b2487;max-height:0;overflow:hidden;opacity:0}@media(max-width: 991.98px){.vs-global-menu__dropdown .btn~.dropdown-menu,.vs-global-menu__dropdown~.dropdown-menu{width:100% !important}}.vs-global-menu__dropdown .btn~.dropdown-menu li:not(:last-of-type),.vs-global-menu__dropdown~.dropdown-menu li:not(:last-of-type){border-bottom:1px solid #fff}.vs-global-menu__dropdown .btn~.dropdown-menu li .dropdown-item,.vs-global-menu__dropdown~.dropdown-menu li .dropdown-item{font-size:.75rem;padding:.75rem;color:#fff;text-decoration:none;line-height:1}.vs-global-menu__dropdown .btn~.dropdown-menu li .dropdown-item:hover,.vs-global-menu__dropdown~.dropdown-menu li .dropdown-item:hover{background:#23014a}.vs-global-menu__dropdown .btn~.dropdown-menu li .dropdown-item:focus,.vs-global-menu__dropdown~.dropdown-menu li .dropdown-item:focus{background:#5b2487;box-shadow:0 0 0 2px #ffe45c inset}.vs-global-menu__dropdown .btn~.dropdown-menu.show,.vs-global-menu__dropdown~.dropdown-menu.show{max-height:500px;opacity:1;border:none;padding:0}.vs-global-menu__dropdown .btn .no-js,.vs-global-menu__dropdown .no-js{display:none}.no-js .vs-global-menu__dropdown~.dropdown-menu li{border-bottom:0}
@@ -1,370 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- /**
3
- * Starting latitude for map view
4
- */
5
- overviewMapLatitude: {
6
- type: StringConstructor;
7
- default: string;
8
- };
9
- /**
10
- * Starting longitude for map view
11
- */
12
- overviewMapLongitude: {
13
- type: StringConstructor;
14
- default: string;
15
- };
16
- /**
17
- * Starting zoom level for map view
18
- */
19
- overviewMapZoom: {
20
- type: StringConstructor;
21
- default: string;
22
- };
23
- /**
24
- * Unique ID for the map
25
- */
26
- mapId: {
27
- type: StringConstructor;
28
- required: true;
29
- };
30
- /**
31
- * Whether or not the map is visible
32
- * used for triggering resize
33
- */
34
- isVisible: {
35
- type: BooleanConstructor;
36
- required: true;
37
- };
38
- /**
39
- * Place data for markers
40
- */
41
- places: {
42
- type: ArrayConstructor;
43
- required: true;
44
- };
45
- /**
46
- * Category filters array
47
- */
48
- filters: {
49
- type: ArrayConstructor;
50
- default(): any[];
51
- };
52
- /**
53
- * Whether the map should fit to marker bounds
54
- */
55
- fitToMarkers: {
56
- type: BooleanConstructor;
57
- default: boolean;
58
- };
59
- /**
60
- * Whether the map should show regions polygons
61
- */
62
- showPolygons: {
63
- type: BooleanConstructor;
64
- default: boolean;
65
- };
66
- /**
67
- * The current selectdd item
68
- */
69
- selectedItem: {
70
- type: ObjectConstructor;
71
- default: any;
72
- };
73
- /**
74
- * Data to set map bounds
75
- */
76
- boundsData: {
77
- type: ObjectConstructor;
78
- default: () => void;
79
- };
80
- /** If the map should show an info message defined
81
- * a slot
82
- */
83
- showInfoMessage: {
84
- type: BooleanConstructor;
85
- default: any;
86
- };
87
- /**
88
- * Allows parent component to fire a reset zoom event
89
- */
90
- resetZoom: {
91
- type: BooleanConstructor;
92
- default: boolean;
93
- };
94
- /**
95
- * Turn popups off on map markers
96
- */
97
- showMarkerPopups: {
98
- type: BooleanConstructor;
99
- default: boolean;
100
- };
101
- }, void, {
102
- isDesktop: boolean;
103
- geojsonData: {
104
- type: string;
105
- features: any[];
106
- };
107
- polygons: {
108
- type: string;
109
- features: any[];
110
- };
111
- multiPolygons: any[];
112
- mapbox: {
113
- map: any;
114
- bounds: any;
115
- rotation: number;
116
- config: {
117
- container: unknown;
118
- style: string;
119
- pitchWithRotate: boolean;
120
- dragRotate: boolean;
121
- };
122
- };
123
- markers: any[];
124
- popup: any;
125
- hoveredStateId: any;
126
- activeStateId: any;
127
- showMapMessage: boolean;
128
- isLoading: boolean;
129
- showZoomMessage: any;
130
- }, {
131
- activeMarkerPostion: () => any;
132
- highlightedPlace: () => any;
133
- activePlace: () => any;
134
- getZoom(): any;
135
- }, {
136
- /**
137
- * Adds a mapbox map to the page
138
- */
139
- addMap(): void;
140
- /**
141
- * Adds mapbox map controls
142
- */
143
- addMapControls(): void;
144
- /**
145
- * Initialise features array for points & polygons
146
- */
147
- initialiseMapFeatures(): void;
148
- /**
149
- * Returns correct coordinates for points & polygons
150
- */
151
- getCoordinateArray(place: any): any[];
152
- /**
153
- * Returns object for a map feature
154
- * including points, polygons or multi-polygons
155
- */
156
- getMapFeatures(place: any, coordinateArray: any): number;
157
- /**
158
- * Returns object for itinerary points
159
- */
160
- getItineraryMapFeatures(place: any): number;
161
- /**
162
- * Initialise add map markers
163
- */
164
- initialiseMapMarkers(): void;
165
- /**
166
- * Creates a map marker component instance for a point
167
- * and appends it to the map
168
- */
169
- createMapMarker(feature: any): void;
170
- /**
171
- * Hide all polygons
172
- */
173
- hideMapPolygons(): void;
174
- /**
175
- * Show all polygons
176
- */
177
- showMapPolygons(): void;
178
- /**
179
- * Add polygons from data into map
180
- */
181
- addMapPolygons(): void;
182
- /**
183
- * Remove the current active polygon
184
- */
185
- removeActivePolygon(): void;
186
- /**
187
- * Add a new active polygon
188
- */
189
- addActivePolygon(feature: any): void;
190
- /**
191
- * Remove the current hovered polygon
192
- */
193
- removeHoveredPolygon(): void;
194
- /**
195
- * Add a hovered polygon
196
- */
197
- addHoveredPolygon(feature: any): void;
198
- /**
199
- * Add a map popup when feature is hovered
200
- */
201
- addMapPopup(feature: any): void;
202
- /**
203
- * Remove the popup from the map
204
- */
205
- removeMapPopup(marker: any): void;
206
- /**
207
- * Get coordinates to decide where to show popup
208
- */
209
- getCoordinates(feature: any): any;
210
- /**
211
- * Find the centre of a polygon to display popup
212
- */
213
- findFeatureCentre(markers: any): {
214
- lat: number;
215
- lng: number;
216
- };
217
- /**
218
- * Get correct popup html based on map feature type
219
- */
220
- getPopupHtml(feature: any): string;
221
- /**
222
- * Detect keyboard nav to toggle popup
223
- */
224
- setupMarkerListeners(marker: any): void;
225
- /**
226
- * Ensures map fits to bounds
227
- */
228
- fitToBounds(): void;
229
- /**
230
- * Initialises the map component
231
- */
232
- initialiseMapComponent(): void;
233
- /**
234
- * Initialises lazy loading
235
- */
236
- lazyloadMapComponent(): void;
237
- /**
238
- * Checks for window size on resize
239
- */
240
- onResize(): void;
241
- /**
242
- * Creates a map bounding object from polygon data
243
- */
244
- getBoundsFromPolygon(): any;
245
- /**
246
- * Check a marker is visible on the map
247
- */
248
- checkPointIsVisible(): any;
249
- /**
250
- * Reposition map to centre on point
251
- */
252
- centreMapOnPoint(coords: any): void;
253
- /**
254
- * Calculate bounding box depending on data provided
255
- */
256
- calculateBoundingBox(): any;
257
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
258
- /**
259
- * Starting latitude for map view
260
- */
261
- overviewMapLatitude: {
262
- type: StringConstructor;
263
- default: string;
264
- };
265
- /**
266
- * Starting longitude for map view
267
- */
268
- overviewMapLongitude: {
269
- type: StringConstructor;
270
- default: string;
271
- };
272
- /**
273
- * Starting zoom level for map view
274
- */
275
- overviewMapZoom: {
276
- type: StringConstructor;
277
- default: string;
278
- };
279
- /**
280
- * Unique ID for the map
281
- */
282
- mapId: {
283
- type: StringConstructor;
284
- required: true;
285
- };
286
- /**
287
- * Whether or not the map is visible
288
- * used for triggering resize
289
- */
290
- isVisible: {
291
- type: BooleanConstructor;
292
- required: true;
293
- };
294
- /**
295
- * Place data for markers
296
- */
297
- places: {
298
- type: ArrayConstructor;
299
- required: true;
300
- };
301
- /**
302
- * Category filters array
303
- */
304
- filters: {
305
- type: ArrayConstructor;
306
- default(): any[];
307
- };
308
- /**
309
- * Whether the map should fit to marker bounds
310
- */
311
- fitToMarkers: {
312
- type: BooleanConstructor;
313
- default: boolean;
314
- };
315
- /**
316
- * Whether the map should show regions polygons
317
- */
318
- showPolygons: {
319
- type: BooleanConstructor;
320
- default: boolean;
321
- };
322
- /**
323
- * The current selectdd item
324
- */
325
- selectedItem: {
326
- type: ObjectConstructor;
327
- default: any;
328
- };
329
- /**
330
- * Data to set map bounds
331
- */
332
- boundsData: {
333
- type: ObjectConstructor;
334
- default: () => void;
335
- };
336
- /** If the map should show an info message defined
337
- * a slot
338
- */
339
- showInfoMessage: {
340
- type: BooleanConstructor;
341
- default: any;
342
- };
343
- /**
344
- * Allows parent component to fire a reset zoom event
345
- */
346
- resetZoom: {
347
- type: BooleanConstructor;
348
- default: boolean;
349
- };
350
- /**
351
- * Turn popups off on map markers
352
- */
353
- showMarkerPopups: {
354
- type: BooleanConstructor;
355
- default: boolean;
356
- };
357
- }>>, {
358
- filters: unknown[];
359
- overviewMapLatitude: string;
360
- overviewMapLongitude: string;
361
- overviewMapZoom: string;
362
- fitToMarkers: boolean;
363
- showPolygons: boolean;
364
- selectedItem: Record<string, any>;
365
- boundsData: Record<string, any>;
366
- showInfoMessage: boolean;
367
- resetZoom: boolean;
368
- showMarkerPopups: boolean;
369
- }, {}>;
370
- export default _default;
@@ -1,87 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- /**
3
- * Details for the marker
4
- */
5
- feature: {
6
- type: ObjectConstructor;
7
- required: true;
8
- };
9
- /**
10
- * Id for the map - to be used with
11
- * the map store
12
- */
13
- mapId: {
14
- type: StringConstructor;
15
- required: true;
16
- };
17
- /**
18
- * If the map has enabled popups for markers
19
- */
20
- hasPopups: {
21
- type: BooleanConstructor;
22
- required: true;
23
- };
24
- /**
25
- * Selected place ID
26
- */
27
- selectedPlace: {
28
- type: StringConstructor;
29
- default: any;
30
- };
31
- }, void, any, {
32
- getMarkerIcon(): any;
33
- highlightedPlace: () => any;
34
- activePlace: () => any;
35
- activeSubcat: () => any;
36
- isActive(): boolean;
37
- }, {
38
- /**
39
- * Fires on click of the marker
40
- */
41
- markerClick(): void;
42
- /**
43
- * Fires on hover over the maker
44
- */
45
- handleHover(feature: any): void;
46
- /**
47
- * Sets up event listener to remove active
48
- * marker on map click
49
- */
50
- handleClickEvent(e: any): void;
51
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("showDetail" | "setCategory")[], "showDetail" | "setCategory", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
52
- /**
53
- * Details for the marker
54
- */
55
- feature: {
56
- type: ObjectConstructor;
57
- required: true;
58
- };
59
- /**
60
- * Id for the map - to be used with
61
- * the map store
62
- */
63
- mapId: {
64
- type: StringConstructor;
65
- required: true;
66
- };
67
- /**
68
- * If the map has enabled popups for markers
69
- */
70
- hasPopups: {
71
- type: BooleanConstructor;
72
- required: true;
73
- };
74
- /**
75
- * Selected place ID
76
- */
77
- selectedPlace: {
78
- type: StringConstructor;
79
- default: any;
80
- };
81
- }>> & {
82
- onShowDetail?: (...args: any[]) => any;
83
- onSetCategory?: (...args: any[]) => any;
84
- }, {
85
- selectedPlace: string;
86
- }, {}>;
87
- export default _default;
@@ -1,50 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- id: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- isHovered: {
7
- type: BooleanConstructor;
8
- default: boolean;
9
- };
10
- number: {
11
- type: StringConstructor;
12
- default: string;
13
- };
14
- isMapMarker: {
15
- type: BooleanConstructor;
16
- default: boolean;
17
- };
18
- }, any, any, {
19
- mapMarkerType(): string;
20
- parentClasses(): "" | "vs-map-marker-icon--map-marker";
21
- markerClasses(): string[];
22
- }, {}, {
23
- methods: {
24
- getIconDetails(name: any): {
25
- name: string;
26
- };
27
- };
28
- }, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
29
- id: {
30
- type: StringConstructor;
31
- required: true;
32
- };
33
- isHovered: {
34
- type: BooleanConstructor;
35
- default: boolean;
36
- };
37
- number: {
38
- type: StringConstructor;
39
- default: string;
40
- };
41
- isMapMarker: {
42
- type: BooleanConstructor;
43
- default: boolean;
44
- };
45
- }>>, {
46
- number: string;
47
- isMapMarker: boolean;
48
- isHovered: boolean;
49
- }, {}>;
50
- export default _default;