@travlrcomlabs/theme-generator
Version:
Theme generator for all project Travlr
2 lines • 48.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["travlr-theme-generator"]={})}(this,(function(t){"use strict";const e=[{code:"ERROR_MESSAGES_NOT_FOUND",messages:"Error messages not found"}];class r{constructor(t){this.config={code:t.code||"",errorList:t.errorList||[]},this.errorCode=this.config.code,this.errorList=this.config.errorList,this.errorMessage="",this.errorList=this.errorList.concat(e),this.run()}run(){this.errorCode||(this.errorCode="ERROR_MESSAGES_NOT_FOUND"),this.generateError()}generateError(){this.errorMessage=this.getMessage(),console.error(`${this.errorMessage} // code::${this.errorCode}`)}getErrorMessages(){return this.errorList.filter(t=>t.code===this.errorCode)}getMessage(){return this.getErrorMessages()[0].messages||""}errorMessagesExists(){return this.getErrorMessages().length>0}}class o{constructor(t){this.config={name:t.name||"",value:t.value||"",important:void 0===t.important||t.important},this.isImportant=this.config.important,this.attributeName=this.config.name,this.attributeValue=this.config.value,this.attributeList=["background","background-color","border","border-color","border-top","border-bottom","border-right","border-left","color","cursor","fill","font-family","opacity"]}run(){return this.checkIsImportantValue(),this.generateCssAttributes()}checkIsImportantValue(){"boolean"==typeof this.isImportant&&""!==this.isImportant&&void 0!==this.isImportant||(this.isImportant=!1)}getIndexAttributeName(){return this.attributeList.indexOf(this.attributeName)}attributeExists(){return-1!==this.getIndexAttributeName()}generateCssAttributes(){return this.attributeName&&this.attributeValue&&this.attributeExists?`${this.attributeName}: ${this.attributeValue} ${this.isImportant?"!important":""};`:""}}class a{constructor(t){this.config={rawSelector:t.rawSelector?t.rawSelector:"",selector:{name:t.selector&&t.selector.name?t.selector.name:"",type:t.selector&&t.selector.name?t.selector.type:""},pseudoClass:{name:t.pseudoClass&&t.pseudoClass.name?t.pseudoClass.name:"",target:t.pseudoClass&&t.pseudoClass.target?t.pseudoClass.target:""},pseudoElements:{name:t.pseudoElements&&t.pseudoElements.name?t.pseudoElements.name:"",target:t.pseudoElements&&t.pseudoElements.target?t.pseudoElements.target:""}},this.rawSelector=this.config.rawSelector||"",this.selectorName=this.config.selector.name||"",this.selectorType=this.config.selector.type||"",this.pseudoClass=this.config.pseudoClass.name||"",this.pseudoClassTarget=this.config.pseudoClass.target||"",this.pseudoElements=this.config.pseudoElements.name||"",this.pseudoElementsTarget=this.config.pseudoElements.target||""}run(){return this.generateSelector()}generateSelector(){return this.rawSelector?this.rawSelector:this.selectorName||this.selectorType?`${this.selectorType}${this.selectorName}`:""}}const i=[{code:"CSS_SELECTOR_NOT_FOUND",messages:"Css selector not found"},{code:"STYLE_CONFIG_NOT_FOUND",messages:"Style config not found"}];class l{constructor(t){this.config={rawSelector:t.rawSelector?t.rawSelector:"",selector:{name:t.selector&&t.selector.name?t.selector.name:"",type:t.selector&&t.selector.name?t.selector.type:""},pseudoClass:{name:t.pseudoClass&&t.pseudoClass.name?t.pseudoClass.name:"",target:t.pseudoClass&&t.pseudoClass.target?t.pseudoClass.target:""},pseudoElements:{name:t.pseudoElements&&t.pseudoElements.name?t.pseudoElements.name:"",target:t.pseudoElements&&t.pseudoElements.target?t.pseudoElements.target:""},style:t.style||[]},this.errorHandler=t=>new r(t),this.cssAttributes=t=>new o(t),this.cssGenerateSelector=t=>new a(t),this.cssSelector="",this.styleConfig=this.config.style,this.styleResult=[]}run(){return this.cssSelector=this.cssGenerateSelector(this.config).run(),this.cssSelectorExist()?this.generateCssStyle():(this.errorHandler({code:"CSS_SELECTOR_NOT_FOUND",errorList:i}),"")}generateCssStyle(){return 0===this.styleConfig.length?(this.errorHandler({code:"STYLE_CONFIG_NOT_FOUND",errorList:i}),""):(this.styleConfig.forEach(t=>{this.isImportant=t.isImportant;const e=this.cssAttributes({name:t.attributeName,value:t.attributeValue,important:t.isImportant}).run();this.styleResult.push(e)}),this.styleResult=this.styleResult.join(" "),`${this.cssSelector} { ${this.styleResult} }`)}cssSelectorExist(){return""!==this.cssSelector}}const s=[{code:"COLORS_NOT_FOUND",messages:"Colors not found"}];class n{constructor(t){this.config={platformName:t&&t.platformName?t.platformName:"",themeDictionary:t&&t.themeDictionary?t.themeDictionary:void 0},this.prefix="t",this.listTheme=["primary","secondary","tertiary"],this.opacity="0.8",this.whiteColor="white",this.greyColor="#666c6f",this.componentName="",this.listStyle=[],this.platformName=this.config.platformName,this.themeDictionary=this.config.themeDictionary,this.themeColor="",this.themeColorType="",this.errorHandler=t=>new r(t)}getResult(){return this.themeDictionary&&void 0!==this.themeDictionary&&null!==this.themeDictionary?0===this.listStyle.length?"":this.listStyle.join(" "):""}getColor(t,e){return this.themeColor=t,this.themeColorType=e,this.themeDictionary&&void 0!==this.themeDictionary&&null!==this.themeDictionary&&(this.themeColor||this.themeColorType)?this.themeDictionary[this.themeColor][this.themeColorType]?this.themeDictionary[this.themeColor][this.themeColorType]:(this.errorHandler({code:"COLORS_NOT_FOUND",errorList:s}),""):""}getCustomFont(){return this.themeDictionary&&void 0!==this.themeDictionary&&null!==this.themeDictionary&&this.themeDictionary.customFont&&void 0!==this.themeDictionary.customFont&&null!==this.themeDictionary.customFont?this.themeDictionary.customFont:""}stateComponent(t){const e=new l({rawSelector:`${t}:hover, ${t}:visited, ${t}:focus`,style:[{attributeName:"opacity",attributeValue:this.opacity}]}).run(),r=new l({rawSelector:t+":disabled",style:[{attributeName:"opacity",attributeValue:this.opacity},{attributeName:"cursor",attributeValue:"not-allowed"}]}).run();e&&r&&(this.listStyle.push(e),this.listStyle.push(r))}generateCustomFontStyle(){if(""===this.getCustomFont().fontUrl)return"";const t=`@import url(${this.getCustomFont().fontUrl});`,e=new l({rawSelector:"*, html, body, h1, h2, h3, h4, h5, h6, p, div, ul, ol, li, a, input, textarea, select, button",style:[{attributeName:"font-family",attributeValue:this.getCustomFont().fontFamily}]}).run();e&&this.listStyle.push(t+e)}webjetStyle(){const t=new l({rawSelector:".footer",style:[{attributeName:"background",attributeValue:"#333333"}]}).run();t&&this.listStyle.push(t)}}class u extends n{run(){return"Webjet"===this.platformName&&this.webjetStyle(),""!==this.getCustomFont()&&this.generateCustomFontStyle(),this.accentLineComponent(),this.accommodationPageComponent(),this.accountComponent(),this.backgroundComponent(),this.bookingManagementComponent(),this.buttonComponent(),this.buttonOutline(),this.cartBadgeComponent(),this.checkboxComponent(),this.checkboxSliderComponent(),this.colorComponent(),this.customRadioMaterialComponent(),this.datepickerComponent(),this.iconComponent(),this.linkComponent(),this.navbarTopComponent(),this.paginationComponent(),this.pillsComponent(),this.progressbarComponent(),this.searchFeatureComponent(),this.vueSliderComponent(),this.cookieConsentComponent(),this.secondaryTextComponent(),this.articlePageComponent(),this.tripsPageComponent(),this.claimListingPageComponent(),this.eventsPageComponent(),this.destinationsPageComponent(),this.oppsiePageComponent(),this.businessPortalPageComponent(),this.getResult()}accentLineComponent(){this.listTheme.forEach(t=>{const e=new l({rawSelector:`.${this.prefix}-accent-line-${t}`,style:[{attributeName:"border-top",attributeValue:"5px solid "+this.getColor(""+t,"main")},{attributeName:"border-bottom",attributeValue:"none"}]}).run();e&&this.listStyle.push(e)})}accommodationPageComponent(){const t=new l({rawSelector:".l-hotel-booking .content-saveupto",style:[{attributeName:"border-top",attributeValue:"10px solid "+this.getColor("secondary","main")},{attributeName:"border-bottom",attributeValue:"1px solid "+this.getColor("secondary","main")},{attributeName:"border-right",attributeValue:"1px solid "+this.getColor("secondary","main")},{attributeName:"border-left",attributeValue:"1px solid "+this.getColor("secondary","main")}]}).run(),e=new l({rawSelector:".l-hotel-booking .content-saveupto .content__saveupto__icon i.icon-price-tag",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),r=new l({rawSelector:".l-hotel-booking .content-saveupto .content__saveupto__text",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),o=new l({rawSelector:".l-hotel-booking .content-saveupto a",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),a=new l({rawSelector:".Page-hotel-booking .wrap__content .nav-tabs > li > a:hover,\n .Page-hotel-booking .wrap__content .nav-tabs > li.active > a,\n .Page-hotel-booking .wrap__content .nav-tabs > li.active > a:focus,\n .Page-hotel-booking .wrap__content .nav-tabs > li.active > a:hover",style:[{attributeName:"border-bottom",attributeValue:"4px solid "+this.getColor("primary","main")}]}).run(),i=new l({rawSelector:".do__reset__reset svg path",style:[{attributeName:"fill",attributeValue:this.getColor("primary","main")}]}).run(),s=new l({rawSelector:".vdp-datepicker__calendar .selected, .vdp-datepicker__calendar .cell.highlighted",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run(),n=new l({rawSelector:".vdp-datepicker__calendar .cell:not(.blank):not(.disabled).day:hover, .vdp-datepicker__calendar .cell:not(.blank):not(.disabled).month:hover, .vdp-datepicker__calendar .cell:not(.blank):not(.disabled).year:hover",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run(),u=new l({rawSelector:".vdp-datepicker__calendar .cell.day.today",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),h=new l({rawSelector:".vdp-datepicker__calendar .cell.day.selected.highlighted.today.highlight-start",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run(),c=new l({rawSelector:".vdp-datepicker__calendar .cell.day.disabled.highlighted.today.highlight-start",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run(),m=new l({rawSelector:".Page-hotel-booking .form__enquiry .dropdown-menu .btn__minusRoom, .Page-hotel-booking .form__enquiry .dropdown-menu .btn__plusRoom",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),b=new l({rawSelector:".l-hotel-booking .TF__col__addRoom .btn-default",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),p=new l({rawSelector:".guest-counter .colWrap-list-room .list-room__head__remove .btn-default",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),y=new l({rawSelector:".front-stars",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),d=new l({rawSelector:".star-rating-text",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),g=new l({rawSelector:".Page-hotel-booking .wrap__content .detail__content .detail__content__rightColumn__information .information__box .mapThumb__link .mapThumb__btn .material-icons,\n .Page-hotel-booking .wrap__content .detail__content .detail__content__rightColumn__information .information__box .mapThumb__link .mapThumb__btn .mapThumb__btn__text",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),C=new l({rawSelector:".l-hotel-booking .detail__content-promo",style:[{attributeName:"border-top",attributeValue:"8px solid "+this.getColor("secondary","main")}]}).run(),_=new l({rawSelector:".l-hotel-booking .content-promo__icon i",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),w=new l({rawSelector:".l-hotel-booking .detail__content-reserve .content-reserve__wrapper .amenities-list > li::before",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),S=new l({rawSelector:".Page-hotel-booking .checkout__page .nav-pills li.active .number",style:[{attributeName:"background-color",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o),a&&this.listStyle.push(a),i&&this.listStyle.push(i),s&&this.listStyle.push(s),n&&this.listStyle.push(n),u&&this.listStyle.push(u),h&&this.listStyle.push(h),c&&this.listStyle.push(c),m&&this.listStyle.push(m),b&&this.listStyle.push(b),p&&this.listStyle.push(p),y&&this.listStyle.push(y),d&&this.listStyle.push(d),g&&this.listStyle.push(g),C&&this.listStyle.push(C),_&&this.listStyle.push(_),w&&this.listStyle.push(w),S&&this.listStyle.push(S)}accountComponent(){const t=new l({rawSelector:".my__profile__tabNav li.active > a,\n .my__profile__tabNav .nav-tabs > li.active > a:focus,\n .my__profile__tabNav .nav-tabs > li > a:hover,\n .my__profile__tabNav .nav-tabs > li > a:visited,\n .my__profile__tabNav li > a:hover",style:[{attributeName:"border-bottom",attributeValue:"5px solid "+this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".hiddenCB label",style:[{attributeName:"border-color",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:".hiddenCB label:hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.whiteColor}]}).run(),o=new l({rawSelector:'.hiddenCB input[type="checkbox"]:checked + label',style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.whiteColor}]}).run(),a=new l({rawSelector:".block__my__account__header .top__strip",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o),a&&this.listStyle.push(a)}backgroundComponent(){this.listTheme.forEach(t=>{const e=new l({rawSelector:`.${this.prefix}-bg-${t}`,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")}]}).run();e&&this.listStyle.push(e)})}bookingManagementComponent(){const t=new l({rawSelector:".tab-nav-medium .nav-li .nav-li-a:hover,\n .tab-nav-medium .nav-li.active .nav-li-a,\n .tab-nav-medium .nav-li.active .nav-li-a:active,\n .tab-nav-medium .nav-li.active .nav-li-a:focus",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".l-booking-management .block__booking__management .box__item .label-type",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")},{attributeName:"color",attributeValue:this.getColor("tertiary","text")}]}).run(),r=new l({rawSelector:".l-booking-management .item-flight-timeline-start-disc",style:[{attributeName:"border-color",attributeValue:this.getColor("tertiary","main")}]}).run(),o=new l({rawSelector:".l-booking-management .item-flight-timeline-end-disc",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run(),a=new l({rawSelector:".l-booking-management .block__booking__management .empty__box .link a, .l-booking-management .block__booking__management .empty__box .link button",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")}]}).run(),i=new l({rawSelector:".l-booking-management .download-pdf__button",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")}]}).run(),s=new l({rawSelector:".l-booking-management .have-question-link",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o),a&&this.listStyle.push(a),i&&this.listStyle.push(i),s&&this.listStyle.push(s)}buttonComponent(){this.listTheme.forEach(t=>{const e=new l({rawSelector:`.${this.prefix}-button-${t}`,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"border-color",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run(),r=new l({rawSelector:".btn-"+t,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"border-color",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run(),o=new l({rawSelector:`.btn-${t}:hover, .btn-${t}:active, .btn-${t}:focus`,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"border-color",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run();e&&this.listStyle.push(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o)})}buttonOutline(){this.listTheme.forEach(t=>{const e=`.${this.prefix}-button-outline-${t}`,r=new l({rawSelector:""+e,style:[{attributeName:"border",attributeValue:"1px solid"},{attributeName:"border-color",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),o=new l({rawSelector:e+".active",style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run(),a=new l({rawSelector:e+":hover",style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run(),i=new l({rawSelector:e+":disabled",style:[{attributeName:"opacity",attributeValue:this.opacity},{attributeName:"cursor",attributeValue:this.getColor(""+t,"text")}]}).run();r&&this.listStyle.push(r),o&&this.listStyle.push(o),a&&this.listStyle.push(a),i&&this.listStyle.push(i)})}cartBadgeComponent(){const t=new l({rawSelector:".header__common .common__shortcut .common__cart__icon .cart__badge",style:[{attributeName:"color",attributeValue:this.getColor("tertiary","text")},{attributeName:"background-color",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t)}checkboxComponent(){const t=new l({rawSelector:'.custom__checkbox input:checked + label::before,\n .category__wrapDropdown .dropdown input[type="checkbox"]:checked::before',style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background-color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:'.custom__checkbox input:checked + label::after,\n .category__wrapDropdown .dropdown input[type="checkbox"]:checked::after',style:[{attributeName:"color",attributeValue:this.whiteColor}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}checkboxSliderComponent(){const t=new l({rawSelector:".Switch .checkbox-slider--b-flat input:checked + span::before",style:[{attributeName:"opacity",attributeValue:this.opacity},{attributeName:"background",attributeValue:this.getColor("secondary","main")}]}).run(),e=new l({rawSelector:".Switch .checkbox-slider--b-flat input + span::after",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}colorComponent(){this.listTheme.forEach(t=>{const e=new l({rawSelector:`.${this.prefix}-color-${t}`,style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run();e&&this.listStyle.push(e)})}customRadioMaterialComponent(){const t=new l({rawSelector:".custom__radio__material .crm-radio input[type=radio]:checked + label:before",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".custom__radio__material .crm-radio label:after",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}datepickerComponent(){const t=new l({rawSelector:".ui-datepicker .ui-state-default.ui-state-highlight",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".ui-datepicker .ui-state-default.ui-state-highlight:hover",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.whiteColor}]}).run(),r=new l({rawSelector:".ui-datepicker .ui-state-default.ui-state-highlight.ui-state-active,\n .ui-datepicker .ui-state-default.ui-state-active,\n .ui-state-default.ui-state-hover,\n .daterangepicker td.active,\n .daterangepicker td.active:hover",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.whiteColor}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r)}iconComponent(){this.listTheme.forEach(t=>{const e=new l({rawSelector:`.${this.prefix}-icon-${t}`,style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run();e&&this.listStyle.push(e)})}linkComponent(){this.listTheme.forEach(t=>{const e=`.${this.prefix}-link-${t}`,r=new l({rawSelector:""+e,style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),o=new l({rawSelector:e+" i",style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),a=new l({rawSelector:e+":before",style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),i=new l({rawSelector:e+":after",style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),s=new l({rawSelector:e+":hover:before",style:[{attributeName:"opacity",attributeValue:this.opacity}]}).run(),n=new l({rawSelector:e+":hover:after",style:[{attributeName:"opacity",attributeValue:this.opacity}]}).run();this.stateComponent(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o),a&&this.listStyle.push(a),i&&this.listStyle.push(i),s&&this.listStyle.push(s),n&&this.listStyle.push(n)})}navbarTopComponent(){const t=new l({rawSelector:".header__common .navbar-with-scroll .list-item-parent:hover .list-item-parent-a, .header__common .common__login .common__login__link:hover",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".header__common .navbar-with-scroll>ul>li>a:after",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}paginationComponent(){const t=new l({rawSelector:".block_pagination ul.pagination li a",style:[{attributeName:"background",attributeValue:this.whiteColor},{attributeName:"color",attributeValue:this.greyColor}]}).run(),e=new l({rawSelector:".block_pagination ul.pagination li a:hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),r=new l({rawSelector:".block_pagination ul.pagination li.active a",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),o=new l({rawSelector:".block_pagination ul.pagination li.disabled a:hover",style:[{attributeName:"cursor",attributeValue:"not-allowed"}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r),o&&this.listStyle.push(o)}pillsComponent(){const t=new l({rawSelector:".Page-deals-offers .checkout__page .nav-pills li.active .number",style:[{attributeName:"background-color",attributeValue:this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run();t&&this.listStyle.push(t)}progressbarComponent(){const t=new l({rawSelector:".progressbar",style:[{attributeName:"background-color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".progressbar .indeterminate",style:[{attributeName:"background-color",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}searchFeatureComponent(){const t=new l({rawSelector:".search__feature .dropdown .dropdown-label.label__active",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:'.search__feature .dropdown input[type="checkbox"]:checked + .dropdown-option-div:before',style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}vueSliderComponent(){const t=new l({rawSelector:".vue-slider-component .vue-slider-tooltip",style:[{attributeName:"border",attributeValue:"1px solid "+this.getColor("tertiary","main")},{attributeName:"background",attributeValue:this.getColor("tertiary","main")},{attributeName:"color",attributeValue:this.getColor("tertiary","text")}]}).run(),e=new l({rawSelector:".vue-slider-component .vue-slider-process",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run(),r=new l({rawSelector:".bar.foreground",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r)}cookieConsentComponent(){const t=new l({rawSelector:"#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelectionWrapper #CybotCookiebotDialogBodyLevelButtonAccept, #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelectionWrapper #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll",style:[{attributeName:"background-color",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),e=new l({rawSelector:'input[type="checkbox"].CybotCookiebotDialogBodyLevelButton:checked ~ label:before',style:[{attributeName:"background-color",attributeValue:this.getColor("secondary","main")},{attributeName:"border-color",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:'input[type="checkbox"].CybotCookiebotDialogBodyLevelButton + label:after',style:[{attributeName:"border-color",attributeValue:this.getColor("secondary","text")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r)}secondaryTextComponent(){const t=new l({rawSelector:".block-carousel-popular-see-more-link, .l-booking-management .see-link-a, .t-color-primary, .t-link-primary, .t-link-primary i, .trv__readmore, .trv__readmore > i, .collapseRoomChoices_link, .collapseRoomChoices_link > i, .action__more-details, .action__more-details > i, .content-reserve__show-more > a, .block-carousel-popular .arrow-icon::before",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run();t&&this.listStyle.push(t)}articlePageComponent(){const t=new l({rawSelector:".form-comment__send-button > .btn-send",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}tripsPageComponent(){const t=new l({rawSelector:".l-list-trip .section-filter .wrapper-filter__btn .btn.active, .l-list-trip .section-filter .wrapper-filter__btn .btn:hover, .l-list-trip .section-content .wrapper-content__trip.trip-month.trip-month .fc-more-cell a.fc-more,\n .l-list-trip .section-content .wrapper-content__trip.trip-month.trip-month .fc-day-grid-event .fc-content",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")},{attributeName:"border-color",attributeValue:this.getColor("secondary","main")},{attributeName:"background",attributeValue:this.getColor("secondary","main")}]}).run(),e=new l({rawSelector:".block__horizontal__list .block__title .block__title__right,\n .block__horizontal__list .block__title .block__title__right .block__title__right__span, .t-link-tertiary i, .user-ppage .blue-txt",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e)}claimListingPageComponent(){const t=new l({rawSelector:'.search-bar input[type="submit"]',style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".l-claim-listing .claim__benefit__img",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),r=new l({rawSelector:".l-claim-listing .claim__here",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r)}eventsPageComponent(){const t=new l({rawSelector:".Page-events .aside__event__info .link__add",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".Page-events .event__detail .link__learnMore a.follow__list, .Page-events .events__rightSide .section__load__more .btn__load__more",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")},{attributeName:"border-color",attributeValue:this.getColor("secondary","main")},{attributeName:"background",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:".Page-events .event__detail .link__share a.share__link",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")},{attributeName:"border-color",attributeValue:this.getColor("secondary","main")}]}).run(),o=new l({rawSelector:".event-table tr.table-dates td:hover .date-markder,\n .event-table tr.table-days, .event-table tr.table-nav",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),a=new l({rawSelector:".event-table tr.table-days th",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r),a&&this.listStyle.push(a),o&&this.listStyle.push(o)}destinationsPageComponent(){const t=new l({rawSelector:".Page-single-list-detail .detail__slideshow__wrap .detail__share__information .detail__share__information__wrap .detail__share__information__box a",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".Page-single-list-detail .wrap__content .detail__content .detail__content__rightColumn__information .btn__check__available .link__reserve",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")},{attributeName:"border-color",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:".Page-single-list-detail .detail__slideshow__wrap .detail__share__information .detail__share__information__wrap .detail__share__information__box a .favourite__text,\n .Page-single-list-detail .detail__slideshow__wrap .detail__share__information .detail__share__information__wrap .detail__share__information__box a .share__text",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();t&&this.listStyle.push(t),e&&this.listStyle.push(e),r&&this.listStyle.push(r)}oppsiePageComponent(){const t=new l({rawSelector:".oopsie-btn",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")},{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}businessPortalPageComponent(){const t=new l({rawSelector:".existing-role .role-list .action",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}}class h extends n{run(){return"10Travlr"===this.platformName&&this.travlr10Style(),this.activityComponent(),this.backgroundComponent(),this.badgeTextComponent(),this.bookingLinkComponent(),this.boxComponent(),this.breadcrumbComponent(),this.buttonComponent(),this.buttonDefaultComponent(),this.cardComponent(),this.colorComponent(),this.linkComponent(),this.navbarComponent(),this.paginationComponent(),this.panelSelectDateComponent(),this.priceSliderComponent(),this.ratingStarComponent(),this.radioCheckboxComponent(),this.sectionTitleComponent(),this.shortcutPanelComponent(),this.sortByComponent(),this.tagComponent(),this.toggleComponent(),this.getResult()}activityComponent(){const t=new l({rawSelector:".activity-detail-headline-price",style:[{attributeName:"background-color",attributeValue:"#f1fcfd"},{attributeName:"border",attributeValue:"1px solid "+this.getColor("secondary","main")}]}).run(),e=new l({rawSelector:"#activityDescription .c-accordion-item .t-inner-html h1, #activityDescription .c-accordion-item .t-inner-html h2, #activityDescription .c-accordion-item .t-inner-html h3, #activityDescription .c-accordion-item .t-inner-html h4, #activityDescription .c-accordion-item .t-inner-html h5, #activityDescription .c-accordion-item .t-inner-html h6",style:[{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e))}backgroundComponent(){this.componentName="background",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")}]}).run();r&&this.listStyle.push(r)})}badgeTextComponent(){this.componentName="badge-text";const t=`.${this.prefix}-${this.componentName}`,e=new l({rawSelector:t,style:[{attributeName:"border",attributeValue:"1px solid "+this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:t+":hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();e&&(this.listStyle.push(e),this.listStyle.push(r))}bookingLinkComponent(){this.componentName=".c-booking-link";const t=new l({rawSelector:this.componentName,style:[{attributeName:"border",attributeValue:"1px solid "+this.getColor("secondary","main")}]}).run();t&&this.listStyle.push(t)}boxComponent(){this.componentName="box",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")}]}).run();r&&this.listStyle.push(r)})}breadcrumbComponent(){const t=new l({rawSelector:".t-breadcrumb-item.disabled > a",style:[{attributeName:"color",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t)}buttonComponent(){this.componentName="btn",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run();this.stateComponent(e),r&&this.listStyle.push(r)})}buttonDefaultComponent(){this.componentName="btn-default";const t=`.${this.prefix}-${this.componentName}`,e=new l({rawSelector:t,style:[{attributeName:"border-color",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","main")}]}).run(),r=new l({rawSelector:t+":hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();e&&(this.listStyle.push(e),this.listStyle.push(r))}cardComponent(){this.componentName=".c-card";const t=new l({rawSelector:this.componentName+" .t-card-label-container",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")},{attributeName:"color",attributeValue:this.getColor("tertiary","text")}]}).run();t&&this.listStyle.push(t)}colorComponent(){this.componentName="color",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),o=new l({rawSelector:e+"-hover:hover",style:[{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run();r&&(this.listStyle.push(r),this.listStyle.push(o))})}linkComponent(){this.componentName="link",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run();this.stateComponent(e),r&&this.listStyle.push(r)})}navbarComponent(){const t=new l({rawSelector:".t-navbar-with-scroll > ul > li > a:after",style:[{attributeName:"background-color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".t-navbar-with-scroll > ul > li:hover > a",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),r=new l({rawSelector:".t-navbar-top-right-menus-list .t-navbar-top-right-menus-list-item:hover .t-navbar-top-right-menus-list-item-link",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e),this.listStyle.push(r))}paginationComponent(){this.componentName=".t-pagination";const t=new l({rawSelector:this.componentName+" li.active",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),e=new l({rawSelector:this.componentName+" li:not(.disabled):hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")},{attributeName:"border",attributeValue:"1px solid transparent"}]}).run(),r=new l({rawSelector:this.componentName+" li:not(.disabled):first-child:hover:after",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")},{attributeName:"border",attributeValue:"1px solid transparent"}]}).run(),o=new l({rawSelector:this.componentName+" li:not(.disabled):last-child:hover:after",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")},{attributeName:"border",attributeValue:"1px solid transparent"}]}).run(),a=new l({rawSelector:this.componentName+" li:hover a",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e),this.listStyle.push(r),this.listStyle.push(o),this.listStyle.push(a))}panelSelectDateComponent(){this.componentName=".t-box-tertiary";const t=new l({rawSelector:this.componentName,style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run();t&&this.listStyle.push(t)}ratingStarComponent(){this.componentName=".c-listing-rating";const t=new l({rawSelector:this.componentName+" .star-rating-text",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run(),e=new l({rawSelector:this.componentName+" .front-stars",style:[{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e))}priceSliderComponent(){this.componentName=".el-slider";const t=new l({rawSelector:this.componentName+"__button",style:[{attributeName:"border",attributeValue:"2px solid "+this.getColor("tertiary","main")},{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run(),e=new l({rawSelector:this.componentName+"__bar",style:[{attributeName:"background",attributeValue:this.getColor("tertiary","main")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e))}radioCheckboxComponent(){const t=new l({rawSelector:".t-input-control input:checked ~ .t-input-control-indicator",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")},{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:".t-input-control-radio .t-input-control-indicator:after",style:[{attributeName:"color",attributeValue:this.getColor("primary","text")}]}).run(),r=new l({rawSelector:".t-input-control:hover",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),o=new l({rawSelector:".t-input-control:hover input~.t-input-control-indicator",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(r),this.listStyle.push(e),this.listStyle.push(o))}sectionTitleComponent(){this.componentName=".c-section-title-button .section-title-button__action";const t=new l({rawSelector:this.componentName,style:[{attributeName:"border",attributeValue:"1px solid "+this.getColor("secondary","main")}]}).run(),e=new l({rawSelector:this.componentName+":hover",style:[{attributeName:"background",attributeValue:this.getColor("secondary","main")},{attributeName:"color",attributeValue:this.getColor("secondary","text")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e))}shortcutPanelComponent(){this.componentName=".c-home-shortcut-panel .home-shortcut-panel__container .link-col-wrapper .link-wrapper";const t=new l({rawSelector:this.componentName+" .link-icon-wrapper",style:[{attributeName:"background-color",attributeValue:this.getColor("tertiary","main")}]}).run(),e=new l({rawSelector:this.componentName+" .link-item:hover .link-icon-wrapper",style:[{attributeName:"background-color",attributeValue:"transparent"}]}).run(),r=new l({rawSelector:this.componentName+" .link-item:hover .t-icon",style:[{attributeName:"background-color",attributeValue:"transparent"},{attributeName:"color",attributeValue:this.getColor("tertiary","main")}]}).run(),o=new l({rawSelector:this.componentName+" .link-item.active .link-icon-wrapper",style:[{attributeName:"background-color",attributeValue:"transparent"}]}).run(),a=new l({rawSelector:this.componentName+" .link-item.active .t-icon",style:[{attributeName:"color",attributeValue:this.getColor("tertiary","main")}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(r),this.listStyle.push(e),this.listStyle.push(a),this.listStyle.push(o))}sortByComponent(){this.componentName=".travlr-ui .t-tabs-item.active .t-tabs-link, .travlr-ui .t-tabs-item:focus .t-tabs-link, .travlr-ui .t-tabs-item:hover .t-tabs-link, .travlr-ui .t-tabs-item:visited .t-tabs-link";const t=new l({rawSelector:this.componentName,style:[{attributeName:"border-bottom",attributeValue:"4px solid "+this.getColor("primary","main")},{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}tagComponent(){this.componentName="input-tag",this.listTheme.forEach(t=>{const e=`.${this.prefix}-${this.componentName}-${t}`,r=new l({rawSelector:e+".t-input-tag-label",style:[{attributeName:"border",attributeValue:"1px solid "+this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"main")}]}).run(),o=new l({rawSelector:e+".t-input-tag-label:hover",style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run(),a=new l({rawSelector:".t-input-tag:checked+.t-input-tag-"+t,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run();r&&(this.listStyle.push(r),this.listStyle.push(o),this.listStyle.push(a))})}toggleComponent(){const t=new l({rawSelector:".t-input-toggle-light:checked + .t-input-toggle-btn",style:[{attributeName:"background",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}}class c extends n{run(){return this.buttonComponent(),this.ahrefComponent(),this.formControlComponent(),this.getResult()}buttonComponent(){this.componentName="btn",this.listTheme.forEach(t=>{const e=`.${this.componentName}-${t}`,r=new l({rawSelector:e,style:[{attributeName:"background",attributeValue:this.getColor(""+t,"main")},{attributeName:"border-color",attributeValue:this.getColor(""+t,"main")},{attributeName:"color",attributeValue:this.getColor(""+t,"text")}]}).run();this.stateComponent(e),r&&this.listStyle.push(r)})}formControlComponent(){const t=new l({rawSelector:".form-control:focus",style:[{attributeName:"border-color",attributeValue:this.getColor("primary","main")}]}).run();t&&this.listStyle.push(t)}ahrefComponent(){const t=new l({rawSelector:"a",style:[{attributeName:"color",attributeValue:this.getColor("primary","main")}]}).run(),e=new l({rawSelector:"a:hover",style:[{attributeName:"opacity",attributeValue:this.opacity}]}).run();t&&(this.listStyle.push(t),this.listStyle.push(e))}}const m=["MLP","ULP","SSO"];var b=Object.freeze({__proto__:null,MLP_THEME:"MLP",ULP_THEME:"ULP",SSO_THEME:"SSO",LIST_THEME:m});t.ThemeGenerator=class{constructor(t){this.config={theme:t&&t.theme?t.theme:"",platformName:t&&t.platformName?t.platformName:"",applyTheme:!(!t||!t.applyTheme)&&t.applyTheme,themeDictionary:t&&t.themeDictionary?t.themeDictionary:null},this.applyTheme=this.config.applyTheme,this.themeName=this.config.theme,this.listTheme=m,process.browser&&(this.elementHead=document.querySelectorAll("head")[0]),this.resultStyle="",this.mlpThemes=()=>new u(this.config).run(),this.ulpThemes=()=>new h(this.config).run(),this.ssoThemes=()=>new c(this.config).run(),this.init()}init(){this.resultStyle=this.generateCss(),this.checkApplyThemeValue(),this.applyTheme&&this.createStyleElement()}createStyleElement(){if(process.browser){const t=document.createElement("style");t.setAttribute("type","text/css");const e=document.createTextNode(this.resultStyle);console.info("styleeeee : ",this.resultStyle),t.appendChild(e),this.elementHead.appendChild(t)}}checkApplyThemeValue(){"boolean"==typeof this.applyTheme&&""!==this.applyTheme&&void 0!==this.applyTheme||(this.applyTheme=!1)}generateCss(){if(!this.config.theme)return"";if(this.themeExists()){if("MLP"===this.themeName)return this.mlpThemes();if("ULP"===this.themeName)return this.ulpThemes();if("SSO"===this.themeName)return this.ssoThemes()}return""}getIndexListTheme(){return this.listTheme.indexOf(this.themeName)}themeExists(){return-1!==this.getIndexListTheme()}getTheme(){return this.resultStyle}},t.ThemeTypes=b,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=theme-generator.min.js.map