1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function($,Drupal,debounce){const cache={right:0,left:0,bottom:0,top:0};const cssVarPrefix='--drupal-displace-offset';const documentStyle=document.documentElement.style;const offsetKeys=Object.keys(cache);const offsetProps={};offsetKeys.forEach((edge)=>{offsetProps[edge]={enumerable:true,get(){return cache[edge];},set(value){if(value!==cache[edge])documentStyle.setProperty(`${cssVarPrefix}-${edge}`,`${value}px`);cache[edge]=value;}};});const offsets=Object.seal(Object.defineProperties({},offsetProps));function getRawOffset(el,edge){const $el=$(el);const documentElement=document.documentElement;let displacement=0;const horizontal=edge==='left'||edge==='right';let placement=$el.offset()[horizontal?'left':'top'];placement-=window[`scroll${horizontal?'X':'Y'}`]||document.documentElement[`scroll${horizontal?'Left':'Top'}`]||0;switch(edge){case 'top':displacement=placement+$el.outerHeight();break;case 'left':displacement=placement+$el.outerWidth();break;case 'bottom':displacement=documentElement.clientHeight-placement;break;case 'right':displacement=documentElement.clientWidth-placement;break;default:displacement=0;}return displacement;}function calculateOffset(edge){let edgeOffset=0;document.querySelectorAll(`[data-offset-${edge}]`).forEach((el)=>{if(el.style.display==='none')return;let displacement=parseInt(el.getAttribute(`data-offset-${edge}`),10);if(isNaN(displacement))displacement=getRawOffset(el,edge);edgeOffset=Math.max(edgeOffset,displacement);});return edgeOffset;}function displace(broadcast=true){const newOffsets={};offsetKeys.forEach((edge)=>{newOffsets[edge]=calculateOffset(edge);});offsetKeys.forEach((edge)=>{offsets[edge]=newOffsets[edge];});if(broadcast)$(document).trigger('drupalViewportOffsetChange',offsets);return offsets;}Drupal.behaviors.drupalDisplace={attach(){if(this.displaceProcessed)return;this.displaceProcessed=true;$(window).on('resize.drupalDisplace',debounce(displace,200));}};Drupal.displace=displace;Object.defineProperty(Drupal.displace,'offsets',{value:offsets,writable:false});Drupal.displace.calculateOffset=calculateOffset;})(jQuery,Drupal,Drupal.debounce);; 3(($)=>{let cachedScrollbarWidth=null;const {max,abs}=Math;const regexHorizontal=/left|center|right/;const regexVertical=/top|center|bottom/;const regexOffset=/[+-]\d+(\.[\d]+)?%?/;const regexPosition=/^\w+/;const _position=$.fn.position;function getOffsets(offsets,width,height){return [parseFloat(offsets[0])*(typeof offsets[0]==='string'&&offsets[0].endsWith('%')?width/100:1),parseFloat(offsets[1])*(typeof offsets[1]==='string'&&offsets[1].endsWith('%')?height/100:1)];}function parseCss(element,property){return parseInt(window.getComputedStyle(element)[property],10)||0;}function getDimensions(elem){const raw=elem[0];if(raw.nodeType===Node.DOCUMENT_NODE)return {width:elem.width(),height:elem.height(),offset:{top:0,left:0}};if(!!raw&&raw===raw.window)return {width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};if(raw.preventDefault)return {width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};return {width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}const collisions={fit:{left(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollLeft:within.offset.left;const outerWidth=within.width;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=withinOffset-collisionPosLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;let newOverRight;if(data.collisionWidth>outerWidth)if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0)position.left=withinOffset;else if(overLeft>overRight)position.left=withinOffset+outerWidth-data.collisionWidth;else position.left=withinOffset;else if(overLeft>0)position.left+=overLeft;else if(overRight>0)position.left-=overRight;else position.left=max(position.left-collisionPosLeft,position.left);},top(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollTop:within.offset.top;const outerHeight=data.within.height;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=withinOffset-collisionPosTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;let newOverBottom;if(data.collisionHeight>outerHeight)if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0)position.top=withinOffset;else if(overTop>overBottom)position.top=withinOffset+outerHeight-data.collisionHeight;else position.top=withinOffset;else if(overTop>0)position.top+=overTop;else if(overBottom>0)position.top-=overBottom;else position.top=max(position.top-collisionPosTop,position.top);}},flip:{left(position,data){const {within}=data;const withinOffset=within.offset.left+within.scrollLeft;const outerWidth=within.width;const offsetLeft=within.isWindow?within.scrollLeft:within.offset.left;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=collisionPosLeft-offsetLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft;const myOffset=data.my[0]==='left'?-data.elemWidth:data.my[0]==='right'?data.elemWidth:0;const atOffset=data.at[0]==='left'?data.targetWidth:data.at[0]==='right'?-data.targetWidth:0;const offset=-2*data.offset[0];let newOverRight;let newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft))position.left+=myOffset+atOffset+offset;}else{if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight)position.left+=myOffset+atOffset+offset;}}},top(position,data){const {within}=data;const withinOffset=within.offset.top+within.scrollTop;const outerHeight=within.height;const offsetTop=within.isWindow?within.scrollTop:within.offset.top;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=collisionPosTop-offsetTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop;const top=data.my[1]==='top';const myOffset=top?-data.elemHeight:data.my[1]==='bottom'?data.elemHeight:0;const atOffset=data.at[1]==='top'?data.targetHeight:data.at[1]==='bottom'?-data.targetHeight:0;const offset=-2*data.offset[1];let newOverTop;let newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop))position.top+=myOffset+atOffset+offset;}else{if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom)position.top+=myOffset+atOffset+offset;}}}},flipfit:{left(...args){collisions.flip.left.apply(this,args);collisions.fit.left.apply(this,args);},top(...args){collisions.flip.top.apply(this,args);collisions.fit.top.apply(this,args);}}};$.position={scrollbarWidth(){if(cachedScrollbarWidth!==undefined)return cachedScrollbarWidth;const div=$('<div '+"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>"+"<div style='height:100px;width:auto;'></div></div>");const innerDiv=div.children()[0];$('body').append(div);const w1=innerDiv.offsetWidth;div[0].style.overflow='scroll';let w2=innerDiv.offsetWidth;if(w1===w2)w2=div[0].clientWidth;div.remove();cachedScrollbarWidth=w1-w2;return cachedScrollbarWidth;},getScrollInfo(within){const overflowX=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-x'];const overflowY=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-y'];const hasOverflowX=overflowX==='scroll'||(overflowX==='auto'&&within.width<within.element[0].scrollWidth);const hasOverflowY=overflowY==='scroll'||(overflowY==='auto'&&within.height<within.element[0].scrollHeight);return {width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo(element){const withinElement=$(element||window);const isWindow=!!withinElement[0]&&withinElement[0]===withinElement[0].window;const isDocument=!!withinElement[0]&&withinElement[0].nodeType===Node.DOCUMENT_NODE;const hasOffset=!isWindow&&!isDocument;return {element:withinElement,isWindow,isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);const within=$.position.getWithinInfo(options.within);const scrollInfo=$.position.getScrollInfo(within);const collision=(options.collision||'flip').split(' ');const offsets={};const target=typeof options.of==='string'?$(document).find(options.of):$(options.of);const dimensions=getDimensions(target);const targetWidth=dimensions.width;const targetHeight=dimensions.height;const targetOffset=dimensions.offset;if(target[0].preventDefault)options.at='left top';const basePosition=$.extend({},targetOffset);$.each(['my','at'],function(){let pos=(options[this]||'').split(' ');
3if(pos.length===1)pos=regexHorizontal.test(pos[0])?pos.concat(['center']):regexVertical.test(pos[0])?['center'].concat(pos):['center','center'];pos[0]=regexHorizontal.test(pos[0])?pos[0]:'center';pos[1]=regexVertical.test(pos[1])?pos[1]:'center';const horizontalOffset=regexOffset.exec(pos[0]);const verticalOffset=regexOffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[regexPosition.exec(pos[0])[0],regexPosition.exec(pos[1])[0]];});if(collision.length===1)collision[1]=collision[0];if(options.at[0]==='right')basePosition.left+=targetWidth;else{if(options.at[0]==='center')basePosition.left+=targetWidth/2;}if(options.at[1]==='bottom')basePosition.top+=targetHeight;else{if(options.at[1]==='center')basePosition.top+=targetHeight/2;}const atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){let using;const elem=$(this);const elemWidth=elem.outerWidth();const elemHeight=elem.outerHeight();const marginLeft=parseCss(this,'marginLeft');const marginTop=parseCss(this,'marginTop');const collisionWidth=elemWidth+marginLeft+parseCss(this,'marginRight')+scrollInfo.width;const collisionHeight=elemHeight+marginTop+parseCss(this,'marginBottom')+scrollInfo.height;const position=$.extend({},basePosition);const myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==='right')position.left-=elemWidth;else{if(options.my[0]==='center')position.left-=elemWidth/2;}if(options.my[1]==='bottom')position.top-=elemHeight;else{if(options.my[1]==='center')position.top-=elemHeight/2;}position.left+=myOffset[0];position.top+=myOffset[1];const collisionPosition={marginLeft,marginTop};$.each(['left','top'],function(i,dir){if(collisions[collision[i]])collisions[collision[i]][dir](position,{targetWidth,targetHeight,elemWidth,elemHeight,collisionPosition,collisionWidth,collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within,elem});});if(options.using)using=function(props){const left=targetOffset.left-position.left;const right=left+targetWidth-elemWidth;const top=targetOffset.top-position.top;const bottom=top+targetHeight-elemHeight;const feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?'left':left>0?'right':'center',vertical:bottom<0?'top':top>0?'bottom':'middle'};if(targetWidth<elemWidth&&abs(left+right)<targetWidth)feedback.horizontal='center';if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight)feedback.vertical='middle';if(max(abs(left),abs(right))>max(abs(top),abs(bottom)))feedback.important='horizontal';else feedback.important='vertical';options.using.call(this,props,feedback);};elem.offset($.extend(position,{using}));});};if(!$.hasOwnProperty('ui'))$.ui={};$.ui.position=collisions;})(jQuery);; 4(function($,Drupal,once){if(once('drupal-dialog-deprecation-listener','html').length){const eventSpecial={handle($event){const $element=$($event.target);const event=$event.originalEvent;const dialog=event.dialog;const dialogArguments=[$event,dialog,$element,event?.settings];$event.handleObj.handler.apply(this,dialogArguments);}};$.event.special['dialog:beforecreate']=eventSpecial;$.event.special['dialog:aftercreate']=eventSpecial;$.event.special['dialog:beforeclose']=eventSpecial;$.event.special['dialog:afterclose']=eventSpecial;const listenDialogEvent=(event)=>{const windowEvents=$._data(window,'events');const isWindowHasDialogListener=windowEvents[event.type];if(isWindowHasDialogListener)Drupal.deprecationError({message:`jQuery event ${event.type} is deprecated in 10.3.0 and is removed from Drupal:12.0.0. See https://www.drupal.org/node/3422670`});};['dialog:beforecreate','dialog:aftercreate','dialog:beforeclose','dialog:afterclose'].forEach((e)=>window.addEventListener(e,listenDialogEvent));window.addEventListener('dialog:beforecreate',(event)=>{const dialog=event.target;$(dialog).on('dialogButtonsChange.dialogDeprecation',(e)=>{if(!e?.originalEvent){Drupal.deprecationError({message:`jQuery event dialogButtonsChange is deprecated
4in 11.2.0 and is removed from Drupal:12.0.0. See https://www.drupal.org/node/3464202`});dialog.dispatchEvent(new CustomEvent('dialogButtonsChange'));}});});window.addEventListener('dialog:beforeclose',(event)=>{const dialog=event.target;$(dialog).off(`dialogButtonsChange.dialogDeprecation`);});}})(jQuery,Drupal,once);; 5class DrupalDialogEvent extends Event{constructor(type,dialog,settings=null){super(`dialog:${type}`,{bubbles:true});this.dialog=dialog;this.settings=settings;}}(function($,Drupal,drupalSettings,bodyScrollLock){drupalSettings.dialog={autoOpen:true,buttonClass:'button',buttonPrimaryClass:'button--primary',close(event){Drupal.dialog(event.target).close();Drupal.detachBehaviors(event.target,null,'unload');}};Drupal.dialog=function(element,options){let undef;const $element=$(element);const domElement=$element.get(0);const dialog={open:false,returnValue:undef};function openDialog(settings){settings=$.extend({},drupalSettings.dialog,options,settings);if(settings.dialogClass)Drupal.deprecationError({message:'dialogClass is deprecated in drupal:10.4.x and will be removed from drupal:12.0.0.'});const event=new DrupalDialogEvent('beforecreate',dialog,settings);domElement.dispatchEvent(event);$element.dialog(event.settings);dialog.open=true;if(event.settings.modal)bodyScrollLock.lock(domElement);domElement.dispatchEvent(new DrupalDialogEvent('aftercreate',dialog,event.settings));}function closeDialog(value){domElement.dispatchEvent(new DrupalDialogEvent('beforeclose',dialog));bodyScrollLock.clearBodyLocks();$element.dialog('close');dialog.returnValue=value;dialog.open=false;domElement.dispatchEvent(new DrupalDialogEvent('afterclose',dialog));}dialog.show=()=>{openDialog({modal:false,uiDialogTitleHeadingLevel:2});};dialog.showModal=()=>{openDialog({modal:true,uiDialogTitleHeadingLevel:1});};dialog.close=closeDialog;return dialog;};})(jQuery,Drupal,drupalSettings,bodyScrollLock);; 6(function($,Drupal,drupalSettings,debounce,displace){drupalSettings.dialog=$.extend({autoResize:true,maxHeight:'95%'},drupalSettings.dialog);function resetPosition(options){const offsets=displace.offsets;const left=offsets.left-offsets.right;const top=offsets.top-offsets.bottom;const leftString=`${(left>0?'+':'-')+Math.abs(Math.round(left/2))}px`;const topString=`${(top>0?'+':'-')+Math.abs(Math.round(top/2))}px`;options.position={my:`center${left!==0?leftString:''} center${top!==0?topString:''}`,of:window};return options;}function resetSize(event){const positionOptions=['width','height','minWidth','minHeight','maxHeight','maxWidth','position'];let adjustedOptions={};let windowHeight=$(window).height();let option;let optionValue;let adjustedValue;for(let n=0;n<positionOptions.length;n++){option=positionOptions[n];optionValue=event.data.settings[option];if(optionValue)if(typeof optionValue==='string'&&optionValue.endsWith('%')&&/height/i.test(option)){windowHeight-=displace.offsets.top+displace.offsets.bottom;adjustedValue=parseInt(0.01*parseInt(optionValue,10)*windowHeight,10);if(option==='height'&&Math.round(event.data.$element.parent().outerHeight())<adjustedValue)adjustedValue='auto';adjustedOptions[option]=adjustedValue;}}if(!event.data.settings.modal)adjustedOptions=resetPosition(adjustedOptions);event.data.$element.dialog('option',adjustedOptions);event.data.$element?.get(0)?.dispatchEvent(new CustomEvent('dialogContentResize',{bubbles:true}));}window.addEventListener('dialog:aftercreate',(e)=>{const autoResize=debounce(resetSize,20);const $element=$(e.target);const {settings}=e;const eventData={settings,$element};if(settings.autoResize===true||settings.autoResize==='true'){const uiDialog=$element.dialog('option',{resizable:false,draggable:false}).dialog('widget');uiDialog[0].style.position='fixed';$(window).on('resize.dialogResize scroll.dialogResize',eventData,autoResize).trigger('resize.dialogResize');$(document).on('drupalViewportOffsetChange.dialogResize',eventData,autoResize);}});window.addEventListener('dialog:beforeclose',()=>{$(window).off('.dialogResize');$(document).off('.dialogResize');});})(jQuery,Drupal,drupalSettings,Drupal.debounce,Drupal.displace);; 7(function($,{tabbable,isTabbable}){$.widget('ui.dialog',$.ui.dialog,{options:{buttonClass:'button',buttonPrimaryClass:'button--primary'},_createButtons(){const opts=this.options;let primaryIndex;let index;const il=opts.buttons.length;for(index=0;index<il;index++)if(opts.buttons[index].primary&&opts.buttons[index].primary===true){primaryIndex=index;delete opts.buttons[index].primary;break;}this._super();const $buttons=this.uiButtonSet.children().addClass(opts.buttonClass);if(typeof primaryIndex!=='undefined')$buttons.eq(index).addClass(opts.buttonPrimaryClass);},_createWrapper(){this.uiDialog=$('<div>
7').hide().attr({tabIndex:-1,role:'dialog','aria-modal':this.options.modal?'true':null}).appendTo(this._appendTo());this._addClass(this.uiDialog,'ui-dialog','ui-widget ui-widget-content ui-front');this._on(this.uiDialog,{keydown(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){event.preventDefault();this.close(event);return;}if(event.keyCode!==$.ui.keyCode.TAB||event.isDefaultPrevented())return;const tabbableElements=tabbable(this.uiDialog[0]);if(tabbableElements.length){const first=tabbableElements[0];const last=tabbableElements[tabbableElements.length-1];if((event.target===last||event.target===this.uiDialog[0])&&!event.shiftKey){this._delay(function(){$(first).trigger('focus');});event.preventDefault();}else{if((event.target===first||event.target===this.uiDialog[0])&&event.shiftKey){this._delay(function(){$(last).trigger('focus');});event.preventDefault();}}}},mousedown(event){if(this._moveToTop(event))this._focusTabbable();}});if(!this.element.find('[aria-describedby]').length)this.uiDialog.attr({'aria-describedby':this.element.uniqueId().attr('id')});},_focusTabbable(){let hasFocus=this._focusedElement?this._focusedElement.get(0):null;if(!hasFocus)hasFocus=this.element.find('[autofocus]').get(0);if(!hasFocus){const $elements=[this.element,this.uiDialogButtonPane];for(let i=0;i<$elements.length;i++){const element=$elements[i].get(0);if(element){const elementTabbable=tabbable(element);hasFocus=elementTabbable.length?elementTabbable[0]:null;}if(hasFocus)break;}}if(!hasFocus){const closeBtn=this.uiDialogTitlebarClose.get(0);hasFocus=closeBtn&&isTabbable(closeBtn)?closeBtn:null;}if(!hasFocus)hasFocus=this.uiDialog.get(0);$(hasFocus).eq(0).trigger('focus');}});})(jQuery,window.tabbable);; 8(($)=>{$.widget('ui.dialog',$.ui.dialog,{_allowInteraction(event){if(event.target.classList===undefined)return this._super(event);return event.target.classList.contains('ck')||this._super(event);}});})(jQuery);; 9(()=>{var e={241(){!function(e){const t="BeckersPolicyCookie",i="understand";e(document).ready(function(){if(e("#cookie-understand-button").click(function(){!function(e,t){let i=new Date;i.setTime(i.getTime()+16416e5);let a="; expires="+i.toGMTString();document.cookie=e+"="+t+a+"; path=/"}(t,i),e("#close-cookie-modal").click()}),function(e){let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let a=i[e];for(;" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(20,a.length)}return null}(t)!=i){const e=document.getElementById("cookie-modal");e&&"undefined"!=typeof bootstrap&&bootstrap.Modal&&new bootstrap.Modal(e).show()}})}(jQuery)},886(){!function(e){function t(e){window.dataLayer=window.dataLayer||[],dataLayer&&dataLayer.push(e)}function i(e){return{event:e,eventInfo:{category:"",action:"",label:"",actionType:"Engagement"}}}e(document).on("click",".gtmColorCategory",".gtmColorCategory img",function(){let t=e(this).parents(".views-fields").find(".gtmColorCategory").text().trim();localStorage.setItem("gtmColorCategory",t)}),e(".full-screen-color-modal").click(function(){let e=i("saveAndView");e.eventInfo.category="Save and view",e.eventInfo.action="View in full size",t(e)}),e(".add-product-to-saved-list-icon, .add-item-to-saved-list-container, #add-item-to-saved-list-btn").click(function(){let a=i("saveAndView"),o="";o=e("body").find(".content header .productTitle").length?e("body").find(".content header .productTitle").first().text().trim():e(this).data("title"),e(this).is(".add-item-to-saved-list-container")&&e(this).find(".add-item-to-saved-list-icon").hasClass("marked-item-icon")||e(this).is("#add-item-to-saved-list-btn")&&!e(this).find("#remove-from-checklist").hasClass("d-none")||(a.eventInfo.category="Save and view",a.eventInfo.label=o,a.eventInfo.action="Save "+e(this).data("item"),a.eventInfo.actionType="Engagement",t(a))}),e(".view-colors-modal-products-category .product-teaser .views-field-title span a").click(function(){let a=i("selectProduct");a.eventInfo.category="Product and color",a.eventInfo.action="Select product to color",a.productInfo={},a.productInfo.name=e(this).text(),a.productInfo.area=e(this).attr("data-product-area-surface"),a.productInfo.purpose=e(this).attr("data-product-area-use-what"),t(a)}),e(document).on("click",".view-products-modal-colors-category .color-teaser a",function(){let a=i("selectColor");a.eventInfo.category="Product and color",a.eventInfo.action="Select color to product",a.eventInfo.label="(not set)",a.colorInfo={},a.colorInfo.name=e(this).text(),a.colorInfo.group=window.GTMcolorInfo,window.GTMcolorInfo="",t(a)}),e("click","#send-by-email-saved-list, #send-by-email-shopping-list").click(function(){let e=i("sendEmail");e.eventInfo.action="Send to email address",t(e)}),e("#can-amount-select").change(function(){let a=i("quantity");a.eventInfo.category="Product and color",a.eventInfo.action="Select quantity",e(this).val()&&(a.amountInfo={},a.amountInfo.quantity=e(this).children("option:selected").text(),t(a))}),e("#can-sizes-select").change(function(){let a=i("selectVolume");a.eventInfo.category="Product and color",a.eventInfo.action="Select volume",e(this).val()&&(a.amountInfo={},a.amountInfo.volume=e(this).children("option:selected").text(),t(a))}),e("#add-to-shopping-list-button, #shoppingListBtn-calculator").click(function(){let e=i("shoppingList");e.eventInfo.category="Product and color",e.eventInfo.action="Add to shopping list",e.eventInfo.actionType="Activation",e.eventInfo.label="(not set)",t(e)}),e("#send-by-email-saved-list, #send-by-email-shopping-list").click(function(){let e=i("saveAndView");e.eventInfo.category="Save and view",e.eventInfo.action="Saved items",e.eventInfo.label="Send by e-mail",e.eventInfo.actionType="Activation",t(e)}),e("#send-by-email-estimate-quantity").click(function(){let e=i("emailProductAndColor");e.eventInfo.category="Product and color",e.eventInfo.action="Send to email address",e.eventInfo.label="Calculator",e.eventInfo.actionType="Activation",t(e)}),e("#print-saved-btn, #print-shopping-list-btn").click(function(){let e=i("saveAndView");e.eventInfo.category="Save and view",e.eventInfo.action="Saved items",e.eventInfo.label="Print",e.eventInfo.actionType="Activation",t(e)}),e("button.picture-colors span").click(function(){let e=i("inspiration");e.eventInfo.category="Inspiration",e.eventInfo.action="Colors in the picture",t(e)}),e(".card-teaser .views-fields").click(function(){let a=i("storeClick"),o=e(this).find(".views-field-title span.field-content");a.eventInfo.category="Find store",a.eventInfo.action="Store click",a.eventInfo.label=o.length?o.text():"",a.eventInfo.actionType="Activation",t(a)}),e(".retailer-card").click(function(){let a=i("storeClick"),o=e(this).find(".retailer-card__title");a.eventInfo.category="Find store",a.eventInfo.action="Store click",a.eventInfo.label=o.length?o.text():"",a.eventInfo.actionType="Activation",t(a)}
9),e("#custom-map-search").on("keypress",function(a){if(13==a.which){let a=i("findStore");if(a.eventInfo.actionType="Activation",!e(this).val())return;a.searchInfo={},a.searchInfo.category="Find store",a.searchInfo.query=e(this).val(),t(a)}}),e(document).on("click","#search-results-container a",function(){let i=e(this).find(".saved-list-title").text(),a=e("body").find("#elasticsearch-site-search-form input.site-search-input").val(),o={event:"search",searchInfo:{}};o.searchInfo.category="Site search",o.searchInfo.method="Suggestion",o.searchInfo.term=i,o.searchInfo.query=a,o.searchInfo.actionType="Engagement",t(o)}),e(".views-field-filename").click(function(t){e(t.target).closest("a").length&&sendDocumentDataToDataLayer("Download",e(t.target).attr("download"))}),window.sendDocumentDataToDataLayer=function(a,o=void 0){let n=i("documents"),s=e("body").find(".view-documents .view-content .document-teaser.views-row input.pro-files--checkbox:checked");s.length||(s=e('.pro-files--checkbox:input[type="checkbox"]:checked'));let l="",r=a+" single document";o?l=o:(l=s[0].dataset.filename,s.length>1&&(r=a+" bundled documents",l="",s.each(function(){l+=this.dataset.filename+", "}))),n.eventInfo.category="Documents",n.eventInfo.action=r,n.eventInfo.actionType="Activation",n.eventInfo.label=l.trim(),t(n)}}(jQuery)},633(){var e;(e=jQuery).fn.addBehaviorsDocuments=function(){const t=e("#documents-modal");let i=null;const a=document.getElementById("documents-modal");a&&"undefined"!=typeof bootstrap&&bootstrap.Modal&&(i=new bootstrap.Modal(a,{backdrop:!1,keyboard:!1}));const o="selectedDocuments",n=()=>JSON.parse(localStorage.getItem(o)),s=()=>{localStorage.setItem(o,JSON.stringify([]))},l=()=>{let a=e('.pro-files--checkbox:input[type="checkbox"]:checked').length;0==a&&i&&i.hide(),1>=a?(t.find("#one-item-selected").show(),t.find("#more-item-selected").hide()):(t.find("#one-item-selected").hide(),t.find("#more-item-selected").show()),t.find(".items-selected").text(a)};s();let r=JSON.parse(localStorage.getItem(o));function c(){e(".document-tab--file .document-teaser").each(function(t){if(!e(this).hasClass("files-data--row")){let i=e(this).find(".views-field-filename");const a=e(this).find(".field-content a"),o=a.attr("href"),n=a.attr("data-filename"),s=a.attr("data-uuid");a.attr("download",n);const l=`<div class="Checkbox">\n <input type="checkbox"\n class="pro-files--checkbox Checkbox-field"\n data-filename="${n}"\n data-url="${o}"\n data-uuid="${s}"\n id="file-box-${t}"\n value="${o}"\n />\n <label for="file-box-${t}" class="Checkbox-label"></label>\n </div>`;i.prepend(l),e(this).addClass("files-data--row")}})}c();const d=["products_with_documents","products_with_documents_by_id","list_of_products_by_ryl","product_search"],h=[".view-product-search","#pro-documents-table.view-products-with-documents","#pro-documents-table.view-products-with-documents-by-id","#products-by-ryl.view-list-of-products-by-ryl"];e(document).ajaxComplete(function(t,i,a){if(a.extraData&&d.indexOf(a.extraData.view_name)>-1){c();const t=n();e(t.map(e=>`input[value="${e}"]`).join(",")).prop("checked",!0),l()}}),e(document).on("change",".pro-files--checkbox",function(){const t=e(this).attr("value");this.checked?(i&&i.show(),(e=>{const t=[...n(),e];localStorage.setItem(o,JSON.stringify(t))})(t)):r=(e=>{const t=n().filter(t=>t!==e);localStorage.setItem(o,JSON.stringify(t))})(t),l()}),t.find("#document-send-button").click(function(){t.find("#sender-email-modal").data("send","downloadList")}),e("#close-download-modal").click(function(){s(),e(h.join(", ")).find(".pro-files--checkbox:checked").each(function(){e(this).prop("checked",!1)})}),e("#document-download-button").off().on("click",function(){let t=[];e(h.join(", ")).find(".pro-files--checkbox:checked").each(function(){t.push(e(this).data("uuid"))}),function(e){let t=e.join(","),i=document.createElement("a");i.setAttribute("href","/download/multiple/"+t),i.setAttribute("target","_blank"),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}(t)})}},8(){!function(e){let t={},i=[];const a=function(e,t,i,a,n,s,l){if(e(t+":not(#pro-documents-tikkurila)").length){e(t+" .views-exposed-form section").each(function(t){e(this).find(".accordionSectionFields").append('<div class="not-available-label">Not available yet</div>'),e(this).find(".accordionSectionFields").children(".checkbox").hide(),e(this).find(".accordionSectionFields").children(".not-available-label").show()});const r=e(t+' .view-pager ul[data-drupal-views-infinite-scroll-pager
9="automatic"]').find("[rel=next]");r.length?(r.click(),e(document).ajaxComplete(function(r,c,d){const h=e(t+' .view-pager ul[data-drupal-views-infinite-scroll-pager="automatic"]');let u=new URLSearchParams(d.data).get("view_name");if(d.data&&"documents"==u){let r=h.text().trim(),c=new URLSearchParams(h.find("[rel=next]").attr("href")).get("page");h.length&&r!=c?(h.find("[rel=next]").click(),e(window).off("scroll.views_infinite_scroll")):(e(t+" .views-exposed-form section").each(function(t){e(this).find(".accordionSectionFields").children(".checkbox").show(),e(this).find(".accordionSectionFields").children(".not-available-label").hide()}),o(e,t,i,a,n,s,l))}})):(e(t+" .views-exposed-form section").each(function(t){e(this).find(".accordionSectionFields").children(".checkbox").show(),e(this).find(".accordionSectionFields").children(".not-available-label").hide()}),o(e,t,i,a,n,s,l))}},o=function(e,a,o,s,l,r,c){if(e(a).length){const d={};e(a+" "+o).length>0&&(i=e(a+" "+o+":visible").map(function(){let t=e(this);try{return JSON.parse(t.find("div"+r+" .field-content").text().trim())}catch(e){}}).get()),e(a+" .views-exposed-form section").each(function(i){t[e(this).attr("id")]={filterIndex:i,filterOpened:!1,filterCurrentValues:new Set,filterAvailableValues:new Set}});for(let e in t)i.forEach(t=>{let i=[];"string"==typeof t[e]&&(t[e].split(",").forEach(e=>{i.push(e.trim())}),i=i.filter(Boolean),t[e]=i)});i.forEach(e=>{for(let i in t)e[i].forEach(e=>{t[i].filterAvailableValues.add(e)})});for(let i in t)t[i].filterAvailableValues.size>0?e('div[id^="'+i+'"] label, section[id^="'+i+'"] label').each(function(a,o){t[i].filterAvailableValues.has(e(this).text().trim())?e(this).show():e(this).hide()}):e('section[id="'+i+'"]').hide();const h=performance&&performance.getEntriesByType("navigation").map(e=>e.type).includes("back_forward");let u=JSON.parse(sessionStorage.getItem(c)),p="";u&&u.search&&(p=u.search),""!==p&&h&&(e("input[id^='edit-search']").val(p),e(`input${customInputId}`).val(p),p!=sessionStorage.getItem("search")&&sessionStorage.setItem("search",p));for(let i in t)if(u&&u[i]&&h){if(t[i]={filterIndex:u[i].filterIndex,filterOpened:u[i].filterOpened,filterCurrentValues:new Set(u[i].filterCurrentValues),filterAvailableValues:new Set(u[i].filterAvailableValues)},t[i].filterCurrentValues.size>0){e(`section[id^='${i}'] label`).each(function(a){const o=e(this).text().trim();t[i].filterCurrentValues.has(o)&&e(this).prev().prop("checked",!0)});let a=[...t[i].filterCurrentValues].join(", ");e("#"+i+" span.type-small-all").text(0===t[i].filterCurrentValues.size?"All":a),n(s,o)}if(t[i].filterOpened){let t=e(`${a} .views-exposed-form section[id^='${i}'] .expand-arrow`),o=e(`${a} .views-exposed-form section[id^='${i}'] .accordionSectionFields`);t.addClass("rotated"),o.addClass("show")}}e("[id^="+l+"] label.js-form-type-checkbox").bind("click",function(){let i=e(this).parents(":eq(1)").attr("id")||e(this).parents(":eq(2)").attr("id")+"--wrapper";t[i].filterCurrentValues.has(e(this).text().trim())?t[i].filterCurrentValues.delete(e(this).text().trim()):t[i].filterCurrentValues.add(e(this).text().trim());let a=[...t[i].filterCurrentValues].join(", ");e("#"+i+" span.type-small-all").text(0===t[i].filterCurrentValues.size?"All":a),n(s,o),t[i].filterOpened=!0,setTimeout(function(){for(let e in t)d[e]={filterIndex:t[e].filterIndex,filterOpened:t[e].filterOpened,filterCurrentValues:[...t[e].filterCurrentValues],filterAvailableValues:[...t[e].filterAvailableValues]};let i=e("input[id^='edit-search']").val();d.search=i,sessionStorage.setItem(c,JSON.stringify(d))},200)})}};function n(a,o){let n=i;for(let e in t){if(t[e].filterCurrentValues.size<1)continue;let i=[];n.forEach(a=>{a[e].some(i=>t[e].filterCurrentValues.has(i))&&i.push(a)}),n=i}let s=n.map(e=>e.id);if("documents"===a){i.forEach(t=>{-1===s.indexOf(t.id)?e(o+".document-id-"+t.id).hide():e(o+".document-id-"+t.id).show()});const t=e(".col-12.view-header+.view-content.col-sm-12>.row");for(let e=0;e<t.length;e++){let i=t.eq(e);0===i.children(":visible").length?i.closest(".view-content.col-sm-12").prev(".col-12.view-header").hide():i.closest(".view-content.col-sm-12").prev(".col-12.view-header").show()}}
9else"products"===a&&i.forEach(t=>{-1===s.indexOf(t.id)?e(o+".product-id-"+t.id).hide():e(o+".product-id-"+t.id).show()})}e(document).ready(function(e){o(e,".view-product-card",".product-teaser","products","views-exposed-form-product-card-",".views-field-nothing","product-card"),o(e,".view-products-category",".product-teaser","products","views-exposed-form-products-category-",".views-field-nothing","products-category"),o(e,".view-products-with-documents-pages",".product-with-documents-teaser","documents","views-exposed-form-products-with-documents-pages-page-",".views-field-nothing-1","products-with-documents-pages"),a(e,".view-documents",".document-teaser","documents","views-exposed-form-documents-page-",".views-field-nothing","documents"),e('#page-wrapper[class^="Tikkurila"]').length||a(e,".view-products-with-documents",".product-with-documents-teaser","documents","views-exposed-form-products-with-documents-block-",".views-field-nothing-1","products-with-documents")})}(jQuery,Drupal)},932(){!function(e){function t(e){if(!e)return()=>{};e.setAttribute("role",e.getAttribute("role")||"dialog"),e.setAttribute("aria-modal","true"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1");let t=null,i=null;const a=()=>{const a=Array.from(e.querySelectorAll('a[href], area[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], [tabindex]:not([tabindex="-1"])')).filter(e=>null!==e.offsetParent||e===document.activeElement);t=a[0]||e,i=a[a.length-1]||e},o=t=>{e.contains(t.target)&&a()},n=e=>{"Tab"===e.key&&(t&&i||a(),e.shiftKey?document.activeElement===t&&(e.preventDefault(),i.focus()):document.activeElement===i&&(e.preventDefault(),t.focus()))};return document.addEventListener("focusin",o,!0),document.addEventListener("keydown",n,!0),setTimeout(()=>{a(),(t||e).focus()},0),function(){document.removeEventListener("focusin",o,!0),document.removeEventListener("keydown",n,!0)}}e(".js-form-type-checkbox").each(function(){e(this).bind("click",function(){!function(){let t=e("[id^=edit-basis-id-] button").attr("aria-expanded"),i=e("[id^=edit-gloss-id-] button").attr("aria-expanded"),a=e("[id^=edit-markings-id-] button").attr("aria-expanded"),o=e("[id^=edit-product-family-id-] button").attr("aria-expanded"),n=e("[id^=edit-color-category-id-] button").attr("aria-expanded"),s=e("[id^=edit-kulorkategori-] button").attr("aria-expanded"),l=e("[id^=edit-color-usage-id-] button").attr("aria-expanded");window.sessionStorage.setItem("basisStatus",t),window.sessionStorage.setItem("glossStatus",i),window.sessionStorage.setItem("markingsStatus",a),window.sessionStorage.setItem("productFamilyStatus",o),window.sessionStorage.setItem("colorStatus",n),window.sessionStorage.setItem("colorStatusAlcro",s),window.sessionStorage.setItem("colorUsageStatus",l)}()})}),e.fn.getDomainProtocolWithLanguage=function(){let t=window.location.protocol+"//"+window.location.hostname;const i=e("#language-prefix");return i.length&&"path_prefix"==i.data("lang-detection-config-type-prefix")&&(t+="/"+i.text()),t},e.fn.slideContainerCallAjax=function(t,i,a,o,n){let s=e("#"+t),l=e.fn.getDomainProtocolWithLanguage();e.ajax({type:"GET",url:l+"/custom/ajax/call",data:"parameter="+o+"&view_name="+i+"&block_name="+a,dataType:"html",async:!0,beforeSend:function(){n||s.css("transform","translateX(-"+s[0].offsetWidth+"px)")},complete:function(i){e("#"+t).empty().html(i.responseText),n||s.css("transform","translateX(0px)")}})},e.fn.remToPx=function(t){let i=e("html").css("font-size");return void 0!==t&&t>0?parseInt(i)*t:parseInt(i)},e.fn.checkedInputsLists=function(){e.fn.checkedInputsList("edit-color-category-id-","Color"),e.fn.checkedInputsList("edit-kulorkategori-","Color"),e.fn.checkedInputsList("edit-color-usage-id-","Color-usage"),e.fn.checkedInputsList("edit-basis-id-","Basis"),e.fn.checkedInputsList("edit-gloss-id-","Gloss"),e.fn.checkedInputsList("edit-markings-id-","Markings"),e.fn.checkedInputsList("edit-product-family-id-","Product-family"),e.fn.checkedInputsList("edit-content-type-","Filters"),e.fn.checkedInputsList("edit-field-usage-area-category-","Usage-area-category"),e.fn.checkedInputsList("edit-field-resource-type-id-","Resource-type"),e.fn.checkedInputsList("edit-field-p-areas-for-use
9-what-id-","Product-range-type")},e.fn.checkedInputsList=function(t,i){let a=[];e("[id^="+t+"] .fieldset-wrapper input:checked").each(function(){a.push(e(this).parent().find("label").text().trim())}),0!==a.length&&(e("[id^="+t+"] button .type-small .type-small-all").css("display","none"),["Color-usage","Product-field_p_areas_for_use_what","Product-range-type"].includes(i)&&a.length>1&&a.pop(),e("[id^="+t+"] button .type-small .type-small-selected").text(a.join(", ")))},e.fn.refreshShoppingList=function(){if(null!==sessionStorage.getItem("shoppingList")){let t=JSON.parse(sessionStorage.getItem("shoppingList"));null!==t?(e("#notification-shopping-list").hide(),e("#shopping-list-sidebar-footer").show()):(e("#notification-shopping-list").show(),e("#shopping-list-sidebar-footer").hide());let a=e("#sidebar-container-shopping-list section");a.empty();for(let e=0,i=t.length;e<i;e++){let i="";i=t[e].colorImage&&""!=t[e].colorImage?`<div class="shopping-list-color-icon"><img src='${t[e].colorImage}'/></div>`:`<div class="shopping-list-color-icon" style="background-color: ${t[e].colorStyle}"></div>`,a.append(`<div class="shopping-list-item-container">\n <a href="${t[e].productUrl}" class="shopping-list-product-container" id="product-${e}">\n <div class="shopping-list-tile-section">\n <img class="shopping-list-tile" src="${t[e].imageUrl}"/>\n ${i}\n </div>\n <div class="shopping-list-data-section">\n <p class="shopping-list-title">${t[e].title}</p>\n <p class="shopping-list-subtitle">${t[e].category}</p>\n <p class="shopping-list-subtitle">${t[e].colorName} • ${t[e].canAmount} × ${t[e].canSize}</p>\n </div>\n </a>\n <div class="remove-product-shopping-list-container">\n <div id="product-remove-button-${e}" class="shopping-list-remove-icon"></div>\n </div>\n </div>`)}e.fn.refreshShoppingListCount(),e(".shopping-list-remove-icon").bind("click",i)}};let i=function(){let t=JSON.parse(sessionStorage.getItem("shoppingList")),i=e(this).attr("id").match(/[0-9 -()+]+$/)[0],a="";for(let e=0,o=t.length;e<o;e++)e===parseInt(i)&&(a=t[e].title,t.splice(e,1));return sessionStorage.removeItem("shoppingList"),sessionStorage.setItem("shoppingList",JSON.stringify(t)),e.fn.displayNotificationShoppingList("remove",a),e.fn.refreshShoppingList(),!1};e.fn.displayNotificationShoppingList=function(t,i){let a=e("#notification-dialog"),o=e(".notification-message");o.empty(),a.show(),a.addClass("notificationAnimation");let n="";switch(n=jQuery("meta[name='color']").attr("content")?"product":"color",setTimeout(function(){a.hide(),a.removeClass("notificationAnimation")},3e3),t){case"add":o.text(`${i} ${e("#add-to-saved-list-text").text()}`);break;case"remove":o.text(`${i} ${e("#remove-from-saved-list-text").text()}`);break;case"validationForCanSize":o.text(`${e("#choose-a-size-text").text()}`);break;case"validationForCanAmount":o.text(`${e("#choose-a-amount-text").text()}`);break;default:o.text(`${e("#choose-a-type-text").text()}`)}},e.fn.refreshShoppingListCount=function(){let t=0;null!==JSON.parse(sessionStorage.getItem("shoppingList"))&&(t=JSON.parse(sessionStorage.getItem("shoppingList")).length);let i=e(".get-shopping-list-count"),a=e("#notification-shopping-list"),o=e("#shopping-list-sidebar-footer");i.text(t),t>0?(a.hide(),o.show(),i.css("visibility","visible"),i.show()):(a.show(),o.hide(),i.css("visibility","hide"),i.hide())},e.fn.closeAllModals=function(){e(".sidebar-modal").each(function(){const t=e(this),i=t.data("detachTrap");"function"==typeof i&&i(),t.hide();const a=t.data("triggerEl");var o;(o=a)instanceof HTMLElement&&o.isConnected&&setTimeout(()=>{try{o.focus({preventScroll:!0})}catch(e){}},0),t.removeData("detachTrap").removeData("triggerEl")}),o=!1,n=!1,l=!1,d=!1,v=!1,s=!1,e("body").removeClass("is-disabled"),e.each(r,e=>{r[e]=!1})},e.fn.preventScrollDesktop=function(){return this.bind("mousewheel DOMMouseScroll",function(t){t.stopPropagation();let i=t.wheelDelta||t.originalEvent&&t.originalEvent.wheelDelta||-t.detail,a=this.scrollTop+e(this).outerHeight()-this.scrollHeight>=0,o=this.scrollTop<=0;(i<0&&a||i>0&&o)&&t.preventDefault()}),this};let a=!1;e(".burgerMenu").on("click",function(){let t=e("#mobileView");!1===a?(t.show(),t.addClass("mobileViewOpen"),a=!0):(t.hide(),t.removeClass("mobileViewOpen"),a=!1)});let o=!1;e("#page-header__widget-button--save, #saved-button, #save-sidebar-modal .close, #saved-button-mobile").on("click",function(){if(!1===o){e.fn.closeAllModals();const i=e("#save-sidebar-modal"),a=t(i[0]);i.show().data("detachTrap",a).data("triggerEl",this),o=!0,e.fn.refreshSavedList()}else e.fn.closeAllModals()});let n=!1;e("#page-header__widget-button--search, #search-button, #search-button-mobile, #search-sidebar-modal .close, .header-extraSearchButton").on("click",function(){if(!1===n){e.f
9n.closeAllModals();const i=e("#search-sidebar-modal"),a=t(i[0]);i.show().data("detachTrap",a).data("triggerEl",this),n=!0}else e.fn.closeAllModals()});let s=!1;e("#shopping-list-button, #shopping-list-sidebar-modal .close").on("click",function(){if(!1===s){e.fn.closeAllModals();const i=e("#shopping-list-sidebar-modal"),a=t(i[0]);i.show().data("detachTrap",a).data("triggerEl",this),s=!0,e.fn.refreshShoppingList()}else e.fn.closeAllModals()});let l=!1,r=[],c=0;e("[id^=open-image-colors-], [id^=close-image-colors-]").on("click",function(i){if(c=e(this).attr("id").split("-").pop(),void 0===r[c]||!1===r[c]){e.fn.closeAllModals();const i=e("#sidebar-modal-image-colors-"+c),a=t(i[0]);i.show().data("detachTrap",a).data("triggerEl",this),r[c]=!0}else e.fn.closeAllModals()});let d=!1;e("#sidebar-back-link-choose-color").on("click",function(t){let i=e("#nodeId").text(),a=e("#nodeCategory").text();e.fn.slideContainerCallAjax("sidebar-container-choose-color","products_modal_colors","block_1",i+","+a,!1),e("#sidebar-modal-choose-color .choose-color-header").fadeIn(300).show(),e("#sidebar-modal-choose-color #sidebar-back-link-choose-color").hide()}),e("#add-to-shopping-list-button").on("click",function(t){let i=e("#remove-color-button"),a=e("#remove-product-button"),o=e(".full-product-image .field__item img").attr("src"),n=e("#can-sizes-select option:selected"),s=e("#can-sizes-select option:first"),l=e("#can-amount-select option:selected"),r=e("#can-amount-select option:first"),c=!1,d=!1,h=e(".productTitle").text().trim(),u=e(".productCategory").text().trim(),p=e(".chooseColorTitle").text().trim(),m=e(".chooseColorImage").find("img").attr("src"),f=e(".chooseColorImage").css("background-color"),g=e(".chooseProductUrl").text().trim(),v=!1,b=!1;e("meta[name='color']").attr("content")&&(m=e(".field--name-field-c-image").find("img").attr("src"),f=e(".field--name-field-c-rgb-id").css("background-color"),o=e(".chooseProductImage img").attr("src"),h=e(".chooseProductTitle p").text().trim(),u=e(".chooseProductTitle span").text().trim(),p=e("#color-full-view-title").text().trim(),n=e("#select-can-size option:selected"),s=e("#select-can-size option:first"),l=e("#can-amount-select option:selected"),r=e("#can-amount-select option:first"));let w=[];if(null!==sessionStorage.getItem("shoppingList")&&(w=JSON.parse(sessionStorage.getItem("shoppingList")),e("#notification-shopping-list").hide(),e("#shopping-list-sidebar-footer").show()),e("meta[name='color']").attr("content")?(c=!1,"block"==a.css("display").toLowerCase()&&(d=!0)):(d=!1,"block"==i.css("display").toLowerCase()&&(c=!0)),n.val()!==s.val()&&(v=!0),l.val()!==r.val()&&(b=!0),(c||d)&&b&&v){let t={title:h,category:u,colorName:p,colorImage:m,colorStyle:f,canSize:n.text().trim(),canAmount:l.text().trim(),imageUrl:o,productUrl:g};w.push(t),sessionStorage.setItem("shoppingList",JSON.stringify(w)),e.fn.refreshShoppingListCount(),e.fn.refreshShoppingList(),e.fn.displayNotificationShoppingList("add",h),jQuery("meta[name='color']").attr("content")?(e("#can-amount-select").val("").change(),e(".chooseProductImage").addClass("linearBackground"),e(".chooseProductImage img:last-child").remove(),e(".chooseProduct").show(),e(".chooseProductTitle").text(""),e(".chooseProductTitle").hide(),e(".chooseProductUrl").text(""),e(".chooseProductrId").text(""),e(".removeProductBtn").hide(),e("#select-can-size").val("").change()):(e("#can-sizes-select").val("").change(),e("#can-amount-select").val("").change(),e(".chooseColorImage").addClass("linearBackground"),e(".chooseColorImage").css("background-color","none"),e(".chooseColorImage").find("img").remove(),e(".chooseColor").show(),e(".chooseColorTitle").text(""),e(".chooseColorTitle").hide(),e(".chooseColorId").text(""),e(".removeColorBtn").hide())}else!c&&!d||v||b&&!b?(c||d)&&v&&!b?e.fn.displayNotificationShoppingList("validationForCanAmount"):e.fn.displayNotificationShoppingList():e.fn.displayNotificationShoppingList("validationForCanSize")});let h,u,p,m,f,g,v=!1;e("#choose-product-button").on("click",function(){let t=e("#nodeId").text(),i=e("#nodeCategory").text();return e.fn.slideContainerCallAjax("sidebar-container-choose-product","colors_modal_products","block_1",t+","+i,!0),e("#sidebar-modal-choose-product .chose-product-header").show().fadeIn(300),e("#sidebar-modal-choose-product #sidebar-back-link-choose-product").hide(),!1}),e("#sidebar-back-link-choose-product").on("click",function(){let t=e("#nodeId").text(),i=e("#nodeCategory").text();e.fn.slideContainerCallAjax("sidebar-container-choose-product","colors_modal_products","block_1",t+","+i,!1),e("#sidebar-modal-choose-product .chose-product-header").fadeIn(300).show(),e("#sidebar-modal-choose-product #sidebar-back-link-choose-product").hide()}),e("#remove-product-button").on("click",function(t){t.stopPropagation(),e("#select-can-size").find("option:not(:first)").remove(),e("#can-amount-select").val(e("#can-amount-selected option:first").val()),e(".chooseProductImage").addClass("linearBackgroun
9d"),e(".chooseProductImage img:last-child").remove(),e(".chooseProduct").show(),e(".chooseProductTitle").text(""),e(".chooseProductTitle").hide(),e(".chooseProductUrl").text(""),e(".chooseProductId").text(""),e(".removeProductBtn").hide()}),e(".view-colors-modal-products .products-link a").click(function(t){t.stopPropagation(),t.preventDefault();let i=e(this).attr("href").split("/")[1],a=e("#nodeId").text();return e.fn.slideContainerCallAjax("sidebar-container-choose-product","colors_modal_products_category","block_1",a+","+i.replace(/_/g,","),!1),e("#sidebar-modal-choose-product .chose-product-header").fadeOut(300).hide(300),e("#sidebar-back-link-choose-product").show(),!1}),e.fn.preventScrollDesktop=function(){return this.bind("mousewheel DOMMouseScroll",function(t){t.stopPropagation();let i=t.wheelDelta||t.originalEvent&&t.originalEvent.wheelDelta||-t.detail,a=this.scrollTop+e(this).outerHeight()-this.scrollHeight>=0,o=this.scrollTop<=0;(i<0&&a||i>0&&o)&&t.preventDefault()}),this},e.fn.stopPropagationOnTouchMove=function(){return this.bind("touchmove",function(e){let t=this.scrollTop<=0,i=this.scrollTop+this.offsetHeight>=this.scrollHeight,a=e.changedTouches[0].clientY;u&&(t&&a>h||i&&a<h)&&(p=!0),p||e.stopPropagation(),u=!1}),this},e.fn.preventTouchMoveIfSidebar=function(){this.bind("touchmove",function(t){let i=!1;e(".sidebar-modal").each(function(){"block"===e(this).css("display")&&(i=!0)}),i&&t.preventDefault()})},e.fn.savePositionOnTouchStart=function(){return this.bind("touchstart",function(e){u=!0,p=!1,h=e.originalEvent.touches[0].clientY}),this},e("#height-calc-content-area .range-field, #weight-calc-content-area .range-field").on("touchstart",function(t){m=parseFloat(e(this).val()),f=!0,g=0}),e("#height-calc-content-area .range-field, #weight-calc-content-area .range-field").on("touchmove",function(t){g+=1,2===g&&(f=m!==parseFloat(e(this).val())),f&&t.stopPropagation()}),document.addEventListener("touchmove",function(t){let i=!1;e(".sidebar-modal").each(function(){"block"===e(this).css("display")&&(i=!0)}),i&&t.preventDefault()},{passive:!1}),e(".sidebar-modal").each(function(){e(this).on("mousewheel DOMMouseScroll",function(e){e.preventDefault()})}),e(".sidebar-container").each(function(){e(this).preventScrollDesktop().stopPropagationOnTouchMove().savePositionOnTouchStart()}),e(document).ready(function(){if(0===e(".node--type-campaign").length){e(".paragraph--highlighted").each(function(){e(this).parent().addClass("field__item__highlighted")});const t=e(".field__item__highlighted").first();t.next().hasClass("field__item__highlighted")||t.addClass("field__item__highlighted__first"),e(".paragraph--type--set-of-text-links, .paragraph--type--set-of-youtube-videos").each(function(){e(this).parent().addClass("field__item__extend")})}e(".carousel").carousel({interval:!1}),e(".accordionSectionBtn").on("click",function(){e(this).children(".expand-arrow").toggleClass("rotated");let t=e(this).siblings().children(".expand-arrow");t.hasClass("rotated")&&t.toggleClass("rotated")}),function(){let t=window.sessionStorage.getItem("basisStatus"),i=window.sessionStorage.getItem("glossStatus"),a=window.sessionStorage.getItem("markingsStatus"),o=window.sessionStorage.getItem("productFamilyStatus"),n=window.sessionStorage.getItem("colorStatus"),s=window.sessionStorage.getItem("colorStatusAlcro"),l=window.sessionStorage.getItem("colorUsageStatus");"true"===t&&e("[id^=edit-basis-id-] .accordionSectionBtn").click(),"true"===i&&e("[id^=edit-gloss-id-] .accordionSectionBtn").click(),"true"===a&&e("[id^=edit-markings-id-] .accordionSectionBtn").click(),"true"===o&&e("[id^=edit-product-family-id-] .accordionSectionBtn").click(),"true"===n&&e("[id^=edit-color-category-id-] .accordionSectionBtn").click(),"true"===s&&e("[id^=edit-kulorkategori-] .accordionSectionBtn").click(),"true"===l&&e("[id^=edit-color-usage-id-] .accordionSectionBtn").click(),window.sessionStorage.removeItem("basisStatus"),window.sessionStorage.removeItem("glossStatus"),window.sessionStorage.removeItem("markingsStatus"),window.sessionStorage.removeItem("productFamilyStatus"),window.sessionStorage.removeItem("colorStatus"),window.sessionStorage.removeItem("colorStatusAlcro"),window.sessionStorage.removeItem("colorUsageStatus")}(),e('form[id^="views-exposed-form"]').each(function(){let t=e(this).attr("action");e(this).attr("action",t.replace(new RegExp("/all$"),""))}),e.fn.refreshShoppingListCount(),"function"==typeof e.fn.refreshSavedListCount&&e.fn.refreshSavedListCount(),e("#nav-burger-icon").on("click",function(){e(this).toggleClass("open"),e(this).toggleClass("fill-white"),e(".navigationButtons").toggleClass("fill-white"),e("#logo-beckers-mobile").toggleClass("fill-white"),e(".accountAlignEnd").toggleClass("fill-white"),e("body").toggleClass("is-disabled"),e("#navbar-top").toggleClass("mobile-background")}),null===sessionStorage.getItem("savedList")&&sessionStorage.setItem("savedList",JSON.stringify([])),"function"==typeof e.fn.checkSavedList&&e.fn.checkSavedList(),e(".view-id-documents").length&&(e.fn.addBehaviorsProDocuments(),e.fn.addBehaviorsProDocumentsModal()),e(document).ajaxComplete(function(t,i,a){(e(".view-id-products_with_documents_by_id").length||e(".view-id-products_with_documents").length||e(".view-id-list_of_products_by_ryl").length||e(".view-id-product_search").length)&&e.fn.addBehaviorsDocuments()}),(e(".view-id-products_with_documents_by_id").length||e(".view-id-products_with_documents").length||e(".view-id-list_of_products_by_ryl").length||e(".view-id-product_search").length)&&e.fn.addBehaviorsDocuments(),e("#sender-email-modal-input").keypress(function(t){13==t.keyCode&&e("#emails-send-button").click()})}),e(document).ajaxStop(function(){"function"==typeof e.fn.checkSavedList&&e.fn.checkSavedList(),e(".view-id-documents").length&&e.fn.addBehaviorsProDocuments()}),e(window).on("load",function(){e(".video-play-button").on("click",function(){let t=e(this).attr("id").split("-").pop();e("#video-cover-"+t).removeClass("is-visible"),e("#video-container-"+t+" iframe")[0].src+="&autoplay=1"});let t=["colors_category","products_category"];if(e.fn.checkedInputsLists(),e(document).ajaxComplete(function(i,a,o){o.extraData&&t.indexOf(o.extraData.view_name)>-1&&e.fn.checkedInputsLists()}),e(".view-colors-collection").length){const t=e(".view-colors-collection > .views-infinite-scroll-content-wrapper, .view-colors-collection > .view-content");t.length&&t.addClass("row")}e(".informationSectionBtn").on("click",function(){e(this).children(".expand-arrow").toggleClass("rotated")}),e("[id^=edit-color-usage-id-] .accordionSectionBtn").click(),e("[id^=edit-content-type-] .accordionSectionBtn").click(),e("[id^=edit-field-usage-area-category-target-id-] .accordionSectionBtn").click()}),e(window).on("load resize",function(){let t=`tel:${e("#contact-us-phone-number").text()}`;e(window).width()<768?(e("#call-us-link a").attr("href",t),e("#call-us-link").attr("data-bs-target","")):(e("#call-us-link a").attr("href","#"),e("#call-us-link").attr("data-bs-target","#phoneModal"))}),window.addEventListener("keydown",t=>{"Escape"===t.key&&e.fn.closeAllModals()})}(jQuery,Drupal)},110(){!function(e){e(window).on("resize",function(){e(".node--type-campaign").length||s()}),e(document).ready(function(){e(".node--type-campaign").length||s()});let t=!1,i=!1,a=!1,o=!1;const n=e(".paragraph--type--image, .paragraph--type--text,\n .paragraph--type--cta-attach-hubspot-script, .paragraph--type--people-block,\n .paragraph--type--products-table, .paragraph--type--industry-systems-table-by-type,\n .paragraph--type--industry-systems-table, .paragraph--type--set-of-colors,\n .paragraph--type--set-of-inspirations, .paragraph--type--set-of-products,\n .paragraph--type--set-of-custom-links-with-button, .paragraph--type--quote,\n .paragraph--type--tests-and-standards, .paragraph--type--section-header,\n .paragraph--type--set-of-products-with-button, .paragraph--type--anchor-link");function s(){const n=e(window).width()>=768&&e(window).width()<1200,s=e(window).width()>=1200&&e(window).width()<1600;e(window).width()>=1600?o||(t=!1,i=!1,a=!1,o=!0,l(!0),c(!0)):s?a||(t=!1,i=!1,a=!0,o=!1,l(!0),c(!0)):n?i||(t=!1,i=!0,a=!1,o=!1,l(!0),c(!0)):t||(t=!0,i=!1,a=!1,o=!1,l(!1),c(!1))}
9function l(t){if(e(".node--type-inspiration").length||e(".node--type-article").length||e(".node--type-trend").length||e(".node--type-campaign").length||e(".node--type-idea").length){let i=0,a=0,o=0;n.each(function(){e(this).attr("data-initial-order",i+1),0===a&&e(this).addClass("first-element");const t=r(e(this).attr("class")),o=r(e(this).next().attr("class"));a+=parseInt(t),!(a>=10||a>=8&&o>4||o>=10)&&(e(this).next().hasClass("paragraph--type--image")||e(this).next().hasClass("paragraph--type--text")||e(this).next().hasClass("paragraph--type--cta-attach-hubspot-script")||e(this).next().hasClass("paragraph--type--people-block")||e(this).next().hasClass("paragraph--type--products-table")||e(this).next().hasClass("paragraph--type--industry-systems-table")||e(this).next().hasClass("paragraph--type--industry-systems-table-by-type")||e(this).next().hasClass("paragraph--type--set-of-inspirations")||e(this).next().hasClass("paragraph--type--set-of-colors")||e(this).next().hasClass("paragraph--type--set-of-products")||e(this).next().hasClass("paragraph--type--set-of-products-with-button")||e(this).next().hasClass("paragraph--type--set-of-custom-links-with-button")||e(this).next().hasClass("paragraph--type--quote")||e(this).next().hasClass("paragraph--type--tests-and-standards")||e(this).next().hasClass("paragraph--type--section-header"))||(e(this).addClass("last-element"),a=0),i++}),n.each(function(){e(this).hasClass("paragraph-image-container")&&e(this).hasClass("paragraph-small-container")&&((e(this).hasClass("first-element")&&e(this).next().hasClass("paragraph--type--text")||e(this).hasClass("last-element")&&e(this).prev().hasClass("paragraph--type--text"))&&e(this).addClass("js-justifycontent-container"),e(this).hasClass("caption-image-container")&&e(this).hasClass("first-element")&&!e(this).hasClass("last-element")&&e(this).next().hasClass("paragraph--type--image")&&(e(this).addClass("js-imageswithcaption-container"),e(this).next().addClass("js-imageswithcaption-container"),e(this).hasClass("col-md-4")&&e(this).next().hasClass("col-md-4")&&e(this).next().next().addClass("js-imageswithcaption-container")),e(this).hasClass("caption-image-container")&&e(this).hasClass("last-element")&&!e(this).hasClass("first-element")&&e(this).prev().hasClass("paragraph--type--image")&&(e(this).addClass("js-imageswithcaption-container"),e(this).prev().addClass("js-imageswithcaption-container"),e(this).hasClass("col-md-4")&&e(this).prev().hasClass("col-md-4")&&e(this).prev().prev().addClass("js-imageswithcaption-container")),e(this).hasClass("caption-image-container")&&!e(this).hasClass("last-element")&&!e(this).hasClass("first-element")&&e(this).prev().hasClass("paragraph--type--image")&&(e(this).addClass("js-imageswithcaption-container"),e(this).prev().addClass("js-imageswithcaption-container"),e(this).next().addClass("js-imageswithcaption-container")))}),n.each(function(){if(e(this).hasClass("paragraph-image-container")&&e(this).hasClass("paragraph-small-container")){e(this).hasClass("first-element")&&(o=0);let i=e(this).children().first(),a=i.children().first();if(t){if(e(this).hasClass("js-imageswithcaption-container")){if(0!==o||e(this).hasClass("paragraph-video-container")){if(e(this).hasClass("paragraph-video-container")){let t=e(this).find("iframe");o=t.height()}}else{let e=i.width(),t=parseInt(a.attr("data-rendered_width")),n=parseInt(a.attr("data-rendered_height"));o=n/(t/e),isNaN(parseInt(o))&&(o="500px")}i.css("height",o),a.css("height",o),a.css("width","100%")}}else i.css("height","100%"),a.css("height","100%"),a.css("width","100%")}e(this).hasClass("paragraph-text-container")&&e(this).hasClass("paragraph--type--text--highlighted")&&(e(this).addClass("paragraph-small-container--bigger-margin"),e(this).hasClass("first-element")&&!e(this).hasClass("last-element")&&e(this).next().hasClass("paragraph--type--image")&&e(this).next().addClass("paragraph-small-container--bigger-margin"),e(this).hasClass("last-element")&&!e(this).hasClass("first-element")&&e(this).prev().hasClass("paragraph--type--image")&&e(this).prev().addClass("paragraph-small-container--bigger-margin")),e(this).hasClass("paragraph--type--industry-systems-table")&&e(this).next().hasClass("paragraph--type--industry-systems-table")&&(e(this).addClass("mb-0"),e(this).next().addClass("paragraph--type--industry-systems-table--without-top-margin"))}
9),e(".field--name-field-inspirations .field__item.row").not(".field__item__with_background").each(function(){e(this).next().hasClass("field__item__with_background")&&e(this).addClass("no-padding-bottom")})}}function r(e){let t=12;if(e){const i=/(?:^|\s)col-md-(\d+)(?:\s|$)/,a=e.match(i);a&&(t=a[1])}return t}function c(t){let i,a,o=0;if(t){n.each(function(){o=parseInt(e(this).attr("data-initial-order")),e(this).css("order",o)});let t=0;n.each(function(){i=e(this).prev(),a=e(this).next(),e(this).hasClass("first-element")&&(e(this).hasClass("paragraph-small-container")&&i.hasClass("paragraph-small-container")&&i.hasClass("paragraph-text-container")&&a.hasClass("paragraph-text-container")?t++:t=0),t%2!=0&&e(this).hasClass("first-element")&&e(this).hasClass("paragraph--type--image")&&e(this).hasClass("paragraph-small-container")&&a.hasClass("paragraph--type--text")&&a.hasClass("paragraph-small-container")&&a.hasClass("last-element")&&(o=parseInt(e(this).attr("data-initial-order")),e(this).css("order",o+1).addClass("paragraph-small-container--switched-order--even"),e(this).next().css("order",o).addClass("paragraph-small-container--switched-order"))})}else n.each(function(){o=parseInt(e(this).attr("data-initial-order")),e(this).css("order",o)}),n.each(function(){a=e(this).next(),e(this).hasClass("paragraph--type--text")&&e(this).hasClass("first-element")&&a.hasClass("paragraph--type--image")&&a.hasClass("paragraph-small-container")&&!a.hasClass("first-element")&&(o=parseInt(e(this).attr("data-initial-order")),e(this).css("order",o+1),e(this).next().css("order",o).addClass("paragraph-small-container--switched-order"))})}}(jQuery)},49(){var e;(e=jQuery)(document).ready(function(){e('#page-wrapper[class^="Tikkurila"]').length||e(".node__content").filter(":last").hasClass("field__item__highlighted")&&(e(".main-content").addClass("no-margin-bottom"),e(".field--name-field-set-of-links").addClass("no-margin-bottom"))})},856(){!function(e,t){const i=e(".email-shops-url").text(),a=e(".email-documents-url").text();function o(){let e="CON";return"Industry"===t.sii_datalayer.pageInfo.targetGroup?e="IND":"Professional"===t.sii_datalayer.pageInfo.targetGroup&&(e="PRO"),e}function n(){e("#email-mark-invalid-email").hide(),e("#email-mark-empty-email").hide(),e("#email-mark-error-response").hide(),e("#email-mark-error-response").text("")}function s(){let t=e("#sender-email-modal-input").val();if(e("#sender-email-modal-input").on("input",function(){n()}),0===t.length)return e("#email-mark-empty-email").show(),e("#email-mark-invalid-email").hide(),!1;{n(),t=t.split(",");let i=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;for(let a=0,o=t.length;a<o;a++){if(t[a]=t[a].trim(),!t[a].match(i))return e("#email-mark-invalid-email").show(),!1;n()}}return t}function l(t,i){e.ajax({url:i,method:"POST",dataType:"json",beforeSend:function(){e("#emails-send-button").prop("disabled",!0)},success:function(){e("#emails-send-button").prop("disabled",!1)},data:t}).always(function(t){"success"==t.message?(n(),e("#close-sender-email-modal span").click(),e("#sender-email-modal-input").val("")):(e("#email-mark-error-response").show(),e("#email-mark-error-response").text(t.responseJSON.message),e("#emails-send-button").prop("disabled",!1))}),n()}e("#sender-email-modal").on("click",function(t){e(t.target).parent().attr("data-bs-dismiss")&&(n(),e("#sender-email-modal-input").val(""))});let r="";e("#sender-email-modal").on("show.bs.modal",function(t){r=e(t.relatedTarget).data("send")}),e("#send-by-email-saved-list").click(function(){e("#sender-email-modal").data("send","saved")}),e("#send-by-email-shopping-list").click(function(){e("#sender-email-modal").data("send","shopping")}),e("#document-send-button").click(function(){e("#sender-email-modal").data("send","downloadList")}),e("#send-by-email-estimate-quantity").click(function(){e("#sender-email-modal").data("send","quantity")}),e("#emails-send-button").click(function(){let t=s();if(!1!==s()){const n={SendShoppingSaved:"/custom/ajax/send_products_by_email",SendD
9ocuments:"/custom/ajax/send_documents_by_email",SendCalculator:"/custom/ajax/send_calculator_by_email",SendQuantity:"/custom/ajax/send_quantity_by_email"};if("paintConsumption"==r){let s=function(t){let n=e("#header-email-text").length?e("#header-email-text")[0].innerText:"",s=[...e("label.Input-label")].map(e=>e.innerText),l={segment:o(),find_store_url:i,documents_url:a,calculatorData:[{headerText:n,headers:s,height:e(".paintCalc .Input-field.height")[0].value,width:e(".paintCalc .Input-field.width")[0].value,coverage:e(".paintCalc .Input-field.coverage")[0].value,treatments:e(".paintCalc .Input-field.treatments")[0].value,consumption:e(".paintCalc .consumption-text")[0].innerText}],emails:t,emailKey:"send_calculator_paint"};return l=JSON.stringify(l,null," "),l}(t);return void l(s,n.SendCalculator)}if("metalCalculation"==r){let s=function(t){let n=e("tr.Calc-tableRow.Calc-tableRow-md-hideLabels"),s=e("tr.Calc-tableRow.Calc-tableRow--header.Calc-tableRow-sm-hide"),l=e("#header-email-text").length?e("#header-email-text")[0].innerText:"",r=[];for(let e=0,t=n.length;e<t;e++)r.push({name:n[e].cells[0].innerText,dft:n[e].cells[1].innerText,pc:n[e].cells[2].innerText,tc:n[e].cells[3].innerText,tco:n[e].cells[4].innerText,cpm:n[e].cells[5].innerText});let c=[...s[0].cells].map(e=>e.innerText);r[r.length-1].name=e(".Calc-tableRow--header .type-subhead1").last().text();let d={segment:o(),find_store_url:i,documents_url:a,calculatorData:[{headerText:l,headers:c,calculation:r}],emails:t,emailKey:"send_calculator_metal_costs"};return d=JSON.stringify(d,null," "),d}(t);return void l(s,n.SendCalculator)}if("woodCalculation"==r){let s=function(t){let n=e("tr.Calc-tableRow.Calc-tableRow-md-hideLabels"),s=e("tr.Calc-tableRow.Calc-tableRow--header.Calc-tableRow-sm-hide"),l=e("#header-email-text").length?e("#header-email-text")[0].innerText:"",r=[];for(let e=0,t=n.length;e<t;e++)r.push({name:n[e].cells[0].innerText,dfw:n[e].cells[1].innerText,dft:n[e].cells[2].innerText,cm:n[e].cells[3].innerText,cs:n[e].cells[4].innerText});let c=[...s[0].cells].map(e=>e.innerText);r[r.length-1].name=e(".Calc-tableRow--header .type-subhead1").last().text();let d={segment:o(),find_store_url:i,documents_url:a,calculatorData:[{headerText:l,headers:c,calculation:r}],emails:t,emailKey:"send_calculator_wood_costs"};return d=JSON.stringify(d,null," "),d}(t);return void l(s,n.SendCalculator)}if("vocCalculation"==r){let s=function(t){let n=e("tr.Calc-tableRow.Calc-tableRow-md-hideLabels"),s=e("tr.Calc-tableRow.Calc-tableRow--header.Calc-tableRow-sm-hide"),l=e("#header-email-text").length?e("#header-email-text")[0].innerText:"",r=[];for(let e=0,t=n.length;e<t;e++)r.push({name:n[e].cells[0].innerText,usage:n[e].cells[1].innerText,vocg:n[e].cells[2].innerText,vock:n[e].cells[3].innerText});let c=[...s[0].cells].map(e=>e.innerText);r[r.length-1].name=e(".Calc-tableRow--header .type-subhead1").last().text();let d={segment:o(),find_store_url:i,documents_url:a,calculatorData:[{headerText:l,headers:c,calculation:r}],emails:t,emailKey:"send_calculator_metal_voc"};return d=JSON.stringify(d,null," "),d}(t);return void l(s,n.SendCalculator)}if("layerData"==r){let s=function(t){let n=e("#header-email-text").length?e("#header-email-text")[0].innerText:"",s={},l={},r={},c={},d={},h={},u={},p=[];e(".Calc-table").each(function(t,i){$this=e(this),s[t]=$this.find(".Calc-textLabel"),l[t]=[...s[t]].map(e=>e.innerText),r[t]=$this.find(".Calc-textValue"),c[t]=[...r[t]].map(e=>e.innerText),d[t]=e(".Calc-panel .type-body1")[0],u[t]=e(".Calc-panel .type-body1")[1],h[t]=e(".Calc-panel .type-subhead1")[t],p.push({headerText:n,headers:l[t],values:c[t],calcTitle:e("#page-title")[0].innerText,resultText:d[t].innerText,resultDesc:u[t].innerText,resultCalc:h[t].innerText})});let m={segment:o(),find_store_url:i,documents_url:a,calculatorData:p,emails:t,emailKey:"send_calculator_layer"};return m=JSON.stringify(m,null," "),m}(t);return void l(s,n.SendCalculator)}if("saved"==e("#sender-email-modal").data().send){let s=function(t){let n={list_type:"favourites",header_label:e("#save-sidebar-modal .sidebar-title").text(),header_fav_products:e("#label-saved-products").text(),header_fav_colors:e("#label-saved-colors").text(),label_find_a_store_label:e("#save-sidebar-modal #find-a-store-label").text(),label_find_your_store_label:e("#save-sidebar-modal #find-your-store-label").text(),label_find_desc_store_label:e("#save-sidebar-modal #find-desc-store-label").text(),segment:o(),find_store_url:i,documents_url:a,products:[],colors:[],emails:t},s=JSON.parse(sessionStorage.getItem("savedList")),l=s.filter(e=>"product"===e.item);if(null!==l)for(let e=0,t=l.length;e<t;e++)n.products.push({name:l[e].title,family:l[e].category,link:l[e].url,img:l[e].image});let r=s.filter(e=>"color"===e.item);if(null!==r)for(let e=0,t=r.length;e<t;
9e++)n.colors.push({name:r[e].title,ncs:r[e].category,link:r[e].url,rgb:r[e].color,img:r[e].image});return n=JSON.stringify(n,null," "),n}(t);return void l(s,n.SendShoppingSaved)}if("shopping"==e("#sender-email-modal").data().send){let s=function(t){let n={list_type:"shopping",header_label:e("#save-sidebar-modal .sidebar-title").text(),segment:o(),find_store_url:i,documents_url:a,products:[],colors:[],emails:t},s=JSON.parse(sessionStorage.getItem("shoppingList"));if(null!==s)for(let e=0,t=s.length;e<t;e++)n.products.push({name:s[e].title,family:s[e].colorName+" - "+s[e].category+" • "+s[e].canAmount+" × "+s[e].canSize,link:s[e].productUrl,img:s[e].tileUrl});return n=JSON.stringify(n,null," "),n}(t);return void l(s,n.SendShoppingSaved)}if("downloadList"==e("#sender-email-modal").data().send){let a=function(t){let a={segment:o(),find_store_url:i,documents_url:window.location.href,documents:[],emails:t};return e("#pro-documents .pro-files--checkbox:checked, #pro-documents-tikkurila .pro-files--checkbox:checked, #pro-documents-table .pro-files--checkbox:checked, .product-with-documents-teaser .pro-files--checkbox:checked").each(function(){a.documents.push({name:e(this).data("filename"),link:e(this).data("url")})}),a=JSON.stringify(a,null," "),a}(t);return void l(a,n.SendDocuments)}if("quantity"==e("#sender-email-modal").data().send){let s=function(t){let n="";n=e('#page-wrapper[class^="Tikkurila"]').length?e("#product-type-data-maling").text()?e("#product-type-data-maling").text():"":e(".productCategory").text()?e(".productCategory").first().text():"";let s={segment:o(),find_store_url:i,documents_url:a,product:[{name:e(".productTitle").first().text(),family:n,link:window.location.href,img:e("link[rel='image_src']").attr("href")}],needs_label:e("#paint-calculator-modal .view-footer p").html(),emails:t};return s=JSON.stringify(s,null," "),s}(t);return void l(s,n.SendQuantity)}return}}),e(document).ready(function(){e("#sender-email-modal-input").keypress(function(t){13==t.keyCode&&e("#emails-send-button").click()})})}(jQuery,drupalSettings)},708(){!function(e){function t(t){const i=e(".mainLogo"),a=i.length?i[0].innerHTML:"";let o=e("head");o=o[0].innerHTML,o=o.replace(/<script>(.*)<\/script>/g,""),o=o.replace(/<script (.*)>(.*)<\/script>/g,""),o=o.replace(/<script[^>]*>(?:(?!<\/script>)[^])*<\/script>/g,"");let n="";n+=o,n+=function(){let e="<style>";return e+="body {padding: 25px;background: white;}\n",e+="@media print {body { -webkit-print-color-adjust: exact;}}\n",e+="a {text-decoration: none !important;}\n",e+=".saved-list-title {color: #222 !important;}\n",e+=".saved-list-subtitle {color: #767676 !important;height: 23px}\n",e+="#sidebar-container-saved, #sidebar-container-shopping-list {height: initial;overflow: initial;padding: 0width: 100%}\n",e+=".shopping-list-item-container {margin-bottom: 1.125em;width: 100%;position: relative;clear: both;}\n",e+=".sidebar-title, #shopping-list-sidebar-modal .sidebar-title {font-size: 1.5em;position: relative;height: 5em;margin: 0 0 -1px 0;display: -ms-flexbox;display: flex;-ms-flex-align: center;align-items: center;line-height: 0.9;}\n",e+=".sidebar-header {margin-left: -15px !important;}\n",e+=".sidebar-container, .sidebar-header {margin: 0;padding: 0;}\n",e+=".shopping-list-data-section {width: 320px;padding-top: 3px;}\n",e+=".contextual, .link-wrapper, .bookmark-link, .view-footer, .close, .shopping-list-remove-icon, .add-item-to-saved-list-container, .section{display: none;}\n",e+=".beckersIcon {align-self: flex-start;margin-bottom: 30px;}\n",e+="#logo-beckers, svg {width: 79px;height: 60px;}\n",e+=".saved-list-tile-section, .shopping-list-tile-section { height: 4.5em;width: 3.375em;background: #f5f5f5;float: left;position: relative;margin-right: 1em;}\n",e+=".saved-list-modal-subtitle {font-size: 1.125em;font-weight: 500;line-height: 1.3;letter-spacing: -.02em;margin: 0;padding: 0 0 1.5em;}\n",e+=".saved-list-item-container.last-product { margin-bottom: 3em;}\b",e+=".shopping-list-color-icon {width: .75em;height: .75em;border-radius: 2px;position: absolute;top: 2px;left: 2px;}\n",e+=".shopping-list-tile {height: 50%;width: 80%;mix-blend-mode: multiply;margin-left: 7px;margin-top: 25px;}\n",e+=".color-saved-list-image, #sidebar-modal-choose-color .views-field-field-c-rgb-id {width: 54px;
9height: 54px;float: left;border-radius: 6pxmargin-right: 16pxposition: relative}\n",e+=".shopping-list-data-section p, .saved-list-data-section p {margin-bottom: 0;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: block;min-width: 0;margin-right: 1.5em;color: #222 !important;}\n",e+=".shopping-list-subtitle, .saved-list-subtitle {font-weight: 400;font-size: .875em;line-height: 1.714;color: #767676;}\n",e+=".saved-list-item-container {position: relative;width: 100%;margin-bottom: 18px;clear: both;}\n",e+=".saved-list-data-section {width: initial;}\n",e+="</style>","<style>body {padding: 25px;background: white;}\n@media print {body { -webkit-print-color-adjust: exact;}}\na {text-decoration: none !important;}\n.saved-list-title {color: #222 !important;}\n.saved-list-subtitle {color: #767676 !important;height: 23px}\n#sidebar-container-saved, #sidebar-container-shopping-list {height: initial;overflow: initial;padding: 0width: 100%}\n.shopping-list-item-container {margin-bottom: 1.125em;width: 100%;position: relative;clear: both;}\n.sidebar-title, #shopping-list-sidebar-modal .sidebar-title {font-size: 1.5em;position: relative;height: 5em;margin: 0 0 -1px 0;display: -ms-flexbox;display: flex;-ms-flex-align: center;align-items: center;line-height: 0.9;}\n.sidebar-header {margin-left: -15px !important;}\n.sidebar-container, .sidebar-header {margin: 0;padding: 0;}\n.shopping-list-data-section {width: 320px;padding-top: 3px;}\n.contextual, .link-wrapper, .bookmark-link, .view-footer, .close, .shopping-list-remove-icon, .add-item-to-saved-list-container, .section{display: none;}\n.beckersIcon {align-self: flex-start;margin-bottom: 30px;}\n#logo-beckers, svg {width: 79px;height: 60px;}\n.saved-list-tile-section, .shopping-list-tile-section { height: 4.5em;width: 3.375em;background: #f5f5f5;float: left;position: relative;margin-right: 1em;}\n.saved-list-modal-subtitle {font-size: 1.125em;font-weight: 500;line-height: 1.3;letter-spacing: -.02em;margin: 0;padding: 0 0 1.5em;}\n.saved-list-item-container.last-product { margin-bottom: 3em;}\b.shopping-list-color-icon {width: .75em;height: .75em;border-radius: 2px;position: absolute;top: 2px;left: 2px;}\n.shopping-list-tile {height: 50%;width: 80%;mix-blend-mode: multiply;margin-left: 7px;margin-top: 25px;}\n.color-saved-list-image, #sidebar-modal-choose-color .views-field-field-c-rgb-id {width: 54px;height: 54px;float: left;border-radius: 6pxmargin-right: 16pxposition: relative}\n.shopping-list-data-section p, .saved-list-data-section p {margin-bottom: 0;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: block;min-width: 0;margin-right: 1.5em;color: #222 !important;}\n.shopping-list-subtitle, .saved-list-subtitle {font-weight: 400;font-size: .875em;line-height: 1.714;color: #767676;}\n.saved-list-item-container {position: relative;width: 100%;margin-bottom: 18px;clear: both;}\n.saved-list-data-section {width: initial;}\n</style>"}(),n+="<body>",n+="<div id="+t[0].id+">",n+="<div class=\"beckersIcon\" style='max-height: 5rem'>"+a+"</div>",n+=t[0].innerHTML,n+="</div>",n+='<script type="text/javascript">function printPage() { window.focus(); window.print();return; }<\/script>',n+="</body>",n+="</html>";let s=document.createElement("iframe");s.width="0px",s.height="0px",s.style.display="none";const l="iframe-print-"+t[0].id+Math.random().toString(36).substring(7);s.id=l,document.body.append(s),s.contentWindow.contents=n,s.src='javascript:window["contents"]';let r=document.title;r=r.substr(r.indexOf("|")+1);let c=e("#print-saved-btn, #print-shopping-list-btn"),d=c.length>0&&c[0]?c[0].innerText:"Print";s.title=d+" |"+r,s.onload=function(){let e=document.getElementById(l).contentWindow.document.getElementsByClassName("saved-list-tile-section color-saved-list-image");if(e.length>0)for(let t=0,i=e.length;t>i;t++){let i=e[t].style.backgroundColor;i&&e[t].setAttribute("style","border: 27px solid "+i)}setTimeout(function(){document.getElementById(l).contentWindow.focus(),document.getElementById(l).contentWindow.printPage()},150)}}e("#print-shopping-list-btn").click(function(i){i.stopPropagation(),i.preventDefault(),t(e("#shopping-list-sidebar-modal"))}),e("#print-saved-btn").click(function(i){i.stopPropagation(),i.preventDefault(),t(e("#save-sidebar-modal"))})}(jQuery)},124(){var e;(e=jQuery).fn.addBehaviorsProDocuments=function(){e("#pro-documents .views-fields").addClass("row"),e("#pro-documents .views-fields").each(function(t){if(!e(this).hasClass("files-data--row")){let i=e(this).parent().find(".views-field-filename"),a=e(this).parent().find(".views-field-filename-1").text().trim(),o=e(this).parent().find(".views-field-uri .field-content").text();o=window.location.origin+o;let n=a.split(".").pop().toUpperCase().replace(/\s/g,"");const s='<div class="Checkbox"><input type="checkbox" class="pro-files--checkbox Checkbox-field"data-filename="'+a+'"data-url="'+o+'"data-typefile="'+n+'"id="file-box-'+t+'"value="'+o+'"><label for="file-box-'+t+'" class="Checkbox-label"></label></div>';i.parent().find(".views-field-filename .field-content").html('<a href="'+o+'">'+i[0].innerHTML+"</a>").addClass("Table-text"),e(this).parent().find(".views-field-filesize .field-content").prepend(n+", "),i.prepend(s),e(this).addClass("files-data--row")}});let t=null;const i=document.getElementById("documents-modal");i&&"undefined"!=typeof bootstrap&&bootstrap.Modal&&(t=new bootstrap.Modal(i,{backdrop:!1,keyboard:!1})),e(".pro-files--checkbox").on("change",function(){this.checked&&t&&t.show();let i=e('.pro-files--checkbox:input[type="checkbox"]:checked').length;0==i&&t&&t.hide(),1>=i?(e("#documents-modal #one-item-selected").show(),e("#documents-modal #more-item-selected").hide()):(e("#documents-modal #one-item-selected").hide(),e("#documents-modal #more-item-selected").show()),e("#documents-modal .items-selected").text(i)})},e.fn.addBehaviorsProDocumentsModal=function(){e("#documents-modal").length&&(e("#documents-modal #document-send-button, #document-send-button").click(function(){window.sendDocumentDataToDataLayer("Send"),e("#documents-modal #sender-email-modal").data("send","downloadList")}),e("#close-download-modal").click(function(){e("#pro-documents .pro-files--checkbox:checked").each(function(){e(this).prop("checked",!1)})}),e("#documents-modal #document-download-button, #document-download-button").click(function(){window.sendDocumentDataToDataLayer("Download");let t=[];var i;e("#pro-documents .pro-files--checkbox:checked").each(function(){t.push({url:e(this).data("url"),filename:e(this).data("filename")}
9)}),i=t,function t(a){if(a>=i.length)return;let o=document.createElement("a");o.href=i[a].url,o.target="_parent","download"in o&&(o.download=i[a].filename),(document.body||document.documentElement).appendChild(o),o.click?o.click():e(o).click(),o.parentNode.removeChild(o),setTimeout(function(){t(a+1)},500)}(0)}))}},864(){!function(e){let t=e.fn.getDomainProtocolWithLanguage();e(window).on("load",function(){if(e(".product-selector").length){let t=1;localStorage.setItem("product_selector_current_step",t),localStorage.setItem("product_selector_current_parameters",""),e.fn.callProductSelectorAjax(t,"",!0,"")}}),e(document).on("click","div[class*='view-product-selector'] .views-field-name a",function(t){t.stopPropagation(),t.preventDefault();let i=parseInt(localStorage.getItem("product_selector_current_step"))+1,a=e(this).attr("href").split("/")[1];e.fn.callProductSelectorAjax(i,a,!1,"next")}),e(document).on("click",".product-selector-back-link",function(t){t.stopPropagation(),t.preventDefault();let i=parseInt(localStorage.getItem("product_selector_current_step"))-1,a=localStorage.getItem("product_selector_current_parameters").split("_");a.pop();let o=a.join("_");e.fn.callProductSelectorAjax(i,o,!1,"prev")}),e.fn.callProductSelectorAjax=function(i,a,o,n){let s="product-selector-"+i,l="product_selector_step_"+i,r="block_1";"PRO"==e("#currentSegment").text()&&(r="block_2");let c=a.replace(/_/g,",");e.ajax({type:"GET",url:t+"/custom/ajax/call",data:"parameter="+c+"&view_name="+l+"&block_name="+r,dataType:"html",async:!1,success:function(t){localStorage.setItem("product_selector_current_step",i),localStorage.setItem("product_selector_current_parameters",a),e("#"+s).empty().html(t),o||e(".carousel").carousel(n)},error:function(){console.log("The request failed")}})}}(jQuery,Drupal)},364(){!function(e,t){t.behaviors.tooltips={attach:function(e,t){if("undefined"==typeof bootstrap||!bootstrap.Tooltip)return void console.warn("Bootstrap is not loaded yet. Tooltips will not be initialized.");const i=document.querySelectorAll('[data-bs-toggle="tooltip"]');if(!i.length)return;const a=[];i.forEach(function(e){const t=new bootstrap.Tooltip(e,{trigger:"manual",html:!0,placement:function(){const t=e.getBoundingClientRect(),i=t.top,a=window.innerHeight-t.bottom,o=t.left,n=window.innerWidth-t.right;return a>150?"bottom":i>150?"top":n>o?"right":"left"}});function i(e,t){e.hideTimeout=setTimeout(()=>{t.hide()},300)}a.push(t),e.addEventListener("mouseenter",function(){a.forEach(function(t){t._element!==e&&t.hide()}),t.show();const o=e.getAttribute("aria-describedby");if(o){const a=document.getElementById(o);a&&(a.addEventListener("mouseenter",function(){clearTimeout(e.hideTimeout)}),a.addEventListener("mouseleave",function(){i(e,t)}))}}),e.addEventListener("mouseleave",function(){i(e,t)}),e.addEventListener("focus",function(){clearTimeout(e.hideTimeout),a.forEach(function(t){t._element!==e&&t.hide()}),t.show()}),e.addEventListener("blur",function(){i(e,t)})}),document.addEventListener("keyup",function(e){"Escape"===e.key&&a.forEach(function(e){e.hide()})}),document.addEventListener("mouseup",function(e){let t=!1;i.forEach(function(i){(i===e.target||i.contains(e.target))&&(t=!0)}),t||a.forEach(function(e){e.hide()})})}}}(jQuery,Drupal,once)},41(){!function(e,t){document.querySelector(".block-tk-wishlist")||(e.fn.checkSavedList=function(){if(e(".add-item-to-saved-list-container").length&&(e.fn.setSavedIconAsMarked(),e(".add-item-to-saved-list-container").click(function(t){e.fn.addItemToSavedList(e(this)),t.stopImmediatePropagation()})),e("#add-item-to-saved-list-btn").length){const t=e("#add-item-to-saved-list-btn");e.fn.changeTextInSavedBtn(t),t.click(function(i){e.fn.addItemToSavedList(t),i.stopImmediatePropagation()})}},e.fn.setSavedIconAsMarked=function(){const t=JSON.parse(sessionStorage.getItem("savedList"));t&&t.forEach(t=>{e(`.add-item-to-saved-list-container[data-id="${t.id}"] .add-item-to-saved-list-icon`).addClass("marked-item-icon");try{document.querySelector(`.add-item-to-saved-list-container[data-id="${t.id}"] .icon`).classList.add("icon--fill")}catch(e){}})},e.fn.changeTextInSavedBtn=function(e){const t=JSON.parse(sessionStorage.getItem("savedList"));t&&(t.find(t=>
9t.id===e.data("id"))?(e.find("#add-to-checklist").addClass("d-none"),e.find("#remove-from-checklist").removeClass("d-none")):(e.find("#remove-from-checklist").addClass("d-none"),e.find("#add-to-checklist").removeClass("d-none")))},e.fn.addItemToSavedList=function(t){let i=JSON.parse(sessionStorage.getItem("savedList"));if(i){const a=i.findIndex(e=>e.id===t.data("id"));if(-1===a){const a={id:t.data("id"),title:t.data("title"),category:t.data("category"),color:t.data("color"),image:t.data("image"),url:t.data("url"),item:t.data("item")};i.push(a),e(`.add-item-to-saved-list-container[data-id="${t.data("id")}"] .add-item-to-saved-list-icon`).addClass("marked-item-icon");try{document.querySelector(`.add-item-to-saved-list-container[data-id="${t.data("id")}"] .icon`).classList.add("icon--fill")}catch(e){}e.fn.displayNotificationSavedList("add",t.data("title"))}else{i.splice(a,1),e(`.add-item-to-saved-list-container[data-id="${t.data("id")}"] .add-item-to-saved-list-icon`).removeClass("marked-item-icon");try{document.querySelector(`.add-item-to-saved-list-container[data-id="${t.data("id")}"] .icon`).classList.remove("icon--fill")}catch(e){}e.fn.displayNotificationSavedList("remove",t.data("title"))}sessionStorage.setItem("savedList",JSON.stringify(i)),e.fn.refreshSavedListCount(),e.fn.refreshSavedList(),e("#add-item-to-saved-list-btn").length&&e.fn.changeTextInSavedBtn(e("#add-item-to-saved-list-btn"))}},e.fn.refreshSavedList=function(){let t=JSON.parse(sessionStorage.getItem("savedList")),i=e("#sidebar-container-saved section");i.empty();let a=t.filter(e=>"product"===e.item);if(0!==a.length){let t=e("#label-saved-products").text();i.append('<p class="saved-list-modal-subtitle">'+t+"</p>")}for(let e=0;e<a.length;e++)i.append(`<div class="saved-list-item-container ${a.length-1===e?"last-product":""}">\n <a href="${a[e].url}" class="saved-list-product-container">\n <div class="saved-list-tile-section">\n <img class="shopping-list-tile" src="${a[e].image}"/>\n </div>\n <div class="saved-list-data-section">\n <p class="saved-list-title"><span>${a[e].title}</span></p>\n <p class="saved-list-subtitle"><span>${a[e].category}</span></p>\n </div>\n </a>\n <button class="add-item-to-saved-list-container" data-id="${a[e].id}" data-title="${a[e].title}">\n <div class="add-item-to-saved-list-icon remove-icon"></div>\n </button>\n </div>`);let o=t.filter(e=>"color"===e.item);if(0!==o.length){let t=e("#label-saved-colors").text();i.append('<p class="saved-list-modal-subtitle">'+t+"</p>")}for(let e=0;e<o.length;e++)i.append(`<div class="saved-list-item-container saved-color-data-container">\n <a href="${o[e].url}" class="saved-list-product-container">`+(o[e].image?`<img class="saved-list-tile-section color-saved-list-image" src="${o[e].image}">`:`<div class="saved-list-tile-section color-saved-list-image" style="background-color: ${o[e].color}"></div>`)+`\n <div class="saved-list-data-section">\n <p class="saved-list-title"><span>${o[e].title}</span></p>\n <p class="saved-list-subtitle"><span>${o[e].category}</span></p>\n </div>\n </a>\n <button class="add-item-to-saved-list-container" data-id="${o[e].id}" data-title="${o[e].title}">\n <div class="add-item-to-saved-list-icon remove-icon"></div>\n </button>\n </div>`);e("#sidebar-container-saved .add-item-to-saved-list-container").each(function(){e(this).on("click",function(){let i=e(this).data("id"),a=e(this).data("title");for(let e=0;e<t.length;e++)t[e].id===i&&t.splice(e,1);e(`.add-item-to-saved-list-container[data-id="${i}"] .add-item-to-saved-list-icon`).removeClass("marked-item-icon");try{document.querySelector(`.add-item-to-saved-list-container[data-id="${i}"] .icon`).classList.remove("icon--fill")}catch(e){}sessionStorage.removeItem("savedList"),sessionStorage.setItem("savedList",JSON.stringify(t)),e.fn.changeTextInSavedBtn(e("#add-item-to-saved-list-btn")),e.fn.refreshSavedListCount(),e.fn.displayNotificationSavedList("remove",a),e.fn.refreshSavedList()})})},e.fn.displayNotificationSavedList=function(t,i){let a=e("#notification-dialog"),o=e(".notification-message");o.empty(),a.show(),a.addClass("notificationAnimation"),setTimeout(function(){a.hide(),a.removeClass("notificationAnimation")},3e3),"add"===t?o.text(`${i} ${e("#add-to-saved-list-text").text().trim()}`):o.text(`${i} ${e("#remove-from-saved-list-text").text().trim()}`)},e.fn.refreshSavedListCount=function(){let t=0;null!==JSON.parse(sessionStorage.getItem("savedList"))&&(t=JSON.parse(sessionStorage.getItem("savedList")).length);let i=e(".getSavedListCount"),a=e("#saved-button #icon-heart"),o=e("#notification-saved");i.text(t),t>0?(o.hide(),a.addClass("icon-filled"),i.css("visibility","visible"),i.show(),e("#save-sidebar-footer").show(),e(".tikkurila-saved-container").length&&e(".tikkurila-saved-container").addClass("is-active")):(o.show(),a.removeClass("icon-filled"),i.css("visibility","hide"),i.hide(),e("#save-sidebar-footer").hide(),e(".tikkurila-saved-container").length&&e(".tikkurila-saved-container").removeClass("is-active"))},e("#save-sidebar-modal").append('<div id="find-a-store-label" style="display: none;">'+t.t("Find a store")+"</div>"),e("#save-sidebar-modal").append('<div id="find-your-store-label" style="display: none;">'+t.t("Find your store")+"</div>"),e("#save-sidebar-modal").append('<div id="find-desc-store-label" style="display: none;">'+t.t("Contact your store for information about their range, opening hours and other things you need to know when you want to buy color. Assortment can very from store to store.")+"</div>"))}(jQuery,Drupal)},179(){!function(e,t){e.fn.addAutoCompleteBehaviour=function(i,a,o,n=!1,s=0,l="search",r=!1){const c=sessionStorage.getItem(l),d=sessionStorage.getItem("searchById"),h=t.t("No results"),u=e.fn.getDomainProtocolWithLanguage(),p=e(`input${i}`);n?p.val(d):p.val(c);
9const m=a?e(`input[id^="${a}"]`):null,f=p.attr("data-form-id"),g=new autoComplete({selector:i,threshold:s,debounce:300,searchEngine:"loose",diacritics:!0,submit:r,data:{src:async e=>{try{const t=await fetch(`${u}/api/${o}?name=${e}`);return await t.json()}catch(e){return e}},keys:["name"],filter:e=>Array.from(new Set(e.map(e=>e.match))).map(t=>e.find(e=>e.match===t))},resultsList:{element:(e,t)=>{if(!t.results.length){const t=document.createElement("div");t.setAttribute("class","no_result"),t.innerHTML=`<span>${h}</span>`,e.prepend(t)}},noResults:!0,maxResults:300,tabSelect:!0},resultItem:{tag:"li",element:(e,t)=>{e.setAttribute("data-nid",t.value.nid)},highlight:!0},events:{input:{focus:()=>{p.val().length?g.start():(g.start(),g.open())},selection:t=>{const i=t.detail.selection.value.name;if(g.input.value=i,n){const e=t.detail.selection.value.nid;m&&m.val(e),sessionStorage.setItem("searchById",i)}else m&&m.val(i),sessionStorage.setItem(l,i);f&&e("form[id^='"+p.attr("data-form-id")+"'] input.js-form-submit").click()}}}})},e.fn.addAutoCompleteBehaviourWithData=function(i,a,o,n=!1,s=0,l="search",r=!1){const c=sessionStorage.getItem(l),d=sessionStorage.getItem("searchById"),h=t.t("No results"),u=e(`input${i}`);n?u.val(d):u.val(c);const p=a?e(`input[id^="${a}"]`):null,m=u.attr("data-form-id"),f=new autoComplete({selector:i,threshold:s,debounce:300,searchEngine:"loose",diacritics:!0,submit:r,data:{src:o,keys:["name"],filter:e=>Array.from(new Set(e.map(e=>e.match))).map(t=>e.find(e=>e.match===t))},resultsList:{element:(e,t)=>{if(!t.results.length){const t=document.createElement("div");t.setAttribute("class","no_result"),t.innerHTML=`<span>${h}</span>`,e.prepend(t)}},noResults:!0,maxResults:300,tabSelect:!0},resultItem:{tag:"li",element:(e,t)=>{e.setAttribute("data-nid",t.value.nid)},highlight:!0},events:{input:{focus:()=>{u.val().length?f.start():(f.start(),f.open())},selection:t=>{const i=t.detail.selection.value.name;if(f.input.value=i,n){const e=t.detail.selection.value.nid;p&&p.val(e),sessionStorage.setItem("searchById",i)}else p&&p.val(i),sessionStorage.setItem(l,i);m&&e("form[id^='"+u.attr("data-form-id")+"'] input.js-form-submit").click()}}}})};const i=function(e){if(function(e){let t="";const i=window.location.search,a=new URLSearchParams(i);t=a.has("search")?a.get("search"):sessionStorage.getItem("search");const o=e("input#custom-edit-search, input#custom-edit-search-with-pager"),n=e('input#edit-search, input[id^="edit-search--"]');o.val(t),n.val(t),o.on("keyup",function(t){let i=e(this).val();13==t.which&&(t.preventDefault(),n.val(i),sessionStorage.setItem("search",i),e("form[id^='"+o.attr("data-form-id")+"'] .js-form-submit").click())})}(e),e(".layout-container").filter(function(){return Array.from(this.classList).some(e=>e.startsWith("Tikkurila"))}).length){if(e(".view-industry-systems-metal.view-display-id-tab_1").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_metal_tab_1",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_metal_tab_1",!1,3)),e(".view-industry-systems-metal.view-display-id-tab_2").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_metal_tab_2",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_metal_tab_2",!1,3)),e(".view-industry-systems-metal.view-display-id-tab_3").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_metal_tab_3",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_metal_tab_3",!1,3)),e(".view-industry-systems-wood.view-display-id-tab_1").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_wood_tab_1",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_wood_tab_1",!1,3)),e(".view-industry-systems-wood.view-display-id-tab_2").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_wood_tab_2",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_wood_tab_2",!1,3)),e(".view-industry-systems-wood.view-display-id-tab_3").length&&(e.fn.addAutoCompleteBehaviour("#custom-is-search-products","edit-is-products","is_search_products_wood_tab_3",!0,3),e.fn.addAutoCompleteBehaviour("#custom-is-search","edit-search","is_search_wood_tab_3",!1,3)),e(".view-color-card").length){let t="CON";e('#page-wrapper[class*="Industrial"]').length?t="IND":e('#page-wrapper[class*="Professional"]').length&&(t="PRO");const i=e("#nodeCCId").text();e.fn.addAutoCompleteBehaviour("#custom-color-search","edit-search",`cc_search/${i}/${t}+MUS`,!1,3)}if(e(".view-products-with-documents").length){let t=[];
9t.segment=e("#nodePagePlSegments").text(),t["areas-for-use-what"]=e("#nodePagePlAreasForUseWhat").text(),t["areas-for-use-surface"]=e("#nodePagePlAreasForUseSurface").text(),t["ecolabels-recommendation"]=e("#nodePagePlEcolabels").text(),t["certificates-approvals-m"]=e("#nodePagePlCertificates").text(),t["sku-classification2"]=e("#nodePagePlSkuClassification2").text(),e("#custom-edit-search").length&&e.fn.addAutoCompleteBehaviour("#custom-edit-search","edit-search",`products_with_documents_search/${t.segment}/${t["areas-for-use-surface"]}/${t["areas-for-use-what"]}/${t["ecolabels-recommendation"]}/${t["certificates-approvals-m"]}/${t["sku-classification2"]}`,!1,3),e("#custom-product-search-with-pager").length&&e.fn.addAutoCompleteBehaviour("#custom-product-search-with-pager","edit-search",`products_with_documents_search/${t.segment}/${t["areas-for-use-surface"]}/${t["areas-for-use-what"]}/${t["ecolabels-recommendation"]}/${t["certificates-approvals-m"]}/${t["sku-classification2"]}`,!1,3)}e(".view-ryl-2012").length&&e.fn.addAutoCompleteBehaviour("#custom-ryl-search","edit-search","ryl_search",!1,3)}},a=["industry_systems_metal","industry_systems_wood","color_card","ryl_2012","colors_category","products_with_documents"];e(document).ready(function(){const e=window.location.search,t=new URLSearchParams(e);
9t.has("city")?sessionStorage.setItem("searchCity",t.get("city")):sessionStorage.removeItem("search"),t.has("search")&&sessionStorage.setItem("search",t.get("search")),sessionStorage.removeItem("searchById")}),e(window).on("load",function(){!function(e){if(e("input#custom-search").val(e("input#edit-s").val()),e("input#custom-search").on("keyup",function(t){let i=e(this).val();e("input#edit-s").val(i),13==t.which&&i.length>=3&&(""==e("input#edit-s").val()?window.location.replace(window.location.pathname):e('form[id^="views-exposed-form-search-results-page-"]').submit(),t.preventDefault())}),e(".view-search-results, .view-search").length){let t=[],i=[],a="",o=0,n=0;e(".type-search-result").each(function(e,s){s.className.includes("type-title")?(a=s.innerText,t.push(a),i.push(0),o=i.length-1):(i[o]++,n++)}),e.each(t,function(t,a){e(".inline-filters .form-item-content-type-"+a.toLowerCase().replace(" ","-").replace("&","-")+" label").append("("+i[t]+")")})}}(e),i(e)}),e(document).ajaxComplete(function(t,o,n){const s=new URLSearchParams(n.data);n.data&&a.indexOf(s.get("view_name"))>-1&&i(e)})}(jQuery,Drupal)},374(){!function(e){let t;const i="#stick-element-to-container";let a=null;function o(){let o=0;o=e(`${a} img`).length?".product-gallery"===a?parseFloat(e(`${a} img.lazyloaded`).height())+parseFloat(e(`${a}`).css("padding-top"))+e.fn.remToPx(2):parseFloat(e(`${a} img`).height())+parseFloat(e(`${a} img`).css("padding-top")):parseFloat(e(`${a}`).css("padding-top"));const n=o+40,s=e(".display-description").height();t?(t=null,s>n&&(t=new Sticky(i))):s>n&&n>40&&(t=new Sticky(i))}e(".full-product-view").length?(a=e(".product-gallery").length?".product-gallery":".image-carousel-thumbnails",e(a).length||(a=e(".field--name-field-p-image").length?".field--name-field-p-image":".full-product-image__wrapper")):e(".full-color-view").length&&(a=e(".product-gallery").length?".product-gallery":".image-carousel-thumbnails",e(a).length||(a=".field--name-field-c-image"),e(a).length||(a=".field--name-field-c-rgb-id")),e(i).length&&(window.addEventListener("load",e=>{setTimeout(function(){const e=document.querySelector(`${a} img`);(e&&e.complete||!e)&&o(),document.body.style.overflowY="",document.body.style.height=""},200)}),e(window).on("load",function(){e(".informationSection .collapse").on("shown.bs.collapse",function(){o()}),e(".informationSection .collapse").on("hidden.bs.collapse",function(){o()})}),e(window).on("resize",function(){clearTimeout(window.resizedFinished),window.resizedFinished=setTimeout(function(){o()},100)}),e(window).on("beforeunload",function(){}),document.body.style.overflowY="hidden",document.body.style.height="100vh")}(jQuery,Drupal)}};const t={};function i(a){const o=t[a];if(void 0!==o)return o.exports;const n=t[a]={exports:{}};return e[a](n,n.exports,i),n.exports}(()=>{"use strict";i(241),i(41),i(932),i(856),i(8),i(864),i(179),i(886),i(708),i(633),i(124),i(364),i(374),i(110),i(49)})()})();; 10!function(e,t){e.behaviors.backToTop={attach:function(e){t("back-to-top","[data-back-to-top]",e).forEach(function(e){const t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=function(){const e=document.querySelector('main, [role="main"]');if(!e)return null;let t=e;for(;t.parentElement&&t.parentElement!==document.body;)t=t.parentElement;return t}(),o=new WeakSet;let i=!1,r=null,c=0;const a=function(){const t=e.getBoundingClientRect();let i=window.innerHeight;(function(e,t){const n=[];return Array.prototype.forEach.call(document.body.children,function(o){o===t||o.contains(e)||[o].concat(Array.prototype.slice.call(o.querySelectorAll("*"))).forEach(function(e){const t=window.getComputedStyle(e).position;"fixed"!==t&&"sticky"!==t||n.push(e)})}),n})(e,n).forEach(function(e){o.has(e)||(o.add(e),s.observe(e)),function(e,t){const n=window.getComputedStyle(e);if("none"===n.display||"hidden"===n.visibility||"0"===n.opacity)return!1;const o=e.getBoundingClientRect();return!(o.width<8||o.height<8||o.height>.5*window.innerHeight||o.bottom<window.innerHeight-200||o.right<t.left||o.left>t.right)}(e,t)&&(i=Math.min(i,e.getBoundingClientRect().top))});const r=Math.max(0,Math.round(window.innerHeight-i));e.style.setProperty("--back-to-top-obstruction",r+"px")},d=function(){window.clearTimeout(r),r=window.setTimeout(function(){c=Date.now(),a()},150)},s=new ResizeObserver(d),l=function(){const t=window.scrollY||document.documentElement.scrollTop;e.classList.toggle("back-to-top--visible",t>window.innerHeight);const n=Date.now();n-c>500&&(c=n,a()),i=!1},u=function(){i||(i=!0,window.requestAnimationFrame(l))};e.addEventListener("click",function(){window.scrollTo({top:0,behavior:t.matches?"auto":"smooth"});const e=document.querySelector('header[role="banner"], [role="banner"], header');e&&(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}),window.addEventListener("scroll",u,{passive:!0}),window.addEventListener("resize",u,{passive:!0}),window.addEventListener("resize",d,{passive:!0}),new MutationObserver(d).observe(document.body,{childList:!0}),[1e3,3e3,6e3].forEach(function(e){window.setTimeout(d,e)}),l(),a()})}}}(Drupal,once);; 11const homePageLabel=Drupal.t("Homepage");const showOnMapLabel=Drupal.t("Show on map");const getDirectionLabel=Drupal.t("Get directions");const allLabel=Drupal.t("All");const enabledFiltersLabel=Drupal.t("Enabled filters");const noEnabledFiltersLabel=Drupal.t("No enabled filters");; 12class Sticky{constructor(selector='',options={}){this.selector=selector;this.elements=[];this.version='1.3.0';this.vp=this.getViewportSize();this.body=document.querySelector('body');this.options={wrap:options.wrap||false,wrapWith:options.wrapWith||'<span></span>',marginTop:options.marginTop||0,marginBottom:options.marginBottom||0,stickyFor:options.stickyFor||0,stickyClass:options.stickyClass||null,stickyContainer:options.stickyContainer||'body'};this.updateScrollTopPosition=this.updateScrollTopPosition.bind(this);this.updateScrollTopPosition();window.addEventListener('load',this.updateScrollTopPosition);window.addEventListener('scroll',this.updateScrollTopPosition);this.run();}run(){const pageLoaded=setInterval(()=>
12{if(document.readyState==='complete'){clearInterval(pageLoaded);const elements=document.querySelectorAll(this.selector);this.forEach(elements,(element)=>this.renderElement(element));}},10);}renderElement(element){element.sticky={};element.sticky.active=false;element.sticky.marginTop=parseInt(element.getAttribute('data-margin-top'))||this.options.marginTop;element.sticky.marginBottom=parseInt(element.getAttribute('data-margin-bottom'))||this.options.marginBottom;element.sticky.stickyFor=parseInt(element.getAttribute('data-sticky-for'))||this.options.stickyFor;element.sticky.stickyClass=element.getAttribute('data-sticky-class')||this.options.stickyClass;element.sticky.wrap=element.hasAttribute('data-sticky-wrap')?true:this.options.wrap;element.sticky.stickyContainer=this.options.stickyContainer;element.sticky.container=this.getStickyContainer(element);element.sticky.container.rect=this.getRectangle(element.sticky.container);element.sticky.rect=this.getRectangle(element);if(element.tagName.toLowerCase()==='img')element.onload=()=>element.sticky.rect=this.getRectangle(element);if(element.sticky.wrap)this.wrapElement(element);this.activate(element);}wrapElement(element){element.insertAdjacentHTML('beforebegin',element.getAttribute('data-sticky-wrapWith')||this.options.wrapWith);element.previousSibling.appendChild(element);}activate(element){if(((element.sticky.rect.top+element.sticky.rect.height)<(element.sticky.container.rect.top+element.sticky.container.rect.height))&&(element.sticky.stickyFor<this.vp.width)&&!element.sticky.active)element.sticky.active=true;if(this.elements.indexOf(element)<0)this.elements.push(element);if(!element.sticky.resizeEvent){this.initResizeEvents(element);element.sticky.resizeEvent=true;}if(!element.sticky.scrollEvent){this.initScrollEvents(element);element.sticky.scrollEvent=true;}const dialogCanvas=document.querySelector('.dialog-off-canvas-main-canvas');if(dialogCanvas){const resizeObserver=new ResizeObserver(()=>{this.onResizeEvents(element);});resizeObserver.observe(dialogCanvas);}this.setPosition(element);}initResizeEvents(element){element.sticky.resizeListener=()=>this.onResizeEvents(element);window.addEventListener('resize',element.sticky.resizeListener);}destroyResizeEvents(element){window.removeEventListener('resize',element.sticky.resizeListener);}onResizeEvents(element){this.vp=this.getViewportSize();element.sticky.rect=this.getRectangle(element);element.sticky.container.rect=this.getRectangle(element.sticky.container);if(((element.sticky.rect.top+element.sticky.rect.height)<(element.sticky.container.rect.top+element.sticky.container.rect.height))&&(element.sticky.stickyFor<this.vp.width)&&!element.sticky.active)element.sticky.active=true;else{if(((element.sticky.rect.top+element.sticky.rect.height)>=(element.sticky.container.rect.top+element.sticky.container.rect.height))||element.sticky.stickyFor>=this.vp.width&&element.sticky.active)element.sticky.active=false;}this.setPosition(element);}initScrollEvents(element){element.sticky.scrollListener=()=>this.onScrollEvents(element);window.addEventListener('scroll',element.sticky.scrollListener);}destroyScrollEvents(element){window.removeEventListener('scroll',element.sticky.scrollListener);}onScrollEvents(element){if(element.sticky&&element.sticky.active)this.setPosition(element);}setPosition(element){this.css(element,{position:'',width:'',top:'',left:''});if((this.vp.height<element.sticky.rect.height)||!element.sticky.active)return;if(!element.sticky.rect.width)element.sticky.rect=this.getRectangle(element);if(element.sticky.wrap)this.css(element.parentNode,{display:'block',width:element.sticky.rect.width+'px',height:element.sticky.rect.height+'px'});if(element.sticky.rect.top===0&&element.sticky.container===this.body){this.css(element,{position:'fixed',top:element.sticky.rect.top+'px',left:element.sticky.rect.left+'px',width:element.sticky.rect.width+'px'});if(element.sticky.stickyClass)element.classList.add(element.sticky.stickyClass);}else if(this.scrollTop>(element.sticky.rect.top-element.sticky.marginTop)){this.css(element,{position:'fixed',width:element.sticky.rect.width+'px',left:element.sticky.rect.left+'px'});if((this.scrollTop+element.sticky.rect.height+element.sticky.marginTop)>(element.sticky.container.rect.top+element.sticky.container.offsetHeight-element.sticky.marginBottom)){
12if(element.sticky.stickyClass)element.classList.remove(element.sticky.stickyClass);this.css(element,{top:(element.sticky.container.rect.top+element.sticky.container.offsetHeight)-(this.scrollTop+element.sticky.rect.height+element.sticky.marginBottom)+'px'});}else{if(element.sticky.stickyClass)element.classList.add(element.sticky.stickyClass);this.css(element,{top:element.sticky.marginTop+'px'});}}else{if(element.sticky.stickyClass)element.classList.remove(element.sticky.stickyClass);this.css(element,{position:'',width:'',top:'',left:''});if(element.sticky.wrap)this.css(element.parentNode,{display:'',width:'',height:''});}}update(){this.forEach(this.elements,(element)=>{element.sticky.rect=this.getRectangle(element);element.sticky.container.rect=this.getRectangle(element.sticky.container);this.activate(element);this.setPosition(element);});}destroy(){window.removeEventListener('load',this.updateScrollTopPosition);window.removeEventListener('scroll',this.updateScrollTopPosition);this.forEach(this.elements,(element)=>{this.destroyResizeEvents(element);this.destroyScrollEvents(element);delete element.sticky;});}getStickyContainer(element){let container=element.parentNode;while(!container.hasAttribute('data-sticky-container')&&!container.parentNode.querySelector(element.sticky.stickyContainer)&&container!==this.body)container=container.parentNode;return container;}getRectangle(element){this.css(element,{position:'',width:'',top:'',left:''});const width=Math.max(element.offsetWidth,element.clientWidth,element.scrollWidth);const height=Math.max(element.offsetHeight,element.clientHeight,element.scrollHeight);let top=0;let left=0;do{top+=element.offsetTop||0;left+=element.offsetLeft||0;element=element.offsetParent;}while(element);return {top,left,width,height};}getViewportSize(){const dialogCanvas=document.querySelector('.dialog-off-canvas-main-canvas');return {width:document.querySelector('.dialog-off-canvas-main-canvas').clientWidth,height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)};}updateScrollTopPosition(){this.scrollTop=(window.pageYOffset||document.scrollTop)-(document.clientTop||0)||0;}forEach(array,callback){for(let i=0,len=array.length;i<len;i++)callback(array[i]);}css(element,properties){for(let property in properties)if(properties.hasOwnProperty(property))element.style[property]=properties[property];}}((root,factory)=>{if(typeof exports!=='undefined')module.exports=factory;else if(typeof define==='function'&&define.amd)define([],function(){return factory;});else root.Sticky=factory;})(this,Sticky);; 13/*! For license information please see page-header.js.LICENSE.txt */ 14(()=>{"use strict";const e=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},t=document.documentElement.getAttribute("data-easy-toggle-state-custom-prefix")||"toggle",n=(e,n=(()=>t)())=>["data",n,e].filter(Boolean).join("-"),r=n("arrows"),o="aria-checked",a=n("class"),i=n("class-on-target"),u=n("class-on-trigger"),s="is-active",c=n("escape"),l=n("event"),d="aria-expanded",f=n("group"),v="aria-hidden",b=n("is-active"),h=n("modal"),p=n("outside"),g=n("outside-event"),m="aria-pressed",y=n("radio-group"),w="aria-selected",A=n("target"),E=n("target-all"),S=n("target-next"),k=n("target-parent"),N=n("target-previous"),$=n("target-self"),T=n("state"),O=n("trigger-off"),I=new Event("toggleAfter"),D=new Event("toggleBefore"),P=(e,t)=>{const n=e?`[${e}]`:"";if(t)return[...t.querySelectorAll(n)];const r=[`[${a}]${n}`,`[${u}]${n}`,`[${i}][${A}]${n}`,`[${i}][${E}]${n}`,`[${i}][${S}]${n}`,`[${i}][${N}]${n}`,`[${i}][${k}]${n}`,`[${i}][${$}]${n}`].join().trim();return[...document.querySelectorAll(r)]};e(P);const R=(e,t)=>e.dispatchEvent(t);e(R);const F=e=>`easyToggleState_${e}`;e(F);const x=(e,t={[o]:e[F("isActive")],[d]:e[F("isActive")],[v]:!e[F("isActive")],[m]:e[F("isActive")],[w]:e[F("isActive")]})=>Object.keys(t).forEach(n=>e.hasAttribute(n)&&e.setAttribute(n,t[n]));e(x);const L=(e,t,n=!1)=>`This trigger has the class name '${e}' filled in both attributes '${a}' and '${t}'. As a result, this class will be toggled ${n&&"on its target(s)"} twice at the same time.`,_=(e,t)=>
14(e.getAttribute(t)||"").split(" ").filter(Boolean),j=e=>{if(e.hasAttribute(a)&&e.getAttribute(a)&&(e.hasAttribute(u)||e.hasAttribute(i))){const t=_(e,u),n=_(e,i);_(e,a).forEach(r=>{t.includes(r)&&console.warn(L(r,u),e),n.includes(r)&&console.warn(L(r,i,!0),e)})}const t=[a,u,i].reduce((t,n)=>{const r=_(e,n);return(n===a||n===u)&&t.trigger.push(...r),(n===a||n===i)&&t.target.push(...r),t},{trigger:[],target:[]});return!t.trigger.length&&(e.hasAttribute(a)||e.hasAttribute(u))&&t.trigger.push(s),!t.target.length&&(e.hasAttribute(a)||e.hasAttribute(i))&&t.target.push(s),t};e(j);const C=e=>{const t=e.hasAttribute(f)?f:y;return P(`${t}="${e.getAttribute(t)}"`).filter(e=>e[F("isActive")])};e(C);const G=(e,t)=>{e||console.warn(`You should fill the attribute '${t}' with a selector`)},B=(e,t)=>{if(0===t.length)return console.warn(`There's no match with the selector '${e}' for this trigger`),[];const n=e.match(/#\w+/gi);return n&&n.forEach(e=>{const n=[...t].filter(t=>t.id===e.slice(1));n.length>1&&console.warn(`There's ${n.length} matches with the selector '${e}' for this trigger`)}),[...t]},q=e=>{if(e.hasAttribute(A)||e.hasAttribute(E)){const t=e.getAttribute(A)||e.getAttribute(E);return G(t,e.hasAttribute(A)?A:E),B(t,document.querySelectorAll(t))}if(e.hasAttribute(k)){const t=e.getAttribute(k);return G(t,k),B(t,e.parentElement.querySelectorAll(t))}if(e.hasAttribute($)){const t=e.getAttribute($);return G(t,$),B(t,e.querySelectorAll(t))}return e.hasAttribute(N)?B("previous",[e.previousElementSibling].filter(Boolean)):e.hasAttribute(S)?B("next",[e.nextElementSibling].filter(Boolean)):[]};e(q);const K=(e,t)=>t.forEach(t=>{e.classList.toggle(t)});e(K);const z={},M=e=>document.addEventListener(e.getAttribute(g)||e.getAttribute(l)||"click",U,!1),U=e=>{const t=e.target,n=e.type;let r=!1;P(p).filter(e=>e.getAttribute(g)===n||e.getAttribute(l)===n&&!e.hasAttribute(g)||"click"===n&&!e.hasAttribute(l)&&!e.hasAttribute(g)).forEach(e=>{const n=t.closest(`[${T}="true"]`);n&&n[F("trigger")]===e&&(r=!0),r||e===t||e.contains(t)||!e[F("isActive")]||(e.hasAttribute(f)||e.hasAttribute(y)?H:V)(e)}),r||document.removeEventListener(n,U,!1);const o=t.closest(`[${a}][${p}],[${u}][${p}],[${i}][${p}]`);o&&o[F("isActive")]&&M(t)},Y=e=>V(e.currentTarget[F("target")]),V=e=>{R(e,D);const t=j(e);return K(e,t.trigger),e[F("isActive")]=!e[F("isActive")],x(e),R(e,I),n=e,r=t.target,o=!1,q(n).forEach(e=>{R(e,D),e[F("isActive")]=!e[F("isActive")],x(e),o?e.classList.add(...r):K(e,r),n.hasAttribute(p)&&(e.setAttribute(T,n[F("isActive")]),e[F("trigger")]=n),n.hasAttribute(h)&&(e[F("isActive")]?(z[e]=(e=>t=>{const n=[...e.querySelectorAll("a[href], area[href], input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]")];if(!n.length||"Tab"!==t.key)return;const r=t.target,o=n[0],a=n[n.length-1];return-1===n.indexOf(r)?(t.preventDefault(),o.focus()):t.shiftKey&&r===o?(t.preventDefault(),a.focus()):t.shiftKey||r!==a?void 0:(t.preventDefault(),o.focus())})(e),document.addEventListener("keydown",z[e],!1)):(document.removeEventListener("keydown",z[e],!1),delete z[e])),R(e,I),((e,t)=>{const n=P(O,e).filter(t=>!t.getAttribute(O)||e.matches(t.getAttribute(O)));0!==n.length&&(t[F("isActive")]?n.forEach(e=>{e[F("target")]||(e[F("target")]=t,e.addEventListener("click",Y,!1))}):(n.forEach(e=>{e[F("target")]===t&&(e[F("target")]=null,e.removeEventListener("click",Y,!1))}),t.focus()))})(e,n)}),(e=>{if(e.hasAttribute(p))return e.hasAttribute(y)?console.warn(`You can't use '${p}' on a radio grouped trigger`):e[F("isActive")]?M(e):void 0})(e);var n,r,o},H=e=>{const t=C(e);return 0===t.length?V(e):-1===t.indexOf(e)?(t.forEach(V),V(e)):-1===t.indexOf(e)||e.hasAttribute(y)?void 0:V(e)},X=e=>!!e[F("isActive")],J=()=>{[...document.querySelectorAll(`[${i}]:not([${A}]):not([${E}]):not([${S}]):not([${N}]):not([${k}]):not([${$}])`)].forEach(e=>{console.warn(`This trigger has the attribute '${i}', but no specified target\n`,e)}),P(b).filter(e=>!e[F("isDefaultInitialized")]).forEach(e=>{if((e.hasAttribute(f)||e.hasAttribute(y))&&C(e).length>0)return console.warn(`Toggle group '${e.getAttribute(f)||e.getAttribute(y)}' must not have more than one trigger with '${b}'`);V(e),e[F("isDefaultInitialized")]=!0});const e=P().filter(e=>!e[F("isInitialized")]);
14return e.forEach(e=>{const t=t=>{t.preventDefault(),(e.hasAttribute(f)||e.hasAttribute(y)?H:V)(e)},n=e.getAttribute(l)||"click";e.addEventListener(n,t,!1),e[F("unbind")]=()=>{e.removeEventListener(n,t,!1),e[F("isInitialized")]=!1},e[F("isInitialized")]=!0}),P(c).length>0&&!document[F("isEscapeKeyInitialized")]&&(document.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||P(c).forEach(e=>{if(e[F("isActive")])return e.hasAttribute(y)?console.warn(`You can't use '${c}' on a radio grouped trigger`):(e.hasAttribute(f)?H:V)(e)})},!1),document[F("isEscapeKeyInitialized")]=!0),P(r).length>0&&!document[F("isArrowKeysInitialized")]&&(document.addEventListener("keydown",e=>{const t=document.activeElement;if(-1===["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].indexOf(e.key)||!t.hasAttribute(a)&&!t.hasAttribute(u)&&!t.hasAttribute(i)||!t.hasAttribute(r))return;if(!t.hasAttribute(f)&&!t.hasAttribute(y))return console.warn(`You can't use '${r}' on a trigger without '${f}' or '${y}'`);e.preventDefault();const n=t.hasAttribute(f)?P(`${f}='${t.getAttribute(f)}'`):P(`${y}='${t.getAttribute(y)}'`);let o=t;switch(e.key){case"ArrowUp":case"ArrowLeft":o=n.indexOf(t)>0?n[n.indexOf(t)-1]:n[n.length-1];break;case"ArrowDown":case"ArrowRight":o=n.indexOf(t)<n.length-1?n[n.indexOf(t)+1]:n[0];break;case"Home":o=n[0];break;case"End":o=n[n.length-1]}return o.focus(),o.dispatchEvent(new Event(o.getAttribute(l)||"click"))},!1),document[F("isArrowKeysInitialized")]=!0),e};e(J);var Q=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],W=Q.join(","),Z="undefined"==typeof Element,ee=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,te=!Z&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ne=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):ne(e.parentNode))},re=function(e,t,n){if(ne(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(W));return t&&ee.call(e,W)&&r.unshift(e),r.filter(n)},oe=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!ne(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),u=i.length?i:a.children,s=oe(u,!0,n);
vendor: 4,370 bytes, line 14
14n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{ee.call(a,W)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),l=!ne(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var d=oe(!0===c?a.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return r},ae=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ie=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!ae(e)?0:e.tabIndex},ue=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},se=function(e){return"INPUT"===e.tagName},ce=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},le=function(e,t){return!(t.disabled||function(e){return se(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if("hidden"===o||"collapse"===o)return!0;var a=ee.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ee.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ce(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,s=te(e);if(u&&!u.shadowRoot&&!0===r(u))return ce(e);e=e.assignedSlot?e.assignedSlot:u||s===e.ownerDocument?u:s.host}e=i}if(function(e){var t,n,r,o,a=e&&te(e),i=null===(t=a)||void 0===t?void 0:t.host,u=!1;if(a&&a!==e)for(u=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&i;){var s,c,l;u=!(null===(c=i=null===(s=a=te(i))||void 0===s?void 0:s.host)||void 0===c||null===(l=c.ownerDocument)||void 0===l||!l.contains(i))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ee.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},de=function(e,t){return!(function(e){return function(e){return se(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||te(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||ie(t)<0||!le(e,t))},fe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ve=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,a=o?e.scopeParent:e,i=function(e,t){var n=ie(e);return n<0&&t&&!ae(e)?0:n}(a,o),u=o?ve(e.candidates):a;0===i?o?t.push.apply(t,u):t.push(a):n.push({documentOrder:r,tabIndex:i,item:e,isScope:o,content:u})}),n.sort(ue).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},be=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ee.call(e,W)&&de(t,e)},he=Q.concat("iframe:not([inert]):not([inert] *)").join(","),pe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ee.call(e,he)&&le(t,e)};function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
vendor: 12,036 bytes, line 14
14if(!n){if(Array.isArray(e)||(n=Ee(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}function ye(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach(function(t){ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ee(e,t){if(e){if("string"==typeof e)return ge(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,t):void 0}}var Se={getActiveTrap:function(e){return(null==e?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==Se.getActiveTrap(e)&&Se.pauseTrap(e);var n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),Se.unpauseTrap(e)},pauseTrap:function(e){var t=Se.getActiveTrap(e);null==t||t._setPausedState(!0)},unpauseTrap:function(e){var t=Se.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},ke=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},Ne=function(e){return ke(e)&&!e.shiftKey},$e=function(e){return ke(e)&&e.shiftKey},Te=function(e){return setTimeout(e,0)},Oe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Ie=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},De=[],Pe=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=(null==t?void 0:t.trapStack)||De,a=Ae({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Ne,isKeyBackward:$e},t),i={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u=function(e,t,n){return e&&void 0!==e[t]?e[t]:a[n||t]},s=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return i.containerGroups.findIndex(function(t){var r=t.container,o=t.tabbableNodes;return r.contains(e)||(null==n?void 0:n.includes(r))||o.find(function(t){return t===e})})},c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.hasFallback,i=void 0!==o&&o,u=n.params,s=void 0===u?[]:u,c=a[e];if("function"==typeof c&&(c=c.apply(void 0,function(e){if(Array.isArray(e))return ge(e)}(t=s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Ee(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),!0===c&&(c=void 0),!c){if(void 0===c||!1===c)return c;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var l=c;if("string"==typeof c){try{l=r.querySelector(c)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!l&&!i)throw new Error("`".concat(e,"` as selector refers to no known node"))}return l},l=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!pe(e,a.tabbableOptions))if(s(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map(function(e){var t=function(e,t){var n;return n=(t=t||{}).getShadowRoot?oe([e],t.includeContainer,{filter:de.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:fe}):re(e,t.includeContainer,de.bind(null,t)),ve(n)}(e,a.tabbableOptions),n=function(e,t){return(t=t||{}).getShadowRoot?oe([e],t.includeContainer,{filter:le.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):re(e,t.includeContainer,le.bind(null,t))}(e,a.tabbableOptions),r=t.length>0?t[0]:void 0,o=t.length>0?t[t.length-1]:void 0,i=n.find(function(e){return be(e)}),u=n.slice().reverse().find(function(e){return be(e)}),s=!!t.find(function(e){return ie(e)>0});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:i,lastDomTabbableNode:u,nextTabbableNode:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=t.indexOf(e);return o<0?r?n.slice(n.indexOf(e)+1).find(function(e){return be(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return be(e)}):t[o+(r?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(e){return e.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},f=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?f(t.shadowRoot):t},v=function(e){!1!==e&&e!==f(document)&&(e&&e.focus?(e.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):v(l()))},b=function(e){var t=c("setReturnFocus",{params:[e]});return t||!1!==t&&e},h=function(e){var t=e.target,n=e.event,r=e.isBackward,o=void 0!==r&&r;t=t||Ie(n),d();var u=null;if(i.tabbableGroups.length>0){var l=s(t,n),f=l>=0?i.containerGroups[l]:void 0;if(l<0)u=o?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(o){var v=i.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(v<0&&(f.container===t||pe(t,a.tabbableOptions)&&!be(t,a.tabbableOptions)&&!f.nextTabbableNode(t,!1))&&(v=l),v>=0){var b=0===v?i.tabbableGroups.length-1:v-1,h=i.tabbableGroups[b];u=ie(t)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else ke(n)||(u=f.nextTabbableNode(t,!1))}else{var p=i.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(p<0&&(f.container===t||pe(t,a.tabbableOptions)&&!be(t,a.tabbableOptions)&&!f.nextTabbableNode(t))&&(p=l),p>=0){var g=p===i.tabbableGroups.length-1?0:p+1,m=i.tabbableGroups[g];u=ie(t)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else ke(n)||(u=f.nextTabbableNode(t))}}else u=c("fallbackFocus");return u},p=function(e){var t=Ie(e);s(t,e)>=0||(Oe(a.clickOutsideDeactivates,e)?n.deactivate({returnFocus:a.returnFocusOnDeactivate}):Oe(a.allowOutsideClick,e)||e.preventDefault())},g=function(e){var t=Ie(e),n=s(t,e)>=0;if(n||t instanceof Document)n&&(i.mostRecentlyFocusedNode=t);else{var r;e.stopImmediatePropagation();var o=!0;if(i.mostRecentlyFocusedNode)if(ie(i.mostRecentlyFocusedNode)>0){var u=s(i.mostRecentlyFocusedNode),c=i.containerGroups[u].tabbableNodes;if(c.length>0){var d=c.findIndex(function(e){return e===i.mostRecentlyFocusedNode});d>=0&&(a.isKeyForward(i.recentNavEvent)?d+1<c.length&&(r=c[d+1],o=!1):d-1>=0&&(r=c[d-1],o=!1))}}else i.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return ie(e)>0})})||(o=!1);else o=!1;o&&(r=h({target:i.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(i.recentNavEvent)})),v(r||i.mostRecentlyFocusedNode||l())}i.recentNavEvent=void 0},m=function(e){(a.isKeyForward(e)||a.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.recentNavEvent=e;var n=h({event:e,isBackward:t});n&&(ke(e)&&e.preventDefault(),v(n))}(e,a.isKeyBackward(e))},y=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===Oe(a.escapeDeactivates,e)||(e.preventDefault(),n.deactivate())},w=function(e){var t=Ie(e);s(t,e)>=0||Oe(a.clickOutsideDeactivates,e)||Oe(a.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},A=function(){if(i.active)return Se.activateTrap(o,n),i.delayInitialFocusTimer=a.delayInitialFocus?Te(function(){v(l())}):v(l()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",w,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),r.addEventListener("keydown",y),n},E=function(){if(i.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",w,!0),r.removeEventListener("keydown",m,!0),r.removeEventListener("keydown",y),n},S="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===i.mostRecentlyFocusedNode})})&&v(l())}):void 0,k=function(){S&&(S.disconnect(),i.active&&!i.paused&&i.containers.map(function(e){S.observe(e,{subtree:!0,childList:!0})}))};return n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t,s=u(e,"onActivate"),c=u(e,"onPostActivate"),l=u(e,"checkCanFocusTrap"),v=Se.getActiveTrap(o),b=!1;v&&!v.paused&&(null===(t=v._setSubtreeIsolation)||void 0===t||t.call(v,!1),b=!0);try{l||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=f(r),null==s||s();var h=function(){l&&d(),A(),k(),a.isolateSubtrees&&n._setSubtreeIsolation(!0),null==c||c()};if(l)return l(i.containers.concat()).then(h,h),this;h()}catch(e){var p;throw v===Se.getActiveTrap(o)&&b&&(null===(p=v._setSubtreeIsolation)||void 0===p||p.call(v,!0)),e}return this},deactivate:function(e){if(!i.active)return this;var t=Ae({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,i.paused||n._setSubtreeIsolation(!1),i.alreadySilent.clear(),E(),i.active=!1,i.paused=!1,k(),Se.deactivateTrap(o,n);var r=u(t,"onDeactivate"),s=u(t,"onPostDeactivate"),c=u(t,"checkCanReturnFocus"),l=u(t,"returnFocus","returnFocusOnDeactivate");null==r||r();var d=function(){Te(function(){l&&v(b(i.nodeFocusedBeforeActivation)),null==s||s()})};return l&&c?(c(b(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){return i.active?(i.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return i.active?(i.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,e)):this}
14,updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map(function(e){return"string"==typeof e?r.querySelector(e):e}),a.isolateSubtrees&&function(e){i.active&&!i.paused&&n._setSubtreeIsolation(!1),i.adjacentElements.clear(),i.alreadySilent.clear();var t,r=new Set,o=new Set,a=me(e);try{for(a.s();!(t=a.n()).done;){var u=t.value;r.add(u);for(var s="undefined"!=typeof ShadowRoot&&u.getRootNode()instanceof ShadowRoot,c=u;c;){r.add(c);var l=c.parentElement,d=[];l?d=l.children:!l&&s&&(d=c.getRootNode().children,l=c.getRootNode().host,s="undefined"!=typeof ShadowRoot&&l.getRootNode()instanceof ShadowRoot);var f,v=me(d);try{for(v.s();!(f=v.n()).done;){var b=f.value;o.add(b)}}catch(e){v.e(e)}finally{v.f()}c=l}}}catch(e){a.e(e)}finally{a.f()}r.forEach(function(e){o.delete(e)}),i.adjacentElements=o}(i.containers),i.active&&(d(),a.isolateSubtrees&&!i.paused&&n._setSubtreeIsolation(!0)),k(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return i.manuallyPaused}},_setPausedState:{value:function(e,t){if(i.paused===e)return this;if(i.paused=e,e){var r=u(t,"onPause"),o=u(t,"onPostPause");null==r||r(),E(),k(),n._setSubtreeIsolation(!1),null==o||o()}else{var a=u(t,"onUnpause"),s=u(t,"onPostUnpause");null==a||a(),n._setSubtreeIsolation(!0),d(),A(),k(),null==s||s()}return this}},_setSubtreeIsolation:{value:function(e){a.isolateSubtrees&&i.adjacentElements.forEach(function(t){var n;e?"aria-hidden"===a.isolateSubtrees?("true"!==t.ariaHidden&&"true"!==(null===(n=t.getAttribute("aria-hidden"))||void 0===n?void 0:n.toLowerCase())||i.alreadySilent.add(t),t.setAttribute("aria-hidden","true")):((t.inert||t.hasAttribute("inert"))&&i.alreadySilent.add(t),t.setAttribute("inert",!0)):i.alreadySilent.has(t)||("aria-hidden"===a.isolateSubtrees?t.removeAttribute("aria-hidden"):t.removeAttribute("inert"))})}}}),n.updateContainerElements(e),n};((e,t,n)=>{e.behaviors.page_header={attach(e,t){e.querySelectorAll("[data-toggle-target]").length&&J();const[r]=n("page-header-widget","#page-header__widget-button--menu",e);if(!r)return;const o=e.querySelector(".page-header__column--widget-button-wrapper--menu"),a=e.querySelector(".page-header__column--widget-contents"),i=Pe([a,o],{escapeDeactivates:()=>!document.querySelector(".main-menu__trigger--level-0.is-active"),allowOutsideClick:!0}),u=e.querySelector(".page-header"),s=r.dataset.widgetId;r.addEventListener("toggleAfter",e=>{e.target.easyToggleState_isActive?(document.documentElement.classList.add("widget-overlay-active",`widget-overlay-active--${s}`),u?.classList.add("widget-overlay-active",`widget-overlay-active--${s}`),i.activate()):(document.documentElement.classList.remove("widget-overlay-active",`widget-overlay-active--${s}`),u?.classList.remove("widget-overlay-active",`widget-overlay-active--${s}`),i.deactivate())},!1);const c=t.tikkurilaBaseHeaderBreakpoint["tikkurila_base.header.header"];window.matchMedia(c).onchange=e=>{e.matches&&X(r)&&r.click()},e.querySelectorAll("a, .page-header__widget-button:not(.page-header__widget-button--menu)").forEach(e=>{e.addEventListener("click",t=>{X(r)&&(e.classList.contains("page-header__widget-button--search")&&i.deactivate({onPostDeactivate:()=>{const e=document.querySelector(".site-search-input");e&&e.focus()}}),r.click())})})}}})(Drupal,drupalSettings,once)})();; 15(()=>{"use strict";const e=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},t=document.documentElement.getAttribute("data-easy-toggle-state-custom-prefix")||"toggle",i=(e,i=(()=>t)())=>["data",i,e].filter(Boolean).join("-");var n,r,a,o,s,u;i("arrows"),i("class"),i("class-on-target"),i("class-on-trigger"),i("escape"),i("event"),i("group"),i("is-active"),i("modal"),i("outside"),i("outside-event"),i("radio-group"),i("target"),i("target-all"),i("target-next"),i("target-parent"),i("target-previous"),i("target-self"),i("state"),i("trigger-off"),new Event("toggleAfter"),new Event("toggleBefore"),e((e,t)=>{const i=e?`[${e}]`:"";if(t)return[...t.querySelectorAll(i)];const n=[`[undefined]${i}`,`[undefined]${i}`,`[undefined][undefined]${i}`,`[undefined][undefined]${i}`,`[undefined][undefined]${i}`,`[undefined][undefined]${i}`,`[undefined][undefined]${i}`,`[undefined][undefined]${i}`].join().trim();return[...document.querySelectorAll(n)]}),e((e,t={[n]:e[u("isActive")],[r]:e[u("isActive")],[a]:!e[u("isActive")],[o]:e[u("isActive")],[s]:e[u("isActive")]})=>Object.keys(t).forEach(i=>
15e.hasAttribute(i)&&e.setAttribute(i,t[i])));const c=e=>`easyToggleState_${e}`;var d,l,g,f;e(c);const h=(e,t,i=!1)=>`This trigger has the class name '${e}' filled in both attributes '${d}' and '${t}'. As a result, this class will be toggled ${i&&"on its target(s)"} twice at the same time.`,A=(e,t)=>(e.getAttribute(t)||"").split(" ").filter(Boolean);var b,v,m,y,w;e(e=>{if(e.hasAttribute(d)&&e.getAttribute(d)&&(e.hasAttribute(l)||e.hasAttribute(g))){const t=A(e,l),i=A(e,g);A(e,d).forEach(n=>{t.includes(n)&&console.warn(h(n,l),e),i.includes(n)&&console.warn(h(n,g,!0),e)})}const t=[d,l,g].reduce((t,i)=>{const n=A(e,i);return(i===d||i===l)&&t.trigger.push(...n),(i===d||i===g)&&t.target.push(...n),t},{trigger:[],target:[]});return!t.trigger.length&&(e.hasAttribute(d)||e.hasAttribute(l))&&t.trigger.push(f),!t.target.length&&(e.hasAttribute(d)||e.hasAttribute(g))&&t.target.push(f),t}),e(e=>{const t=e.hasAttribute(b)?b:void 0;return(void 0)(`${t}="${e.getAttribute(t)}"`).filter(e=>e[(void 0)("isActive")])});const E=(e,t)=>{e||console.warn(`You should fill the attribute '${t}' with a selector`)},p=(e,t)=>{if(0===t.length)return console.warn(`There's no match with the selector '${e}' for this trigger`),[];const i=e.match(/#\w+/gi);return i&&i.forEach(e=>{const i=[...t].filter(t=>t.id===e.slice(1));i.length>1&&console.warn(`There's ${i.length} matches with the selector '${e}' for this trigger`)}),[...t]};var k,$,S,_,q,L,x,D,O,I,B,T,z,K,j,Y;e(e=>{if(e.hasAttribute(v)||e.hasAttribute(m)){const t=e.getAttribute(v)||e.getAttribute(m);return E(t,e.hasAttribute(v)?v:m),p(t,document.querySelectorAll(t))}if(e.hasAttribute(y)){const t=e.getAttribute(y);return E(t,y),p(t,e.parentElement.querySelectorAll(t))}if(e.hasAttribute(w)){const t=e.getAttribute(w);return E(t,w),p(t,e.querySelectorAll(t))}return e.hasAttribute(void 0)?p("previous",[e.previousElementSibling].filter(Boolean)):e.hasAttribute(void 0)?p("next",[e.nextElementSibling].filter(Boolean)):[]});const H=null,P=e=>document.addEventListener(e.getAttribute(k)||e.getAttribute($)||"click",F,!1),F=e=>{const t=e.target,i=e.type;let n=!1;B(S).filter(e=>e.getAttribute(k)===i||e.getAttribute($)===i&&!e.hasAttribute(k)||"click"===i&&!e.hasAttribute($)&&!e.hasAttribute(k)).forEach(e=>{const i=t.closest('[undefined="true"]');i&&i[K("trigger")]===e&&(n=!0),n||e===t||e.contains(t)||!e[K("isActive")]||(e.hasAttribute(_)||e.hasAttribute(q)?U:R)(e)}),n||document.removeEventListener(i,F,!1);const r=t.closest("[undefined][undefined],[undefined][undefined],[undefined][undefined]");r&&r[K("isActive")]&&P(t)},M=e=>R(e.currentTarget[K("target")]),R=e=>{T(e,O);const t=(void 0)(e);return Y(e,t.trigger),e[K("isActive")]=!e[K("isActive")],z(e),T(e,I),i=e,n=t.target,r=!1,(void 0)(i).forEach(e=>{T(e,O),e[K("isActive")]=!e[K("isActive")],z(e),r?e.classList.add(...n):Y(e,n),i.hasAttribute(S)&&(e.setAttribute(void 0,i[K("isActive")]),e[K("trigger")]=i),i.hasAttribute(void 0)&&(e[K("isActive")]?(H[e]=(e=>t=>{const i=[...e.querySelectorAll("a[href], area[href], input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]")];if(!i.length||"Tab"!==t.key)return;const n=t.target,r=i[0],a=i[i.length-1];return-1===i.indexOf(n)?(t.preventDefault(),r.focus()):t.shiftKey&&n===r?(t.preventDefault(),a.focus()):t.shiftKey||n!==a?void 0:(t.preventDefault(),r.focus())})(e),document.addEventListener("keydown",H[e],!1)):(document.removeEventListener("keydown",H[e],!1),delete H[e])),T(e,I),((e,t)=>{const i=B(L,e).filter(t=>!t.getAttribute(L)||e.matches(t.getAttribute(L)));0!==i.length&&(t[K("isActive")]?i.forEach(e=>{e[K("target")]||(e[K("target")]=t,e.addEventListener("click",M,!1))}):(i.forEach(e=>{e[K("target")]===t&&(e[K("target")]=null,e.removeEventListener("click",M,!1))}),t.focus()))})(e,i)}),(e=>{if(e.hasAttribute(S))return e.hasAttribute(q)?console.warn("You can't use 'undefined' on a radio grouped trigger"):e[K("isActive")]?P(e):void 0})(e);var i,n,r},U=e=>{const t=j(e);return 0===t.length?R(e):-1===t.indexOf(e)?(t.forEach(R),R(e)):-1===t.indexOf(e)||e.hasAttribute(q)?void 0:R(e)};e(()=>
15{[...document.querySelectorAll("[undefined]:not([undefined]):not([undefined]):not([undefined]):not([undefined]):not([undefined]):not([undefined])")].forEach(e=>{console.warn("This trigger has the attribute 'undefined', but no specified target\n",e)}),B(void 0).filter(e=>!e[K("isDefaultInitialized")]).forEach(e=>{if((e.hasAttribute(_)||e.hasAttribute(q))&&j(e).length>0)return console.warn(`Toggle group '${e.getAttribute(_)||e.getAttribute(q)}' must not have more than one trigger with 'undefined'`);R(e),e[K("isDefaultInitialized")]=!0});const e=B().filter(e=>!e[K("isInitialized")]);return e.forEach(e=>{const t=t=>{t.preventDefault(),(e.hasAttribute(_)||e.hasAttribute(q)?U:R)(e)},i=e.getAttribute($)||"click";e.addEventListener(i,t,!1),e[K("unbind")]=()=>{e.removeEventListener(i,t,!1),e[K("isInitialized")]=!1},e[K("isInitialized")]=!0}),B(x).length>0&&!document[K("isEscapeKeyInitialized")]&&(document.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||B(x).forEach(e=>{if(e[K("isActive")])return e.hasAttribute(q)?console.warn("You can't use 'undefined' on a radio grouped trigger"):(e.hasAttribute(_)?U:R)(e)})},!1),document[K("isEscapeKeyInitialized")]=!0),B(D).length>0&&!document[K("isArrowKeysInitialized")]&&(document.addEventListener("keydown",e=>{const t=document.activeElement;if(-1===["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].indexOf(e.key)||!t.hasAttribute(void 0)&&!t.hasAttribute(void 0)&&!t.hasAttribute(void 0)||!t.hasAttribute(D))return;if(!t.hasAttribute(_)&&!t.hasAttribute(q))return console.warn("You can't use 'undefined' on a trigger without 'undefined' or 'undefined'");e.preventDefault();const i=t.hasAttribute(_)?B(`undefined='${t.getAttribute(_)}'`):B(`undefined='${t.getAttribute(q)}'`);let n=t;switch(e.key){case"ArrowUp":case"ArrowLeft":n=i.indexOf(t)>0?i[i.indexOf(t)-1]:i[i.length-1];break;case"ArrowDown":case"ArrowRight":n=i.indexOf(t)<i.length-1?i[i.indexOf(t)+1]:i[0];break;case"Home":n=i[0];break;case"End":n=i[i.length-1]}return n.focus(),n.dispatchEvent(new Event(n.getAttribute($)||"click"))},!1),document[K("isArrowKeysInitialized")]=!0),e}),((e,t,i)=>{e.behaviors.menu_main={attach(e,t){const n=i("menu-main",".main-menu--level-0",e);if(!n.length)return;const r=t.tikkurilaBaseHeaderBreakpoint["tikkurila_base.header.header"],a=window.matchMedia(r),o=()=>a.matches;n.forEach(t=>{t.querySelectorAll(".main-menu__back").forEach(t=>{t.addEventListener("click",t=>{const i=e.getElementById(t.target.dataset.toggleBack);i&&(i.click(),i.focus())})}),t.querySelectorAll(".main-menu__trigger--level-0").forEach(i=>{i.addEventListener("toggleAfter",n=>{if(n.target.easyToggleState_isActive){if(t.classList.add("level-0-active"),!o()){const t=e.getElementById(i.getAttribute("aria-controls"));if(t){const e=t.querySelector(".main-menu__back");e&&requestAnimationFrame(()=>e.focus())}}}else t.classList.remove("level-0-active")},!1)}),t.addEventListener("keydown",i=>{if("Escape"===i.key){const n=t.querySelector(".main-menu__trigger--level-0.is-active");if(n)i.stopPropagation(),n.click(),n.focus();else if(!o()){const t=e.querySelector("#page-header__widget-button--menu");t&&requestAnimationFrame(()=>t.focus())}return}if("Tab"===i.key&&!o()){const e=t.querySelector(".main-menu__item--level-0.item-active");if(!e)return;const r=e.querySelector(".main-menu__below--level-0");if(!r)return;const a=(n=r,Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>{const t=getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility}));if(0===a.length)return;const o=a[0],s=a[a.length-1];i.shiftKey&&document.activeElement===o?(i.preventDefault(),s.focus()):i.shiftKey||document.activeElement!==s||(i.preventDefault(),o.focus())}var n}),window.matchMedia(r).onchange=t=>{const i=e.querySelector(".main-menu__trigger--level-0.is-active");!t.matches&&i&&i[c("isActive")]&&i.click()}})}}})(Drupal,drupalSettings,once)})();; 16((e,t)=>{e.behaviors.menu_segment={attach(e){const a=t("menu-segment",".menu-block--customer-switcher-menu",e);a.length&&a.forEach(e=>{const t=document.querySelector(".page-header").dataset.segment,a=e.querySelectorAll(".menu__item");a.length>=2&&"CON"===t?a[0].classList.add("active-trail"):a[1].classList.add("active-trail")})}}})(Drupal,once);; 17(function(Drupal,once){const siteSearchProcessResponse=async function(response){let response_data=await response.json();if(response.status===200)return response_data;throw new Error(response_data.message);};const category_mapping={'colors':'color','products':'product','projects':'project','services':'services'};const langcodes=['en','pl'];const firstPath=location.pathname.split('/')[1];let fetch_prefix='';if(langcodes.includes(firstPath))fetch_prefix='/'+firstPath;const siteSearchRenderCategoryResults=function(category,results){let items=[];let category_wrapper_element=document.getElementById(category_mapping[category]+'-search-results-wrapper');for(let item of results){let item_title_text=document.createTextNode(item['title']);let item_title=document.createElement('p');item_title.classList.add('saved-list-title');item_title.appendChild(item_title_text);let item_subtitle_text=(category==='services')?document.createTextNode(Drupal.t('Article').toString()):document.createTextNode(item['subtitle']);let item_subtitle=document.createElement('p');item_subtitle.classList.add('saved-list-subtitle');item_subtitle.appendChild(item_subtitle_text);let item_data_section=document.createElement('div');item_data_section.classList.add('saved-list-data-section');item_data_section.appendChild(item_title);item_data_section.appendChild(item_subtitle);let item_link=document.createElement('a');item_link.classList.add('saved-list-product-container');item_link.setAttribute('href',item['url_alias']);let item_image=undefined;switch(category){case 'products':case 'projects':{if(item['thumbnail']!==''){item_image=document.createElement('img');item_image.classList.add('shopping-list-tile');item_image.setAttribute('src',item['thumbnail']);}else{item_image=document.createElement('div');item_image.classList.add('shopping-list-tile');}let item_tile_section=document.createElement('div');item_tile_section.classList.add('saved-list-tile-section');item_tile_section.appendChild(item_image);item_link.appendChild(item_tile_section);break;}case 'colors':if(item['thumbnail']!==''){item_image=document.createElement('img');item_image.classList.add('saved-list-tile-section','color-saved-list-image');item_image.setAttribute('src',item['thumbnail']);}else if(item['hex_code']!==''){item_image=document.createElement('div');item_image.classList.add('saved-list-tile-section','color-saved-list-image');item_image.style.backgroundColor=item['hex_code'];}else{item_image=document.createElement('div');item_image.classList.add('saved-list-tile-section','color-saved-list-image');item_image.style.backgroundColor='transparent';item_image.style.border='1px solid rgba(0,0,0,.1)';}item_link.appendChild(item_image);break;case 'services':if('thumbnail' in item&&item['thumbnail']!==''){item_image=document.createElement('img');item_image.classList.add('saved-list-tile-section','color-saved-list-image');item_image.setAttribute('src',item['thumbnail']);}else{item_image=document.createElement('div');item_image.classList.add('saved-list-tile-section','color-saved-list-image');item_image.style.backgroundColor='#F5F5F5';}item_link.appendChild(item_image);break;default:console.log('Unsupported search category.');}item_link.appendChild(item_data_section);let item_node=document.createElement('div');item_node.classList.add('saved-list-item-container');item_node.appendChild(item_link);items.push(item_node);}let results_title=document.getElementById(category_mapping[category]+'-search--title');results_title.classList.toggle('hidden');category_wrapper_element.replaceChildren(...items);};const removePreviousResults=function(){let result_titles=document.getElementsByClassName('saved-list-modal-subtitle');for(let title of result_titles)if(!title.classList.contains('hidden'))title.classList.toggle('hidden');let result_wrappers=document.getElementsByClassName('search-results-wrapper');for(let wrapper of result_wrappers)wrapper.replaceChildren();};const siteSearchProcessResults=function(data){clearStatusMessage();for(let [category,category_results] of Object.entries(data.results))if(category_results.length>0)siteSearchRenderCategoryResults(category,category_results);};const showStatusMessage=(message)=>{let status_container=document.getElementById('search-status-container');let status_message=document.createTextNode(message);status_container.replaceChildren(status_message);};const clearStatusMessage=()=>{let status_container=document.getElementById('search-status-container');status_container.replaceChildren();};const executeSearch=function(query){if(query.length>0){removePreviousResults();showStatusMessage(`${Drupal.t('Searching',{},{context:'SiteSearch'})} ...`);fetch(fetch_prefix+`/search/content/${query}`).then((response)=>siteSearchProcessResponse(response)).then((data)=>siteSearchProcessResults(data)).catch((error)=>{clearStatusMessage();console.warn(error);showStatusMessage(`${Drupal.t('No results found',{},{context:'SiteSearch'})}`);});}else removePreviousResults();};function debounce(callback,wait){let timeout;return (...args)=>{clearTimeout(timeout);timeout=setTimeout(function(){callback.apply(this,args);},wait);};}Drupal.behaviors.tkSiteSearch={attach:function(){let search_input
17=document.getElementsByClassName('site-search-input')[0];if(search_input!==undefined)once('tkSiteSearch','html').forEach(()=>{search_input.addEventListener('input',debounce((event)=>{executeSearch(event.target.value);},500));const search_buttons=document.querySelectorAll('.button--search, .page-header__widget-button--search');search_buttons.forEach((item)=>{item.addEventListener('click',()=>{search_input.focus();});});});}};})(Drupal,once);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.