@foeewni/web-core 2.2.8 → 2.2.11

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.
Binary file
Binary file
Binary file
@@ -1 +1 @@
1
- (()=>{"use strict";var t={1112:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},4639:t=>{function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t},t.exports.default=t.exports,t.exports.__esModule=!0},1230:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},6378:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},6395:(t,e,n)=>{var o=n(2861).default;function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=t[i]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},2861:t=>{function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},3800:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(1112)),a=o(n(4639)),i=o(n(3609)),s=o(n(9859)),l="bs.alert",c=".".concat(l),u=i.default.fn.alert,f="close".concat(c),d="closed".concat(c),p="click".concat(c).concat(".data-api"),h=function(){function t(e){(0,r.default)(this,t),this._element=e}return(0,a.default)(t,[{key:"close",value:function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}},{key:"dispose",value:function(){i.default.removeData(this._element,l),this._element=null}},{key:"_getRootElement",value:function(t){var e=s.default.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=(0,i.default)(t).closest(".".concat("alert"))[0]),n}},{key:"_triggerCloseEvent",value:function(t){var e=i.default.Event(f);return(0,i.default)(t).trigger(e),e}},{key:"_removeElement",value:function(t){var e=this;if((0,i.default)(t).removeClass("show"),(0,i.default)(t).hasClass("fade")){var n=s.default.getTransitionDurationFromElement(t);(0,i.default)(t).one(s.default.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)}},{key:"_destroyElement",value:function(t){(0,i.default)(t).detach().trigger(d).remove()}}],[{key:"VERSION",get:function(){return"4.6.0"}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,i.default)(this),o=n.data(l);o||(o=new t(this),n.data(l,o)),"close"===e&&o[e](this)}))}},{key:"_handleDismiss",value:function(t){return function(e){e&&e.preventDefault(),t.close(this)}}}]),t}();(0,i.default)(document).on(p,'[data-dismiss="alert"]',h._handleDismiss(new h)),i.default.fn.alert=h._jQueryInterface,i.default.fn.alert.Constructor=h,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=u,h._jQueryInterface};var g=h;e.default=g},6874:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2861)),a=o(n(1230)),i=o(n(1112)),s=o(n(4639)),l=o(n(3609)),c=o(n(9859));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d="scrollspy",p="bs.scrollspy",h=".".concat(p),g=l.default.fn[d],m={offset:10,method:"auto",target:""},v={offset:"number",method:"string",target:"(string|element)"},y="activate".concat(h),_="scroll".concat(h),w="load".concat(h).concat(".data-api"),b="active",k=".nav, .list-group",x=".nav-link",E=".list-group-item",O="position",T=function(){function t(e,n){var o=this;(0,i.default)(this,t),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector="".concat(this._config.target," ").concat(x,",")+"".concat(this._config.target," ").concat(E,",")+"".concat(this._config.target," ").concat(".dropdown-item"),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,(0,l.default)(this._scrollElement).on(_,(function(t){return o._process(t)})),this.refresh(),this._process()}return(0,s.default)(t,[{key:"refresh",value:function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":O,n="auto"===this._config.method?e:this._config.method,o=n===O?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=c.default.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[(0,l.default)(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))}},{key:"dispose",value:function(){l.default.removeData(this._element,p),(0,l.default)(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(t){if("string"!=typeof(t=f(f({},m),"object"===(0,r.default)(t)&&t?t:{})).target&&c.default.isElement(t.target)){var e=(0,l.default)(t.target).attr("id");e||(e=c.default.getUID(d),(0,l.default)(t.target).attr("id",e)),t.target="#".concat(e)}return c.default.typeCheckConfig(d,t,v),t}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_getOffsetHeight",value:function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}},{key:"_process",value:function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}}},{key:"_activate",value:function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return"".concat(e,'[data-target="').concat(t,'"],').concat(e,'[href="').concat(t,'"]')})),n=(0,l.default)([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(b),n.addClass(b)):(n.addClass(b),n.parents(k).prev("".concat(x,", ").concat(E)).addClass(b),n.parents(k).prev(".nav-item").children(x).addClass(b)),(0,l.default)(this._scrollElement).trigger(y,{relatedTarget:t})}},{key:"_clear",value:function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(b)})).forEach((function(t){return t.classList.remove(b)}))}}],[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return m}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,l.default)(this).data(p),o="object"===(0,r.default)(e)&&e;if(n||(n=new t(this,o),(0,l.default)(this).data(p,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),t}();(0,l.default)(window).on(w,(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=(0,l.default)(t[e]);T._jQueryInterface.call(n,n.data())}})),l.default.fn[d]=T._jQueryInterface,l.default.fn[d].Constructor=T,l.default.fn[d].noConflict=function(){return l.default.fn[d]=g,T._jQueryInterface};var S=T;e.default=S},9859:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(3609)),a="transitionend";function i(t){var e=this,n=!1;return(0,r.default)(this).one(s.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||s.triggerTransitionEnd(e)}),t),this}var s={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=(0,r.default)(t).css("transition-duration"),n=(0,r.default)(t).css("transition-delay"),o=parseFloat(e),a=parseFloat(n);return o||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){(0,r.default)(t).trigger(a)},supportsTransitionEnd:function(){return Boolean(a)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var r=n[o],a=e[o],i=a&&s.isElement(a)?"element":null==(l=a)?"".concat(l):{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(i))throw new Error("".concat(t.toUpperCase(),": ")+'Option "'.concat(o,'" provided type "').concat(i,'" ')+'but expected type "'.concat(r,'".'))}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?s.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===r.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};s.jQueryDetection(),r.default.fn.emulateTransitionEnd=i,r.default.event.special[s.TRANSITION_END]={bindType:a,delegateType:a,handle:function(t){if((0,r.default)(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l=s;e.default=l},3777:(t,e,n)=>{var o=n(2736),r=n(402),a=n(8055),i="localStorage"in n.g&&n.g.localStorage?n.g.localStorage:o;function s(t,e){return 1===arguments.length?l(t):c(t,e)}function l(t){var e=i.getItem(t);return r(e)}function c(t,e){try{return i.setItem(t,JSON.stringify(e)),!0}catch(t){return!1}}s.set=c,s.get=l,s.remove=function(t){return i.removeItem(t)},s.clear=function(){return i.clear()},s.backend=function(t){return t&&(i=t),i},s.on=a.on,s.off=a.off,t.exports=s},402:t=>{t.exports=function(t){var e=function(t){try{return JSON.parse(t)}catch(e){return t}}(t);return void 0===e?null:e}},2736:t=>{var e={};t.exports={getItem:function(t){return t in e?e[t]:null},setItem:function(t,n){return e[t]=n,!0},removeItem:function(t){return!!(t in e)&&delete e[t]},clear:function(){return e={},!0}}},8055:(t,e,n)=>{var o=n(402),r={};function a(t){t||(t=n.g.event);var e=r[t.key];e&&e.forEach((function(e){e(o(t.newValue),o(t.oldValue),t.url||t.uri)}))}t.exports={on:function(t,e){r[t]?r[t].push(e):r[t]=[e],n.g.addEventListener?n.g.addEventListener("storage",a,!1):n.g.attachEvent?n.g.attachEvent("onstorage",a):n.g.onstorage=a},off:function(t,e){var n=r[t];n.length>1?n.splice(n.indexOf(e),1):r[t]=[]}}},3829:(t,e,n)=>{var o,r,a;n(542),o=window.jQuery,r=o("#foe-secondary-nav"),a=o("#campaignnav-menu-items"),o(document).on("click","#js-foe-secondary-trigger",(function(){a.hasClass("collapsing")||(r.toggleClass("nav-open"),a.toggleClass("collapse"))}))},2851:(t,e,n)=>{var o=n(6378)(n(7957));n(9990),function(t){if(t("body").hasClass("foe-page-go-top")){var e=o.default.getScrollFromScreens(2),n=t('<a name="foe-go-top-anchor"></a>'),r=t('\n <a id="foe-go-top" href="#foe-go-top-anchor" title="Return to the top of the page">\n <i class="fas fa-arrow-alt-circle-up"></i>\n <span class="sr-only">Go to top</span>\n </a>\n ');n.prependTo("body"),r.appendTo("body");var a=function(){var t=o.default.getScrollTop();t>=e&&!r.hasClass("visible")&&r.addClass("visible"),t<e&&r.hasClass("visible")&&r.removeClass("visible")};t(window).on("scroll",a),t(window).on("resize",(function(){e=o.default.getScrollFromScreens(2),a()}))}}(window.jQuery)},5969:(t,e,n)=>{n(9766)},2981:()=>{!function(t){var e=/(\.jpg|\.gif|\.png|\.pdf|\.doc|\.docx|\.zip|\.tar|\.gz|\.rar|\.wav|\.mp4|\.giv|\.webm)$/gi;function n(t){var n=t.hostname,o=t.href;return n===window.location.hostname||n.match(/.*foe\.co\.uk/)||n.match(/.*foeshop\.co\.uk/)||n.match(/.*friendsoftheearth\.uk/)||n.match(/.*takeclimateaction\.uk/)?-1!==n.indexOf("act")?"Click to Campaignion":o.match(e)?"download-resource":"Click inbound":"Click outbound"}function o(t){return"".concat(t.textContent.trim()," | ").concat(t.href)}function r(){var t={};if(this.dataset.clickTrack)try{t=JSON.parse(this.dataset.clickTrack)}catch(t){console.warn("Warning: [data-click-track] attribute is not valid",t)}var e,r,a,i,s={eventCategory:(e=this,r="unknown","A"===e.tagName&&(r=e.className.match(/(foe-cta|btn)/)?"Link CTA":"Link Text"),r),eventAction:n(this),eventLabel:o(this)};this.dataset.clickTrack=JSON.stringify((a=s,i=t,Object.keys(i).forEach((function(t){a[t]=i[t]})),a))}t(document).ready((function(){t("a[href]").each(r)}))}(window.jQuery)},5264:(t,e,n)=>{n(4878),document.querySelectorAll("[data-defer-src]").forEach((function(t){var e=!1,n=t.dataset.deferSrc;t.classList.add("js-defer-is-loading"),t.addEventListener("load",(function(){t.hasAttribute("src")&&t.classList.remove("js-defer-is-loading")})),new IntersectionObserver((function(o){o.forEach((function(o){!e&&o.intersectionRatio>0&&(e=!0,t.src=n),t.hasAttribute("data-defer-dispose")&&e&&0===o.intersectionRatio&&(e=!1,t.removeAttribute("src"),t.classList.add("js-defer-is-loading"))}))})).observe(t)}))},1506:(t,e,n)=>{var o=n(6378)(n(7957));!function(t){function e(e){var n=this.hash,r=!1;if("A"===this.tagName)if(t(this).attr("data-scroll-to"))r=!0;else if("_blank"===this.target||window.location.hostname!==this.hostname||window.location.pathname.replace(/^\//,"")!==this.pathname.replace(/^\//,"")||""===n&&!this.dataset.scrollTo||this.search!==window.location.search)return;var a=/#.{2,}/.test(n)?t(n):t(t(this).attr("data-scroll-to"));if((a=a.length?a:t('[name="'.concat(n.substr(1),'"]'))).length){var i=o.default.getHeaderHeight(),s=parseInt(a.attr("data-scroll-to-padding")||20,10),l=a.offset().top-(i+s);if(t("body").hasClass("user-logged-in"))l-=t("#toolbar-bar").height()+t("#toolbar-item-administration-tray").height()+t(".tabs--primary").height();t("html, body").stop().animate({scrollTop:l},750,"swing"),r||e.preventDefault()}}t(document).on("click","a:not([data-scroll-to])",e),t(document).on("click","[data-scroll-to]",e),t(document).on("load",(function(){window.location.hash&&(setTimeout((function(){window.scrollTo(0,0)}),1),setTimeout((function(){t('[href="'.concat(window.location.hash,'"]')).click()}),1))}))}(window.jQuery)},2445:(t,e,n)=>{var o=n(6395),r=n(6378)(n(2861)),a=o(n(3777));!function(t){var e={analytics:{source:"utm_source",medium:"utm_medium",term:"utm_term",content:"utm_content",campaign:"utm_campaign"},internal:{source:["source",function(t){return t&&t.toUpperCase()}],source_code_first:["source",function(t,e){return e&&"string"==typeof e?e.toUpperCase():t&&"string"==typeof t?t.toUpperCase():null}],mailing:["utm_content",function(t){if(t){var e=t.split("_");if(e[1]&&0===e[1].indexOf("lm"))return e[1].toUpperCase()}return null}],activity_year:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d/)?t.replace(/^FY(\d\d)(\d\d).*$/,"$1/$2"):null}],activity_month:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d-\d\d/)?t.replace(/^FY\d\d\d\d-(\d\d).*$/,"$1"):null}]},other:["other","o"],refsid:"refsid",tags:["tags",function(e,n){return e?function(t){if(!t.length)return t;for(var e=t.sort((function(t,e){return t>=e?1:-1})),n=[e[0]],o=1;o<e.length;o++)e[o-1]!==e[o]&&n.push(e[o]);return n}(t.merge(n,e.split(","))):n||[]}]},n=function t(e,n,o){var a;switch((0,r.default)(e)){case"string":return e in n?n[e]:"string"==typeof o?o:null;case"object":if(Array.isArray(e)){for(var i=0,s=e.length;i<s;i++)if("string"==typeof e[i]&&e[i]in n){a=n[e[i]];break}return"function"==typeof e[e.length-1]&&(a=e[e.length-1](a,o)),null!=a?a:"string"==typeof o?o:null}return a={},Object.keys(e).forEach((function(r){var i=t(e[r],n,o[r]||{});a[r]=null!=i?i:null})),a;default:return null}};function o(t,e,n){return t[0]!==e&&t.unshift(e),Number.isInteger(n)&&t.length>n&&(t=t.slice(0,n)),t}function i(t){for(var e=document.getElementsByTagName("meta"),n=0;n<e.length;n++)if(e[n].getAttribute("name")===t)return e[n].getAttribute("content");return null}t(document).ready((function(){var r=Object.assign({history:[],tags:[],source_history:[]},a.get("foe_data"));r.user_id=r.user_id||function(t,e,n,o,r,a){for(n=1,o=r=0;a=t.charCodeAt(r++);o=(o+n)%65521)n=(n+a)%65521;return o<<16|n}(String(Math.random()+Date.now()));var s=function(){for(var t={},e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var o=e[n].split("="),r=o[0],a=o[1];t[r]=decodeURIComponent(a)}return t}(),l=window.location.origin||"".concat(window.location.protocol,"//").concat(window.location.hostname),c=n(e,s,r);Object.assign(r,c),void 0===r.external_referer&&(0!==document.referrer.indexOf(l)?r.external_referer=document.referrer:void 0!==s.external_referer&&0!==s.external_referer.indexOf(l)&&(r.external_referer=s.external_referer)),r.internal=r.internal||{},r.internal.topic=i("foe:topic"),r.internal.campaign=i("foe:campaign"),r.internal.page_type=i("foe:page-type"),r.nid=t("[data-nid]").attr("data-nid")||t('[id*="node"]').attr("id")||null,"string"==typeof r.nid&&(r.nid=r.nid.replace("node-",""));var u=t('input[data-form-prefill-write="source_code"]');if(u.length&&(void 0===r.internal.source_code_first&&(r.internal.source_code_first=u.val()),void 0===r.internal.source&&(r.internal.source=u.val())),r.history=o(r.history,window.location.href,10),"string"==typeof s.source){var f={source:s.source,timestamp:Date.now()};r.source_history=o(r.source_history,f,10)}r.version=3,document.cookie="source_code_first=".concat(r.internal.source_code_first,";"),null===r.internal.source||void 0!==sessionStorage.source_code_session&&"null"!==sessionStorage.source_code_session||sessionStorage.setItem("source_code_session",r.internal.source),function(e){var n=JSON.stringify(e),o=t('input[data-form-prefill-write="foe_additional_data"]'),r=t('input[name="submitted[foe_additional_data]"]')||t('input[name="foe_additional_data"]');o.length?o.val(n):r.val(n);var a=t('input[data-form-prefill-write="source_code_first"]');if(a.length&&"string"==typeof e.internal.source_code_first&&a.val(e.internal.source_code_first),void 0!==sessionStorage.source_code_session){var i=sessionStorage.getItem("source_code_session"),s=t('input[data-form-prefill-write="source_code_session"]');null!==i&&i.length&&"string"==typeof i&&s.val(i)}}(r),a.set("foe_data",r)}))}(window.jQuery)},4577:(t,e,n)=>{var o=n(6378)(n(2350));!function(){if(!(window.navigator.userAgent.indexOf("MSIE")>=0||/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.userAgent.match(/Trident.*rv:11\./))){var t={mobileBreak:parseInt(o.default["breakpoint-md"],10),list:[],number:0,stackTop:0,pageBottom:null,init:function(){t.stopObserving(),t.pageBottom&&t.pageBottom.parentNode.removeChild(t.pageBottom);for(var e=0;e<t.number;e++){var n=t.list[e],o=n.placeholder,r=n.element;o.parentNode.removeChild(o),t.removeClass(r,"stickystack-stuck"),r.style.position=null,r.style.top=null,r.style.left=null,r.style.width=null,r.style.marginTop=null,r.style.marginBottom=null}t.pageBottom=document.createElement("div"),t.pageBottom.style.height=0,t.pageBottom.style.width="100%",t.addClass(t.pageBottom,"js-stickystack"),document.body.appendChild(t.pageBottom),t.number=0;var a=document.getElementsByClassName("js-stickystack");if(window.innerWidth<=t.mobileBreak){for(var i=[],s=0;s<a.length;s++)t.hasClass(a[s],"js-stickystack-nomobile")||i.push(a[s]);a=i}t.number=a.length,t.list=[],t.stackTop=0;for(var l=0;l<t.number;l++){var c=window.getComputedStyle(a[l]),u=document.createElement("div");u.style.width=c.getPropertyValue("width"),u.style.height=c.getPropertyValue("height"),u.style.top=c.getPropertyValue("top"),u.style.right=c.getPropertyValue("right"),u.style.bottom=c.getPropertyValue("bottom"),u.style.left=c.getPropertyValue("left"),u.style.margin=c.getPropertyValue("margin"),u.style.padding=c.getPropertyValue("padding"),u.style.border=c.getPropertyValue("border"),u.style.float=c.getPropertyValue("float"),u.style.clear=c.getPropertyValue("clear"),u.style.position=c.getPropertyValue("position"),u.style.display="none",u.style.visibility="hidden",a[l].parentNode.insertBefore(u,a[l]);var f=t.getCoords(a[l]);t.list.push({element:a[l],top:f.top,left:f.left-parseFloat(c.getPropertyValue("margin-left")),width:parseFloat(c.getPropertyValue("width")),placeholder:u,semistuck:t.hasClass(a[l],"js-stickystack-semi"),zIndex:100-l})}t.list.sort(t.sortByTop),t.stackTop=0,a=document.getElementsByClassName("js-stickystack-top");for(var d=0;d<a.length;d++){var p=t.getCoords(a[d]).top;t.stackTop=0===d?p:Math.min(t.stackTop,p)}t.update(),t.startObserving()},update:function(){for(var e=[[t.stackTop,0,document.body.offsetWidth]],n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=0;o<t.number;o++){var r=t.list[o],a=r.element,i=r.placeholder,s=r.left,l=r.width,c=r.top-n,u=t.getOverlap([c,s,l],e);if(u.overlap>0){i.style.display="block",t.addClass(a,"stickystack-stuck");var f=0;if(t.list[o].semistuck&&o+1<t.number)for(var d=[[u.absolute+a.offsetHeight,s,l]],p=o+1;p<t.number;p++){var h=[t.list[p].top-n,t.list[p].left,t.list[p].width],g=t.getOverlap(h,d);if(g.overlap>0){f=g.overlap;break}}a.style.position="fixed",a.style.top="".concat(u.absolute-f,"px"),a.style.left="".concat(s,"px"),a.style.width="".concat(l,"px"),a.style.zIndex=r.zIndex,a.style.marginTop=0,a.style.marginBottom=0;var m=u.absolute+a.offsetHeight-f;e.push([m,a.offsetLeft,a.offsetWidth])}else t.removeClass(a,"stickystack-stuck"),a.style.position=null,a.style.top=null,a.style.left=null,a.style.width=null,a.style.zIndex=null,a.style.marginTop=null,a.style.marginBottom=null,i.style.display="none"}},startObserving:function(){},stopObserving:function(){},getOverlap:function(t,e){for(var n=0,o=0,r=0;r<e.length;r++)t[0]<e[r][0]&&t[1]+t[2]>e[r][1]&&e[r][1]+e[r][2]>t[1]&&(n=Math.max(n,e[r][0]-t[0]),o=Math.max(o,e[r][0]));return{overlap:n,absolute:o}},sortByTop:function(t,e){return t.top-e.top},getCoords:function(t){var e=t.getBoundingClientRect(),n=document,o=n.body,r=n.documentElement,a=window.pageYOffset||r.scrollTop||o.scrollTop,i=window.pageXOffset||r.scrollLeft||o.scrollLeft,s=r.clientTop||o.clientTop||0,l=r.clientLeft||o.clientLeft||0,c=e.top+a-s,u=e.left+i-l;return{top:Math.round(c),left:Math.round(u)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)".concat(e,"(\\s|$)")))},addClass:function(e,n){e.classList?e.classList.add(n):t.hasClass(e,n)||(e.className+=" ".concat(n))},removeClass:function(e,n){if(e.classList)e.classList.remove(n);else if(t.hasClass(e,n)){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));e.className=e.className.replace(o," ")}}};window.addEventListener("DOMContentLoaded",t.init),window.addEventListener("load",t.init),window.addEventListener("resize",t.init),window.addEventListener("scroll",t.update),window.addEventListener("touchmove",t.update),window.ontouchstart=function(){},window.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){t.update()}),500)})),window.addEventListener("load",(function(){setTimeout((function(){t.update()}),500)}))}}()},7957:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2350)),a={getScrollTop:function(){if(void 0!==window.pageYOffset)return window.pageYOffset;var t=document.body,e=document.documentElement;return(e=e.clientHeight?e:t).scrollTop},getHalfScrollTop:function(){return this.getScrollTop()+window.innerHeight/2},getDocumentHeight:function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},getScrollFromScreens:function(t){return this.getViewportHeight()*t},getScrollFromPerc:function(t){return this.getDocumentHeight()/100*t},getViewportHeight:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight)},elementInViewport:function(t){var e=(0,window.jQuery)(t).offset().top,n=e+t.clientHeight,o=this.getScrollTop(),r=this.getViewportHeight();return!(n<o||e-r>=o)},getCurrentBreakpoint:function(){var t=[];Object.keys(r.default).forEach((function(e){if(0===e.indexOf("breakpoint")){var n=e.replace("breakpoint-",""),o=parseInt(r.default[e],10);t.push({size:n,width:o})}}));for(var e=0;e<t.length-1&&window.innerWidth>=t[e+1].width;)e+=1;return t[e].size},getHeaderHeight:function(){var t=window.jQuery,e=this.getCurrentBreakpoint();return t(".foe-header").length?parseInt(r.default["foe-header-height-".concat(e)],10):0}};e.default=a},542:(t,e,n)=>{n.r(e)},6978:(t,e,n)=>{n.r(e)},1071:(t,e,n)=>{n.r(e)},9990:(t,e,n)=>{n.r(e)},8237:(t,e,n)=>{n.r(e)},7514:(t,e,n)=>{n.r(e)},2386:(t,e,n)=>{n.r(e)},9766:(t,e,n)=>{n.r(e)},4878:(t,e,n)=>{n.r(e)},6985:(t,e,n)=>{n.r(e)},3207:(t,e,n)=>{n.r(e)},2350:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={"breakpoint-xs":"0","breakpoint-sm":"576px","breakpoint-md":"768px","breakpoint-lg":"1024px","breakpoint-xl":"1366px","breakpoint-xxl":"1536px","container-xl":"1280px","container-xxl":"1420px","foe-header-height-xs":"60px","foe-header-height-sm":"60px","foe-header-height-md":"80px","foe-header-height-lg":"64px","foe-header-height-xl":"64px","foe-header-height-xxl":"64px"}},3609:t=>{t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(6985),n(3207),n(7514),n(1071),n(6978),n(3829),n(2851),n(5969),n(1506),n(2981),n(2445),n(5264),n(4577),n(8237),n(2386),n(9859),n(3800),n(6874),window.FoeWebcore&&window.FoeWebcore.critical||window.console.warn("You have loaded the main bundle without embedding the critical bundle first")})();
1
+ (()=>{"use strict";var t={1112:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},4639:t=>{function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t},t.exports.default=t.exports,t.exports.__esModule=!0},1230:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},6378:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},6395:(t,e,n)=>{var o=n(2861).default;function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=t[i]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},2861:t=>{function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},3800:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(1112)),a=o(n(4639)),i=o(n(3609)),s=o(n(9859)),l="bs.alert",c=".".concat(l),u=i.default.fn.alert,f="close".concat(c),d="closed".concat(c),p="click".concat(c).concat(".data-api"),h=function(){function t(e){(0,r.default)(this,t),this._element=e}return(0,a.default)(t,[{key:"close",value:function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}},{key:"dispose",value:function(){i.default.removeData(this._element,l),this._element=null}},{key:"_getRootElement",value:function(t){var e=s.default.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=(0,i.default)(t).closest(".".concat("alert"))[0]),n}},{key:"_triggerCloseEvent",value:function(t){var e=i.default.Event(f);return(0,i.default)(t).trigger(e),e}},{key:"_removeElement",value:function(t){var e=this;if((0,i.default)(t).removeClass("show"),(0,i.default)(t).hasClass("fade")){var n=s.default.getTransitionDurationFromElement(t);(0,i.default)(t).one(s.default.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)}},{key:"_destroyElement",value:function(t){(0,i.default)(t).detach().trigger(d).remove()}}],[{key:"VERSION",get:function(){return"4.6.0"}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,i.default)(this),o=n.data(l);o||(o=new t(this),n.data(l,o)),"close"===e&&o[e](this)}))}},{key:"_handleDismiss",value:function(t){return function(e){e&&e.preventDefault(),t.close(this)}}}]),t}();(0,i.default)(document).on(p,'[data-dismiss="alert"]',h._handleDismiss(new h)),i.default.fn.alert=h._jQueryInterface,i.default.fn.alert.Constructor=h,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=u,h._jQueryInterface};var g=h;e.default=g},6874:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2861)),a=o(n(1230)),i=o(n(1112)),s=o(n(4639)),l=o(n(3609)),c=o(n(9859));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d="scrollspy",p="bs.scrollspy",h=".".concat(p),g=l.default.fn[d],m={offset:10,method:"auto",target:""},v={offset:"number",method:"string",target:"(string|element)"},y="activate".concat(h),_="scroll".concat(h),w="load".concat(h).concat(".data-api"),b="active",k=".nav, .list-group",x=".nav-link",E=".list-group-item",O="position",T=function(){function t(e,n){var o=this;(0,i.default)(this,t),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector="".concat(this._config.target," ").concat(x,",")+"".concat(this._config.target," ").concat(E,",")+"".concat(this._config.target," ").concat(".dropdown-item"),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,(0,l.default)(this._scrollElement).on(_,(function(t){return o._process(t)})),this.refresh(),this._process()}return(0,s.default)(t,[{key:"refresh",value:function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":O,n="auto"===this._config.method?e:this._config.method,o=n===O?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=c.default.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[(0,l.default)(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))}},{key:"dispose",value:function(){l.default.removeData(this._element,p),(0,l.default)(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(t){if("string"!=typeof(t=f(f({},m),"object"===(0,r.default)(t)&&t?t:{})).target&&c.default.isElement(t.target)){var e=(0,l.default)(t.target).attr("id");e||(e=c.default.getUID(d),(0,l.default)(t.target).attr("id",e)),t.target="#".concat(e)}return c.default.typeCheckConfig(d,t,v),t}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_getOffsetHeight",value:function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}},{key:"_process",value:function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}}},{key:"_activate",value:function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return"".concat(e,'[data-target="').concat(t,'"],').concat(e,'[href="').concat(t,'"]')})),n=(0,l.default)([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(b),n.addClass(b)):(n.addClass(b),n.parents(k).prev("".concat(x,", ").concat(E)).addClass(b),n.parents(k).prev(".nav-item").children(x).addClass(b)),(0,l.default)(this._scrollElement).trigger(y,{relatedTarget:t})}},{key:"_clear",value:function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(b)})).forEach((function(t){return t.classList.remove(b)}))}}],[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return m}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,l.default)(this).data(p),o="object"===(0,r.default)(e)&&e;if(n||(n=new t(this,o),(0,l.default)(this).data(p,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),t}();(0,l.default)(window).on(w,(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=(0,l.default)(t[e]);T._jQueryInterface.call(n,n.data())}})),l.default.fn[d]=T._jQueryInterface,l.default.fn[d].Constructor=T,l.default.fn[d].noConflict=function(){return l.default.fn[d]=g,T._jQueryInterface};var j=T;e.default=j},9859:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(3609)),a="transitionend";function i(t){var e=this,n=!1;return(0,r.default)(this).one(s.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||s.triggerTransitionEnd(e)}),t),this}var s={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=(0,r.default)(t).css("transition-duration"),n=(0,r.default)(t).css("transition-delay"),o=parseFloat(e),a=parseFloat(n);return o||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){(0,r.default)(t).trigger(a)},supportsTransitionEnd:function(){return Boolean(a)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var r=n[o],a=e[o],i=a&&s.isElement(a)?"element":null==(l=a)?"".concat(l):{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(i))throw new Error("".concat(t.toUpperCase(),": ")+'Option "'.concat(o,'" provided type "').concat(i,'" ')+'but expected type "'.concat(r,'".'))}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?s.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===r.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};s.jQueryDetection(),r.default.fn.emulateTransitionEnd=i,r.default.event.special[s.TRANSITION_END]={bindType:a,delegateType:a,handle:function(t){if((0,r.default)(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l=s;e.default=l},3777:(t,e,n)=>{var o=n(2736),r=n(402),a=n(8055),i="localStorage"in n.g&&n.g.localStorage?n.g.localStorage:o;function s(t,e){return 1===arguments.length?l(t):c(t,e)}function l(t){var e=i.getItem(t);return r(e)}function c(t,e){try{return i.setItem(t,JSON.stringify(e)),!0}catch(t){return!1}}s.set=c,s.get=l,s.remove=function(t){return i.removeItem(t)},s.clear=function(){return i.clear()},s.backend=function(t){return t&&(i=t),i},s.on=a.on,s.off=a.off,t.exports=s},402:t=>{t.exports=function(t){var e=function(t){try{return JSON.parse(t)}catch(e){return t}}(t);return void 0===e?null:e}},2736:t=>{var e={};t.exports={getItem:function(t){return t in e?e[t]:null},setItem:function(t,n){return e[t]=n,!0},removeItem:function(t){return!!(t in e)&&delete e[t]},clear:function(){return e={},!0}}},8055:(t,e,n)=>{var o=n(402),r={};function a(t){t||(t=n.g.event);var e=r[t.key];e&&e.forEach((function(e){e(o(t.newValue),o(t.oldValue),t.url||t.uri)}))}t.exports={on:function(t,e){r[t]?r[t].push(e):r[t]=[e],n.g.addEventListener?n.g.addEventListener("storage",a,!1):n.g.attachEvent?n.g.attachEvent("onstorage",a):n.g.onstorage=a},off:function(t,e){var n=r[t];n.length>1?n.splice(n.indexOf(e),1):r[t]=[]}}},3829:(t,e,n)=>{var o,r,a;n(542),o=window.jQuery,r=o("#foe-secondary-nav"),a=o("#campaignnav-menu-items"),o(document).on("click","#js-foe-secondary-trigger",(function(){a.hasClass("collapsing")||(r.toggleClass("nav-open"),a.toggleClass("collapse"))}))},2851:(t,e,n)=>{var o=n(6378)(n(7957));n(9990),function(t){if(t("body").hasClass("foe-page-go-top")){var e=o.default.getScrollFromScreens(2),n=t('<a name="foe-go-top-anchor"></a>'),r=t('\n <a id="foe-go-top" href="#foe-go-top-anchor" title="Return to the top of the page">\n <i class="fas fa-arrow-alt-circle-up"></i>\n <span class="sr-only">Go to top</span>\n </a>\n ');n.prependTo("body"),r.appendTo("body");var a=function(){var t=o.default.getScrollTop();t>=e&&!r.hasClass("visible")&&r.addClass("visible"),t<e&&r.hasClass("visible")&&r.removeClass("visible")};t(window).on("scroll",a),t(window).on("resize",(function(){e=o.default.getScrollFromScreens(2),a()}))}}(window.jQuery)},5969:(t,e,n)=>{n(9766)},2981:()=>{!function(t){var e=/(\.jpg|\.gif|\.png|\.pdf|\.doc|\.docx|\.zip|\.tar|\.gz|\.rar|\.wav|\.mp4|\.giv|\.webm)$/gi;function n(t){var n=t.hostname,o=t.href;return n===window.location.hostname||n.match(/.*foe\.co\.uk/)||n.match(/.*foeshop\.co\.uk/)||n.match(/.*friendsoftheearth\.uk/)||n.match(/.*takeclimateaction\.uk/)?-1!==n.indexOf("act")?"Click to Campaignion":o.match(e)?"download-resource":"Click inbound":"Click outbound"}function o(t){return"".concat(t.textContent.trim()," | ").concat(t.href)}function r(){var t={};if(this.dataset.clickTrack)try{t=JSON.parse(this.dataset.clickTrack)}catch(t){console.warn("Warning: [data-click-track] attribute is not valid",t)}var e,r,a,i,s={eventCategory:(e=this,r="unknown","A"===e.tagName&&(r=e.className.match(/(foe-cta|btn)/)?"Link CTA":"Link Text"),r),eventAction:n(this),eventLabel:o(this)};this.dataset.clickTrack=JSON.stringify((a=s,i=t,Object.keys(i).forEach((function(t){a[t]=i[t]})),a))}t(document).ready((function(){t("a[href]").each(r)}))}(window.jQuery)},5264:(t,e,n)=>{n(4878),document.querySelectorAll("[data-defer-src]").forEach((function(t){var e=!1,n=t.dataset.deferSrc;t.classList.add("js-defer-is-loading"),t.addEventListener("load",(function(){t.classList.remove("js-defer-is-loading")})),new IntersectionObserver((function(o){o.forEach((function(o){!e&&o.intersectionRatio>0&&(e=!0,"IFRAME"===t.tagName?t.contentWindow.location.replace(n):t.src=n),t.hasAttribute("data-defer-dispose")&&e&&0===o.intersectionRatio&&(e=!1,"IFRAME"===t.tagName?t.contentWindow.location.replace("about:blank"):t.removeAttribute("src"),t.classList.add("js-defer-is-loading"))}))})).observe(t)}))},1506:(t,e,n)=>{var o=n(6378)(n(7957));!function(t){function e(e){var n=this.hash,r=!1;if("A"===this.tagName)if(t(this).attr("data-scroll-to"))r=!0;else if("_blank"===this.target||window.location.hostname!==this.hostname||window.location.pathname.replace(/^\//,"")!==this.pathname.replace(/^\//,"")||""===n&&!this.dataset.scrollTo||this.search!==window.location.search)return;var a=/#.{2,}/.test(n)?t(n):t(t(this).attr("data-scroll-to"));if((a=a.length?a:t('[name="'.concat(n.substr(1),'"]'))).length){var i=o.default.getHeaderHeight(),s=parseInt(a.attr("data-scroll-to-padding")||20,10),l=a.offset().top-(i+s);if(t("body").hasClass("user-logged-in"))l-=t("#toolbar-bar").height()+t("#toolbar-item-administration-tray").height()+t(".tabs--primary").height();t("html, body").stop().animate({scrollTop:l},750,"swing"),r||e.preventDefault()}}t(document).on("click","a:not([data-scroll-to])",e),t(document).on("click","[data-scroll-to]",e),t(document).on("load",(function(){window.location.hash&&(setTimeout((function(){window.scrollTo(0,0)}),1),setTimeout((function(){t('[href="'.concat(window.location.hash,'"]')).click()}),1))}))}(window.jQuery)},2445:(t,e,n)=>{var o=n(6395),r=n(6378)(n(2861)),a=o(n(3777));!function(t){var e=18e5;var n={analytics:{source:"utm_source",medium:"utm_medium",term:"utm_term",content:"utm_content",campaign:"utm_campaign"},internal:{source:["source",function(t){return t&&t.toUpperCase()}],source_code_first:["source",function(t,e){return e&&"string"==typeof e?e.toUpperCase():t&&"string"==typeof t?t.toUpperCase():null}],mailing:["utm_content",function(t){if(t){var e=t.split("_");if(e[1]&&0===e[1].indexOf("lm"))return e[1].toUpperCase()}return null}],activity_year:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d/)?t.replace(/^FY(\d\d)(\d\d).*$/,"$1/$2"):null}],activity_month:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d-\d\d/)?t.replace(/^FY\d\d\d\d-(\d\d).*$/,"$1"):null}]},other:["other","o"],refsid:"refsid",tags:["tags",function(e,n){return e?function(t){if(!t.length)return t;for(var e=t.sort((function(t,e){return t>=e?1:-1})),n=[e[0]],o=1;o<e.length;o++)e[o-1]!==e[o]&&n.push(e[o]);return n}(t.merge(n,e.split(","))):n||[]}]},o=function t(e,n,o){var a;switch((0,r.default)(e)){case"string":return e in n?n[e]:"string"==typeof o?o:null;case"object":if(Array.isArray(e)){for(var i=0,s=e.length;i<s;i++)if("string"==typeof e[i]&&e[i]in n){a=n[e[i]];break}return"function"==typeof e[e.length-1]&&(a=e[e.length-1](a,o)),null!=a?a:"string"==typeof o?o:null}return a={},Object.keys(e).forEach((function(r){var i=t(e[r],n,o[r]||{});a[r]=null!=i?i:null})),a;default:return null}};function i(t,e,n){return t[0]!==e&&t.unshift(e),Number.isInteger(n)&&t.length>n&&(t=t.slice(0,n)),t}function s(t){for(var e=document.getElementsByTagName("meta"),n=0;n<e.length;n++)if(e[n].getAttribute("name")===t)return e[n].getAttribute("content");return null}t(document).ready((function(){var l=Object.assign({history:[],tags:[],source_history:[]},a.get("foe_data"));l.user_id=l.user_id||function(t,e,n,o,r,a){for(n=1,o=r=0;a=t.charCodeAt(r++);o=(o+n)%65521)n=(n+a)%65521;return o<<16|n}(String(Math.random()+Date.now()));var c=function(){for(var t={},e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var o=e[n].split("="),r=o[0],a=o[1];t[r]=decodeURIComponent(a)}return t}(),u=window.location.origin||"".concat(window.location.protocol,"//").concat(window.location.hostname),f=o(n,c,l);Object.assign(l,f),void 0===l.external_referer&&(0!==document.referrer.indexOf(u)?l.external_referer=document.referrer:void 0!==c.external_referer&&0!==c.external_referer.indexOf(u)&&(l.external_referer=c.external_referer)),l.internal=l.internal||{},l.internal.topic=s("foe:topic"),l.internal.campaign=s("foe:campaign"),l.internal.page_type=s("foe:page-type"),l.nid=t("[data-history-node-id]").attr("data-history-node-id")||t("[data-nid]").attr("data-nid")||t('[id*="node"]').attr("id")||null,"string"==typeof l.nid&&(l.nid=l.nid.replace("node-",""));var d=t('input[data-form-prefill-write="source_code"]');if(d.length&&(void 0===l.internal.source_code_first&&(l.internal.source_code_first=d.val()),void 0===l.internal.source&&(l.internal.source=d.val())),l.history=i(l.history,window.location.href,10),"string"==typeof c.source){var p={source:c.source,timestamp:Date.now()};l.source_history=i(l.source_history,p,10)}l.version=3,document.cookie="source_code_first=".concat(l.internal.source_code_first,";"),null===l.internal.source||void 0!==sessionStorage.source_code_session&&"null"!==sessionStorage.source_code_session||sessionStorage.setItem("source_code_session",l.internal.source),function(t,n){var r=o(t,n,{});if(r.length)return Object.assign(r,{expiry:Date.now()+e}),a.set("foe_attribution",r),r;var i=a.get("foe_attribution");if(i){if(i.expiry<Date.now())return a.set("foe_attribution",null),null;Object.assign(i,{expiry:Date.now()+e}),a.set("foe_attribution",i)}}(n.analytics,c),function(e){var n=JSON.stringify(e),o=t('input[data-form-prefill-write="foe_additional_data"]'),i=t('input[name="submitted[foe_additional_data]"]')||t('input[name="foe_additional_data"]');o.length?o.val(n):i.val(n);var s=t('input[data-form-prefill-write="source_code_first"]');if(s.length&&"string"==typeof e.internal.source_code_first&&s.val(e.internal.source_code_first),void 0!==sessionStorage.source_code_session){var l=sessionStorage.getItem("source_code_session"),c=t('input[data-form-prefill-write="source_code_session"]');null!==l&&l.length&&"string"==typeof l&&c.val(l)}var u=a.get("foe_attribution");u&&"object"===(0,r.default)(u)&&Object.keys(u).forEach((function(e){var n=t('input[data-form-prefill-write="attribution_'.concat(e,'"]'));u[e]&&u[e].length&&"string"==typeof u[e]&&n.val(u[e])}))}(l),a.set("foe_data",l)}))}(window.jQuery)},4577:(t,e,n)=>{var o=n(6378)(n(2350));!function(){if(!(window.navigator.userAgent.indexOf("MSIE")>=0||/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.userAgent.match(/Trident.*rv:11\./))){var t={mobileBreak:parseInt(o.default["breakpoint-md"],10),list:[],number:0,stackTop:0,pageBottom:null,init:function(){t.stopObserving(),t.pageBottom&&t.pageBottom.parentNode.removeChild(t.pageBottom);for(var e=0;e<t.number;e++){var n=t.list[e],o=n.placeholder,r=n.element;o.parentNode.removeChild(o),t.removeClass(r,"stickystack-stuck"),r.style.position=null,r.style.top=null,r.style.left=null,r.style.width=null,r.style.marginTop=null,r.style.marginBottom=null}t.pageBottom=document.createElement("div"),t.pageBottom.style.height=0,t.pageBottom.style.width="100%",t.addClass(t.pageBottom,"js-stickystack"),document.body.appendChild(t.pageBottom),t.number=0;var a=document.getElementsByClassName("js-stickystack");if(window.innerWidth<=t.mobileBreak){for(var i=[],s=0;s<a.length;s++)t.hasClass(a[s],"js-stickystack-nomobile")||i.push(a[s]);a=i}t.number=a.length,t.list=[],t.stackTop=0;for(var l=0;l<t.number;l++){var c=window.getComputedStyle(a[l]),u=document.createElement("div");u.style.width=c.getPropertyValue("width"),u.style.height=c.getPropertyValue("height"),u.style.top=c.getPropertyValue("top"),u.style.right=c.getPropertyValue("right"),u.style.bottom=c.getPropertyValue("bottom"),u.style.left=c.getPropertyValue("left"),u.style.margin=c.getPropertyValue("margin"),u.style.padding=c.getPropertyValue("padding"),u.style.border=c.getPropertyValue("border"),u.style.float=c.getPropertyValue("float"),u.style.clear=c.getPropertyValue("clear"),u.style.position=c.getPropertyValue("position"),u.style.display="none",u.style.visibility="hidden",a[l].parentNode.insertBefore(u,a[l]);var f=t.getCoords(a[l]);t.list.push({element:a[l],top:f.top,left:f.left-parseFloat(c.getPropertyValue("margin-left")),width:parseFloat(c.getPropertyValue("width")),placeholder:u,semistuck:t.hasClass(a[l],"js-stickystack-semi"),zIndex:100-l})}t.list.sort(t.sortByTop),t.stackTop=0,a=document.getElementsByClassName("js-stickystack-top");for(var d=0;d<a.length;d++){var p=t.getCoords(a[d]).top;t.stackTop=0===d?p:Math.min(t.stackTop,p)}t.update(),t.startObserving()},update:function(){for(var e=[[t.stackTop,0,document.body.offsetWidth]],n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=0;o<t.number;o++){var r=t.list[o],a=r.element,i=r.placeholder,s=r.left,l=r.width,c=r.top-n,u=t.getOverlap([c,s,l],e);if(u.overlap>0){i.style.display="block",t.addClass(a,"stickystack-stuck");var f=0;if(t.list[o].semistuck&&o+1<t.number)for(var d=[[u.absolute+a.offsetHeight,s,l]],p=o+1;p<t.number;p++){var h=[t.list[p].top-n,t.list[p].left,t.list[p].width],g=t.getOverlap(h,d);if(g.overlap>0){f=g.overlap;break}}a.style.position="fixed",a.style.top="".concat(u.absolute-f,"px"),a.style.left="".concat(s,"px"),a.style.width="".concat(l,"px"),a.style.zIndex=r.zIndex,a.style.marginTop=0,a.style.marginBottom=0;var m=u.absolute+a.offsetHeight-f;e.push([m,a.offsetLeft,a.offsetWidth])}else t.removeClass(a,"stickystack-stuck"),a.style.position=null,a.style.top=null,a.style.left=null,a.style.width=null,a.style.zIndex=null,a.style.marginTop=null,a.style.marginBottom=null,i.style.display="none"}},startObserving:function(){},stopObserving:function(){},getOverlap:function(t,e){for(var n=0,o=0,r=0;r<e.length;r++)t[0]<e[r][0]&&t[1]+t[2]>e[r][1]&&e[r][1]+e[r][2]>t[1]&&(n=Math.max(n,e[r][0]-t[0]),o=Math.max(o,e[r][0]));return{overlap:n,absolute:o}},sortByTop:function(t,e){return t.top-e.top},getCoords:function(t){var e=t.getBoundingClientRect(),n=document,o=n.body,r=n.documentElement,a=window.pageYOffset||r.scrollTop||o.scrollTop,i=window.pageXOffset||r.scrollLeft||o.scrollLeft,s=r.clientTop||o.clientTop||0,l=r.clientLeft||o.clientLeft||0,c=e.top+a-s,u=e.left+i-l;return{top:Math.round(c),left:Math.round(u)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)".concat(e,"(\\s|$)")))},addClass:function(e,n){e.classList?e.classList.add(n):t.hasClass(e,n)||(e.className+=" ".concat(n))},removeClass:function(e,n){if(e.classList)e.classList.remove(n);else if(t.hasClass(e,n)){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));e.className=e.className.replace(o," ")}}};window.addEventListener("DOMContentLoaded",t.init),window.addEventListener("load",t.init),window.addEventListener("resize",t.init),window.addEventListener("scroll",t.update),window.addEventListener("touchmove",t.update),window.ontouchstart=function(){},window.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){t.update()}),500)})),window.addEventListener("load",(function(){setTimeout((function(){t.update()}),500)}))}}()},7957:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2350)),a={getScrollTop:function(){if(void 0!==window.pageYOffset)return window.pageYOffset;var t=document.body,e=document.documentElement;return(e=e.clientHeight?e:t).scrollTop},getHalfScrollTop:function(){return this.getScrollTop()+window.innerHeight/2},getDocumentHeight:function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},getScrollFromScreens:function(t){return this.getViewportHeight()*t},getScrollFromPerc:function(t){return this.getDocumentHeight()/100*t},getViewportHeight:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight)},elementInViewport:function(t){var e=(0,window.jQuery)(t).offset().top,n=e+t.clientHeight,o=this.getScrollTop(),r=this.getViewportHeight();return!(n<o||e-r>=o)},getCurrentBreakpoint:function(){var t=[];Object.keys(r.default).forEach((function(e){if(0===e.indexOf("breakpoint")){var n=e.replace("breakpoint-",""),o=parseInt(r.default[e],10);t.push({size:n,width:o})}}));for(var e=0;e<t.length-1&&window.innerWidth>=t[e+1].width;)e+=1;return t[e].size},getHeaderHeight:function(){var t=window.jQuery,e=this.getCurrentBreakpoint();return t(".foe-header").length?parseInt(r.default["foe-header-height-".concat(e)],10):0}};e.default=a},542:(t,e,n)=>{n.r(e)},6978:(t,e,n)=>{n.r(e)},1071:(t,e,n)=>{n.r(e)},9990:(t,e,n)=>{n.r(e)},8237:(t,e,n)=>{n.r(e)},7514:(t,e,n)=>{n.r(e)},2386:(t,e,n)=>{n.r(e)},9766:(t,e,n)=>{n.r(e)},4878:(t,e,n)=>{n.r(e)},6985:(t,e,n)=>{n.r(e)},3207:(t,e,n)=>{n.r(e)},2350:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={"breakpoint-xs":"0","breakpoint-sm":"576px","breakpoint-md":"768px","breakpoint-lg":"1024px","breakpoint-xl":"1366px","breakpoint-xxl":"1536px","container-xl":"1280px","container-xxl":"1420px","foe-header-height-xs":"60px","foe-header-height-sm":"60px","foe-header-height-md":"80px","foe-header-height-lg":"64px","foe-header-height-xl":"64px","foe-header-height-xxl":"64px"}},3609:t=>{t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(6985),n(3207),n(7514),n(1071),n(6978),n(3829),n(2851),n(5969),n(1506),n(2981),n(2445),n(5264),n(4577),n(8237),n(2386),n(9859),n(3800),n(6874),window.FoeWebcore&&window.FoeWebcore.critical||window.console.warn("You have loaded the main bundle without embedding the critical bundle first")})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foeewni/web-core",
3
- "version": "2.2.8",
3
+ "version": "2.2.11",
4
4
  "description": "Friend of the Earth EWNI Core for frontend projects",
5
5
  "browser": {
6
6
  "foe-core.js": "dist/js/foe.core.min.js",
Binary file
Binary file
Binary file
@@ -45,21 +45,27 @@ import './data-defer-src.scss';
45
45
 
46
46
  // Remove class on load.
47
47
  el.addEventListener('load', () => {
48
- if (el.hasAttribute('src')) {
49
- el.classList.remove('js-defer-is-loading');
50
- }
48
+ el.classList.remove('js-defer-is-loading');
51
49
  });
52
50
 
53
51
  const observer = new IntersectionObserver((entries) => {
54
52
  entries.forEach((entry) => {
55
53
  if (!isVisible && entry.intersectionRatio > 0) {
56
54
  isVisible = true;
57
- el.src = source;
55
+ if (el.tagName === 'IFRAME') {
56
+ el.contentWindow.location.replace(source);
57
+ } else {
58
+ el.src = source;
59
+ }
58
60
  }
59
61
 
60
62
  if (el.hasAttribute('data-defer-dispose') && isVisible && entry.intersectionRatio === 0) {
61
63
  isVisible = false;
62
- el.removeAttribute('src');
64
+ if (el.tagName === 'IFRAME') {
65
+ el.contentWindow.location.replace('about:blank');
66
+ } else {
67
+ el.removeAttribute('src');
68
+ }
63
69
  el.classList.add('js-defer-is-loading');
64
70
  }
65
71
  });
@@ -30,6 +30,7 @@ import * as store from 'local-storage';
30
30
 
31
31
  const HISTORY_LIMIT = 10;
32
32
  const SOURCE_HISTORY_LIMIT = 10;
33
+ const ANALYTICS_SESSION_LENGTH = (30 * 60 * 1000); // expire the session in 30 minutes (30 mins * 60 seconds * 1000 milliseconds)
33
34
 
34
35
  function sortUnique(array) {
35
36
  if (!array.length) {
@@ -185,6 +186,36 @@ import * as store from 'local-storage';
185
186
  }
186
187
  };
187
188
 
189
+ function setAttribution(structure, parameters) {
190
+ // retrieve just the current analytics parameters
191
+ const attribution = getParameters(structure, parameters, {});
192
+
193
+ // if there is analytics data set that here
194
+ if (attribution.length) {
195
+ Object.assign(attribution, {
196
+ expiry: Date.now() + ANALYTICS_SESSION_LENGTH,
197
+ });
198
+ store.set('foe_attribution', attribution);
199
+ return attribution;
200
+ }
201
+
202
+ // if the session is stale discard it
203
+ const attributionSession = store.get('foe_attribution');
204
+ if (attributionSession) {
205
+ if (attributionSession.expiry < Date.now()) {
206
+ store.set('foe_attribution', null);
207
+ return null;
208
+ }
209
+
210
+ Object.assign(attributionSession, {
211
+ expiry: Date.now() + ANALYTICS_SESSION_LENGTH,
212
+ });
213
+ store.set('foe_attribution', attributionSession);
214
+ }
215
+
216
+ return attributionSession;
217
+ }
218
+
188
219
  function populateForm(data) {
189
220
  // Prepare the JSON string
190
221
  const jsonData = JSON.stringify(data);
@@ -215,6 +246,20 @@ import * as store from 'local-storage';
215
246
  sourceCodeSession.val(sessionStorageSourceCodeSession);
216
247
  }
217
248
  }
249
+
250
+ // and populate analytic_session from sessionStorage - check it exists before getting it
251
+ const attribution = store.get('foe_attribution');
252
+ if (attribution
253
+ && typeof attribution === 'object') {
254
+ Object.keys(attribution).forEach((key) => {
255
+ const attributionInput = $(`input[data-form-prefill-write="attribution_${key}"]`);
256
+ if (attribution[key]
257
+ && attribution[key].length
258
+ && typeof attribution[key] === 'string') {
259
+ attributionInput.val(attribution[key]);
260
+ }
261
+ });
262
+ }
218
263
  }
219
264
 
220
265
  // Adds the param to a named array (if needed)
@@ -302,7 +347,8 @@ import * as store from 'local-storage';
302
347
  trackingData.internal.page_type = getMeta('foe:page-type');
303
348
 
304
349
  // Drupal node ID
305
- trackingData.nid = $('[data-nid]').attr('data-nid')
350
+ trackingData.nid = $('[data-history-node-id]').attr('data-history-node-id')
351
+ || $('[data-nid]').attr('data-nid')
306
352
  || $('[id*="node"]').attr('id')
307
353
  || null;
308
354
  if (typeof trackingData.nid === 'string') {
@@ -347,6 +393,8 @@ import * as store from 'local-storage';
347
393
  sessionStorage.setItem('source_code_session', trackingData.internal.source);
348
394
  }
349
395
 
396
+ setAttribution(parameterStructure.analytics, parameters);
397
+
350
398
  populateForm(trackingData);
351
399
 
352
400
  // set local storage
@@ -11,6 +11,10 @@
11
11
  <meta name="foe:campaign" content="demo-campaign">
12
12
  <meta name="foe:page-type" content="demo">
13
13
  <meta name="viewport" content="width=device-width, initial-scale=1">
14
+ <link rel="icon" href="assets/favicon.ico" type="image/vnd.microsoft.icon" />
15
+ <link rel="icon" href="assets/favicon-32.png" type="image/png" sizes="32x32" />
16
+ <link rel="icon" href="assets/favicon-192.png" type="image/png" sizes="192x192" />
17
+ <link rel="shortcut icon" href="assets/favicon.ico" />
14
18
  <title>{{customVariables.pageTitle}}</title>
15
19
  <style>
16
20
  {{> theme}}