@claspo/components 1.2.0-theme.16 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +59 -0
- package/README.md +10 -0
- package/SysButtonComponent/SysButtonComponent.js +1 -1
- package/SysCalendarComponent/SysCalendarComponent.js +1 -1
- package/SysCheckboxListComponent/SysCheckboxListComponent.js +1 -1
- package/SysChoiceButtonsComponent/SysChoiceButtonsComponent.js +1 -0
- package/SysChoiceButtonsComponent/assets/img/component-icon.svg +3 -0
- package/SysColumnComponent/SysColumnComponent.js +1 -1
- package/SysColumnsComponent/SysColumnsComponent.js +1 -1
- package/SysConsentComponent/SysConsentComponent.js +1 -1
- package/SysContainerComponent/SysContainerComponent.js +1 -1
- package/SysCountdownTimerComponent/SysCountdownTimerComponent.js +1 -1
- package/SysDateComponent/SysDateComponent.js +1 -1
- package/SysDropdownInputComponent/SysDropdownInputComponent.js +1 -1
- package/SysImageComponent/SysImageComponent.js +1 -1
- package/SysInAppColumnsComponent/SysInAppColumnsComponent.js +1 -1
- package/SysInputComponent/SysInputComponent.js +1 -1
- package/SysPhoneInputComponent/SysPhoneInputComponent.js +1 -1
- package/SysPromoCodeComponent/SysPromoCodeComponent.js +1 -1
- package/SysRadioGroupComponent/SysRadioGroupComponent.js +1 -1
- package/SysSlideComponent/SysSlideComponent.js +1 -1
- package/SysSliderComponent/SysSliderComponent.js +1 -1
- package/SysSocialComponent/SysSocialComponent.js +1 -1
- package/SysTextAreaComponent/SysTextAreaComponent.js +1 -1
- package/SysTextComponent/SysTextComponent.js +1 -1
- package/SysVideoComponent/SysVideoComponent.js +1 -1
- package/package.json +6 -10
- /package/SysButtonComponent/assets/img/{button-component-icon.svg → component-icon.svg} +0 -0
- /package/SysCalendarComponent/assets/img/{calendar-component-icon.svg → component-icon.svg} +0 -0
- /package/SysCheckboxListComponent/assets/img/{checkbox-component-icon.svg → component-icon.svg} +0 -0
- /package/SysConsentComponent/assets/img/{consent-component-icon.svg → component-icon.svg} +0 -0
- /package/SysContainerComponent/assets/img/{container-component-icon.svg → component-icon.svg} +0 -0
- /package/SysCountdownTimerComponent/assets/img/{countdown-timer-component-icon.svg → component-icon.svg} +0 -0
- /package/SysDateComponent/assets/img/{date-component-icon.svg → component-icon.svg} +0 -0
- /package/SysDropdownInputComponent/assets/img/{dropdown-component-icon.svg → component-icon.svg} +0 -0
- /package/SysPhoneInputComponent/assets/img/{phone-input-component-icon.svg → component-icon.svg} +0 -0
- /package/SysPromoCodeComponent/assets/img/{promo-code-component-icon.svg → component-icon.svg} +0 -0
- /package/SysRadioGroupComponent/assets/img/{radio-btn-component-icon.svg → component-icon.svg} +0 -0
- /package/SysTextAreaComponent/assets/img/{text-area-component-icon.svg → component-icon.svg} +0 -0
- /package/SysTextComponent/assets/img/{text-component-icon.svg → component-icon.svg} +0 -0
- /package/SysVideoComponent/assets/img/{video-component-icon.svg → component-icon.svg} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}class r{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var s=[];for(var l in{transparent:"#0000"})s.push(l);var a="\\s*([.\\d%]+)\\s*",c="\\("+[a,a,a]+"(?:,\\s*([.\\d]+)\\s*)?\\)",d="(?:rgb)a?",h="("+s.join("|")+")";function p(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(d+c,"i"),RegExp([h,"(?:#([a-f0-9]{3,8}))",d+c,"(?:hsl)a?"+c].join("|"),"gi");var u=Array.prototype.concat,m=Array.prototype.slice,b=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];p(i)?e=u.call(e,m.call(i)):e.push(i)}return e};b.wrap=function(t){return function(){return t(b(arguments))}};const g=b;var f={},E=Object.hasOwnProperty,v=Object.create(null);for(var y in f)E.call(f,y)&&(v[f[y]]=y);var O={to:{},get:{}};function T(t,e,n){return Math.min(Math.max(e,t),n)}O.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=O.get.hsl(t),n="hsl"):(e=O.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},O.get.rgb=function(t){if(!t)return null;var e,n,o,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:E.call(f,e[1])?((i=f[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=T(i[n],0,255);return i[3]=T(i[3],0,1),i},O.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,T(parseFloat(e[2]),0,100),T(parseFloat(e[3]),0,100),T(isNaN(n)?1:n,0,1)]}return null},O.to.rgb=function(){var t=g(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},O.to.hsl=function(){var t=g(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const S=O,C={},R={};for(const t of Object.keys(C))R[C[t]]=t;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(_)){if(!("channels"in _[t]))throw new Error("missing channels property: "+t);if(!("labels"in _[t]))throw new Error("missing channel labels property: "+t);if(_[t].labels.length!==_[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=_[t];delete _[t].channels,delete _[t].labels,Object.defineProperty(_[t],"channels",{value:e}),Object.defineProperty(_[t],"labels",{value:n})}_.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),s=r-i;let l,a;r===i?l=0:e===r?l=(n-o)/s:n===r?l=2+(o-e)/s:o===r&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[l,100*a,100*c]},_.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const l=2*o-i,a=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,a[t]=255*s;return a};const A=_;function N(t,e){return function(n){return e(t(n))}}function I(t,e){const n=[e[t].parent,t];let o=A[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=N(A[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const P={};Object.keys(A).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:A[t].channels}),Object.defineProperty(P[t],"labels",{value:A[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(A);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(A[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],s=e[i];-1===s.distance&&(s.distance=e[t].distance+1,s.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=I(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];P[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),P[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const x=P,L=["keyword","gray","hex"],w={};for(const t of Object.keys(x))w[[...x[t].labels].sort().join("")]=t;const M={};function D(t,e){if(!(this instanceof D))return new D(t,e);if(e&&e in L&&(e=null),e&&!(e in x))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof D)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=S.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=x[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=x[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=j(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in w))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=w[o];const{labels:i}=x[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=j(r)}if(M[this.model])for(o=x[this.model].channels,n=0;n<o;n++){const t=M[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}D.prototype={toString(){return this.string()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return S.to[e.model](n)},round(t){return t=Math.max(t||0,0),new D([...this.color.map(U(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new D([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(x)){if(L.includes(t))continue;const{channels:e}=x[t];D.prototype[t]=function(...e){return this.model===t?new D(this):e.length>0?new D(e,t):new D([...k(x[this.model][t].raw(this.color)),this.valpha],t)},D[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=j(n,e)),new D(o,t)}}function U(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function k(t){return Array.isArray(t)?t:[t]}function j(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}function B(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function F(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(s,10),height:n+parseInt(i,10)+parseInt(o,10)}}function W(t,e,n,o,i){switch(t.position){case"top":return{left:`${V(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${V(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${H(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${H(0,t)}px`}}}function V(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>r.width(o)&&(i-=i+e.width-r.width(o)),i}function H(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function G(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}const $="cl-tooltip-text-styles",Q=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function z(t,e,n,o){o=o||document;let i=null;t&&t.classList.add("invalid"),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${$}`))return;const e=document.createElement("style");e.setAttribute("id",$),G({element:e,html:Q}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,s=function(t,e,n,o,i,s){const l=function(t,e,n,o,i){const s=function(t,e,n,o){const i=r.width(o),{right:s}=t.getBoundingClientRect(),l=i-n-s-r.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:F(e).width,availableSpaceToTheLeftSideOfTheTrigger:s-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,i),l=function(t,e,n,o){const i=r.height(o),{top:s,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:F(e).height,availableSpaceAboveTriggerElem:s-n,availableSpaceBelowTriggerElem:i-l-n}}(t,e,n,i);let a="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:s.availableSpaceToTheRightSideOfTheTrigger>=s.contentWidth,left:s.availableSpaceToTheLeftSideOfTheTrigger>=s.contentWidth};if(c.top?a="top":c.bottom?a="bottom":c.right?a="right":c.left&&(a="left"),o&&c[o]&&(a=o),"undefined"===a){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,s.availableSpaceToTheRightSideOfTheTrigger,s.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?a="bottom":t===l.availableSpaceAboveTriggerElem?a="top":t===s.availableSpaceToTheRightSideOfTheTrigger?a="right":t===s.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},l),s),{position:a})}(t,e,n,o,s=s||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)B(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),B(e,{"margin-bottom":"0px"});else if("bottom"===t.position)B(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),B(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";B(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:W(l,t.getBoundingClientRect(),e.getBoundingClientRect(),i,s),position:l.position}}(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",s.position),B(n,s.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${$}`);e&&e.remove()}(o))})}function K(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function q(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}const X="VIEW",J="MODULE",Z="CONTAINER",Y="INPUT",tt="BUTTON",et="CONSENT",nt="COLUMN";var ot,it;(it=ot||(ot={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",it.REQUEST="REQUEST",it.DISPATCH_EVENT="DISPATCH_EVENT",it.GO_TO_VIEW="GO_TO_VIEW",it.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",it.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",it.SHOW_WIDGET="SHOW_WIDGET",it.OPEN_LINK="OPEN_LINK",it.CLOSE_WIDGET="CLOSE_WIDGET",it.CLICK="CLICK";const rt=ot;var st,lt;class at{static sortActions(t){const e={[rt.CLOSE_WIDGET]:-1,[rt.OPEN_LINK]:-2,[rt.SHOW_WIDGET]:1,[rt.SUBSCRIBE_CONTACT]:2,[rt.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=at.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(at.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,r=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await s.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}at.IGNORING_VIEW_ENTRY_TYPES=[tt,et,Y],(lt=st||(st={})).CLICK="CLICK",lt.COMPONENT_EVENT="COMPONENT_EVENT";class ct{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class dt{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case st.CLICK:return new at(t,e);case st.COMPONENT_EVENT:return new ct(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class ht{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class pt{constructor(){this.listeners=pt.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=ht.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=pt.createDefaultListenersState()}}pt.createDefaultListenersState=()=>({"*":{}});const ut=pt,mt=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class bt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class gt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===J?Object.assign(Object.assign({},t),gt.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var ft,Et,vt,yt,Ot,Tt,St,Ct,Rt,_t,At,Nt,It;gt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Et=ft||(ft={})).VIEW="VIEW",Et.CONTAINER="CONTAINER",Et.TEXT="TEXT",Et.INPUT="INPUT",Et.BUTTON="BUTTON",Et.IMAGE="IMAGE",Et.CONSENT="CONSENT",Et.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Et.PROMO_CODE="PROMO_CODE",Et.MULTIPLE_INPUT="MULTIPLE_INPUT",Et.VIDEO="VIDEO",Et.SLIDER="SLIDER",Et.SLIDE="SLIDE",Et.SOCIAL="SOCIAL",Et.COLUMNS="COLUMNS",Et.COLUMN="COLUMN",Et.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(vt||(vt={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(yt||(yt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Ot||(Ot={})),(Tt||(Tt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(St||(St={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Ct||(Ct={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(Rt||(Rt={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(_t||(_t={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={})),(It=Nt||(Nt={})).BEFORE="BEFORE",It.AFTER="AFTER",It.INSIDE="INSIDE",It.INSTEAD="INSTEAD";class Pt extends ut{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Pt.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Pt.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Pt.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Pt.changeEventName="CHANGE";const xt=Pt;class Lt{static set(t,e){const n=t[Lt.accumulatorPropertyName]||{};t[Lt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Lt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Lt.accumulatorPropertyName="clStyleAttributes";const wt=Lt;var Mt;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(Mt||(Mt={}));class Dt{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==X&&t!==Z&&t!==nt||(e.style.display=o===Mt.CONTENT_LOCKER&&t===X?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class Ut{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class kt{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(r=e.styles)||void 0===r?void 0:r.find((t=>t.element===n)))||{},d=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),h=this.parseBackground(d);h.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),Ut.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const jt=new class{execute(t,e="GET",n=null,o,i){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function Bt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Ft{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Wt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var Vt;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(Vt||(Vt={}));const Ht=Vt;class Gt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Ht.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Ht.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new Wt(this.onCounterStateUpdate)}}}const $t=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>$t(...t)}},Qt=$t,zt="props",Kt="shared",qt="environment";function Xt(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const Jt="SUBMIT";function Zt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}const Yt={DESKTOP:"desktop",MOBILE:"mobile"};function te(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}class ee extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var ne;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ne||(ne={}));class oe extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let s=new ee("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=Qt(zt,Kt,qt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new bt({}),this.componentEventEmitter=new ut,this.componentResourceManager=new Gt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new dt(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(zt).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Kt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new kt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),jt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(xt.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(qt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===ne.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ne.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(zt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Kt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(qt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Zt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Zt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),r=i("type"),s="element-styles";let l=this.getRootElement().querySelector(`style[${r}="${s}"]`);l||(l=document.createElement("style"),l.setAttribute(r,s),this.getRootElement().appendChild(l)),G({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let r=te(o,n,e);if(r){if(this.resizeListener.isMobile()){const t=te(o,"desktop",e);t&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(r),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,r;const s=[];"host"===(e=oe._resolveTogglableStylesForElementModel(e)).element&&(Dt.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],mt(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),mt(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Bt(e.styleAttributes,s)});if(wt.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),G({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${Ft.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");G({element:t,html:`[${i("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{G({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&G({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&G({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&G({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>Xt(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return t&&1===t.split(",").length?this.parentNode:Xt(this.parentNode,i("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>K(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>q(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===Jt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:rt.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}oe._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=oe._resolveTogglableStyles(e[t]))})),e},oe._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const ie=oe,re=Symbol("required");var se=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function le(){}const ae="pending",ce="valid",de="invalid";class he extends ie{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=se(t,["element"]),i=this.getProps(),r=this.getModel(),s=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),l=this.services.form,a=[s,n,...e];return l.hasControl(i.control.name)?l.updateControl(...a):l.registerControl(...a)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=le,invalidCallback:r=le,pendingCallback:s=le,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=se(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const h=this.getProps().control.validation,p=(null==h?void 0:h.validator)?a[h.validator]:void 0,u=t.some((t=>t[re])),m=!!(null==h?void 0:h.required),b=m||u,g=[...t];m&&!u&&g.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[re]=!0,e}()),p&&g.push(p);const f=this._prepareAsyncValidators(g),E=this._createControl({element:n,validation:{validator:"custom",required:b}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:E,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:s},d)),E},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=ae;switch(!0){case n.control.pending:t=ae;break;case n.control.valid:t=ce;break;default:t=de}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:s,errorMessageMapper:l,pendingCallback:a}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case ce:(function(t,e){t&&t.classList.remove("invalid"),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case de:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=q(e,K(t));if(!o)return n;const i=o.translations,r=Object.keys(i).find((t=>t.includes(n)));return r?i[r]:n}(c,d,e);l&&(r=l(e,r)),z(o,i,r,this.htmlDocumentObject),s&&s()}break;case ae:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&t.classList.remove("invalid")}(o,i),a&&a())}}}}function pe(t){return Object.values(Yt).map((e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t})))}const ue={name:"SysChoiceButtonsComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],focusableElements:["label","button"],contextMenuModel:pe([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:pe([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:pe([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"button"},{element:"label"}]},{type:"CONTROL",name:"NUMBER_INPUT",element:"buttonsContainer",elementProp:"styleAttributes",elementSubProp:"gap",params:{label:"DOCUMENT_FLEX_GAP",validators:{min:0}},valueTransformers:[{name:"px"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","styleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","styleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"button",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"HOVER_ANIMATION",propPath:["styles","[element=button]","hoverStyleAttributes"]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{onlyColorSelection:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BACKGROUND"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BORDERS"}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{label:"i18n_DOCUMENT_SELECTED_BUTTON_SHADOW"}},{type:"CONTROL",name:"SWITCH",propPath:["content","labelEnabled"],params:{label:"DOCUMENT_SHOW_INPUT_LABELS",boldLabel:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}},{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"]}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!0,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!1,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}}]},i18nPropPaths:["content,label","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",labelEnabled:!1},control:{name:"choiceButtons",integrationName:"choiceButtons",defaultValue:null,multipleChoice:!1,options:{option_1:{exportId:"option_1",label:"Option 1",id:"option_1",sort:0},option_2:{exportId:"option_2",label:"Option 2",id:"option_2",sort:1}},optionsAlphabeticSort:{enabled:!1},validation:{required:!0}},styles:[{element:"button",styleAttributes:{background:"rgb(0, 0, 0)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",boxShadow:"none"},hoverStyleAttributes:{background:"rgba(35, 35, 35, 1)",externalBackgroundUrlSource:!1,borderTopColor:"rgb(0, 0, 0)",borderBottomColor:"rgb(0, 0, 0)",borderLeftColor:"rgb(0, 0, 0)",borderRightColor:"rgb(0, 0, 0)",boxShadow:null},selectedStyleAttributes:{background:"rgba(35, 35, 35, 1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"2px",borderTopColor:"rgba(108, 108, 108, 1)",borderBottomWidth:"2px",borderBottomColor:"rgba(108, 108, 108, 1)",borderLeftWidth:"2px",borderLeftColor:"rgba(108, 108, 108, 1)",borderRightWidth:"2px",borderRightColor:"rgba(108, 108, 108, 1)",boxShadow:"none",externalBackgroundUrlSource:!1},hoverAnimationType:null}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{width:"230px",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0",minWidth:"230px"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"500",fontSize:"16px",textShadow:"none","--textDisplay":"inline",fontFamily:"Montserrat",letterSpacing:"0px",textTransform:"none"},classes:"cl-text-class-button"}],mobile:[{element:"host",styleAttributes:{width:"auto",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"16px",textShadow:"none","--textDisplay":"inline"},classes:"cl-text-class-button"}]}},metaDescription:{icon:"/SysChoiceButtonsComponent/assets/img/component-icon.svg",label:{en:"Choice",ru:"Один вариант",uk:"Один варіант",es:"Opción única",fr:"Choix unique",de:"Einzelauswahl",it:"Scelta singola",pt:"Escolha única",ro:"Alegere unică",bg:"Единичен избор",cs:"Jeden výběr",el:"Μία επιλογή",nl:"Enkele keuze",pl:"Pojedynczy wybór",sv:"Enskilt val",tr:"Tek seçim",ar:"اختيار واحد",zh:"单选",da:"Enkelt valg",he:"בחירה יחידה",fi:"Yksittäinen valinta",hi:"एकल विकल्प",hr:"Jedan izbor",hu:"Egyetlen választás",id:"Pilihan tunggal",ja:"単一選択",ko:"단일 선택",no:"Enkelt valg",sk:"Jednoduchá voľba",sl:"Ena izbira",sr:"Један избор"}},showComponentOptionsPropertyPaneOnInsert:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};function me(t){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(t)}function be(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function ge(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?be(Object(n),!0).forEach((function(e){Te(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Se(o.key),o)}}function Ee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ee=function(){return!!t})()}function ve(){return ve="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ye(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ve.apply(null,arguments)}function ye(t){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ye(t)}function Oe(t,e){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oe(t,e)}function Te(t,e,n){return(e=Se(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Se(t){var e=function(t){if("object"!=me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==me(e)?e:e+""}var Ce=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Te(e=function(t,e,n){return e=ye(e),function(t,e){if(e&&("object"==me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ee()?Reflect.construct(e,n||[],ye(t).constructor):e.apply(t,n))}(this,t),"setLabelStylesAndContent",(function(t){var n=e.getElement("label");n.style.display=t.content.labelEnabled?"block":"none",G({element:n,html:t.content.label})})),Te(e,"createButtons",(function(t){var n=e.getElement("buttonsContainer"),o=e.getOptionsMap();n.innerHTML="";var i=e.getCurrentValue();Object.keys(o).forEach((function(r){var s=o[r],l=document.createElement("div");l.setAttribute("cl-element","button"),null!=i&&i[r]&&e.setSelectedOptionStyles(l,t),e.isStaticRenderMode()&&l.addEventListener("click",(function(){var t=e.getCurrentValue(),i=e.getProps();if(null!=t&&t[r]){e.removeSelectedOptionStyles(l,i),delete t[r];var s=Object.keys(t).length?t:null;e.registeredControl.setValue(s)}else{i.control.multipleChoice||e.removeSelectionFromAllButtons(n,i),e.setSelectedOptionStyles(l,i);var a=i.control.multipleChoice?ge(ge({},t),{},Te({},r,o[r].exportId)):Te({},r,o[r].exportId);e.registeredControl.setValue(a)}})),G({element:l,html:s.label}),n.append(l)}))})),Te(e,"getOptionsMap",(function(){var t,n=null!==(t=e.getProps().control.optionsAlphabeticSort)&&void 0!==t&&t.enabled?"label":"sort";return function(t,e,n=!1){return function(t){return[...t].reduce(((t,[e,n])=>(t[e]=n,t)),{})}(Object.entries(t).sort((([t,o],[i,r])=>function(t,e,n,o=!1){let i=t[n],r=e[n];return isNaN(i)||isNaN(r)?"string"!=typeof i||"string"!=typeof r?0:(i=i.toLowerCase(),r=r.toLowerCase(),o?r.localeCompare(i):i.localeCompare(r)):i<r?o?1:-1:i>r?o?-1:1:0}(o,r,e,n))))}(e.getProps().control.options,n)})),Te(e,"registerControl",(function(){var t=e.getRootElement().querySelector(".tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:t}),e.registeredControl.setValue(null,{silent:!0,skipValidation:!0})})),Te(e,"getCurrentValue",(function(){var t;return(null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null})),Te(e,"setSelectedOptionStyles",(function(t,e){B(t,e.styles.find((function(t){return"button"===t.element})).selectedStyleAttributes)})),Te(e,"removeSelectedOptionStyles",(function(t,e){B(t,e.styles.find((function(t){return"button"===t.element})).styleAttributes)})),Te(e,"removeSelectionFromAllButtons",(function(t,n){t.querySelectorAll("[cl-element=button]").forEach((function(t){e.removeSelectedOptionStyles(t,n)}))})),Te(e,"manifest",ue),e.getRootElement().innerHTML="\n <style>".concat("\n .main-container {\n height: 100%;\n }\n \n .container-with-label {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .container-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n cursor: pointer;\n }\n \n .buttons-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n","</style>\n ").concat('\n <div class="main-container">\n <div class="container-with-label">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n <div class="container-with-tooltip">\n <div class="buttons-container" cl-element="buttonsContainer"></div>\n <div class="tooltip">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n </div>\n</div>\n',"\n "),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e)}(t,he),function(t,e){return e&&fe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=ve(ye(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]),this.registerControl(),this.observeProps((function(t,n){e.setLabelStylesAndContent(n),e.createButtons(n),e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}}])}();Te(Ce,"define",{name:"sys-choice-buttons",model:ue.name,manifest:ue});export{Ce as default};window.clComponentClass_SysChoiceButtonsComponent=Ce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/container-component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]]},t="cl-";function n(e){return t+e}function o(e){return"cl-"+e}function i(e,t,n){var o;return null===(o=null==e?void 0:e[t])||void 0===o?void 0:o.find((e=>e.element===n))}function r(e=[]){return e.map((e=>Object.assign(Object.assign({},e),{styleAttributes:Object.assign({},e.styleAttributes)})))}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=a(a({},e),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,canStack:!1,version:"1.0.0",props:a(a({},e.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(d=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values({DESKTOP:"desktop",MOBILE:"mobile"}).reduce(((e,t)=>Object.assign(e,{[t]:r(d)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"},displayCondition:"return (sdk.appConfig.columnsOptions?.allowHideColumnOnMobile ?? true) === true"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}}});var d;const u="VIEW",h="MODULE",m="CONTAINER",y="INPUT",g="BUTTON",b="CONSENT",f="COLUMN",O="SUBSCRIBE_CONTACT",E="REQUEST",v="SHOW_WIDGET",T="OPEN_LINK",C="CLOSE_WIDGET";class S{static sortActions(e){const t={[C]:-1,[T]:-2,[v]:1,[O]:2,[E]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort(((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0))}constructor(e,t){this.config=e,this.actions=S.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const i=n(),r=i.getAttribute(o("id"));this.listener=e=>{const t=e.composedPath().filter((e=>e instanceof HTMLElement&&e.getAttribute(o("type"))));let n=0;for(;t[n]&&t[n].getAttribute(o("id"))!==r;){let e=t[n].getAttribute(o("type"));if(S.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((i.shadowRoot||i).querySelectorAll(this.config.relativeSelector)):[i],this.targetElements.forEach((e=>{e.addEventListener("click",this.listener)}))}async execute(){var e,t,n,o;try{for(var i,r=!0,s=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,i){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,i,(t=e[n](t)).done,t.value)}))}}}(this.eventsQueue);!(e=(i=await s.next()).done);){o=i.value,r=!1;try{const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}finally{r=!0}}}catch(e){t={error:e}}finally{try{r||e||!(n=s.return)||await n.call(s)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((e=>{e.removeEventListener("click",this.listener)})),this.targetElements=[])}}S.IGNORING_VIEW_ENTRY_TYPES=[g,b,y];const R="CLICK",A="COMPONENT_EVENT";class N{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){this.componentEmitterListener=t.on(this.config.eventName,(()=>{this.actions.forEach((t=>t.execute(e.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class P{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map((e=>this.actionFactory.get(e)));switch(t.forEach((e=>this.actionRegister.register(e))),e.type){case R:return new S(e,t);case A:return new N(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class L{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class _{constructor(){this.listeners=_.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach((o=>o(t,e,n))),Object.values(this.listeners["*"]).forEach((o=>o(t,e,n)))}on(e,t){const n=L.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=_.createDefaultListenersState()}}_.createDefaultListenersState=()=>({"*":{}});const I=(e,t,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(e,t,n,o)};class k{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class w{static extract(e){const t=e.views.map((e=>{const t=e.children.map((e=>e.type===h?Object.assign(Object.assign({},e),w.moduleToContainerParams):e));return Object.assign(Object.assign({},e),{children:t})}));return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}w.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class x extends _{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",(({isMobileEnv:e})=>{this._isMobile=e,this.emit(x.changeEventName,this._isMobile)}))}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(x.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(x.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}x.changeEventName="CHANGE";class M{static set(e,t){const n=e[M.accumulatorPropertyName]||{};e[M.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[M.accumulatorPropertyName]).forEach((n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""}))}}M.accumulatorPropertyName="clStyleAttributes";const D="CONTENT_LOCKER";class j{static applyHostStyles(e,t,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((e=>"CLICK"===e.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(t.style.cursor="pointer"),e!==u&&e!==m&&e!==f||(t.style.display=o===D&&e===u?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class B{static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}var U,W,F,G,H,V,$;(U||(U={})).ACCENT="accent",(F=W||(W={})).TOP="TOP",F.CENTER="CENTER",F.BOTTOM="BOTTOM",function(e){e.LEFT="LEFT",e.CENTER="CENTER",e.RIGHT="RIGHT"}(G||(G={})),function(e){e.SLIDE_TO_TOP="SLIDE_TO_TOP",e.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",e.SLIDE_TO_LEFT="SLIDE_TO_LEFT",e.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(H||(H={})),function(e){e.PULSE="PULSE",e.VIBRATE="VIBRATE",e.WOBBLE="WOBBLE",e.SHAKE="SHAKE",e.JELLO="JELLO",e.BOUNCE="BOUNCE",e.BLINK="BLINK",e.FLICKER="FLICKER",e.PING="PING"}(V||(V={})),function(e){e.LEFT="LEFT",e.RIGHT="RIGHT"}($||($={}));class K{constructor(e,t,n,o,i,r){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===i?void 0:i.find((e=>e.element===n)),c=(null===(r=t.styles)||void 0===r?void 0:r.find((e=>e.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),d=this.parseBackground(p);d.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.positionOptions})})),Promise.all([...this.envUrlMaps[e].entries()].map((([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((e=>e.text())).then((o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var t;this._applyHostElementBackground(this.envUrlMaps[e].get("host"),null===(t=this.getSharedCb().theme)||void 0===t?void 0:t.schema)})).catch((e=>{console.error(e),B.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(e=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),e.schema)})),this}_applyHostElementBackground(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrl(e,t))}_buildBackgroundUrl(e,t){const n=e.inlineSvgString.trim().replace(`var(--cl-schema-${U.ACCENT})`,t[U.ACCENT]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}off(){var e;null===(e=this.subscription)||void 0===e||e.off()}}const z=new class{execute(e,t="GET",n=null,o,i){const r={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,r)}};function J(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{})}class Q{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,(e=>"_"+e)).toUpperCase()}}class Y{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const q="COMPONENT_RESOURCES_LOADED",Z="FAILED_TO_LOAD_COMPONENT_RESOURCE";class X{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(q,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Z,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new Y(this.onCounterStateUpdate)}}}const ee=(...e)=>{let t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:[]})),{});return{get:e=>t[e],clear:()=>ee(...e)}},te=ee,ne="props",oe="shared",ie="environment";function re(e,t,n,o){const i=e=>{let r=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return r&&(o&&"function"==typeof o?o(r.getAttribute(t)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,t))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(e)}const se="SUBMIT";function le(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach((n=>{if("element"===n||"classes"===n)return;const o=t[n];o&&"object"==typeof o&&!Array.isArray(o)?e[n]=Object.assign(Object.assign({},e[n]||{}),o):e[n]=o})),e):e}function ae(e){const{element:t,html:n,appendHtml:o}=e,i=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((e=>e.remove())),t.querySelectorAll("*").forEach((e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((t=>e.removeAttribute(t))),Array.from(e.attributes).forEach((t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)})),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}})),t.body.innerHTML}(n);o?t.innerHTML+=i:t.innerHTML=i}class ce extends Event{constructor(e,t,n){super(e,n),this.detail={},Object.defineProperty(this,"detail",{value:t})}}const pe="STATIC",de="UPDATING";class ue extends HTMLElement{constructor(){var e,r;super(),this.construct=()=>{let e;const t=this.getAttribute(o("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const i=n.closest(`[${o("widget-id")}]`);let r;i&&(r=i.getAttribute(o("widget-id")));let s=new ce("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(o("path")),id:t,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(s),e=s.detail.props,Object.assign(this,e),this.observers=te(ne,oe,ie),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach((e=>null==e?void 0:e.off()))}},this.state=new k({}),this.componentEventEmitter=new _,this.componentResourceManager=new X(this.model.id,this.services.eventEmitter,this.isStaticRenderMode),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new P(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(e=>{this.model.props=e,this.observers.get(ne).forEach((t=>t(this.prevProps,e))),this.prevProps=e;const t=this.getHostElement(),n=o("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(e=>{Object.assign(this.model,e)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(oe).forEach((e=>e(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new K(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),z),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(x.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(ie).forEach((t=>t(this.prevEnvironment,e))),this.prevEnvironment=e})))},this.attachHandlers=()=>{this.getHandlers().map((e=>this._handlerFactory.get(e))).map((e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((e=>e()))},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.postpone()))},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.release()))},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(ne).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(oe).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(ie).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${o("element")}]`)).filter((e=>!e.hasAttribute(o("component"))))],this.getElement=(e,t)=>this.getElements().find((n=>t?n.getAttribute(o("element"))===e&&n.id===t:n.getAttribute(o("element"))===e)),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;const r=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach((e=>{const t=e.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===t&&(le(n,e),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===t&&(le(n,e),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))})),n}(e,t),s=o("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${s}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(s,l),this.getRootElement().appendChild(a)),ae({element:a,html:""}),n.forEach((e=>{let t=e.getAttribute(o("element"));const n=this.getEnvironment();let s=i(r,n,t);if(s){if(this.resizeListener.isMobile()){const e=i(r,"desktop",t);e&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),s.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(s),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var i,r;const s=[];"host"===(t=ue._resolveTogglableStylesForElementModel(t)).element&&(j.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=t.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const e=new Image;e.src=a[1],I(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),I(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},t),{styleAttributes:J(t.styleAttributes,s)});if(M.set(e,c),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let i=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),o=`flip-up-animation-${t.element}`;let r=this.getRootElement().querySelector(`#${o}`);r||(r=document.createElement("style"),r.id=o,e.appendChild(r)),ae({element:r,html:`\n ${n}::before {\n content: '';\n background: ${i.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),i=Object.assign(Object.assign({},t.hoverStyleAttributes),{background:"transparent",position:"relative"})}i.borderTopWidth&&"0px"!==i.borderTopWidth||delete i.borderTopColor,i.borderBottomWidth&&"0px"!==i.borderBottomWidth||delete i.borderBottomColor,i.borderLeftWidth&&"0px"!==i.borderLeftWidth||delete i.borderLeftColor,i.borderRightWidth&&"0px"!==i.borderRightWidth||delete i.borderRightColor,this._addStylesToStyleElement(n,t.element,i,`:not(.${o("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this.applySharedClassesToElementModel=e=>function(e,n){let o=e;return(o.classes||"").split(" ").filter((e=>e.startsWith(t))).forEach((e=>{var t;let i=null===(t=n.textClasses)||void 0===t?void 0:t[e];i&&(i.styleAttributes.fontFamily||(i.isHeader&&n.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:n.headerFontFamily})})),!i.isHeader&&n.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:n.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:n.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,i="",r)=>{const s=Object.keys(n).reduce(((e,t)=>e+` ${Q.camelCaseToDashCase(t)}: ${n[t]}${r?" !important;":";"}`),"");ae({element:e,html:`[${o("element")}="${t}"]${i} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{ae({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,i,r;t.linkColor&&ae({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&ae({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=t.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=t.linkParams)||void 0===r?void 0:r.removeUnderline)&&ae({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,o)=>{Array.from(e.classList).filter((e=>e!==n("hovered")&&e!==n("focused"))).forEach((n=>{n.startsWith(t)&&e.classList.remove(n)}));const i=((e.getAttribute("class")||"")+" "+o.classes).trim();e.setAttribute("class",i)},this.getParentComponent=()=>re(this.parentNode,o("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(o("path"));return e&&1===e.split(",").length?this.parentNode:re(this.parentNode,o("path"),void 0,(e=>e&&1===e.split(",").length))},this.getWidgetLanguages=()=>{return[(e=this.services.config).getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter((e=>!!e));var e},this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>function(e,t){return t.reduce(((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null}),null)}(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.addContextRecord=()=>{var e;const t=this.getModel();this.services.context.addRecord(t.id,{recordKey:t.id,id:t.props.control.name,label:this.getContextRecordLabel(t.props),value:t.props.control.defaultValue||"",viewIndex:null===(e=t.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(t.props)}})},this.getContextRecordLabel=e=>{var t,n,o,i,r,s;const l=e.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(t=e.content)||void 0===t?void 0:t.label)&&(null===(i=null===(o=null===(n=e.adaptiveStyles)||void 0===n?void 0:n.desktop.find((e=>"label"===e.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return(null===(r=e.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(e.content.placeholder):(null===(s=e.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{var t;switch(null===(t=e.control)||void 0===t?void 0:t.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find((e=>e.category===se));n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:E}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>{var e;return(null===(e=this.getProps())||void 0===e?void 0:e.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.define)||void 0===e?void 0:e.manifest)||(null===(r=this.constructor.define)||void 0===r?void 0:r.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}get isStaticRenderMode(){return this.services.config.getConfig("renderMode")===pe}get isUpdatingRenderMode(){return this.services.config.getConfig("renderMode")===de}static _resolveTogglableStylesForElementModel(e){const t=Object.assign({},e);return Object.keys(t).forEach((e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=ue._resolveTogglableStyles(t[e]))})),t}static _resolveTogglableStyles(e){const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach((e=>{e in t&&(t[e]=t[n]?t[e]:o)})),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ve(o.key),o)}}function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ye=function(){return!!e})()}function ge(e,t,n,o){var i=be(fe(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function be(){return be="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},be.apply(null,arguments)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function Oe(e,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oe(e,t)}function Ee(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=he(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}var Te=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Ee(t=function(e,t,n){return t=fe(t),function(e,t){if(t&&("object"==he(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ye()?Reflect.construct(t,n||[],fe(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Ee(t,"getComponentName",(function(){return t.manifest.name})),Ee(t,"processStyles",(function(){t.innerHTML+='\n <style>\n [cl-component="'.concat(t.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(e,ue),t=e,(n=[{key:"connectedCallback",value:function(){var t=this;ge(e,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(e,n){t.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this,3)([])}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ke(o.key),o)}}function Ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ae=function(){return!!e})()}function Ne(e,t,n,o){var i=Pe(Le(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Pe(){return Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Le(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pe.apply(null,arguments)}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function Ie(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var we=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return Ie(t=function(e,t,n){return t=Le(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ae()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n))}(this,e,[].concat(i)),"manifest",p),Ie(t,"updateResponsiveStyles",(function(){var e,n,o=null===(e=t.getParentComponent())||void 0===e||null===(e=e.getProps())||void 0===e?void 0:e.isResponsive,i=(n=t.shadowRoot.children,function(e){if(Array.isArray(e))return Se(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Se(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)?Se(e,t):void 0}}(n)||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.")}()).filter((function(e){return e.hasAttribute("cl-element")})),r=t.getHostElement().style;i.length?r.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(e){return r[e]})).map((function(e){return e&&parseFloat(e)})).some(Boolean)&&(r.minWidth="min-content"),r.minWidth="20px"),"mobile"===t.getEnvironment()&&o&&(i.length?r.minHeight="auto":r.background.includes("url")?r.minHeight="150px":i.length||(r.minHeight="50px"))})),Ie(t,"updateEmptyState",(function(){var e=!(Array.from(t.getRootElement().children).filter((function(e){return"STYLE"!==e.tagName&&"SCRIPT"!==e.tagName}))||[]).length;t.setAttribute(o("empty"),e)})),Ie(t,"watchChildren",(function(){var e=t;t.mutationObserver=new MutationObserver((function(){e.updateEmptyState(),e.updateResponsiveStyles()})),t.mutationObserver.observe(t.getRootElement(),{childList:!0})})),Ie(t,"processSize",(function(e){var n,o="flexGrow",i=null!==(n=null!=e?e:t.style[o])&&void 0!==n?n:"1";t.style[o]=i})),Ie(t,"processStyles",(function(){t.innerHTML+='\n <style>\n [cl-component="'.concat(t.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(e,Te),t=e,(n=[{key:"connectedCallback",value:function(){var t,n=this;Ne(e,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(e,t){var o;n.updateResponsiveStyles(),n.processSize(null===(o=t.content)||void 0===o?void 0:o.size)})),null===(t=this.getParentComponent())||void 0===t||t.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var t;Ne(e,"disconnectedCallback",this,3)([]),null===(t=this.mutationObserver)||void 0===t||t.disconnect()}}])&&Re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();Ie(we,"define",{name:"sys-column",model:p.name,manifest:p});export{we as default};window.clComponentClass_SysColumnComponent=we;
|
|
1
|
+
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0},o="cl-";function i(t){return o+t}function r(t){return"cl-"+t}function s(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function l(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=p(p({},n),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,version:"1.0.0",props:p(p({},n.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(h=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:l(h)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"},displayCondition:"return (sdk.appConfig.columnsOptions?.allowHideColumnOnMobile ?? true) === true"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:e([{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}},syncEnabled:!0,stylesImitationEnabled:!0});var h;const m="VIEW",y="MODULE",g="CONTAINER",E="INPUT",b="BUTTON",O="CONSENT",f="COLUMN";var T,v;(v=T||(T={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",v.REQUEST="REQUEST",v.DISPATCH_EVENT="DISPATCH_EVENT",v.GO_TO_VIEW="GO_TO_VIEW",v.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",v.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",v.SHOW_WIDGET="SHOW_WIDGET",v.OPEN_LINK="OPEN_LINK",v.CLOSE_WIDGET="CLOSE_WIDGET",v.CLICK="CLICK";const C=T;var S,R;class N{static sortActions(t){const e={[C.CLOSE_WIDGET]:-1,[C.OPEN_LINK]:-2,[C.SHOW_WIDGET]:1,[C.SUBSCRIBE_CONTACT]:2,[C.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=N.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(r("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(r("type"))));let n=0;for(;e[n]&&e[n].getAttribute(r("id"))!==i;){let t=e[n].getAttribute(r("type"));if(N.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,r=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await s.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}N.IGNORING_VIEW_ENTRY_TYPES=[b,O,E],(R=S||(S={})).CLICK="CLICK",R.COMPONENT_EVENT="COMPONENT_EVENT";class A{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class _{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case S.CLICK:return new N(t,e);case S.COMPONENT_EVENT:return new A(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class L{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class I{constructor(){this.listeners=I.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=L.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=I.createDefaultListenersState()}}I.createDefaultListenersState=()=>({"*":{}});const P=I,D=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class k{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class M{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===y?Object.assign(Object.assign({},t),M.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var w,x,j,U,B,W,F,G,V,H,K,$,z;M.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(x=w||(w={})).VIEW="VIEW",x.CONTAINER="CONTAINER",x.TEXT="TEXT",x.INPUT="INPUT",x.BUTTON="BUTTON",x.IMAGE="IMAGE",x.CONSENT="CONSENT",x.COUNTDOWN_TIMER="COUNTDOWN_TIMER",x.PROMO_CODE="PROMO_CODE",x.MULTIPLE_INPUT="MULTIPLE_INPUT",x.VIDEO="VIDEO",x.SLIDER="SLIDER",x.SLIDE="SLIDE",x.SOCIAL="SOCIAL",x.COLUMNS="COLUMNS",x.COLUMN="COLUMN",x.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(j||(j={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(U||(U={})),function(t){t.SELF="_self",t.BLANK="_blank"}(B||(B={})),(W||(W={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(F||(F={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(G||(G={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(V||(V={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(H||(H={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(K||(K={})),(z=$||($={})).BEFORE="BEFORE",z.AFTER="AFTER",z.INSIDE="INSIDE",z.INSTEAD="INSTEAD";class Q extends P{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Q.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Q.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Q.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Q.changeEventName="CHANGE";const Y=Q;class X{static set(t,e){const n=t[X.accumulatorPropertyName]||{};t[X.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[X.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}X.accumulatorPropertyName="clStyleAttributes";const J=X;var Z;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class q{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==m&&t!==g&&t!==f||(e.style.display=o===Z.CONTENT_LOCKER&&t===m?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class tt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class et{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(r=e.styles)||void 0===r?void 0:r.find((t=>t.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(p);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),tt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const nt=new class{execute(t,e="GET",n=null,o,i){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function ot(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class it{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class rt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var st;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(st||(st={}));const lt=st;class at{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(lt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(lt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new rt(this.onCounterStateUpdate)}}}const ct=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>ct(...t)}},pt=ct,ut="props",dt="shared",ht="environment";function mt(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const yt="SUBMIT";function gt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function Et(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class bt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var Ot;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(Ot||(Ot={}));class ft extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let s=new bt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=pt(ut,dt,ht),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new k({}),this.componentEventEmitter=new P,this.componentResourceManager=new at(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new _(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(ut).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=r("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(dt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new et(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),nt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Y.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(ht).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Ot.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ut).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(dt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(ht).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter((t=>!t.hasAttribute(r("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(r("element"))===t&&n.id===e:n.getAttribute(r("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(gt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(gt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=r("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(i,l),this.getRootElement().appendChild(a)),Et({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(r("element"));const n=this.getEnvironment();let i=s(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=s(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const s=[];"host"===(e=ft._resolveTogglableStylesForElementModel(e)).element&&(q.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],D(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),D(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:ot(e.styleAttributes,s)});if(J.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),Et({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${r("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(o))).forEach((t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${it.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");Et({element:t,html:`[${r("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Et({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&Et({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&Et({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&Et({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(o)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>mt(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return t&&1===t.split(",").length?this.parentNode:mt(this.parentNode,r("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===yt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:C.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}ft._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=ft._resolveTogglableStyles(e[t]))})),e},ft._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const Tt=ft;function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,It(o.key),o)}}function St(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(St=function(){return!!t})()}function Rt(t,e,n,o){var i=Nt(At(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Nt.apply(null,arguments)}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},At(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Lt(t,e,n){return(e=It(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function It(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}var Pt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Lt(e=function(t,e,n){return e=At(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,St()?Reflect.construct(e,n||[],At(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Lt(e,"getComponentName",(function(){return e.manifest.name})),Lt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,Tt),function(t,e){return e&&Ct(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Rt(t,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){Rt(t,"disconnectedCallback",this,3)([])}}])}();function Dt(t){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dt(t)}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function Mt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Ft(o.key),o)}}function wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wt=function(){return!!t})()}function xt(t,e,n,o){var i=jt(Ut(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function jt(){return jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ut(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},jt.apply(null,arguments)}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(t,e)}function Wt(t,e,n){return(e=Ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ft(t){var e=function(t){if("object"!=Dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dt(e)?e:e+""}var Gt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Wt(e=function(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"==Dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"updateResponsiveStyles",(function(){var t,n,o=null===(t=e.getParentComponent())||void 0===t||null===(t=t.getProps())||void 0===t?void 0:t.isResponsive,i=(n=e.shadowRoot.children,function(t){if(Array.isArray(t))return kt(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return kt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,e):void 0}}(n)||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.")}()).filter((function(t){return t.hasAttribute("cl-element")})),r=e.getHostElement().style;i.length?r.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(t){return r[t]})).map((function(t){return t&&parseFloat(t)})).some(Boolean)&&(r.minWidth="min-content"),r.minWidth="20px"),"mobile"===e.getEnvironment()&&o&&(i.length?r.minHeight="auto":r.background.includes("url")?r.minHeight="150px":i.length||(r.minHeight="50px"))})),Wt(e,"updateEmptyState",(function(){var t=!(Array.from(e.getRootElement().children).filter((function(t){return"STYLE"!==t.tagName&&"SCRIPT"!==t.tagName}))||[]).length;e.setAttribute(r("empty"),t)})),Wt(e,"watchChildren",(function(){var t=e;e.mutationObserver=new MutationObserver((function(){t.updateEmptyState(),t.updateResponsiveStyles()})),e.mutationObserver.observe(e.getRootElement(),{childList:!0})})),Wt(e,"processSize",(function(t){var n,o="flexGrow",i=null!==(n=null!=t?t:e.style[o])&&void 0!==n?n:"1";e.style[o]=i})),Wt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),Wt(e,"manifest",d),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(t,Pt),function(t,e){return e&&Mt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e,n=this;xt(t,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(t,e){var o;n.updateResponsiveStyles(),n.processSize(null===(o=e.content)||void 0===o?void 0:o.size)})),null===(e=this.getParentComponent())||void 0===e||e.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var e;xt(t,"disconnectedCallback",this,3)([]),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}}])}();Wt(Gt,"define",{name:"sys-column",model:d.name,manifest:d});export{Gt as default};window.clComponentClass_SysColumnComponent=Gt;
|