// //
Glasgow Live: Latest Glasgow News, sport, features and comment from the heart of the city // // 0&&void 0!==arguments[0]?arguments[0]:{},n=t.cmpId,r=void 0===n?1:n,i=t.cmpVersion,u=void 0===i?1:i,l=t.cookieVersion,s=void 0===l?1:l,d=t.vendorConsentData,p=t.publisherConsentData,h=t.vendorList,m=t.customPurposeList,g=t.pubVendorsList,v=t.allowedVendorIds;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o.call(this),this.persistedVendorConsentData=f(d),this.persistedPublisherConsentData=f(p),this.vendorConsentData=a({selectedPurposeIds:new Set,selectedVendorIds:new Set},d,{cookieVersion:s,cmpId:r,cmpVersion:u,consentLanguage:(0,c.findLocale)().substr(0,2).toUpperCase()}),this.publisherConsentData=a({selectedCustomPurposeIds:new Set},p,{cookieVersion:s,cmpId:r}),this.pubVendorsList=g,this.allowedVendorIds=new Set(v),this.isConsentToolShowing=!1,this.isFooterShowing=!1,this.updateVendorList(h),this.updateCustomPurposeList(m)},o=function(){var e=this;this.getVendorConsentsObject=function(t){var n=e.vendorList,r=void 0===n?{}:n,o=e.persistedVendorConsentData,i=void 0===o?{}:o,a=e.pubVendorsList,u=void 0===a?{}:a,l=e.allowedVendorIds,s=u.publisherVendorsVersion,c=u.globalVendorListVersion,f=i.cookieVersion,d=i.created,p=i.lastUpdated,h=i.cmpId,m=i.cmpVersion,g=i.consentScreen,v=i.consentLanguage,y=i.vendorListVersion,b=i.maxVendorId,w=void 0===b?0:b,x=i.selectedVendorIds,C=void 0===x?new Set:x,_=i.selectedPurposeIds,k=void 0===_?new Set:_,S=r.purposes,E=void 0===S?[]:S,T=r.vendors,P=void 0===T?[]:T,O={};if(t&&t.length)t.forEach(function(e){return O[e]=C.has(e)&&(!l.size||l.has(e))});else for(var I=Math.max.apply(Math,[w].concat(P.map(function(e){return e.id}),Array.from(C))),L=1;L<=I;L++)O[L]=C.has(L)&&(!l.size||l.has(L));for(var M=Math.max.apply(Math,E.map(function(e){return e.id}).concat(Array.from(k))),R={},N=1;N<=M;N++)R[N]=k.has(N);return{cookieVersion:f,created:d,lastUpdated:p,cmpId:h,cmpVersion:m,consentScreen:g,consentLanguage:v,publisherVendorsVersion:s,globalVendorListVersion:c,vendorListVersion:y,maxVendorId:w,purposeConsents:R,vendorConsents:O}},this.getPublisherConsentsObject=function(){for(var t=e.vendorList,n=void 0===t?{}:t,r=e.customPurposeList,o=void 0===r?{}:r,i=e.persistedPublisherConsentData,a=void 0===i?{}:i,u=e.persistedVendorConsentData,l=void 0===u?{}:u,s=a.cookieVersion,c=a.created,f=a.lastUpdated,d=a.cmpId,p=a.vendorListVersion,h=a.publisherPurposeVersion,m=a.selectedCustomPurposeIds,g=void 0===m?new Set:m,v=l.selectedPurposeIds,y=void 0===v?new Set:v,b=n.purposes,w=void 0===b?[]:b,x=o.purposes,C=void 0===x?[]:x,_=Math.max.apply(Math,w.map(function(e){return e.id}).concat(Array.from(y))),k=Math.max.apply(Math,C.map(function(e){return e.id}).concat(Array.from(y))),S={},E=1;E<=_;E++)S[E]=y.has(E);for(var T={},P=1;P<=k;P++)T[P]=g.has(P);return{cookieVersion:s,created:c,lastUpdated:f,cmpId:d,vendorListVersion:p,publisherPurposeVersion:h,standardPurposes:S,customPurposes:T}},this.persist=function(){var t=e.vendorConsentData,n=e.publisherConsentData,r=e.vendorList,o=e.customPurposeList,i=(r||{}).vendorListVersion,u=void 0===i?1:i,c=new Date;t.created=t.created||c,t.lastUpdated=c,t.vendorListVersion=u,n.created=n.created||c,n.lastUpdated=c,(0,l.writeVendorConsentCookie)(a({},t,{vendorList:r})),s.default.storePublisherData&&(0,l.writePublisherConsentCookie)(a({},t,n,{vendorList:r,customPurposeList:o})),e.persistedVendorConsentData=f(t),e.persistedPublisherConsentData=f(n),e.storeUpdate()},this.listeners=new Set,this.subscribe=function(t){e.listeners.add(t)},this.unsubscribe=function(t){e.listeners.delete(t)},this.storeUpdate=function(){e.listeners.forEach(function(t){return t(e)})},this.selectVendor=function(t,n){var r=e.vendorConsentData.selectedVendorIds;n?r.add(t):r.delete(t),e.storeUpdate()},this.selectAllVendors=function(t){var n=(e.vendorList||{}).vendors,r=t?"add":"delete";(void 0===n?[]:n).forEach(function(t){var n=t.id;return e.vendorConsentData.selectedVendorIds[r](n)}),e.storeUpdate()},this.selectPurpose=function(t,n){var r=e.vendorConsentData.selectedPurposeIds;n?r.add(t):r.delete(t),e.storeUpdate()},this.selectAllPurposes=function(t){var n=(e.vendorList||{}).purposes,r=t?"add":"delete";(void 0===n?[]:n).forEach(function(t){var n=t.id;return e.vendorConsentData.selectedPurposeIds[r](n)}),e.storeUpdate()},this.selectCustomPurpose=function(t,n){var r=e.publisherConsentData.selectedCustomPurposeIds;n?r.add(t):r.delete(t),e.storeUpdate()},this.selectAllCustomPurposes=function(t){var n=(e.customPurposeList||{}).purposes,r=t?"add":"delete";(void 0===n?[]:n).forEach(function(t){var n=t.id;return e.publisherConsentData.selectedCustomPurposeIds[r](n)}),e.storeUpdate()},this.toggleConsentToolShowing=function(t){e.isConsentToolShowing="boolean"==typeof t?t:!e.isConsentToolShowing,e.isFooterShowing=!1,e.storeUpdate()},this.toggleFooterShowing=function(t){e.isFooterShowing="boolean"==typeof t?t:!e.isFooterShowing,e.isConsentToolShowing=!1,e.storeUpdate()},this.updateVendorList=function(t){var n=e.pubVendorsList,r=void 0===n?{}:n,o=e.allowedVendorIds,i=e.vendorConsentData,a=i.created,u=i.maxVendorId,l=void 0===u?0:u;if(t){t.vendors&&o.size&&(t.vendors=t.vendors.filter(function(e){var t=e.id;return o.has(t)}));var s=r.publisherVendorsVersion;t.vendorListVersion=s?0:t.vendorListVersion}var c=t||{},f=c.vendors,d=void 0===f?[]:f,p=c.purposes,h=void 0===p?[]:p;a||(e.vendorConsentData.selectedPurposeIds=new Set(h.map(function(e){return e.id})),e.vendorConsentData.selectedVendorIds=new Set(d.map(function(e){return e.id})));var m=e.vendorConsentData.selectedVendorIds,g=void 0===m?new Set:m;e.vendorConsentData.maxVendorId=Math.max.apply(Math,[l].concat(d.map(function(e){return e.id}),Array.from(g))),e.vendorList=t,e.storeUpdate()},this.updateCustomPurposeList=function(t){if(!e.publisherConsentData.created){var n=(t||{}).purposes,r=void 0===n?[]:n;e.publisherConsentData.selectedCustomPurposeIds=new Set(r.map(function(e){return e.id}))}var o=(t||{}).version,i=void 0===o?1:o;e.publisherConsentData.publisherPurposeVersion=i,e.customPurposeList=t,e.storeUpdate()}},r);t.default=d},function(e,t){t.formatLocale=function(e){return"string"!=typeof e?e:e.split("-").slice(0,2).map(function(e,t){return 0!==t&&2===e.length?e.toUpperCase():e}).join("-")}},function(e,t,n){(function(e,r){var o=n(174).formatLocale;t.locale2=function(t){return o(function(t){return t||(e.chrome&&e.chrome.app&&"function"==typeof e.chrome.app.getDetails&&(t=e.chrome.app.getDetails())&&t.current_locale?t.current_locale:!(t=e.navigator&&(e.navigator.languages&&e.navigator.languages[0]||e.navigator.language||e.navigator.userLanguage))&&e.navigator&&e.navigator.userAgent&&(t=e.navigator.userAgent.match(/;.(\w+\-\w+)/i))?t[1]:(t||(t=(e.clientInformation||Object.create(null)).language),t||(e.Intl&&"function"==typeof e.Intl.DateTimeFormat&&(t=e.Intl.DateTimeFormat().resolvedOptions&&e.Intl.DateTimeFormat().resolvedOptions().locale),t||!["LANG","LANGUAGE"].some(Object.hasOwnProperty,r.env))?t:(r.env.LANG||r.env.LANGUAGE||String()).replace(/[.:].*/,"").replace("_","-")))}(t))}}).call(this,n(48),n(81))},function(e,t,n){e.exports=n(175).locale2()},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(177);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";var r=n(178);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;athis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ce,e.release=fe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),we=String.fromCharCode(32),xe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Ce=!1;function _e(e,t){switch(e){case"topKeyUp":return-1!==me.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1,Ee={eventTypes:xe,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ge)e:{switch(e){case"topCompositionStart":o=xe.compositionStart;break e;case"topCompositionEnd":o=xe.compositionEnd;break e;case"topCompositionUpdate":o=xe.compositionUpdate;break e}o=void 0}else Se?_e(e,n)&&(o=xe.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=xe.compositionStart);return o?(be&&(Se||o!==xe.compositionStart?o===xe.compositionEnd&&Se&&(i=ie()):(oe._root=r,oe._startText=ae(),Se=!0)),o=pe.getPooled(o,t,n,r),i?o.data=i:null!==(i=ke(n))&&(o.data=i),Z(o),i=o):i=null,(e=ye?function(e,t){switch(e){case"topCompositionEnd":return ke(t);case"topKeyPress":return 32!==t.which?null:(Ce=!0,we);case"topTextInput":return(e=t.data)===we&&Ce?null:e;default:return null}}(e,n):function(e,t){if(Se)return"topCompositionEnd"===e||!ge&&_e(e,t)?(e=ie(),oe._root=null,oe._startText=null,oe._fallbackText=null,Se=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1