@claspo/components 1.10.26-pcwk → 1.10.27
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="validationStatusChanged",e="touchedStatusChanged";class n{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}}function o(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function i(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 r(t,e,n,o,i){switch(t.position){case"top":return{left:`${s(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${s(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:`${l(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${l(0,t)}px`}}}function s(t,e,o,i){let r=o?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>n.width(i)&&(r-=r+e.width-n.width(i)),r}function l(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function a(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 c="cl-tooltip-text-styles",d=`\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 h(t,e,s,l){l=l||document;let h=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${c}`))return;const e=document.createElement("style");e.setAttribute("id",c),a({element:e,html:d}),t.head.appendChild(e)})(l),h=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}(s),l.body.append(h),h.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:s,offset:l=10,htmlDocumentObject:a}=t,c=function(t,e,s,l,a,c){const d=function(t,e,o,r,s){const l=function(t,e,o,r){const s=n.width(r),{right:l}=t.getBoundingClientRect(),a=s-o-l-n.scrollbarWidth(r);return{horizontalOffset:o,contentWidth:i(e).width,availableSpaceToTheLeftSideOfTheTrigger:l-o,availableSpaceToTheRightSideOfTheTrigger:a}}(t,e,o,s),a=function(t,e,o,r){const s=n.height(r),{top:l,bottom:a}=t.getBoundingClientRect();return{verticalOffset:o,contentHeight:i(e).height,availableSpaceAboveTriggerElem:l-o,availableSpaceBelowTriggerElem:s-a-o}}(t,e,o,s);let c="undefined";const d={bottom:a.availableSpaceBelowTriggerElem>=a.contentHeight,top:a.availableSpaceAboveTriggerElem>=a.contentHeight,right:l.availableSpaceToTheRightSideOfTheTrigger>=l.contentWidth,left:l.availableSpaceToTheLeftSideOfTheTrigger>=l.contentWidth};if(d.top?c="top":d.bottom?c="bottom":d.right?c="right":d.left&&(c="left"),r&&d[r]&&(c=r),"undefined"===c){const t=Math.max(a.availableSpaceBelowTriggerElem,a.availableSpaceAboveTriggerElem,l.availableSpaceToTheRightSideOfTheTrigger,l.availableSpaceToTheLeftSideOfTheTrigger);t===a.availableSpaceBelowTriggerElem?c="bottom":t===a.availableSpaceAboveTriggerElem?c="top":t===l.availableSpaceToTheRightSideOfTheTrigger?c="right":t===l.availableSpaceToTheLeftSideOfTheTrigger&&(c="left")}return Object.assign(Object.assign(Object.assign({},a),l),{position:c})}(t,e,s,l,c=c||document);return function(t,e){const{marginBottom:n,marginTop:i}=window.getComputedStyle(e);if("top"===t.position)o(e,{"margin-top":`${parseInt(i,10)+parseInt(n,10)}px`}),o(e,{"margin-bottom":"0px"});else if("bottom"===t.position)o(e,{"margin-bottom":`${parseInt(n,10)+parseInt(i,10)}px`}),o(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(i,10))/2+"px";o(e,{"margin-top":t,"margin-bottom":t})}}(d,e),{coordinates:r(d,t.getBoundingClientRect(),e.getBoundingClientRect(),a,c),position:d.position}}(e,s,l,"top",!0,a);s.setAttribute("cl-tooltip-position",c.position),o(s,c.coordinates)}({triggerElement:e,tooltipElement:h,htmlDocumentObject:l})},e.onmouseleave=()=>{h&&(h.remove(),function(t){const e=(t=t||document).head.querySelector(`#${c}`);e&&e.remove()}(l))})}function p(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function u(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 m="cl-";function g(t){return m+t}function b(t){return"cl-"+t}const v="VIEW",f="CONTAINER",E="INPUT",y="BUTTON",O="CONSENT",T="COLUMN";var S,C;(C=S||(S={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",C.REQUEST="REQUEST",C.DISPATCH_EVENT="DISPATCH_EVENT",C.GO_TO_VIEW="GO_TO_VIEW",C.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",C.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",C.SHOW_WIDGET="SHOW_WIDGET",C.OPEN_LINK="OPEN_LINK",C.CLOSE_WIDGET="CLOSE_WIDGET",C.CLICK="CLICK";const A=S;var R,_;class x{static sortActions(t){const e={[A.CLOSE_WIDGET]:-1,[A.OPEN_LINK]:-2,[A.SHOW_WIDGET]:1,[A.SUBSCRIBE_CONTACT]:2,[A.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=x.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(b("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(b("type")));let n=0;for(;e[n]&&e[n].getAttribute(b("id"))!==i;){let t=e[n].getAttribute(b("type"));if(x.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=[])}}x.IGNORING_VIEW_ENTRY_TYPES=[y,O,E],(_=R||(R={})).CLICK="CLICK",_.COMPONENT_EVENT="COMPONENT_EVENT";class P{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(b("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 N{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 R.CLICK:return new x(t,e);case R.COMPONENT_EVENT:return new P(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class I{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 L{constructor(){this.listeners=L.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=I.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=L.createDefaultListenersState()}}L.createDefaultListenersState=()=>({"*":{}});const w=L,M=(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 D extends w{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(D.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(D.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(D.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}D.changeEventName="CHANGE";const U=D;class j{static set(t,e){const n=t[j.accumulatorPropertyName]||{};t[j.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[j.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}j.accumulatorPropertyName="clStyleAttributes";const B=j;var V,W;(W=V||(V={})).BUILT_IN="BUILT_IN",W.DETACHED="DETACHED",W.FLOATING_BOX="FLOATING_BOX",W.FLOATING_BAR="FLOATING_BAR",W.LAUNCHER="LAUNCHER",W.CONTENT_LOCKER="CONTENT_LOCKER";class H{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!==v&&t!==f&&t!==T||(e.style.display=o===V.CONTENT_LOCKER&&t===v?"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 F{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class G{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({url: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),F.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 $=new class{execute({url:t,method:e="GET",body:n=null,headers:o,abortSignal: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 Q(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class z{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 K{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 q;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",t.LEAD_PROGRESS="LEAD_PROGRESS"}(q||(q={}));const J=q;class Y{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(J.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(J.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 K(this.onCounterStateUpdate)}}}const X=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>X(...t)}},Z=X,tt="props",et="shared",nt="environment";function ot(t,e,n,o){const i=t=>{let r=function(t){return t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host||null:t}(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 it="SUBMIT";function rt(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 st(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)}const lt=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class at extends lt{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var ct,dt,ht;function pt(t){if(null!=t&&""!==t)return"string"==typeof t?t:"object"==typeof t?JSON.stringify(t):String(t)}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ct||(ct={})),(ht=dt||(dt={})).STATIC="STATIC",ht.DATA_LAYER="DATA_LAYER",ht.URL_QUERY_PARAMS="URL_QUERY_PARAMS",ht.JS_API_VARIABLE="JS_API_VARIABLE",ht.COOKIE="COOKIE",ht.LOCAL_STORAGE="LOCAL_STORAGE";class ut{constructor(t,e){this.configService=t,this.registry=e}resolveValue(t,e){if(!(null==t?void 0:t.enabled)||!t.sourceType||this.configService.getConfig("renderMode")===ct.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===dt.STATIC)return pt(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return pt("function"==typeof(null==r?void 0:r.processor)?r.processor(i,Object.assign({id:o},n)):null==r?void 0:r.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class mt extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(b("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${b("widget-id")}]`);let i;o&&(i=o.getAttribute(b("widget-id")));let r=new at("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(b("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=Z(tt,et,nt),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 w,this.componentResourceManager=new Y(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new N(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(tt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=b("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(et).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new G(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),$),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(U.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(nt).forEach(e=>e(this.prevEnvironment,t)),this.prevEnvironment=t})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")}))},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")===ct.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ct.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(tt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(et).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(nt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${b("element")}]`)).filter(t=>!t.hasAttribute(b("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(b("element"))===t&&n.id===e:n.getAttribute(b("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&&(rt(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(rt(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=b("type"),r="element-styles";let s=this.getRootElement().querySelector(`style[${i}="${r}"]`);s||(s=document.createElement("style"),s.setAttribute(i,r),this.getRootElement().appendChild(s)),a({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(b("element"));const n=this.getEnvironment();let i=st(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=st(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),s)}}),this._addLinkColor(s,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 r=[];"host"===(e=mt._resolveTogglableStylesForElementModel(e)).element&&(H.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()),r.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],M(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),M(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,r)});if(B.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)),a({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(.${b("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,n=!1){let o=t;return(o.classes||"").split(" ").filter(t=>t.startsWith(m)).forEach(t=>{var i;const r=null===(i=e.textClasses)||void 0===i?void 0:i[t];if(!r)return;let s=function(t,e){return{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),e?t.mobileStyleAttributes:{}),placeholderStyleAttributes:Object.assign(Object.assign({},t.placeholderStyleAttributes),e?t.mobilePlaceholderStyleAttributes:{})}}(r,n);s.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),s.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),s.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.resizeListener.isMobile()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce((t,e)=>t+` ${z.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`,"");a({element:t,html:`[${b("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{a({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&a({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)&&a({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)&&a({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!==g("hovered")&&t!==g("focused")).forEach(e=>{e.startsWith(m)&&t.classList.remove(e)});const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>ot(this.parentNode,b("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(b("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ot(this.parentNode,b("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>p(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>u(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.getAutofillValue=()=>{var t;const e=this.getModel();return new ut(this.services.config,this.services.context.getRegistry()).resolveValue(null===(t=e.props.control)||void 0===t?void 0:t.autofill,e.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(t,e)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=t?e:void 0,t&&this.services.context.updateRecord(this.getModel().id,{value:e})},this.addContextRecord=()=>{var t,e;const n=this.getModel();this.services.context.addRecord(n.id,{recordKey:n.id,id:n.props.control.name,label:this.getContextRecordLabel(n.props),value:null!==(t=this.getValidatedAutofillValue())&&void 0!==t?t:n.props.control.defaultValue||"",viewIndex:null===(e=n.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.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===it);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:A.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()});const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}mt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=mt._resolveTogglableStyles(e[t]))}),e},mt._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 gt=mt,bt=Symbol("required");var vt=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 ft(){}const Et="pending",yt="valid",Ot="invalid";class Tt extends gt{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=vt(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.getAutofillValue();void 0!==l&&(s.defaultValue=l);const a=this.services.form,c=[s,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==l&&d.getValue()===l&&this._validateAutofilledValue(d),d},this._validateAutofilledValue=t=>{t.validate({silent:!0}).then(e=>{e||t.markAsTouched(),this.syncAutofillContextRecord(e,t.getValue())})},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=ft,invalidCallback:r=ft,pendingCallback:s=ft,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=vt(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[bt]),m=!!(null==h?void 0:h.required),g=m||u,b=[...t];m&&!u&&b.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[bt]=!0,e}()),p&&b.push(p);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:s},d)),f},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=Et;switch(!0){case n.control.pending:t=Et;break;case n.control.valid:t=yt;break;default:t=Ot}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 yt:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ot:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=u(e,p(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)),h(o,i,r,this.htmlDocumentObject),s&&s()}break;case Et:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),a&&a())}}}}const St={DESKTOP:"desktop",MOBILE:"mobile"};function Ct(t){return Object.values(St).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const At={name:"SysChoiceButtonsComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],focusableElements:["label","button"],contextMenuModel:Ct([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:Ct([{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"}]),propertyPaneModel:{content:Ct([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["fixed","hug"]}}},{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:"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"],actionParams:{getRelativeSelector:function(t){return'[option-id="'.concat(t,'"]')},getOptionIdFromRelativeSelector:function(t){var e,n;return null!==(e=null===(n=t.match(/option-id="([^"]+)"/))||void 0===n?void 0:n[1])&&void 0!==e?e:null},availableActions:["GO_TO_VIEW"]}}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{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",height:"auto",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",height:"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 Rt(t){return Rt="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},Rt(t)}function _t(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 xt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach(function(e){Mt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pt(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,kt(o.key),o)}}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nt=function(){return!!t})()}function It(){return It="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Lt(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}},It.apply(null,arguments)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function wt(t,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wt(t,e)}function Mt(t,e,n){return(e=kt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t){var e=function(t){if("object"!=Rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rt(e)?e:e+""}var Dt=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),Mt(e=function(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"==Rt(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,Nt()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}(this,t),"setLabelStylesAndContent",function(t){var n=e.getElement("label");n.style.display=t.content.labelEnabled?"block":"none",a({element:n,html:t.content.label})}),Mt(e,"createButtons",function(){var t=e.getElement("buttonsContainer"),n=e.getOptionsMap(),o=(e.getProps(),e.isStaticRenderMode());t.innerHTML="",Object.keys(n).forEach(function(i){var r=n[i],s=document.createElement("button");s.type="button",s.setAttribute("cl-element","button"),s.setAttribute("option-id",i),s.setAttribute("aria-pressed","false"),s.setAttribute("aria-disabled",String(!o)),o&&s.addEventListener("click",function(){var o=e.getCurrentValue(),r=e.getProps();if(null!=o&&o[i]){e.removeSelectedOptionStyles(s,r),delete o[i];var l=Object.keys(o).length?o:null;e.registeredControl.setValue(l)}else{r.control.multipleChoice||e.removeSelectionFromAllButtons(t,r),e.setSelectedOptionStyles(s,r);var a=r.control.multipleChoice?xt(xt({},o),{},Mt({},i,n[i].exportId)):Mt({},i,n[i].exportId);e.registeredControl.setValue(a)}}),a({element:s,html:r.label}),t.append(s)})}),Mt(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)}),Mt(e,"registerControl",function(){var t=e.getRootElement().querySelector(".tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:t})}),Mt(e,"getCurrentValue",function(){var t;return(null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null}),Mt(e,"setSelectedOptionStyles",function(t,e){o(t,e.styles.find(function(t){return"button"===t.element}).selectedStyleAttributes),t.setAttribute("aria-pressed","true")}),Mt(e,"removeSelectedOptionStyles",function(t,e){o(t,e.styles.find(function(t){return"button"===t.element}).styleAttributes),t.setAttribute("aria-pressed","false")}),Mt(e,"removeSelectionFromAllButtons",function(t,n){t.querySelectorAll("[cl-element=button]").forEach(function(t){e.removeSelectedOptionStyles(t,n)})}),Mt(e,"applySelectedStylesToCurrentValue",function(t){var n=e.getCurrentValue();n?e.getElement("buttonsContainer").querySelectorAll("[cl-element=button]").forEach(function(o){var i=o.getAttribute("option-id");n[i]?e.setSelectedOptionStyles(o,t):e.removeSelectedOptionStyles(o,t)}):e.removeSelectionFromAllButtons(e.getElement("buttonsContainer"),t)}),Mt(e,"manifest",At),e.getRootElement().innerHTML="\n <style>".concat('\n /* The host is the flex container, and the wrapper chain below carries its\n height inwards through flex sizing rather than percentages. height:100%\n is not an option on these wrappers: in a quirks-mode document (the\n dashboard preview iframes are about:blank, and some customer pages have\n no doctype) WebKit resolves a percentage height under the auto-height\n host against the enclosing page column instead, so in Safari the buttons\n grew to the column and spilled out of the component. min-height:0 keeps\n each level able to shrink to a host smaller than the content, which is\n what the percentages used to allow. */\n :host {\n display: flex;\n flex-direction: column;\n }\n\n .main-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n }\n\n .container-with-label {\n flex: 1 1 auto;\n min-height: 0;\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 flex: 1 1 auto;\n min-height: 0;\n width: 100%;\n cursor: pointer;\n }\n \n .buttons-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .buttons-container [cl-element="button"] {\n appearance: none;\n -webkit-appearance: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n cursor: pointer;\n /* Share out whatever height the component is given. With the default\n by-content height there is no spare room and the buttons keep their\n own size, so this only takes effect once a height is actually set. */\n flex-grow: 1;\n }\n\n .buttons-container [cl-element="button"]:disabled {\n opacity: 1;\n cursor: default;\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" role="group" aria-labelledby="cl-choice-buttons-label">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-choice-buttons-label">\n </div>\n <div class="container-with-tooltip">\n <div class="buttons-container" cl-element="buttonsContainer"></div>\n <div class="tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\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&&wt(t,e)}(t,Tt),function(t,e){return e&&Pt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=It(Lt(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(),e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.applySelectedStylesToCurrentValue(n)})}}])}();Mt(Dt,"define",{name:"sys-choice-buttons",model:At.name,manifest:At});export{Dt as default};window.clComponentClass_SysChoiceButtonsComponent=Dt;
|
|
1
|
+
const t="validationStatusChanged",e="touchedStatusChanged";class n{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}}function o(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function i(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 r(t,e,n,o,i){switch(t.position){case"top":return{left:`${s(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${s(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:`${l(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${l(0,t)}px`}}}function s(t,e,o,i){let r=o?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>n.width(i)&&(r-=r+e.width-n.width(i)),r}function l(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function a(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 c="cl-tooltip-text-styles",d=`\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 h(t,e,s,l){l=l||document;let h=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${c}`))return;const e=document.createElement("style");e.setAttribute("id",c),a({element:e,html:d}),t.head.appendChild(e)})(l),h=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}(s),l.body.append(h),h.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:s,offset:l=10,htmlDocumentObject:a}=t,c=function(t,e,s,l,a,c){const d=function(t,e,o,r,s){const l=function(t,e,o,r){const s=n.width(r),{right:l}=t.getBoundingClientRect(),a=s-o-l-n.scrollbarWidth(r);return{horizontalOffset:o,contentWidth:i(e).width,availableSpaceToTheLeftSideOfTheTrigger:l-o,availableSpaceToTheRightSideOfTheTrigger:a}}(t,e,o,s),a=function(t,e,o,r){const s=n.height(r),{top:l,bottom:a}=t.getBoundingClientRect();return{verticalOffset:o,contentHeight:i(e).height,availableSpaceAboveTriggerElem:l-o,availableSpaceBelowTriggerElem:s-a-o}}(t,e,o,s);let c="undefined";const d={bottom:a.availableSpaceBelowTriggerElem>=a.contentHeight,top:a.availableSpaceAboveTriggerElem>=a.contentHeight,right:l.availableSpaceToTheRightSideOfTheTrigger>=l.contentWidth,left:l.availableSpaceToTheLeftSideOfTheTrigger>=l.contentWidth};if(d.top?c="top":d.bottom?c="bottom":d.right?c="right":d.left&&(c="left"),r&&d[r]&&(c=r),"undefined"===c){const t=Math.max(a.availableSpaceBelowTriggerElem,a.availableSpaceAboveTriggerElem,l.availableSpaceToTheRightSideOfTheTrigger,l.availableSpaceToTheLeftSideOfTheTrigger);t===a.availableSpaceBelowTriggerElem?c="bottom":t===a.availableSpaceAboveTriggerElem?c="top":t===l.availableSpaceToTheRightSideOfTheTrigger?c="right":t===l.availableSpaceToTheLeftSideOfTheTrigger&&(c="left")}return Object.assign(Object.assign(Object.assign({},a),l),{position:c})}(t,e,s,l,c=c||document);return function(t,e){const{marginBottom:n,marginTop:i}=window.getComputedStyle(e);if("top"===t.position)o(e,{"margin-top":`${parseInt(i,10)+parseInt(n,10)}px`}),o(e,{"margin-bottom":"0px"});else if("bottom"===t.position)o(e,{"margin-bottom":`${parseInt(n,10)+parseInt(i,10)}px`}),o(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(i,10))/2+"px";o(e,{"margin-top":t,"margin-bottom":t})}}(d,e),{coordinates:r(d,t.getBoundingClientRect(),e.getBoundingClientRect(),a,c),position:d.position}}(e,s,l,"top",!0,a);s.setAttribute("cl-tooltip-position",c.position),o(s,c.coordinates)}({triggerElement:e,tooltipElement:h,htmlDocumentObject:l})},e.onmouseleave=()=>{h&&(h.remove(),function(t){const e=(t=t||document).head.querySelector(`#${c}`);e&&e.remove()}(l))})}function p(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function u(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 m="cl-";function g(t){return m+t}function b(t){return"cl-"+t}const v="VIEW",f="CONTAINER",E="INPUT",y="BUTTON",O="CONSENT",T="COLUMN";var S,C;(C=S||(S={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",C.REQUEST="REQUEST",C.DISPATCH_EVENT="DISPATCH_EVENT",C.GO_TO_VIEW="GO_TO_VIEW",C.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",C.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",C.SHOW_WIDGET="SHOW_WIDGET",C.OPEN_LINK="OPEN_LINK",C.CLOSE_WIDGET="CLOSE_WIDGET",C.CLICK="CLICK";const A=S;var R,_;class x{static sortActions(t){const e={[A.CLOSE_WIDGET]:-1,[A.OPEN_LINK]:-2,[A.SHOW_WIDGET]:1,[A.SUBSCRIBE_CONTACT]:2,[A.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=x.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(b("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(b("type")));let n=0;for(;e[n]&&e[n].getAttribute(b("id"))!==i;){let t=e[n].getAttribute(b("type"));if(x.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=[])}}x.IGNORING_VIEW_ENTRY_TYPES=[y,O,E],(_=R||(R={})).CLICK="CLICK",_.COMPONENT_EVENT="COMPONENT_EVENT";class P{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(b("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 N{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 R.CLICK:return new x(t,e);case R.COMPONENT_EVENT:return new P(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class I{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 L{constructor(){this.listeners=L.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=I.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=L.createDefaultListenersState()}}L.createDefaultListenersState=()=>({"*":{}});const w=L,M=(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 D extends w{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(D.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(D.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(D.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}D.changeEventName="CHANGE";const U=D;class j{static set(t,e){const n=t[j.accumulatorPropertyName]||{};t[j.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[j.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}j.accumulatorPropertyName="clStyleAttributes";const B=j;var V,W;(W=V||(V={})).BUILT_IN="BUILT_IN",W.DETACHED="DETACHED",W.FLOATING_BOX="FLOATING_BOX",W.FLOATING_BAR="FLOATING_BAR",W.LAUNCHER="LAUNCHER",W.CONTENT_LOCKER="CONTENT_LOCKER";class H{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!==v&&t!==f&&t!==T||(e.style.display=o===V.CONTENT_LOCKER&&t===v?"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 F{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class G{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({url: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),F.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 $=new class{execute({url:t,method:e="GET",body:n=null,headers:o,abortSignal: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 Q(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class z{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 K{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 q;!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.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",t.LEAD_PROGRESS="LEAD_PROGRESS"}(q||(q={}));const J=q;class Y{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(J.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(J.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 K(this.onCounterStateUpdate)}}}const X=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>X(...t)}},Z=X,tt="props",et="shared",nt="environment";function ot(t,e,n,o){const i=t=>{let r=function(t){return t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host||null:t}(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 it="SUBMIT";function rt(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 st(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)}const lt=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class at extends lt{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var ct,dt,ht;function pt(t){if(null!=t&&""!==t)return"string"==typeof t?t:"object"==typeof t?JSON.stringify(t):String(t)}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ct||(ct={})),(ht=dt||(dt={})).STATIC="STATIC",ht.DATA_LAYER="DATA_LAYER",ht.URL_QUERY_PARAMS="URL_QUERY_PARAMS",ht.JS_API_VARIABLE="JS_API_VARIABLE",ht.COOKIE="COOKIE",ht.LOCAL_STORAGE="LOCAL_STORAGE";class ut{constructor(t,e){this.configService=t,this.registry=e}resolveValue(t,e){if(!(null==t?void 0:t.enabled)||!t.sourceType||this.configService.getConfig("renderMode")===ct.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===dt.STATIC)return pt(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return pt("function"==typeof(null==r?void 0:r.processor)?r.processor(i,Object.assign({id:o},n)):null==r?void 0:r.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class mt extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(b("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${b("widget-id")}]`);let i;o&&(i=o.getAttribute(b("widget-id")));let r=new at("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(b("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=Z(tt,et,nt),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 w,this.componentResourceManager=new Y(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new N(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(tt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=b("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(et).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new G(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),$),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(U.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(nt).forEach(e=>e(this.prevEnvironment,t)),this.prevEnvironment=t})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")}))},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")===ct.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ct.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(tt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(et).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(nt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${b("element")}]`)).filter(t=>!t.hasAttribute(b("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(b("element"))===t&&n.id===e:n.getAttribute(b("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&&(rt(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(rt(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=b("type"),r="element-styles";let s=this.getRootElement().querySelector(`style[${i}="${r}"]`);s||(s=document.createElement("style"),s.setAttribute(i,r),this.getRootElement().appendChild(s)),a({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(b("element"));const n=this.getEnvironment();let i=st(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=st(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),s)}}),this._addLinkColor(s,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 r=[];"host"===(e=mt._resolveTogglableStylesForElementModel(e)).element&&(H.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()),r.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],M(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),M(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,r)});if(B.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)),a({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(.${b("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,n=!1){let o=t;return(o.classes||"").split(" ").filter(t=>t.startsWith(m)).forEach(t=>{var i;const r=null===(i=e.textClasses)||void 0===i?void 0:i[t];if(!r)return;let s=function(t,e){return{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),e?t.mobileStyleAttributes:{}),placeholderStyleAttributes:Object.assign(Object.assign({},t.placeholderStyleAttributes),e?t.mobilePlaceholderStyleAttributes:{})}}(r,n);s.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),s.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),s.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.resizeListener.isMobile()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce((t,e)=>t+` ${z.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`,"");a({element:t,html:`[${b("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{a({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&a({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)&&a({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)&&a({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!==g("hovered")&&t!==g("focused")).forEach(e=>{e.startsWith(m)&&t.classList.remove(e)});const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>ot(this.parentNode,b("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(b("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ot(this.parentNode,b("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>p(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>u(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.getAutofillValue=()=>{var t;const e=this.getModel();return new ut(this.services.config,this.services.context.getRegistry()).resolveValue(null===(t=e.props.control)||void 0===t?void 0:t.autofill,e.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(t,e)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=t?e:void 0,t&&this.services.context.updateRecord(this.getModel().id,{value:e})},this.addContextRecord=()=>{var t,e;const n=this.getModel();this.services.context.addRecord(n.id,{recordKey:n.id,id:n.props.control.name,label:this.getContextRecordLabel(n.props),value:null!==(t=this.getValidatedAutofillValue())&&void 0!==t?t:n.props.control.defaultValue||"",viewIndex:null===(e=n.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.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===it);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:A.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()});const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}mt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=mt._resolveTogglableStyles(e[t]))}),e},mt._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 gt=mt,bt=Symbol("required");var vt=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 ft(){}const Et="pending",yt="valid",Ot="invalid";class Tt extends gt{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=vt(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.getAutofillValue();void 0!==l&&(s.defaultValue=l);const a=this.services.form,c=[s,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==l&&d.getValue()===l&&this._validateAutofilledValue(d),d},this._validateAutofilledValue=t=>{t.validate({silent:!0}).then(e=>{e||t.markAsTouched(),this.syncAutofillContextRecord(e,t.getValue())})},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=ft,invalidCallback:r=ft,pendingCallback:s=ft,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=vt(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[bt]),m=!!(null==h?void 0:h.required),g=m||u,b=[...t];m&&!u&&b.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[bt]=!0,e}()),p&&b.push(p);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:s},d)),f},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=Et;switch(!0){case n.control.pending:t=Et;break;case n.control.valid:t=yt;break;default:t=Ot}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 yt:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ot:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=u(e,p(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)),h(o,i,r,this.htmlDocumentObject),s&&s()}break;case Et:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),a&&a())}}}}const St={DESKTOP:"desktop",MOBILE:"mobile"};function Ct(t){return Object.values(St).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const At={name:"SysChoiceButtonsComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST","SELECT"],focusableElements:["label","button"],contextMenuModel:Ct([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:Ct([{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"}]),propertyPaneModel:{content:Ct([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["fixed","hug"]}}},{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:"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"],actionParams:{getRelativeSelector:function(t){return'[option-id="'.concat(t,'"]')},getOptionIdFromRelativeSelector:function(t){var e,n;return null!==(e=null===(n=t.match(/option-id="([^"]+)"/))||void 0===n?void 0:n[1])&&void 0!==e?e:null},availableActions:["GO_TO_VIEW"]}}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{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",height:"auto",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",height:"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 Rt(t){return Rt="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},Rt(t)}function _t(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 xt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach(function(e){Mt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pt(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,kt(o.key),o)}}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nt=function(){return!!t})()}function It(){return It="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Lt(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}},It.apply(null,arguments)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function wt(t,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wt(t,e)}function Mt(t,e,n){return(e=kt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t){var e=function(t){if("object"!=Rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rt(e)?e:e+""}var Dt=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),Mt(e=function(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"==Rt(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,Nt()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}(this,t),"setLabelStylesAndContent",function(t){var n=e.getElement("label");n.style.display=t.content.labelEnabled?"block":"none",a({element:n,html:t.content.label})}),Mt(e,"createButtons",function(){var t=e.getElement("buttonsContainer"),n=e.getOptionsMap(),o=(e.getProps(),e.isStaticRenderMode());t.innerHTML="",Object.keys(n).forEach(function(i){var r=n[i],s=document.createElement("button");s.type="button",s.setAttribute("cl-element","button"),s.setAttribute("option-id",i),s.setAttribute("aria-pressed","false"),s.setAttribute("aria-disabled",String(!o)),o&&s.addEventListener("click",function(){var o=e.getCurrentValue(),r=e.getProps();if(null!=o&&o[i]){e.removeSelectedOptionStyles(s,r),delete o[i];var l=Object.keys(o).length?o:null;e.registeredControl.setValue(l)}else{r.control.multipleChoice||e.removeSelectionFromAllButtons(t,r),e.setSelectedOptionStyles(s,r);var a=r.control.multipleChoice?xt(xt({},o),{},Mt({},i,n[i].exportId)):Mt({},i,n[i].exportId);e.registeredControl.setValue(a)}}),a({element:s,html:r.label}),t.append(s)})}),Mt(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)}),Mt(e,"registerControl",function(){var t=e.getRootElement().querySelector(".tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:t})}),Mt(e,"getCurrentValue",function(){var t;return(null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null}),Mt(e,"setSelectedOptionStyles",function(t,e){o(t,e.styles.find(function(t){return"button"===t.element}).selectedStyleAttributes),t.setAttribute("aria-pressed","true")}),Mt(e,"removeSelectedOptionStyles",function(t,e){o(t,e.styles.find(function(t){return"button"===t.element}).styleAttributes),t.setAttribute("aria-pressed","false")}),Mt(e,"removeSelectionFromAllButtons",function(t,n){t.querySelectorAll("[cl-element=button]").forEach(function(t){e.removeSelectedOptionStyles(t,n)})}),Mt(e,"applySelectedStylesToCurrentValue",function(t){var n=e.getCurrentValue();n?e.getElement("buttonsContainer").querySelectorAll("[cl-element=button]").forEach(function(o){var i=o.getAttribute("option-id");n[i]?e.setSelectedOptionStyles(o,t):e.removeSelectedOptionStyles(o,t)}):e.removeSelectionFromAllButtons(e.getElement("buttonsContainer"),t)}),Mt(e,"manifest",At),e.getRootElement().innerHTML="\n <style>".concat('\n /* The host is the flex container, and the wrapper chain below carries its\n height inwards through flex sizing rather than percentages. height:100%\n is not an option on these wrappers: in a quirks-mode document (the\n dashboard preview iframes are about:blank, and some customer pages have\n no doctype) WebKit resolves a percentage height under the auto-height\n host against the enclosing page column instead, so in Safari the buttons\n grew to the column and spilled out of the component. min-height:0 keeps\n each level able to shrink to a host smaller than the content, which is\n what the percentages used to allow. */\n :host {\n display: flex;\n flex-direction: column;\n }\n\n .main-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n }\n\n .container-with-label {\n flex: 1 1 auto;\n min-height: 0;\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 flex: 1 1 auto;\n min-height: 0;\n width: 100%;\n cursor: pointer;\n }\n \n .buttons-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .buttons-container [cl-element="button"] {\n appearance: none;\n -webkit-appearance: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n cursor: pointer;\n /* Share out whatever height the component is given. With the default\n by-content height there is no spare room and the buttons keep their\n own size, so this only takes effect once a height is actually set. */\n flex-grow: 1;\n }\n\n .buttons-container [cl-element="button"]:disabled {\n opacity: 1;\n cursor: default;\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" role="group" aria-labelledby="cl-choice-buttons-label">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-choice-buttons-label">\n </div>\n <div class="container-with-tooltip">\n <div class="buttons-container" cl-element="buttonsContainer"></div>\n <div class="tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\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&&wt(t,e)}(t,Tt),function(t,e){return e&&Pt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=It(Lt(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(),e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.applySelectedStylesToCurrentValue(n)})}}])}();Mt(Dt,"define",{name:"sys-choice-buttons",model:At.name,manifest:At});export{Dt as default};window.clComponentClass_SysChoiceButtonsComponent=Dt;
|