@claspo/components 1.3.0-rc1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SysButtonComponent/SysButtonComponent.js +1 -1
- package/SysCalendarComponent/SysCalendarComponent.js +1 -1
- package/SysCheckboxListComponent/SysCheckboxListComponent.js +1 -1
- package/SysChoiceButtonsComponent/SysChoiceButtonsComponent.js +1 -1
- package/SysColumnComponent/SysColumnComponent.js +1 -1
- package/SysConsentComponent/SysConsentComponent.js +1 -1
- package/SysContainerComponent/SysContainerComponent.js +1 -1
- package/SysCountdownTimerComponent/SysCountdownTimerComponent.js +1 -1
- package/SysDateComponent/SysDateComponent.js +1 -1
- package/SysImageComponent/SysImageComponent.js +1 -1
- package/SysInAppColumnsComponent/SysInAppColumnsComponent.js +1 -1
- package/SysPhoneInputComponent/SysPhoneInputComponent.js +1 -1
- package/SysPromoCodeComponent/SysPromoCodeComponent.js +1 -1
- package/SysRadioGroupComponent/SysRadioGroupComponent.js +1 -1
- package/SysSliderComponent/SysSliderComponent.js +1 -1
- package/SysSocialComponent/SysSocialComponent.js +1 -1
- package/SysTextComponent/SysTextComponent.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0},o="cl-";function i(t){return o+t}function s(t){return"cl-"+t}function r(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function l(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=p(p({},n),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,version:"1.0.0",props:p(p({},n.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(h=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:l(h)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"},displayCondition:"return (sdk.appConfig.columnsOptions?.allowHideColumnOnMobile ?? true) === true"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:e([{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}},syncEnabled:!0,stylesImitationEnabled:!0});var h;const m="VIEW",y="MODULE",g="CONTAINER",b="INPUT",E="BUTTON",f="CONSENT",O="COLUMN";var v,T;(T=v||(v={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",T.REQUEST="REQUEST",T.DISPATCH_EVENT="DISPATCH_EVENT",T.GO_TO_VIEW="GO_TO_VIEW",T.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",T.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",T.SHOW_WIDGET="SHOW_WIDGET",T.OPEN_LINK="OPEN_LINK",T.CLOSE_WIDGET="CLOSE_WIDGET",T.CLICK="CLICK";const S=v;var C,R;class A{static sortActions(t){const e={[S.CLOSE_WIDGET]:-1,[S.OPEN_LINK]:-2,[S.SHOW_WIDGET]:1,[S.SUBSCRIBE_CONTACT]:2,[S.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=A.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(s("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(s("type"))));let n=0;for(;e[n]&&e[n].getAttribute(s("id"))!==i;){let t=e[n].getAttribute(s("type"));if(A.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,s=!0,r=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 r.next()).done);s=!0){o=i.value,s=!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{s||t||!(n=r.return)||await n.call(r)}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=[])}}A.IGNORING_VIEW_ENTRY_TYPES=[E,f,b],(R=C||(C={})).CLICK="CLICK",R.COMPONENT_EVENT="COMPONENT_EVENT";class N{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class _{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case C.CLICK:return new A(t,e);case C.COMPONENT_EVENT:return new N(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class L{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class P{constructor(){this.listeners=P.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=L.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=P.createDefaultListenersState()}}P.createDefaultListenersState=()=>({"*":{}});const I=P,D=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=i;(s||r).call(t,e,n,o)};class M{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class w{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===y?Object.assign(Object.assign({},t),w.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var x,k,j,B,U,W,F,G,H,V,$,K,z;w.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(k=x||(x={})).VIEW="VIEW",k.CONTAINER="CONTAINER",k.TEXT="TEXT",k.INPUT="INPUT",k.BUTTON="BUTTON",k.IMAGE="IMAGE",k.CONSENT="CONSENT",k.COUNTDOWN_TIMER="COUNTDOWN_TIMER",k.PROMO_CODE="PROMO_CODE",k.MULTIPLE_INPUT="MULTIPLE_INPUT",k.VIDEO="VIDEO",k.SLIDER="SLIDER",k.SLIDE="SLIDE",k.SOCIAL="SOCIAL",k.COLUMNS="COLUMNS",k.COLUMN="COLUMN",k.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(j||(j={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(B||(B={})),function(t){t.SELF="_self",t.BLANK="_blank"}(U||(U={})),(W||(W={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(F||(F={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(G||(G={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(H||(H={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(V||(V={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}($||($={})),(z=K||(K={})).BEFORE="BEFORE",z.AFTER="AFTER",z.INSIDE="INSIDE",z.INSTEAD="INSTEAD";class Q extends I{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Q.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Q.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Q.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Q.changeEventName="CHANGE";const Y=Q;class X{static set(t,e){const n=t[X.accumulatorPropertyName]||{};t[X.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[X.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}X.accumulatorPropertyName="clStyleAttributes";const J=X;var Z;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class q{static applyHostStyles(t,e,n=null,o){var i,s,r;const l=null===(s=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===s?void 0:s.find((t=>"CLICK"===t.type));l&&(null===(r=l.actions)||void 0===r?void 0:r.length)&&(e.style.cursor="pointer"),t!==m&&t!==g&&t!==O||(e.style.display=o===Z.CONTENT_LOCKER&&t===m?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class tt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class et{constructor(t,e,n,o,i,s){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=s,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,s,r,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===(s=e.styles)||void 0===s?void 0:s.find((t=>t.element===n)))||{},p=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(p);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),tt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const nt=new class{execute(t,e="GET",n=null,o,i){const s={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,s)}};function ot(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class it{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class st{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 rt;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(rt||(rt={}));const lt=rt;class at{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(lt.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(lt.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new st(this.onCounterStateUpdate)}}}const ct=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>ct(...t)}},pt=ct,ut="props",dt="shared",ht="environment";function mt(t,e,n,o){const i=t=>{let s=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return s&&(o&&"function"==typeof o?o(s.getAttribute(e)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,e))===n)?s:s&&s.parentNode&&i(s.parentNode)||null;var r};return i(t)}const yt="SUBMIT";function gt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function bt(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class Et extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var ft;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ft||(ft={}));class Ot extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(s("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${s("widget-id")}]`);let i;o&&(i=o.getAttribute(s("widget-id")));let r=new Et("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(s("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=pt(ut,dt,ht),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new M({}),this.componentEventEmitter=new I,this.componentResourceManager=new at(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new _(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(ut).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=s("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(dt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new et(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),nt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Y.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(ht).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t}))),this.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")===ft.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ft.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ut).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(dt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(ht).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${s("element")}]`)).filter((t=>!t.hasAttribute(s("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(s("element"))===t&&n.id===e:n.getAttribute(s("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(gt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(gt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=s("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(i,l),this.getRootElement().appendChild(a)),bt({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(s("element"));const n=this.getEnvironment();let i=r(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const r=[];"host"===(e=Ot._resolveTogglableStylesForElementModel(e)).element&&(q.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],D(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),D(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:ot(e.styleAttributes,r)});if(J.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let s=this.getRootElement().querySelector(`#${i}`);s||(s=document.createElement("style"),s.id=i,t.appendChild(s)),bt({element:s,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(.${s("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(o))).forEach((t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${it.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");bt({element:t,html:`[${s("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{bt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,s;e.linkColor&&bt({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)&&bt({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===(s=e.linkParams)||void 0===s?void 0:s.removeUnderline)&&bt({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(o)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>mt(this.parentNode,s("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(s("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:mt(this.parentNode,s("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,s,r;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===(s=t.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===yt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:S.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()}}Ot._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=Ot._resolveTogglableStyles(e[t]))})),e},Ot._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 vt=Ot;function Tt(t){return Tt="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},Tt(t)}function St(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,Pt(o.key),o)}}function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}function Rt(t,e,n,o){var i=At(Nt(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function At(){return At="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Nt(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}},At.apply(null,arguments)}function Nt(t){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nt(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Lt(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}var It=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Lt(e=function(t,e,n){return e=Nt(e),function(t,e){if(e&&("object"==Tt(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,Ct()?Reflect.construct(e,n||[],Nt(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Lt(e,"getComponentName",(function(){return e.manifest.name})),Lt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(t,vt),function(t,e){return e&&St(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Rt(t,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){Rt(t,"disconnectedCallback",this,3)([])}}])}();function Dt(t){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dt(t)}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function wt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Ft(o.key),o)}}function xt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xt=function(){return!!t})()}function kt(t,e,n,o){var i=jt(Bt(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function jt(){return jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bt(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},jt.apply(null,arguments)}function Bt(t){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bt(t)}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function Wt(t,e,n){return(e=Ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ft(t){var e=function(t){if("object"!=Dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dt(e)?e:e+""}var Gt=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Wt(e=function(t,e,n){return e=Bt(e),function(t,e){if(e&&("object"==Dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xt()?Reflect.construct(e,n||[],Bt(t).constructor):e.apply(t,n))}(this,t,[].concat(o)),"updateResponsiveStyles",(function(){var t,n,o=null===(t=e.getParentComponent())||void 0===t||null===(t=t.getProps())||void 0===t?void 0:t.isResponsive,i=(n=e.shadowRoot.children,function(t){if(Array.isArray(t))return Mt(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return Mt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(t){return t.hasAttribute("cl-element")})),s=e.getHostElement().style;i.length?s.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(t){return s[t]})).map((function(t){return t&&parseFloat(t)})).some(Boolean)&&(s.minWidth="min-content"),s.minWidth="20px"),"mobile"===e.getEnvironment()&&o&&(i.length?s.minHeight="auto":s.background.includes("url")?s.minHeight="150px":i.length||(s.minHeight="50px"))})),Wt(e,"updateEmptyState",(function(){var t=!(Array.from(e.getRootElement().children).filter((function(t){return"STYLE"!==t.tagName&&"SCRIPT"!==t.tagName}))||[]).length;e.setAttribute(s("empty"),t)})),Wt(e,"watchChildren",(function(){var t=e;e.mutationObserver=new MutationObserver((function(){t.updateEmptyState(),t.updateResponsiveStyles()})),e.mutationObserver.observe(e.getRootElement(),{childList:!0})})),Wt(e,"processSize",(function(t){var n,o="flexGrow",i=null!==(n=null!=t?t:e.style[o])&&void 0!==n?n:"1";e.style[o]=i})),Wt(e,"processStyles",(function(){e.innerHTML+='\n <style>\n [cl-component="'.concat(e.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),Wt(e,"manifest",d),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ut(t,e)}(t,It),function(t,e){return e&&wt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e,n=this;kt(t,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(t,e){var o;n.updateResponsiveStyles(),n.processSize(null===(o=e.content)||void 0===o?void 0:o.size)})),null===(e=this.getParentComponent())||void 0===e||e.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var e;kt(t,"disconnectedCallback",this,3)([]),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}}])}();Wt(Gt,"define",{name:"sys-column",model:d.name,manifest:d});export{Gt as default};window.clComponentClass_SysColumnComponent=Gt;
|
|
1
|
+
const e={DESKTOP:"desktop",MOBILE:"mobile"};function t(t){return Object.values(e).map((e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t})))}const n={name:"SysContainerComponent",componentType:"CONTAINER",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],floatingControlsModel:t([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0,displayCondition:"return sdk.component.type === 'VIEW' ? (sdk.appConfig.allowBackdropFilterOnView ?? true) : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType === 'BUILT_IN' : true",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{styles:[{element:"host",styleAttributes:{overflow:"visible",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"min-content",height:"auto",minHeight:null,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,background:"rgba(0, 0, 0, 0.06)"},classes:""}]}},metaDescription:{icon:"/SysContainerComponent/assets/img/component-icon.svg",label:{en:"Container",ru:"Контейнер",uk:"Контейнер",es:"Envase",fr:"Récipient",de:"Container",it:"Contenitore",pt:"Embalagem",ro:"Container",bg:"Контейнер",cs:"Kontejner",el:"Περιέκτης",nl:"Container",pl:"Kontener",sv:"Behållare",tr:"Konteyner",ar:"الحاوية",zh:"容器",da:"Beholder",he:"קונטיינר",fi:"Säiliö",hi:"कंटेनर",hr:"Kontejner",hu:"Tárhely",id:"Kontainer",ja:"コンテナ",ko:"컨테이너",no:"Container",sk:"Krabica",sl:"Rezervoar",sr:"Kontejner"}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0},o="cl-";function i(e){return o+e}function s(e){return"cl-"+e}function r(e,t,n){var o;return null===(o=null==e?void 0:e[t])||void 0===o?void 0:o.find((e=>e.element===n))}function l(e=[]){return e.map((e=>Object.assign(Object.assign({},e),{styleAttributes:Object.assign({},e.styleAttributes)})))}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=p(p({},n),{},{name:"SysColumnComponent",componentType:"COLUMN",preventDraggable:!1,focusParentOnClick:!1,recursiveRemove:!0,version:"1.0.0",props:p(p({},n.props),{},{styles:[{element:"host",styleAttributes:{position:"relative",width:"auto",minWidth:"min-content",height:"100%",borderStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",flexBasis:"0"},classes:""}],adaptiveStyles:(h=[{element:"host",styleAttributes:{display:"inline-flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"10px",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""}],Object.values(e).reduce(((e,t)=>Object.assign(e,{[t]:l(h)})),{desktop:[],mobile:[]})),content:{size:1}}),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",propPath:["adaptiveStyles","mobile"],elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"},hideSyncSelect:!0},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE",displayPropertyValue:"inline-flex"}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"PADDING"},hideSyncSelect:!0}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},floatingControlsModel:t([{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"]},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT",params:{hideForEntryType:"VIEW"}}],metaDescription:{label:{en:"Column",ru:"Колонка",uk:"Колонка",es:"Columna",fr:"Colonne",de:"Spalte",it:"Colonna",pt:"Coluna",ro:"Coloană",bg:"Колона",cs:"Column",el:"Column",nl:"Column",pl:"Column",sv:"Column",tr:"Column",ar:"Column",zh:"Column",da:"Column",he:"Column",fi:"Column",hi:"Column",hr:"Column",hu:"Column",id:"Column",ja:"Column",ko:"Column",no:"Column",sk:"Column",sl:"Column",sr:"Column"}},syncEnabled:!0,stylesImitationEnabled:!0});var h;const m="VIEW",y="MODULE",g="CONTAINER",b="INPUT",E="BUTTON",f="CONSENT",O="COLUMN";var v,T;(T=v||(v={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",T.REQUEST="REQUEST",T.DISPATCH_EVENT="DISPATCH_EVENT",T.GO_TO_VIEW="GO_TO_VIEW",T.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",T.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",T.SHOW_WIDGET="SHOW_WIDGET",T.OPEN_LINK="OPEN_LINK",T.CLOSE_WIDGET="CLOSE_WIDGET",T.CLICK="CLICK";const S=v;var C,R;class A{static sortActions(e){const t={[S.CLOSE_WIDGET]:-1,[S.OPEN_LINK]:-2,[S.SHOW_WIDGET]:1,[S.SUBSCRIBE_CONTACT]:2,[S.REQUEST]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort(((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0))}constructor(e,t){this.config=e,this.actions=A.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const o=n(),i=o.getAttribute(s("id"));this.listener=e=>{const t=e.composedPath().filter((e=>e instanceof HTMLElement&&e.getAttribute(s("type"))));let n=0;for(;t[n]&&t[n].getAttribute(s("id"))!==i;){let e=t[n].getAttribute(s("type"));if(A.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((e=>{e.addEventListener("click",this.listener)}))}async execute(){var e,t,n,o;try{for(var i,s=!0,r=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,i){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,i,(t=e[n](t)).done,t.value)}))}}}(this.eventsQueue);!(e=(i=await r.next()).done);s=!0){o=i.value,s=!1;const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}}catch(e){t={error:e}}finally{try{s||e||!(n=r.return)||await n.call(r)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((e=>{e.removeEventListener("click",this.listener)})),this.targetElements=[])}}A.IGNORING_VIEW_ENTRY_TYPES=[E,f,b],(R=C||(C={})).CLICK="CLICK",R.COMPONENT_EVENT="COMPONENT_EVENT";class N{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){this.componentEmitterListener=t.on(this.config.eventName,(()=>{this.actions.forEach((t=>t.execute(e.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class _{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map((e=>this.actionFactory.get(e)));switch(t.forEach((e=>this.actionRegister.register(e))),e.type){case C.CLICK:return new A(e,t);case C.COMPONENT_EVENT:return new N(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class L{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class P{constructor(){this.listeners=P.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach((o=>o(t,e,n))),Object.values(this.listeners["*"]).forEach((o=>o(t,e,n)))}on(e,t){const n=L.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=P.createDefaultListenersState()}}P.createDefaultListenersState=()=>({"*":{}});const I=P,D=(e,t,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=i;(s||r).call(e,t,n,o)};class M{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class w{static extract(e){const t=e.views.map((e=>{const t=e.children.map((e=>e.type===y?Object.assign(Object.assign({},e),w.moduleToContainerParams):e));return Object.assign(Object.assign({},e),{children:t})}));return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}var x,k,j,B,U,W,F,G,H,V,$,K,z;w.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(k=x||(x={})).VIEW="VIEW",k.CONTAINER="CONTAINER",k.TEXT="TEXT",k.INPUT="INPUT",k.BUTTON="BUTTON",k.IMAGE="IMAGE",k.CONSENT="CONSENT",k.COUNTDOWN_TIMER="COUNTDOWN_TIMER",k.PROMO_CODE="PROMO_CODE",k.MULTIPLE_INPUT="MULTIPLE_INPUT",k.VIDEO="VIDEO",k.SLIDER="SLIDER",k.SLIDE="SLIDE",k.SOCIAL="SOCIAL",k.COLUMNS="COLUMNS",k.COLUMN="COLUMN",k.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(j||(j={})).CLICK="CLICK",function(e){e.SHOW_WIDGET="SHOW_WIDGET",e.OPEN_LINK="OPEN_LINK",e.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",e.REQUEST="REQUEST",e.CLOSE_WIDGET="CLOSE_WIDGET",e.GO_TO_VIEW="GO_TO_VIEW",e.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",e.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",e.CLICK="CLICK"}(B||(B={})),function(e){e.SELF="_self",e.BLANK="_blank"}(U||(U={})),(W||(W={})).ACCENT="accent",function(e){e.TOP="TOP",e.CENTER="CENTER",e.BOTTOM="BOTTOM"}(F||(F={})),function(e){e.LEFT="LEFT",e.CENTER="CENTER",e.RIGHT="RIGHT"}(G||(G={})),function(e){e.SLIDE_TO_TOP="SLIDE_TO_TOP",e.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",e.SLIDE_TO_LEFT="SLIDE_TO_LEFT",e.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(H||(H={})),function(e){e.PULSE="PULSE",e.VIBRATE="VIBRATE",e.WOBBLE="WOBBLE",e.SHAKE="SHAKE",e.JELLO="JELLO",e.BOUNCE="BOUNCE",e.BLINK="BLINK",e.FLICKER="FLICKER",e.PING="PING"}(V||(V={})),function(e){e.LEFT="LEFT",e.RIGHT="RIGHT"}($||($={})),(z=K||(K={})).BEFORE="BEFORE",z.AFTER="AFTER",z.INSIDE="INSIDE",z.INSTEAD="INSTEAD";class Y extends I{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",(({isMobileEnv:e})=>{this._isMobile=e,this.emit(Y.changeEventName,this._isMobile)}))}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Y.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(Y.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Y.changeEventName="CHANGE";const Q=Y;class X{static set(e,t){const n=e[X.accumulatorPropertyName]||{};e[X.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[X.accumulatorPropertyName]).forEach((n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""}))}}X.accumulatorPropertyName="clStyleAttributes";const J=X;var Z;!function(e){e.BUILT_IN="BUILT_IN",e.DETACHED="DETACHED",e.FLOATING_BOX="FLOATING_BOX",e.FLOATING_BAR="FLOATING_BAR",e.LAUNCHER="LAUNCHER",e.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class q{static applyHostStyles(e,t,n=null,o){var i,s,r;const l=null===(s=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===s?void 0:s.find((e=>"CLICK"===e.type));l&&(null===(r=l.actions)||void 0===r?void 0:r.length)&&(t.style.cursor="pointer"),e!==m&&e!==g&&e!==O||(t.style.display=o===Z.CONTENT_LOCKER&&e===m?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class ee{static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}class te{constructor(e,t,n,o,i,s){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=s,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach((n=>{var o,i,s,r,l;const a=null===(i=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===i?void 0:i.find((e=>e.element===n)),c=(null===(s=t.styles)||void 0===s?void 0:s.find((e=>e.element===n)))||{},p=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(p);u.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[e].entries()].map((([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((e=>e.text())).then((o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var t;const n=this.getSharedCb();return Object.keys((null===(t=n.theme)||void 0===t?void 0:t.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[e].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[e].get("host"),n.cssVars)})).catch((e=>{console.error(e),ee.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(e=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),e)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(e=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),e.schema)})),this}_applyHostElementBackgroundFromCssVars(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(e,t))}_applyHostElementBackgroundFromTheme(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(e,t))}_buildBackgroundUrlFromCssVars(e,t){const n=e.inlineSvgString.trim().replace("var(--cl-schema-accent)",t["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}_buildBackgroundUrlFromTheme(e,t){const n=e.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((e=>{const n=function(e=""){return e.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(e[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,t[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${e.positionOptions}`}off(){var e,t;null===(e=this.schemaSubscription)||void 0===e||e.off(),null===(t=this.themeSubscription)||void 0===t||t.off()}}const ne=new class{execute(e,t="GET",n=null,o,i){const s={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,s)}};function oe(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{})}class ie{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,(e=>"_"+e)).toUpperCase()}}class se{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var re;!function(e){e.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",e.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",e.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",e.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(re||(re={}));const le=re;class ae{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(le.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(le.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new se(this.onCounterStateUpdate)}}}const ce=(...e)=>{let t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:[]})),{});return{get:e=>t[e],clear:()=>ce(...e)}},pe=ce,ue="props",de="shared",he="environment";function me(e,t,n,o){const i=e=>{let s=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return s&&(o&&"function"==typeof o?o(s.getAttribute(t)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,t))===n)?s:s&&s.parentNode&&i(s.parentNode)||null;var r};return i(e)}const ye="SUBMIT";function ge(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach((n=>{if("element"===n||"classes"===n)return;const o=t[n];o&&"object"==typeof o&&!Array.isArray(o)?e[n]=Object.assign(Object.assign({},e[n]||{}),o):e[n]=o})),e):e}function be(e){const{element:t,html:n,appendHtml:o}=e,i=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((e=>e.remove())),t.querySelectorAll("*").forEach((e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((t=>e.removeAttribute(t))),Array.from(e.attributes).forEach((t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)})),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}})),t.body.innerHTML}(n);o?t.innerHTML+=i:t.innerHTML=i}class Ee extends Event{constructor(e,t,n){super(e,n),this.detail={},Object.defineProperty(this,"detail",{value:t})}}var fe;!function(e){e.STATIC="STATIC",e.UPDATING="UPDATING"}(fe||(fe={}));class Oe extends HTMLElement{constructor(){var e;super(),this.skipGameBlur=!0,this.construct=()=>{let e;const t=this.getAttribute(s("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${s("widget-id")}]`);let i;o&&(i=o.getAttribute(s("widget-id")));let r=new Ee("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(s("path")),id:t,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),e=r.detail.props,Object.assign(this,e),this.observers=pe(ue,de,he),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach((e=>null==e?void 0:e.off()))}},this.state=new M({}),this.componentEventEmitter=new I,this.componentResourceManager=new ae(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new _(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(e=>{this.model.props=e,this.observers.get(ue).forEach((t=>t(this.prevProps,e))),this.prevProps=e;const t=this.getHostElement(),n=s("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(e=>{Object.assign(this.model,e)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(de).forEach((e=>e(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new te(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),ne),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Q.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(he).forEach((t=>t(this.prevEnvironment,e))),this.prevEnvironment=e}))),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((e=>this._handlerFactory.get(e))).map((e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((e=>e()))},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.postpone()))},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.release()))},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===fe.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===fe.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(ue).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(de).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(he).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${s("element")}]`)).filter((e=>!e.hasAttribute(s("component"))))],this.getElement=(e,t)=>this.getElements().find((n=>t?n.getAttribute(s("element"))===e&&n.id===t:n.getAttribute(s("element"))===e)),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;const o=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach((e=>{const t=e.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===t&&(ge(n,e),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===t&&(ge(n,e),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))})),n}(e,t),i=s("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(i,l),this.getRootElement().appendChild(a)),be({element:a,html:""}),n.forEach((e=>{let t=e.getAttribute(s("element"));const n=this.getEnvironment();let i=r(o,n,t);if(i){if(this.resizeListener.isMobile()){const e=r(o,"desktop",t);e&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(i),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var o,i;const r=[];"host"===(t=Oe._resolveTogglableStylesForElementModel(t)).element&&(q.applyHostStyles(this.model.type,e,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 l=t.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const e=new Image;e.src=a[1],D(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),D(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},t),{styleAttributes:oe(t.styleAttributes,r)});if(J.set(e,c),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let o=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),i=`flip-up-animation-${t.element}`;let s=this.getRootElement().querySelector(`#${i}`);s||(s=document.createElement("style"),s.id=i,e.appendChild(s)),be({element:s,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},t.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,t.element,o,`:not(.${s("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this.applySharedClassesToElementModel=e=>function(e,t){let n=e;return(n.classes||"").split(" ").filter((e=>e.startsWith(o))).forEach((e=>{var o;let i=null===(o=t.textClasses)||void 0===o?void 0:o[e];i&&(i.styleAttributes.fontFamily||(i.isHeader&&t.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:t.headerFontFamily})})),!i.isHeader&&t.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:t.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:t.textFontFamily})})),n}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,o="",i)=>{const r=Object.keys(n).reduce(((e,t)=>e+` ${ie.camelCaseToDashCase(t)}: ${n[t]}${i?" !important;":";"}`),"");be({element:e,html:`[${s("element")}="${t}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{be({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,i,s;t.linkColor&&be({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&be({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=t.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(s=t.linkParams)||void 0===s?void 0:s.removeUnderline)&&be({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,t)=>{Array.from(e.classList).filter((e=>e!==i("hovered")&&e!==i("focused"))).forEach((t=>{t.startsWith(o)&&e.classList.remove(t)}));const n=((e.getAttribute("class")||"")+" "+t.classes).trim();e.setAttribute("class",n)},this.getParentComponent=()=>me(this.parentNode,s("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(s("path"));return 1===(null==e?void 0:e.split(",").length)?this.parentNode:me(this.parentNode,s("path"),void 0,(e=>1===(null==e?void 0:e.split(",").length)))},this.getWidgetLanguages=()=>function(e){return[e.getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter((e=>!!e))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>function(e,t){return t.reduce(((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null}),null)}(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.addContextRecord=()=>{var e;const t=this.getModel();this.services.context.addRecord(t.id,{recordKey:t.id,id:t.props.control.name,label:this.getContextRecordLabel(t.props),value:t.props.control.defaultValue||"",viewIndex:null===(e=t.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(t.props)}})},this.getContextRecordLabel=e=>{var t,n,o,i,s,r;const l=e.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(t=e.content)||void 0===t?void 0:t.label)&&(null===(i=null===(o=null===(n=e.adaptiveStyles)||void 0===n?void 0:n.desktop.find((e=>"label"===e.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return(null===(s=e.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(e.content.placeholder):(null===(r=e.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{var t;switch(null===(t=e.control)||void 0===t?void 0:t.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find((e=>e.category===ye));n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:S.REQUEST}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>{var e;return(null===(e=this.getProps())||void 0===e?void 0:e.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}));const e=document.createElement("style");e.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(e)}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}}Oe._resolveTogglableStylesForElementModel=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=Oe._resolveTogglableStyles(t[e]))})),t},Oe._resolveTogglableStyles=e=>{const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach((e=>{e in t&&(t[e]=t[n]?t[e]:o)})),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t};const ve=Oe;function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Se(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Pe(o.key),o)}}function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ce=function(){return!!e})()}function Re(e,t,n,o){var i=Ae(Ne(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ae(){return Ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ne(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ae.apply(null,arguments)}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function Le(e,t,n){return(t=Pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}var Ie=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Le(t=function(e,t,n){return t=Ne(t),function(e,t){if(t&&("object"==Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ce()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"manifest",{name:"SysContainerComponent"}),Le(t,"getComponentName",(function(){return t.manifest.name})),Le(t,"processStyles",(function(){t.innerHTML+='\n <style>\n [cl-component="'.concat(t.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(e,ve),function(e,t){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"connectedCallback",value:function(){var t=this;Re(e,"connectedCallback",this,3)([]),this.processStyles(),this.observeProps((function(e,n){t.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles)}))}},{key:"disconnectedCallback",value:function(){Re(e,"disconnectedCallback",this,3)([])}}])}();function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function we(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Fe(o.key),o)}}function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xe=function(){return!!e})()}function ke(e,t,n,o){var i=je(Be(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function je(){return je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Be(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},je.apply(null,arguments)}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function Ue(e,t){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ue(e,t)}function We(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e){var t=function(e){if("object"!=De(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}var Ge=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return We(t=function(e,t,n){return t=Be(t),function(e,t){if(t&&("object"==De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xe()?Reflect.construct(t,n||[],Be(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"updateResponsiveStyles",(function(){var e,n,o=null===(e=t.getParentComponent())||void 0===e||null===(e=e.getProps())||void 0===e?void 0:e.isResponsive,i=(n=t.shadowRoot.children,function(e){if(Array.isArray(e))return Me(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Me(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return e.hasAttribute("cl-element")})),s=t.getHostElement().style;i.length?s.minWidth="min-content":(["paddingTop","paddingBottom","paddingLeft","paddingRight","padding"].map((function(e){return s[e]})).map((function(e){return e&&parseFloat(e)})).some(Boolean)&&(s.minWidth="min-content"),s.minWidth="20px"),"mobile"===t.getEnvironment()&&o&&(i.length?s.minHeight="auto":s.background.includes("url")?s.minHeight="150px":i.length||(s.minHeight="50px"))})),We(t,"updateEmptyState",(function(){var e=!(Array.from(t.getRootElement().children).filter((function(e){return"STYLE"!==e.tagName&&"SCRIPT"!==e.tagName}))||[]).length;t.setAttribute(s("empty"),e)})),We(t,"watchChildren",(function(){var e=t;t.mutationObserver=new MutationObserver((function(){e.updateEmptyState(),e.updateResponsiveStyles()})),t.mutationObserver.observe(t.getRootElement(),{childList:!0})})),We(t,"processSize",(function(e){var n,o="flexGrow",i=null!==(n=null!=e?e:t.style[o])&&void 0!==n?n:"1";t.style[o]=i})),We(t,"processStyles",(function(){t.innerHTML+='\n <style>\n [cl-component="'.concat(t.getComponentName(),'"] {\n position: relative;\n min-width: 50px;\n min-height: 50px;\n }\n </style>')})),We(t,"manifest",d),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ue(e,t)}(e,Ie),function(e,t){return t&&we(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"connectedCallback",value:function(){var t,n=this;ke(e,"connectedCallback",this,3)([]),this.updateEmptyState(),this.watchChildren(),this.observeEnvironment((function(){n.updateResponsiveStyles()})),this.observeProps((function(e,t){var o;n.updateResponsiveStyles(),n.processSize(null===(o=t.content)||void 0===o?void 0:o.size)})),null===(t=this.getParentComponent())||void 0===t||t.observeProps((function(){n.updateResponsiveStyles()}))}},{key:"disconnectedCallback",value:function(){var t;ke(e,"disconnectedCallback",this,3)([]),null===(t=this.mutationObserver)||void 0===t||t.disconnect()}}])}();We(Ge,"define",{name:"sys-column",model:d.name,manifest:d});export{Ge as default};window.clComponentClass_SysColumnComponent=Ge;
|