Skip to content

Instantly share code, notes, and snippets.

@ngminhhoang1412
Created March 25, 2023 02:13
Show Gist options
  • Save ngminhhoang1412/9bde6c031cdbadfc6438c6d469c81cad to your computer and use it in GitHub Desktop.
Save ngminhhoang1412/9bde6c031cdbadfc6438c6d469c81cad to your computer and use it in GitHub Desktop.
"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(t){return 0===this.lastIndexOf(t,0)}),"function"!=typeof String.prototype.endsWith&&(String.prototype.endsWith=function(t){return-1!==this.indexOf(t,this.length-t.length)}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),"function"!=typeof Array.prototype.find&&(Array.prototype.find=function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("callback must be a function");for(var a=arguments[1],n=0;n<i;){var o=e[n];if(t.call(a,o,n,e))return o;n++}}),"function"!=typeof Array.prototype.findIndex&&Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var a=arguments[1],n=0;n<i;){var o=e[n];if(t.call(a,o,n,e))return n;n++}return-1},configurable:!0,writable:!0}),"function"!=typeof Array.prototype.filter&&(Array.prototype.filter=function(t,e){"use strict";if("function"!=typeof t||!this)throw new TypeError;var i=this.length>>>0,a=new Array(i),n=this,o=0,r=-1;if(void 0===e)for(;++r!==i;)if(r in this)if(t(n[r],r,n))a[o++]=n[r];else for(;++r!==i;)r in this&&t.call(e,n[r],r,n)&&(a[o++]=n[r]);return a.length=o,a}),"function"!=typeof Array.prototype.map&&(Array.prototype.map=function(t){var e,i,a;if(null==this)throw new TypeError("this is null or not defined");var n=Object(this),o=n.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),i=new Array(o),a=0;a<o;){var r,d;a in n&&(r=n[a],d=t.call(e,r,a,n),i[a]=d),a++}return i}),"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var e,i=Object(this),a=i.length>>>0,n=0;if(arguments.length>=2)e=arguments[1];else{for(;n<a&&!(n in i);)n++;if(n>=a)throw new TypeError("Reduce of empty array with no initial value");e=i[n++]}for(;n<a;)n in i&&(e=t(e,i[n],n,i)),n++;return e}),"function"!=typeof Object.keys&&(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length;return function(n){if("function"!=typeof n&&("object"!=typeof n||null===n))throw new TypeError("Object.keys called on non-object");var o,r,d=[];for(o in n)t.call(n,o)&&d.push(o);if(e)for(r=0;r<a;r++)t.call(n,i[r])&&d.push(i[r]);return d}}()),String.prototype.replaceAll=function(t,e){return this.valueOf().split(t).join(e)},String.prototype.encode=function(){return this.valueOf().replaceAll(/&/g,"&#38;").replaceAll(/>/g,"&#62;").replaceAll(/</g,"&#60;").replaceAll(/'/g,"&#39;").replaceAll(/"/g,"&#34;").replaceAll(/\\/g,"&#165;").replaceAll(/{/g,"&#123;").replaceAll(/}/g,"&#125;")},String.prototype.decode=function(){return this.valueOf().replaceAll(/&#38;/g,"&").replaceAll(/&#62;/g,">").replaceAll(/&#60;/g,"<").replaceAll(/&#39;/g,"'").replaceAll(/&#34;/g,'"').replaceAll(/&#165;/g,"\\").replaceAll(/&#123;/g,"{").replaceAll(/&#125;/g,"}")},String.prototype.format=function(){for(var t=this,e=0;e<arguments.length;e++){var i=new RegExp("\\{"+e+"\\}","gi");t=t.replace(i,arguments[e])}return t.valueOf()},Array.prototype.removeSpace=function(){var t=[];return this.forEach(function(e){(e=e.trim()).length>0&&t.push(e)}),t},Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]},Array.prototype.unique=function(){return this.filter(function(t,e,i){return i.indexOf(t)==e})},Array.prototype.except=function(t){var e=this;return Array.isArray(t)&&t.forEach(function(t){var i=e.indexOf(t);-1!=i&&e.splice(i,1)}),e},Array.prototype.only=function(t){var e=[];return Array.isArray(t)&&this.forEach(function(i){-1!=t.indexOf(i)&&e.push(i)}),e},Array.prototype.insert=function(t,e){this.splice(t,0,e)};var LadiPageScriptV2=LadiPageScriptV2||function(){};LadiPageScriptV2.prototype.init=function(){this.const={DESKTOP:"desktop",MOBILE:"mobile",DEVICE:"device",DOMAIN_GOOGLE_DOCS:"docs.google.com",POWERED_BY_IMAGE:"https://w.ladicdn.com/source/v3/by/ladipage.svg?v=1.0",STATIC_W_DOMAIN:"w.ladicdn.com",STATIC_S_DOMAIN:"s.ladicdn.com",APP_RUNTIME_PREFIX:"_runtime",OPTIMIZE_EVENT_DATA_KEY_LIST:["option.only_facebook_widget","option.sync_ladichat_form_account_id","option.sync_ladishare_form_account_id","option.sync_ladiflow_form_account_id","option.sync_ladisales_form_account_id","option.spinlucky_setting.list_value","option.spinlucky_setting.result_popup_id","option.spinlucky_setting.result_message","option.spinlucky_setting.max_turn","option.sheet_id","option.time_show","option.time_delay","option.data_event","option.action_funnel","option.data_tooltip.text","option.data_tooltip.type","option.data_tooltip.position","option.data_tooltip.size","option.conversion_name","option.google_ads_conversion","option.google_ads_label","option.event_custom_script","option.video_value","option.video_type","option.video_control","option.background_video.video_value","option.background_video.video_type","option.show_popup_welcome_page","option.delay_popup_welcome_page","option.show_popup_exit_page","option.popup_welcome_page_scroll_to","option.countdown_item_type","option.countdown_type","option.countdown_minute","option.countdown_daily_start","option.countdown_daily_end","option.countdown_endtime","option.input_type","option.input_default_value","option.input_tabindex","option.form_config_id","option.ladisale_store_id","option.product_tag_id","option.form_send_ladipage","option.data_submit_form_id","option.thankyou_type","option.thankyou_value","option.deeplink_value","option.form_thankyou_funnel","option.form_api_data","option.form_conversion_name","option.form_google_ads_conversion","option.form_purchase_value","option.form_google_ads_label","option.form_event_custom_script","option.form_auto_funnel","option.form_captcha","option.form_auto_complete","option.form_auto_capture","option.input_country","option.is_add_to_cart","option.is_form_coupon","option.is_form_login","option.is_form_otp","option.is_submit_form","option.is_buy_now","option.is_buy_now_ladisales","option.is_add_to_cart_ladisales","option.form_account_id","option.product_type","option.product_id","option.product_variant_id","option.product_mapping_name","option.product_mapping_name_custom","option.product_variant","option.product_variant_type","option.product_variant_title","option.product_variant_price","option.message_no_product","option.cart_layout","option.collection_setting.type","option.data_setting.type","option.data_setting.type_dataset","option.data_setting.value","option.data_setting.sort_name","option.data_setting.sort_by","option.combobox_type","option.survey_setting.is_multiple","option.survey_setting","option.form_setting","option.tabs_setting.current_tab","option.shape_setting.2nd_click","option.shape_setting.source_2nd_click","option.survey_setting.input_name","option.survey_setting.input_required","option.sync_ladisales","option.sync_ladiflow","option.sync_ladishare","option.sync_ladichat","device.option.auto_scroll","device.option.sticky","device.option.sticky_position","device.option.sticky_position_top","device.option.sticky_position_left","device.option.sticky_position_bottom","device.option.sticky_position_right","device.option.readmore_range","device.option.gallery_control.autoplay","device.option.gallery_control.autoplay_time","device.option.video_autoplay","device.option.popup_position","device.option.popup_backdrop","device.option.carousel_setting.autoplay","device.option.carousel_setting.autoplay_time","device.option.carousel_crop.width","device.option.carousel_crop.width_item","device.style.animation-name","device.style.animation-delay","device.option.collection_setting.row","device.option.collection_setting.column","device.option.collection_setting.margin","device.option.image_setting.2nd_click","device.option.image_setting.source_2nd_click","device.option.position","device.option.shape_setting.source_2nd_click","device.option.background-style"],ACTION_TYPE:{action:"action","1st_click":"1st_click","2nd_click":"2nd_click",hover:"hover",complete:"complete"},DATA_ACTION_TYPE:{link:"link",section:"section",email:"email",phone:"phone",popup:"popup",dropbox:"dropbox",hidden_show:"hidden_show",collapse:"collapse",set_value:"set_value",copy_clipboard:"copy_clipboard",change_index:"change_index",set_style:"set_style",set_value_2nd:"set_value_2nd",lightbox:"lightbox",popup_cart:"popup_cart",popup_checkout:"popup_checkout"},DATA_ACTION_LIGHTBOX_TYPE:{image:"image",video:"video",iframe:"iframe"},COUNTDOWN_TYPE:{countdown:"countdown",daily:"daily",endtime:"endtime"},COUNTDOWN_ITEM_TYPE:{day:"day",hour:"hour",minute:"minute",seconds:"seconds"},VIDEO_TYPE:{youtube:"youtube",direct:"direct"},BACKGROUND_STYLE:{solid:"solid",gradient:"gradient",image:"image",video:"video"},PUBLISH_PLATFORM:{ladipage:"LADIPAGE",ladipagedns:"LADIPAGEDNS",wordpress:"WORDPRESS",haravan:"HARAVAN",sapo:"SAPO",shopify:"SHOPIFY",itop:"ITOPWEBSITE",ftp:"FTP",other:"OTHER"},SECTION_TYPE:{default:"DEFAULT",global:"GLOBAL"},TRACKING_NAME:"ladicid",ACCESS_KEY_NAME:"ladiack",REF_NAME:"ref",OTP_TYPE:{send:"OTP_SEND",resend:"OTP_RESEND",sms:"OTP_SMS",voice:"OTP_VOICE",zns:"OTP_ZNS"},STATUS_SEND:{capture:1,otp:1,sendform:2},PUBLISH_STYLE:{desktop_min_width:768,mobile_small_min_width:320},ANIMATED_LIST:["rotate-1","rotate-2","rotate-3","type","scale","loading-bar","slide","clip","zoom","push"],POSITION_TYPE:{default:"default",top:"top",bottom:"bottom",top_left:"top_left",top_center:"top_center",top_right:"top_right",center_left:"center_left",center_right:"center_right",bottom_left:"bottom_left",bottom_center:"bottom_center",bottom_right:"bottom_right"},COLLECTION_TYPE:{carousel:"carousel",readmore:"readmore"},INPUT_TYPE:{tel:"tel",password:"password",text:"text",date:"date",select_multiple:"select_multiple",number:"number",email:"email",textarea:"textarea",select:"select",radio:"radio",checkbox:"checkbox",facebook_checkbox_plugin_transactional:"facebook_checkbox_plugin_transactional",facebook_checkbox_plugin_promotional:"facebook_checkbox_plugin_promotional",file:"file",image_choices:"image_choices",product_variant:"product_variant"},CONTENT_TYPE:{form_data:"FORM_DATA",form_urlencoded:"X_WWW_FORM_URLENCODED",json:"JSON"},SORT_BY_TYPE:{asc:"asc",desc:"desc"},PRODUCT_VARIANT_TYPE:{combined:"combined",combobox:"combobox",label:"label"},PRODUCT_VARIANT_OPTION_TYPE:{color:1,image:2},PRODUCT_VARIANT_TITLE:{left:"left",top:"top"},FORM_THANKYOU_TYPE:{default:"default",url:"url",popup:"popup"},GAME_RESULT_TYPE:{default:"default",popup:"popup"},PERCENT_TRACKING_SCROLL:[0,25,50,75,100],TIME_ONPAGE_TRACKING:[10,30,60,120,180,300,600],FORM_CONFIG_TYPE:{email:"EMAIL",mail_chimp:"MAIL_CHIMP",infusion_soft:"INFUSION_SOFT",infusion_soft_ladi:"INFUSION_SOFT_LADI",active_campaign:"ACTIVE_CAMPAIGN",sendgrid:"SENDGRID",hubspot:"HUBSPOT",smtp:"SMTP",esms:"ESMS",get_response:"GET_RESPONSE",convertkit:"CONVERTKIT",ladiflow:"LADIFLOW",telegram:"TELEGRAM",slack:"SLACK",zalo_zns:"ZALO_ZNS",mautic:"MAUTIC",google_sheet:"GOOGLE_SHEET",google_form:"GOOGLE_FORM",custom_api:"CUSTOM_API",ladisales:"LADISALES",ladishare:"LADISHARE",haravan:"HARAVAN",sapo:"SAPO",shopify:"SHOPIFY",nhanh_vn:"NHANH_VN",google_recaptcha:"GOOGLE_RECAPTCHA",google_recaptcha_checkbox:"GOOGLE_RECAPTCHA_CHECKBOX",google_recaptcha_enterprise:"GOOGLE_RECAPTCHA_ENTERPRISE",google_places_autocomplete:"GOOGLE_PLACES_AUTOCOMPLETE",kiotviet:"KIOTVIET",wordpress:"WORDPRESS",metu:"METU",ladichat:"LADICHAT",shopping:"SHOPPING",blog:"BLOG",conversion_api:"CONVERSION_API",popupx:"POPUPX"},FORM_UPLOAD_FILE_LENGTH:20,FORM_UPLOAD_FILE_SIZE:25,CART_LAYOUT:{editable:"editable",viewonly:"viewonly"},WIDTH_SECTION_RESIZE:{},RESIZE_ADD_PIXEL:300,RESIZE_ADD_PIXEL_THUMB:50,RESIZE_RANGE:50,TOOLTIP_TYPE:{default:"default",info:"info",success:"success",error:"error",notice:"notice"},TOOLTIP_POSITION:{top_left:"top_left",top_middle:"top_middle",top_right:"top_right",bottom_left:"bottom_left",bottom_middle:"bottom_middle",bottom_right:"bottom_right",left_top:"left_top",left_middle:"left_middle",left_bottom:"left_bottom",right_top:"right_top",right_middle:"right_middle",right_bottom:"right_bottom"},TOOLTIP_SIZE:{small:"small",medium:"medium",big:"big"},STORY_PAGE:{horizontal:"horizontal",vertical:"vertical",none:"none"},COMBOBOX_TYPE:{delivery_method:"delivery_method"},PRODUCT_TYPE:{event:"Event",service:"Service",physical:"Physical"}},this.runtime={backdrop_popup_id:"backdrop-popup",backdrop_dropbox_id:"backdrop-dropbox",lightbox_screen_id:"lightbox-screen",builder_section_popup_id:"SECTION_POPUP",builder_section_background_id:"BODY_BACKGROUND",ladipage_powered_by_classname:"ladipage_powered_by",current_element_mouse_down_carousel:null,current_element_mouse_down_carousel_position_x:0,current_element_mouse_down_carousel_diff:40,current_element_mouse_down_gallery_control:null,current_element_mouse_down_gallery_control_time:0,current_element_mouse_down_gallery_control_time_click:300,current_element_mouse_down_gallery_control_position_x:0,current_element_mouse_down_gallery_view:null,current_element_mouse_down_gallery_view_position_x:0,current_element_mouse_down_gallery_view_diff:40,country_state_sort:{VN:["201","202","224","220","203"]},location_state_sort:{VN:["HN","SG","HP","CT","DN"]},scroll_show_popup:{},scroll_depth:[],scroll_to_section:{},send_request_response:{},is_mobile_only:!1,interval_countdown:null,interval_gallery:null,timeout_gallery:{},interval_carousel:null,count_click_dom:{},timenext_carousel:{},time_click_dom:{},time_click:300,time_otp:6e4,isClient:!1,isDesktop:!0,isBrowserDesktop:!0,isIE:!1,isLoadHtmlGlobal:!1,isYouTubeIframeAPIReady:!1,isLoadYouTubeIframeAPI:!1,isVideoButtonUnmute:!0,device:this.const.DESKTOP,ladipage_id:null,func_get_code_otp:{},list_scroll_func:{},list_loaded_func:[],list_show_popup_func:{},list_youtube_ready_exec:[],list_scrolling_exec:{},list_scrolled_exec:{},list_lightbox_id:{},list_set_value_name_country:["ward","district","state","country"],tmp:{},tabindexForm:0,eventData:{},eventDataGlobal:{},timenow:0,widthScrollBar:0,replaceStr:{},replacePrefixStart:"{{",replacePrefixEnd:"}}",replaceNewPrefixStart:"!::",replaceNewPrefixEnd:"::!"},this.const.WIDTH_SECTION_RESIZE[this.const.DESKTOP]=1440,this.const.WIDTH_SECTION_RESIZE[this.const.MOBILE]=768},["isObject","isArray","isFunction","isBoolean","isString","isEmpty","isNull"].forEach(function(t){LadiPageScriptV2.prototype[t]=function(e){return window[t+"LadiPage"](e)}}),LadiPageScriptV2.prototype.copy=function(t){return isObjectLadiPage(window.angular)&&isFunctionLadiPage(window.angular.copy)?window.angular.copy(t):isNullLadiPage(t)?t:JSON.parse(JSON.stringify(t))};var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){var e,i,a,n,o,r,d,l="",s=0;for(t=Base64._utf8_encode(t);s<t.length;)n=(e=t.charCodeAt(s++))>>2,o=(3&e)<<4|(i=t.charCodeAt(s++))>>4,r=(15&i)<<2|(a=t.charCodeAt(s++))>>6,d=63&a,isNaN(i)?r=d=64:isNaN(a)&&(d=64),l=l+Base64._keyStr.charAt(n)+Base64._keyStr.charAt(o)+Base64._keyStr.charAt(r)+Base64._keyStr.charAt(d);return l},decode:function(t){var e,i,a,n,o,r,d="",l=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<t.length;)e=Base64._keyStr.indexOf(t.charAt(l++))<<2|(n=Base64._keyStr.indexOf(t.charAt(l++)))>>4,i=(15&n)<<4|(o=Base64._keyStr.indexOf(t.charAt(l++)))>>2,a=(3&o)<<6|(r=Base64._keyStr.indexOf(t.charAt(l++))),d+=String.fromCharCode(e),64!=o&&(d+=String.fromCharCode(i)),64!=r&&(d+=String.fromCharCode(a));return d=Base64._utf8_decode(d)},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?e+=String.fromCharCode(a):a>127&&a<2048?(e+=String.fromCharCode(a>>6|192),e+=String.fromCharCode(63&a|128)):(e+=String.fromCharCode(a>>12|224),e+=String.fromCharCode(a>>6&63|128),e+=String.fromCharCode(63&a|128))}return e},_utf8_decode:function(t){for(var e="",i=0,a=0,n=0,o=0;i<t.length;)(a=t.charCodeAt(i))<128?(e+=String.fromCharCode(a),i++):a>191&&a<224?(o=t.charCodeAt(i+1),e+=String.fromCharCode((31&a)<<6|63&o),i+=2):(o=t.charCodeAt(i+1),n=t.charCodeAt(i+2),e+=String.fromCharCode((15&a)<<12|(63&o)<<6|63&n),i+=3);return e}},equalsLadiPage=function(t,e){return isObjectLadiPage(window.angular)&&isFunctionLadiPage(window.angular.equals)?window.angular.equals(t,e):typeof t==typeof e&&JSON.stringify(t)==JSON.stringify(e)},isObjectLadiPage=function(t){return!isFunctionLadiPage(t)&&!isArrayLadiPage(t)&&t instanceof Object},isArrayLadiPage=function(t){return t instanceof Array},isFunctionLadiPage=function(t){return"function"==typeof t||t instanceof Function},isBooleanLadiPage=function(t){return"boolean"==typeof t},isStringLadiPage=function(t){return"string"==typeof t||t instanceof String},isEmptyLadiPage=function(t){return!!isNullLadiPage(t)||(isStringLadiPage(t)?0==(t=t.trim()).length||"undefined"==t.toLowerCase():!!isArrayLadiPage(t)&&0==t.length)},isNullLadiPage=function(t){return void 0===t||void 0==t},parseFloatLadiPage=function(t,e){var i=parseFloat(t);try{return parseFloat(LadiPageScript.formatNumber(i,21,null,e||6))}catch(t){return NaN}},decodeURIComponentLadiPage=function(t){try{return decodeURIComponent(t)}catch(e){return t}},LadiPageScript=LadiPageScript||new LadiPageScriptV2;LadiPageScript.init();var LadiFormApi=LadiFormApi||{},LadiPageCommand=LadiPageCommand||[],LadiPageLocation=LadiPageLocation||[],LadiPageShopping=LadiPageShopping||[],LadiPageFormData=LadiPageFormData||[],LadiPageQueueCommandList=LadiPageQueueCommandList||[],LadiPageQueueCommand={push:function(t,e){isFunctionLadiPage(t)&&isFunctionLadiPage(e)&&(t()?e():LadiPageQueueCommandList.push({callback1:t,callback2:e}))}};LadiPageScriptV2.prototype.loadHtmlGlobal=function(t){for(var e=this,i=0,a=[],n=document.querySelectorAll(".ladi-section[data-global-id]"),o=0;o<n.length;o++){var r=n[o],d=r.getAttribute("data-global-id");isEmptyLadiPage(d)||a.push({id:r.id,data_global_id:d})}var l=function(n){isObjectLadiPage(n)&&Object.keys(n).forEach(function(t){e.runtime.eventDataGlobal[t]=n[t]});i==a.length&&(s(),c(),u(),e.runtime.isLoadHtmlGlobal=!0,e.run(t))},s=function(){e.runtime.shopping||0!=document.querySelectorAll('div.ladi-section-global[data-shopping="true"]').length&&(e.runtime.shopping=!0)},c=function(){e.runtime.formdata||0!=document.querySelectorAll('div.ladi-section-global[data-formdata="true"]').length&&(e.runtime.formdata=!0)},u=function(){for(var t=[],i=document.querySelectorAll("div.ladi-section-global[data-country-file]"),a=0;a<i.length;a++){var n=i[a].getAttribute("data-country-file");isEmptyLadiPage(n)||(n=(n=n.split(";")).removeSpace(),t=t.concat(n))}e.runtime.list_country=e.runtime.list_country||[];var o=(t=t.unique()).except(e.runtime.list_country);e.runtime.list_country=e.runtime.list_country.concat(o),o.length>0&&e.runtime.hasOwnProperty("cdn_url")&&e.runtime.hasOwnProperty("version")&&o.forEach(function(t){var i=e.runtime.cdn_url+t+".js?v="+e.runtime.version;e.loadScript(i,{defer:!0},null,function(t){e.runAfterLocation()})})};a.forEach(function(t){var a=t.id,n=document.getElementById(a),o=LadiPageScript.const.API_SECTION_GLOBAL_HTML.format(e.runtime.store_id,t.data_global_id);e.sendRequest("GET",o,null,!0,null,function(o,r,d){if(d.readyState==XMLHttpRequest.DONE){var s=document.createElement("div");if(s.innerHTML=o,isEmptyLadiPage(s.querySelector('div.ladi-section-global[data-id="'+t.id+'"] .ladi-section[data-global-id="'+t.data_global_id+'"]')))n.parentElement.removeChild(n);else{var c=e.findAncestor(n,"ladi-section-global");isEmptyLadiPage(c)||(n=c),n.outerHTML=function(t){return isFunctionLadiPage(window.lazyload_run)&&(t=window.lazyload_run(t,!1)),t.innerHTML}(s)}!function(t){i++;var a=document.querySelector('.ladi-section-global[data-id="'+t+'"] > script');if(isEmptyLadiPage(a))l();else{var n=null;try{n=JSON.parse(a.innerHTML),n=e.deOptimizeEventData(e.copy(n),e.const.OPTIMIZE_EVENT_DATA_KEY_LIST,"OPTIMIZE_EVENT_DATA_KEY_LIST"),n=e.decodeValue(n)}catch(t){}a.parentElement.removeChild(a),l(n)}}(a)}})}),l()},LadiPageScriptV2.prototype.getOptimizeSourceKey=function(t){var e={};t=(t=this.copy(t)).reverse();for(var i=[],a="a".charCodeAt();a<"z".charCodeAt();a++)i.push(String.fromCharCode(a));for(var n="A".charCodeAt();n<"Z".charCodeAt();n++)i.push(String.fromCharCode(n));for(a="a".charCodeAt();a<"z".charCodeAt();a++){for(n="a".charCodeAt();n<"z".charCodeAt();n++)i.push(String.fromCharCode(a)+String.fromCharCode(n));for(n="A".charCodeAt();n<"Z".charCodeAt();n++)i.push(String.fromCharCode(a)+String.fromCharCode(n))}for(a="A".charCodeAt();a<"Z".charCodeAt();a++){for(n="a".charCodeAt();n<"z".charCodeAt();n++)i.push(String.fromCharCode(a)+String.fromCharCode(n));for(n="A".charCodeAt();n<"Z".charCodeAt();n++)i.push(String.fromCharCode(a)+String.fromCharCode(n))}var o=0;return t.forEach(function(t){var a=i[o%i.length],n=Math.floor(o/i.length);n>0&&(a+=n),e[t]=a,o++}),e},LadiPageScriptV2.prototype.optimizeEventData=function(t,e,i){var a=this,n=a.runtime.tmp["DATA_O_"+i];if(isArrayLadiPage(e)&&isNullLadiPage(n)){var o=[];"OPTIMIZE_EVENT_DATA_KEY_LIST"==i?(e.forEach(function(t){o.push(t),t.startsWith(a.const.DEVICE+".")&&(o.push(a.const.DESKTOP+t.substring(a.const.DEVICE.length)),o.push(a.const.MOBILE+t.substring(a.const.DEVICE.length)))}),o.push("type")):o=e,n=a.getOptimizeSourceKey(o),a.runtime.tmp["DATA_O_"+i]=n}isObjectLadiPage(t)&&Object.keys(t).forEach(function(e){isNullLadiPage(n[e])?t[e]=a.optimizeEventData(t[e],null,i):(t[n[e]]=a.optimizeEventData(t[e],null,i),delete t[e])});return t},LadiPageScriptV2.prototype.deOptimizeEventData=function(t,e,i){var a=this,n=a.runtime.tmp["DATA_D_"+i];if(isArrayLadiPage(e)&&isNullLadiPage(n)){n={},a.optimizeEventData(null,e,i);var o=a.runtime.tmp["DATA_O_"+i];Object.keys(o).forEach(function(t){n[o[t]]=t}),a.runtime.tmp["DATA_D_"+i]=n}return isObjectLadiPage(t)&&Object.keys(t).forEach(function(e){isNullLadiPage(n[e])?t[e]=a.deOptimizeEventData(t[e],null,i):(t[n[e]]=a.deOptimizeEventData(t[e],null,i),delete t[e])}),t},LadiPageScriptV2.prototype.postMessageWindow=function(t,e,i){t.postMessage(JSON.stringify(e),i)},LadiPageScriptV2.prototype.updateHeightElement=function(t,e,i,a,n,o){var r=this;if(a!=n){var d="style_update_height_element",l=!0;if("fixed"==getComputedStyle(e).position&&(l=!1),t){r.runtime.tmp.dimension_element_new={};var s="#"+r.runtime.builder_section_popup_id+" > .ladi-container > .ladi-element { max-height: none !important;}";r.createStyleElement(d,s)}for(var c,u,p=function(t,i){return t.id==e.id&&"height"==i?n:isEmptyLadiPage(r.runtime.tmp.dimension_element_new[t.id+i])?parseFloatLadiPage(getComputedStyle(t)[i])||0:r.runtime.tmp.dimension_element_new[t.id+i]},m=function(t,e,i){var a=p(t,e)+i;if(o){var n="transition-parent-collapse-"+e;t.classList.add(n);var d=1e3*parseFloatLadiPage(getComputedStyle(t).transitionDuration);r.runTimeout(function(){t.classList.remove(n)},d)}t.style.setProperty(e,a+"px"),r.runtime.tmp.dimension_element_new[t.id+e]=a},g=n-a,_=p(e,"top")+a,y=0;y<e.parentElement.children.length;y++){var f=e.parentElement.children[y];f.id!=e.id&&(p(f,"top")>=_&&m(f,"top",g))}if(!isEmptyLadiPage(i)&&i.id!=r.runtime.builder_section_popup_id){var v=p(i,"height"),P=function(){for(var t=0,i=0;i<e.parentElement.children.length;i++){var a=e.parentElement.children[i];if("none"!=getComputedStyle(a).display&&0!=p(a,"height")){var n=p(a,"top")+p(a,"height");n>t&&(t=n)}}return t}();if((i.classList.contains("ladi-section")||i.getElementsByClassName("ladi-popup").length>0)&&(P=v+g),m(i,"height",P-v),l){var L=(c=i,u=r.findAncestor(c.parentElement,"ladi-element"),isEmptyLadiPage(u)&&(u=r.findAncestor(c.parentElement,"ladi-section")),u);this.updateHeightElement(!1,i,L,v,P,o)}}if(t){if(this.runtime.tmp.is_loaded_func_done){var h=document.getElementById(d);isEmptyLadiPage(h)||h.parentElement.removeChild(h)}delete r.runtime.tmp.dimension_element_new,r.fireEvent(window,"resize")}}},LadiPageScriptV2.prototype.showParentVisibility=function(t,e){var i=this.findAncestor(t,"ladi-popup");if(!isEmptyLadiPage(i)&&(i=this.findAncestor(i,"ladi-element"),!isEmptyLadiPage(i)))return"none"==getComputedStyle(i).display&&i.classList.add("hide-visibility"),isFunctionLadiPage(e)&&e(),void i.classList.remove("hide-visibility");isFunctionLadiPage(e)&&e()},LadiPageScriptV2.prototype.pauseAllVideo=function(t){var e=document.getElementById(this.runtime.lightbox_screen_id).getElementsByClassName("lightbox-close")[0];if(!isEmptyLadiPage(e))return e.click(),this.pauseAllVideo(t);delete this.runtime.tmp.gallery_playing_video;for(var i=(t=t||document).querySelectorAll(".iframe-video-preload:not(.no-pause)"),a=0;a<i.length;a++)this.runEventReplayVideo(i[a].id,i[a].getAttribute("data-video-type"),!1)},LadiPageScriptV2.prototype.runEventReplayVideo=function(t,e,i){var a=this,n=document.getElementById(t),o=null;if(!isEmptyLadiPage(n)){var r=document.getElementById(t+"_button_unmute"),d=isEmptyLadiPage(r);if(e==a.const.VIDEO_TYPE.youtube){o=i?"playVideo":"pauseVideo";var l=!1;if(a.runtime.isYouTubeIframeAPIReady){var s=window.YT.get(t);if(!isEmptyLadiPage(s)){if(d&&i&&isFunctionLadiPage(s.unMute)&&s.unMute(),!d&&i&&isFunctionLadiPage(s.mute)&&s.mute(),!isFunctionLadiPage(s[o]))return void a.runTimeout(function(){a.runEventReplayVideo(t,e,i)},100);s[o](),l=!0}}l||(d&&i&&a.postMessageWindow(n.contentWindow,{event:"command",func:"unMute",args:[]},"*"),!d&&i&&a.postMessageWindow(n.contentWindow,{event:"command",func:"mute",args:[]},"*"),a.postMessageWindow(n.contentWindow,{event:"command",func:o,args:[]},"*"))}e==a.const.VIDEO_TYPE.direct&&(o=i?"play":"pause",d&&i&&(n.muted=!1),!d&&i&&(n.muted=!0),isFunctionLadiPage(n[o])&&n[o]()),i?(n.classList.remove("ladi-hidden"),isEmptyLadiPage(r)||r.style.removeProperty("display")):(n.classList.add("ladi-hidden"),isEmptyLadiPage(r)||r.style.setProperty("display","none"))}},LadiPageScriptV2.prototype.runEventPlayVideo=function(t,e,i,a,n,o,r,d,l,s){var c=this,u=c.runtime.isVideoButtonUnmute;(c.runtime.isDesktop||r||d||n||a)&&(u=!1);var p=function(t,i){if(u&&!t.hasAttribute("data-remove-button-unmute")){var a=t.id+"_button_unmute",n=document.getElementById(a);isEmptyLadiPage(n)&&((n=document.createElement("div")).id=a,n.innerHTML="<div></div>",n.className="button-unmute ladi-hidden",n.addEventListener("click",function(i){if(i.stopPropagation(),t=document.getElementById(t.id),e==c.const.VIDEO_TYPE.youtube){var a=!1;if(c.runtime.isYouTubeIframeAPIReady){var o=window.YT.get(t.id);!isEmptyLadiPage(o)&&isFunctionLadiPage(o.unMute)&&(o.unMute(),a=!0)}a||c.postMessageWindow(t.contentWindow,{event:"command",func:"unMute",args:[]},"*")}e==c.const.VIDEO_TYPE.direct&&(t.muted=!1),n.parentElement.removeChild(n),t.setAttribute("data-remove-button-unmute",!0)}),t.parentElement.appendChild(n)),i&&n.classList.remove("ladi-hidden");var o=c.findAncestor(t,"lightbox-screen");isEmptyLadiPage(o)||(n.style.setProperty("width",getComputedStyle(t).width),n.style.setProperty("height",getComputedStyle(t).height))}},m=document.getElementById(t);if(!isEmptyLadiPage(m)){var g=c.findAncestor(m,"ladi-video");isEmptyLadiPage(g)||(g=c.findAncestor(g,"ladi-element")),!a||o||isEmptyLadiPage(g)||(g.classList.add("pointer-events-none"),m.classList.add("no-pause")),r&&m.classList.add("ladi-hidden");var _="";if(!isEmptyLadiPage(g)){var y=g.getElementsByClassName("ladi-video-background")[0];if(!isEmptyLadiPage(y)){var f=getComputedStyle(y).backgroundImage;f.toLowerCase().startsWith('url("')&&f.toLowerCase().endsWith('")')&&(f=(f=f.substr('url("'.length)).substr(0,f.length-'")'.length),isEmptyLadiPage(f)||(_=f))}}if(e==c.const.VIDEO_TYPE.youtube){var v=c.getVideoId(e,i),P=function(){try{if(c.runtime.isLoadYouTubeIframeAPI&&c.runtime.isYouTubeIframeAPIReady||!isObjectLadiPage(window.YT)||!isFunctionLadiPage(window.YT.Player)||(c.runtime.isLoadYouTubeIframeAPI=!0,c.runtime.isYouTubeIframeAPIReady=!0),c.runtime.isLoadYouTubeIframeAPI||(c.runtime.isLoadYouTubeIframeAPI=!0,window.onYouTubeIframeAPIReady=function(){c.runtime.isYouTubeIframeAPIReady=!0;for(;c.runtime.list_youtube_ready_exec.length>0;)c.runtime.list_youtube_ready_exec.shift()()},c.loadScript("https://www.youtube.com/iframe_api")),!c.runtime.isYouTubeIframeAPIReady)return void c.runtime.list_youtube_ready_exec.push(P);m.outerHTML=m.outerHTML.replaceAll("<iframe","<div").replaceAll("</iframe>","</div>"),m=document.getElementById(t),n&&m.classList.add("opacity-0");var e=function(){n&&(m=document.getElementById(t)).classList.remove("opacity-0")},i=e,g=function(e){m=document.getElementById(t);var i=window.YT.get(t);isEmptyLadiPage(i)||isEmptyLadiPage(m)?c.runTimeout(g,100):(c.runResizeAll(),a||u?i.mute():i.unMute(),r||d||i.playVideo(),isFunctionLadiPage(s)&&s(),p(m))};new window.YT.Player(t,{videoId:v,playerVars:{rel:0,modestbranding:0,playsinline:n||a||l||u?1:0,controls:!n&&o?1:0},events:{onReady:g,onStateChange:function(i){if(i.data==window.YT.PlayerState.PLAYING){if(m=document.getElementById(t),n){var a=function(){window.YT.get(t).getCurrentTime()>=.1?e():c.runTimeout(a,100)};a()}p(m,!0);var o=document.getElementById(t+"_button_unmute");isEmptyLadiPage(o)||window.YT.get(t).mute()}i.data==window.YT.PlayerState.ENDED&&window.YT.get(t).playVideo()},onError:i}})}catch(t){}};P()}if(e==c.const.VIDEO_TYPE.direct){isEmptyLadiPage(_)||m.setAttribute("poster",_),m.setAttribute("preload","auto"),m.setAttribute("controlslist","nodownload"),m.setAttribute("loop",""),r||d||m.setAttribute("autoplay",""),(n||a||l||u)&&(m.setAttribute("playsinline",""),m.setAttribute("webkit-playsinline","")),!n&&o&&m.setAttribute("controls",""),a||u?m.setAttribute("muted",""):m.removeAttribute("muted"),n&&m.classList.add("opacity-0");var L=function(){n&&(m=document.getElementById(t)).classList.remove("opacity-0")};m.removeAttribute("src"),m.setAttribute("data-src",i),m.outerHTML=m.outerHTML.replaceAll("data-src=","src="),m=document.getElementById(t),isFunctionLadiPage(s)&&s(m),m.addEventListener("loadedmetadata",function(t){p(m)}),m.addEventListener("error",L),m.addEventListener("playing",function(t){if(n){var e=function(){m.currentTime>=.1?L():c.runTimeout(e,100)};e()}p(m,!0);var i=document.getElementById(m.id+"_button_unmute");isEmptyLadiPage(i)||(m.muted=!0)})}}},LadiPageScriptV2.prototype.playVideo=function(t,e,i,a,n,o){var r=document.getElementById(t);if(!isEmptyLadiPage(r)){var d=document.getElementById(t+"_player");if(o||n||this.pauseAllVideo(),isEmptyLadiPage(d)){var l=r.getElementsByClassName("ladi-video")[0],s=t+"_player";e==this.const.VIDEO_TYPE.youtube&&(l.innerHTML=l.innerHTML+'<iframe id="'+s+'" class="iframe-video-preload" data-video-type="'+e+'" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',this.runEventPlayVideo(s,e,i,n,!1,a,o)),e==this.const.VIDEO_TYPE.direct&&(l.innerHTML=l.innerHTML+'<video id="'+s+'" class="iframe-video-preload" data-video-type="'+e+'" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; object-fit: cover;"></video>',this.runEventPlayVideo(s,e,i,n,!1,a,o))}else this.runEventReplayVideo(d.id,e,!0)}},LadiPageScriptV2.prototype.checkResizeImage=function(t){var e=[".jpg",".jpeg",".png"],i=function(t){for(var i=!1,a=0;a<e.length;a++)if(t.endsWith(e[a])){i=!0;break}return i};if(!i(t.toLowerCase())){var a=this.getElementAHref(t,!0);return a.search="",i(a.href)}return!0},LadiPageScriptV2.prototype.getOptimizeImage=function(t,e,i,a,n,o,r){if(isEmptyLadiPage(t)||!isStringLadiPage(t))return t;var d=t.split("/"),l=d.indexOf("");if(-1!=l&&d.length>l+1&&(d[l+1]=d[l+1].toLowerCase()),l=d.indexOf(this.const.STATIC_W_DOMAIN.toLowerCase()),this.checkResizeImage(t)&&-1!=l&&(d.length==l+3||d.length==l+6&&"ls"==d[3]&&"product"==d[5]||d.length==l+4&&"luid"==d[3]&&"avatar"==d[4]||d.length==l+4&&"rbg"==d[4])){var s=d[l+1].toLowerCase(),c=!0;if(s.startsWith("s")){var u=s.split("x");2==u.length&&parseFloatLadiPage(u[1])==u[1]&&(c=!1)}if(c){if(r||n){if(e=parseInt(e)||0,i=parseInt(i)||0,a){var p=this.const.RESIZE_RANGE+(o?this.const.RESIZE_ADD_PIXEL_THUMB:this.const.RESIZE_ADD_PIXEL);(e<=0||i<=0)&&(p*=2),e=e-e%this.const.RESIZE_RANGE+p,i=i-i%this.const.RESIZE_RANGE+p}}else e=this.const.WIDTH_SECTION_RESIZE[LadiPage.data.device_screen],i=this.const.WIDTH_SECTION_RESIZE[LadiPage.data.device_screen];d.insert(l+1,"s"+e+"x"+i)}}return t=d.join("/")},LadiPageScriptV2.prototype.historyReplaceState=function(t){try{window.history.replaceState(null,null,t)}catch(t){}},LadiPageScriptV2.prototype.resetViewport=function(){isEmptyLadiPage(this.runtime.tmp.timeoutViewport)||this.removeTimeout(this.runtime.tmp.timeoutViewport),isFunctionLadiPage(window.ladi_viewport)&&(this.runtime.tmp.timeoutViewport=this.runTimeout(window.ladi_viewport,10))},LadiPageScriptV2.prototype.runStoryPage=function(){var t=this,e=t.runtime.story_page;if(isObjectLadiPage(e)){var i=document.getElementsByClassName("ladi-wraper")[0];if(!isEmptyLadiPage(i)){var a=document.getElementsByClassName("ladi-story-page-progress-bar")[0];isEmptyLadiPage(a)||a.parentElement.removeChild(a);var n=document.querySelectorAll('.ladi-section:not([id="'+this.runtime.builder_section_popup_id+'"]):not([id="'+this.runtime.builder_section_background_id+'"])');if(0!=n.length){(a=document.createElement("div")).className="ladi-story-page-progress-bar";for(var o=null,r=(n[0],function(e,i){e.addEventListener("click",function(e){e.stopPropagation(),t.removeTimeout(t.runtime.tmp.story_page_next_timeout_id),window.ladi(i.id,i).scroll()})}),d=0;d<n.length;d++){var l=document.createElement("div");l.className="ladi-story-page-progress-bar-item",l.style.setProperty("width","calc(100% / "+n.length+" - 10px)"),r(l,n[d]),a.appendChild(l),0==d&&(o=l)}i.appendChild(a),t.runtime.tmp.story_page_mouse_down=!1,t.runtime.tmp.story_page_current_page=1;var s=function(t,i){if(!isEmptyLadiPage(t)){i&&t.click();for(var a=t;!isEmptyLadiPage(a.previousElementSibling);)(a=a.previousElementSibling).classList.add("active");for(var n=t;!isEmptyLadiPage(n.nextElementSibling);)(n=n.nextElementSibling).classList.remove("active");t.classList.remove("active");var o=t.parentElement.getElementsByTagName("span")[0];isEmptyLadiPage(o)||o.parentElement.removeChild(o),o=document.createElement("span"),t.appendChild(o),e.is_autoplay||o.style.setProperty("width","100%")}},c=function(){if(e.is_autoplay){var i=300,a=null;if(isEmptyLadiPage(t.runtime.tmp.current_default_popup_id)&&!t.runtime.tmp.story_page_mouse_down&&!t.runtime.tmp.story_page_scroll&&(a=document.querySelector(".ladi-story-page-progress-bar-item span"),!isEmptyLadiPage(a))){var n=parseFloatLadiPage(a.style.getPropertyValue("width"))||0;n=(n=((n=1e3*e.autoplay_time/(100/n))+i)/(1e3*e.autoplay_time)*100)>100?100:n,a.style.setProperty("width",n+"%"),n>=100&&(t.runtime.tmp.story_page_next_timeout_id=t.runTimeout(function(){isEmptyLadiPage(a.parentElement)||s(a.parentElement.nextElementSibling,!0)},i),i*=2)}t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,i)}};s(o,!1),t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,300),document.addEventListener("mousedown",function(e){t.runtime.tmp.story_page_mouse_down=!0}),document.addEventListener("touchstart",function(e){t.runtime.tmp.story_page_mouse_down=!0},t.runtime.scrollEventPassive),document.addEventListener("mouseup",function(e){t.runtime.tmp.story_page_mouse_down=!1}),document.addEventListener("touchend",function(e){t.runtime.tmp.story_page_mouse_down=!1}),i.addEventListener("scroll",function(a){isEmptyLadiPage(t.runtime.tmp.current_default_popup_id)&&(t.runtime.tmp.story_page_scroll=!0,t.removeTimeout(t.runtime.tmp.story_page_scroll_timeout_id),t.removeTimeout(t.runtime.tmp.story_page_timeout_id),t.runtime.tmp.story_page_scroll_timeout_id=t.runTimeout(function(){var a=0,n=e.type==t.const.STORY_PAGE.horizontal?i.scrollLeft/i.clientWidth:i.scrollTop/i.clientHeight;if((n=Math.floor(n+1.5))!=t.runtime.tmp.story_page_current_page){t.runtime.tmp.story_page_current_page=n;var o=document.querySelector(".ladi-story-page-progress-bar-item:nth-child("+n+")");t.removeTimeout(t.runtime.tmp.story_page_next_timeout_id),s(o,!1),a=100}t.runtime.tmp.story_page_scroll=!1,delete t.runtime.tmp.story_page_scroll_timeout_id,t.runtime.tmp.story_page_timeout_id=t.runTimeout(c,a)},300))},t.runtime.scrollEventPassive)}}}},LadiPageScriptV2.prototype.runThankyouPage=function(){var t=this.runtime.thankyou_page;if(isObjectLadiPage(t)){var e={is_thankyou_page:!0};e.conversion_name=t.event_value,e.google_ads_conversion=t.event_id,e.google_ads_label=t.event_label,e.purchase_value=t.purchase_value,e.event_category="LadiPageThankYouPage",this.runEventTracking(null,e),delete this.runtime.thankyou_page}},LadiPageScriptV2.prototype.runResizeSectionBackground=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript);try{for(var e=document.querySelectorAll(".ladi-section .ladi-section-background iframe.ladi-section-background-video"),i=0;i<e.length;i++){var a=e[i],n=parseFloatLadiPage(a.getAttribute("width"))||0,o=parseFloatLadiPage(a.getAttribute("height"))||0;if(!(n<=0||o<=0)){var r=t.findAncestor(a,"ladi-section-background"),d=r.clientWidth,l=o/n*d;l<r.clientHeight&&(d=r.clientHeight/l*d,l=r.clientHeight);var s=(r.clientHeight-l)/2,c=(r.clientWidth-d)/2;a.style.setProperty("top",(parseFloatLadiPage(s)||0)+"px"),a.style.setProperty("left",(parseFloatLadiPage(c)||0)+"px"),a.style.setProperty("width",(parseFloatLadiPage(d)||0)+"px"),a.style.setProperty("height",(parseFloatLadiPage(l)||0)+"px")}}}catch(t){}},LadiPageScriptV2.prototype.runResizeAll=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript),t.removeTimeout(t.runtime.tmp.timeout_is_resize_all_id);try{isFunctionLadiPage(window.ladi_viewport)&&window.ladi_viewport(),LadiPageShopping.push(function(){t.runtime.tmp.generateCart()});for(var e=document.querySelectorAll("#"+t.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),i=0;i<e.length;i++)"none"!=getComputedStyle(e[i]).display&&(t.runtime.tmp.is_resize_all=!0,window.ladi(e[i].id).show(!0,{checkHidePopupOther:!1}));t.runResizeSectionBackground()}catch(t){}t.runtime.tmp.timeout_is_resize_all_id=t.runTimeout(function(){delete t.runtime.tmp.is_resize_all},200)},LadiPageScriptV2.prototype.runEventResize=function(t){var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),isEmptyLadiPage(e.runtime.tmp.timeoutResizeAll)||e.removeTimeout(e.runtime.tmp.timeoutResizeAll),e.runtime.tmp.timeoutResizeAll=e.runTimeout(e.runResizeAll,10)},LadiPageScriptV2.prototype.runEventOrientationChange=function(t){var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),e.runEventResize(t)},LadiPageScriptV2.prototype.runAfterLocation=function(){var t=this;if(t instanceof LadiPageScriptV2||(t=LadiPageScript),!t.runtime.isRun)return t.runTimeout(t.runAfterLocation,100);if(t.runtime.list_country=t.runtime.list_country||[],!isObjectLadiPage(window.LadiLocation)||Object.keys(window.LadiLocation).length<t.runtime.list_country.length)return t.runTimeout(t.runAfterLocation,100);var e=LadiPageLocation||[];(LadiPageLocation={}).push=function(t){isFunctionLadiPage(t)&&t()},e.forEach(function(t){LadiPageLocation.push(t)}),LadiPageShopping.push(function(){t.reloadFeeShipping()})},LadiPageScriptV2.prototype.removeLazyloadPopup=function(t){var e=document.getElementById(t);if(!isEmptyLadiPage(e))for(var i=e.getElementsByClassName("ladi-lazyload");i.length>0;)i[0].classList.remove("ladi-lazyload")},LadiPageScriptV2.prototype.reloadLazyload=function(t){var e=this;if(e instanceof LadiPageScriptV2||(e=LadiPageScript),e.runtime.tmp.is_loaded_func_done){var i=[];if(t&&isObjectLadiPage(e.runtime.story_page)){var a=document.getElementsByClassName("ladi-section")[0];if(!isEmptyLadiPage(a))for(i=a.getElementsByClassName("ladi-lazyload");i.length>0;)i[0].classList.remove("ladi-lazyload")}else{i=document.getElementsByClassName("ladi-lazyload");for(var n=[],o=0;o<i.length;o++){var r=e.getElementBoundingClientRect(i[o]).y+window.scrollY;window.scrollY+e.getHeightDevice()>r&&r+i[o].offsetHeight>window.scrollY&&n.push(i[o])}n.forEach(function(t){t.classList.remove("ladi-lazyload")});for(var d=document.querySelectorAll(".ladi-gallery .ladi-gallery-view-item.selected:not(.ladi-lazyload)"),l=0;l<d.length;l++)if(isEmptyLadiPage(d[l].getAttribute("data-lazyload"))){d[l].setAttribute("data-lazyload",!0);for(var s=d[l].parentElement.getElementsByClassName("ladi-lazyload");s.length>0;)s[0].classList.remove("ladi-lazyload")}}}},LadiPageScriptV2.prototype.documentLoaded=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript),t.const.LANG=JSON.stringify(t.const.LANG),t.const.LANG=t.convertReplacePrefixStr(t.const.LANG),t.const.LANG=JSON.parse(t.const.LANG);var e=t.getURLSearchParams(null,null,!0),i=e.ladishow,a=e.ladihide,n=e.laditop,o=window.location.hash;isEmptyLadiPage(i)?i=[]:isArrayLadiPage(i)||(i=i.split(",").removeSpace()),isEmptyLadiPage(a)?a=[]:isArrayLadiPage(a)||(a=a.split(",").removeSpace()),isEmptyLadiPage(n)?n=[]:isArrayLadiPage(n)||(n=n.split(",").removeSpace().reverse());try{var r=window.ladi("LADI_CAMP_END_DATE").get_cookie(),d=window.ladi("LADI_CAMP_CONFIG").get_cookie();if(!isEmptyLadiPage(r)&&!isEmptyLadiPage(d)){d=JSON.parse(Base64.decode(d));var l=((r=parseInt(r)||0)-Date.now())/24/60/60/1e3;if(l>0&&isArrayLadiPage(d.dynamic_content.cookie)){var s=[];d.dynamic_content.cookie.forEach(function(t){var e=t.split("=");2!=(e=e.removeSpace()).length||isEmptyLadiPage(e[0])||isEmptyLadiPage(e[1])||s.push({name:e[0],value:e[1]})}),s.forEach(function(t){window.ladi(t.name).set_cookie(t.value,l)})}a=d.dynamic_content.hide||[],i=d.dynamic_content.show||[],n=d.dynamic_content.top||[],isArrayLadiPage(d.dynamic_content.scroll)&&d.dynamic_content.scroll.length>0&&(o="#"+d.dynamic_content.scroll.pop())}}catch(t){}var c=null,u=[];if(i.forEach(function(t){var e=document.getElementById(t);isEmptyLadiPage(e)||e.getElementsByClassName("ladi-popup").length>0&&u.push(t)}),u.length>0&&!isEmptyLadiPage(o))try{c=document.querySelector(o),isEmptyLadiPage(c)||isEmptyLadiPage(c.id)||!c.classList.contains("ladi-section")||(window.ladi(c.id).scroll(!1,!0),o=null)}catch(t){}if(a.forEach(function(t){window.ladi(t).hide()}),i.forEach(function(t){window.ladi(t).show()}),n.forEach(function(t){window.ladi(t).top()}),!isEmptyLadiPage(o))try{c=document.querySelector(o),isEmptyLadiPage(c)||isEmptyLadiPage(c.id)||t.runTimeout(function(){window.ladi(c.id).scroll()},300)}catch(t){}if(t.resetViewport(),t.runEventScroll(),!isEmptyLadiPage(t.runtime.tracking_global_url)){var p=!1,m=window;isObjectLadiPage(t.runtime.story_page)&&(m=document.getElementsByClassName("ladi-wraper")[0]);var g=function(){p||(p=!0,t.loadScript(t.runtime.tracking_global_url+"?v="+Date.now(),{defer:!0}),m.removeEventListener("scroll",g),document.removeEventListener("mousemove",g),document.removeEventListener("touchstart",g))};m.addEventListener("scroll",g,t.runtime.scrollEventPassive),document.addEventListener("mousemove",g),document.addEventListener("touchstart",g,t.runtime.scrollEventPassive),t.runTimeout(g,t.runtime.tracking_global_delay)}for(;t.runtime.list_loaded_func.length>0;){t.runtime.list_loaded_func.shift()()}t.runtime.tmp.is_loaded_func_done=!0;var _=document.getElementById("style_update_height_element");isEmptyLadiPage(_)||_.parentElement.removeChild(_);var y=document.getElementById("style_animation");isEmptyLadiPage(y)||y.parentElement.removeChild(y),t.reloadLazyload(!1)},LadiPageScriptV2.prototype.runConversionApi=function(t,e,i){!isEmptyLadiPage(t)&&!isEmptyLadiPage(e)&&isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api[t])&&(window.ladi_conversion_api[t][e]=i);if(isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api.facebook)&&isArrayLadiPage(window.ladi_conversion_api.facebook.pixels)&&isArrayLadiPage(window.ladi_conversion_api.facebook.events)&&isFunctionLadiPage(window.fbq)){window.ladi_conversion_api.facebook.pixels=window.ladi_conversion_api.facebook.pixels.unique(),window.ladi_conversion_api.facebook.fbc=window.ladi("_fbc").get_cookie(),window.ladi_conversion_api.facebook.fbp=window.ladi("_fbp").get_cookie();for(var a=0;a<window.ladi_conversion_api.facebook.events.length;a++){var n=window.ladi_conversion_api.facebook.events[a].data;n.event_id=n.eventID,delete n.eventID,window.ladi_conversion_api.facebook.events[a].data=n}this.runtime.tmp.runTrackingAnalytics("ConversionApi",{data:window.ladi_conversion_api}),delete window.ladi_conversion_api.facebook.fbc,delete window.ladi_conversion_api.facebook.fbp,delete window.ladi_conversion_api.facebook.events}},LadiPageScriptV2.prototype.getWidthDevice=function(t){if(this.runtime.is_mobile_only){var e=document.getElementsByClassName("ladi-wraper")[0];if(!isEmptyLadiPage(e))return e.clientWidth}var i=window.ladi_screen_width||window.screen.width;return t?window.innerWidth>0?window.innerWidth:i:window.outerWidth>0?window.outerWidth:i},LadiPageScriptV2.prototype.getHeightDevice=function(t){return window.outerHeight>0&&!this.runtime.isDesktop&&(t&&window.outerHeight>window.innerHeight||!t&&window.innerHeight>window.outerHeight)?window.outerHeight:window.innerHeight},LadiPageScriptV2.prototype.startAutoScroll=function(t,e,i,a){if(this.runtime.isDesktop?i:a){var n=document.getElementById(t);if(!isEmptyLadiPage(n)&&!n.classList.contains("ladi-auto-scroll")){var o=0;if("section"!=e){if(n.clientWidth<=this.getWidthDevice())return;o=(o=parseFloatLadiPage(getComputedStyle(n).left)||0)>0?0:-1*o}else{for(var r=n.querySelectorAll(".ladi-container > .ladi-element"),d=0;d<r.length;d++){var l=parseFloatLadiPage(getComputedStyle(r[d]).left)||0;l<o&&(o=l)}o=o>0?0:-1*o,n.querySelector(".ladi-container").style.setProperty("margin-left",o+"px")}n.classList.add("ladi-auto-scroll"),n.scrollLeft=o}}},LadiPageScriptV2.prototype.getLinkUTMRedirect=function(t,e){var i=this.createTmpElement("a","",{href:t}),a=this.getURLSearchParams(e,null,!1);if(!isEmptyLadiPage(i.href)&&!isEmptyLadiPage(i.host)){var n=this.getURLSearchParams(i.search,null,!1);["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach(function(t){isEmptyLadiPage(n[t])&&!isEmptyLadiPage(a[t])&&(i.search=i.search+(isEmptyLadiPage(i.search)?"?":"&")+t+"="+encodeURIComponent(a[t]))});var o=[];isArrayLadiPage(window.LadiPageURLSearchParamsCustom)&&(o=window.LadiPageURLSearchParamsCustom),isStringLadiPage(window.LadiPageURLSearchParamsCustom)&&(o=[window.LadiPageURLSearchParamsCustom]),o.forEach(function(t){isEmptyLadiPage(n[t])&&!isEmptyLadiPage(a[t])&&(i.search=i.search+(isEmptyLadiPage(i.search)?"?":"&")+t+"="+encodeURIComponent(a[t]))})}return i.href},LadiPageScriptV2.prototype.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},LadiPageScriptV2.prototype.randomString=function(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=i.length,n=0;n<t;n++)e+=i.charAt(Math.floor(Math.random()*a));return e},LadiPageScriptV2.prototype.runCallback=function(t,e){if(isFunctionLadiPage(e)){var i=this;if(t){var a=i.runInterval(function(){i.removeInterval(a),i.runCallback(!1,e)},0);return}e()}},LadiPageScriptV2.prototype.runTimeout=function(t,e){if(isFunctionLadiPage(t)){if(!isEmptyLadiPage(e)&&e>0)return setTimeout(t,e);t()}},LadiPageScriptV2.prototype.removeTimeout=function(t){return clearTimeout(t)},LadiPageScriptV2.prototype.removeInterval=function(t){return clearInterval(t)},LadiPageScriptV2.prototype.runInterval=function(t,e){if(isFunctionLadiPage(t))return setInterval(t,e)},LadiPageScriptV2.prototype.getURLSearchParams=function(t,e,i){var a={},n=isNullLadiPage(t);if(t=n?window.location.search:t,!isEmptyLadiPage(t))for(var o=t.substr(1).split("&"),r=0;r<o.length;++r){var d=o[r].split("=",2);if(isNullLadiPage(a[d[0]])){1==d.length?a[d[0]]="":a[d[0]]=decodeURIComponentLadiPage(d[1].replace(/\+/g," "));try{if(i){var l=JSON.parse(a[d[0]]);Number.isInteger(l)||(a[d[0]]=l,0==a[d[0]].length?a[d[0]]="":1==a[d[0]].length&&(a[d[0]]=a[d[0]][0]))}}catch(t){}}else i&&(isArrayLadiPage(a[d[0]])||(a[d[0]]=[a[d[0]]]),1==d.length?a[d[0]].push(""):a[d[0]].push(decodeURIComponentLadiPage(d[1].replace(/\+/g," "))))}return n&&["email","phone"].forEach(function(t){try{var e=a[t];if(!isEmptyLadiPage(e)){var i=Base64.decode(e);e==Base64.encode(i)&&(a[t]=i)}}catch(t){}}),isEmptyLadiPage(e)?a:a[e]},LadiPageScriptV2.prototype.getVideoId=function(t,e){if(isEmptyLadiPage(e))return e;if(t==this.const.VIDEO_TYPE.youtube){var i=this.createTmpElement("a","",{href:e});-1!=e.toLowerCase().indexOf("watch")?e=this.getURLSearchParams(i.search,"v",!1):-1!=e.toLowerCase().indexOf("embed/")?e=i.pathname.substring("/embed/".length):-1!=e.toLowerCase().indexOf("shorts/")?e=i.pathname.substring("/shorts/".length):-1!=e.toLowerCase().indexOf("youtu.be")&&(e=i.pathname.substring("/".length))}return e},LadiPageScriptV2.prototype.sendRequest=function(t,e,i,a,n,o){var r=this,d=function(l){var s=l[e],c=function(l,u){if(s.list.length<=l)0==l?d({}):isFunctionLadiPage(o)&&o(r.const.LANG.REQUEST_SEND_ERROR,0,u,e);else{var p={};p.timeout=s.timeout,p.onreadystatechange=function(){this.readyState==XMLHttpRequest.DONE&&(200==this.status?o(this.responseText,this.status,this,e):c(l+1,this))},r.sendRequestWithOption(t,s.list[l],i,a,n,p)}};if(isObjectLadiPage(s))return c(0,null);r.sendRequestWithOption(t,e,i,a,n,null,o)},l=function(){var t=r.runtime.tmp.send_request_configs;if(!isObjectLadiPage(t))return r.runtime.tmp.send_request_configs={},void l();d(t)};l()},LadiPageScriptV2.prototype.sendRequestWithOption=function(t,e,i,a,n,o,r){if(this.runtime.has_popupx&&this.runtime.request_through_parent){var d=this.randomId();return this.runtime.tmp["request_callback_id_"+d]=r,void this.runtime.tmp.runActionPopupX({request_data:{method:t,url:e,data:i,async:a,headers:n,options:o,callback_id:d},action:{type:"send_request_with_option"}})}var l=new XMLHttpRequest;if(isFunctionLadiPage(this.runtime.send_request_response[e])&&this.runtime.send_request_response[e](e,i,r))return;isFunctionLadiPage(r)&&(l.onreadystatechange=function(){var t=null;try{t=this.responseText}catch(t){}r(t,this.status,this,e)}),l.open(t,e,a);isObjectLadiPage(n)&&Object.keys(n).forEach(function(t){l.setRequestHeader(t,n[t])}),isObjectLadiPage(o)&&Object.keys(o).forEach(function(t){l[t]=o[t]}),l.send(i)},LadiPageScriptV2.prototype.deleteCookie=function(t){return window.ladi(t).delete_cookie()},LadiPageScriptV2.prototype.setCookie=function(t,e,i,a,n,o){return window.ladi(e).set_cookie(i,a,o,t,n)},LadiPageScriptV2.prototype.getCookie=function(t){return window.ladi(t).get_cookie()},LadiPageScriptV2.prototype.updateProductVariantSelectOption=function(t,e,i,a,n){var o=this,r=t.target,d=o.generateVariantProduct(e,!1,null,null,null,null,!0,!0,function(r){o.updateProductVariantSelectOption(t,e,i,a,n)});if(isObjectLadiPage(d)){var l=o.getProductVariantId(r,d.product),s=o.findAncestor(r,"ladi-collection-item"),c=[],u=0;if(isEmptyLadiPage(s))for(var p=document.querySelectorAll('[data-variant="true"]'),m=0;m<p.length;m++){var g=o.findAncestor(p[m],"ladi-form");if(!isEmptyLadiPage(g)&&(g=o.findAncestor(g,"ladi-element"),isEmptyLadiPage(o.findAncestor(g,"ladi-collection")))){var _=o.runtime.eventData[g.id];isEmptyLadiPage(_)||_["option.product_type"]!=e["option.product_type"]||_["option.product_id"]!=e["option.product_id"]||c.push(p[m])}}else c=s.querySelectorAll('[data-variant="true"]');var y=[];for(u=0;u<c.length;u++){if(a){var f=o.findAncestor(c[u],"ladi-popup");if(isEmptyLadiPage(f))continue;if("POPUP_PRODUCT"!=(f=o.findAncestor(f,"ladi-element")).id&&"POPUP_BLOG"!=f.id)continue}y.push(c[u])}var v=r.getAttribute("data-product-option-id"),P=null,L=null,h=null;if(isArrayLadiPage(d.product.variants)&&0!=d.product.variants.length){if(isStringLadiPage(d.product.variants[0].option_ids)){for(h=d.product.variants[0].option_ids.split("/"),u=0;u<h.length;u++)if(h[u]==v){L=u;break}if(!isEmptyLadiPage(L)){P={};var E=r.value;r.classList.contains("ladi-form-label-container")&&(E=o.runtime.tmp.getLabelValue(r)),d.product.variants.forEach(function(t){if(isEmptyLadiPage(E)||E==t["option"+(L+1)])for(u=0;u<h.length;u++)isArrayLadiPage(P[h[u]])||(P[h[u]]=[]),u!=L&&P[h[u]].push(t["option"+(u+1)])})}}for(var A=P,b=[],T=[],w=null,S=0;S<y.length;S++){var O=o.runtime.eventData[y[S].id];if(!isEmptyLadiPage(O)){P=o.copy(A);var C=0,I=0,N=0,k=0,D=null,x=null,R=null,B=null;if(O["option.product_variant_type"]==o.const.PRODUCT_VARIANT_TYPE.combobox){if(w=y[S].querySelectorAll("select[data-product-option-id]"),isObjectLadiPage(P)){for(C=0;C<w.length;C++)if((D=w[C].getAttribute("data-product-option-id"))!=v)for(isArrayLadiPage(P[D])&&-1!=P[D].indexOf(w[C].value)||(w[C].value=""),x=w[C].getElementsByTagName("option"),I=0;I<x.length;I++)isEmptyLadiPage(x[I].getAttribute("value"))||x[I].removeAttribute("disabled");for(C=0;C<w.length;C++){for(D=w[C].getAttribute("data-product-option-id"),P={},N=0;N<d.product.variants.length;N++)if(B=d.product.variants[N],h=B.option_ids.split("/"),-1!=(L=h.indexOf(D))&&(isEmptyLadiPage(w[C].value)||w[C].value==B["option"+(L+1)]))for(u=0;u<h.length;u++)isArrayLadiPage(P[h[u]])||(P[h[u]]=[]),u!=L&&P[h[u]].push(B["option"+(u+1)]);for(k=0;k<w.length;k++)if((R=w[k].getAttribute("data-product-option-id"))!=D)for(x=w[k].getElementsByTagName("option"),I=0;I<x.length;I++)isEmptyLadiPage(x[I].getAttribute("value"))||isArrayLadiPage(P[R])&&-1!=P[R].indexOf(x[I].getAttribute("value"))||x[I].setAttribute("disabled","")}}if(!isObjectLadiPage(P))for(C=0;C<w.length;C++)b.push(w[C])}if(O["option.product_variant_type"]==o.const.PRODUCT_VARIANT_TYPE.label){if(w=y[S].querySelectorAll(".ladi-form-label-container[data-product-option-id]"),isObjectLadiPage(P)){for(C=0;C<w.length;C++)if((D=w[C].getAttribute("data-product-option-id"))!=v){var F=o.runtime.tmp.getLabelValue(w[C]);for(isArrayLadiPage(P[D])&&-1!=P[D].indexOf(F)||o.runtime.tmp.updateLabelValue(w[C],null),x=w[C].getElementsByClassName("ladi-form-label-item"),I=0;I<x.length;I++)x[I].classList.contains("no-value")||x[I].classList.remove("disabled")}for(C=0;C<w.length;C++){for(D=w[C].getAttribute("data-product-option-id"),P={},N=0;N<d.product.variants.length;N++)if(B=d.product.variants[N],h=B.option_ids.split("/"),-1!=(L=h.indexOf(D))){var M=o.runtime.tmp.getLabelValue(w[C]);if(isEmptyLadiPage(M)||M==B["option"+(L+1)])for(u=0;u<h.length;u++)isArrayLadiPage(P[h[u]])||(P[h[u]]=[]),u!=L&&P[h[u]].push(B["option"+(u+1)])}for(k=0;k<w.length;k++)if((R=w[k].getAttribute("data-product-option-id"))!=D)for(x=w[k].getElementsByClassName("ladi-form-label-item"),I=0;I<x.length;I++)if(!x[I].classList.contains("no-value")){var V=o.runtime.tmp.getOptionLabelValue(x[I]);isArrayLadiPage(P[R])&&-1!=P[R].indexOf(V)||x[I].classList.add("disabled")}}}if(!isObjectLadiPage(P))for(C=0;C<w.length;C++)T.push(w[C])}}}!isEmptyLadiPage(l)&&isFunctionLadiPage(n)&&n();for(var q=null;b.length>0;)q=b.shift(),o.fireEvent(q,"change");for(;T.length>0;)q=T.shift(),o.runtime.tmp.fireEventLabelChange(q);for(w=document.querySelectorAll(".ladi-form .ladi-form-label-container"),S=0;S<w.length;S++){var Y=o.runtime.tmp.getLabelValue(w[S]);if(!isEmptyLadiPage(Y))o.findAncestor(w[S],"ladi-element").getAttribute("data-title-type")==o.const.PRODUCT_VARIANT_TITLE.top&&(Y=": "+Y);var U=o.findAncestor(w[S],"ladi-form-item-box");isEmptyLadiPage(U)||(U=U.querySelector(".ladi-form-item-title-value"),isEmptyLadiPage(U)||(U.innerHTML=Y))}}}},LadiPageScriptV2.prototype.getProductVariantIndex=function(t,e){var i=this,a=-1,n=e["option.product_type"],o=e["option.ladisale_store_id"]||null,r=e["option.product_id"],d=i.generateVariantProduct(e,!1,null,null,null,null,!0,!0);if(!isObjectLadiPage(d)||!isObjectLadiPage(d.store_info)||!isObjectLadiPage(d.product)||!isArrayLadiPage(d.product.variants)||d.product.variants.length<=0)return a;this.runtime.isClient?Object.keys(this.runtime.eventData).forEach(function(e){if((isEmptyLadiPage(t)||t==e)&&-1==a){var l=i.runtime.eventData[e];if("form"==l.type&&l["option.is_add_to_cart"]&&l["option.product_type"]==n&&l["option.product_id"]==r&&l["option.ladisale_store_id"]==o){var s=document.getElementById(e);if(!isEmptyLadiPage(s)){var c=s.querySelector('[data-variant="true"]');if(!isEmptyLadiPage(c)){var u=i.runtime.eventData[c.id];if(!isEmptyLadiPage(u)){var p=null;if(u["option.product_variant_type"]==i.const.PRODUCT_VARIANT_TYPE.combobox&&(p=c.querySelectorAll(".ladi-form-item select[data-product-option-id]"),a=d.product.variants.findIndex(function(t){for(var e=!0,i=null,a=function(t){return t==i},n=0;n<p.length;n++)if(p[n].getAttribute("data-store-id")==d.store_info.id&&p[n].getAttribute("data-product-id")==t.product_id){i=p[n].getAttribute("data-product-option-id");var o=p[n].value;if(isStringLadiPage(t.option_ids)){var r=t.option_ids.split("/").findIndex(a);if(-1!=r&&t["option"+(r+1)]!=o){e=!1;break}}}return e})),u["option.product_variant_type"]==i.const.PRODUCT_VARIANT_TYPE.label&&(p=c.querySelectorAll(".ladi-form-label-container[data-product-option-id]"),a=d.product.variants.findIndex(function(t){for(var e=!0,a=null,n=function(t){return t==a},o=0;o<p.length;o++)if(p[o].getAttribute("data-store-id")==d.store_info.id&&p[o].getAttribute("data-product-id")==t.product_id){a=p[o].getAttribute("data-product-option-id");var r=i.runtime.tmp.getLabelValue(p[o]);if(isStringLadiPage(t.option_ids)){var l=t.option_ids.split("/").findIndex(n);if(-1!=l&&t["option"+(l+1)]!=r){e=!1;break}}}return e})),u["option.product_variant_type"]==i.const.PRODUCT_VARIANT_TYPE.combined){var m=c.querySelector(".ladi-form-control");if(isEmptyLadiPage(m)||m.getAttribute("data-store-id")!=d.store_info.id||m.getAttribute("data-product-id")!=d.product.product_id)return;a=m.value,a=isEmptyLadiPage(a)?-1:parseInt(a)}}}}}}}):a=0;return a},LadiPageScriptV2.prototype.getProductVariantId=function(t,e){var i=null,a=this.findAncestor(t,"ladi-element");if(!isEmptyLadiPage(a)){var n=this.runtime.eventData[a.id];if(!isEmptyLadiPage(n)&&n["option.product_variant_type"]==this.const.PRODUCT_VARIANT_TYPE.combined){var o=a.querySelector("select.ladi-form-control");if(!isEmptyLadiPage(o)&&!isEmptyLadiPage(o.value)){var r=o.querySelector('option[value="'+o.value+'"]');isEmptyLadiPage(r)||(i=r.getAttribute("data-product-variant-id"))}}var d=null,l=null;if(!isEmptyLadiPage(n)&&(n["option.product_variant_type"]==this.const.PRODUCT_VARIANT_TYPE.combobox||n["option.product_variant_type"]==this.const.PRODUCT_VARIANT_TYPE.label)){l={},d=a.querySelectorAll(".ladi-form-item select[data-product-option-id]");for(var s=0;s<d.length;s++)l[d[s].getAttribute("data-product-option-id")]=(isEmptyLadiPage(d[s].value)?"":d[s].value).trim();for(d=a.querySelectorAll(".ladi-form-label-container[data-product-option-id]"),s=0;s<d.length;s++)l[d[s].getAttribute("data-product-option-id")]=this.runtime.tmp.getLabelValue(d[s]).trim();isArrayLadiPage(e.variants)&&e.variants.forEach(function(t){if(isEmptyLadiPage(i)){var e=!0;if(isStringLadiPage(t.option_ids))for(var a=t.option_ids.split("/"),n=0;n<a.length;n++)if(l[a[n].trim()]!=(t["option"+(n+1)]||"").trim()){e=!1;break}e&&(i=t.product_variant_id)}})}}return i},LadiPageScriptV2.prototype.generateProductKey=function(t,e,i,a,n,o,r,d){var l=this;isEmptyLadiPage(r)||(a["option.product_id"]=r.product_id);var s=a["option.product_type"],c=a["option.product_mapping_name"],u=l.generateVariantProduct(a,!1,null,null,null,null,!0,!0,function(i){l.generateProductKey(t,e,!1,a,n,o,r,d)}),p=null;function m(t){return(t>=10?"":"0")+t}if(isObjectLadiPage(u)&&isObjectLadiPage(u.product)){var g=null,_=null;u.product.type==l.const.PRODUCT_TYPE.event&&"description"==c&&(c="content");var y=function(){if(-1!=[l.const.FORM_CONFIG_TYPE.ladisales,l.const.FORM_CONFIG_TYPE.sapo,l.const.FORM_CONFIG_TYPE.haravan,l.const.FORM_CONFIG_TYPE.shopify,l.const.FORM_CONFIG_TYPE.wordpress].indexOf(s)){var t=!1;if(-1!=["name","description","content","location","timezone","external_link"].indexOf(c)&&(g=u.product[c],e=g,t=!0),-1!=["start_date","end_date"].indexOf(c)){g=u.product[c];try{(_=new Date(g)).toISOString()==g&&(g=_.getFullYear()+"-"+m(_.getMonth()+1)+"-"+m(_.getDate())+" "+m(_.getHours())+":"+m(_.getMinutes())+":"+m(_.getSeconds()))}catch(t){}e=g,t=!0}if(-1!=["image"].indexOf(c)&&(g=u.product[c],isObjectLadiPage(g)&&(e=g.src,isEmptyLadiPage(e)||!isStringLadiPage(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||(e="https://"+l.const.STATIC_W_DOMAIN+"/"+e),t=!0)),-1!=["images"].indexOf(c)&&(g=u.product[c],isArrayLadiPage(g)&&(e=[],g.forEach(function(t){isEmptyLadiPage(t.src)||(!isStringLadiPage(t.src)||t.src.startsWith("http://")||t.src.startsWith("https://")||t.src.startsWith("//")?e.push({src:t.src}):e.push({src:"https://"+l.const.STATIC_W_DOMAIN+"/"+t.src}))}),t=!0)),t&&(t=!isEmptyLadiPage(e)),isArrayLadiPage(u.product.variants)&&u.product.variants.length>0){var r=n?0:l.getProductVariantIndex(null,a);isEmptyLadiPage(o)||(r=u.product.variants.findIndex(function(t){return t.product_variant_id==o}));var f=null;if(-1!=r&&(f=u.product.variants[r],p=f),!t)if(-1!=r)if(-1!=["variant_start_date","variant_end_date"].indexOf(c)){g=f[c];try{(_=new Date(g)).toISOString()==g&&(g=_.getFullYear()+"-"+m(_.getMonth()+1)+"-"+m(_.getDate())+" "+m(_.getHours())+":"+m(_.getMinutes())+":"+m(_.getSeconds()))}catch(t){}e=g}else if(-1!=["sku","variant_timezone"].indexOf(c))g=f[c],e=g;else if(-1!=["title"].indexOf(c))g=f[c]||f.product_name,e=g;else if(-1!=["text_quantity"].indexOf(c))g=1==f.inventory_checked?f[c]:"",e=g;else if(-1!=["weight"].indexOf(c))g=f[c],isEmptyLadiPage(f.weight_unit)||(g+=f.weight_unit),e=g;else if(-1!=["price","compare_price"].indexOf(c))isEmptyLadiPage(f[c])?g="":(g=l.formatNumber(f[c],3),isObjectLadiPage(u.store_info)&&isObjectLadiPage(u.store_info.currency)&&!isEmptyLadiPage(u.store_info.currency.symbol)&&(g=l.formatCurrency(f[c],u.store_info.currency.symbol,!0))),e=g;else if(-1!=["price_sale"].indexOf(c)){var v=0;isEmptyLadiPage(f.price)||isEmptyLadiPage(f.compare_price)||(v=f.compare_price-f.price),0!=v?(g=l.formatNumber(v,3),isObjectLadiPage(u.store_info)&&isObjectLadiPage(u.store_info.currency)&&!isEmptyLadiPage(u.store_info.currency.symbol)&&(g=l.formatCurrency(v,u.store_info.currency.symbol,!0))):g="",e=g}else if(-1!=["price_sale_percent"].indexOf(c)){var P=0;isEmptyLadiPage(f.price)||isEmptyLadiPage(f.compare_price)||(P=Math.floor((f.compare_price-f.price)/f.compare_price*100)),e=g=0!=P?P+"%":""}else if(-1!=["src"].indexOf(c)){if(g=f[c],isEmptyLadiPage(g))return c="image",y();!isStringLadiPage(g)||g.startsWith("http://")||g.startsWith("https://")||g.startsWith("//")||(g="https://"+l.const.STATIC_W_DOMAIN+"/"+g),e=g}else["description"].indexOf(c),g=f[c],isEmptyLadiPage(g)||(e=g);else e=g=""}}else{if(g=u.product[c],isBooleanLadiPage(g))g=g?l.const.LANG.OPTION_TRUE:l.const.LANG.OPTION_FALSE;else try{(_=new Date(g)).toISOString()==g&&(g=_.getFullYear()+"-"+m(_.getMonth()+1)+"-"+m(_.getDate())+" "+m(_.getHours())+":"+m(_.getMinutes())+":"+m(_.getSeconds()))}catch(t){}e=g}!i&&isFunctionLadiPage(d)&&d(e)};y()}return t?{product:u,variant:p,value:e}:e},LadiPageScriptV2.prototype.generateVariantProduct=function(t,e,i,a,n,o,r,d,l){var s=e?"":null,c=this,u=function(t){if(!e)return isObjectLadiPage(t)?t:null;var d="";if(isObjectLadiPage(t)){if(!isObjectLadiPage(t.product))return d;i==c.const.PRODUCT_VARIANT_TYPE.combined&&(d+='<div class="ladi-form-item-container"><div class="ladi-form-item-background"></div><div class="ladi-form-item"><select'+(isObjectLadiPage(t.store_info)&&!isNullLadiPage(t.store_info.id)?' data-store-id="'+t.store_info.id+'"':"")+' data-product-id="'+t.product.product_id+'" required tabindex="'+o+'" class="ladi-form-control ladi-form-control-select" data-selected=""'+(r?"":' onmousedown="javascript: event.preventDefault();"')+">",c.runtime.isClient&&(d+='<option value="" data-product-variant-id="">'+c.const.LANG.OPTION_NO_SELECT+"</option>"),isArrayLadiPage(t.product.variants)&&t.product.variants.forEach(function(e,i){var a=e.title||e.product_name;if(n){var o=c.formatNumber(e.price,3);isObjectLadiPage(t.store_info)&&isObjectLadiPage(t.store_info.currency)&&!isEmptyLadiPage(t.store_info.currency.symbol)&&(o=c.formatCurrency(e.price,t.store_info.currency.symbol,!0)),a+=" - "+o}d+='<option value="'+i+'" data-product-variant-id="'+e.product_variant_id+'">'+a+"</option>"}),d+="</select></div></div>"),i==c.const.PRODUCT_VARIANT_TYPE.combobox&&isArrayLadiPage(t.product.options)&&t.product.options.forEach(function(e){if(e.is_tmp)d+='<div class="ladi-form-item-box"></div>';else if(isArrayLadiPage(e.values)&&0!=e.values.length){d+='<div class="ladi-form-item-box">',isEmptyLadiPage(a)||(d+='<div class="ladi-form-item-title"><span>'+e.name+"</span></div>"),d+='<div class="ladi-form-item-container"><div class="ladi-form-item-background"></div><div class="ladi-form-item"><select'+(isObjectLadiPage(t.store_info)&&!isNullLadiPage(t.store_info.id)?' data-store-id="'+t.store_info.id+'"':"")+' data-product-id="'+e.product_id+'" data-product-option-id="'+e.product_option_id+'" required tabindex="'+o+'" class="ladi-form-control ladi-form-control-select" data-selected=""'+(r?"":' onmousedown="javascript: event.preventDefault();"')+">",c.runtime.isClient&&(d+='<option value="">'+c.const.LANG.OPTION_NO_SELECT+"</option>");var i=null;isArrayLadiPage(t.product.variants)&&(i=t.product.variants[0]);var n=null;isEmptyLadiPage(i)||isStringLadiPage(i.option_ids)&&(n=i.option_ids.split("/"));e.values.forEach(function(t){var a=function(t){var a="";return isArrayLadiPage(n)&&n.forEach(function(n,o){e.product_option_id==n&&t==i["option"+(o+1)]&&(a=" selected")}),a}(t.name);d+="<option"+a+' value="'+t.name+'">'+(t.name_new||t.name)+"</option>"}),d+="</select></div></div></div>"}}),i==c.const.PRODUCT_VARIANT_TYPE.label&&isArrayLadiPage(t.product.options)&&t.product.options.forEach(function(e){if(isArrayLadiPage(e.values)&&0!=e.values.length){d+='<div class="ladi-form-item-box">',isEmptyLadiPage(a)||(d+='<div class="ladi-form-item-title">',d+="<span>"+e.name+"</span>",d+='<span class="ladi-form-item-title-value">'+(r?"":e.values[0].name)+"</span>",d+="</div>"),d+='<div class="ladi-form-label-container"'+(isObjectLadiPage(t.store_info)&&!isNullLadiPage(t.store_info.id)?' data-store-id="'+t.store_info.id+'"':"")+' data-product-id="'+e.product_id+'" data-product-option-id="'+e.product_option_id+'" data-selected="">';var i=null;isArrayLadiPage(t.product.variants)&&(i=t.product.variants[0]);var n=null;isEmptyLadiPage(i)||isStringLadiPage(i.option_ids)&&(n=i.option_ids.split("/"));e.values.forEach(function(t,a){0==a&&(t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.image?d+='<div class="ladi-form-label-item image no-value" data-value=""></div>':t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.color?d+='<div class="ladi-form-label-item color no-value" data-value=""></div>':d+='<div class="ladi-form-label-item text no-value" data-value="">&nbsp;</div>');var o=function(t){var a="";return isArrayLadiPage(n)&&n.forEach(function(n,o){e.product_option_id==n&&t==i["option"+(o+1)]&&(a=" selected")}),a}(t.name);if(t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.image){var r=t.value;isEmptyLadiPage(r)||!isStringLadiPage(r)||r.startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||(r="https://"+c.const.STATIC_W_DOMAIN+"/"+r),r=c.getOptimizeImage(r,100,100,!1,!1,!1,!0),d+='<div class="ladi-form-label-item image'+o+'" style=\'background-image: url("'+r+'");\' title="'+(t.name_new||t.name)+'" data-value="'+t.name+'"></div>'}else t.type==c.const.PRODUCT_VARIANT_OPTION_TYPE.color?d+='<div class="ladi-form-label-item color'+o+"\" style='background-color: "+t.value+";' title=\""+(t.name_new||t.name)+'" data-value="'+t.name+'"></div>':d+='<div class="ladi-form-label-item text'+o+'" data-value="'+t.name+'">'+(t.name_new||t.name)+"</div>"}),d+="</div></div>"}})}return d};if(!isNullLadiPage(t.dataProduct))return u(t.dataProduct);var p=t["option.form_account_id"],m=t["option.product_type"],g=t["option.ladisale_store_id"]||null,_=t["option.product_id"],y=t["option.data_setting.value"],f=t["option.data_setting.type_dataset"],v=t["option.data_setting.sort_name"],P=t["option.data_setting.sort_by"],L=null,h=null;if(-1!=[c.const.FORM_CONFIG_TYPE.ladisales,c.const.FORM_CONFIG_TYPE.sapo,c.const.FORM_CONFIG_TYPE.haravan,c.const.FORM_CONFIG_TYPE.shopify,c.const.FORM_CONFIG_TYPE.wordpress].indexOf(m)){if(!isEmptyLadiPage(_)){if(isEmptyLadiPage(c.runtime.tmp.product_info[m])&&(c.runtime.tmp.product_info[m]={}),isEmptyLadiPage(c.runtime.tmp.timeout_product_info[m])&&(c.runtime.tmp.timeout_product_info[m]={}),_=parseInt(_)||_,L=c.runtime.tmp.product_info[m][_],h=function(){return u(L)},isNullLadiPage(L)){c.runtime.tmp.product_info[m][_]=!0;var E=function(){c.runtime.tmp.product_info[m][_]=!1,isEmptyLadiPage(c.runtime.tmp.timeout_product_info[m][_])||(c.removeTimeout(c.runtime.tmp.timeout_product_info[m][_]),delete c.runtime.tmp.timeout_product_info[m][_])},A=function(t){if(L=isObjectLadiPage(c.runtime.tmp.product_info[m][_])?c.runtime.tmp.product_info[m][_]:t.data,isObjectLadiPage(L)){if(!isObjectLadiPage(L.store_info)){var e=c.runtime.currency;c.runtime.isClient||(e=window.$rootScope.getStoreCurrency()),L.store_info={currency:{code:e,symbol:c.formatCurrency(null,e,!1,!0)}}}if(m!=c.const.FORM_CONFIG_TYPE.ladisales&&(L.store_info.id=-1),isObjectLadiPage(L.store_info.currency)&&!isEmptyLadiPage(L.store_info.currency.code)&&(L.store_info.currency.symbol=c.formatCurrency(null,L.store_info.currency.code,!1,!0)),isObjectLadiPage(L.product)&&isArrayLadiPage(L.product.options)&&isArrayLadiPage(L.product.variants)){var i=L.product.options.map(function(t){return t.product_option_id});i=i.join("/");for(var a=0;a<L.product.variants.length;a++)-1!=[c.const.FORM_CONFIG_TYPE.ladisales].indexOf(m)&&1==L.product.variants[a].allow_sold_out&&(L.product.variants[a].inventory_checked=0),isNullLadiPage(L.product.variants[a].compare_price)&&(L.product.variants[a].compare_price=L.product.variants[a].price_compare),isNullLadiPage(L.product.variants[a].variant_start_date)&&(L.product.variants[a].variant_start_date=L.product.variants[a].start_date),isNullLadiPage(L.product.variants[a].variant_end_date)&&(L.product.variants[a].variant_end_date=L.product.variants[a].end_date),isNullLadiPage(L.product.variants[a].variant_timezone)&&(L.product.variants[a].variant_timezone=L.product.variants[a].timezone),isEmptyLadiPage(L.product.variants[a].option_ids)&&(L.product.variants[a].option_ids=i),-1!=[c.const.FORM_CONFIG_TYPE.sapo,c.const.FORM_CONFIG_TYPE.haravan,c.const.FORM_CONFIG_TYPE.shopify].indexOf(m)&&1==L.product.variants.length&&"Default Title"==L.product.variants[a].title&&(L.product.variants[a].title=null,L.product.variants[a].option1=null,L.product.options=[]),-1!=[c.const.FORM_CONFIG_TYPE.wordpress].indexOf(m)&&1==L.product.variants.length&&L.product.variants[a].title==L.product.variants[a].product_name&&(L.product.variants[a].title=null,L.product.variants[a].option1=null,L.product.options=[]),isEmptyLadiPage(L.product.variants[a].package_quantity)||isEmptyLadiPage(L.product.variants[a].package_quantity_unit)||(isNullLadiPage(L.product.variants[a].title_old)&&(L.product.variants[a].title_old=L.product.variants[a].title),L.product.variants[a].title=L.product.variants[a].title_old+" ("+L.product.variants[a].package_quantity+" "+L.product.variants[a].package_quantity_unit+")");if(isArrayLadiPage(L.product.options)&&1==L.product.options.length&&isArrayLadiPage(L.product.options[0].values))for(var n=null,o=function(t){return t.option1==n},r=0;r<L.product.options[0].values.length;r++){n=L.product.options[0].values[r].name;var d=L.product.variants.find(o);L.product.options[0].values[r].name_new=L.product.options[0].values[r].label||L.product.options[0].values[r].name,isEmptyLadiPage(d)||isEmptyLadiPage(d.package_quantity)||isEmptyLadiPage(d.package_quantity_unit)||(L.product.options[0].values[r].name_new=L.product.options[0].values[r].name_new+" ("+d.package_quantity+" "+d.package_quantity_unit+")")}}c.runtime.tmp.product_info[m][_]=L,s=h(),isFunctionLadiPage(l)&&l(s)}else E()},b={product_id:_},T=null,w="POST";return c.runLimitRequest(20,function(){if(c.runtime.isClient){var t=c.const.API_LADISALE_SHOW_PRODUCT;m==c.const.FORM_CONFIG_TYPE.ladisales?((T={"Content-Type":"application/json"})["Store-Id"]=g,b=JSON.stringify(b)):m==c.const.FORM_CONFIG_TYPE.wordpress?(w="GET",t=window.location.origin+"/ladipage/api?action=product_info&product_id="+_,b=null):(T={"Content-Type":"application/json"},t=c.const.API_SHOW_PRODUCT,b={form_account_id:p,product_id:_},b=JSON.stringify(b)),c.sendRequest(w,t,b,!0,T,function(t,e,i){if(i.readyState==XMLHttpRequest.DONE)try{var a=JSON.parse(t);A(a)}catch(t){E()}})}else{var e=function(t){isNullLadiPage(t)||A({data:t})},i=LadiPage.getProductInfo(p,_,function(t){e(t)});e(i)}}),s}!0===L?c.runtime.tmp.timeout_product_info[m][_]=c.runTimeout(function(){c.generateVariantProduct(t,e,i,a,n,o,r,!1,l)},100):(s=h(),!d&&isFunctionLadiPage(l)&&l(s))}}else if(!isEmptyLadiPage(_)){if(isEmptyLadiPage(c.runtime.tmp.product_info[m])&&(c.runtime.tmp.product_info[m]={}),isEmptyLadiPage(c.runtime.tmp.timeout_product_info[m])&&(c.runtime.tmp.timeout_product_info[m]={}),_=String(_),L=c.runtime.tmp.product_info[m][_],h=function(){return e?"":isObjectLadiPage(L)?L:null},isNullLadiPage(L))return c.runtime.tmp.product_info[m][_]=!0,c.loadDataset(y,y,f,v,P,!0,c.runtime.isClient,function(t){s=h(),isFunctionLadiPage(l)&&l(s)}),s;!0===L?c.runtime.tmp.timeout_product_info[m][_]=c.runTimeout(function(){c.generateVariantProduct(t,e,i,a,n,o,r,!1,l)},100):(s=h(),!d&&isFunctionLadiPage(l)&&l(s))}return s},LadiPageScriptV2.prototype.generateVariantContentString=function(t,e,i,a){var n=[];i=isEmptyLadiPage(i)?" | ":i;try{isEmptyLadiPage(t)||(e&&(t=Base64.decode(t)),t=JSON.parse(t),isArrayLadiPage(t.dynamic_content.hide)&&t.dynamic_content.hide.length>0&&n.push(this.const.LANG.HIDE_ELEMENT+" "+t.dynamic_content.hide.join(", ")),isArrayLadiPage(t.dynamic_content.show)&&t.dynamic_content.show.length>0&&n.push(this.const.LANG.SHOW_ELEMENT+" "+t.dynamic_content.show.join(", ")),isArrayLadiPage(t.dynamic_content.top)&&t.dynamic_content.top.length>0&&n.push(this.const.LANG.TOP_ELEMENT+" "+t.dynamic_content.top.join(", ")),isArrayLadiPage(t.dynamic_content.scroll)&&t.dynamic_content.scroll.length>0&&n.push(this.const.LANG.SCROLL_ELEMENT+" "+t.dynamic_content.scroll.join(", ")),isArrayLadiPage(t.dynamic_content.cookie)&&t.dynamic_content.cookie.length>0&&n.push(this.const.LANG.SET_COOKIE+" "+t.dynamic_content.cookie.join("; ")))}catch(t){}return a?n:n.join(i)},LadiPageScriptV2.prototype.loadCollectionData=function(t,e,i,a,n){var o=this,r=e["option.product_type"],d=e["option.ladisale_store_id"],l=e["option.product_tag_id"],s=e["option.collection_setting.type"],c=o.runtime.eventData[t];if(!isEmptyLadiPage(c)&&"collection"==c.type){var u=this.runtime.isDesktop?this.const.DESKTOP:this.const.MOBILE,p=parseFloatLadiPage(c[u+".option.collection_setting.row"])||0,m=parseFloatLadiPage(c[u+".option.collection_setting.column"])||0,g=parseFloatLadiPage(c[u+".option.collection_setting.margin"])||0,_=function(t,e,i,a,n,r){if(i=o.copy(i),Object.keys(a).forEach(function(t){i[t]=a[t]}),a["option.input_type"]==o.const.INPUT_TYPE.product_variant){var d=o.generateVariantProduct(i,!0,a["option.product_variant_type"],a["option.product_variant_title"],a["option.product_variant_price"],a["option.input_tabindex"],o.runtime.isClient,!0,function(o){_(t,e,i,a,n,r)}),l=function(e){o.updateProductVariantSelectOption(e,i,a,!1,function(){var i=o.getProductVariantId(e.target,n),a=n.variants.findIndex(function(t){return t.product_variant_id==i}),d=o.findAncestor(e.target,"ladi-element");if(!isEmptyLadiPage(d)){var l=o.findAncestor(d,"ladi-collection-item");if(!isEmptyLadiPage(l))for(var s=l.querySelectorAll('[data-variant="true"]'),c=0;c<s.length;c++)if(s[c].id!=d.id){var u=o.runtime.eventData[s[c].id],p=null,m=null,g=null,_=0;if(u["option.product_variant_type"]==o.const.PRODUCT_VARIANT_TYPE.combobox&&(m=n.variants[a],isObjectLadiPage(m)&&isStringLadiPage(m.option_ids)))for(g=m.option_ids.split("/"),_=0;_<g.length;_++)p=s[c].querySelector('select[data-product-option-id="'+g[_]+'"]'),isEmptyLadiPage(p)||(p.value=m["option"+(_+1)]);if(u["option.product_variant_type"]==o.const.PRODUCT_VARIANT_TYPE.label&&(m=n.variants[a],isObjectLadiPage(m)&&isStringLadiPage(m.option_ids)))for(g=m.option_ids.split("/"),_=0;_<g.length;_++)p=s[c].querySelector('.ladi-form-label-container[data-product-option-id="'+g[_]+'"]'),isEmptyLadiPage(p)||o.runtime.tmp.updateLabelValue(p,m["option"+(_+1)]);if(u["option.product_variant_type"]==o.const.PRODUCT_VARIANT_TYPE.combined){if(p=s[c].querySelector("select.ladi-form-control"),!isEmptyLadiPage(i)){var y=p.querySelector('option[data-product-variant-id="'+i+'"]');isEmptyLadiPage(y)||(a=y.getAttribute("value"))}p.value=(-1==a?"":a)+""}}}r(t,n,!1,i,!0,!0)})},s=o.runtime.tmp.getOptionLabelValue,c=o.runtime.tmp.updateLabelValue,u=o.runtime.tmp.getLabelValue,p=function(t){o.runtime.tmp.clickLabelProductChangeCallback(t,function(t){l({target:t})})};o.showParentVisibility(e,function(){for(var t=e.clientHeight,n=t,r=e.querySelectorAll("select.ladi-form-control"),m={},g=0;g<r.length;g++)m[r[g].getAttribute("data-store-id")+"_"+r[g].getAttribute("data-product-id")+"_"+r[g].getAttribute("data-product-option-id")]=r[g].value;var _=e.querySelectorAll(".ladi-form-label-container");for(g=0;g<_.length;g++)m[_[g].getAttribute("data-store-id")+"_"+_[g].getAttribute("data-product-id")+"_"+_[g].getAttribute("data-product-option-id")]=u(_[g]);e.innerHTML=d;for(var y=e.querySelectorAll("select.ladi-form-control"),f=null,v=null,P=0;P<y.length;P++)y[P].removeEventListener("change",l),y[P].addEventListener("change",l),f=m[y[P].getAttribute("data-store-id")+"_"+y[P].getAttribute("data-product-id")+"_"+y[P].getAttribute("data-product-option-id")],isNullLadiPage(f)&&(v=y[P].querySelector("option"),isEmptyLadiPage(v)||(f=v.getAttribute("value"))),y[P].value=f;var L=e.querySelectorAll(".ladi-form-label-container");for(P=0;P<L.length;P++){for(var h=L[P].querySelectorAll(".ladi-form-label-item"),E=0;E<h.length;E++)o.tapEventListener(h[E],p);f=m[L[P].getAttribute("data-store-id")+"_"+L[P].getAttribute("data-product-id")+"_"+L[P].getAttribute("data-product-option-id")],isNullLadiPage(f)&&(v=h[1],isEmptyLadiPage(v)||(f=s(v))),c(L[P],f)}if(o.updateProductVariantSelectOptionFirst(i,a,e),a["option.product_variant_type"]!=o.const.PRODUCT_VARIANT_TYPE.combined&&(e.style.setProperty("height","auto"),n=e.clientHeight,e.style.removeProperty("height"),n>0&&t!=n)){e.style.setProperty("height",n+"px");var A=o.findAncestor(e,"ladi-form");isEmptyLadiPage(A)||(A=o.findAncestor(A,"ladi-element"),o.updateHeightElement(!0,e,A,t,n))}})}if(a["option.input_type"]==o.const.INPUT_TYPE.number){var m=e.querySelector('input[name="quantity"]'),g=function(t){if(!isEmptyLadiPage(t.target.value)){var e=o.generateVariantProduct(i,!1,null,null,null,null,!0,!0,function(){g(t)});if(!(isEmptyLadiPage(e)||isEmptyLadiPage(e.store_info)||isEmptyLadiPage(e.product))){var a=t.target;a=(a=o.findAncestor(a,"ladi-form")).querySelector('[data-variant="true"]');var n=o.getProductVariantId(a,e.product),r=e.product.variants.findIndex(function(t){return t.product_variant_id==n});if(-1!=r){var d=e.product.variants[r].quantity,l=e.product.variants[r].quantity_stock;d=isNullLadiPage(l)?d:l;var s=parseInt(t.target.value)||0,c=1;c=e.product.variants[r].min_buy||c;var u=e.product.variants[r].max_buy,p=0,m=o.runtime.tmp.cart.findIndex(function(t){return t.product_id==e.product.variants[r].product_id&&t.product_variant_id==e.product.variants[r].product_variant_id});-1!=m&&(p=o.runtime.tmp.cart[m].quantity),c>s+p&&(s=c-p),1==e.product.variants[r].inventory_checked&&s+p>d&&(s=d-p),!isEmptyLadiPage(u)&&s+p>u&&(s=u-p),s=s<1?1:s,t.target.setAttribute("min",c),isEmptyLadiPage(u)||t.target.setAttribute("max",u),t.target.value=s}}}};m.addEventListener("input",g),o.fireEvent(m,"input");var y=e.querySelectorAll(".button")[0],f=e.querySelectorAll(".button")[1];if(isEmptyLadiPage(y)||isEmptyLadiPage(f))return;y.addEventListener("click",function(t){m.value=(parseFloatLadiPage(m.value)||0)-1,o.fireEvent(m,"input")}),f.addEventListener("click",function(t){m.value=(parseFloatLadiPage(m.value)||0)+1,o.fireEvent(m,"input")})}if("button"==a.type&&(a["option.is_buy_now"]||a["option.is_add_to_cart"])){var v=function(){var t=i["option.data_event"];if(!isArrayLadiPage(t)&&(t=[],isObjectLadiPage(i["option.data_action"]))){var a=o.copy(i["option.data_action"]);a.action_type=o.const.ACTION_TYPE.action,t.push(a)}t.forEach(function(t){t.action_type==o.const.ACTION_TYPE.action&&(t.type==o.const.DATA_ACTION_TYPE.popup_cart&&(window.ladi("POPUP_CART").show(),o.runEventTracking(e.id,{is_form:!1})),t.type==o.const.DATA_ACTION_TYPE.popup_checkout&&(o.runtime.shopping_third_party?o.getThirdPartyCheckoutUrl(!0):window.ladi("POPUP_CHECKOUT").show(),o.runEventTracking(e.id,{is_form:!1})))})};e.setAttribute("data-click",!1),e.addEventListener("click",function(t){o.runtime.tmp.buttonAddToCartClick(t,!0,i,v)})}},y=function(t,e,i,a,n,r){var d=!isEmptyLadiPage(e["option.product_mapping_name"]),l=JSON.stringify(e),s=null,c=null;if(d)if(a&&isEmptyLadiPage(i))s="";else if(!isEmptyLadiPage(e["option.product_id"])&&l===(s=(c=o.generateProductKey(!0,l,!0,e,!0,i,null,function(o){y(t,e,i,a,n,r)})).value))return;var u=e.type,p=null,m=null;if(d&&"headline"==u&&(m=t.getElementsByClassName("ladi-headline")[0],isEmptyLadiPage(m)||(m.innerHTML=isNullLadiPage(s)?"":s)),d&&"paragraph"==u&&(m=t.getElementsByClassName("ladi-paragraph")[0],isEmptyLadiPage(m)||(m.innerHTML=isNullLadiPage(s)?"":s)),d&&"image"==u){p=o.getOptimizeImage(s,t.clientWidth,t.clientHeight,!0,!1,!1,!0);var g=t.getElementsByClassName("ladi-image-background")[0];isEmptyLadiPage(g)||(isEmptyLadiPage(p)?g.style.setProperty("background-image","none"):g.style.setProperty("background-image",'url("'+p+'")'))}if("gallery"==u){if(d&&!isArrayLadiPage(s))return;if(r&&!n&&"true"==t.getAttribute("data-collection"))return void o.runtime.tmp.updateImageGalleryProduct(t,c,e);t.setAttribute("data-collection",!0),t.removeAttribute("data-stop"),t.removeAttribute("data-loaded"),t.removeAttribute("data-scrolled"),t.removeAttribute("data-current"),t.removeAttribute("data-is-next"),t.removeAttribute("data-runtime-id"),t.removeAttribute("data-next-time");var _=t.querySelector(".ladi-gallery-view-item.selected");isEmptyLadiPage(_)||_.classList.remove("selected");var f=t.querySelector(".ladi-gallery-control-item.selected");isEmptyLadiPage(f)||f.classList.remove("selected");var v=t.getElementsByClassName("ladi-gallery-view")[0];f=t.getElementsByClassName("ladi-gallery-control-item")[0],_=t.getElementsByClassName("ladi-gallery-view-item")[0],isEmptyLadiPage(_)||_.classList.add("selected"),isEmptyLadiPage(f)||f.classList.add("selected");var P=t.getElementsByClassName("ladi-gallery-control-box")[0];if(isEmptyLadiPage(P)||P.style.removeProperty("left"),d){for(var L=t.getElementsByClassName("ladi-gallery-view-item");L.length<s.length;){var h=o.createTmpElement("div",'<div class="ladi-gallery-view-item" data-index="'+L.length+'"></div>',null,!0);t.getElementsByClassName("ladi-gallery-view")[0].appendChild(h)}for(;L.length>s.length;)L[L.length-1].parentElement.removeChild(L[L.length-1]);for(var E=t.getElementsByClassName("ladi-gallery-control-item"),A=function(e){o.runtime.tmp.eventClickGalleryControlItem(e,t)};E.length<s.length;){var b=o.createTmpElement("div",'<div class="ladi-gallery-control-item" data-index="'+E.length+'"></div>',null,!0);b.addEventListener("click",A),t.getElementsByClassName("ladi-gallery-control-box")[0].appendChild(b)}for(;E.length>s.length;)E[E.length-1].parentElement.removeChild(E[E.length-1]);for(var T=t.querySelectorAll(".ladi-gallery .ladi-gallery-view .ladi-gallery-view-arrow"),w=0;w<T.length;w++)s.length<=1?T[w].style.setProperty("display","none"):T[w].style.removeProperty("display");for(T=t.querySelectorAll(".ladi-gallery > .ladi-gallery-control"),w=0;w<T.length;w++)s.length<=1?T[w].style.setProperty("display","none"):T[w].style.removeProperty("display");for(T=t.querySelectorAll(".ladi-gallery > .ladi-gallery-view"),w=0;w<T.length;w++)s.length<=1?T[w].style.setProperty("height","100%"):T[w].style.removeProperty("height");s.forEach(function(e,i){p=e.src,isEmptyLadiPage(v)||(p=o.getOptimizeImage(e.src,v.clientWidth,v.clientHeight,!0,!1,!1,o.runtime.isClient));var a=t.querySelector('.ladi-gallery .ladi-gallery-view-item[data-index="'+i+'"]');isEmptyLadiPage(a)||a.style.setProperty("background-image",'url("'+p+'")'),isEmptyLadiPage(f)||(p=o.getOptimizeImage(e.src,f.clientWidth,f.clientHeight,!0,!1,!1,o.runtime.isClient)),a=t.querySelector('.ladi-gallery .ladi-gallery-control-item[data-index="'+i+'"]'),isEmptyLadiPage(a)||a.style.setProperty("background-image",'url("'+p+'")')}),o.runTimeout(function(){t.setAttribute("data-loaded",!0)},300)}o.runtime.tmp.runGallery(t.id,t,!0,u),o.runtime.tmp.setGalleryStart(t.id,t)}"countdown_item"==u&&o.runtime.tmp.runOptionCountdownItem(t.id,t,u,e["option.countdown_item_type"]),"countdown"==u&&o.runtime.tmp.runOptionCountdown(t.id,t,u,e["option.countdown_type"],e["option.countdown_minute"],e["option.countdown_daily_start"],e["option.countdown_daily_end"],e["option.countdown_endtime"])},f=function(t,e){var c=p*m,u=o.getListProductByTagId(e,c,i,!0,function(){f(t,e)});if(isObjectLadiPage(u)&&isArrayLadiPage(u.products)){var v=document.getElementById(t);if(isEmptyLadiPage(v))return;if(v.getAttribute("data-page")==i)return;var P=i,L=!1,h=!1;if(!isEmptyLadiPage(u.total_record)&&i*c>=u.total_record){if(s==o.const.COLLECTION_TYPE.readmore){var E=v.getElementsByClassName("ladi-collection-button-next")[0];isEmptyLadiPage(E)||E.setAttribute("data-opacity","0")}v.setAttribute("data-max-page",P),L=!0,i*c>u.total_record&&(h=!0)}v.setAttribute("data-page",i>P?P:i);var A=v.getElementsByClassName("ladi-collection-arrow-left")[0],b=v.getElementsByClassName("ladi-collection-arrow-right")[0],T=v.getElementsByClassName("ladi-collection-button-next")[0];if(isEmptyLadiPage(A)||A.classList.remove("opacity-0"),isEmptyLadiPage(b)||b.classList.remove("opacity-0"),isEmptyLadiPage(T)||T.classList.remove("opacity-0"),1==v.getAttribute("data-page")&&s==o.const.COLLECTION_TYPE.carousel&&(isEmptyLadiPage(A)||A.classList.add("opacity-0")),v.getAttribute("data-page")==v.getAttribute("data-max-page")&&(s==o.const.COLLECTION_TYPE.readmore&&(isEmptyLadiPage(T)||T.classList.add("opacity-0")),s==o.const.COLLECTION_TYPE.carousel&&(isEmptyLadiPage(b)||b.classList.add("opacity-0"))),P<i)return;var w=v.getElementsByClassName("ladi-collection-item");if(0==w.length)return;var S=0,O=0;if(v.hasAttribute("data-max-option-length"))S=parseFloatLadiPage(v.getAttribute("data-max-option-length"));else{var C=v.querySelectorAll('.ladi-form [data-variant="true"]');for(O=0;O<C.length;O++){var I=C[O].getElementsByClassName("ladi-form-item-box");I.length>S&&(S=I.length)}}var N=v.getElementsByClassName("ladi-collection-content")[0],k={className:w[0].className,innerHTML:w[0].innerHTML};a&&w[0].parentElement.removeChild(w[0]);for(var D=N.getElementsByClassName("ladi-collection-page");D.length<i;){var x=document.createElement("div");x.className="ladi-collection-page",N.appendChild(x)}var R=D[i-1],B=R.getElementsByClassName("ladi-collection-item");if(B.length!=u.products.length)for(;B.length>0;)B[0].parentElement.removeChild(B[0]);var F=function(t,i,a,n,s,c){isEmptyLadiPage(i.id)&&!isEmptyLadiPage(i.product_id)&&(i.id=i.product_id);for(var u=function(t,e){if(t.classList.contains("ladi-animation-hidden")){var i=parseFloatLadiPage(e[o.runtime.device+".style.animation-delay"])||0;t.classList.add("ladi-animation"),o.runTimeout(function(){t.classList.remove("ladi-animation-hidden")},1e3*i)}},p=0;p<t.length;p++){a&&isFunctionLadiPage(o.runtime.tmp.runElementClickSelected)&&o.runtime.tmp.runElementClickSelected(t[p],!0);var m=o.copy(o.runtime.eventData[t[p].id]);isEmptyLadiPage(m)||(u(t[p],m),m["option.product_type"]=r,m["option.ladisale_store_id"]=d,m["option.product_tag_id"]=l,m["option.product_id"]=i.id,a&&(isFunctionLadiPage(o.runtime.tmp.runOptionAction)&&o.runtime.tmp.runOptionAction(t[p],t[p].id,m.type,m),isFunctionLadiPage(o.runtime.tmp.runOptionHover)&&o.runtime.tmp.runOptionHover(t[p],t[p].id,m.type,m["option.data_event"]||m["option.data_hover"]),_(t,t[p],e,m,i,F)),y(t[p],m,n,s,a,c))}};for(O=0;O<u.products.length;O++)isArrayLadiPage(u.products[O].options)&&u.products[O].options.length>S&&(S=u.products[O].options.length);for(v.setAttribute("data-max-option-length",S),O=0;O<u.products.length;O++)if(!(B.length>O)){var M=document.createElement("div");M.className=k.className,R.appendChild(M),M.innerHTML=k.innerHTML;for(var V=M.getElementsByClassName("ladi-element");isArrayLadiPage(u.products[O].options)&&u.products[O].options.length<S;)u.products[O].options.push({is_tmp:!0});F(V,u.products[O],!0,null,!1,!1)}L&&(R.classList.add("last"),h&&R.classList.add("not-full")),s==o.const.COLLECTION_TYPE.carousel&&function(t){var e=document.getElementById(t);if(!isEmptyLadiPage(e)&&e.hasAttribute("data-page")){var i="0",a=getComputedStyle(e).width,n=a,r=parseFloatLadiPage(e.getAttribute("data-page"))||1,d=e.getElementsByClassName("ladi-collection-content")[0].getElementsByClassName("ladi-collection-page"),l=d[d.length-1].getElementsByClassName("ladi-collection-item"),s=m-l.length,c="",u="";s>0?(n="calc("+a+" * "+d.length+" - ("+a+" / "+m+" * "+s+") + calc("+g+"px / "+m+" * "+l.length+"))",r>1&&(r!=d.length?i="calc(-"+a+" * "+(r-1)+")":(i="calc(-"+a+" * "+(r-1)+" + ("+a+" / "+m+" * "+s+"))",u="margin-left: calc(-"+g+"px / "+m+" * "+l.length+");")),c+="#"+t+" .ladi-collection .ladi-collection-content .ladi-collection-page.last.not-full .ladi-collection-item:first-child {",c+="margin-left: "+g+"px;",c+="}",c+="#"+t+" .ladi-collection-content .ladi-collection-page.last {",c+="width: calc("+getComputedStyle(e).width+" / "+m+" * "+l.length+" + calc("+g+"px / "+m+" * "+l.length+"));",c+="}"):(r>1&&(i="calc(-"+a+" * "+(r-1)+")"),n="calc("+a+" * "+d.length+")");var p="style_collection_"+t,_=document.getElementById(p);isEmptyLadiPage(_)||_.parentElement.removeChild(_);var y="#"+t+" .ladi-collection-content {";y+="width: "+n+";",y+="left: "+i+";",y+=u,y+="}",y+=c,o.createStyleElement(p,y)}}(t),n&&s==o.const.COLLECTION_TYPE.readmore&&function(t){var e=document.getElementById(t);if(!isEmptyLadiPage(e)){var i=e.getElementsByClassName("ladi-collection-content")[0];if(e.hasAttribute("data-max-page")){var a=i.querySelector(".ladi-collection-page.last"),n=a.getElementsByClassName("ladi-collection-item"),r=Math.ceil(n.length/m);if(p==r)a.style.removeProperty("height");else{var d=parseFloatLadiPage((parseFloatLadiPage(getComputedStyle(a).height)||0)*r/p)||0;d-=parseFloatLadiPage(g*(p-r)/p)||0,a.style.setProperty("height",d+"px")}}var l=parseFloatLadiPage(getComputedStyle(e).height)||0,s=i.scrollHeight;if(l!=s){e.style.setProperty("height",s+"px");var c=o.findAncestor(e.parentElement,"ladi-element");isEmptyLadiPage(c)&&(c=o.findAncestor(e.parentElement,"ladi-section")),o.updateHeightElement(!0,e,c,l,s)}}}(t),o.runEventScroll(),o.runResizeAll()}},v=c["option.product_tag_id"],P=c["option.data_setting.value"];!isArrayLadiPage(v)&&isEmptyLadiPage(P)||f(t,c)}},LadiPageScriptV2.prototype.getListProductByTagId=function(t,e,i,a,n){var o=this,r=t["option.form_account_id"],d=t["option.product_type"],l=t["option.ladisale_store_id"]||null,s=t["option.product_tag_id"],c=t["option.data_setting.value"],u=t["option.data_setting.type_dataset"],p=t["option.collection_setting.type"],m=t["option.data_setting.sort_name"],g=t["option.data_setting.sort_by"],_=null,y=null,f=null,v=null,P=null;if(isArrayLadiPage(s)&&s.length>0){if(isEmptyLadiPage(o.runtime.tmp.product_tag_info[d])&&(o.runtime.tmp.product_tag_info[d]={}),isEmptyLadiPage(o.runtime.tmp.timeout_product_tag_info[d])&&(o.runtime.tmp.timeout_product_tag_info[d]={}),s.sort(),f=JSON.stringify(s)+"_page_"+i+"_limit_"+e,v=o.runtime.tmp.product_tag_info[d][f],-1!=[o.const.FORM_CONFIG_TYPE.ladisales,o.const.FORM_CONFIG_TYPE.sapo,o.const.FORM_CONFIG_TYPE.haravan,o.const.FORM_CONFIG_TYPE.shopify,o.const.FORM_CONFIG_TYPE.wordpress].indexOf(d)){y=function(){var t=null;return isObjectLadiPage(v)&&isArrayLadiPage(v.products)&&(t={products:v.products,total_record:v.total_record},isEmptyLadiPage(o.runtime.tmp.product_info[d])&&(o.runtime.tmp.product_info[d]={}),t.products.forEach(function(t){o.runtime.tmp.product_info[d][t.product_id]={store_info:v.store_info,product:t}})),t};var L=null;if(isStringLadiPage(v)&&(L=v,v=null),isNullLadiPage(v)){o.runtime.tmp.product_tag_info[d][f]=!0;var h=function(){o.runtime.tmp.product_tag_info[d][f]=!1,isEmptyLadiPage(o.runtime.tmp.timeout_product_tag_info[d][f])||(o.removeTimeout(o.runtime.tmp.timeout_product_tag_info[d][f]),delete o.runtime.tmp.timeout_product_tag_info[d][f])},E=function(t){if(v=t.data,isObjectLadiPage(v)){if(!isObjectLadiPage(v.store_info)){var a=o.runtime.currency;o.runtime.isClient||(a=window.$rootScope.getStoreCurrency()),v.store_info={currency:{code:a,symbol:o.formatCurrency(null,a,!1,!0)}}}if(d!=o.const.FORM_CONFIG_TYPE.ladisales&&(v.store_info.id=-1),isObjectLadiPage(v.store_info.currency)&&!isEmptyLadiPage(v.store_info.currency.code)&&(v.store_info.currency.symbol=o.formatCurrency(null,v.store_info.currency.code,!1,!0)),isArrayLadiPage(v.products))for(var r=null,l=function(t){return t.option1==r},c=0;c<v.products.length;c++)if(isArrayLadiPage(v.products[c].options)&&isArrayLadiPage(v.products[c].variants)){var u=v.products[c].options.map(function(t){return t.product_option_id});u=u.join("/");for(var p=0;p<v.products[c].variants.length;p++)-1!=[o.const.FORM_CONFIG_TYPE.ladisales].indexOf(d)&&1==v.products[c].variants[p].allow_sold_out&&(v.products[c].variants[p].inventory_checked=0),isNullLadiPage(v.products[c].variants[p].compare_price)&&(v.products[c].variants[p].compare_price=v.products[c].variants[p].price_compare),isNullLadiPage(v.products[c].variants[p].variant_start_date)&&(v.products[c].variants[p].variant_start_date=v.products[c].variants[p].start_date),isNullLadiPage(v.products[c].variants[p].variant_end_date)&&(v.products[c].variants[p].variant_end_date=v.products[c].variants[p].end_date),isNullLadiPage(v.products[c].variants[p].variant_timezone)&&(v.products[c].variants[p].variant_timezone=v.products[c].variants[p].timezone),isEmptyLadiPage(v.products[c].variants[p].option_ids)&&(v.products[c].variants[p].option_ids=u),-1!=[o.const.FORM_CONFIG_TYPE.sapo,o.const.FORM_CONFIG_TYPE.haravan,o.const.FORM_CONFIG_TYPE.shopify].indexOf(d)&&1==v.products[c].variants.length&&"Default Title"==v.products[c].variants[p].title&&(v.products[c].variants[p].title=null,v.products[c].variants[p].option1=null,v.products[c].options=[]),-1!=[o.const.FORM_CONFIG_TYPE.wordpress].indexOf(d)&&1==v.products[c].variants.length&&v.products[c].variants[p].title==v.products[c].variants[p].product_name&&(v.products[c].variants[p].title=null,v.products[c].variants[p].option1=null,v.products[c].options=[]),isEmptyLadiPage(v.products[c].variants[p].package_quantity)||isEmptyLadiPage(v.products[c].variants[p].package_quantity_unit)||(isNullLadiPage(v.products[c].variants[p].title_old)&&(v.products[c].variants[p].title_old=v.products[c].variants[p].title),v.products[c].variants[p].title=v.products[c].variants[p].title_old+" ("+v.products[c].variants[p].package_quantity+" "+v.products[c].variants[p].package_quantity_unit+")");if(isArrayLadiPage(v.products[c].options)&&1==v.products[c].options.length&&isArrayLadiPage(v.products[c].options[0].values))for(var m=0;m<v.products[c].options[0].values.length;m++){r=v.products[c].options[0].values[m].name;var g=v.products[c].variants.find(l);v.products[c].options[0].values[m].name_new=v.products[c].options[0].values[m].label||v.products[c].options[0].values[m].name,isEmptyLadiPage(g)||isEmptyLadiPage(g.package_quantity)||isEmptyLadiPage(g.package_quantity_unit)||(v.products[c].options[0].values[m].name_new=v.products[c].options[0].values[m].name_new+" ("+g.package_quantity+" "+g.package_quantity_unit+")")}}if(isStringLadiPage(v.page_next)){var P=JSON.stringify(s)+"_page_"+(i+1)+"_limit_"+e;o.runtime.tmp.product_tag_info[d][P]=v.page_next}o.runtime.tmp.product_tag_info[d][f]=v,_=y(),isFunctionLadiPage(n)&&n(_)}else h()},A={product_tag_ids:s,limit:e};isEmptyLadiPage(p)?A.type="group":A.paged=i,isEmptyLadiPage(m)||isEmptyLadiPage(g)||(A.sort={},A.sort[m]=g==o.const.SORT_BY_TYPE.desc?-1:1);var b=null,T="POST";return o.runLimitRequest(20,function(){if(o.runtime.isClient){var a=o.const.API_LADISALE_COLLECTION_PRODUCT;d==o.const.FORM_CONFIG_TYPE.ladisales?((b={"Content-Type":"application/json"})["Store-Id"]=l,A=JSON.stringify(A)):d==o.const.FORM_CONFIG_TYPE.wordpress?(T="GET",a=window.location.origin+"/ladipage/api?action=product_list&category_ids="+s.join("|")+"&page="+i+"&limit="+e,A=null):(b={"Content-Type":"application/json"},a=o.const.API_COLLECTION_PRODUCT,A={form_account_id:r,tags:s,limit:e},isEmptyLadiPage(L)?A.page=i:A.page_info=L,A=JSON.stringify(A)),o.sendRequest(T,a,A,!0,b,function(t,e,i){if(i.readyState==XMLHttpRequest.DONE)try{var a=JSON.parse(t);E(a)}catch(t){h()}})}else{var n=function(t){if(isArrayLadiPage(t)&&t.length>1){var e={products:[]};t.forEach(function(t){if(isNullLadiPage(t.product)&&!isNullLadiPage(t.store_info)&&!isNullLadiPage(t.total_record))return e.store_info=t.store_info,void(e.total_record=t.total_record);isNullLadiPage(t.product)||e.products.push(t.product)}),E({data:e})}},c=LadiPage.mapping_attribute_option_product_id(t.element,"",!1,s,e,i,!0,function(t){n(t)});n(c)}}),_}}}else isEmptyLadiPage(c)||(y=function(){var t=null;if(isArrayLadiPage(P)){var a=o.copy(P);t={products:a=a.splice((i-1)*e,e),total_record:P.length},isEmptyLadiPage(o.runtime.tmp.product_info[d])&&(o.runtime.tmp.product_info[d]={}),P.forEach(function(t){o.runtime.tmp.product_info[d][t.id]={store_info:{},product:t}})}return t},P=o.loadDataset(c,c,u,m,g,!0,o.runtime.isClient,function(t){P=t,_=y(),isFunctionLadiPage(n)&&n(_)}));return isFunctionLadiPage(y)&&(!0===v?o.runtime.tmp.timeout_product_tag_info[d][f]=o.runTimeout(function(){o.getListProductByTagId(t,e,i,!1,n)},100):(_=y(),!a&&isFunctionLadiPage(n)&&n(_))),_},LadiPageScriptV2.prototype.changeTotalPriceCart=function(t){var e=0,i=0;this.runtime.tmp.cart.forEach(function(t){i+=t.quantity,isObjectLadiPage(t.promotion)?e+=t.promotion.total:e+=t.price*t.quantity}),e=e<0?0:e;var a=this.runtime.tmp.add_to_cart_fee_shipping||0,n=this.runtime.tmp.add_to_cart_discount||0,o=e+a-n;if(o=o<0?0:o,t)return{cart_price:e,cart_checkout_price:o,cart_fee_shipping:a,cart_discount:n,total_quantity:i};var r=this.formatNumber(e,3),d=this.formatNumber(o,3),l=this.formatNumber(a,3),s=this.formatNumber(n,3);if(this.runtime.tmp.cart.length>0&&!isEmptyLadiPage(this.runtime.tmp.cart[0].currency)&&!isEmptyLadiPage(this.runtime.tmp.cart[0].currency.symbol)){var c=this.runtime.tmp.cart[0].currency.symbol;r=this.formatCurrency(e,c,!0),d=this.formatCurrency(o,c,!0),l=this.formatCurrency(a,c,!0),s=this.formatCurrency(n,c,!0)}this.setDataReplaceStr("cart_price",r),this.setDataReplaceStr("cart_checkout_price",d),this.setDataReplaceStr("cart_fee_shipping",l),this.setDataReplaceStr("cart_discount",s),this.setDataReplaceStr("cart_quantity",i),this.setDataReplaceElement(!1)},LadiPageScriptV2.prototype.removeSticky=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript);for(var e=document.querySelectorAll('[data-sticky="true"]'),i=0;i<e.length;i++)e[i].removeAttribute("data-top"),e[i].removeAttribute("data-left"),e[i].style.removeProperty("top"),e[i].style.removeProperty("left"),e[i].style.removeProperty("width"),e[i].style.removeProperty("position"),e[i].style.removeProperty("z-index");t.runEventScroll()},LadiPageScriptV2.prototype.runEventBackdropPopupClick=function(t){t.stopPropagation();var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript);for(var i=null,a=document.querySelectorAll('[data-popup-backdrop="true"]'),n=0;n<a.length;n++)"none"!=getComputedStyle(a[n]).display&&(i=a[n].id);if(!isEmptyLadiPage(i)){var o=document.querySelector("#"+i+" .popup-close");if(!isEmptyLadiPage(o)&&"none"==getComputedStyle(o).display)return}e.runRemovePopup(i,e.runtime.isClient)},LadiPageScriptV2.prototype.runEventBackdropDropboxClick=function(t){t.stopPropagation();var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript);for(var i=document.querySelectorAll('[data-dropbox-backdrop="true"]'),a=0;a<i.length;a++)window.ladi(i[a].id).hide();document.getElementById(e.runtime.backdrop_dropbox_id).style.removeProperty("display")},LadiPageScriptV2.prototype.runEventMouseMove=function(t){t.stopPropagation();var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),t=e.getEventCursorData(t);var i=null,a=0,n=0,o=0;isEmptyLadiPage(e.runtime.current_element_mouse_down_carousel)||(i=document.getElementById(e.runtime.current_element_mouse_down_carousel),a=t.pageX-e.runtime.current_element_mouse_down_carousel_position_x,n=parseFloatLadiPage(i.getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left"))||0,(n+=a)<(o=-((parseFloatLadiPage(e.runtime.eventData[e.runtime.current_element_mouse_down_carousel][e.runtime.device+".option.carousel_crop.width"])||0)-i.clientWidth))&&(n=o),n>0&&(n=0),i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",n+"px"));if(!isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_view)){i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_view+'"]'),a=t.pageX-e.runtime.current_element_mouse_down_gallery_view_position_x;var r=parseFloatLadiPage(i.getAttribute("data-current"))||0;r==(parseFloatLadiPage(i.getAttribute("data-max-item"))||0)-1&&a<0&&(a=0),a>0&&0==r&&(a=0),a>=e.runtime.current_element_mouse_down_gallery_view_diff?(e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0,i.getElementsByClassName("ladi-gallery-view-arrow-left")[0].click()):a<=-e.runtime.current_element_mouse_down_gallery_view_diff?(e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0,i.getElementsByClassName("ladi-gallery-view-arrow-right")[0].click()):i.querySelectorAll(".ladi-gallery-view-item.selected").length>0&&i.querySelectorAll(".ladi-gallery-view-item.selected")[0].style.setProperty("left",a+"px")}isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_control)||(i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_control+'"]'),a=t.pageX-e.runtime.current_element_mouse_down_gallery_control_position_x,n=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].getAttribute("data-left"))||0,(n+=a)<(o=(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0)-(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0))&&(n=o),n>0&&(n=0),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("left",n+"px"))},LadiPageScriptV2.prototype.runEventMouseUp=function(t){t.stopPropagation();var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),t=e.getEventCursorData(t);var i=null,a=0;if(!isEmptyLadiPage(e.runtime.current_element_mouse_down_carousel)){delete e.runtime.timenext_carousel[e.runtime.current_element_mouse_down_carousel],a=t.pageX-e.runtime.current_element_mouse_down_carousel_position_x;var n=(i=document.getElementById(e.runtime.current_element_mouse_down_carousel)).getElementsByClassName("ladi-carousel-content")[0].getAttribute("data-left");i.getElementsByClassName("ladi-carousel-content")[0].removeAttribute("data-left"),i.getElementsByClassName("ladi-carousel-content")[0].style.removeProperty("transition-duration"),e.runtime.current_element_mouse_down_carousel=null,a>=e.runtime.current_element_mouse_down_carousel_diff?i.getElementsByClassName("ladi-carousel-arrow-left")[0].click():a<=-e.runtime.current_element_mouse_down_carousel_diff?i.getElementsByClassName("ladi-carousel-arrow-right")[0].click():i.getElementsByClassName("ladi-carousel-content").length>0&&(i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("transition-duration","100ms"),i.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",n),e.runTimeout(function(){i.getElementsByClassName("ladi-carousel-content")[0].style.removeProperty("transition-duration")},1))}if(isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_view)||(i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_view+'"]')).querySelectorAll(".ladi-gallery-view-item.selected").length>0&&i.querySelectorAll(".ladi-gallery-view-item.selected")[0].style.removeProperty("left"),!isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_control))if((i=document.querySelector('[data-runtime-id="'+e.runtime.current_element_mouse_down_gallery_control+'"]')).getElementsByClassName("ladi-gallery-control-box")[0].removeAttribute("data-left"),i.getElementsByClassName("ladi-gallery-control-box")[0].style.removeProperty("transition-duration"),i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom")){var o=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("left"))||0,r=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0;r=(r=-(r-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0))>0?0:r,o>0&&(o=0),o>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),o<=r&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}else{var d=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("top"))||0,l=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).height)||0;l=(l=-(l-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).height)||0))>0?0:l,d>0&&(d=0),d>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),d<=l&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}e.runtime.current_element_mouse_down_carousel_position_x=0,e.runtime.current_element_mouse_down_gallery_view=null,e.runtime.current_element_mouse_down_gallery_view_position_x=0;var s=0;e.runtime.current_element_mouse_down_gallery_control_time+e.runtime.current_element_mouse_down_gallery_control_time_click<Date.now()&&(s=5),e.runTimeout(function(){e.runtime.current_element_mouse_down_gallery_control=null,e.runtime.current_element_mouse_down_gallery_control_time=0,e.runtime.current_element_mouse_down_gallery_control_position_x=0},s)},LadiPageScriptV2.prototype.runEventMouseLeave=function(t){var e=this;e instanceof LadiPageScriptV2||(e=LadiPageScript),Object.keys(e.runtime.eventData).forEach(function(t){var i=e.runtime.eventData[t];if("popup"==i.type&&i["option.show_popup_exit_page"]){if(isObjectLadiPage(e.runtime.tmp.popup_leave_show)||(e.runtime.tmp.popup_leave_show={}),e.runtime.tmp.popup_leave_show[t])return;e.runtime.tmp.popup_leave_show[t]=!0,window.ladi(t).show()}})},LadiPageScriptV2.prototype.runEventScroll=function(t){var e=this;if(e instanceof LadiPageScriptV2||(e=LadiPageScript),e.runtime.isRun){if(!isEmptyLadiPage(t)&&!e.runtime.tmp.isRunScrollEvent){for(var i=document.getElementsByClassName("ladi-lazyload");i.length>0;)i[0].classList.remove("ladi-lazyload");e.runtime.tmp.isRunScrollEvent=!0}if(!isEmptyLadiPage(e.runtime.eventData)&&!e.runtime.tmp.is_run_show_popup){for(var a=null,n=document.querySelectorAll('[data-popup-backdrop="true"]'),o=0;o<n.length;o++)"none"!=getComputedStyle(n[o]).display&&(a=n[o].id);var r=[];if(!isEmptyLadiPage(a))for(var d=document.querySelectorAll("#"+a+" .ladi-element"),l=0;l<d.length;l++)r.push(d[l].id);if(Object.keys(e.runtime.eventData).forEach(function(t){var i=e.runtime.eventData[t],n=null,o=null,d=null,l=Object.keys(e.runtime.list_scroll_func),s=[];s="gallery"==i.type?document.querySelectorAll("#"+t):[d=document.getElementById(t)];for(var c=0;c<s.length;c++)if(d=s[c],!isEmptyLadiPage(d)){var u="gallery"==i.type?d.getAttribute("data-runtime-id"):d.getAttribute("id");if(-1!=l.indexOf(u)){var p=!1;"section"==i.type?(n=d.offsetTop,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(p=!0)):(n=e.getElementBoundingClientRect(d).y+window.scrollY,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice(!0)>=n&&window.scrollY+e.getHeightDevice(!0)<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice(!0)>=n)&&(p=!0)),p&&(o=e.runtime.list_scroll_func[u],delete e.runtime.list_scroll_func[u],o())}}var m=i[e.runtime.device+".style.animation-name"];if(!isEmptyLadiPage(m)&&(d=document.getElementById(t),!isEmptyLadiPage(d)&&!d.classList.contains("ladi-animation"))){var g=parseFloatLadiPage(i[e.runtime.device+".style.animation-delay"])||0;n=e.getElementBoundingClientRect(d).y+window.scrollY;var _=window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice(!0)>=n&&window.scrollY+e.getHeightDevice(!0)<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice(!0)>=n;e.runtime.tmp.isFirstScroll&&g>0&&d.classList.add("ladi-animation-hidden"),_&&(d.classList.add("ladi-animation"),e.runTimeout(function(){d.classList.remove("ladi-animation-hidden")},1e3*g))}if(isEmptyLadiPage(a)||-1!=r.indexOf(t)){var y=null,f=null,v=null;if(i[e.runtime.device+".option.sticky"]&&(y=i[e.runtime.device+".option.sticky_position"],f=parseFloatLadiPage(i[e.runtime.device+".option.sticky_position_top"]),v=parseFloatLadiPage(i[e.runtime.device+".option.sticky_position_bottom"])),!e.runtime.has_popupx&&!isEmptyLadiPage(y)){var P=document.getElementById(t);if(!isEmptyLadiPage(P)&&P.clientWidth>0&&P.clientHeight>0&&-1!=["default","top","bottom"].indexOf(y)){var L=e.getElementBoundingClientRect(P),h=P.getAttribute("data-top"),E=P.getAttribute("data-left");isEmptyLadiPage(h)?(P.setAttribute("data-top",L.y+window.scrollY),h=L.y):h=parseFloatLadiPage(h),isEmptyLadiPage(E)?(P.setAttribute("data-left",L.x+window.scrollX),E=L.x):E=parseFloatLadiPage(E);var A=null,b=null,T=e.getHeightDevice(),w=document.getElementsByClassName("ladi-wraper")[0],S=0,O=0,C=0,I=0;if("default"==y&&(f>=h-window.scrollY?(A=f+"px",b=E+"px",f<=0&&(S=P.clientHeight),C=P.clientHeight):T-v-P.clientHeight<=h-window.scrollY&&(A="calc(100% - "+(v+P.clientHeight)+"px)",b=E+"px",v<=0&&(O=P.clientHeight),I=P.clientHeight)),"top"==y&&(f>=h-window.scrollY||T-0<h-window.scrollY)&&(A=f+"px",b=E+"px",f<=0&&(S=P.clientHeight),C=P.clientHeight),"bottom"==y&&(T-v-P.clientHeight<=h-window.scrollY||0>h+P.clientHeight-window.scrollY)&&(A="calc(100% - "+(v+P.clientHeight)+"px)",b=E+"px",v<=0&&(O=P.clientHeight),I=P.clientHeight),isEmptyLadiPage(A)||isEmptyLadiPage(b))P.style.removeProperty("top"),P.style.removeProperty("left"),P.style.removeProperty("width"),P.style.removeProperty("position"),P.style.removeProperty("z-index"),w.getAttribute("data-padding-top-id")==t&&(w.removeAttribute("data-padding-top-id"),w.style.removeProperty("padding-top")),w.getAttribute("data-padding-bottom-id")==t&&(w.removeAttribute("data-padding-bottom-id"),w.style.removeProperty("padding-bottom"));else if("section"==i.type&&(e.runtime.is_mobile_only?P.style.setProperty("width",w.clientWidth+"px"):e.runtime.isDesktop&&P.style.setProperty("width","100%"),S>0&&(w.setAttribute("data-padding-top-id",t),w.style.setProperty("padding-top",S+"px")),O>0&&(w.setAttribute("data-padding-bottom-id",t),w.style.setProperty("padding-bottom",O+"px")),C>0&&w.setAttribute("data-scroll-padding-top",C),I>0&&w.setAttribute("data-scroll-padding-bottom",I)),P.style.setProperty("top",A),P.style.setProperty("left",b),P.style.setProperty("position","fixed"),P.style.setProperty("z-index","90000050"),!P.hasAttribute("data-sticky")){P.setAttribute("data-sticky",!0),P.classList.contains("ladi-animation-hidden")&&(P.classList.remove("ladi-animation-hidden"),P.classList.add("ladi-animation"));for(var N=P.getElementsByClassName("ladi-animation-hidden");N.length>0;)N[0].classList.add("ladi-animation"),N[0].classList.remove("ladi-animation-hidden");P.classList.remove("ladi-lazyload");for(var k=P.getElementsByClassName("ladi-lazyload");k.length>0;)k[0].classList.remove("ladi-lazyload")}}}}if("popup"==i.type){if(!isEmptyLadiPage(e.runtime.scroll_show_popup[t]))return;isEmptyLadiPage(i["option.popup_welcome_page_scroll_to"])||(d=document.getElementById(i["option.popup_welcome_page_scroll_to"]),!isEmptyLadiPage(d)&&d.offsetHeight>0&&(n=d.offsetTop,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(e.runtime.scroll_show_popup[t]=!0,window.ladi(t).show())))}if("section"==i.type){if(!isEmptyLadiPage(e.runtime.scroll_to_section[t]))return;d=document.getElementById(t),isEmptyLadiPage(d)||(n=d.offsetTop,(window.scrollY>=n&&window.scrollY<=n+d.offsetHeight||window.scrollY+e.getHeightDevice()>=n&&window.scrollY+e.getHeightDevice()<=n+d.offsetHeight||n>=window.scrollY&&window.scrollY+e.getHeightDevice()>=n)&&(e.runtime.scroll_to_section[t]=!0,e.runEventTracking(t,{is_form:!1})))}}),e.runtime.isClient){if(e.runtime.is_popupx)return;for(var s=Math.round((window.scrollY+e.getHeightDevice())/document.body.clientHeight*100),c=function(t){LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){e.runLadiPageCommand(function(e){if(e.tiktokViewContent&&t>=e.scrollPercent)return window.ttq.track(e.name),!0})})},u=function(t){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq("trackCustom","ScrollDepth_"+t+"_percent")})},p=function(t){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("event","ScrollDepth_"+t+"_percent",{event_category:"LadiPageScrollDepth",event_label:window.location.host+window.location.pathname,non_interaction:!0})})},m=1;m<e.const.PERCENT_TRACKING_SCROLL.length;m++){var g=e.const.PERCENT_TRACKING_SCROLL[m];s>e.const.PERCENT_TRACKING_SCROLL[m-1]&&s<=g&&-1==e.runtime.scroll_depth.indexOf(g)&&(e.runtime.scroll_depth.push(g),u(g),p(g),c(s))}}if(e.runtime.tmp.isFirstScroll=!1,!isEmptyLadiPage(t)){var _=0,y=Object.values(e.runtime.list_scrolling_exec);if(isEmptyLadiPage(e.runtime.tmp.timeout_scrolling_id))for(_=0;_<y.length;_++)y[_]();e.removeTimeout(e.runtime.tmp.timeout_scrolling_id),e.runtime.tmp.timeout_scrolling_id=e.runTimeout(function(){for(delete e.runtime.tmp.timeout_scrolling_id,y=Object.values(e.runtime.list_scrolled_exec),_=0;_<y.length;_++)y[_]()},1e3)}}}else e.runTimeout(function(){e.runEventScroll(t)},100)},LadiPageScriptV2.prototype.runRemovePopup=function(t,e,i,a,n){var o=this,r=document.querySelectorAll("#"+this.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),d=!1,l=!1;e||(LadiPagePlugin.getPlugin("popup").removeStyleShowPopupBuilder(),LadiPagePlugin.getPlugin("popup").removeStyleShowPopupBuilderScroll());var s=function(){if(!o.runtime.tmp.is_resize_all&&!o.runtime.tmp.is_wait_popup){var t=document.getElementById("style_popup");isEmptyLadiPage(t)||t.parentElement.removeChild(t)}},c=[],u=0;if(isEmptyLadiPage(t))for(u=0;u<r.length;u++)c.push(r[u].id);else c.push(t);if(c.forEach(function(t){var i=document.getElementById(t);if(!isEmptyLadiPage(i)){o.runtime.has_popupx&&("none"!=getComputedStyle(i).display&&(l=!0),document.body.style.removeProperty("height"));var a=parseFloatLadiPage(i.getAttribute("data-timeout-id"))||null;o.removeTimeout(a),i.removeAttribute("data-timeout-id"),a=parseFloatLadiPage(i.getAttribute("data-timeout-id-2"))||null,o.removeTimeout(a),i.removeAttribute("data-timeout-id-2"),a=parseFloatLadiPage(i.getAttribute("data-timeout-id-3"))||null,o.removeTimeout(a),i.removeAttribute("data-timeout-id-3");var n=i.getElementsByClassName("popup-close")[0];isEmptyLadiPage(n)||(a=parseFloatLadiPage(n.getAttribute("data-timeout-id"))||null,o.removeTimeout(a),n.removeAttribute("data-timeout-id")),o.pauseAllVideo(i),isEmptyLadiPage(i.style.getPropertyValue("display"))||(d=!0),i.style.removeProperty("display"),i.style.removeProperty("z-index");var c=i.hasAttribute("data-popup-backdrop"),u=o.runtime.eventData[t];if(isObjectLadiPage(u)&&u[o.runtime.device+".option.popup_position"]==o.const.POSITION_TYPE.default&&(c=!0),c){s(),e&&(isEmptyLadiPage(o.runtime.tmp.bodyScrollY)||window.scrollTo(0,o.runtime.tmp.bodyScrollY)),o.runtime.tmp.bodyScrollY=null;for(var p=0;p<r.length;p++)r[p].style.removeProperty("z-index")}i.removeAttribute("data-scroll"),i.removeAttribute("data-fixed-close"),i.style.removeProperty("overflow-y"),i.style.removeProperty("overflow-x");var m=i.getElementsByClassName("ladi-popup")[0];isEmptyLadiPage(m)||m.style.removeProperty("height"),i.style.removeProperty("max-height")}}),d&&isFunctionLadiPage(i)&&i(),a&&s(),!n&&l){o.runtime.tmp.runActionPopupX({id:t,dimension:{display:"none"},action:{type:"set_iframe_dimension"}})}delete this.runtime.tmp.current_default_popup_id},LadiPageScriptV2.prototype.runShowPopup=function(t,e,i,a,n){var o=this;if(!isEmptyLadiPage(e)){var r=document.getElementById(e);if(!n||!isEmptyLadiPage(r)&&isObjectLadiPage(o.runtime.eventData)&&!isEmptyLadiPage(o.runtime.eventData[e])){n&&(i=o.runtime.eventData[e][o.runtime.device+".option.popup_position"],a=o.runtime.eventData[e][o.runtime.device+".option.popup_backdrop"]);var d=function(t){o.runtime.tmp.is_run_show_popup=!0;var l=0,s="";n||LadiPagePlugin.getPlugin("popup").showStyleShowPopupBuilder(e);isEmptyLadiPage(a)?s+=n?"#"+o.runtime.backdrop_popup_id+" { display: none !important;}":"#"+o.runtime.backdrop_popup_id+" { display: block !important;}":(s+="#"+o.runtime.backdrop_popup_id+" { display: block !important; "+a+"}",r.setAttribute("data-popup-backdrop",!0)),i==o.const.POSITION_TYPE.default&&"true"!=r.getAttribute("data-dropbox")&&(!function(){if(!o.runtime.has_popupx&&n){var t=window.scrollY;if(!isEmptyLadiPage(o.runtime.tmp.bodyScrollY)){var i=getComputedStyle(document.body);"fixed"==i.position&&(parseFloatLadiPage(i.top)||0)==-1*o.runtime.tmp.bodyScrollY&&(t=o.runtime.tmp.bodyScrollY)}"block"!=r.style.getPropertyValue("display")||isEmptyLadiPage(o.runtime.tmp.bodyScrollY)||(t=o.runtime.tmp.bodyScrollY),s+="body {",0==r.getElementsByClassName("ladi-google-recaptcha-checkbox").length&&(s+="position: fixed !important;"),s+="width: 100% !important;",s+="top: -"+t+"px !important;",s+="}",o.runtime.tmp.bodyScrollY=t}for(var a=document.querySelectorAll("#"+o.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),d=0;d<a.length;d++)a[d].id!=e&&a[d].style.setProperty("z-index","1","important");l=500}(),o.runtime.tmp.current_default_popup_id=e);var c="block"==r.style.getPropertyValue("display");if(isArrayLadiPage(o.runtime.list_show_popup_func[e]))for(;o.runtime.list_show_popup_func[e].length>0;){o.runtime.list_show_popup_func[e].shift()()}var u=r.hasAttribute("data-scroll"),p=r.hasAttribute("data-fixed-close"),m=!1,g=r.getElementsByClassName("ladi-popup")[0],_=1e3*(parseFloatLadiPage(getComputedStyle(g).animationDuration)||0),y=1e3*(parseFloatLadiPage(getComputedStyle(g).animationDelay)||0),f=parseFloatLadiPage(r.getAttribute("data-timeout-id"))||null;o.removeTimeout(f),f=parseFloatLadiPage(r.getAttribute("data-timeout-id-2"))||null,o.removeTimeout(f),!n||"true"==r.getAttribute("data-dropbox")||o.runtime.tmp.is_resize_all||o.runtime.tmp.is_wait_popup||isEmptyLadiPage(r.style.getPropertyValue("max-height"))&&r.style.setProperty("visibility","hidden"),r.classList.add("ladi-animation-hidden"),"block"!=getComputedStyle(r).display&&r.style.setProperty("display","block","important"),f=o.runTimeout(function(){r.classList.remove("ladi-animation-hidden"),r.removeAttribute("data-timeout-id")},y),isEmptyLadiPage(f)||r.setAttribute("data-timeout-id",f),t&&(!u&&r.clientHeight>.8*o.getHeightDevice()&&(n?o.runtime.has_popupx?m=!0:(r.setAttribute("data-scroll",!0),r.style.setProperty("overflow-y","auto","important"),r.style.setProperty("overflow-x","hidden","important"),u=!0):p=!0),o.runtime.has_popupx&&(m?(r.setAttribute("data-fixed-close",!0),document.body.style.setProperty("height",r.clientHeight+"px")):document.body.style.removeProperty("height")),u&&n&&(r.getElementsByClassName("ladi-popup")[0].style.removeProperty("height"),r.style.removeProperty("max-height"),r.getElementsByClassName("ladi-popup")[0].style.setProperty("height",r.clientHeight+"px","important"),r.style.setProperty("max-height","80vh"))),!n&&p&&LadiPagePlugin.getPlugin("popup").styleShowPopupBuilderScroll(e),o.runtime.has_popupx&&(s+=n?"#"+o.runtime.backdrop_popup_id+" { display: none !important;}":"#"+o.runtime.backdrop_popup_id+" { display: block !important;}",r.style.removeProperty("max-height"),r.style.removeProperty("overflow-y"),r.style.removeProperty("overflow-x")),isEmptyLadiPage(s)||o.runtime.tmp.is_resize_all||o.runtime.tmp.is_wait_popup||o.createStyleElement("style_popup",s);var v=null;if(n&&!isEmptyLadiPage(r)&&"true"!=r.getAttribute("data-dropbox")){var P=r.getElementsByClassName("popup-close")[0];isEmptyLadiPage(P)&&((P=document.createElement("div")).className="popup-close",r.appendChild(P),P.addEventListener("click",function(t){t.stopPropagation(),o.runRemovePopup(e,n)})),f=parseFloatLadiPage(P.getAttribute("data-timeout-id"))||null,o.removeTimeout(f),"true"==r.getAttribute("data-scroll")&&(P.style.removeProperty("right"),P.style.removeProperty("top"),P.style.removeProperty("position")),o.runtime.has_popupx&&o.runtime.tmp.popupx_is_inline&&P.classList.add("ladi-hidden");var L=function(){if(P=r.getElementsByClassName("popup-close")[0],!isEmptyLadiPage(P))if("true"==r.getAttribute("data-scroll")){var t=o.getElementBoundingClientRect(r),e=t.y,i=window.innerWidth-t.x-t.width;(u||m)&&(i+=o.runtime.widthScrollBar),P.style.setProperty("right",i+"px"),P.style.setProperty("top",e+"px"),P.style.setProperty("position","fixed")}else P.style.removeProperty("right"),P.style.removeProperty("top"),P.style.removeProperty("position")};L(),v=function(){f=o.runTimeout(function(){L(),P.removeAttribute("data-timeout-id")},_+y+100),P.setAttribute("data-timeout-id",f)},(u||m)&&(r.hasAttribute("data-resize-scroll")||(r.setAttribute("data-resize-scroll",!0),window.addEventListener("resize",L)))}n&&!c&&o.runEventTracking(e,{is_form:!1});var h=function(){var t=l;f=o.runTimeout(function(){delete o.runtime.tmp.is_run_show_popup,o.runEventScroll(),isFunctionLadiPage(v)&&v(),r.removeAttribute("data-timeout-id-2")},t),isEmptyLadiPage(f)||r.setAttribute("data-timeout-id-2",f),r.style.removeProperty("visibility")};if(t)h();else{f=o.runTimeout(function(){"none"==getComputedStyle(r).display?(l-=100,h()):d(!0),r.removeAttribute("data-timeout-id-2")},100),r.setAttribute("data-timeout-id-2",f)}r.removeAttribute("data-timeout-id-3")},l=0;i==o.const.POSITION_TYPE.default&&(l=100);var s=o.runTimeout(function(){d(t)},l);isEmptyLadiPage(r)||r.setAttribute("data-timeout-id-3",s)}}},LadiPageScriptV2.prototype.convertPhoneNumberFormData=function(t){for(var e=null,i=[{startStr:"+84",endStr:"(9|8|7|5|3)[0-9]{8}",listRegex:[{str_start:"0",str_input:"0"},{str_start:"\\+84",str_input:"+84"}]}],a=0;a<i.length;a++)for(var n=0;n<i[a].listRegex.length;n++){new RegExp("^("+i[a].listRegex[n].str_start+")"+i[a].endStr+"$","gi").test(t)&&(e=i[a].startStr+t.substring(i[a].listRegex[n].str_input.length))}return e},LadiPageScriptV2.prototype.runGlobalTrackingScript=function(){if(isObjectLadiPage(window.ladi_global_tracking)&&isArrayLadiPage(window.ladi_global_tracking.thankyou_page))for(;window.ladi_global_tracking.thankyou_page.length>0;){var t=window.ladi_global_tracking.thankyou_page.shift();this.runEventTracking(null,t)}},LadiPageScriptV2.prototype.runLadiPageCommand=function(t){if(isArrayLadiPage(LadiPageCommand))for(var e=0;e<LadiPageCommand.length;e++)if(isFunctionLadiPage(t)&&t(LadiPageCommand[e])){LadiPageCommand.splice(e,1),this.runLadiPageCommand(t);break}},LadiPageScriptV2.prototype.generateTrackingJS=function(t){var e="",i="",a=[];if(null!=t.facebook_pixel&&void 0!=t.facebook_pixel&&t.facebook_pixel.length>0&&(a=t.facebook_pixel.split(",").removeSpace()).length>0){e+="<script>!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');";var n=[];a.forEach(function(t){var i=t.split("|API");e+='fbq("init", "'+i[0].trim()+'");',2==i.length&&n.push(i[0].trim())}),n.length>0?(e+="(function () {",e+='var getEventData = function () {var min = 10000000000; var max = 99999999999; return {eventID: "ladi." + Date.now() + "." + (Math.floor(Math.random() * (max - min + 1)) + min)};};',e+="var eventDataPageView = getEventData();",e+='fbq("track", "PageView", null, eventDataPageView);',t.is_view_content&&(e+="var eventDataViewContent = getEventData();",e+='fbq("track", "ViewContent", null, eventDataViewContent);'),e+="window.ladi_conversion_api = window.ladi_conversion_api || {facebook: {pixels: []}};",n.forEach(function(t){e+="window.ladi_conversion_api.facebook.pixels.push('"+t+"');"}),e+="window.ladi_conversion_api.facebook.events = [{key: 'track', name: 'PageView', data: eventDataPageView}",t.is_view_content&&(e+=", {key: 'track', name: 'ViewContent', data: eventDataViewContent}"),e+="];",e+='if (typeof window.LadiPageScript != "undefined" && window.LadiPageScript != undefined) {window.LadiPageScript.runConversionApi();}',e+="})();"):(e+='fbq("track", "PageView");',t.is_view_content&&(e+='fbq("track", "ViewContent");')),e+="<\/script>",a.forEach(function(t){var i=t.split("|API");e+='<noscript><img height="1" width="1" style="display:none;" src="https://www.facebook.com/tr?id='+i[0].trim()+'&ev=PageView&noscript=1" /></noscript>'})}var o=[],r=[];null!=t.google_ads_id&&void 0!=t.google_ads_id&&t.google_ads_id.length>0&&(r=t.google_ads_id.split(",").removeSpace()),null!=t.google_analytics_id&&void 0!=t.google_analytics_id&&t.google_analytics_id.length>0&&(o=t.google_analytics_id.split(",").removeSpace()),(o.length>0||r.length>0)&&(e+='<script async src="https://www.googletagmanager.com/gtag/js?id='+(o.length>0?o[0]:r[0])+'"><\/script>',e+="<script>window.dataLayer = window.dataLayer || [];",e+='function gtag(){dataLayer.push(arguments);}gtag("js", new Date());',o.forEach(function(t){e+='gtag("config", "'+t+'", {allow_enhanced_conversions: true});'}),r.forEach(function(t){e+='gtag("config", "'+t+'", {allow_enhanced_conversions: true});'}),e+="<\/script>");var d=[];null!=t.tiktok_pixel&&void 0!=t.tiktok_pixel&&t.tiktok_pixel.length>0&&(d=t.tiktok_pixel.split(",").removeSpace(),e+='<script>!function (w, d, t) {w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=i+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};',d.forEach(function(t){e+='ttq.load("'+t+'");'}),t.is_view_content&&(e+="window.LadiPageCommand = window.LadiPageCommand || [];",e+='window.LadiPageCommand.push({tiktokViewContent: true, name: "ViewContent", clickButton: true, scrollPercent: 50});'),e+='ttq.page();}(window, document, "ttq");<\/script>');var l=[];return null!=t.google_tag_manager_id&&void 0!=t.google_tag_manager_id&&t.google_tag_manager_id.length>0&&((l=t.google_tag_manager_id.split(",").removeSpace()).length>0&&(e+="<script>function gtm(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);}",l.forEach(function(t){e+="gtm(window,document,'script','dataLayer','"+t+"');"}),e+="<\/script>"),l.forEach(function(t){i+='<noscript><iframe src="https://www.googletagmanager.com/ns.html?id='+t+'" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>'})),{template:e,template_body:i}},LadiPageScriptV2.prototype.customScriptDelayInit=function(){var t=document.createElement("div");[{id:"script_html_head",elm:"head"},{id:"script_html_body",elm:"body"}].forEach(function(e){try{var i=document.getElementById(e.id);isEmptyLadiPage(i)||(t.innerHTML=i.innerHTML,isEmptyLadiPage(t.textContent)||(i=document.createRange().createContextualFragment(t.textContent),document[e.elm].appendChild(i)))}catch(t){}})},LadiPageScriptV2.prototype.trackingInit=function(t){if(isObjectLadiPage(t)){var e=this.generateTrackingJS(t);[{str:e.template,elm:"head"},{str:e.template_body,elm:"body"}].forEach(function(t){try{if(!isEmptyLadiPage(t.str)){var e=document.createRange().createContextualFragment(t.str);document[t.elm].appendChild(e)}}catch(t){}})}},LadiPageScriptV2.prototype.runEventTracking=function(t,e,i,a,n){var o=this;if(this.runtime.isClient){var r=null,d=null,l=null,s=null,c=null,u=o.runtime.currency,p=o.runtime.eventData[t],m=null,g=e.is_form,_=e.is_click&&e.count_data_event>0&&o.runtime.tracking_button_click,y=e.is_thankyou_page;if(y)r=e.conversion_name,d=e.google_ads_conversion,l=e.google_ads_label,c=isEmptyLadiPage(e.purchase_value)?null:parseFloatLadiPage(e.purchase_value)||0;else{if(isEmptyLadiPage(t)||!isObjectLadiPage(p))return;m=p.type,g&&"form"==m?(r=p["option.form_conversion_name"],d=p["option.form_google_ads_conversion"],l=p["option.form_google_ads_label"],s=p["option.form_event_custom_script"],c=isEmptyLadiPage(p["option.form_purchase_value"])?null:parseFloatLadiPage(p["option.form_purchase_value"])||0,o.runtime.shopping&&(c=o.getCartCheckoutPrice(c))):(r=p["option.conversion_name"],d=p["option.google_ads_conversion"],l=p["option.google_ads_label"],s=p["option.event_custom_script"])}var f=function(t){var e=null,a=null,n="trackCustom",d=[],l=null,s=function(){return{eventID:"ladi."+Date.now()+"."+(Math.floor(9e10*Math.random())+1e10)}};isEmptyLadiPage(r)||(-1!=["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","PageView","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"].indexOf(r)&&(n="track"),isEmptyLadiPage(c)||isEmptyLadiPage(u)||((e={}).value=c,e.currency=u),!t&&isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api.facebook)&&isArrayLadiPage(window.ladi_conversion_api.facebook.pixels)&&(a=s()),d.push({fbq_track_name:n,conversion_name:r,fbq_data:e,fbq_event_data:a}),d.forEach(function(e){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq(e.fbq_track_name,e.conversion_name,e.fbq_data,e.fbq_event_data)});var a=o.copy(e.fbq_event_data);if(o.runtime.shopping&&g){var n=o.getCartProducts();isNullLadiPage(n)||(isObjectLadiPage(a)||(a={}),a.cart_products=n)}isObjectLadiPage(i)&&(isObjectLadiPage(a)||(a={}),a.email=i.email,a.phone=i.phone),l=[{key:e.fbq_track_name,name:e.conversion_name,custom_data:e.fbq_data,data:a}],o.runConversionApi("facebook","events",l),t&&(o.runtime.tmp.runActionPopupX({fbq_track_name:e.fbq_track_name,conversion_name:e.conversion_name,fbq_data:e.fbq_data,fbq_event_data:e.fbq_event_data,action:{type:"run_tracking_fbq"}}),o.runtime.tmp.runActionPopupX({type:"facebook",key:"events",keyData:l,action:{type:"run_conversion_api"}}))})),_&&(n="trackCustom",e=null,a=null,d=[],!t&&isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api.facebook)&&isArrayLadiPage(window.ladi_conversion_api.facebook.pixels)&&(a=s()),d.push({fbq_track_name:n,conversion_name:"ClickButton",fbq_data:e,fbq_event_data:a}),d.forEach(function(e){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq(e.fbq_track_name,e.conversion_name,e.fbq_data,e.fbq_event_data)}),l=[{key:e.fbq_track_name,name:e.conversion_name,custom_data:e.fbq_data,data:e.fbq_event_data}],o.runConversionApi("facebook","events",l),t&&(o.runtime.tmp.runActionPopupX({fbq_track_name:e.fbq_track_name,conversion_name:e.conversion_name,fbq_data:e.fbq_data,fbq_event_data:e.fbq_event_data,action:{type:"run_tracking_fbq"}}),o.runtime.tmp.runActionPopupX({type:"facebook",key:"events",keyData:l,action:{type:"run_conversion_api"}}))}))},v=function(t){if(isObjectLadiPage(i)){var a=o.convertPhoneNumberFormData(i.phone),n={};isEmptyLadiPage(i.email)||(n.email=i.email),isEmptyLadiPage(a)?isEmptyLadiPage(i.phone)||(n.phone_number=i.phone):n.phone_number=a,Object.keys(n).length>0&&LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("set","user_data",n)})}isEmptyLadiPage(d)||isEmptyLadiPage(l)||(t?o.runtime.tmp.runActionPopupX({conversion_name:"conversion",gtag_data:{send_to:"AW-"+d+"/"+l},action:{type:"run_tracking_gtag"}}):LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("event","conversion",{send_to:"AW-"+d+"/"+l})}));var s=null;if(!isEmptyLadiPage(r)){var g="";g="section"==m?"LadiPageSection":"popup"==m?"LadiPagePopup":"form"==m?"LadiPageConversion":"LadiPageClick",y&&(g=e.event_category);var _=LadiPageApp[m+o.const.APP_RUNTIME_PREFIX];if(!isEmptyLadiPage(_)){var f=_(p,o.runtime.isClient);isFunctionLadiPage(f.getEventTrackingCategory)&&(g=_(p,o.runtime.isClient).getEventTrackingCategory())}s={event_category:g,event_label:window.location.host+window.location.pathname},isEmptyLadiPage(c)||isEmptyLadiPage(u)||(s.value=c,s.currency=u),t?o.runtime.tmp.runActionPopupX({conversion_name:r,gtag_data:s,action:{type:"run_tracking_gtag"}}):LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("event",r,s)})}},P=function(t){var e=null;if(isObjectLadiPage(i)&&(e={email:i.email,phone_number:o.convertPhoneNumberFormData(i.phone)}),isObjectLadiPage(e)&&!isEmptyLadiPage(e.phone_number)&&(t?o.runtime.tmp.runActionPopupX({ttq_identify_data:e,action:{type:"run_identify_ttq"}}):LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){window.ttq.identify(e)})),!isEmptyLadiPage(r)){if(-1!=["Purchase","Lead"].indexOf(r))return;var a=null;"CompletePayment"!=r||isEmptyLadiPage(c)||isEmptyLadiPage(u)||((a={content_id:o.runtime.ladipage_id,content_type:"product"}).value=c,a.currency=u),t?o.runtime.tmp.runActionPopupX({conversion_name:r,ttq_data:a,action:{type:"run_tracking_ttq"}}):LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){isObjectLadiPage(a)?window.ttq.track(r,a):window.ttq.track(r)})}_&&(o.runLadiPageCommand(function(e){if(e.tiktokViewContent&&e.clickButton)return t?o.runtime.tmp.runActionPopupX({conversion_name:e.name,action:{type:"run_tracking_ttq"}}):LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){window.ttq.track(e.name)}),!0}),t?o.runtime.tmp.runActionPopupX({conversion_name:"ClickButton",action:{type:"run_tracking_ttq"}}):LadiPageQueueCommand.push(function(){return!isNullLadiPage(window.ttq)},function(){window.ttq.track("ClickButton")}))};if(!isEmptyLadiPage(a)){var L=!1;return isEmptyLadiPage(d)||isEmptyLadiPage(l)||(L=!0),isEmptyLadiPage(r)||(L=!0),isEmptyLadiPage(s)||(L=!0),_&&(L=!0),-1!=["section","popup","countdown"].indexOf(m)&&(L=!1),void(L&&a.addEventListener("click",function(r){isFunctionLadiPage(n)&&!n(a,r)||o.runEventTracking(t,e,i)}))}if(o.runtime.is_popupx)return f(!0),v(!0),P(!0),void o.runtime.tmp.runActionPopupX({script:s,action:{type:"event_custom_script"}});f(),v(),P(),isEmptyLadiPage(s)||o.runFunctionString(s)}},LadiPageScriptV2.prototype.runFunctionString=function(t){try{new Function(t)()}catch(t){}},LadiPageScriptV2.prototype.convertReplacePrefixStr=function(t,e){var i=t,a=this.runtime.replacePrefixStart,n=this.runtime.replacePrefixEnd,o=this.runtime.replaceNewPrefixStart,r=this.runtime.replaceNewPrefixEnd;if(e){var d=o;o=a,a=d,d=r,r=n,n=d}for(var l=new RegExp(a+"[^"+a+"$"+n+"]*"+n,"gi"),s=null,c=function(t){i=i.replaceAll(t,t.replaceAll(a,o).replaceAll(n,r))};null!==(s=l.exec(t));)s.index===l.lastIndex&&l.lastIndex++,s.forEach(c);return i},LadiPageScriptV2.prototype.formatCurrency=function(t,e,i,a){var n={VND:"{0}đ",KHR:"{0}៛",USD:"${0}",EUR:"€{0}",GBP:"£{0}",THB:"฿{0}",LAK:"₭{0}",PHP:"₱{0}",SGD:"S${0}",HKD:"HK${0}",TWD:"NT${0}",MYR:"RM{0}",IDR:"Rp{0}",INR:"₹{0}"};if(Object.keys(n).forEach(function(t){var i=n[t].replaceAll("{0}","");(i=i.trim())==e&&(e=t)}),a)return isEmptyLadiPage(n[e])?e:n[e].format("").trim();var o=this.formatNumber(t,3,null,{VND:0,USD:2,EUR:2,GBP:2,SGD:2,MYR:2,HKD:2,TWD:0,THB:0,PHP:0,KHR:0,LAK:0,IDR:0,INR:0}[e]||0);return i&&(o=isEmptyLadiPage(n[e])?o+" "+e:n[e].format(o)),o},LadiPageScriptV2.prototype.formatNumber=function(t,e,i,a){if(void 0!=t){void 0==i&&(i=0),void 0==a&&(a=0);var n="\\d(?=(\\d{"+(e||3)+"})+"+(a>0?"\\.":"$")+")";t=t.toFixed(Math.max(0,~~a)).replace(new RegExp(n,"g"),"$&,");var o=null,r=null;i>=1&&(r=(o=t.split("."))[0],t=r=new Array(i-r.length+1).join("0")+r,2==o.length&&(t+="."+o[1])),a>=1&&2==(o=t.split(".")).length&&(r=o[1],r=new Array(a-r.length+1).join("0")+r,t=o[0]+"."+r)}return t},LadiPageScriptV2.prototype.setDataReplaceStr=function(t,e){this.runtime.replaceStr[t]=e},LadiPageScriptV2.prototype.getDataReplaceStr=function(t,e){var i=null;return isNullLadiPage(e)||(i=e[t]),isNullLadiPage(i)&&(i=this.runtime.replaceStr[t]),i},LadiPageScriptV2.prototype.highlightText=function(t,e,i,a){if(!isEmptyLadiPage(t)&&0!=e.length){var n=i?"gi":"g",o=[];e.forEach(function(t){o.push(t.replaceAll("|","\\|"))}),o.sort(function(t,e){return e.length-t.length});for(var r=this,d=function(t){var d=new RegExp(o.join("|"),n);if(3!==t.nodeType)r.highlightText(t,e,i,a);else if(d.test(t.textContent)){var l=document.createDocumentFragment(),s=0;t.textContent.replace(d,function(e,i){var n=document.createTextNode(t.textContent.slice(s,i)),o=null;isFunctionLadiPage(a)?o=a(e):(o=document.createElement("span")).textContent=e,l.appendChild(n),l.appendChild(o),s=i+e.length});var c=document.createTextNode(t.textContent.slice(s));l.appendChild(c),t.parentNode.replaceChild(l,t)}},l=0;l<t.childNodes.length;l++){d(t.childNodes[l])}}},LadiPageScriptV2.prototype.convertDataReplaceStr=function(t,e,i,a,n,o){var r=this,d=r.runtime.replacePrefixStart,l=r.runtime.replacePrefixEnd;r.runtime.convert_replace_str&&(d=r.runtime.replaceNewPrefixStart,l=r.runtime.replaceNewPrefixEnd);for(var s=t=isEmptyLadiPage(t)?"":t,c=new RegExp(d+"[^"+d+"$"+l+"]*"+l,"gi"),u=null,p=[],m=function(t){if(a)p.push(t);else{var i=t,c=i.split("|");i=c[0].substr(d.length),1==c.length&&(i=i.substr(0,i.length-l.length));var u=r.getDataReplaceStr(i,n);if(isEmptyLadiPage(u))if(c.length>1){var m=r.randomInt(1,c.length-1);u=c[m],m==c.length-1&&(u=u.substr(0,u.length-l.length))}else u="";e&&(isArrayLadiPage(u)&&u.length>1&&(u=JSON.stringify(u)),u=encodeURIComponent(u)),s=o&&isArrayLadiPage(u)&&u.length>1?u:s.replaceAll(t,u)}};null!==(u=c.exec(t));)u.index===c.lastIndex&&c.lastIndex++,u.forEach(m);return p=p.unique(),r.highlightText(i,p,!0,function(t){var e=document.createElement("span");return e.setAttribute("data-replace-str",t),e}),r.runtime.isDesktop&&e&&!isEmptyLadiPage(s)&&["fb://profile/","fb://page/?id=","fb://page/"].forEach(function(t){s.startsWith(t)&&(s=s.replaceAll(t,"https://www.facebook.com/"))}),s},LadiPageScriptV2.prototype.setDataReplaceElement=function(t,e,i,a,n){var o=isEmptyLadiPage(a)?document:document.getElementById(a);if(!isEmptyLadiPage(o)){for(var r=o.querySelectorAll("span[data-replace-str]"),d=0;d<r.length;d++){var l=r[d].getAttribute("data-replace-str");r[d].innerHTML=this.convertDataReplaceStr(l,!1,null,!1,i)}for(var s=o.querySelectorAll("a[data-replace-href]"),c=0;c<s.length;c++){var u=s[c].getAttribute("data-replace-href");u=this.convertDataReplaceStr(u,!0,null,!1,i),s[c].href=u}for(var p=o.querySelectorAll(".ladi-element .ladi-form-item-container [name]"),m=0;m<p.length;m++){var g=null,_=null,y=!1,f=null,v=p[m].getAttribute("type");if(v=isEmptyLadiPage(v)?v:v.trim(),t){var P=p[m].getAttribute("name").trim();(y=!0)&&-1==n.indexOf(P)&&(y=!1),y&&"country"==P&&"true"==p[m].getAttribute("data-is-select-country")&&(y=!1),y&&(g=this.getDataReplaceStr(P,i))}if(!y){if(f=this.findAncestor(p[m],"ladi-element"),isEmptyLadiPage(f))continue;var L=this.runtime.eventData[f.id];if(isEmptyLadiPage(L))continue;var h=L["option.input_default_value"];if(isEmptyLadiPage(h))continue;var E=!1;"INPUT"==p[m].tagName&&"checkbox"==v&&(E=!0),g=this.convertDataReplaceStr(h,!1,null,!1,i,E)}if(!isNullLadiPage(g)){if(_=isArrayLadiPage(g)?g[0]:g,_=isNullLadiPage(_)?"":_,_=String(_),"INPUT"==p[m].tagName)if("checkbox"==v||"radio"==v){var A=!1;if("checkbox"==v){var b=g;isArrayLadiPage(b)||(b=[b]),A=-1!=b.indexOf(p[m].getAttribute("value"))}"radio"==v&&(A=p[m].getAttribute("value")==_.trim()),A?(p[m].checked=!0,e&&p[m].setAttribute("checked","checked")):(p[m].checked=!1,e&&p[m].removeAttribute("checked"));var T=this.findAncestor(p[m],"ladi-form-checkbox-item");if(!isEmptyLadiPage(T)){var w=T.querySelector("span");isEmptyLadiPage(w)||w.setAttribute("data-checked",p[m].checked)}}else f=this.findAncestor(p[m],"ladi-element"),(isEmptyLadiPage(f)||"true"!=f.getAttribute("data-quantity"))&&(p[m].value=_.trim(),e&&p[m].setAttribute("value",p[m].value));if("TEXTAREA"==p[m].tagName&&(p[m].value=_.trim(),e&&(p[m].innerHTML=p[m].value)),"SELECT"==p[m].tagName){var S=p[m].querySelector('option[value="'+_.trim()+'"]');if(!isEmptyLadiPage(S)&&(p[m].value=S.getAttribute("value"),e&&!S.hasAttribute("selected"))){for(var O=p[m].querySelectorAll("option"),C=0;C<O.length;C++)O[C].removeAttribute("selected");S.setAttribute("selected","selected")}}}}}},LadiPageScriptV2.prototype.setDataReplaceStart=function(){for(var t=document.querySelectorAll(".ladi-headline, .ladi-paragraph, .ladi-list-paragraph ul"),e=0;e<t.length;e++)this.convertDataReplaceStr(t[e].innerHTML,!1,t[e],!0);this.setDataReplaceElement(!0,!0,null,null,Object.keys(this.runtime.replaceStr))},LadiPageScriptV2.prototype.runLimitRequest=function(t,e){var i=this,a=1e3/t;if(i.runtime.tmp.time_limit_request_next>Date.now())return i.runTimeout(function(){i.runLimitRequest(t,e)},a/5);i.runtime.tmp.time_limit_request_next=Date.now()+a,isFunctionLadiPage(e)&&e()},LadiPageScriptV2.prototype.showMessage=function(t,e,i){if(t=this.convertDataReplaceStr(t,!1,null,!1,e),this.runtime.has_popupx)this.runtime.tmp.popupx_show_message_callback=i,this.runtime.tmp.runActionPopupX({message:t,action:{type:"show_message"}});else{var a=document.getElementsByClassName("ladipage-message")[0];if(isEmptyLadiPage(a)||a.parentElement.removeChild(a),isEmptyLadiPage(t))return void(isFunctionLadiPage(i)&&i());(a=document.createElement("div")).className="ladipage-message",document.body.appendChild(a);var n=document.createElement("div");n.className="ladipage-message-box",a.appendChild(n);var o=document.createElement("span");n.appendChild(o),o.textContent=this.const.LANG.ALERT_TITLE;var r=document.createElement("div");r.className="ladipage-message-text",n.appendChild(r),r.innerHTML=t;var d=document.createElement("button");d.className="ladipage-message-close",n.appendChild(d),d.textContent=this.const.LANG.ALERT_BUTTON_TEXT,d.focus(),d.addEventListener("click",function(t){t.stopPropagation(),a.parentElement.removeChild(a),isFunctionLadiPage(i)&&i()})}},LadiPageScriptV2.prototype.getTextClipboard=function(t,e){var i=function(i){isFunctionLadiPage(e)&&(i=isEmptyLadiPage(i)?isEmptyLadiPage(t)?"":t:i,e(!0,i))},a=function(){try{var t=document.createElement("textarea");t.setAttribute("style","position: fixed; top: 0, left: 0, width: 1px; height: 1px; opacity: 0;"),document.body.appendChild(t),t.focus();var a=document.execCommand("paste"),n=t.value;if(t.parentElement.removeChild(t),a)return void i(n)}catch(t){}isFunctionLadiPage(e)&&e(!1,null)};window.navigator.clipboard?window.navigator.clipboard.readText().then(i).catch(a):a()},LadiPageScriptV2.prototype.copyTextClipboard=function(t,e){var i=function(){isFunctionLadiPage(e)&&e(!0,t)},a=function(){try{var a=document.createElement("textarea");a.setAttribute("style","position: fixed; top: 0, left: 0, width: 1px; height: 1px; opacity: 0;"),document.body.appendChild(a),a.value=t,a.select();var n=document.execCommand("copy");if(a.parentElement.removeChild(a),n)return void i()}catch(t){}isFunctionLadiPage(e)&&e(!1,null)};window.navigator.clipboard?window.navigator.clipboard.writeText(t).then(i).catch(a):a()},LadiPageScriptV2.prototype.fireEvent=function(t,e,i){t=isStringLadiPage(t)?document.querySelector(t):t;var a=document.createEvent("HTMLEvents");(a.initEvent(e,!0,!0),isObjectLadiPage(i))&&Object.keys(i).forEach(function(t){a[t]=i[t]});return!t.dispatchEvent(a)},LadiPageScriptV2.prototype.tapEventListener=function(t,e){var i=this,a=function(t){isFunctionLadiPage(e)&&e(t)};if(t.addEventListener("click",a),"ontouchstart"in window){var n=0,o=0,r=i.getWidthDevice(),d=Math.max(1,Math.floor(.01*r)),l=null;t.addEventListener("touchstart",function(e){e=i.getEventCursorData(e),i.removeTimeout(l),n=e.screenX,o=e.screenY,t.removeEventListener("click",a)},i.runtime.scrollEventPassive),t.addEventListener("touchend",function(e){e=i.getEventCursorData(e),Math.abs(e.screenX-n)<=d&&Math.abs(e.screenY-o)<=d&&a(e),l=i.runTimeout(function(){t.addEventListener("click",a)},i.runtime.time_click)})}},LadiPageScriptV2.prototype.findAncestor=function(t,e){e=isArrayLadiPage(e)?e:[e];for(var i=function(t,e){if(isNullLadiPage(t)||isNullLadiPage(t.classList)||!t.classList.contains(e))for(;(t=t.parentElement)&&!t.classList.contains(e););return t},a=0;a<e.length&&(t=i(t,e[a]),!isEmptyLadiPage(t));a++);return t},LadiPageScriptV2.prototype.createStyleElement=function(t,e){var i=document.getElementById(t);return isEmptyLadiPage(i)&&((i=document.createElement("style")).id=t,i.type="text/css",document.head.appendChild(i)),i.innerHTML!=e&&(i.innerHTML=e),i},LadiPageScriptV2.prototype.createTmpElement=function(t,e,i,a,n){var o=document.createElement(t);isEmptyLadiPage(i)||Object.keys(i).forEach(function(t){o.setAttribute(t,i[t])});var r=document.createElement("div");return r.appendChild(o),a?o.outerHTML=e:o.innerHTML=e,n?r:r.firstChild},LadiPageScriptV2.prototype.getSource2ndClick=function(t){var e=this.runtime.eventData[t];if(!isEmptyLadiPage(e))return"image"==e.type&&e[this.runtime.device+".option.image_setting.2nd_click"]?e[this.runtime.device+".option.image_setting.source_2nd_click"]:"shape"==e.type&&e["option.shape_setting.2nd_click"]?e[this.runtime.device+".option.shape_setting.source_2nd_click"]:void 0},LadiPageScriptV2.prototype.getCountdownTime=function(t,e){var i=Math.floor(t/1e3),a=i%86400,n=a%3600,o=Math.floor(i/86400),r=Math.floor(a/3600),d=Math.floor(n/60),l=n%60;o=o<0?0:o,r=r<0?0:r,d=d<0?0:d,l=l<0?0:l,o=o<10?"0"+o:o,r=r<10?"0"+r:r,d=d<10?"0"+d:d,l=l<10?"0"+l:l;var s={};return s[this.const.COUNTDOWN_ITEM_TYPE.day]=o,s[this.const.COUNTDOWN_ITEM_TYPE.hour]=r,s[this.const.COUNTDOWN_ITEM_TYPE.minute]=d,s[this.const.COUNTDOWN_ITEM_TYPE.seconds]=l,isEmptyLadiPage(e)?s:s[e]},LadiPageScriptV2.prototype.getElementBoundingClientRect=function(t){isStringLadiPage(t)&&(t=document.getElementById(t));var e=t.getBoundingClientRect();return(isNullLadiPage(e.x)||isNullLadiPage(e.y))&&(e.x=e.left,e.y=e.top),e},LadiPageScriptV2.prototype.getElementViewBox=function(t){var e={x:0,y:0,width:0,height:0},i=t.getAttribute("viewBox").split(" ");return e.x=parseFloatLadiPage(i[0])||0,e.y=parseFloatLadiPage(i[1])||0,e.width=parseFloatLadiPage(i[2])||0,e.height=parseFloatLadiPage(i[3])||0,e},LadiPageScriptV2.prototype.getEventCursorData=function(t){return["pageX","pageY","screenX","screenY"].forEach(function(e){isNullLadiPage(t[e])&&(!isEmptyLadiPage(t.touches)&&t.touches.length>0?t[e]=t.touches[0][e]:!isEmptyLadiPage(t.targetTouches)&&t.targetTouches.length>0?t[e]=t.targetTouches[0][e]:!isEmptyLadiPage(t.changedTouches)&&t.changedTouches.length>0&&(t[e]=t.changedTouches[0][e]))}),t},LadiPageScriptV2.prototype.getElementAHref=function(t,e){var i=document.createElement("a");return!e||t.toLowerCase().startsWith("http://")||t.toLowerCase().startsWith("https://")||t.startsWith("//")||(t="http://"+t),i.href=t,i},LadiPageScriptV2.prototype.loadScript=function(t,e,i,a,n){var o=document.createElement("script");(o.type="text/javascript",isFunctionLadiPage(i)&&(a=i,i=e,e=null),i&&(o.async=!0),isObjectLadiPage(e))&&Object.keys(e).forEach(function(t){"defer"==t||"async"==t?o[t]=e[t]:o.setAttribute(t,e[t])});o.addEventListener("load",a),o.src=t,isObjectLadiPage(n)&&n.hasOwnProperty("elm")?n.elm.appendChild(o):document.head.appendChild(o)},LadiPageScriptV2.prototype.loadCss=function(t,e){var i=document.createElement("link");(i.rel="stylesheet",isObjectLadiPage(e))&&Object.keys(e).forEach(function(t){i.setAttribute(t,e[t])});i.href=t,document.head.appendChild(i)},LadiPageScriptV2.prototype.showLoadingBlur=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript);var e=document.getElementsByClassName("ladi-loading")[0];isEmptyLadiPage(e)&&((e=document.createElement("div")).className="ladi-loading",e.innerHTML='<div class="loading"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>',document.body.appendChild(e))},LadiPageScriptV2.prototype.hideLoadingBlur=function(){var t=this;t instanceof LadiPageScriptV2||(t=LadiPageScript);var e=document.getElementsByClassName("ladi-loading")[0];isEmptyLadiPage(e)||e.parentElement.removeChild(e)},LadiPageScriptV2.prototype.isLoadingBlur=function(){var t=document.getElementsByClassName("ladi-loading")[0];return!isEmptyLadiPage(t)},LadiPageScriptV2.prototype.randomId=function(){var t=Date.now(),e=window.performance&&window.performance.now&&1e3*window.performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var a=16*Math.random();return t>0?(a=(t+a)%16|0,t=Math.floor(t/16)):(a=(e+a)%16|0,e=Math.floor(e/16)),("x"===i?a:3&a|8).toString(16)})},LadiPageScriptV2.prototype.decodeValue=function(t){var e=this;isObjectLadiPage(t)&&Object.keys(t).forEach(function(i){t[i]=e.decodeValue(t[i])});if(isArrayLadiPage(t))for(var i=0;i<t.length;i++)t[i]=e.decodeValue(t[i]);return isStringLadiPage(t)&&(t=t.decode()),t},LadiPageScriptV2.prototype.run=function(t){var e=this;if(e.runtime.isLoadHtmlGlobal){e.runTimeout(function(){e.runtime.shopping&&isNullLadiPage(e.runShopping)&&e.loadScript(e.const.CDN_LIBRARY_JS_URL+"ladipage.shopping.min.js?v="+e.runtime.version,{defer:!0},null,null,{elm:document.body}),e.runtime.formdata&&isNullLadiPage(e.runFormData)&&e.loadScript(e.const.CDN_LIBRARY_JS_URL+"ladipage.formdata.min.js?v="+e.runtime.version,{defer:!0},null,null,{elm:document.body}),e.trackingInit(e.runtime.data_delay_js),e.customScriptDelayInit()},e.runtime.time_delay_js),e.const.LANG=isObjectLadiPage(e.const["LANG"+e.runtime.lang])?e.const["LANG"+e.runtime.lang]:e.const.LANG,e.runtime.isIE=!!document.documentMode,e.runtime.isIE=e.runtime.isIE?e.runtime.isIE:!e.runtime.isIE&&!!window.StyleMedia,e.runtime.scrollEventPassive=null;try{var i=Object.defineProperty({},"passive",{get:function(){e.runtime.scrollEventPassive={passive:!0}}});window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(t){}e.runtime.isClient=t,e.runtime.timenow=window.ladi("_timenow").get_cookie(),isEmptyLadiPage(e.runtime.timenow)?(e.runtime.timenow=Date.now(),window.ladi("_timenow").set_cookie(e.runtime.timenow,1)):e.runtime.timenow=parseFloatLadiPage(e.runtime.timenow)||0;try{e.runtime.widthScrollBar=window.innerWidth-document.documentElement.clientWidth}catch(t){}if(isStringLadiPage(e.runtime.eventData))try{var a=decodeURIComponentLadiPage(e.runtime.eventData);e.runtime.eventData=JSON.parse(a)}catch(t){var n=e.runtime.eventData.replaceAll(/&amp;/g,"&").replaceAll(/&gt;/g,">").replaceAll(/&lt;/g,"<").replaceAll(/&quot;/g,'"');n=n.replaceAll("\r\n","").replaceAll("\n",""),e.runtime.eventData=JSON.parse(n)}else{var o=document.getElementById("script_event_data");if(!isEmptyLadiPage(o))try{e.runtime.eventData=JSON.parse(o.innerHTML),e.runtime.eventData=e.deOptimizeEventData(e.copy(e.runtime.eventData),e.const.OPTIMIZE_EVENT_DATA_KEY_LIST,"OPTIMIZE_EVENT_DATA_KEY_LIST"),e.runtime.eventData=e.decodeValue(e.runtime.eventData)}catch(t){}}isNullLadiPage(window.ladi_is_desktop)?e.runtime.isDesktop=t?!/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(window.navigator.userAgent.toLowerCase()):LadiPage.isDesktop():e.runtime.isDesktop=t?window.ladi_is_desktop:LadiPage.isDesktop(),e.runtime.isBrowserDesktop=!("ontouchstart"in window),e.runtime.device=e.runtime.isDesktop?e.const.DESKTOP:e.const.MOBILE,e.runtime.tmp.isFirstScroll=!0,e.runtime.tmp.capture_form_data_last={},e.runtime.tmp.product_info={},e.runtime.tmp.timeout_product_info={},e.runtime.tmp.product_tag_info={},e.runtime.tmp.timeout_product_tag_info={},e.runtime.tmp.dataset_check_load=!1,e.runtime.tmp.dataset_data={},e.runtime.tmp.timeout_dataset_data={},e.runtime.tmp.cart=[],e.runtime.tmp.add_to_cart_discount=0,e.runtime.tmp.add_to_cart_fee_shipping=0,e.runtime.tmp.is_click_add_to_cart=!1,e.runtime.tmp.is_click_check_price_discount=!1,e.runtime.tmp.current_use_coupon=null;var r=Object.keys(e.runtime.eventDataGlobal);r.forEach(function(t){e.runtime.eventData[t]=e.runtime.eventDataGlobal[t],delete e.runtime.eventDataGlobal[t]}),(r=Object.keys(e.runtime.eventData)).forEach(function(t){var i=null,a=null;Object.keys(e.runtime.eventData[t]).forEach(function(n){n.toLowerCase().startsWith(e.const.DEVICE)&&(i=e.const.DESKTOP+n.substring(e.const.DEVICE.length),a=e.const.MOBILE+n.substring(e.const.DEVICE.length),e.runtime.eventData[t][i]=e.runtime.eventData[t][n],e.runtime.eventData[t][a]=e.runtime.eventData[t][n],delete e.runtime.eventData[t][n]),e.runtime.isDesktop&&n.toLowerCase().startsWith(e.const.DESKTOP)&&(a=e.const.MOBILE+n.substring(e.const.DESKTOP.length),e.runtime.eventData[t][a]=e.runtime.eventData[t][n]),!e.runtime.isDesktop&&n.toLowerCase().startsWith(e.const.MOBILE)&&(i=e.const.DESKTOP+n.substring(e.const.MOBILE.length),e.runtime.eventData[t][i]=e.runtime.eventData[t][n])})});try{var d=window.ladi("LADI_DATA").get_cookie();e.runtime.tmp.cookie_ladi_data=d,d=JSON.parse(Base64.decode(d||Base64.encode("{}"))),Object.keys(d).forEach(function(t){e.setDataReplaceStr(t,d[t])})}catch(t){}e.runtime.tmp.convertFormDataObjectCountry=function(t){var i=e.copy(t);return isObjectLadiPage(i)&&e.runtime.list_set_value_name_country.forEach(function(t){if(!isEmptyLadiPage(i[t])){var e=i[t].split(":");e.length>1&&e.shift(),i[t]=e.join(":")}}),i};var l=e.getURLSearchParams(null,null,!0),s=e.getURLSearchParams(window.location.search,null,!0),c=e.runtime.tmp.convertFormDataObjectCountry(l),u=Object.keys(c),p="";u.forEach(function(t){if(t!=e.const.TRACKING_NAME&&t!=e.const.ACCESS_KEY_NAME){if(e.setDataReplaceStr(t,c[t]),"products"==t&&isStringLadiPage(c[t])){var i=c[t].split("|");2==i.length&&-1==u.indexOf("product_id")&&e.setDataReplaceStr("product_value",i[0]),2==i.length&&-1==u.indexOf("product_name")&&e.setDataReplaceStr("product_name",i[1])}(isArrayLadiPage(s[t])?s[t]:[s[t]]).forEach(function(e){isEmptyLadiPage(p)?p+="?":p+="&",p+=t+"="+encodeURIComponent(e)})}}),window.ladi(e.const.TRACKING_NAME).delete_cookie("/"),p!=window.location.search&&e.historyReplaceState(window.location.pathname+p+window.location.hash);var m=s[e.const.REF_NAME];isEmptyLadiPage(m)?m=window.ladi("ladi_ref").get_cookie():window.ladi("ladi_ref").set_cookie(m,90,"/",window.location.host);var g=Object.keys(e.runtime.eventData),_=[],y=window.ladi("LADI_CLIENT_ID").get_cookie(),f=parseFloatLadiPage(window.ladi("LADI_PAGE_VIEW").get_cookie())||0,v=parseFloatLadiPage(window.ladi("LADI_FORM_SUBMIT").get_cookie())||0,P=window.ladi("LADI_FUNNEL_NEXT_URL").get_cookie(),L=window.ladi("LADI_CAMP_ID").get_cookie(),h=window.ladi("LADI_CAMP_NAME").get_cookie(),E=window.ladi("LADI_CAMP_TYPE").get_cookie(),A=window.ladi("LADI_CAMP_TARGET_URL").get_cookie(),b=window.ladi("LADI_CAMP_ORIGIN_URL").get_cookie(),T=parseFloatLadiPage(window.ladi("LADI_CAMP_PAGE_VIEW").get_cookie())||0,w=parseFloatLadiPage(window.ladi("LADI_CAMP_FORM_SUBMIT").get_cookie())||0,S=function(t,i,a){if("FormSubmit"==t&&isEmptyLadiPage(y))isFunctionLadiPage(a)&&a();else if(!e.runtime.is_popupx||e.runtime.has_popupx){var n=e.runtime.publish_platform,o=e.runtime.store_id,r=e.runtime.time_zone,d=window.location.host,l=window.location.href,s=e.runtime.ladipage_id,c={event:t,pixel_id:o,time_zone:r,domain:d,url:l,ladipage_id:s,publish_platform:n,data:[]};Object.keys(i).forEach(function(t){c[t]=i[t]}),e.runtime.is_popupx&&(c.type="POPUPX",c.origin_store_id=e.runtime.tmp.popupx_origin_store_id,c.origin_referer=e.runtime.tmp.popupx_origin_referer,c.origin_domain=e.runtime.tmp.popupx_origin_domain,c.origin_url=e.runtime.tmp.popupx_origin_url,c.element_id=e.runtime.tmp.popupx_current_element_id,isEmptyLadiPage(c.element_id))?e.runTimeout(function(){S(t,i,a)},100):("FormSubmit"==t&&(isEmptyLadiPage(L)?v++:(A==b&&v++,w++),window.ladi("LADI_CAMP_FORM_SUBMIT").set_cookie(w,3650),window.ladi("LADI_FORM_SUBMIT").set_cookie(v,3650),e.runtime.is_popupx&&e.runtime.tmp.runActionPopupX({action:{type:"set_submit_form"}})),"PageView"==t&&e.runtime.has_popupx&&(f++,window.ladi("LADI_PAGE_VIEW").set_cookie(f,3650)),"FormSubmit"!=t&&"PageView"!=t||isEmptyLadiPage(e.runtime.tmp.cookie_ladi_data)||!e.runtime.is_popupx&&isEmptyLadiPage(L)||(c.ladi_data=e.runtime.tmp.cookie_ladi_data),e.sendRequest("POST",e.const.API_ANALYTICS_EVENT,JSON.stringify(c),!0,{"Content-Type":"application/json",LADI_CLIENT_ID:y,LADI_PAGE_VIEW:f,LADI_FORM_SUBMIT:v,LADI_CAMP_ID:L,LADI_CAMP_NAME:h,LADI_CAMP_TYPE:E,LADI_CAMP_TARGET_URL:A,LADI_CAMP_ORIGIN_URL:b,LADI_CAMP_PAGE_VIEW:T,LADI_CAMP_FORM_SUBMIT:w},function(t,e,i){i.readyState==XMLHttpRequest.DONE&&isFunctionLadiPage(a)&&a(e,t)}))}else e.runTimeout(function(){S(t,i,a)},100)},O=function(t,i,a,n){var o=null,r=null,d=null,l=0;if(isEmptyLadiPage(i)||"POPUP_PRODUCT"!=i.id)if(isEmptyLadiPage(i)||"POPUP_BLOG"!=i.id)isFunctionLadiPage(n)&&n();else{if(o=e.generateVariantProduct(a,!1,null,null,null,null,!0,!0,function(e){O(t,i,a,n)}),!isObjectLadiPage(o)||!isObjectLadiPage(o.product)||!isObjectLadiPage(o.store_info))return;var s=function(){var t,a,c=!0;if(Object.keys(o.product).forEach(function(t){if(c&&isStringLadiPage(o.product[t])&&o.product[t].startsWith(e.const.DATASET_CONTENT_SOURCE_URL)&&o.product[t].endsWith(e.const.DATASET_CONTENT_SOURCE_ENDSWITH)){var i=o.product[t].replaceAll(e.const.DATASET_CONTENT_SOURCE_URL,e.const.API_DATASET_BLOG);c=!1,e.showLoadingBlur(),e.sendRequest("GET",i,null,!0,null,function(e,i,a){a.readyState==XMLHttpRequest.DONE&&(o.product[t]=e,s())})}}),c){e.hideLoadingBlur(),i.classList.add("opacity-0"),r=document.querySelectorAll("#"+i.id+" .ladi-element");var u=null,p=function(t){e.removeTimeout(u);var a=function(t,i){var a=e.findAncestor(t.parentElement,"ladi-element");e.updateHeightElement(!0,t,a,i,t.clientHeight)};u=e.runTimeout(function(){e.showParentVisibility(r[0],function(){for(l=0;l<r.length;l++){if(r[l].querySelectorAll(".ladi-headline, .ladi-paragraph").length>0&&r[l].hasAttribute("data-height")){var t=parseFloatLadiPage(r[l].getAttribute("data-height"))||0;t!=r[l].clientHeight&&(r[l].setAttribute("data-height",r[l].clientHeight),a(r[l],t))}}}),e.runShowPopup(!0,i.id,null,null,!0)},isEmptyLadiPage(t)?0:100)};e.showParentVisibility(r[0],function(){for(l=0;l<r.length;l++){r[l].querySelectorAll(".ladi-headline, .ladi-paragraph").length>0&&!r[l].hasAttribute("data-height")&&r[l].setAttribute("data-height",r[l].clientHeight)}});var m=function(t){(!e.runtime.isDesktop||isEmptyLadiPage(t.getAttribute("height"))&&isEmptyLadiPage(t.style.getPropertyValue("height")))&&(t.addEventListener("load",p),t.addEventListener("error",p))};for(l=0;l<r.length;l++)e.runtime.tmp.runLadiSaleProductKey(r[l].id,!1,!1,d,o,!0,null,!0),t=r[l],void 0,a=e.runtime.eventData[t.id],isFunctionLadiPage(e.runtime.tmp.runOptionAction)&&isObjectLadiPage(a)&&e.runtime.tmp.runOptionAction(t,t.id,a.type,a,o);for(l=0;l<r.length;l++)for(var g=r[l].querySelectorAll(".ladi-headline img, .ladi-paragraph img"),_=0;_<g.length;_++)m(g[_]);isFunctionLadiPage(n)&&n(),p(),e.runTimeout(function(){i.classList.remove("opacity-0")},150)}};s()}else{if(o=e.generateVariantProduct(a,!1,null,null,null,null,!0,!0,function(e){O(t,i,a,n)}),!isObjectLadiPage(o)||!isObjectLadiPage(o.store_info)||!isObjectLadiPage(o.product)||!isArrayLadiPage(o.product.variants)||o.product.variants.length<=0)return;if(isEmptyLadiPage(a["option.product_variant_id"])){d=o.product.variants[0];var c=e.findAncestor(t,"ladi-collection-item"),u=null;if(isEmptyLadiPage(c)){for(var p=document.querySelectorAll('[data-variant="true"] select[data-store-id="'+o.store_info.id+'"][data-product-id="'+o.product.product_id+'"]'),m=0;m<p.length;m++)if(isEmptyLadiPage(e.findAncestor(p[m],"ladi-collection-item"))){u=p[m];break}}else u=c.querySelector('[data-variant="true"]');if(!isEmptyLadiPage(u)){u=e.findAncestor(u,"ladi-element");var g=e.getProductVariantId(u,o.product);isEmptyLadiPage(g)||(d=o.product.variants.find(function(t){return t.product_variant_id==g}))}}else d=o.product.variants.find(function(t){return t.product_variant_id==a["option.product_variant_id"]});if(isEmptyLadiPage(d))return;var _=function(t){var i=e.runtime.eventData[t.id];isFunctionLadiPage(e.runtime.tmp.runOptionAction)&&isObjectLadiPage(i)&&e.runtime.tmp.runOptionAction(t,t.id,i.type,i,o)};for(r=document.querySelectorAll("#"+i.id+" .ladi-element"),l=0;l<r.length;l++)e.runtime.tmp.runLadiSaleProductKey(r[l].id,!1,!1,d,o),_(r[l]);isFunctionLadiPage(n)&&n()}},C=function(t,i){i=isArrayLadiPage(i)?i:[];var a=e.runtime.eventData[t.id],n=i.findIndex(function(t){return t.action_type==e.const.ACTION_TYPE.complete&&(t.type==e.const.DATA_ACTION_TYPE.popup||t.type==e.const.DATA_ACTION_TYPE.popup_cart||t.type==e.const.DATA_ACTION_TYPE.popup_checkout)});n=-1!=n,i.forEach(function(i){if(i.action_type==e.const.ACTION_TYPE.complete){var o=null,r=null;if(i.type==e.const.DATA_ACTION_TYPE.section){var d=0,l=document.getElementById(i.action);if(!isEmptyLadiPage(l)){if(n)return void window.ladi(l.id).scroll(!1,!0);if(o=e.findAncestor(t,"ladi-popup"),!isEmptyLadiPage(o)){var s=e.findAncestor(o,"ladi-element");s.hasAttribute("data-popup-backdrop")&&(window.ladi(s.id).hide(),d=100)}e.runTimeout(function(){window.ladi(l.id).scroll()},d)}}if(i.type==e.const.DATA_ACTION_TYPE.popup&&(o=document.getElementById(i.action),isEmptyLadiPage(o)||O(t,o,a,function(){window.ladi(i.action).show()})),i.type==e.const.DATA_ACTION_TYPE.hidden_show&&(isArrayLadiPage(i.hidden_ids)&&i.hidden_ids.forEach(function(t){window.ladi(t).hide()}),isArrayLadiPage(i.show_ids)&&i.show_ids.forEach(function(t){window.ladi(t).show()})),i.type==e.const.DATA_ACTION_TYPE.change_index&&(r=window.ladi(i.action),isFunctionLadiPage(r[i.change_index_type])?r[i.change_index_type]():r.index(i.change_index_number||1)),i.type==e.const.DATA_ACTION_TYPE.set_value&&(r=window.ladi(i.action),isEmptyLadiPage(r)||(i.is_clipboard?e.getTextClipboard(i.str,function(e,a){r.value(e?a:i.str),I(t,e,!0)}):r.value(i.str))),i.type==e.const.DATA_ACTION_TYPE.link){var c=i.action;isEmptyLadiPage(c)||(c=e.getLinkUTMRedirect(c,null),c=e.convertDataReplaceStr(c,!0),window.ladi(c).open_url(i.target,i.nofollow))}}})},I=function(t,i,a){var n=parseFloatLadiPage(t.getAttribute("data-timeout-id-copied"))||0;e.removeTimeout(n);var o="hint-{0}-middle-s-small-hint-anim-d-short",r=!0;e.getElementBoundingClientRect(t).y<35&&(r=!1),r?(t.classList.add(o.format("top")),t.classList.remove(o.format("bottom"))):(t.classList.remove(o.format("top")),t.classList.add(o.format("bottom"))),i?a?t.setAttribute("data-hint",e.const.LANG.PASTED):t.setAttribute("data-hint",e.const.LANG.COPIED):t.setAttribute("data-hint",e.const.LANG.FAILED),n=e.runTimeout(function(){t.classList.remove(o.format("top")),t.classList.remove(o.format("bottom")),t.removeAttribute("data-hint"),t.removeAttribute("data-timeout-id-copied")},1e3),t.setAttribute("data-timeout-id-copied",n)},N=function(t,i,a,n,o){if(t=t||document.getElementById(i),!isEmptyLadiPage(t)){var r=function(t){if(!isEmptyLadiPage(t))return"true"==t.getAttribute("data-dropbox")?t:r(t.parentElement)},d=function(t,e){if("false"==t.getAttribute("data-click"))return!1;var i=r(e.target);if(!isEmptyLadiPage(i)){var a=document.getElementById(i.getAttribute("data-from-doc-id"));if(!isEmptyLadiPage(a))return a.id!=t.id&&d(t,{target:a})}return!0},l=function(){return e.runtime.count_click_dom[t.id]||0},s=function(t){var i=l();return t.action_type==e.const.ACTION_TYPE.action||(t.action_type==e.const.ACTION_TYPE["1st_click"]&&i%2==1||(t.action_type==e.const.ACTION_TYPE["2nd_click"]&&i%2==0||void 0))};t.addEventListener("click",function(){e.runtime.count_click_dom[t.id]=l()+1});var c=n["option.is_submit_form"],u=n["option.data_submit_form_id"];if(!n["option.action_funnel"]||isEmptyLadiPage(P))if(!c||isEmptyLadiPage(u)){var p=n["option.data_event"];if(!isArrayLadiPage(p)&&(p=[],isObjectLadiPage(n["option.data_action"]))){var m=e.copy(n["option.data_action"]);m.action_type=e.const.ACTION_TYPE.action,p.push(m)}var g=e.getSource2ndClick(t.id);isEmptyLadiPage(g)||(t.classList.add("is-2nd-click"),p.push({action_type:e.const.ACTION_TYPE.action,type:e.const.DATA_ACTION_TYPE.set_value_2nd,source:g}));var _=function(e,i){return I(t,e,!1)},y=p.findIndex(function(t){return t.action_type==e.const.ACTION_TYPE.action&&(t.type==e.const.DATA_ACTION_TYPE.popup||t.type==e.const.DATA_ACTION_TYPE.popup_cart||t.type==e.const.DATA_ACTION_TYPE.popup_checkout)});y=-1!=y;var f=0;p.forEach(function(a){if(a.action_type==e.const.ACTION_TYPE.action||a.action_type==e.const.ACTION_TYPE["1st_click"]||a.action_type==e.const.ACTION_TYPE["2nd_click"]){if(f++,a.type==e.const.DATA_ACTION_TYPE.set_value_2nd&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=window.ladi(t.id,t);isEmptyLadiPage(i)||i.set_value_2nd(a.source)}}),a.type==e.const.DATA_ACTION_TYPE.link){var r=null;t.addEventListener("click",function(i){d(t,i)&&s(a)&&"true"==t.getAttribute("data-action")&&(r=a.action,isEmptyLadiPage(a.action_mapping)||(r=a.action_mapping),isEmptyLadiPage(r)||(r=e.getLinkUTMRedirect(r,null),r=e.convertDataReplaceStr(r,!0),window.ladi(r).open_url(a.target,a.nofollow)))});var l=function(){if(isNullLadiPage(o)&&(o=e.generateVariantProduct(n,!1,null,null,null,null,!0,!0,l)),isObjectLadiPage(o)&&isObjectLadiPage(o.store_info)&&isObjectLadiPage(o.product)){r=a.action;var i=a.link_mapping;isEmptyLadiPage(i)&&(i=a.link_mapping_custom),isEmptyLadiPage(i)||(a.action_mapping=o.product[i],isEmptyLadiPage(a.action_mapping)||(r=a.action_mapping)),isEmptyLadiPage(r)?(t.removeAttribute("data-replace-href"),t.removeAttribute("href")):(r=e.getLinkUTMRedirect(r,null),t.setAttribute("data-replace-href",r),t.href=e.convertDataReplaceStr(r,!0))}};l()}if(a.type==e.const.DATA_ACTION_TYPE.email&&t.addEventListener("click",function(e){d(t,e)&&s(a)&&("true"!=t.getAttribute("data-action")||isEmptyLadiPage(a.action)||window.ladi("mailto:"+a.action).open_url())}),a.type==e.const.DATA_ACTION_TYPE.phone&&t.addEventListener("click",function(e){d(t,e)&&s(a)&&("true"!=t.getAttribute("data-action")||isEmptyLadiPage(a.action)||window.ladi("tel:"+a.action).open_url())}),a.type==e.const.DATA_ACTION_TYPE.collapse&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=document.getElementById(a.action);isEmptyLadiPage(i)||window.ladi(a.action).collapse()}}),a.type==e.const.DATA_ACTION_TYPE.section&&t.addEventListener("click",function(i){if(d(t,i)&&s(a)){var n=0,o=document.getElementById(a.action);if(!isEmptyLadiPage(o)){if(y)return void window.ladi(o.id).scroll(!1,!0);var r=e.findAncestor(t,"ladi-popup");if(!isEmptyLadiPage(r)){var l=e.findAncestor(r,"ladi-element");l.hasAttribute("data-popup-backdrop")&&(window.ladi(l.id).hide(),n=100)}e.runTimeout(function(){window.ladi(o.id).scroll()},n)}}}),a.type==e.const.DATA_ACTION_TYPE.popup&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=document.getElementById(a.action);isEmptyLadiPage(i)||O(t,i,n,function(){window.ladi(a.action).show()})}}),a.type==e.const.DATA_ACTION_TYPE.dropbox&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=document.getElementById(a.action);isEmptyLadiPage(i)||window.ladi(a.action).showDropbox(t,a.dropbox,!1)}}),a.type==e.const.DATA_ACTION_TYPE.hidden_show&&t.addEventListener("click",function(e){d(t,e)&&s(a)&&(isArrayLadiPage(a.hidden_ids)&&a.hidden_ids.forEach(function(t){window.ladi(t).hide()}),isArrayLadiPage(a.show_ids)&&a.show_ids.forEach(function(t){window.ladi(t).show()}))}),a.type==e.const.DATA_ACTION_TYPE.change_index&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=window.ladi(a.action);isEmptyLadiPage(i)||(isFunctionLadiPage(i[a.change_index_type])?i[a.change_index_type]():i.index(a.change_index_number||1))}}),a.type==e.const.DATA_ACTION_TYPE.set_style){var c=window.ladi(a.action);isEmptyLadiPage(c)||c.set_style(t,a,!0),t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=window.ladi(a.action);isEmptyLadiPage(i)||i.set_style(t,a)}})}a.type==e.const.DATA_ACTION_TYPE.set_value&&t.addEventListener("click",function(i){if(d(t,i)&&s(a)){var n=window.ladi(a.action);isEmptyLadiPage(n)||(a.is_clipboard?e.getTextClipboard(a.str,function(e,i){n.value(e?i:a.str),I(t,e,!0)}):n.value(a.str))}}),a.type==e.const.DATA_ACTION_TYPE.copy_clipboard&&t.addEventListener("click",function(i){if(d(t,i)&&s(a)){var n=null,o=window.ladi(a.action);isEmptyLadiPage(o)||(n=o.value(null,null,{only_text:!0})),n=isEmptyLadiPage(n)?a.str:n,isEmptyLadiPage(n)||e.copyTextClipboard(n,_)}});var u=null;if(a.type==e.const.DATA_ACTION_TYPE.lightbox?u=a.lightbox_type:"lightbox_image"==a.type?u=e.const.DATA_ACTION_LIGHTBOX_TYPE.image:"lightbox_video"==a.type?u=e.const.DATA_ACTION_LIGHTBOX_TYPE.video:"lightbox_iframe"==a.type&&(u=e.const.DATA_ACTION_LIGHTBOX_TYPE.iframe),u==e.const.DATA_ACTION_LIGHTBOX_TYPE.image&&t.addEventListener("click",function(i){if(d(t,i)&&s(a)){var n=a.image_url;isEmptyLadiPage(n)&&(n=a["image_url_"+e.runtime.device]),lightbox_image(n)}}),u==e.const.DATA_ACTION_LIGHTBOX_TYPE.video){var p=document.querySelectorAll("#"+i+".preload").length>0;p&&lightbox_video(a.video_url,a.video_type,p),t.addEventListener("click",function(e){d(t,e)&&s(a)&&lightbox_video(a.video_url,a.video_type,!1)})}u==e.const.DATA_ACTION_LIGHTBOX_TYPE.iframe&&t.addEventListener("click",function(e){d(t,e)&&s(a)&&lightbox_iframe(a.iframe_url)}),a.type==e.const.DATA_ACTION_TYPE.popup_cart&&t.addEventListener("click",function(e){if(d(t,e)&&s(a)){var i=document.getElementById("POPUP_CART");isEmptyLadiPage(i)||window.ladi(i.id).show()}}),a.type==e.const.DATA_ACTION_TYPE.popup_checkout&&t.addEventListener("click",function(i){d(t,i)&&s(a)&&(e.runtime.shopping_third_party?e.getThirdPartyCheckoutUrl(!0):window.ladi("POPUP_CHECKOUT").show())})}}),e.runEventTracking(i,{count_data_event:f,is_click:!0,is_form:!1},null,t,d)}else t.addEventListener("click",function(e){if(d(t,e)){var i=document.getElementById(u);isEmptyLadiPage(i)||i.setAttribute("data-button-submit-other",t.id),window.ladi(u).submit()}});else t.addEventListener("click",function(a){if(d(t,a)){a.preventDefault();var n=P;n=e.getLinkUTMRedirect(n,null),n=e.convertDataReplaceStr(n,!0),window.ladi(n).open_url(),e.runEventTracking(i,{is_form:!1})}})}},k=function(t,i,a,n){if(t=t||document.getElementById(i),!isEmptyLadiPage(t)){if(!isArrayLadiPage(n)){var o=e.copy(n);n=[],isObjectLadiPage(o)&&(o.action_type=e.const.ACTION_TYPE.hover,n.push(o))}n.forEach(function(i){if(i.action_type==e.const.ACTION_TYPE.hover&&(i.type==e.const.DATA_ACTION_TYPE.dropbox&&(t.addEventListener("mouseenter",function(e){window.ladi(i.action).showDropbox(t,i.dropbox,!0)}),t.addEventListener("mouseleave",function(t){window.ladi(i.action).hide()})),i.type==e.const.DATA_ACTION_TYPE.hidden_show&&(t.addEventListener("mouseenter",function(t){isArrayLadiPage(i.hidden_ids)&&i.hidden_ids.forEach(function(t){window.ladi(t).hide()}),isArrayLadiPage(i.show_ids)&&i.show_ids.forEach(function(t){window.ladi(t).show()})}),t.addEventListener("mouseleave",function(t){isArrayLadiPage(i.hidden_ids)&&i.hidden_ids.forEach(function(t){window.ladi(t).show()}),isArrayLadiPage(i.show_ids)&&i.show_ids.forEach(function(t){window.ladi(t).hide()})})),i.type==e.const.DATA_ACTION_TYPE.change_index&&t.addEventListener("mouseenter",function(t){var e=window.ladi(i.action);isFunctionLadiPage(e[i.change_index_type])?e[i.change_index_type]():e.index(i.change_index_number||1)}),i.type==e.const.DATA_ACTION_TYPE.set_style)){var a=window.ladi(i.action);isEmptyLadiPage(a)||a.set_style(t,i,!0),t.addEventListener("mouseenter",function(e){window.ladi(i.action).set_style(t,i)}),t.addEventListener("mouseleave",function(e){window.ladi(i.action).remove_style(t,i)})}})}},D=function(t){var i=document.getElementById(t);if(!isEmptyLadiPage(i)&&t!=e.runtime.builder_section_popup_id&&t!=e.runtime.builder_section_background_id){var a=i.classList.contains("ladi-section")?"section":null;if(e.runtime.is_popupx&&"section"==a){var n=document.createElement("div");n.className="ladi-section-close",n.addEventListener("click",function(e){e.stopPropagation(),window.ladi(t).hide()}),i.appendChild(n)}}},x=function(t,i,a,n,o,r,d,l){"countdown"!=a||isEmptyLadiPage(n)||(i=i||document.getElementById(t),isEmptyLadiPage(i)||(i.setAttribute("data-type",n),n!=e.const.COUNTDOWN_TYPE.countdown||isEmptyLadiPage(o)||i.setAttribute("data-minute",o),n!=e.const.COUNTDOWN_TYPE.endtime||isEmptyLadiPage(l)||i.setAttribute("data-endtime",l),n!=e.const.COUNTDOWN_TYPE.daily||isEmptyLadiPage(r)||isEmptyLadiPage(d)||(i.setAttribute("data-daily-start",r),i.setAttribute("data-daily-end",d))))},R=function(t,e,i,a){"countdown_item"!=i||isEmptyLadiPage(a)||(e=e||document.getElementById(t),isEmptyLadiPage(e)||e.setAttribute("data-item-type",a))},B=function(){g.forEach(function(t){var i=document.getElementById(t);if(!isEmptyLadiPage(i)&&"true"!=i.getAttribute("data-action")){var a=e.runtime.eventData[t],n=a["option.data_event"];if(!isArrayLadiPage(n)&&(n=[],isObjectLadiPage(a["option.data_action"]))){var o=e.copy(a["option.data_action"]);o.action_type=e.const.ACTION_TYPE.action,n.push(o)}!function(t,i){i.forEach(function(i){if(i.action_type==e.const.ACTION_TYPE.action&&i.type==e.const.DATA_ACTION_TYPE.link)if(isEmptyLadiPage(t.getAttribute("href")))t.removeAttribute("href");else{var a=e.getLinkUTMRedirect(t.href,null);t.setAttribute("data-replace-href",a),t.href=e.convertDataReplaceStr(a,!0)}})}(i,n)}});for(var t=document.querySelectorAll(".ladi-headline a[href], .ladi-paragraph a[href], .ladi-list-paragraph a[href]"),i=0;i<t.length;i++)if(isEmptyLadiPage(t[i].getAttribute("href")))t[i].removeAttribute("href");else{var a=e.getLinkUTMRedirect(t[i].href,null);t[i].setAttribute("data-replace-href",a),t[i].href=e.convertDataReplaceStr(a,!0)}},F=function(){for(var t=1e3,i=0;i<LadiPageQueueCommandList.length;i++){var a=LadiPageQueueCommandList[i];if(isFunctionLadiPage(a.callback1)&&a.callback1()){try{isFunctionLadiPage(a.callback2)&&a.callback2()}catch(t){}LadiPageQueueCommandList.splice(i,1),t=0;break}}e.runTimeout(F,t)},M=function(){if(t){var i=function(){if(e.runtime.ladipage_powered_by_classname=e.randomString(e.randomInt(6,32)),e.runtime.isClient){var t=document.createElement("div");document.body.insertBefore(t,document.body.childNodes[e.randomInt(0,document.body.childNodes.length)]),t.className=e.runtime.ladipage_powered_by_classname;var i="."+e.runtime.ladipage_powered_by_classname+' {width: 140px; height: 30px; position: fixed; bottom: -40px; left: 10px; z-index: 10000000000; background: url("'+e.const.POWERED_BY_IMAGE+'") no-repeat center #fafafa; background-size: 90% 70%; border-radius: 4px 4px 0 0; display: none; animation: '+e.runtime.ladipage_powered_by_classname+" 10s;} @keyframes "+e.runtime.ladipage_powered_by_classname+" {0% {bottom: -40px;} 10% {bottom: 0;} 90% {bottom: 0;} 100% {bottom: -40px;}}",a=document.createElement("style");a.type="text/css",document.head.insertBefore(a,document.head.childNodes[e.randomInt(0,document.head.childNodes.length)]),a.innerHTML=i,e.runTimeout(function(){isEmptyLadiPage(t)||t.parentElement.removeChild(t),isEmptyLadiPage(a)||a.parentElement.removeChild(a)},1e4)}},a=!1,n=isArrayLadiPage(e.runtime.DOMAIN_FREE)?e.runtime.DOMAIN_FREE:[],o=window.location.href;["/",".","/"].forEach(function(t){for(;o.endsWith(t);)o=o.substr(0,o.length-t.length)});var r=e.getElementAHref(o).host.toLowerCase();n.forEach(function(t){a||(a=r.endsWith(t.toLowerCase()))}),a&&e.runTimeout(i,3e3),S("PageView",{},function(t,n){if(-1!=t||a||e.runTimeout(i,3e3),200==t){var o=JSON.parse(n),r=!1,d=null,l=null;isObjectLadiPage(o.data)?(r=1==o.data.verified_domain,d=o.data.google_captcha,l=o.data.places_autocomplete):r=1==o.data,a||r||e.runTimeout(i,3e3),isObjectLadiPage(d)&&function(t,i,a){if(!isEmptyLadiPage(t)){var n=!1;a.type==e.const.FORM_CONFIG_TYPE.google_recaptcha_enterprise&&(i=!0),a.type==e.const.FORM_CONFIG_TYPE.google_recaptcha_checkbox&&(n=!0),e.runtime.tmp.google_captcha={api_key:t,enterprise:i,checkbox:n,type:a.type},window.onloadRecaptchaCheckboxCallback=function(){for(var i=function(e){var i=document.createElement("div");i.className="ladi-google-recaptcha-checkbox",e.insertBefore(i,a[n]);var o=window.grecaptcha.render(i,{sitekey:t});i.setAttribute("data-widget-id",o)},a=document.querySelectorAll(".ladi-form .ladi-button"),n=0;n<a.length;n++){var o=e.findAncestor(a[n],"ladi-element"),r=e.findAncestor(o,"ladi-form");if(!isEmptyLadiPage(r)){r=e.findAncestor(r,"ladi-element");var d=e.runtime.eventData[r.id];if(!isEmptyLadiPage(d)){if(d["option.is_form_login"]||d["option.is_form_otp"]||d["option.is_form_coupon"]||d["option.is_add_to_cart"])continue;if(isObjectLadiPage(d["option.form_setting"])&&d["option.form_setting"].is_multiple&&!d["option.form_setting"].is_multiple_otp)continue}}i(o)}for(var l=document.querySelectorAll("#POPUP_CHECKOUT .ladi-button"),s=0;s<l.length;s++){var c=e.findAncestor(l[s],"ladi-element"),u=e.runtime.eventData[c.id];isEmptyLadiPage(u)||isEmptyLadiPage(u["option.data_submit_form_id"])||!u["option.is_submit_form"]||i(c)}},i?e.loadScript("https://www.google.com/recaptcha/enterprise.js?render="+t+"&hl="+e.runtime.lang):n?e.loadScript("https://www.google.com/recaptcha/api.js?onload=onloadRecaptchaCheckboxCallback&render=explicit&hl="+e.runtime.lang):e.loadScript("https://www.google.com/recaptcha/api.js?render="+t)}}(d.site_key,d.enterprise,d),isObjectLadiPage(l)&&(s=l.api_key,isEmptyLadiPage(s)||(window.onloadGooglePlacesAutocompleteCallback=function(){var t=document.querySelectorAll("[data-places-autocomplete-country]"),e=null,i=0,a={},n=function(n){for(i=0;i<t.length;i++)(e=t[i].querySelector('input[name="address"]')).removeAttribute("data-focus");(e=n.target).setAttribute("data-focus",!0),a=e.getAttribute("data-attrs"),isEmptyLadiPage(a)&&((a={style:e.getAttribute("style"),placeholder:e.getAttribute("placeholder"),disabled:e.disabled}).style=isEmptyLadiPage(a.style)?"":a.style,a.placeholder=isEmptyLadiPage(a.placeholder)?"":a.placeholder,a.disabled=!isNullLadiPage(a.disabled)&&a.disabled,e.setAttribute("data-attrs",encodeURIComponent(JSON.stringify(a))))};for(i=0;i<t.length;i++){var o=t[i].getAttribute("data-places-autocomplete-country"),r={types:["address"]};(o=isEmptyLadiPage(o)?[]:(o=(o=o.split(",")).removeSpace()).unique()).length>0&&(r.componentRestrictions={country:o}),(e=t[i].querySelector('input[name="address"]')).addEventListener("focus",n),new google.maps.places.Autocomplete(e,r)}t.length>0&&(window.gm_authFailure=function(){for(i=0;i<t.length;i++)e=t[i].querySelector('input[name="address"]'),a=e.getAttribute("data-attrs"),a=isEmptyLadiPage(a)?{style:"",placeholder:"",disabled:!1}:JSON.parse(decodeURIComponentLadiPage(a)),e.setAttribute("style",a.style),e.setAttribute("placeholder",a.placeholder),e.disabled=a.disabled,"true"==e.getAttribute("data-focus")&&e.focus()})},e.loadScript("https://maps.googleapis.com/maps/api/js?key="+s+"&libraries=places&callback=onloadGooglePlacesAutocompleteCallback")))}var s})}},V=function(t,i,a,n){if(isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_view)&&isEmptyLadiPage(e.runtime.current_element_mouse_down_gallery_control)){var o=t.getAttribute("data-runtime-id");if(isEmptyLadiPage(e.runtime.timeout_gallery[o])&&(!e.runtime.tmp.gallery_playing_video||!i)){var r=t.getElementsByClassName("ladi-gallery-view-item"),d=t.getElementsByClassName("ladi-gallery-control-item");if(0!=r.length&&0!=r.length){var l=t.getAttribute("data-is-next")||"true";l="true"==l.toLowerCase();var s=parseFloatLadiPage(t.getAttribute("data-current"))||0,c=parseFloatLadiPage(t.getAttribute("data-max-item"))||0;i?l?s>=c-1?(s=c-2,l=!1):s++:s<=0?(s=1,l=!0):s--:l?s++:s--,s<0&&(s=0),s>=c-1&&(s=c-1),isEmptyLadiPage(a)&&(a=l?"next":"prev"),isEmptyLadiPage(n)&&(n=l?"left":"right"),e.runtime.tmp.gallery_playing_video&&!r[s].classList.contains("selected")&&e.pauseAllVideo(),r[s].classList.add(a);var u=t.querySelectorAll(".ladi-gallery-view-item.selected")[0];isEmptyLadiPage(u)||u.classList.add(n);var p=1e3*(parseFloatLadiPage(getComputedStyle(r[s]).transitionDuration)||0);e.runtime.timeout_gallery[o]=e.runTimeout(function(){r[s].classList.add(n),e.runtime.timeout_gallery[o]=e.runTimeout(function(){for(var t=0;t<r.length;t++)t==s?r[t].classList.add("selected"):r[t].classList.remove("selected"),r[t].style.removeProperty("left"),r[t].classList.remove(a),r[t].classList.remove(n);delete e.runtime.timeout_gallery[o]},p-5)},5);for(var m=0;m<d.length;m++)(parseFloatLadiPage(d[m].getAttribute("data-index"))||0)==s?d[m].classList.add("selected"):d[m].classList.remove("selected");var g=e.getElementBoundingClientRect(t),_=e.getElementBoundingClientRect(t.getElementsByClassName("ladi-gallery-control-item")[s]);if(t.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.remove("opacity-0"),t.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),t.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||t.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom")){var y=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control")[0]).width)||0,f=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control-item")[s]).width)||0,v=_.x-g.x-(y-f)/2;v=-(v-=parseFloatLadiPage(t.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("left"))||0)>0?0:-v;var P=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0;v<(P=(P=-(P-=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control")[0]).width)||0))>0?0:P)&&(v=P),t.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("left",v+"px"),v>=0&&t.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),v<=P&&t.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}else{var L=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control")[0]).height)||0,h=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control-item")[s]).height)||0,E=_.y-g.y-(L-h)/2;E=-(E-=parseFloatLadiPage(t.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("top"))||0)>0?0:-E;var A=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control-box")[0]).height)||0;E<(A=(A=-(A-=parseFloatLadiPage(getComputedStyle(t.getElementsByClassName("ladi-gallery-control")[0]).height)||0))>0?0:A)&&(E=A),t.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("top",E+"px"),E>=0&&t.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),E<=A&&t.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}t.setAttribute("data-is-next",l),t.setAttribute("data-current",s),t.getElementsByClassName("ladi-gallery-view-arrow-left")[0].classList.remove("opacity-0"),t.getElementsByClassName("ladi-gallery-view-arrow-right")[0].classList.remove("opacity-0"),s<=0&&t.getElementsByClassName("ladi-gallery-view-arrow-left")[0].classList.add("opacity-0"),s>=c-1&&t.getElementsByClassName("ladi-gallery-view-arrow-right")[0].classList.add("opacity-0"),(t.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-left")||t.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-right"))&&e.reloadLazyload(!1),!i&&t.hasAttribute("data-loaded")&&t.setAttribute("data-stop",!0)}}}},q=function(t,i,a){var n=i.getAttribute("data-video-type"),o=i.getAttribute("data-video-url"),r=i.getAttribute("data-index"),d=t.getAttribute("data-runtime-id")+"_"+r+"_player",l=document.getElementById(d);a||(e.pauseAllVideo(),e.runtime.tmp.gallery_playing_video=!0),isEmptyLadiPage(l)?(n==e.const.VIDEO_TYPE.youtube&&(l=document.createElement("iframe"),i.parentElement.insertBefore(l,i.nextSibling),l.outerHTML='<iframe id="'+d+'" class="iframe-video-preload" data-video-type="'+n+'" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',e.runEventPlayVideo(d,n,o,!1,!1,!0,a,!1,!0)),n==e.const.VIDEO_TYPE.direct&&(l=document.createElement("video"),i.parentElement.insertBefore(l,i.nextSibling),l.outerHTML='<video id="'+d+'" class="iframe-video-preload" data-video-type="'+n+'" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; object-fit: cover;"></video>',e.runEventPlayVideo(d,n,o,!1,!1,!0,a,!1,!0))):e.runEventReplayVideo(d,n,!0)},Y=function(t,i,a,n){if("gallery"==n&&(a||(i=document.getElementById(t)),!isEmptyLadiPage(i))){var o=i.getElementsByClassName("ladi-gallery-control-item").length;i.setAttribute("data-max-item",o),i.setAttribute("data-runtime-id",e.randomString(10));var r=function(t){t.stopPropagation(),q(i,t.target,!1)},d=i.classList.contains("preload");if(o>0){for(var l=0;l<o;l++){var s=i.getElementsByClassName("ladi-gallery-view-item")[l];isEmptyLadiPage(s)||(d&&q(i,s,d),s.classList.contains("play-video")&&s.addEventListener("click",r))}i.setAttribute("data-current",0),i.setAttribute("data-is-next",!0)}for(var c=i.getElementsByClassName("ladi-gallery-view-arrow"),u=0;u<c.length;u++)o<=1?c[u].classList.add("ladi-hidden"):c[u].classList.remove("ladi-hidden")}},U=function(t,i){t.stopPropagation();var a=e.runtime.eventData[i.id],n=a[e.runtime.device+".option.gallery_control.autoplay"],o=a[e.runtime.device+".option.gallery_control.autoplay_time"],r=0;n&&!isEmptyLadiPage(o)&&(r=o);var d=parseFloatLadiPage(t.target.getAttribute("data-index"))||0,l=null,s=null;(parseFloatLadiPage(i.getAttribute("data-current"))||0)>d?(l="prev",s="right"):(l="next",s="left");var c=i.getAttribute("data-is-next")||"true";(c="true"==c.toLowerCase())?d--:d++,i.setAttribute("data-current",d),i.setAttribute("data-next-time",Date.now()+1e3*r),V(i,!1,l,s)},H=function(){g.forEach(function(t){var i=e.runtime.eventData[t];if("gallery"==i.type)for(var a=document.querySelectorAll("#"+t),n=0;n<a.length;n++){var o=a[n];if("true"==o.getAttribute("data-scrolled")&&"true"!=o.getAttribute("data-stop")){var r=i[e.runtime.device+".option.gallery_control.autoplay"],d=i[e.runtime.device+".option.gallery_control.autoplay_time"],l=0;if(r&&!isEmptyLadiPage(d)&&(l=d),l>0){var s=o.getAttribute("data-next-time"),c=Date.now();isEmptyLadiPage(s)&&(s=c+1e3*(l-1),o.setAttribute("data-next-time",s)),c>=s&&(V(o,!0),o.setAttribute("data-next-time",c+1e3*l))}}}})},j=function(t,i){var a=e.runtime.eventData[t];if("gallery"==a.type){var n=i.getAttribute("data-runtime-id");if(!i.hasAttribute("data-scrolled")){i.setAttribute("data-scrolled",!1);e.runtime.list_scroll_func[n]=function(){i.setAttribute("data-scrolled",!0)}}var o=a[e.runtime.device+".option.gallery_control.autoplay"],r=a[e.runtime.device+".option.gallery_control.autoplay_time"],d=0;o&&!isEmptyLadiPage(r)&&(d=r);var l=function(t){U(t,i)},s=function(t){if(t.stopPropagation(),!(t=e.getEventCursorData(t)).target.classList.contains("ladi-gallery-view-arrow")){var a=i.getAttribute("data-runtime-id");isEmptyLadiPage(e.runtime.timeout_gallery[a])&&(e.runtime.current_element_mouse_down_gallery_view=a,e.runtime.current_element_mouse_down_gallery_view_position_x=t.pageX)}},c=function(t){t.stopPropagation(),t=e.getEventCursorData(t),(i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom"))&&(t.target.classList.contains("ladi-gallery-control-arrow")||(e.runtime.current_element_mouse_down_gallery_control=n,e.runtime.current_element_mouse_down_gallery_control_time=Date.now(),e.runtime.current_element_mouse_down_gallery_control_position_x=t.pageX,i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("transition-duration","0ms"),i.getElementsByClassName("ladi-gallery-control-box")[0].setAttribute("data-left",getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).left)))};i.getElementsByClassName("ladi-gallery-view-arrow-left")[0].addEventListener("click",function(t){t.stopPropagation(),i.setAttribute("data-is-next",!1),i.setAttribute("data-next-time",Date.now()+1e3*d),V(i,!1)}),i.getElementsByClassName("ladi-gallery-view-item").length>1&&i.getElementsByClassName("ladi-gallery-view-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-view-arrow-right")[0].addEventListener("click",function(t){t.stopPropagation(),i.setAttribute("data-is-next",!0),i.setAttribute("data-next-time",Date.now()+1e3*d),V(i,!1)}),i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].addEventListener("click",function(t){t.stopPropagation();var e=i.getElementsByClassName("ladi-gallery-control-item")[0];if(!isEmptyLadiPage(e)){var a=getComputedStyle(e);if(i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom")){var n=(parseFloatLadiPage(a.width)||0)+(parseFloatLadiPage(a.marginRight)||0);n+=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("left"))||0;var o=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0;o=(o=-(o-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0))>0?0:o,n>0&&(n=0),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("left",n+"px"),n>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),n<=o&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}else{var r=(parseFloatLadiPage(a.height)||0)+(parseFloatLadiPage(a.marginBottom)||0);r+=parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("top"))||0;var l=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).height)||0;l=(l=-(l-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).height)||0))>0?0:l,r>0&&(r=0),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("top",r+"px"),r>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),r<=l&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}i.setAttribute("data-next-time",Date.now()+1e3*d)}}),(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0)>(parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0)&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].addEventListener("click",function(t){t.stopPropagation();var e=i.getElementsByClassName("ladi-gallery-control-item")[0];if(!isEmptyLadiPage(e)){var a=getComputedStyle(e);if(i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.remove("opacity-0"),i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-top")||i.getElementsByClassName("ladi-gallery")[0].classList.contains("ladi-gallery-bottom")){var n=(parseFloatLadiPage(a.width)||0)+(parseFloatLadiPage(a.marginRight)||0);n=-n+(parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("left"))||0);var o=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).width)||0;n<(o=(o=-(o-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).width)||0))>0?0:o)&&(n=o),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("left",n+"px"),n>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),n<=o&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}else{var r=(parseFloatLadiPage(a.height)||0)+(parseFloatLadiPage(a.marginBottom)||0);r=-r+(parseFloatLadiPage(i.getElementsByClassName("ladi-gallery-control-box")[0].style.getPropertyValue("top"))||0);var l=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control-box")[0]).height)||0;r<(l=(l=-(l-=parseFloatLadiPage(getComputedStyle(i.getElementsByClassName("ladi-gallery-control")[0]).height)||0))>0?0:l)&&(r=l),i.getElementsByClassName("ladi-gallery-control-box")[0].style.setProperty("top",r+"px"),r>=0&&i.getElementsByClassName("ladi-gallery-control-arrow-left")[0].classList.add("opacity-0"),r<=l&&i.getElementsByClassName("ladi-gallery-control-arrow-right")[0].classList.add("opacity-0")}i.setAttribute("data-next-time",Date.now()+1e3*d)}}),i.getElementsByClassName("ladi-gallery-view")[0].addEventListener("mousedown",s),i.getElementsByClassName("ladi-gallery-view")[0].addEventListener("touchstart",s,e.runtime.scrollEventPassive),i.getElementsByClassName("ladi-gallery-control")[0].addEventListener("mousedown",c),i.getElementsByClassName("ladi-gallery-control")[0].addEventListener("touchstart",c,e.runtime.scrollEventPassive);for(var u=i.getElementsByClassName("ladi-gallery-control-item"),p=0;p<u.length;p++)u[p].addEventListener("click",l);isEmptyLadiPage(a["option.product_mapping_name"])&&!i.hasAttribute("data-loaded")&&e.runTimeout(function(){i.setAttribute("data-loaded",!0)},300)}},G=function(t,i){if((isEmptyLadiPage(e.runtime.timenext_carousel[t])||!(e.runtime.timenext_carousel[t]>Date.now()))&&isEmptyLadiPage(e.runtime.current_element_mouse_down_carousel)){var a=document.getElementById(t);if(!isEmptyLadiPage(a)){var n=a.getAttribute("data-is-next")||"true";n="true"==n.toLowerCase();var o=parseFloatLadiPage(a.getAttribute("data-current"))||0,r=parseFloatLadiPage(e.runtime.eventData[t][e.runtime.device+".option.carousel_crop.width"])||0;if(!((parseFloatLadiPage(getComputedStyle(a).width)||0)>=r)){var d=parseFloatLadiPage(e.runtime.eventData[t][e.runtime.device+".option.carousel_crop.width_item"])||0;d>a.clientWidth&&(d=a.clientWidth);var l=Math.ceil(r/d);i?n?o>=l-1?(o=l-2,n=!1):o++:o<=0?(o=1,n=!0):o--:n?o++:o--,o<0&&(o=0),o>=l-1&&(o=l-1);var s=1e3*(parseFloatLadiPage(getComputedStyle(a.getElementsByClassName("ladi-carousel-content")[0]).transitionDuration)||0);e.runtime.timenext_carousel[t]=Date.now()+s;var c=e.getElementBoundingClientRect(a),u=c.x+o*d-c.x-(a.clientWidth-d)/2;u=-u>0?0:-u;var p=-(r-a.clientWidth);u<p&&(u=p),a.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("left",u+"px"),a.setAttribute("data-is-next",n),a.setAttribute("data-current",o),i||a.setAttribute("data-stop",!0);var m=a.getElementsByClassName("ladi-carousel-arrow-left")[0],g=a.getElementsByClassName("ladi-carousel-arrow-right")[0];isEmptyLadiPage(m)||m.classList.remove("opacity-0"),isEmptyLadiPage(g)||g.classList.remove("opacity-0"),u>=0&&m.classList.add("opacity-0"),u<=p&&g.classList.add("opacity-0")}}}},W=function(t,i){var a=function(t){t.addEventListener("click",function(i){i.stopPropagation(),t.classList.contains("accordion-menu")&&e.runtime.time_click_dom[t.id]>Date.now()||(e.runtime.time_click_dom[t.id]=Date.now()+250,t.classList.contains("selected")?t.classList.remove("selected"):t.classList.add("selected"))})},n=[];i?t.classList.contains("element-click-selected")&&n.push(t):n=document.getElementsByClassName("element-click-selected");for(var o=0;o<n.length;o++)a(n[o])},z=function(t){if(e.runtime.isClient&&!e.runtime.isDesktop&&!isEmptyLadiPage(e.runtime.bodyFontSize)){var i=(parseFloatLadiPage(getComputedStyle(document.body).fontSize)||0)/e.runtime.bodyFontSize;if(1!=i)for(var a=document.querySelectorAll(".ladi-paragraph, .ladi-list-paragraph, .ladi-headline, .ladi-countdown, .ladi-form, .ladi-table, .ladi-spin-lucky"),n=0;n<a.length;n++){var o=(parseFloatLadiPage(getComputedStyle(a[n]).fontSize)||0)/(i*i);a[n].style.setProperty("font-size",o+"px")}else t>Date.now()&&e.runTimeout(function(){z(t)},100)}},X=function(t){var e=null;return isEmptyLadiPage(t)||(e=t.classList.contains("no-value")?null:t.getAttribute("data-value")),e=isEmptyLadiPage(e)?"":e},K=function(t,e){var i=t.querySelectorAll(".ladi-form-label-item");e=isEmptyLadiPage(e)?"":e;for(var a=0;a<i.length;a++){X(i[a])==e?i[a].classList.add("selected"):i[a].classList.remove("selected")}},Q=function(t){var e=t.querySelector(".ladi-form-label-item.selected");return X(e)},J=function(t,i){var a=t.target;if(a.classList.contains("disabled"))for(var n=e.findAncestor(a,"ladi-element").querySelectorAll(".ladi-form-label-item"),o=0;o<n.length;o++)n[o].classList.contains("no-value")?n[o].classList.add("selected"):n[o].classList.remove("selected"),n[o].classList.remove("disabled");var r=X(a);!t.is_fire_event&&a.classList.contains("selected")&&(r="");var d=e.findAncestor(a,"ladi-form-label-container");K(d,r),isFunctionLadiPage(i)&&i(d)},$=function(i,a,n,o){if("form"==a){var r=e.runtime.eventData[i];if(!isEmptyLadiPage(r)&&r["option.is_add_to_cart"]){var d=document.getElementById(i);if(!isEmptyLadiPage(d)&&(!n||isEmptyLadiPage(e.findAncestor(d,"ladi-collection-item")))){var l=d.querySelector('[data-variant="true"]');if(!isEmptyLadiPage(l)){var s=e.runtime.eventData[l.id];if(!isEmptyLadiPage(s)){var c=r["option.product_type"],u=r["option.product_id"];if(!isEmptyLadiPage(c)&&!isEmptyLadiPage(u)){var p=e.generateVariantProduct(r,!1,null,null,null,null,!0,!0,function(t){$(i,a,n,o)});if(!(isEmptyLadiPage(p)||isEmptyLadiPage(p.store_info)||isEmptyLadiPage(p.product))){var m=e.generateVariantProduct(r,!0,s["option.product_variant_type"],s["option.product_variant_title"],s["option.product_variant_price"],s["option.input_tabindex"],t,!0,function(t){$(i,a,n,o)}),g=function(t){e.updateProductVariantSelectOption(t,r,s,o,function(){if(o){var a=e.generateVariantProduct(r,!1,null,null,null,null,!0,!0),n=e.getProductVariantId(t.target,a.product);if(!isArrayLadiPage(a.product.variants))return;var d=a.product.variants.find(function(t){return t.product_variant_id==n});if(isEmptyLadiPage(d))return;for(var l=document.querySelectorAll("#POPUP_PRODUCT .ladi-element"),s=0;s<l.length;s++)l[s].id!=i&&e.runtime.tmp.runLadiSaleProductKey(l[s].id,!1,!0,d,a)}else e.runtime.tmp.generateLadiSaleProduct(!1,!0,t)})},_=function(t){J(t,function(t){g({target:t})})};e.showParentVisibility(l,function(){for(var t=l.clientHeight,i=t,a=l.querySelectorAll("select.ladi-form-control"),n={},o=0;o<a.length;o++)n[a[o].getAttribute("data-store-id")+"_"+a[o].getAttribute("data-product-id")+"_"+a[o].getAttribute("data-product-option-id")]=a[o].value;var c=l.querySelectorAll(".ladi-form-label-container");for(o=0;o<c.length;o++)n[c[o].getAttribute("data-store-id")+"_"+c[o].getAttribute("data-product-id")+"_"+c[o].getAttribute("data-product-option-id")]=Q(c[o]);l.innerHTML=m;for(var u=null,p=null,y=l.querySelectorAll("select.ladi-form-control"),f=0;f<y.length;f++)y[f].addEventListener("change",g),u=n[y[f].getAttribute("data-store-id")+"_"+y[f].getAttribute("data-product-id")+"_"+y[f].getAttribute("data-product-option-id")],isNullLadiPage(u)&&(p=y[f].querySelector("option"),isEmptyLadiPage(p)||(u=p.getAttribute("value"))),y[f].value=u;var v=l.querySelectorAll(".ladi-form-label-container");for(f=0;f<v.length;f++){for(var P=v[f].querySelectorAll(".ladi-form-label-item"),L=0;L<P.length;L++)e.tapEventListener(P[L],_);u=n[v[f].getAttribute("data-store-id")+"_"+v[f].getAttribute("data-product-id")+"_"+v[f].getAttribute("data-product-option-id")],isNullLadiPage(u)&&(p=P[1],isEmptyLadiPage(p)||(u=X(p))),K(v[f],u)}if(e.updateProductVariantSelectOptionFirst(r,s,l),s["option.product_variant_type"]!=e.const.PRODUCT_VARIANT_TYPE.combined)l.style.setProperty("height","auto"),i=l.clientHeight,l.style.removeProperty("height"),i>0&&t!=i&&(l.style.setProperty("height",i+"px"),e.updateHeightElement(!0,l,d,t,i));else if(!isEmptyLadiPage(r["option.product_variant_id"]))for(var h=0;h<y.length;h++){var E=y[h].querySelector('option[data-product-variant-id="'+r["option.product_variant_id"]+'"]');isEmptyLadiPage(E)||y[h].value==E.getAttribute("value")||(y[h].value=E.getAttribute("value"),e.fireEvent(y[h],"change"))}})}}}}}}}},Z=function(i,a,n){if(isObjectLadiPage(a)&&isObjectLadiPage(a.variant)&&isObjectLadiPage(a.product)){var o=a.variant.src;if(isEmptyLadiPage(o)&&(o=a.product.image,isObjectLadiPage(o)&&(o=o.src)),!isEmptyLadiPage(o)){!isStringLadiPage(o)||o.startsWith("http://")||o.startsWith("https://")||o.startsWith("//")||(o="https://"+e.const.STATIC_W_DOMAIN+"/"+o);var r=e.findAncestor(i,"ladi-collection-item"),d=[],l=0,s=null;if(isEmptyLadiPage(r)){var c=document.querySelectorAll("[data-runtime-id]");for(l=0;l<c.length;l++)r=e.findAncestor(c[l],"ladi-collection-item"),isEmptyLadiPage(r)&&(s=e.runtime.eventData[c[l].id],isEmptyLadiPage(s)||s["option.product_type"]!=n["option.product_type"]||s["option.product_id"]!=n["option.product_id"]||d.push(c[l]))}else d=r.querySelectorAll("[data-runtime-id]");for(l=0;l<d.length;l++)if(s=e.runtime.eventData[d[l].id],!isEmptyLadiPage(s)&&!isEmptyLadiPage(s["option.product_mapping_name"])){var u=d[l].getElementsByClassName("ladi-gallery-view")[0],p=e.getOptimizeImage(o,u.clientWidth,u.clientHeight,!0,!1,!1,t);p='url("'+p+'")';var m=e.getOptimizeImage(o,0,0,!0,!1,!1,t);m='url("'+m+'")';for(var g=u.getElementsByClassName("ladi-gallery-view-item"),_=0;_<g.length;_++)if(p==getComputedStyle(g[_]).backgroundImage||m==getComputedStyle(g[_]).backgroundImage){var y=(parseFloatLadiPage(g[_].getAttribute("data-index"))||0)+1;window.ladi(d[l].id,d[l]).index(y)}}}}},tt=function(i,a,n,o,r,d,l,s){var c=e.runtime.eventData[i];if(!isEmptyLadiPage(c)){var u=c["option.product_mapping_name"],p=!isEmptyLadiPage(u),m=c.type,_=JSON.stringify(c),y=null,f=null;if(d)y=r.product[u];else if(isEmptyLadiPage(o)){if(isEmptyLadiPage(c)||isEmptyLadiPage(c["option.product_type"])||isEmptyLadiPage(c["option.product_id"])||isEmptyLadiPage(u))return;var v=c["option.product_variant_id"],P=!1;if(isEmptyLadiPage(v)&&(a&&(P=!function(){for(var t=!1,i=0;i<g.length;i++){var a=e.runtime.eventData[g[i]];if("form"==a.type&&a["option.product_type"]==c["option.product_type"]&&a["option.product_id"]==c["option.product_id"]){t=!0;break}}return t}()),!isEmptyLadiPage(l))){if(c["option.product_id"]!=l.target.getAttribute("data-product-id"))return;var L=e.generateVariantProduct(c,!1,null,null,null,null,!0,!0,function(t){tt(i,a,n,o,r,!1,l)});isObjectLadiPage(L)&&(v=e.getProductVariantId(l.target,L.product))}if(_===(y=(f=e.generateProductKey(!0,_,!0,c,P,v,o,function(t){tt(i,a,n,o,r,d,l)})).value))return}else{if("form"==m&&c["option.is_add_to_cart"])return c["option.product_id"]=o.product_id,c["option.product_variant_id"]=o.product_variant_id,void $(i,m,!1,!0);if(!p)return;y=(y=(f=e.generateProductKey(!0,null,!0,c,!1,o.product_variant_id,o)).value)||""}var h=null,E=null,A=null;if("headline"==m||"paragraph"==m){var b=s?"ladi-html":null;window.ladi(i).value(isNullLadiPage(y)?"":y,b)}if("image"==m){if(h=document.getElementById(i),isEmptyLadiPage(h))return;A=e.getOptimizeImage(y,h.clientWidth,h.clientHeight,!0,!1,!1,t),E="style_add_to_cart_image_"+i;var T="";T=isEmptyLadiPage(A)?"#"+i+" > .ladi-image > .ladi-image-background {background-image: none;}":"#"+i+' > .ladi-image > .ladi-image-background {background-image: url("'+A+'");}',e.createStyleElement(E,T)}if("gallery"==m){if(!isArrayLadiPage(y))return;if(h=document.getElementById(i),isEmptyLadiPage(h))return;if(n&&"true"==h.getAttribute("data-loaded"))return void Z(h,f,c);for(var w=h.getElementsByClassName("ladi-gallery-view")[0],S=h.getElementsByClassName("ladi-gallery-view-item");S.length<y.length;){var O=e.createTmpElement("div",'<div class="ladi-gallery-view-item" data-index="'+S.length+'"></div>',null,!0);h.getElementsByClassName("ladi-gallery-view")[0].appendChild(O)}for(;S.length>y.length;)S[S.length-1].parentElement.removeChild(S[S.length-1]);for(var C=h.getElementsByClassName("ladi-gallery-control-item"),I=function(t){U(t,h)};C.length<y.length;){var N=e.createTmpElement("div",'<div class="ladi-gallery-control-item" data-index="'+C.length+'"></div>',null,!0);N.addEventListener("click",I),h.getElementsByClassName("ladi-gallery-control-box")[0].appendChild(N)}for(;C.length>y.length;)C[C.length-1].parentElement.removeChild(C[C.length-1]);E="style_add_to_cart_gallery_"+i;var k="";y.length<=1&&(k+="#"+i+" .ladi-gallery .ladi-gallery-view .ladi-gallery-view-arrow {display: none;}",k+="#"+i+" > .ladi-gallery > .ladi-gallery-view {height: 100%;}",k+="#"+i+" > .ladi-gallery > .ladi-gallery-control {display: none;}");var D=h.getElementsByClassName("ladi-gallery-control-item")[0];y.forEach(function(a,n){A=e.getOptimizeImage(a.src,w.clientWidth,w.clientHeight,!0,!1,!1,t),k+="#"+i+' .ladi-gallery .ladi-gallery-view-item[data-index="'+n+'"] {background-image: url("'+A+'");}',A=e.getOptimizeImage(a.src,D.clientWidth,D.clientHeight,!0,!1,!1,t),k+="#"+i+' .ladi-gallery .ladi-gallery-control-item[data-index="'+n+'"] {background-image: url("'+A+'");}'}),h.setAttribute("data-max-item",y.length),h.setAttribute("data-loaded",!0),e.createStyleElement(E,k)}}},et=function(){var t=["phone","email","coupon"],i=document.querySelectorAll(".ladi-form .ladi-button");e.runtime.tmp.list_form_checkout=[];for(var a=function(t,i){var a=e.findAncestor(t.target,"ladi-form");if(!isEmptyLadiPage(a)&&(a=a.querySelector("[data-submit-form-id]"),!isEmptyLadiPage(a))){var n=a.getAttribute("data-submit-form-id");if(!isEmptyLadiPage(n)){var o=document.querySelector("#"+n+' .ladi-form-item input[name="coupon"]');isEmptyLadiPage(o)||(o.value=t.target.value,e.fireEvent(o,i))}}},n=function(t){a(t,"change")},o=function(t){a(t,"input")},r=function(t){if(isEmptyLadiPage(e.runtime.tmp.current_use_coupon)){var i=e.findAncestor(t.target,"ladi-form"),a=i.querySelector('input[name="coupon"]');isEmptyLadiPage(a)||a.setAttribute("required","required"),i.reportValidity()&&e.reloadPriceDiscount(t)}},d=0;d<i.length;d++){var l=e.findAncestor(i[d],"ladi-element");if(!isEmptyLadiPage(l)){var s=e.findAncestor(i[d],"ladi-form");if(!isEmptyLadiPage(s)){var c=e.findAncestor(s,"ladi-element");if(!isEmptyLadiPage(c)){var u=e.runtime.eventData[c.id];if(!isEmptyLadiPage(u)){var p=e.runtime.eventData[l.id];if(isEmptyLadiPage(p)||isEmptyLadiPage(p["option.data_submit_form_id"])){if(!u["option.is_form_login"]&&!u["option.is_form_coupon"]){var m=e.findAncestor(c,"ladi-popup");isEmptyLadiPage(m)||(m=e.findAncestor(m,"ladi-element")),isEmptyLadiPage(m)||"POPUP_CHECKOUT"!=m.id||e.runtime.tmp.list_form_checkout.push(c.id)}}else if(u["option.is_form_coupon"]){l.setAttribute("data-submit-form-id",p["option.data_submit_form_id"]),l.addEventListener("click",r),s.onsubmit=function(){return!1};var g=s.querySelector('.ladi-form-item input[name="coupon"]');if(!isEmptyLadiPage(g)){g.addEventListener("change",n),g.addEventListener("input",o);var _=document.querySelector("#"+p["option.data_submit_form_id"]+' .ladi-form-item input[name="coupon"]');isEmptyLadiPage(_)||_.setAttribute("data-replace-coupon",!0)}e.runtime.tmp.list_form_checkout.push(p["option.data_submit_form_id"])}}}}}}e.runtime.tmp.list_form_checkout=e.runtime.tmp.list_form_checkout.unique();for(var y=function(t){-1==[e.const.FORM_CONFIG_TYPE.sapo,e.const.FORM_CONFIG_TYPE.haravan,e.const.FORM_CONFIG_TYPE.shopify,e.const.FORM_CONFIG_TYPE.wordpress].indexOf(e.runtime.shopping_product_type)&&e.reloadPriceDiscount()},f=0;f<e.runtime.tmp.list_form_checkout.length;f++)for(var v=document.querySelectorAll("#"+e.runtime.tmp.list_form_checkout[f]+" .ladi-form-item input.ladi-form-control"),P=0;P<v.length;P++)-1!=t.indexOf(v[P].getAttribute("name"))&&(v[P].addEventListener("change",y),v[P].addEventListener("input",y))},it=function(t){var i={type:"POPUPX",iframe_id:e.runtime.tmp.popupx_iframe_id};Object.keys(t).forEach(function(e){i[e]=t[e]}),e.postMessageWindow(window.parent,i,"*")},at=function(t){if(!e.runtime.tmp.popupx_is_desktop&&!isEmptyLadiPage(t)){var i=parseFloatLadiPage(t);window.innerWidth=i,window.outerWidth=i,window.ladi_screen_width=i,isFunctionLadiPage(window.ladi_viewport)&&window.ladi_viewport()}},nt=function(t,i,a,n){var o=isEmptyLadiPage(e.runtime.tmp.popupx_current_element_id);e.runtime.tmp.popupx_current_element_id=t,!i||o||a||n||S("PageView",{})},ot=function(t,i){for(var a=!1,n=!1,o=document.querySelectorAll("#"+e.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),r=0;r<o.length;r++)"none"!=getComputedStyle(o[r]).display&&(o[r].id==t&&(a=!0),e.runRemovePopup(o[r].id,!0,null,!1,!0));for(o=document.querySelectorAll(".ladi-section:not(#"+e.runtime.builder_section_popup_id+")"),r=0;r<o.length;r++)"none"!=getComputedStyle(o[r]).display&&(o[r].id==t&&(n=!0),window.ladi(o[r].id).hide(!0));return{isCurrentPopup:a,isCurrentSection:n}},rt=function(t,i,a){var n=e.runtime.eventData[t],o=document.getElementById(t),r=null,d=null,l=!1,s=!1,c={width_device:e.runtime.desktop_width},u=document.getElementById("style_container_desktop");if((isEmptyLadiPage(u)||"print"==u.getAttribute("media"))&&(c={width_device:e.runtime.mobile_width}),!isEmptyLadiPage(n)&&!isEmptyLadiPage(o)){var p=getComputedStyle(o);if("popup"==n.type){r={};var m=n[e.runtime.device+".option.popup_position"],g=!1;if(isObjectLadiPage(a)&&!isNullLadiPage(a.formThankyouPopupXInline)&&(g=a.formThankyouPopupXInline),g)return m==e.const.POSITION_TYPE.default?it({group_id:e.runtime.tmp.popupx_iframe_id,popupx_url:window.location.origin+window.location.pathname,ladipage_id:e.runtime.ladipage_id,action_type:"show_popupx",action_value:t,action:{type:"run_action_force"}}):dt(t,i),!0;l=(d=ot(t)).isCurrentPopup,s=d.isCurrentSection;["width","height","position","margin","top","left","bottom","right","z-index"].forEach(function(t){r[t]=p[t]}),at(r.width),c.width=r.width;var _=n[e.runtime.device+".option.popup_backdrop"];return it({id:t,position:m,data_backdrop:_,data_scale:c,is_opacity:!l,set_scroll_popup:!0,dimension:r,action:{type:"set_iframe_dimension"}}),window.ladi(t).show(!0),nt(t,i,l,s),!0}if("section"==n.type){if(l=(d=ot(t)).isCurrentPopup,s=d.isCurrentSection,n[e.runtime.device+".option.sticky"]){r={height:p.height};var y=o.getElementsByClassName("ladi-container")[0],f=getComputedStyle(y);at(f.width),c.width=f.width,c.is_sticky_bar=!0,it({id:t,data_scale:c,dimension:r,element:n,device:e.runtime.device,action:{type:"set_iframe_sticky"}}),window.ladi(t).show(!0),nt(t,i,l,s)}return!0}}return!1},dt=function(t,i){var a=e.runtime.eventData[t],n=document.getElementById(t),o=null;if(!isEmptyLadiPage(a)&&!isEmptyLadiPage(n)){var r=getComputedStyle(n),d=ot(t),l=d.isCurrentPopup,s=d.isCurrentSection,c={width_device:e.runtime.desktop_width},u=document.getElementById("style_container_desktop");if((isEmptyLadiPage(u)||"print"==u.getAttribute("media"))&&(c={width_device:e.runtime.mobile_width}),o={width:r.width,height:r.height},"popup"==a.type&&(c.width=o.width),"section"==a.type){var p=n.getElementsByClassName("ladi-container")[0],m=getComputedStyle(p);o.width=m.width,c.width=m.width,c.is_sticky_bar=!0}return at(o.width),it({id:t,data_scale:c,dimension:o,action:{type:"set_iframe_dimension"}}),window.ladi(t).show(!0),nt(t,i,l,s),!0}return!1},lt=function(t){for(var e=["style_element_desktop","style_container_desktop","style_ladi_media_desktop"],i=["style_element_mobile","style_container_mobile","style_ladi_media_mobile"],a=0;a<e.length;a++){var n=document.getElementById(e[a]);isEmptyLadiPage(n)||(t?n.removeAttribute("media"):n.setAttribute("media","print"))}for(a=0;a<i.length;a++){var o=document.getElementById(i[a]);isEmptyLadiPage(o)||(t?o.setAttribute("media","print"):o.removeAttribute("media"))}},st=function(){var t=document.querySelectorAll('[data-buy-now-ladisales="true"], [data-add-to-cart-ladisales="true"]');if(0!=t.length){var i=e.runtime.shopping_ladisales_page_checkout_api_key,a=e.runtime.shopping_ladisales_checkout_config_id;if(!isEmptyLadiPage(i)){for(var n=function(t){t.addEventListener("click",function(e){if(e.stopPropagation(),isObjectLadiPage(window.LadiSales)){var i={productID:t.getAttribute("data-product-id"),productVariantID:t.getAttribute("data-product-variant-id"),quantity:1};"true"==t.getAttribute("data-buy-now-ladisales")&&isFunctionLadiPage(window.LadiSales.buyNow)&&window.LadiSales.buyNow(i),"true"==t.getAttribute("data-add-to-cart-ladisales")&&isFunctionLadiPage(window.LadiSales.cartAdd)&&window.LadiSales.cartAdd(i)}})},o=0;o<t.length;o++)n(t[o]);var r=document.querySelector('script[src^="'+e.const.LADISALES_SDK+'"][data-time="'+e.runtime.timenow+'"]');if(isEmptyLadiPage(r)){var d=i;isEmptyLadiPage(a)||(d+="_"+a),e.loadScript(e.const.LADISALES_SDK,{id:d,"data-time":e.runtime.timenow},!0)}}}},ct=function(){var i;LadiPageShopping.push(function(){e.changeTotalPriceCart()}),e.runtime.tmp.generateLadiSaleProduct(!0),LadiPageShopping.push(function(){e.createCartData()}),e.loadDataset(null,null,null,null,null,!0,t),g.forEach(function(i){var a=e.runtime.eventData[i],n=LadiPageApp[a.type+e.const.APP_RUNTIME_PREFIX];isEmptyLadiPage(n)?(function(t,i,a,n,o,r){var d=document.getElementById(t);if(!isEmptyLadiPage(d)&&(D(t),"section"==i&&!isEmptyLadiPage(o)&&!isEmptyLadiPage(r))){var l=d.getElementsByClassName("ladi-section-background")[0];isEmptyLadiPage(l)||(e.runtime.list_scroll_func[t]=function(){if((!e.runtime.isDesktop||a==e.const.BACKGROUND_STYLE.video)&&(e.runtime.isDesktop||n==e.const.BACKGROUND_STYLE.video)){var i="",d=t+"_background_video";o==e.const.VIDEO_TYPE.youtube&&(i='<iframe id="'+d+'" class="ladi-section-background-video" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>',l.innerHTML+=i,e.runEventPlayVideo(d,o,r,!0,!0,!1)),o==e.const.VIDEO_TYPE.direct&&(i='<video id="'+d+'" class="ladi-section-background-video" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;"></video>',l.innerHTML+=i,e.runEventPlayVideo(d,o,r,!0,!0,!1))}})}}(i,a.type,a[e.const.DESKTOP+".option.background-style"],a[e.const.MOBILE+".option.background-style"],a["option.background_video.video_type"],a["option.background_video.video_value"]),N(null,i,a.type,a),function(t,i,a){e.runtime.list_loaded_func.push(function(){var n=0;if(-1!=["headline","paragraph","list_paragraph"].indexOf(i)&&(n=1e3),!isArrayLadiPage(a)){var o=e.copy(a);a=[],isObjectLadiPage(o)&&(o.action_type=e.const.ACTION_TYPE.action,a.push(o))}e.runTimeout(function(){a.forEach(function(i){if(i.action_type==e.const.ACTION_TYPE.action&&i.type==e.const.DATA_ACTION_TYPE.collapse&&!isEmptyLadiPage(i.action)&&(isNullLadiPage(i.collapse_start_is_show)||!i.collapse_start_is_show)){window.ladi(i.action).collapse(!1);for(var a=document.querySelectorAll("#"+t+" > .ladi-frame > .ladi-element.ladi-accordion-shape"),n=0;n<a.length;n++){var o=e.getSource2ndClick(a[n].id);isEmptyLadiPage(o)||window.ladi(a[n].id,a[n]).set_value_2nd(o)}}})},n)})}(i,a.type,a["option.data_event"]||a["option.data_action"]),k(null,i,a.type,a["option.data_event"]||a["option.data_hover"]),function(t,i,a,n,o,r,d){if("video"==i&&!isEmptyLadiPage(a)){var l=document.getElementById(t);if(!isEmptyLadiPage(l)){var s=function(){var i=e.runtime.eventData[t];isEmptyLadiPage(i)||(n=i["option.video_type"],a=i["option.video_value"],o=i["option.video_control"])},c=e.runtime.isDesktop&&r||!e.runtime.isDesktop&&d;if(c){var u=function(){s(),e.playVideo(t,n,a,o,c)},p=e.findAncestor(l,"ladi-popup");isEmptyLadiPage(p)?e.runtime.list_scroll_func[t]=u:(p=e.findAncestor(p,"ladi-element"),isArrayLadiPage(e.runtime.list_show_popup_func[p.id])||(e.runtime.list_show_popup_func[p.id]=[]),e.runtime.list_show_popup_func[p.id].push(u))}else{var m=document.querySelectorAll("#"+t+".preload").length>0;m&&e.playVideo(t,n,a,o,!1,m)}l.addEventListener("click",function(i){i.stopPropagation(),s(),n==e.const.VIDEO_TYPE.direct&&"VIDEO"==i.target.tagName||n==e.const.VIDEO_TYPE.youtube&&"IFRAME"==i.target.tagName||e.playVideo(t,n,a,o)})}}}(i,a.type,a["option.video_value"],a["option.video_type"],a["option.video_control"],a[e.const.DESKTOP+".option.video_autoplay"],a[e.const.MOBILE+".option.video_autoplay"]),function(t,i,a,n){"popup"==i&&a&&((isEmptyLadiPage(n)||n<0)&&(n=0),e.runTimeout(function(){window.ladi(t).show()},1e3*n))}(i,a.type,a["option.show_popup_welcome_page"],a["option.delay_popup_welcome_page"]),x(i,null,a.type,a["option.countdown_type"],a["option.countdown_minute"],a["option.countdown_daily_start"],a["option.countdown_daily_end"],a["option.countdown_endtime"]),R(i,null,a.type,a["option.countdown_item_type"]),function(t,i,a,n){if("section"==i){var o=document.getElementById(t);if(!isEmptyLadiPage(o)){var r=o.getElementsByClassName("ladi-section-arrow-down")[0];_.push(function(){if(isEmptyLadiPage(r)){if(e.runtime.isDesktop){if(isEmptyLadiPage(a))return void o.removeAttribute("data-opacity");var t=(parseFloatLadiPage(a)||0)+50;if(t>o.clientHeight)return void o.removeAttribute("data-opacity");o.setAttribute("data-height",o.clientHeight),o.style.setProperty("height",t+"px"),o.classList.add("overflow-hidden")}else{if(isEmptyLadiPage(n))return void o.removeAttribute("data-opacity");var i=(parseFloatLadiPage(n)||0)+50;if(i>o.clientHeight)return void o.removeAttribute("data-opacity");o.setAttribute("data-height",o.clientHeight),o.style.setProperty("height",i+"px"),o.classList.add("overflow-hidden")}(r=document.createElement("div")).className="ladi-section-arrow-down",o.appendChild(r),o.removeAttribute("data-opacity"),r.addEventListener("click",function(t){t.stopPropagation(),o.classList.add("transition-readmore"),o.style.removeProperty("height"),r.parentElement.removeChild(r),e.runTimeout(function(){o.classList.remove("transition-readmore"),o.classList.remove("overflow-hidden"),o.clientHeight!=o.getAttribute("data-height")&&o.style.setProperty("height",o.getAttribute("data-height")+"px"),o.removeAttribute("data-height"),e.runTimeout(e.removeSticky,100)},1e3*parseFloatLadiPage(getComputedStyle(o).transitionDuration))})}})}}}(i,a.type,a[e.const.DESKTOP+".option.readmore_range"],a[e.const.MOBILE+".option.readmore_range"]),LadiPageFormData.push(function(){e.runFormItem(i,a.type,a["option.input_type"])}),Y(i,null,!1,a.type),e.startAutoScroll(i,a.type,a[e.const.DESKTOP+".option.auto_scroll"],a[e.const.MOBILE+".option.auto_scroll"]),LadiPageShopping.push(function(){$(i,a.type,!0,!1)}),LadiPageShopping.push(function(){!function(t,i){if("form"==i){var a=document.getElementById(t);if(!isEmptyLadiPage(a)){var n=a.querySelector('input[name="quantity"]');if(!isEmptyLadiPage(n)){var o=function(i){if(!isEmptyLadiPage(i.target.value)){var a=e.runtime.eventData[t];if(!isEmptyLadiPage(a)&&a["option.is_add_to_cart"]){var n=e.generateVariantProduct(a,!1,null,null,null,null,!0,!0,function(){o(i)});if(!(isEmptyLadiPage(n)||isEmptyLadiPage(n.store_info)||isEmptyLadiPage(n.product))){var r=e.getProductVariantIndex(t,a);if(-1!=r){var d=n.product.variants[r].quantity,l=n.product.variants[r].quantity_stock;d=isNullLadiPage(l)?d:l;var s=parseInt(i.target.value)||0,c=1;c=n.product.variants[r].min_buy||c;var u=n.product.variants[r].max_buy,p=0,m=e.runtime.tmp.cart.findIndex(function(t){return t.product_id==n.product.variants[r].product_id&&t.product_variant_id==n.product.variants[r].product_variant_id});-1!=m&&(p=e.runtime.tmp.cart[m].quantity),c>s+p&&(s=c-p),1==n.product.variants[r].inventory_checked&&s+p>d&&(s=d-p),!isEmptyLadiPage(u)&&s+p>u&&(s=u-p),s=s<1?1:s,i.target.setAttribute("min",c),isEmptyLadiPage(u)||i.target.setAttribute("max",u),i.target.value=s}}}}};n.addEventListener("input",o),e.fireEvent(n,"input");var r=a.querySelectorAll(".button")[0],d=a.querySelectorAll(".button")[1];isEmptyLadiPage(r)||isEmptyLadiPage(d)||(r.addEventListener("click",function(t){n.value=(parseFloatLadiPage(n.value)||0)-1,e.fireEvent(n,"input")}),d.addEventListener("click",function(t){n.value=(parseFloatLadiPage(n.value)||0)+1,e.fireEvent(n,"input")}))}}}}(i,a.type)}),function(t,i){if("collection"==i){var a=document.getElementById(t);if(!isEmptyLadiPage(a)){var n=e.runtime.eventData[t];if(!isEmptyLadiPage(n)){var o=n["option.collection_setting.type"],r=a.getElementsByClassName("ladi-collection")[0];if(o==e.const.COLLECTION_TYPE.carousel){r.classList.add("carousel");var d=document.createElement("div");d.className="ladi-collection-arrow ladi-collection-arrow-left opacity-0";var l=document.createElement("div");l.className="ladi-collection-arrow ladi-collection-arrow-right opacity-0",r.appendChild(d),r.appendChild(l),d.addEventListener("click",function(i){i.stopPropagation();var o=parseFloatLadiPage(a.getAttribute("data-page"))||1;o=(o-=1)<1?1:o,e.loadCollectionData(t,n,o,!1)}),l.addEventListener("click",function(i){i.stopPropagation();var o=parseFloatLadiPage(a.getAttribute("data-page"))||1;if(o+=1,a.hasAttribute("data-max-page")){var r=parseFloatLadiPage(a.getAttribute("data-max-page"))||1;o=o>r?r:o}e.loadCollectionData(t,n,o,!1)})}if(o==e.const.COLLECTION_TYPE.readmore){r.classList.add("readmore");var s=document.createElement("div");s.className="ladi-collection-button-next opacity-0",r.appendChild(s),s.addEventListener("click",function(i){i.stopPropagation();var o=parseFloatLadiPage(a.getAttribute("data-page"))||1;if(o+=1,a.hasAttribute("data-max-page")){var r=parseFloatLadiPage(a.getAttribute("data-max-page"))||1;o=o>r?r:o}e.loadCollectionData(t,n,o,!1,!0)})}e.loadCollectionData(t,n,1,!0)}}}}(i,a.type),function(t,i,a,n){if("survey"==i){var o=document.getElementById(t);if(!isEmptyLadiPage(o)){a&&o.setAttribute("data-multiple",!0);for(var r,d=o.getElementsByClassName("ladi-survey-select-item")[0],l=o.getElementsByClassName("ladi-survey-radio-item"),s=o.getElementsByClassName("ladi-survey-checkbox-item"),c=o.getElementsByClassName("ladi-survey-option"),u=o.querySelector(".ladi-survey-button-next button"),p=[],m=n.mapping_form_name,g=n.mapping_form_id,_=n.input_name,y=e.findAncestor(o,["ladi-form","ladi-element"]),f=e.runtime.eventData[t]["option.data_event"],v=function(){var i=window.ladi(t).value(),n=m||"";g.forEach(function(t){var o=document.getElementById(t);if(!isEmptyLadiPage(o)){for(var r=null;0!=(r=o.querySelectorAll('.ladi-form-item-survey[data-name="'+n+'"]')).length;)r[0].parentElement.removeChild(r[0]);var d=[],l=o.querySelectorAll(".ladi-element .ladi-form-item-container [name]"),s=null,c=0;for(T=0;T<l.length;T++){l[T].getAttribute("name")==n&&(s=e.findAncestor(l[T],"ladi-element"),d.push(s.id));var u=parseFloatLadiPage(l[T].getAttribute("tabindex"))||0;u>c&&(c=u)}if(0==(d=d.unique()).length){c++,(s=document.createElement("div")).className="ladi-element ladi-hidden ladi-form-item-survey",s.id=e.randomString(10),s.setAttribute("data-name",n);var m="";if(m+='<div class="ladi-form-item-container">',m+=' <div class="ladi-form-item-background"></div>',a){m+=' <div class="ladi-form-item ladi-form-checkbox ladi-form-checkbox-vertical">',m+=' <div class="ladi-form-checkbox-box-item">';for(var g=0;g<p.length;g++)m+=' <div class="ladi-form-checkbox-item"><input tabindex="'+c+'" name="'+n+'" type="checkbox" value="'+p[g]+'"><span data-checked="false">'+p[g]+"</span></div>";m+=" </div>",m+=" </div>"}else m+=' <div class="ladi-form-item">',m+=' <input autocomplete="off" tabindex="'+c+'" name="'+n+'" class="ladi-form-control" type="text">',m+=" </div>";m+="</div>",s.innerHTML=m,o.getElementsByClassName("ladi-form")[0].appendChild(s),d.push(s.id)}for(T=0;T<d.length;T++)window.ladi(d[T]).value(i)}})},P=function(){for(var t=!1,e=0;e<c.length;e++)if(c[e].classList.contains("selected")){t=!0;break}return t},L=function(){if(!(!isEmptyLadiPage(d)||l.length>0||s.length>0)){for(var t=[],i=0;i<c.length;i++)c[i].classList.contains("selected")&&t.push(c[i].getAttribute("data-value"));for(var n=null;0!=(n=y.querySelectorAll('.ladi-form-item-survey[data-name="'+_+'"]')).length;)n[0].parentElement.removeChild(n[0]);var r=document.createElement("div");r.className="ladi-element ladi-hidden ladi-form-item-survey",r.id=e.randomString(10),r.setAttribute("data-name",_);var u=o.getAttribute("data-tabindex"),m="";if(m+='<div class="ladi-form-item-container">',m+=' <div class="ladi-form-item-background"></div>',a){m+=' <div class="ladi-form-item ladi-form-checkbox ladi-form-checkbox-vertical">',m+=' <div class="ladi-form-checkbox-box-item">';for(var g=0;g<p.length;g++)m+=' <div class="ladi-form-checkbox-item"><input tabindex="'+u+'" name="'+_+'" type="checkbox" value="'+p[g]+'"><span data-checked="false">'+p[g]+"</span></div>";m+=" </div>",m+=" </div>"}else m+=' <div class="ladi-form-item">',m+=' <input autocomplete="off" tabindex="'+u+'" name="'+_+'" class="ladi-form-control" type="text">',m+=" </div>";m+="</div>",r.innerHTML=m,y.getElementsByClassName("ladi-form")[0].appendChild(r),window.ladi(r.id).value(a?t:t[0])}},h=function(){P()&&C(o,f),v()},E=function(t){e.tapEventListener(t,function(e){if(e.stopPropagation(),a)t.classList.contains("selected")?t.classList.remove("selected"):t.classList.add("selected");else for(var i=t.parentElement.getElementsByClassName("ladi-survey-option"),n=0;n<i.length;n++)i[n]===t?i[n].classList.add("selected"):i[n].classList.remove("selected");isEmptyLadiPage(y)?(b(),isEmptyLadiPage(u)&&h()):L()})},A=function(t){var e=t.getElementsByTagName("input")[0],i=t.getElementsByTagName("span")[0];isEmptyLadiPage(e)||e.addEventListener("change",function(t){isEmptyLadiPage(i)||i.setAttribute("data-checked",t.target.checked)}),isEmptyLadiPage(i)||i.addEventListener("click",function(t){t.stopPropagation(),isEmptyLadiPage(e)||e.click()})},b=function(){isEmptyLadiPage(u)||(P()?u.parentElement.classList.remove("no-select"):u.parentElement.classList.add("no-select"))},T=0;T<c.length;T++)p.push(c[T].getAttribute("data-value")),E(c[T]);for(isEmptyLadiPage(d)||d.addEventListener("change",function(t){t.target.setAttribute("data-selected",t.target.value)}),T=0;T<l.length;T++)p.push(l[T].getElementsByTagName("input")[0].value),A(l[T]);for(T=0;T<s.length;T++)p.push(s[T].getElementsByTagName("input")[0].value),r=s[T],A(r);if(isEmptyLadiPage(y)){if(!isArrayLadiPage(f)){var w=e.copy(n);if(f=[],isObjectLadiPage(w)&&!isEmptyLadiPage(w.value)){if(w.type!=e.const.DATA_ACTION_TYPE.section&&w.type!=e.const.DATA_ACTION_TYPE.popup||f.push({action_type:e.const.ACTION_TYPE.complete,type:w.type,action:w.value}),w.type==e.const.DATA_ACTION_TYPE.section&&w.is_hide_parent||w.type==e.const.DATA_ACTION_TYPE.popup){var S=e.findAncestor(o,"ladi-popup"),O=e.findAncestor(o,"ladi-section"),I=null;isEmptyLadiPage(S)?isEmptyLadiPage(O)||(I=O.id):I=(S=e.findAncestor(S,"ladi-element")).id,isEmptyLadiPage(I)||f.push({action_type:e.const.ACTION_TYPE.complete,type:e.const.DATA_ACTION_TYPE.hidden_show,hidden_ids:[I],show_ids:[]})}w.type==e.const.DATA_ACTION_TYPE.change_index&&f.push({action_type:e.const.ACTION_TYPE.complete,type:w.type,action:w.value,change_index_type:w.change_index_type,change_index_number:w.change_index_number})}}isEmptyLadiPage(u)||u.addEventListener("click",function(t){t.stopPropagation(),h()}),b(),e.runtime.list_loaded_func.push(v)}else L()}}}(i,a.type,a["option.survey_setting.is_multiple"],a["option.survey_setting"]||a["option.survey_setting.event"])):n(a,t).run(i,e.runtime.isDesktop)}),z(Date.now()+1e3),LadiPageFormData.push(function(){e.runOptionForm(t,l,m)}),LadiPageFormData.push(function(){e.setInputFile()}),LadiPageFormData.push(function(){e.setInputOtp()}),(i=function(){g.forEach(function(t){var i=e.runtime.eventData[t];if("countdown"==i.type)for(var a=document.querySelectorAll("#"+t),n=0;n<a.length;n++){var o=a[n],r=o.getAttribute("data-type"),d=0,l=0,s=Date.now();if(o.hasAttribute("data-date-start")||o.hasAttribute("data-date-end"))d=parseFloatLadiPage(o.getAttribute("data-date-start"))||0,l=parseFloatLadiPage(o.getAttribute("data-date-end"))||0;else{if(r==e.const.COUNTDOWN_TYPE.countdown){var c=parseInt(o.getAttribute("data-minute"))||0;if(c<=0)return;for(l=e.runtime.timenow;l<=s;)l+=60*c*1e3}if(r==e.const.COUNTDOWN_TYPE.endtime&&(l=parseInt(o.getAttribute("data-endtime"))||0),r==e.const.COUNTDOWN_TYPE.daily){var u=o.getAttribute("data-daily-start"),p=o.getAttribute("data-daily-end");if(!isEmptyLadiPage(u)&&!isEmptyLadiPage(p)){var m=(new Date).toDateString();d=new Date(m+" "+u).getTime(),l=new Date(m+" "+p).getTime()}}o.setAttribute("data-date-start",d),o.setAttribute("data-date-end",l)}if(d>s)return;var g=l-s;if(g<0){if(g=0,"true"==o.getAttribute("data-end"))return;"true"!=o.getAttribute("data-end")&&(o.setAttribute("data-end",!0),C(o,i["option.data_event"]),e.runEventTracking(o.id,{is_form:!1}))}for(var _=e.getCountdownTime(g),y=o.querySelectorAll("[data-item-type]"),f=0;f<y.length;f++)y[f].querySelectorAll(".ladi-countdown-text span")[0].textContent=_[y[f].getAttribute("data-item-type")]}})})(),e.runtime.interval_countdown=e.runInterval(i,1e3),g.forEach(function(t){var e=document.getElementById(t);isEmptyLadiPage(e)||j(t,e)}),e.runtime.interval_gallery=e.runInterval(H,1e3),g.forEach(function(t){var i=e.runtime.eventData[t];if("carousel"==i.type){var a=document.getElementById(t);if(!isEmptyLadiPage(a)){a.hasAttribute("data-scrolled")||(a.setAttribute("data-scrolled",!1),e.runtime.list_scroll_func[t]=function(){a.setAttribute("data-scrolled",!0)});var n=i[e.runtime.device+".option.carousel_setting.autoplay"],o=i[e.runtime.device+".option.carousel_setting.autoplay_time"],r=0;n&&!isEmptyLadiPage(o)&&(r=o);var d=function(i){i.stopPropagation(),i=e.getEventCursorData(i),!isEmptyLadiPage(e.runtime.timenext_carousel[t])&&e.runtime.timenext_carousel[t]>Date.now()||i.target.classList.contains("ladi-carousel-arrow")||(e.runtime.timenext_carousel[t]=Date.now()+864e5,e.runtime.current_element_mouse_down_carousel=t,e.runtime.current_element_mouse_down_carousel_position_x=i.pageX,a.getElementsByClassName("ladi-carousel-content")[0].style.setProperty("transition-duration","0ms"),a.getElementsByClassName("ladi-carousel-content")[0].setAttribute("data-left",getComputedStyle(a.getElementsByClassName("ladi-carousel-content")[0]).left))};a.getElementsByClassName("ladi-carousel-arrow-left")[0].addEventListener("click",function(e){e.stopPropagation(),a.getElementsByClassName("ladi-carousel-content")[0].style.removeProperty("transition-duration"),a.setAttribute("data-is-next",!1),a.setAttribute("data-next-time",Date.now()+1e3*r),G(t,!1)}),-((parseFloatLadiPage(i[e.runtime.device+".option.carousel_crop.width"])||0)-a.clientWidth)<0&&a.getElementsByClassName("ladi-carousel-arrow-right")[0].classList.remove("opacity-0"),a.getElementsByClassName("ladi-carousel-arrow-right")[0].addEventListener("click",function(e){e.stopPropagation(),a.getElementsByClassName("ladi-carousel-content")[0].style.removeProperty("transition-duration"),a.setAttribute("data-is-next",!0),a.setAttribute("data-next-time",Date.now()+1e3*r),G(t,!1)}),a.getElementsByClassName("ladi-carousel")[0].addEventListener("mousedown",d),a.getElementsByClassName("ladi-carousel")[0].addEventListener("touchstart",d,e.runtime.scrollEventPassive)}}}),e.runtime.interval_carousel=e.runInterval(function(){g.forEach(function(t){var i=e.runtime.eventData[t];if("carousel"==i.type){var a=document.getElementById(t);if(!isEmptyLadiPage(a)&&"true"==a.getAttribute("data-scrolled")&&"true"!=a.getAttribute("data-stop")){var n=i[e.runtime.device+".option.carousel_setting.autoplay"],o=i[e.runtime.device+".option.carousel_setting.autoplay_time"],r=0;if(n&&!isEmptyLadiPage(o)&&(r=o),r>0){var d=a.getAttribute("data-next-time"),l=Date.now();isEmptyLadiPage(d)&&(d=l+1e3*(r-1),a.setAttribute("data-next-time",d)),l>=d&&(G(t,!0),a.setAttribute("data-next-time",l+1e3*r))}}}})},1e3),LadiPageShopping.push(et),B(),t&&(e.runtime.is_popupx||e.const.TIME_ONPAGE_TRACKING.forEach(function(t){e.runTimeout(function(){LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.gtag)},function(){window.gtag("event","TimeOnPage_"+t+"_seconds",{event_category:"LadiPageTimeOnPage",event_label:window.location.host+window.location.pathname,non_interaction:!0})}),LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq("trackCustom","TimeOnPage_"+t+"_seconds")})},1e3*t)})),g.forEach(function(t){var i=document.getElementById(t);if(!isEmptyLadiPage(i)){var a=e.runtime.eventData[t],n=a["option.data_tooltip.text"];if(!isEmptyLadiPage(n)){var o=a["option.data_tooltip.type"]||e.const.TOOLTIP_TYPE.default,r=a["option.data_tooltip.position"]||e.const.TOOLTIP_POSITION.top_middle,d=a["option.data_tooltip.size"]||e.const.TOOLTIP_SIZE.medium;i.setAttribute("data-hint",n);var l="hint";r==e.const.TOOLTIP_POSITION.top_middle&&(l+="-top-middle"),r==e.const.TOOLTIP_POSITION.top_left&&(l+="-top-left"),r==e.const.TOOLTIP_POSITION.top_right&&(l+="-top-right"),r==e.const.TOOLTIP_POSITION.bottom_middle&&(l+="-bottom-middle"),r==e.const.TOOLTIP_POSITION.bottom_left&&(l+="-bottom-left"),r==e.const.TOOLTIP_POSITION.bottom_right&&(l+="-bottom-right"),r==e.const.TOOLTIP_POSITION.left_middle&&(l+="-left-middle"),r==e.const.TOOLTIP_POSITION.left_top&&(l+="-left-top"),r==e.const.TOOLTIP_POSITION.left_bottom&&(l+="-left-bottom"),r==e.const.TOOLTIP_POSITION.right_middle&&(l+="-right-middle"),r==e.const.TOOLTIP_POSITION.right_top&&(l+="-right-top"),r==e.const.TOOLTIP_POSITION.right_bottom&&(l+="-right-bottom"),o==e.const.TOOLTIP_TYPE.info&&(l+="-t-info"),o==e.const.TOOLTIP_TYPE.success&&(l+="-t-success"),o==e.const.TOOLTIP_TYPE.error&&(l+="-t-error"),o==e.const.TOOLTIP_TYPE.notice&&(l+="-t-notice"),d==e.const.TOOLTIP_SIZE.small&&(l+="-s-small"),d==e.const.TOOLTIP_SIZE.medium&&(l+="-s-med"),d==e.const.TOOLTIP_SIZE.big&&(l+="-s-big"),l+="-hint-anim-d-short",i.classList.add(l)}}}),function(){var t=2500,i=3800,a=800,n=50,o=150,r=500,d=1300,l=600,s=1500,c=t,u=function(u){var p=!1;if(e.const.ANIMATED_LIST.forEach(function(t){u.classList.contains(t)&&(p=!0)}),p){var m=u.getElementsByClassName("ladipage-animated-words-wrapper")[0];if(!isEmptyLadiPage(m)){var g=isEmptyLadiPage(m.getAttribute("data-word"))?[]:JSON.parse(m.getAttribute("data-word"));if(0!=g.length){var _=!1,y=e.randomId(),f=function(i,a,n,o){if(!_){isEmptyLadiPage(i)||(i.classList.remove("in"),i.classList.add("out"));var r=isEmptyLadiPage(i)?null:i.nextSibling;if(isEmptyLadiPage(r)?n&&e.runTimeout(function(){E(P(a))},t):e.runTimeout(function(){f(r,a,n,o)},o),isEmptyLadiPage(r)&&document.querySelectorAll("html")[0].classList.contains("no-csstransitions")){var d=P(a);L(a,d)}}},v=function(i,a,n,o){if(!_){var r=a.parentElement,d=r.parentElement;d.classList.contains("ladipage-animated-headline")||(d=d.parentElement),isEmptyLadiPage(i)||(i.classList.add("in"),i.classList.remove("out"));var l=isEmptyLadiPage(i)?null:i.nextSibling;isEmptyLadiPage(l)?((d.classList.contains("rotate-2")||d.classList.contains("rotate-3")||d.classList.contains("scale"))&&r.style.setProperty("width",a.clientWidth+"px"),isEmptyLadiPage(e.findAncestor(a,"type"))||e.runTimeout(function(){var t=e.findAncestor(a,"ladipage-animated-words-wrapper");isEmptyLadiPage(t)||t.classList.add("waiting")},200),n||e.runTimeout(function(){E(a)},t)):e.runTimeout(function(){v(l,a,n,o)},o)}},P=function(t){if(!_){var e=t.nextSibling;return isEmptyLadiPage(e)||e.classList.contains("after")?t.parentElement.firstChild:e}},L=function(t,e){_||(t.classList.remove("is-visible"),t.classList.add("is-hidden"),e.classList.remove("is-hidden"),e.classList.add("is-visible"))},h=function(t,i){_||(isEmptyLadiPage(e.findAncestor(t,"type"))?isEmptyLadiPage(e.findAncestor(t,"clip"))||(e.findAncestor(t,"ladipage-animated-words-wrapper").style.setProperty("width",t.clientWidth+5+"px"),e.runTimeout(function(){E(t)},l+s)):(v(t.querySelectorAll("i")[0],t,!1,i),t.classList.add("is-visible"),t.classList.remove("is-hidden")))},E=function(s){if(!_&&!isEmptyLadiPage(s)){var c=P(s);if(isEmptyLadiPage(e.findAncestor(s,"type")))if(isEmptyLadiPage(e.findAncestor(s,"letters")))isEmptyLadiPage(e.findAncestor(s,"clip"))?isEmptyLadiPage(e.findAncestor(s,"loading-bar"))?(L(s,c),e.runTimeout(function(){E(c)},t)):(e.findAncestor(s,"ladipage-animated-words-wrapper").classList.remove("is-loading"),L(s,c),e.runTimeout(function(){E(c)},i),e.runTimeout(function(){e.findAncestor(s,"ladipage-animated-words-wrapper").classList.add("is-loading")},a)):(e.findAncestor(s,"ladipage-animated-words-wrapper").style.setProperty("width","2px"),e.runTimeout(function(){L(s,c),h(c)},l));else{var u=s.querySelectorAll("i").length>=c.querySelectorAll("i").length;f(s.querySelectorAll("i")[0],s,u,n),v(c.querySelectorAll("i")[0],c,u,n)}else{var p=e.findAncestor(s,"ladipage-animated-words-wrapper");p.classList.add("selected"),p.classList.remove("waiting"),e.runTimeout(function(){p.classList.remove("selected"),s.classList.remove("is-visible"),s.classList.add("is-hidden");for(var t=s.querySelectorAll("i"),e=0;e<t.length;e++)t[e].classList.remove("in"),t[e].classList.add("out")},r),e.runTimeout(function(){h(c,o)},d)}}},A=document.createElement(u.tagName);u.parentElement.insertBefore(A,u.nextSibling),A.outerHTML=u.outerHTML,(A=u.nextSibling).classList.add("ladipage-animated-headline-duplicate"),e.runtime.list_scrolling_exec[y]=function(){u.parentElement.removeChild(u),A.classList.remove("ladipage-animated-headline-duplicate"),_=!0,delete e.runtime.list_scrolling_exec[y]};var b=m.textContent.trim();if(m.textContent="",m.innerHTML=m.innerHTML+'<b class="is-visible">'+b+"</b>",g.forEach(function(t){isEmptyLadiPage(t)?m.innerHTML=m.innerHTML+"<b>"+b+"</b>":m.innerHTML=m.innerHTML+"<b>"+t.trim()+"</b>"}),!isEmptyLadiPage(e.findAncestor(m,"type"))||!isEmptyLadiPage(e.findAncestor(m,"loading-bar"))||!isEmptyLadiPage(e.findAncestor(m,"clip"))){m.innerHTML=m.innerHTML+'<div class="after"></div>';for(var T=getComputedStyle(m).color,w=m.getElementsByClassName("after"),S=0;S<w.length;S++)w[S].style.setProperty("background-color",T)}if(u.classList.contains("type")&&m.classList.add("waiting"),(u.classList.contains("type")||u.classList.contains("rotate-2")||u.classList.contains("rotate-3")||u.classList.contains("scale"))&&u.classList.add("letters"),function(t){if(!_)for(var i=0;i<t.length;i++){var a=t[i],n=a.textContent.trim().split(""),o=a.classList.contains("is-visible");for(var r in n){" "==n[r]&&(n[r]="&nbsp;");var d=e.findAncestor(a,"rotate-2");isEmptyLadiPage(d)||(n[r]="<em>"+n[r]+"</em>"),n[r]=o?'<i class="in">'+n[r]+"</i>":"<i>"+n[r]+"</i>"}var l=n.join("");a.innerHTML=l,a.style.setProperty("opacity",1)}}(document.querySelectorAll(".letters b")),u.classList.contains("loading-bar"))c=i,e.runTimeout(function(){m.classList.add("is-loading")},a);else if(u.classList.contains("clip")){var O=m.clientWidth+5;m.style.setProperty("width",O+"px")}e.runTimeout(function(){E(u.getElementsByClassName("is-visible")[0])},c)}}}},p=function(){for(var t=document.getElementsByClassName("ladipage-animated-headline"),e=[],i=0;i<t.length;i++)e.push(t[i]);e.forEach(u)};p();var m=e.randomId();e.runtime.list_scrolled_exec[m]=p}(),function(){for(var t=document.querySelectorAll(".ladi-button-group > .ladi-element"),i=function(t){var i=e.findAncestor(t.target,"ladi-button");(i=isEmptyLadiPage(i)?t.target:e.findAncestor(i,"ladi-element")).classList.add("selected");var a=e.findAncestor(t.target,"ladi-button-group");if(!isEmptyLadiPage(a))for(var n=(a=e.findAncestor(a,"ladi-element")).querySelectorAll(".ladi-button-group > .ladi-element"),o=0;o<n.length;o++)n[o].id!=i.id&&n[o].classList.remove("selected")},a=0;a<t.length;a++)t[a].addEventListener("click",i)}(),function(){if(0!=document.getElementsByClassName("ladiflow-widget").length){var t=document.querySelector('script[src^="'+e.const.LADIFLOW_SDK+'"][data-time="'+e.runtime.timenow+'"]');isEmptyLadiPage(t)&&e.loadScript(e.const.LADIFLOW_SDK,{"data-time":e.runtime.timenow},!0)}}(),LadiPageShopping.push(st),W(null,!1),F(),function(){var t=document.getElementById(e.runtime.builder_section_popup_id);if(!isEmptyLadiPage(t)){var i=document.createElement("div");if(i.className="popup-close",i.style.setProperty("position","fixed"),i.style.setProperty("opacity","0"),t.appendChild(i),"none"==getComputedStyle(i).display){var a=document.getElementById("style_fix_css");if(isEmptyLadiPage(a)){(a=document.createElement("style")).id="style_fix_css",a.type="text/css",a.innerHTML="#SECTION_POPUP .popup-close {display: initial;}";var n=document.getElementById("style_ladi");isEmptyLadiPage(n)?document.head.appendChild(a):n.parentNode.insertBefore(a,n.nextElementSibling)}}i.parentElement.removeChild(i)}}(),function(){document.addEventListener("mouseleave",e.runEventMouseLeave),document.addEventListener("mousemove",e.runEventMouseMove),document.addEventListener("touchmove",e.runEventMouseMove,e.runtime.scrollEventPassive),document.addEventListener("mouseup",e.runEventMouseUp),document.addEventListener("touchend",e.runEventMouseUp);var t=window;isObjectLadiPage(e.runtime.story_page)&&(t=document.getElementsByClassName("ladi-wraper")[0]),t.addEventListener("scroll",e.runEventScroll,e.runtime.scrollEventPassive),window.addEventListener("resize",e.runEventResize),window.addEventListener("orientationchange",e.runEventOrientationChange);var i=document.getElementById(e.runtime.backdrop_popup_id);isEmptyLadiPage(i)||i.addEventListener("click",e.runEventBackdropPopupClick);var a=document.getElementById(e.runtime.backdrop_dropbox_id);isEmptyLadiPage(a)||a.addEventListener("click",e.runEventBackdropDropboxClick)}(),e.reloadLazyload(!0),M(),e.setDataReplaceStart(),e.resetViewport(),e.runConversionApi(),e.runStoryPage(),e.runThankyouPage(),e.runGlobalTrackingScript(),e.runtime.list_loaded_func=e.runtime.list_loaded_func.concat(_),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?e.documentLoaded():document.addEventListener("DOMContentLoaded",e.documentLoaded)};e.runtime.tmp.runDataEventComplete=C,e.runtime.tmp.generateLadiSaleProduct=function(t,i,a){var n=function(){g.forEach(function(n){e.runtime.eventData[n],tt(n,t,i,null,null,!1,a)})},o=function(t){if(t&&isEmptyLadiPage(a))n();else{var i=a.target,r=e.findAncestor(i,"ladi-element");if(!isEmptyLadiPage(r)){var d=e.findAncestor(r,"ladi-form");if(!isEmptyLadiPage(d)){var l=e.findAncestor(d,"ladi-element");if(!isEmptyLadiPage(l)){var s=e.runtime.eventData[l.id];if(!isEmptyLadiPage(s)){var c=s["option.product_id"];if(!isEmptyLadiPage(c)){var u=e.generateVariantProduct(s,!1,null,null,null,null,!0,!0,function(t){o(!1)});if(isObjectLadiPage(u)&&isObjectLadiPage(u.store_info)&&isObjectLadiPage(u.product)){var p=e.getProductVariantIndex(l.id,s),m=document.querySelectorAll('[data-variant="true"]');if(-1!=p)for(var g=0;g<m.length;g++)if(m[g].id!=r.id&&isEmptyLadiPage(e.findAncestor(m[g],"ladi-collection"))){var _=e.runtime.eventData[m[g].id];if(!isEmptyLadiPage(_)){var y=e.findAncestor(m[g],"ladi-form");if(!isEmptyLadiPage(y)){var f=e.findAncestor(y,"ladi-element");if(!isEmptyLadiPage(f)){var v=e.runtime.eventData[f.id];if(!isEmptyLadiPage(v)&&!isEmptyLadiPage(v["option.product_variant_id"]))continue}var P=null,L=null,h=null,E=0;if(_["option.product_variant_type"]==e.const.PRODUCT_VARIANT_TYPE.combobox){if(!isArrayLadiPage(u.product.variants))continue;if(L=u.product.variants[p],isStringLadiPage(L.option_ids))for(h=L.option_ids.split("/"),E=0;E<h.length;E++)P=document.querySelector("#"+m[g].id+' .ladi-form-item select[data-product-option-id="'+h[E]+'"]'),isEmptyLadiPage(P)||P.getAttribute("data-store-id")!=u.store_info.id||P.getAttribute("data-product-id")!=L.product_id||(P.value=L["option"+(E+1)])}if(_["option.product_variant_type"]==e.const.PRODUCT_VARIANT_TYPE.label){if(!isArrayLadiPage(u.product.variants))continue;if(L=u.product.variants[p],isStringLadiPage(L.option_ids))for(h=L.option_ids.split("/"),E=0;E<h.length;E++)P=document.querySelector("#"+m[g].id+' .ladi-form-label-container[data-product-option-id="'+h[E]+'"]'),isEmptyLadiPage(P)||P.getAttribute("data-store-id")!=u.store_info.id||P.getAttribute("data-product-id")!=L.product_id||e.runtime.tmp.updateLabelValue(P,L["option"+(E+1)])}if(_["option.product_variant_type"]==e.const.PRODUCT_VARIANT_TYPE.combined){if(P=m[g].querySelector("select.ladi-form-control"),isEmptyLadiPage(P)||P.getAttribute("data-store-id")!=u.store_info.id||P.getAttribute("data-product-id")!=u.product.product_id)continue;var A=e.getProductVariantId(r,u);if(!isEmptyLadiPage(A)){var b=P.querySelector('option[data-product-variant-id="'+A+'"]');isEmptyLadiPage(b)||(p=b.getAttribute("value"))}P.value=p+""}}}}for(var T=0;T<m.length;T++){var w=e.findAncestor(m[T],"ladi-form");if(!isEmptyLadiPage(w)){var S=w.querySelector('input[name="quantity"]');isEmptyLadiPage(S)||e.fireEvent(S,"input")}}n()}}}}}}}};o(!0)},e.runtime.tmp.generateCart=function(){g.forEach(function(i){!function(i,a){if("cart"==a){var n=e.runtime.eventData[i];if(!isEmptyLadiPage(n)){var o=document.getElementById(i);isEmptyLadiPage(o)||e.showParentVisibility(o,function(){var i=parseFloatLadiPage(getComputedStyle(o).height)||0,a=parseFloatLadiPage(o.getAttribute("data-height"))||0;o.hasAttribute("data-height")||(o.setAttribute("data-height",i),a=i);var r=e.generateHtmlCart(n["option.cart_layout"],n["option.message_no_product"],t);o.getElementsByClassName("ladi-cart")[0].innerHTML=r;var d=o.getElementsByClassName("ladi-cart")[0].scrollHeight;if(i!=(d=d<a?a:d)){o.style.setProperty("height",d+"px");var l=e.findAncestor(o.parentElement,"ladi-element");isEmptyLadiPage(l)&&(l=e.findAncestor(o.parentElement,"ladi-section")),e.updateHeightElement(!0,o,l,i,d)}})}}}(i,e.runtime.eventData[i].type)})},e.runtime.tmp.runButtonSectionClose=D,e.runtime.tmp.runOptionAction=N,e.runtime.tmp.runOptionHover=k,e.runtime.tmp.runElementClickSelected=W,e.runtime.tmp.runTrackingAnalytics=S,e.runtime.tmp.runLadiSaleProductKey=tt,e.runtime.tmp.eventClickGalleryControlItem=U,e.runtime.tmp.runGallery=Y,e.runtime.tmp.setGalleryStart=j,e.runtime.tmp.updateImageGalleryProduct=Z,e.runtime.tmp.runOptionCountdown=x,e.runtime.tmp.runOptionCountdownItem=R,e.runtime.tmp.getOptionLabelValue=X,e.runtime.tmp.updateLabelValue=K,e.runtime.tmp.getLabelValue=Q,e.runtime.tmp.clickLabelProductChangeCallback=J,e.runtime.tmp.fireEventLabelChange=function(t){var i=t.querySelector(".ladi-form-label-item.selected");isEmptyLadiPage(i)||e.fireEvent(i,"click",{is_fire_event:!0})},e.runtime.tmp.showPopupX=rt,e.runtime.tmp.runActionPopupX=it,e.runtime.is_popupx?(e.runtime.tmp.popupx_iframe_id=e.randomId(),it({ladipage_id:e.runtime.ladipage_id,action:{type:"set_iframe_loaded"}}),window.addEventListener("message",function(t){try{var i=JSON.parse(t.data);if("POPUPX"!=i.type)return;i.iframe_id==e.runtime.tmp.popupx_iframe_id&&i.action.value.forEach(function(t){!function(t,i){var a=null,n=null;if("callback_request_with_option"==t&&isFunctionLadiPage(e.runtime.tmp["request_callback_id_"+i.callback_id])&&e.runtime.tmp["request_callback_id_"+i.callback_id](i.responseText,i.status,i.httpRequest,i.url),"set_style_device"==t){if(lt(i.is_desktop),n=document.getElementById(e.runtime.tmp.popupx_current_element_id),isEmptyLadiPage(n))return;"none"!=getComputedStyle(n).display&&(e.runtime.tmp.popupx_is_inline?dt(e.runtime.tmp.popupx_current_element_id,!1):rt(e.runtime.tmp.popupx_current_element_id,!1))}if("set_iframe_info"==t){isEmptyLadiPage(y)&&(y=i.ladi_client_id||e.randomId(),window.ladi("LADI_CLIENT_ID").set_cookie(y,3650)),e.runtime.tmp.popupx_is_desktop=i.is_desktop,e.runtime.isDesktop=i.is_desktop,e.runtime.device=e.runtime.isDesktop?e.const.DESKTOP:e.const.MOBILE,e.runtime.tmp.popupx_origin_store_id=i.origin_store_id,e.runtime.tmp.popupx_origin_referer=i.origin_referer,e.runtime.tmp.popupx_origin_domain=i.origin_domain,e.runtime.tmp.popupx_origin_url=i.origin_url,e.runtime.tmp.popupx_is_inline=i.is_inline,lt(i.is_desktop);var o="#"+e.runtime.builder_section_popup_id+" .ladi-container {width: 100% !important;}";e.runtime.tmp.popupx_is_inline&&(o+=".ladi-section > .ladi-section-close {display: none !important;}"),e.createStyleElement("style_popup_container",o),e.runtime.has_popupx=!0,ct()}"hide_popupx"==t&&(a=e.runtime.eventData[i],n=document.getElementById(i),isEmptyLadiPage(a)||isEmptyLadiPage(n)||window.ladi(i).hide()),"show_popupx"==t&&rt(i,!0),"show_popupx_inline_iframe"==t&&dt(i,!0),"show_message_callback"==t&&(isFunctionLadiPage(e.runtime.tmp.popupx_show_message_callback)&&e.runtime.tmp.popupx_show_message_callback(),delete e.runtime.tmp.popupx_show_message_callback)}(i.action.type,t)})}catch(t){}})):ct(),e.runtime.isRun=!0}else e.loadHtmlGlobal(t)},LadiPageScript.const.API_FORM_DATA="https://api.ldpform.com/sendform",LadiPageScript.const.API_ANALYTICS_EVENT="https://a.ladipage.com/event",LadiPageScript.const.API_ACCESS_KEY_LOGIN="https://api.ladipage.com/2.0/access-key-login",LadiPageScript.const.API_COLLECTION_PRODUCT="https://api.checkout.ladisales.com/1.0/product-list",LadiPageScript.const.API_SHOW_PRODUCT="https://api.checkout.ladisales.com/1.0/product-detail",LadiPageScript.const.API_LADISALE_COLLECTION_PRODUCT="https://api.sales.ldpform.net/2.0/public/collections/products",LadiPageScript.const.API_LADISALE_SHOW_PRODUCT="https://api.sales.ldpform.net/2.0/public/product/show",LadiPageScript.const.API_LADISALE_ADD="https://api.sales.ldpform.net/2.0/cart/add",LadiPageScript.const.API_LADISALE_UPDATE="https://api.sales.ldpform.net/2.0/cart/update",LadiPageScript.const.API_LADISALE_SHOW="https://api.sales.ldpform.net/2.0/cart/show",LadiPageScript.const.API_LADISALE_GET_SHIPPING="https://api.sales.ldpform.net/2.0/checkout/{0}/get-shipping",LadiPageScript.const.API_LADISALE_VALIDATE_DISCOUNT="https://api.sales.ldpform.net/2.0/checkout/{0}/validate-discount",LadiPageScript.const.API_LADISALE_PROMOTION="https://api.checkout.ladisales.com/1.0/checkout/get-promotion",LadiPageScript.const.API_LADISALE_CHECKOUT_CREATE="https://api.checkout.ladisales.com/1.0/checkout/create",LadiPageScript.const.API_FILE_UPLOAD="https://api.files.ladicdn.com/2.0/ladipage-upload-file",LadiPageScript.const.API_DATASET_DATA="https://g.ladicdn.com/dataset/{0}.json?id={1}",LadiPageScript.const.API_DATASET_BLOG="https://g.ladicdn.com/blog-",LadiPageScript.const.API_SECTION_GLOBAL_HTML="https://g.ladicdn.com/section/{0}-{1}.html",LadiPageScript.const.LADIFLOW_SDK="https://w.ladicdn.com/ladiflow/sdk.js?v=1.0",LadiPageScript.const.LADISALES_SDK="https://w.ladicdn.com/ladisales/sdk/sdk.js?v=1.0",LadiPageScript.const.CDN_LIBRARY_JS_URL="https://w.ladicdn.com/v2/source/",LadiPageScript.const.CDN_LIBRARY_CSS_URL="https://w.ladicdn.com/v2/source/";var lightbox_run=function(t,e,i,a,n,o,r,d){var l=document.getElementById(LadiPageScript.runtime.lightbox_screen_id);if(!isEmptyLadiPage(l)){var s=function(){isEmptyLadiPage(window.$rootScope)||!isFunctionLadiPage(window.$rootScope.hideBuilderLoadingBlur)?LadiPageScript.hideLoadingBlur():window.$rootScope.hideBuilderLoadingBlur()};d||(isEmptyLadiPage(window.$rootScope)||!isFunctionLadiPage(window.$rootScope.showBuilderLoadingBlur)?LadiPageScript.showLoadingBlur():window.$rootScope.showBuilderLoadingBlur());var c=JSON.stringify({html:t,url:e,is_video:i,video_type:o,video_value:r}),u=Object.keys(LadiPageScript.runtime.list_lightbox_id);-1==u.indexOf(c)&&(LadiPageScript.runtime.list_lightbox_id[c]=u.length+1);var p=LadiPageScript.runtime.list_lightbox_id[c];n=n+"_"+p;var m=document.getElementById(n),g=!1;isEmptyLadiPage(m)?(m=document.createElement("div"),l.appendChild(m),m.outerHTML=t,m=l.lastChild,g=!0):i&&LadiPageScript.runEventReplayVideo(n,o,!0);var _=document.createElement("div");_.className="lightbox-close",_.setAttribute("data-opacity",0),l.appendChild(_),m.setAttribute("id",n),m.setAttribute("data-opacity",0),m.classList.remove("lightbox-hidden");var y=function(){if(m=document.getElementById(n),!isEmptyLadiPage(m)){if("IFRAME"==m.tagName){var t=parseFloatLadiPage(getComputedStyle(m).width)||0,e=parseFloatLadiPage(getComputedStyle(m).height)||0;if(t>0||e>0){var i=.8*document.body.clientWidth,a=.8*LadiPageScript.getHeightDevice(),o=i,r=e/t*o;r>a&&(o=(r=a)*(t/e)),m.style.setProperty("width",(parseFloatLadiPage(o)||0)+"px"),m.style.setProperty("height",(parseFloatLadiPage(r)||0)+"px")}}if(_=l.getElementsByClassName("lightbox-close")[0],!isEmptyLadiPage(_)){var d=LadiPageScript.getElementBoundingClientRect(m),s=10,c=10;d.x-5-_.clientWidth>c&&(c=d.x-5-_.clientWidth),d.y-5-_.clientHeight>s&&(s=d.y-5-_.clientHeight),c+=LadiPageScript.runtime.widthScrollBar,s-=6,c-=6,_.style.setProperty("right",c+"px"),_.style.setProperty("top",s+"px")}var u=document.getElementById(m.id+"_button_unmute");isEmptyLadiPage(u)||(u.style.setProperty("width",getComputedStyle(m).width),u.style.setProperty("height",getComputedStyle(m).height))}},f=function(){LadiPageScript.runTimeout(function(){s(),m=document.getElementById(n),_=l.getElementsByClassName("lightbox-close")[0],y(),isEmptyLadiPage(m)||m.removeAttribute("data-opacity"),isEmptyLadiPage(_)||_.removeAttribute("data-opacity")},100)};_.style.setProperty("top","-100px"),_.style.setProperty("right","-100px");var v="load";if(i&&o==LadiPageScript.const.VIDEO_TYPE.direct&&(v="loadedmetadata"),g&&(m.addEventListener(v,f),m.addEventListener("error",f)),i){var P=e;o==LadiPageScript.const.VIDEO_TYPE.youtube&&(e=null,P=r),g?LadiPageScript.runEventPlayVideo(n,o,P,!1,!1,!0,!1,d,!1,function(t){isEmptyLadiPage(t)?f():(t.addEventListener(v,f),t.addEventListener("error",f))}):f()}d||l.style.setProperty("display","block"),isEmptyLadiPage(e)||(g?m.src=e:f());var L=function(){var t=document.getElementById(LadiPageScript.runtime.backdrop_popup_id);return isEmptyLadiPage(t)||"none"==getComputedStyle(t).display},h=0;L()?(h=window.scrollY,LadiPageScript.runtime.tmp.bodyScrollY=h):h=LadiPageScript.runtime.tmp.bodyScrollY;var E=function(){s(),l.style.removeProperty("display"),m=document.getElementById(n),isEmptyLadiPage(m)||(a&&!i?m.parentElement.removeChild(m):(m.classList.add("lightbox-hidden"),i&&LadiPageScript.runEventReplayVideo(n,o,!1))),_=l.getElementsByClassName("lightbox-close")[0],isEmptyLadiPage(_)||_.parentElement.removeChild(_);var t=document.getElementById("style_lightbox");isEmptyLadiPage(t)||t.parentElement.removeChild(t);var e=L();e&&!isEmptyLadiPage(LadiPageScript.runtime.tmp.bodyScrollY)&&window.scrollTo(0,LadiPageScript.runtime.tmp.bodyScrollY),e&&(LadiPageScript.runtime.tmp.bodyScrollY=null)};if(_.addEventListener("click",function(t){t.stopPropagation(),E()}),!d){var A="body {";A+="position: fixed !important;",A+="width: 100% !important;",A+="top: -"+h+"px !important;",A+="}",LadiPageScript.createStyleElement("style_lightbox",A)}isEmptyLadiPage(l.getAttribute("data-load-event"))&&(l.setAttribute("data-load-event",!0),l.addEventListener("click",function(t){t.stopPropagation(),t.target.id==l.id&&(_=l.getElementsByClassName("lightbox-close")[0],isEmptyLadiPage(_)||_.click())}),window.addEventListener("resize",y)),d&&E()}},lightbox_iframe=function(t,e,i,a,n,o){if(!isEmptyLadiPage(t)){var r="margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; max-width: 80%; max-height: 80%;",d='<iframe id="'+(i=i||"lightbox_iframe")+'" class="lightbox-item" style="'+r+'" frameborder="0" allowfullscreen></iframe>',l=t,s=LadiPageScript.createTmpElement("iframe",l,null,!0);isEmptyLadiPage(s)||"IFRAME"!=s.tagName||(l=s.src,i=s.id||i,s.removeAttribute("src"),s.setAttribute("style",r),s.classList.add("lightbox-item"),d=s.outerHTML),lightbox_run(d,l,e,!0,i,a,n,o)}},lightbox_image=function(t){if(!isEmptyLadiPage(t)){lightbox_run('<img class="lightbox-item" style="margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; object-fit: scale-down; max-width: 80%; max-height: 80%;" />',t,!1,!1,"lightbox_image")}},lightbox_video=function(t,e,i){if(!isEmptyLadiPage(t)&&!isEmptyLadiPage(e)){LadiPageScript.pauseAllVideo();var a="lightbox_player";if(e==LadiPageScript.const.VIDEO_TYPE.youtube&&lightbox_iframe('<iframe id="'+a+'" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>',!0,a,e,t,i),e==LadiPageScript.const.VIDEO_TYPE.direct){lightbox_run('<video class="lightbox-item" id="lightbox_player" style="margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; max-width: 80%; max-height: 80%; object-fit: cover;"></video>',t,!0,!1,a,e,null,i)}}},LadiPageLibraryV2=LadiPageLibraryV2||function(){};LadiPageLibraryV2.prototype.get_url=function(t,e,i){if(!isEmptyLadiPage(this.id)){var a=this.id,n="";if(e&&isObjectLadiPage(t))Object.keys(t).forEach(function(e){isEmptyLadiPage(n)||(n+="&");var a=t[e];i&&-1!=["email","phone"].indexOf(e)&&(a=Base64.encode(a)),isArrayLadiPage(a)&&a.length>1&&(a=JSON.stringify(a)),a=encodeURIComponent(a),n+=e+"="+a});if(!isEmptyLadiPage(n)){var o=LadiPageScript.createTmpElement("a","",{href:a});o.search=o.search+(isEmptyLadiPage(o.search)?"?":"&")+n,a=o.href}return a=LadiPageScript.getLinkUTMRedirect(a,null),a=LadiPageScript.convertDataReplaceStr(a,!0,null,!1,t)}},LadiPageLibraryV2.prototype.open_url=function(t,e){if(!isEmptyLadiPage(this.id))if(LadiPageScript.runtime.has_popupx)LadiPageScript.runtime.tmp.runActionPopupX({url:this.id,target:t,nofollow:e,action:{type:"open_url"}});else{var i=this.id,a=null;e&&((a=LadiPageScript.getElementAHref(i,!1)).setAttribute("rel","nofollow"),document.body.appendChild(a)),isEmptyLadiPage(t)||"_self"==t.toLowerCase()?e?a.click():window.location.href=i:e?(a.setAttribute("target",t),a.click()):window.open(i,t),e&&a.parentElement.removeChild(a)}},LadiPageLibraryV2.prototype.get_cookie=function(){if(!isEmptyLadiPage(this.id)){for(var t=this.id+"=",e=document.cookie.split(";"),i="",a=0;a<e.length;a++){for(var n=e[a];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t)){i=n.substring(t.length,n.length);break}}return decodeURIComponentLadiPage(i)}},LadiPageLibraryV2.prototype.delete_cookie=function(t,e){this.set_cookie(null,-3650,t,e,!1)},LadiPageLibraryV2.prototype.set_cookie=function(t,e,i,a,n){if(!isEmptyLadiPage(this.id)){var o="";if(n)o="expires = 0";else{var r=new Date;!isNullLadiPage(e)&&e instanceof Date?r=e:(e=isEmptyLadiPage(e)?365:e,r.setTime(r.getTime()+24*e*60*60*1e3)),o="expires = "+r.toUTCString()}t=isEmptyLadiPage(t)?"":t;var d=this.id+" = "+t;isEmptyLadiPage(o)||(d+="; "+o),isEmptyLadiPage(a)||(d+="; domain = "+a),i=i||window.location.pathname,LadiPageScript.runtime.isIE||(d+="; path = "+i),"https:"==window.location.protocol&&(d+="; SameSite = None; secure"),document.cookie=d}},LadiPageLibraryV2.prototype.submit=function(){var t=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(t)){var e=t.querySelector('.ladi-form button[type="submit"]');isEmptyLadiPage(e)||e.click()}},LadiPageLibraryV2.prototype.scroll=function(t,e){var i=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(i))if(LadiPageScript.runtime.has_popupx)this.show();else{t&&"none"==getComputedStyle(i).display&&this.show();for(var a=document.querySelectorAll("#"+LadiPageScript.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),n=0;n<a.length;n++)if(a[n].id!=this.id&&a[n].hasAttribute("data-popup-backdrop")&&"none"!=getComputedStyle(a[n]).display){var o=LadiPageScript.findAncestor(i,"ladi-popup");isEmptyLadiPage(o)||(o=LadiPageScript.findAncestor(o,"ladi-element")),(isEmptyLadiPage(o)||o.id!=a[n].id)&&(LadiPageScript.runRemovePopup(a[n].id,!0),100)}var r=isObjectLadiPage(LadiPageScript.runtime.story_page),d=function(t,e,i){LadiPageScript.removeTimeout(LadiPageScript.runtime.tmp.scroll_timeout_id);var a=function(t,e,i,a){return(t/=a/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e},n=0;n=r?"left"==t?e.scrollLeft:e.scrollTop:"left"==t?e.scrollX:e.scrollY;var o="left"==t?window.innerWidth:window.innerHeight,d=i-n;if(0!=d){var l=d<0?-1*d:d,s=0,c=1e3;c=l<=4*o?750:c,c=l<=2*o?525:c,c=l<=o?300:c,c=r?300:c;var u="left"==t?"scrollLeft":"scrollTop",p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,m=null,g=null,_=function(i){r?e[u]=i:"left"==t?e.scrollTo(i,e.scrollY):e.scrollTo(e.scrollX,i)};if(p){var y=Date.now()+c;p(m=function(){s=c-(y-Date.now()),g=a(s,n,d,c),_(g),s<c?p(m):_(i)})}else(m=function(){g=a(s+=20,n,d,c),_(g),s<c?LadiPageScript.runtime.tmp.scroll_timeout_id=LadiPageScript.runTimeout(m,20):_(i)})()}},l=function(t){var e=document.getElementsByClassName("ladi-wraper")[0],a=LadiPageScript.getElementBoundingClientRect(i).top+(r?t.scrollTop:t.scrollY);return{scrollTop:a-=parseFloatLadiPage(e.getAttribute("data-scroll-padding-top")||0)||0}},s=null,c=null,u=null;e?r?i.scrollIntoView():(s=l(window),window.scrollTo({top:s.scrollTop})):LadiPageScript.runTimeout(function(){var t;r?LadiPageScript.runtime.isDesktop||LadiPageScript.runtime.isBrowserDesktop?i.scrollIntoView({behavior:"smooth"}):(u=document.getElementsByClassName("ladi-wraper")[0],LadiPageScript.runtime.story_page.type==LadiPageScript.const.STORY_PAGE.horizontal&&(t=u,c={scrollLeft:LadiPageScript.getElementBoundingClientRect(i).left+(r?t.scrollLeft:t.scrollX)},d("left",u,c.scrollLeft)),LadiPageScript.runtime.story_page.type==LadiPageScript.const.STORY_PAGE.vertical&&(s=l(u),d("top",u,s.scrollTop))):(u=window,s=l(u),LadiPageScript.runtime.isDesktop||LadiPageScript.runtime.isBrowserDesktop?window.scrollTo({top:s.scrollTop,behavior:"smooth"}):d("top",u,s.scrollTop))},100)}},LadiPageLibraryV2.prototype.value=function(t,e,i){var a=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(a)){var n=[],o=!1,r=0,d=isArrayLadiPage(t)?t:[t],l=a.querySelectorAll('.ladi-form-item > [data-is-select-country="true"]');if(4==l.length)if(isNullLadiPage(t)){for(r=0;r<l.length;r++)n.push(l[r].value);o=!0}else d.forEach(function(t,e){isEmptyLadiPage(l[e])||(l[e].value=t,LadiPageScript.fireEvent(l[e],"change"))});else{var s=document.querySelectorAll("#"+this.id+" > ."+["ladi-button .ladi-headline","ladi-headline","ladi-paragraph","ladi-list-paragraph"].join(", #"+this.id+" > .")),c=document.querySelectorAll("#"+this.id+" > ."+["ladi-form-item-container .ladi-form-item > input","ladi-form-item-container .ladi-form-item > textarea","ladi-form-item-container .ladi-form-item > select"].join(", #"+this.id+" > .")),u=document.querySelectorAll("#"+this.id+" > ."+["ladi-form-item-container .ladi-form-checkbox-item > input"].join(", #"+this.id+" > .")),p=document.querySelectorAll("#"+this.id+" > .ladi-image .ladi-image-background"),m=document.querySelectorAll("#"+this.id+" > .ladi-shape"),g=document.querySelectorAll("#"+this.id+" > .ladi-video"),_=document.querySelectorAll("#"+this.id+" > .ladi-survey > .ladi-survey-option"),y=function(t){var e=[];return isArrayLadiPage(t)&&t.forEach(function(t){e.push(t.name)}),e=e.length>0?"["+e.join(", ")+"]":""};for(r=0;r<s.length;r++)if(isNullLadiPage(t))isObjectLadiPage(i)&&i.only_text?n.push(s[r].innerText):n.push(s[r].innerHTML);else if(s[r].innerHTML=t,!isEmptyLadiPage(e)){var f=LadiPageScript.findAncestor(s[r],"ladi-element");isEmptyLadiPage(f)||f.classList.add(e)}for(r=0;r<c.length;r++)if(isNullLadiPage(t))if(c[r].classList.contains("ladi-form-control-file")){var v=c[r].getAttribute("data-path-file")||"[]";v=JSON.parse(v),n.push(v)}else n.push(c[r].value);else c[r].classList.contains("ladi-form-control-file")?(c[r].setAttribute("data-path-file",JSON.stringify(t)),c[r].value=y(t)):(c[r].value=t,"date"==c[r].getAttribute("data-type")&&(isEmptyLadiPage(t)?c[r].setAttribute("type","text"):c[r].setAttribute("type","date")));var P=!1;for(r=0;r<u.length;r++)isNullLadiPage(t)?(u[r].checked&&n.push(u[r].value),"checkbox"==u[r].getAttribute("type").toLowerCase()&&(o=!0)):(P=!1,"checkbox"==u[r].getAttribute("type").toLowerCase()&&-1!=d.indexOf(u[r].value)&&(P=!0),"radio"==u[r].getAttribute("type").toLowerCase()&&d.length>0&&d[0]==u[r].value&&(P=!0),P?u[r].checked||u[r].click():u[r].checked&&u[r].click());for(r=0;r<p.length;r++)if(isNullLadiPage(t)){var L=getComputedStyle(p[r]).backgroundImage;(L=L||"").startsWith('url("')&&(L=L.substring('url("'.length)),L.endsWith('")')&&(L=L.substring(0,L.length-'")'.length)),n.push(L)}else if(isEmptyLadiPage(t))p[r].style.setProperty("background-image","none");else{var h=LadiPageScript.findAncestor(p[r],"ladi-element"),E=LadiPageScript.getOptimizeImage(t,h.clientWidth,h.clientHeight,!0,!1,!1,!0);p[r].style.setProperty("background-image",'url("'+E+'")')}for(r=0;r<m.length;r++)if(isNullLadiPage(t))n.push(m[r].innerHTML);else try{"svg"==LadiPageScript.createTmpElement("svg",t,null,!0).tagName&&(m[r].innerHTML=t)}catch(t){}for(r=0;r<g.length;r++){var A=LadiPageScript.runtime.eventData[this.id];if(isNullLadiPage(t))isEmptyLadiPage(A)||n.push({type:A["option.video_type"],value:A["option.video_value"]});else{A["option.video_value"]=t;var b=g[r].getElementsByClassName("iframe-video-preload")[0],T=null;if(A["option.video_type"]==LadiPageScript.const.VIDEO_TYPE.youtube){var w="https://img.youtube.com/vi/"+(T=LadiPageScript.getVideoId(A["option.video_type"],t))+"/hqdefault.jpg",S=g[r].getElementsByClassName("ladi-video-background")[0];isEmptyLadiPage(S)||S.style.setProperty("background-image",'url("'+w+'")')}if(isEmptyLadiPage(b))LadiPageScript.playVideo(this.id,A["option.video_type"],A["option.video_value"],A["option.video_control"]);else{LadiPageScript.pauseAllVideo();var O=!1;if(A["option.video_type"]==LadiPageScript.const.VIDEO_TYPE.youtube){var C=window.YT.get(b.id);!isEmptyLadiPage(C)&&isFunctionLadiPage(C.loadVideoById)&&(C.loadVideoById(T,0),C.seekTo(0),O=!0)}A["option.video_type"]==LadiPageScript.const.VIDEO_TYPE.direct&&isFunctionLadiPage(b.play)&&(b.src=t,b.currentTime=0,O=!0),O&&LadiPageScript.runEventReplayVideo(b.id,A["option.video_type"],!0)}}}for(r=0;r<_.length;r++)isNullLadiPage(t)?(_[r].classList.contains("selected")&&n.push(_[r].getAttribute("data-value")),"true"==a.getAttribute("data-multiple")&&(o=!0)):(P=!1,-1!=d.indexOf(_[r].getAttribute("data-value"))&&(P=!0),P?_[r].classList.contains("selected")||_[r].click():_[r].classList.contains("selected")&&_[r].click())}return o?n:n.length>0?n[0]:null}},LadiPageLibraryV2.prototype.set_value_2nd=function(t){var e=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(e)){isObjectLadiPage(LadiPageScript.runtime.tmp.value_2nd_source)||(LadiPageScript.runtime.tmp.value_2nd_source={}),isObjectLadiPage(LadiPageScript.runtime.tmp.value_2nd_click_time)||(LadiPageScript.runtime.tmp.value_2nd_click_time={});var i=e.getAttribute("data-source-id");if(isEmptyLadiPage(i)&&(i=LadiPageScript.randomString(10),e.setAttribute("data-source-id",i)),e.classList.contains("ladi-accordion-shape")){if((LadiPageScript.runtime.tmp.value_2nd_click_time[i]||0)+250>Date.now())return;LadiPageScript.runtime.tmp.value_2nd_click_time[i]=Date.now()}var a=LadiPageScript.runtime.tmp.value_2nd_source[i]||this.value(),n=parseFloatLadiPage(e.getAttribute("data-count-click"))||0;n++,LadiPageScript.runtime.tmp.value_2nd_source[i]=a,e.setAttribute("data-count-click",n),n%2==0?this.value(a):this.value(t)}},LadiPageLibraryV2.prototype.top=function(){var t=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(t)&&t.classList.contains("ladi-section"))try{var e=t.parentElement.firstChild;isEmptyLadiPage(e)||e.id!=LadiPageScript.runtime.builder_section_background_id||(e=e.nextElementSibling),t.parentElement.insertBefore(t,e),LadiPageScript.reloadLazyload(!1)}catch(t){}},LadiPageLibraryV2.prototype.pause=function(){var t=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(t)){var e=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(e)&&"video"==e.type){var i=t.querySelector(".iframe-video-preload:not(.no-pause)");isEmptyLadiPage(i)||LadiPageScript.runEventReplayVideo(i.id,i.getAttribute("data-video-type"),!1)}}},LadiPageLibraryV2.prototype.play=function(){var t=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(t)){var e=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(e)&&"video"==e.type){var i=e["option.video_type"],a=e["option.video_value"],n=e["option.video_control"];LadiPageScript.playVideo(this.id,i,a,n)}}},LadiPageLibraryV2.prototype.prevSectionTabs=function(){var t=document.querySelectorAll('.ladi-section[data-tab-id="'+this.id+'"]');if(0!=t.length)for(var e=0;e<t.length;e++)if(t[e].classList.contains("selected")){var i=e-1;i=i<0?0:i,this.doc=t[i],this.show();break}},LadiPageLibraryV2.prototype.nextSectionTabs=function(){var t=document.querySelectorAll('.ladi-section[data-tab-id="'+this.id+'"]');if(0!=t.length)for(var e=0;e<t.length;e++)if(t[e].classList.contains("selected")){var i=e+1;i=i>=t.length?t.length-1:i,this.doc=t[i],this.show();break}},LadiPageLibraryV2.prototype.indexSectionTabs=function(t){var e=document.querySelectorAll('.ladi-section[data-tab-id="'+this.id+'"]');e.length<t||(this.doc=e[t-1],this.show())},LadiPageLibraryV2.prototype.prev=function(){var t=this.doc||document.getElementById(this.id);if(isEmptyLadiPage(t))this.prevSectionTabs();else{var e=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(e)){var i=null;if("gallery"==e.type&&(i=t.querySelector(".ladi-gallery-view-arrow.ladi-gallery-view-arrow-left")),"carousel"==e.type&&(i=t.querySelector(".ladi-carousel-arrow.ladi-carousel-arrow-left")),"collection"==e.type&&(i=t.querySelector(".ladi-collection-arrow.ladi-collection-arrow-left")),"tabs"==e.type){var a=t.querySelector(".ladi-tabs > .ladi-element.selected[data-index]");return isEmptyLadiPage(a)&&(a=t.querySelector(".ladi-tabs > .ladi-element")),void(isEmptyLadiPage(a)||isEmptyLadiPage(a.previousElementSibling)||(a.previousElementSibling.classList.add("selected"),a.classList.remove("selected"),LadiPageScript.reloadLazyload(!1)))}isEmptyLadiPage(i)||i.click()}}},LadiPageLibraryV2.prototype.next=function(){var t=this.doc||document.getElementById(this.id);if(isEmptyLadiPage(t))this.nextSectionTabs();else{var e=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(e)){var i=null;if("gallery"==e.type&&(i=t.querySelector(".ladi-gallery-view-arrow.ladi-gallery-view-arrow-right")),"carousel"==e.type&&(i=t.querySelector(".ladi-carousel-arrow.ladi-carousel-arrow-right")),"collection"==e.type&&(i=t.querySelector(".ladi-collection-arrow.ladi-collection-arrow-right, .ladi-collection-button-next")),"survey"==e.type&&(i=t.querySelector(".ladi-survey-button-next button")),"tabs"==e.type){var a=t.querySelector(".ladi-tabs > .ladi-element.selected[data-index]");return isEmptyLadiPage(a)&&(a=t.querySelector(".ladi-tabs > .ladi-element")),void(isEmptyLadiPage(a)||isEmptyLadiPage(a.nextElementSibling)||(a.nextElementSibling.classList.add("selected"),a.classList.remove("selected"),LadiPageScript.reloadLazyload(!1)))}isEmptyLadiPage(i)||i.click()}}},LadiPageLibraryV2.prototype.index=function(t){var e=this.doc||document.getElementById(this.id);if(isEmptyLadiPage(e))this.indexSectionTabs(t);else{var i=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(i)){var a=0;"gallery"!=i.type&&"carousel"!=i.type||(a=parseFloatLadiPage(e.getAttribute("data-current"))||0,a+=1),"collection"==i.type&&(a=parseFloatLadiPage(e.getAttribute("data-page"))||1);var n=null;if("tabs"==i.type&&(n=e.querySelector(".ladi-tabs > .ladi-element.selected[data-index]"),isEmptyLadiPage(n)&&(n=e.querySelector(".ladi-tabs > .ladi-element")),isEmptyLadiPage(n)||(a=parseFloatLadiPage(n.getAttribute("data-index"))||1)),isEmptyLadiPage(t))return a;if("tabs"!=i.type){if("gallery"!=i.type&&"carousel"!=i.type||(t-=1,a-=1),t==a)return"carousel"==i.type&&e.setAttribute("data-stop",!0),void("gallery"==i.type&&e.hasAttribute("data-loaded")&&e.setAttribute("data-stop",!0));t>a?("gallery"!=i.type&&"carousel"!=i.type||e.setAttribute("data-current",t-1),"collection"==i.type&&e.setAttribute("data-page",t-1),this.next()):("gallery"!=i.type&&"carousel"!=i.type||e.setAttribute("data-current",t+1),"collection"==i.type&&e.setAttribute("data-page",t+1),this.prev())}else{var o=e.querySelector('.ladi-tabs > .ladi-element[data-index="'+t+'"]');isEmptyLadiPage(o)||(isEmptyLadiPage(n)||n.classList.remove("selected"),o.classList.add("selected"),LadiPageScript.reloadLazyload(!1))}}}},LadiPageLibraryV2.prototype.readmore=function(t){var e=this,i=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(i)){var a=null;if(i.classList.contains("ladi-section"))a=i.getElementsByClassName("ladi-section-arrow-down")[0],isEmptyLadiPage(a)||a.click();else{var n=i.parentElement.querySelector("#"+i.id+" > .ladi-collection.readmore");if(!isEmptyLadiPage(n)){var o=i.querySelector(".ladi-collection .ladi-collection-page.last");if(!isEmptyLadiPage(o))return;a=i.querySelector(".ladi-collection .ladi-collection-button-next"),isEmptyLadiPage(a)||0==getComputedStyle(a).opacity||a.click(),t&&i.classList.contains("dataset")&&LadiPageScript.runTimeout(function(){e.readmore(t)},1)}}}},LadiPageLibraryV2.prototype.collapse=function(t){var e=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(e)&&!e.classList.contains("ladi-section")){var i=e.getElementsByClassName("ladi-popup")[0];if(isEmptyLadiPage(i)){var a=isNullLadiPage(t),n=document.querySelector(["#"+this.id+" > .ladi-headline","#"+this.id+" > .ladi-paragraph","#"+this.id+" > .ladi-list-paragraph"].join(", ")),o=isEmptyLadiPage(n),r=0,d=0,l=null,s=this,c=function(t){var i=LadiPageScript.findAncestor(e.parentElement,"ladi-element");isEmptyLadiPage(i)&&(i=LadiPageScript.findAncestor(e.parentElement,"ladi-section")),o||(t=!1),LadiPageScript.updateHeightElement(!0,e,i,r,d,t)};if("none"==getComputedStyle(e).display){if(a||t)if(a&&o){if(l=parseFloatLadiPage(e.getAttribute("data-timeout-id"))||null,!isEmptyLadiPage(l))return;e.classList.remove("height-0"),e.classList.remove("overflow-hidden"),e.classList.remove("transition-collapse"),s.show(),d=parseFloatLadiPage(getComputedStyle(e).height)||0,e.classList.add("overflow-hidden"),e.classList.add("height-0"),l=LadiPageScript.runTimeout(function(){e.classList.add("transition-collapse"),e.classList.remove("height-0"),l=LadiPageScript.runTimeout(function(){e.classList.remove("overflow-hidden"),e.classList.remove("transition-collapse"),e.removeAttribute("data-timeout-id")},1e3*parseFloatLadiPage(getComputedStyle(e).transitionDuration)),e.setAttribute("data-timeout-id",l),c(!0)},100),e.setAttribute("data-timeout-id",l)}else s.show(),d=parseFloatLadiPage(getComputedStyle(e).height)||0,c()}else if(a||!t)if(a&&o){if(l=parseFloatLadiPage(e.getAttribute("data-timeout-id"))||null,!isEmptyLadiPage(l))return;e.classList.remove("height-0"),e.classList.remove("overflow-hidden"),e.classList.remove("transition-collapse"),r=parseFloatLadiPage(getComputedStyle(e).height)||0,e.classList.add("overflow-hidden"),l=LadiPageScript.runTimeout(function(){e.classList.add("transition-collapse"),e.classList.add("height-0"),l=LadiPageScript.runTimeout(function(){e.classList.remove("overflow-hidden"),e.classList.remove("transition-collapse"),e.classList.remove("height-0"),e.removeAttribute("data-timeout-id"),s.hide()},1e3*parseFloatLadiPage(getComputedStyle(e).transitionDuration)),e.setAttribute("data-timeout-id",l),c(!0)},100),e.setAttribute("data-timeout-id",l)}else r=parseFloatLadiPage(getComputedStyle(e).height)||0,s.hide(),c()}}},LadiPageLibraryV2.prototype.hide=function(t){var e=this,i=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(i)){var a=!1;if(0==i.getElementsByClassName("ladi-popup").length){if(LadiPageScript.runtime.has_popupx&&i.classList.contains("ladi-section")&&"none"!=getComputedStyle(i).display&&(a=!0),i.style.setProperty("display","none","important"),LadiPageScript.reloadLazyload(!1),!t&&a){LadiPageScript.runtime.tmp.runActionPopupX({id:this.id,dimension:{display:"none"},action:{type:"set_iframe_dimension"}})}}else LadiPageScript.runRemovePopup(this.id,!0,function(){for(var t=document.querySelectorAll("#"+LadiPageScript.runtime.builder_section_popup_id+" .ladi-container > .ladi-element"),i=0;i<t.length;i++)t[i].id!=e.id&&t[i].hasAttribute("data-popup-backdrop")&&"none"!=getComputedStyle(t[i]).display&&LadiPageScript.runRemovePopup(t[i].id,!0)});e.hideDropbox()}},LadiPageLibraryV2.prototype.show=function(t,e){var i=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(i)){var a=0;if(i.classList.contains("ladi-section")){var n=i.getAttribute("data-tab-id");if(!isEmptyLadiPage(n)){var o=document.querySelectorAll('.ladi-section[data-tab-id="'+n+'"]');for(a=0;a<o.length;a++)o[a].id==i.id?o[a].classList.add("selected"):(o[a].classList.remove("selected"),window.ladi(o[a].id).hide())}}var r=this,d=function(){if(isObjectLadiPage(LadiPageScript.runtime.eventData)){var t=LadiPageScript.runtime.eventData[r.id];isEmptyLadiPage(t)||LadiPageScript.startAutoScroll(r.id,t.type,t[LadiPageScript.const.DESKTOP+".option.auto_scroll"],t[LadiPageScript.const.MOBILE+".option.auto_scroll"]);for(var e=i.getElementsByClassName("ladi-element"),a=0;a<e.length;a++){var n=LadiPageScript.runtime.eventData[e[a].id];isEmptyLadiPage(n)||LadiPageScript.startAutoScroll(e[a].id,n.type,n[LadiPageScript.const.DESKTOP+".option.auto_scroll"],n[LadiPageScript.const.MOBILE+".option.auto_scroll"])}}},l=function(){for(var t=i.getElementsByClassName("ladi-element"),e=-1;e<t.length;e++){var a=-1==e?i:t[e];"true"==a.getAttribute("data-sticky")&&(a.removeAttribute("data-top"),a.removeAttribute("data-left"),a.removeAttribute("data-sticky"),a.style.removeProperty("top"),a.style.removeProperty("left"),a.style.removeProperty("width"),a.style.removeProperty("position"),a.style.removeProperty("z-index"))}LadiPageScript.runEventScroll()};if(t){if(i.getElementsByClassName("ladi-popup").length>0){var s=!0;if(isObjectLadiPage(e)&&!isNullLadiPage(e.checkHidePopupOther)&&(s=e.checkHidePopupOther),s){var c=document.querySelectorAll("#"+LadiPageScript.runtime.builder_section_popup_id+" .ladi-container > .ladi-element");for(a=0;a<c.length;a++)c[a].id!=r.id&&c[a].hasAttribute("data-popup-backdrop")&&"none"!=getComputedStyle(c[a]).display&&LadiPageScript.runRemovePopup(c[a].id,!0)}LadiPageScript.runShowPopup(!1,this.id,null,null,!0),LadiPageScript.removeLazyloadPopup(this.id),d(),l(),LadiPageScript.runResizeSectionBackground()}else i.style.setProperty("display","block","important"),d(),l(),LadiPageScript.runResizeSectionBackground(),LadiPageScript.reloadLazyload(!1)}else{if(LadiPageScript.runtime.has_popupx&&LadiPageScript.runtime.tmp.showPopupX(i.id,!0,e))return;r.show(!0)}}},LadiPageLibraryV2.prototype.showDropbox=function(t,e,i){var a=this.doc||document.getElementById(this.id);if(!(isEmptyLadiPage(a)||"true"!=a.getAttribute("data-dropbox")||i&&a.getAttribute("data-from-doc-id")==t.id&&"true"!=a.getAttribute("data-dropbox-backdrop")&&"block"==getComputedStyle(a).display)){a.classList.add("opacity-0"),this.show(),a.style.removeProperty("display"),a.style.removeProperty("top"),a.style.removeProperty("left"),a.style.removeProperty("bottom"),a.style.removeProperty("right"),isObjectLadiPage(e)||(e={}),e.padding=parseFloatLadiPage(e.padding)||0,e.animation_duration=parseFloatLadiPage(e.animation_duration)||0,t.insertBefore(a,t.firstChild),a.setAttribute("data-from-doc-id",t.id),a.setAttribute("data-style",a.getAttribute("style")||""),isEmptyLadiPage(a.getAttribute("data-style"))&&a.removeAttribute("data-style"),t.setAttribute("data-style",t.getAttribute("style")||""),isEmptyLadiPage(t.getAttribute("data-style"))&&t.removeAttribute("data-style");var n=a.getElementsByClassName("ladi-popup")[0];isEmptyLadiPage(n)||(n.setAttribute("data-style",n.getAttribute("style")||""),isEmptyLadiPage(n.getAttribute("data-style"))&&n.removeAttribute("data-style"));var o=LadiPageScript.getElementBoundingClientRect(t),r=LadiPageScript.getElementBoundingClientRect(a),d="";e.position!=LadiPageScript.const.TOOLTIP_POSITION.top_left&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.top_middle&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.top_right||(a.style.setProperty("top","auto"),a.style.setProperty("bottom",o.height+e.padding+"px"),e.padding>0&&(d+='content: ""; position: absolute; width: 100%; height: '+e.padding+"px; bottom: "+-e.padding+"px; left: 0;")),e.position==LadiPageScript.const.TOOLTIP_POSITION.top_middle&&a.style.setProperty("left",(o.width-r.width)/2+"px"),e.position==LadiPageScript.const.TOOLTIP_POSITION.top_right&&(a.style.setProperty("left","auto"),a.style.setProperty("right","0")),e.position!=LadiPageScript.const.TOOLTIP_POSITION.bottom_left&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.bottom_middle&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.bottom_right||(a.style.setProperty("bottom","auto"),a.style.setProperty("top",o.height+e.padding+"px"),e.padding>0&&(d+='content: ""; position: absolute; width: 100%; height: '+e.padding+"px; top: "+-e.padding+"px; left: 0;")),e.position==LadiPageScript.const.TOOLTIP_POSITION.bottom_middle&&a.style.setProperty("left",(o.width-r.width)/2+"px"),e.position==LadiPageScript.const.TOOLTIP_POSITION.bottom_right&&(a.style.setProperty("left","auto"),a.style.setProperty("right","0")),e.position!=LadiPageScript.const.TOOLTIP_POSITION.left_top&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.left_middle&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.left_bottom||(a.style.setProperty("left","auto"),a.style.setProperty("right",o.width+e.padding+"px"),e.padding>0&&(d+='content: ""; position: absolute; width: '+e.padding+"px; height: 100%; top: 0; right: "+-e.padding+"px;")),e.position==LadiPageScript.const.TOOLTIP_POSITION.left_top&&a.style.setProperty("bottom","auto"),e.position==LadiPageScript.const.TOOLTIP_POSITION.left_bottom&&a.style.setProperty("top","auto"),e.position!=LadiPageScript.const.TOOLTIP_POSITION.right_top&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.right_middle&&e.position!=LadiPageScript.const.TOOLTIP_POSITION.right_bottom||(a.style.setProperty("right","auto"),a.style.setProperty("left",o.width+e.padding+"px"),e.padding>0&&(d+='content: ""; position: absolute; width: '+e.padding+"px; height: 100%; top: 0; left: "+-e.padding+"px;")),e.position==LadiPageScript.const.TOOLTIP_POSITION.right_top&&a.style.setProperty("bottom","auto"),e.position==LadiPageScript.const.TOOLTIP_POSITION.right_bottom&&a.style.setProperty("top","auto"),a.style.setProperty("z-index","90000090"),"fixed"==getComputedStyle(t).position&&t.style.setProperty("z-index","90000090");var l="dropbox-"+a.id;if(i&&!isEmptyLadiPage(d))d="#"+a.id+":before {"+d+"}",LadiPageScript.createStyleElement(l,d);else{var s=document.getElementById(l);isEmptyLadiPage(s)||s.parentElement.removeChild(s)}if(i)a.removeAttribute("data-dropbox-backdrop");else a.setAttribute("data-dropbox-backdrop",!0),document.getElementById(LadiPageScript.runtime.backdrop_dropbox_id).style.setProperty("display","block");isEmptyLadiPage(e.animation_name)||isEmptyLadiPage(n)||(n.style.setProperty("animation-name",e.animation_name),n.style.setProperty("-webkit-animation-name",e.animation_name),n.style.setProperty("animation-duration",e.animation_duration+"s"),n.style.setProperty("-webkit-animation-duration",e.animation_duration+"s")),a.classList.remove("opacity-0")}},LadiPageLibraryV2.prototype.hideDropbox=function(){var t=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(t)&&"true"==t.getAttribute("data-dropbox")){t.setAttribute("style",t.getAttribute("data-style")||""),t.removeAttribute("data-style");var e=document.getElementById(t.getAttribute("data-from-doc-id"));isEmptyLadiPage(e)||(e.setAttribute("style",e.getAttribute("data-style")||""),e.removeAttribute("data-style"));var i=t.getElementsByClassName("ladi-popup")[0];isEmptyLadiPage(i)||i.setAttribute("style",i.getAttribute("data-style")||"");var a="dropbox-"+t.id,n=document.getElementById(a);isEmptyLadiPage(n)||n.parentElement.removeChild(n);for(var o=t.querySelectorAll('[data-dropbox-backdrop="true"]'),r=0;r<o.length;r++)window.ladi(o[r].id).hide();if(t.removeAttribute("data-dropbox-backdrop"),0==(o=document.querySelectorAll('[data-dropbox-backdrop="true"]')).length)document.getElementById(LadiPageScript.runtime.backdrop_dropbox_id).style.removeProperty("display");document.querySelector("#"+LadiPageScript.runtime.builder_section_popup_id+" > .ladi-container").appendChild(t)}},LadiPageLibraryV2.prototype.toggle=function(t){var e=this.doc||document.getElementById(this.id);isEmptyLadiPage(e)||("none"==getComputedStyle(e).display?this.show(t):this.hide(t))},LadiPageLibraryV2.prototype.set_style=function(t,e,i){var a=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(a)){var n=e.action_type,o="set-style-"+t.id+"-"+a.id+"-"+n,r="set-style-"+t.id+"-"+a.id+"-"+n+"-transition",d=document.getElementById(i?r:o);isEmptyLadiPage(d)||d.parentElement.removeChild(d),a.classList.remove(o);var l={};isEmptyLadiPage(e.color)||(l.color=e.color),isEmptyLadiPage(e.background_color)||(l.background="none",l["background-color"]=e.background_color),isEmptyLadiPage(e.border_color)||(l["border-color"]=e.border_color),isEmptyLadiPage(e.opacity)||(l.opacity=e.opacity/100),isEmptyLadiPage(e.transform_scale)||(l.transform="scale("+e.transform_scale/100+")"),e.ontop&&(l["z-index"]="9000000090 !important"),isObjectLadiPage(e.custom_css)&&Object.keys(e.custom_css).forEach(function(t){l[t]=e.custom_css[t]});var s=[],c="",u="",p="",m="",g="",_="",y=!1;Object.keys(l).forEach(function(t){"z-index"!=t.toLowerCase()?"background"==t.toLowerCase()||t.toLowerCase().startsWith("background-")?p+=t+": "+l[t]+";":"color"==t.toLowerCase()||"font"==t.toLowerCase()||t.toLowerCase().startsWith("font-")||t.toLowerCase().startsWith("text-")||t.toLowerCase().startsWith("line-")?m+=t+": "+l[t]+";":u+=t+": "+l[t]+";":_+=t+": "+l[t]+";"});var f=function(t){for(var e=!1,n=0;n<s.length;n++){var r=s[n];if(isEmptyLadiPage(r)){i&&(y||(g+="#"+a.id+" {transition: all 150ms linear 0s;}")),c+="#"+a.id+"."+o+" {"+t+"}",e=!0;break}if(document.querySelectorAll("#"+a.id+" > "+r).length>0){i&&(g+="#"+a.id+" > "+r+" {transition: all 150ms linear 0s;}"),c+="#"+a.id+"."+o+" > "+r+" {"+t+"}",e=!0;break}}return e};if(!isEmptyLadiPage(m)){var v=function(t){t=isEmptyLadiPage(t)?"":"."+t;var e="";return e+="#"+a.id+t+", ",e+="#"+a.id+t+" .ladi-headline, ",e+="#"+a.id+t+" .ladi-paragraph, ",e+="#"+a.id+t+" .ladi-list-paragraph"};document.querySelectorAll(v()).length>0&&(i&&(y=!0,g+=v()+" {transition: all 150ms linear 0s;}"),c+=v(o)+" {"+m+"}")}isEmptyLadiPage(p)||(s=[".ladi-section-background",".ladi-popup .ladi-popup-background",".ladi-button .ladi-button-background",".ladi-box",".ladi-video .ladi-video-background",".ladi-form .ladi-form-item-background",".ladi-frame .ladi-frame-background",".ladi-survey .ladi-survey-option-background",".ladi-combobox .ladi-combobox-item-background",".ladi-countdown .ladi-countdown-background",".ladi-notify"],f(p)||(u+=p)),isEmptyLadiPage(u)||(s=[".ladi-group",".ladi-accordion",".ladi-popup",".ladi-image",".ladi-gallery",".ladi-button",".ladi-button-group",".ladi-headline",".ladi-paragraph",".ladi-list-paragraph",".ladi-line",".ladi-box",".ladi-collection",".ladi-tabs",".ladi-shape",".ladi-video",".ladi-form",".ladi-carousel",".ladi-html-code",".ladi-frame",".ladi-table",".ladi-survey",".ladi-combobox",".ladi-countdown",".ladi-notify",".ladi-spin-lucky"],f(u)||(_+=u)),isEmptyLadiPage(_)||(s=[""],f(_)),i?LadiPageScript.createStyleElement(r,g):LadiPageScript.createStyleElement(o,c),i||a.classList.add(o)}},LadiPageLibraryV2.prototype.remove_style=function(t,e){var i=this.doc||document.getElementById(this.id);if(!isEmptyLadiPage(i)){var a=e.action_type,n="set-style-"+t.id+"-"+i.id+"-"+a;i.classList.remove(n);var o=document.getElementById(n);isEmptyLadiPage(o)||o.parentElement.removeChild(o)}},LadiPageLibraryV2.prototype.element=function(){return this.doc||document.getElementById(this.id)},["start","add_turn"].forEach(function(t){LadiPageLibraryV2.prototype[t]=function(){var e=LadiPageScript.runtime.eventData[this.id];if(!isEmptyLadiPage(e)){var i=LadiPageApp[e.type+LadiPageScript.const.APP_RUNTIME_PREFIX];if(!isEmptyLadiPage(i)){var a=i(e,!0);isFunctionLadiPage(a[t])&&a[t](this.id)}}}});var LadiPageAppV2,ladi=ladi||function(t,e){if(!isEmptyLadiPage(t)){var i=new LadiPageLibraryV2;return i.id=t,i.doc=e,i}},ladi_fbq=function(t,e,i,a){if(isObjectLadiPage(window.ladi_conversion_api)&&isObjectLadiPage(window.ladi_conversion_api.facebook)&&isArrayLadiPage(window.ladi_conversion_api.facebook.pixels)){isObjectLadiPage(a)||(a={});a.eventID="ladi."+Date.now()+"."+(Math.floor(9e10*Math.random())+1e10)}LadiPageQueueCommand.push(function(){return isFunctionLadiPage(window.fbq)},function(){window.fbq(t,e,i,a),LadiPageScript.runConversionApi("facebook","events",[{key:t,name:e,custom_data:i,data:a}])})};isArrayLadiPage(window.ladi_fbq_data)&&(window.ladi_fbq_data.forEach(function(t){ladi_fbq(t[0],t[1],t[2],t[3])}),delete window.ladi_fbq_data),LadiPageScript.const.DATA_TYPE={default:"default",dataset:"dataset"},LadiPageScript.const.DATASET_TYPE={notify:"NOTIFY",spin_lucky:"SPIN_LUCKY",collection:"COLLECTION",blog:"BLOG"},LadiPageScript.const.DATASET_FIELD_TYPE={text:"TEXT",number:"NUMBER",boolean:"BOOLEAN",image:"IMAGE",link:"LINK",html:"HTML",date_time:"DATE_TIME"},LadiPageScript.const.DATASET_ID_LENGTH=24,LadiPageScript.const.DATASET_CONTENT_SOURCE_URL="ladisources/global/dataset/",LadiPageScript.const.DATASET_CONTENT_SOURCE_ENDSWITH=".html",LadiPageScriptV2.prototype.convertDataset=function(t,e){var i;if(isArrayLadiPage(e)){var a={};(e=e.sort(function(t,e){var i=new Date(t.updated_at).getTime(),a=new Date(e.updated_at).getTime();return(i=isNaN(i)?t.updated_at:i)>(a=isNaN(a)?e.updated_at:a)?1:-1})).forEach(function(t){a[t.id]=t}),e=Object.values(a)}return t==this.const.DATASET_TYPE.notify?(i=[],e.forEach(function(t){i.push({gsx$title:{$t:t.title},gsx$content:{$t:t.content},gsx$time:{$t:t.time},gsx$image:{$t:t.image}})}),i):t==this.const.DATASET_TYPE.spin_lucky?function(t){var e=[];return t.forEach(function(t){var i=[encodeURIComponent(t.coupon_code),encodeURIComponent(t.coupon_text),encodeURIComponent(t.percent+"%")].join("|");i=Base64.encode(i),e.push(i)}),e}(e):t==this.const.DATASET_TYPE.blog?function(t){return t}(e):t==this.const.DATASET_TYPE.collection?function(t){return t}(e):void 0},LadiPageScriptV2.prototype.loadDataset=function(t,e,i,a,n,o,r,d){var l=this,s=function(t,e,i){return isArrayLadiPage(t)&&t.length>0&&!isEmptyLadiPage(e)&&!isEmptyLadiPage(i)&&t.sort(function(t,a){return l.const.SORT_BY_TYPE.asc==i?t[e]>a[e]?1:-1:t[e]<a[e]?1:-1}),t};if(l.runtime.tmp.dataset_check_load)l.runtime.tmp.timeout_dataset_data[e]=l.runTimeout(function(){l.loadDataset(t,e,i,a,n,!1,r,d)},100);else{var c=[],u=[];if(isEmptyLadiPage(t)){Object.keys(l.runtime.eventData).forEach(function(t){var e=l.runtime.eventData[t];isEmptyLadiPage(e["option.data_setting.value"])||(c.push({element_id:t,id:e["option.data_setting.value"],type:e["option.data_setting.type_dataset"],sort_name:e["option.data_setting.sort_name"],sort_by:e["option.data_setting.sort_by"]}),u.push(e["option.data_setting.value"]))}),u=u.unique()}else{if(e.length!=l.const.DATASET_ID_LENGTH)return;if(!isNullLadiPage(l.runtime.tmp.dataset_data[e]))return!0===l.runtime.tmp.dataset_data[e]?void(l.runtime.tmp.timeout_dataset_data[e]=l.runTimeout(function(){l.loadDataset(t,e,i,a,n,!1,r,d)},100)):(!o&&isFunctionLadiPage(d)&&d(s(l.runtime.tmp.dataset_data[e],a,n)),s(l.runtime.tmp.dataset_data[e],a,n));l.runtime.tmp.dataset_data[e]=!0,c=[{element_id:t,id:e,type:i,sort_name:a,sort_by:n}],u=[e]}if(0!=u.length){var p=r?l.runtime.store_id:window.$rootScope.getStoreId(),m=l.const.API_DATASET_DATA.format(p,u.join(","));l.runtime.tmp.dataset_check_load=!0,l.sendRequest("GET",m,null,!0,null,function(i,a,n){if(n.readyState==XMLHttpRequest.DONE){try{var o=JSON.parse(i);Object.keys(o).forEach(function(t){for(var e=0;e<c.length;e++)c[e].id==t&&(c[e].dataset=l.convertDataset(c[e].type,o[t]))}),c.forEach(function(i){if(isNullLadiPage(i.dataset))return l.runtime.tmp.dataset_data[i.id]=!1,void(isEmptyLadiPage(l.runtime.tmp.timeout_dataset_data[e])||(l.removeTimeout(l.runtime.tmp.timeout_dataset_data[e]),delete l.runtime.tmp.timeout_dataset_data[e]));if(l.runtime.tmp.dataset_data[i.id]=i.dataset,isEmptyLadiPage(t)){var a=l.runtime.eventData[i.element_id],n=LadiPageApp[a.type+l.const.APP_RUNTIME_PREFIX];isEmptyLadiPage(n)?"table"==a.type&&function(t,e){var i=document.getElementById(t);if(!isEmptyLadiPage(i)){for(var a=i.getElementsByTagName("tbody")[0],n=[],o={},r=i.querySelectorAll("thead td"),d=0;d<r.length;d++){var s={name:r[d].getAttribute("data-name"),type:r[d].getAttribute("data-type"),is_show:!0};n.push(s),o[s.name]=r[d].getAttribute("data-width")}var c=l.generateTableTbodyDataset(i,n,o,e);a.outerHTML!=c&&(a.outerHTML=c);for(var u=function(t){t.stopPropagation(),lightbox_image(t.target.getAttribute("data-src"))},p=i.querySelectorAll("table td img"),m=0;m<p.length;m++)p[m].addEventListener("click",u)}}(i.element_id,s(i.dataset,i.sort_name,i.sort_by)):((a=l.copy(a)).dataset_value=s(i.dataset,i.sort_name,i.sort_by),n(a,r).run(i.element_id,l.runtime.isDesktop))}else isFunctionLadiPage(d)&&d(s(i.dataset,i.sort_name,i.sort_by))})}catch(t){l.runtime.tmp.dataset_data[e]=!1,isEmptyLadiPage(l.runtime.tmp.timeout_dataset_data[e])||(l.removeTimeout(l.runtime.tmp.timeout_dataset_data[e]),delete l.runtime.tmp.timeout_dataset_data[e])}l.runtime.tmp.dataset_check_load=!1}})}}},LadiPageScriptV2.prototype.generateTableTheadDataset=function(t,e){var i="<thead><tr>",a="";return isArrayLadiPage(t)&&(t=t.filter(function(t){return!t.is_delete&&t.is_show})).forEach(function(t){var n=parseFloatLadiPage(e[t.name])||0;n=n>0?n:"",i+='<td data-name="'+t.name+'" data-type="'+t.type+'"'+(isEmptyLadiPage(n)?"":' data-width="'+n+'"')+">"+t.label+"</td>",a+='<col data-name="'+t.name+'" />'}),i+="</tr></thead>",i+="<colgroup>"+a+"</colgroup>"},LadiPageScriptV2.prototype.generateTableTbodyDataset=function(t,e,i,a){var n="<tbody>";function o(t){return(t>=10?"":"0")+t}var r=this;return isArrayLadiPage(e)&&(e=e.filter(function(t){return!t.is_delete&&t.is_show}),isArrayLadiPage(a)&&a.forEach(function(t){n+="<tr>",e.forEach(function(e){var a=t[e.name];if(isEmptyLadiPage(a))a="";else{if(e.type==r.const.DATASET_FIELD_TYPE.link&&(a='<a href="'+a+'" target="_blank">'+a+"</a>"),e.type==r.const.DATASET_FIELD_TYPE.image){var d=parseFloatLadiPage(i[e.name])||0;d=d>0?d:100,a='<img data-src="'+a+'" src="'+r.getOptimizeImage(a,d,d,!0,!0,!0,!0)+'" />'}if(e.type==r.const.DATASET_FIELD_TYPE.date_time){var l=new Date(a);a=l.getFullYear()+"-"+o(l.getMonth()+1)+"-"+o(l.getDate())+" "+o(l.getHours())+":"+o(l.getMinutes())+":"+o(l.getSeconds())}e.type==r.const.DATASET_FIELD_TYPE.boolean&&(a=a?r.const.LANG.OPTION_TRUE:r.const.LANG.OPTION_FALSE)}n+="<td>"+a+"</td>"}),n+="</tr>"})),n+="</tbody>"},(LadiPageAppV2=LadiPageAppV2||function(){}).prototype.notify_runtime=function(t,e){var i=function(){},a="top_left",n="top_center",o="top_right",r="bottom_left",d="bottom_center",l="bottom_right";return i.prototype.run=function(e,i){isObjectLadiPage(LadiPageScript.runtime.tmp.timeout_notify)||(LadiPageScript.runtime.tmp.timeout_notify={});var s=t["option.sheet_id"],c=t.dataset_value,u=document.getElementById(e);if(u.classList.add("ladi-hidden"),!isEmptyLadiPage(s)||!isEmptyLadiPage(c)){var p=i?LadiPageScript.const.DESKTOP:LadiPageScript.const.MOBILE,m=t[p+".option.position"],g=1e3*(parseFloatLadiPage(t["option.time_show"])||5),_=1e3*(parseFloatLadiPage(t["option.time_delay"])||10);_=_<501?501:_;var y="https://w.ladicdn.com/source/notify.svg?v=1.0",f=[{key:"gsx$title",className:".ladi-notify-title"},{key:"gsx$content",className:".ladi-notify-content"},{key:"gsx$time",className:".ladi-notify-time"},{key:"gsx$image",className:".ladi-notify-image img"}];u.classList.remove("ladi-hidden");var v=function(){u.style.setProperty("opacity",0),m!=a&&m!=n&&m!=o||u.style.setProperty("top",-u.clientHeight-100+"px"),m!=r&&m!=d&&m!=l||u.style.setProperty("bottom",-u.clientHeight-100+"px")};v(),f.forEach(function(t){"gsx$image"==t.key?u.querySelectorAll(t.className)[0].src=y:u.querySelectorAll(t.className)[0].textContent=""});var P=function(t){t=t.sort(function(){return.5-Math.random()});var i=-1,s=function(){if(i+1<t.length){var c=t[++i],p=Object.keys(c);u.style.removeProperty("opacity"),m!=a&&m!=n&&m!=o||u.style.removeProperty("top"),m!=r&&m!=d&&m!=l||u.style.removeProperty("bottom"),f.forEach(function(t){-1!=p.indexOf(t.key)&&("gsx$image"==t.key?u.querySelectorAll(t.className)[0].src=isEmptyLadiPage(c[t.key].$t)?y:c[t.key].$t:u.querySelectorAll(t.className)[0].textContent=c[t.key].$t)});var L=function(){var a=f.findIndex(function(t){return"gsx$image"==t.key});if(-1!=a){var n=t[i+1>=t.length?0:i+1];n.hasOwnProperty(f[a].key)&&(u.querySelectorAll(f[a].className)[0].src=isEmptyLadiPage(n[f[a].key].$t)?y:n[f[a].key].$t)}LadiPageScript.runtime.tmp.timeout_notify[e]=LadiPageScript.runTimeout(s,_-500)};LadiPageScript.runtime.tmp.timeout_notify[e]=LadiPageScript.runTimeout(function(){v(),LadiPageScript.runtime.tmp.timeout_notify[e]=LadiPageScript.runTimeout(L,500)},g)}else P(t)};LadiPageScript.runtime.tmp.timeout_notify[e]=LadiPageScript.runTimeout(s,_)},L=function(t){u.querySelector(".ladi-notify").classList.remove("ladi-hidden"),u.classList.add("ladi-notify-transition"),P(t)};isEmptyLadiPage(c)||L(c),isEmptyLadiPage(s)||LadiPageScript.sendRequest("GET","https://docs.google.com/spreadsheets/d/"+s+"/gviz/tq?tqx=out:json",null,!0,null,function(t,e,i){if(i.readyState==XMLHttpRequest.DONE&&200==e){t=(t=t.substr(t.indexOf('"table":{')+'"table":'.length)).substr(0,t.indexOf("});"));var a=JSON.parse(t),n=[],o=a.cols;isObjectLadiPage(a)&&0==a.parsedNumHeaders&&isArrayLadiPage(a.rows)&&a.rows.length>0&&isObjectLadiPage(a.rows[0])&&isArrayLadiPage(a.rows[0].c)&&a.rows[0].c.length>0&&(o=[],a.rows[0].c.forEach(function(t){o.push({label:isObjectLadiPage(t)?t.v:""})}),a.rows.shift()),isObjectLadiPage(a)&&isArrayLadiPage(a.rows)&&isArrayLadiPage(o)&&a.rows.forEach(function(t){if(isObjectLadiPage(t)){var e={};o.forEach(function(i,a){if(isArrayLadiPage(t.c)){var n=t.c[a];isObjectLadiPage(i)&&!isEmptyLadiPage(i.label)&&isObjectLadiPage(n)&&(e["gsx$"+i.label.trim().toLowerCase()]={$t:n.v})}}),n.push(e)}}),L(n)}})}},new i},(LadiPageAppV2=LadiPageAppV2||function(){}).prototype.spinlucky_runtime=function(t,e){var i=function(){},a=function(t){return parseFloatLadiPage(window.ladi("_total_turn_"+t).get_cookie())||0};return i.prototype.getEventTrackingCategory=function(){return"LadiPageFinish"},i.prototype.run=function(e,i){var n=t["option.spinlucky_setting.list_value"],o=t.dataset_value,r=t["option.spinlucky_setting.result_popup_id"],d=t["option.spinlucky_setting.result_message"],l=t["option.spinlucky_setting.max_turn"],s=a(e);if(!isEmptyLadiPage(n)||!isEmptyLadiPage(o)){n=n||o,LadiPageScript.setDataReplaceStr("spin_turn_left",l-s);var c=document.getElementById(e),u=c.getElementsByClassName("ladi-spin-lucky-start")[0],p=c.getElementsByClassName("ladi-spin-lucky-screen")[0],m="";n.forEach(function(t,e){var i=Base64.decode(t).split("|");if(3==i.length){var a=360/n.length*e+180/n.length,o="rotate("+(a*=-1)+"deg) translateY(-50%)";m+='<div class="ladi-spin-lucky-label" style="transform: '+o+"; -webkit-transform: "+o+';">'+decodeURIComponentLadiPage(i[1].trim())+"</div>"}}),p.innerHTML=m;var g=!1;u.addEventListener("click",function(t){if(t.stopPropagation(),!g)if((s=a(e))>=l)LadiPageScript.showMessage(LadiPageScript.const.LANG.GAME_MAX_TURN_MESSAGE.format(l));else{g=!0;var i=[],o=0,c=1;n.forEach(function(t,e){var a=Base64.decode(t).split("|"),n=decodeURIComponentLadiPage(a[0].trim()),r=decodeURIComponentLadiPage(a[1].trim()),d=parseFloatLadiPage(decodeURIComponentLadiPage(a[2].trim()))||0;i.push({min:c,max:c+d-1,value:n,text:r,percent:d,index:e}),c+=d,o+=d});for(var u=LadiPageScript.randomInt(1,o),m=null,_=0;_<i.length;_++)if(i[_].min<=u&&i[_].max>=u){m=i[_];break}if(isEmptyLadiPage(m))g=!1;else{var y=parseFloatLadiPage(p.getAttribute("data-rotate"))||0,f=m.index*(360/i.length)+360*(4+Math.ceil(y/360))+180/i.length,v="rotate("+f+"deg)";p.setAttribute("data-rotate",f),p.style.setProperty("transform",v),p.style.setProperty("-webkit-transform",v),"NEXT_TURN"!=m.value.toUpperCase()&&(s++,window.ladi("_total_turn_"+e).set_cookie(s,1));LadiPageScript.runTimeout(function(){"NEXT_TURN"==m.value.toUpperCase()?isEmptyLadiPage(m.text)||LadiPageScript.showMessage(m.text):(LadiPageScript.setDataReplaceStr("coupon",m.value),LadiPageScript.setDataReplaceStr("coupon_code",m.value),LadiPageScript.setDataReplaceStr("coupon_text",m.text),LadiPageScript.setDataReplaceStr("spin_turn_left",l-s),LadiPageScript.setDataReplaceElement(!0,!1,null,null,["coupon","coupon_code","coupon_text","spin_turn_left"]),r==LadiPageScript.const.GAME_RESULT_TYPE.default?isEmptyLadiPage(d)||LadiPageScript.showMessage(d):window.ladi(r).show(),LadiPageScript.runEventTracking(e,{is_form:!1})),g=!1},1e3*parseFloatLadiPage(getComputedStyle(p).transitionDuration)+1e3)}}})}},i.prototype.start=function(t){var e=document.getElementById(t);if(!isEmptyLadiPage(e)&&e.getElementsByClassName("ladi-spin-lucky").length>0){var i=e.getElementsByClassName("ladi-spin-lucky-start")[0];isEmptyLadiPage(i)||i.click()}},i.prototype.add_turn=function(e){var i=t["option.spinlucky_setting.max_turn"],n=a(e);n>0&&n--,window.ladi("_total_turn_"+e).set_cookie(n,1),LadiPageScript.setDataReplaceStr("spin_turn_left",i-n),LadiPageScript.setDataReplaceElement(!1)},new i},LadiPageScript.const.LANGen={ALERT_TITLE:"Alert",ALERT_BUTTON_TEXT:"OK",GET_CODE_BUTTON_TEXT:"Resend code",COPIED:"Copied!",PASTED:"Pasted!",FAILED:"Failed!",OPTION_NO_SELECT:"Blank",OPTION_TRUE:"Yes",OPTION_FALSE:"No",REQUEST_SEND_ERROR:"An error occurred, please try again!",FORM_LOGIN_SEND_ERROR:"Your key is invalid or has expired!",FORM_SEND_DATA_NO_CONFIG:"Please re-check your Form settings!",FORM_UPLOAD_FILE_MAX_SIZE_ERROR:"You can only upload file with the maximum size of {{max_size}}MB.",FORM_UPLOAD_FILE_MAX_LENGTH_ERROR:"You can only upload {{max_length}} files at once.",FORM_CAPTCHA_ERROR:"Please let us know that you're not a robot!",FORM_CAPTCHA_LOADING:"Please wait while we're checking your identity!",FORM_THANKYOU_MESSAGE_DEFAULT:"Thank you for your attention!",FORM_INPUT_REQUIRED_ERROR:"Please input all required information!",FORM_INPUT_EMAIL_REGEX:"Please input valid email format!",FORM_INPUT_TEXT_REGEX:"Please input with valid format!",PRODUCT:"Product",SERVICE:"Service",TICKET:"Ticket",ADD_TO_CART_QUANTITY_REQUIRED:"Please input your quanity!",ADD_TO_CART_NO_PRODUCT:"Information not found {{name}}, try again!",ADD_TO_CART_PRODUCT_REQUIRED:"Please select {{name}}!",ADD_TO_CART_NO_QUANTITY:"{{name}} is out of stocks!",ADD_TO_CART_MAX_QUANTITY:"You can only purchase with the maximum of {{max}} {{name}}.",ADD_TO_CART_PRODUCT_BEFORE_START_DATE:"It's not the opening time of {{name}} yet!!",ADD_TO_CART_PRODUCT_AFTER_END_DATE:"Opening time of {{name}} has ended!",ADD_TO_CART_PRODUCT_ONLY_ONE:"You can only purchase up to 1 {{name}} at once.",GAME_RESULT_MESSAGE:"Congrats! You have been gifted with {{coupon_text}}. Please insert your coupon code: {{coupon_code}}. You have {{spin_turn_left}} turns remaining.",GAME_MAX_TURN_MESSAGE:"You're out of turns.",HIDE_ELEMENT:"Hide element",SHOW_ELEMENT:"Show element",TOP_ELEMENT:"Pull Section to top",SCROLL_ELEMENT:"Scroll to Section",SET_COOKIE:"Add Cookie"},LadiPageScript.const.LANGvi={ALERT_TITLE:"Alert",ALERT_BUTTON_TEXT:"OK",GET_CODE_BUTTON_TEXT:"Gửi lại",COPIED:"Copied!",PASTED:"Pasted!",FAILED:"Failed!",OPTION_NO_SELECT:"Không chọn",OPTION_TRUE:"Có",OPTION_FALSE:"Không",REQUEST_SEND_ERROR:"Đã xảy ra lỗi, vui lòng thử lại!",FORM_LOGIN_SEND_ERROR:"Mã của bạn không đúng hoặc đã hết hạn!",FORM_SEND_DATA_NO_CONFIG:"Vui lòng kiểm tra lại cấu hình Form!",FORM_UPLOAD_FILE_MAX_SIZE_ERROR:"Bạn chỉ được upload file tổng dung lượng tối đa {{max_size}}MB.",FORM_UPLOAD_FILE_MAX_LENGTH_ERROR:"Bạn chỉ được upload tối đa {{max_length}} file.",FORM_CAPTCHA_ERROR:"Vui lòng xác minh rằng bạn không phải người máy!",FORM_CAPTCHA_LOADING:"Vui lòng chờ xác minh rằng bạn không phải người máy!",FORM_THANKYOU_MESSAGE_DEFAULT:"Cảm ơn bạn đã quan tâm!",FORM_INPUT_REQUIRED_ERROR:"Vui lòng nhập đầy đủ các trường thông tin!",FORM_INPUT_EMAIL_REGEX:"Vui lòng nhập đúng định dạng email!",FORM_INPUT_TEXT_REGEX:"Vui lòng nhập đúng định dạng!",PRODUCT:"Sản phẩm",SERVICE:"Dịch vụ",TICKET:"Vé",ADD_TO_CART_QUANTITY_REQUIRED:"Vui lòng nhập số lượng!",ADD_TO_CART_NO_PRODUCT:"Không tìm thấy thông tin {{name}}, vui lòng thử lại sau!",ADD_TO_CART_PRODUCT_REQUIRED:"Vui lòng chọn {{name}}!",ADD_TO_CART_NO_QUANTITY:"{{name}} đã hết số lượng!",ADD_TO_CART_MAX_QUANTITY:"Bạn chỉ được mua tối đa {{max}} {{name}}.",ADD_TO_CART_PRODUCT_BEFORE_START_DATE:"Chưa đến thời gian mở bán {{name}}!",ADD_TO_CART_PRODUCT_AFTER_END_DATE:"Thời gian mua {{name}} đã hết!",ADD_TO_CART_PRODUCT_ONLY_ONE:"Bạn chỉ được mua 1 {{name}} cùng lúc.",GAME_RESULT_MESSAGE:"Chúc mừng bạn nhận được {{coupon_text}}. Nhập mã: {{coupon_code}} để sử dụng. Bạn còn {{spin_turn_left}} lượt quay.",GAME_MAX_TURN_MESSAGE:"Bạn đã hết lượt quay.",HIDE_ELEMENT:"Ẩn phần tử",SHOW_ELEMENT:"Hiện phần tử",TOP_ELEMENT:"Kéo Section lên đầu",SCROLL_ELEMENT:"Kéo tới Section",SET_COOKIE:"Thiết lập Cookie"},LadiPageScript.const.LANGth={ALERT_TITLE:"แจ้งเตือน",ALERT_BUTTON_TEXT:"ตกลง",GET_CODE_BUTTON_TEXT:"ส่งรหัสใหม่",COPIED:"คัดลอก!",PASTED:"วางแล้ว!",FAILED:"ล้มเหลว!",OPTION_NO_SELECT:"ว่าง",OPTION_TRUE:"ใช่",OPTION_FALSE:"ไม่",REQUEST_SEND_ERROR:"เกิดข้อผิดพลาด โปรดลองอีกครั้ง!",FORM_LOGIN_SEND_ERROR:"คีย์ของคุณไม่ถูกต้องหรือหมดอายุแล้ว!",FORM_SEND_DATA_NO_CONFIG:"โปรดตรวจสอบการตั้งค่าแบบฟอร์มของคุณอีกครั้ง!",FORM_UPLOAD_FILE_MAX_SIZE_ERROR:"คุณสามารถอัปโหลดไฟล์ที่มีขนาดสูงสุด {{max_size}} MB เท่านั้น",FORM_UPLOAD_FILE_MAX_LENGTH_ERROR:"คุณสามารถอัปโหลดไฟล์ได้ครั้งละ {{max_length}} ไฟล์เท่านั้น",FORM_CAPTCHA_ERROR:"โปรดแจ้งให้เราทราบว่าคุณไม่ใช่หุ่นยนต์!",FORM_CAPTCHA_LOADING:"โปรดรอในขณะที่เรากำลังตรวจสอบตัวตนของคุณ!",FORM_THANKYOU_MESSAGE_DEFAULT:"ขอบคุณที่ให้ความสนใจ!",FORM_INPUT_REQUIRED_ERROR:"กรุณาป้อนข้อมูลที่จำเป็นทั้งหมด!",FORM_INPUT_EMAIL_REGEX:"โปรดป้อนรูปแบบอีเมลที่ถูกต้อง!",FORM_INPUT_TEXT_REGEX:"โปรดป้อนข้อมูลด้วยรูปแบบที่ถูกต้อง!",PRODUCT:"สินค้า",SERVICE:"บริการ",TICKET:"ตั๋ว",ADD_TO_CART_QUANTITY_REQUIRED:"กรุณาระบุคุณภาพของคุณ!",ADD_TO_CART_NO_PRODUCT:"ไม่พบข้อมูล {{name}} โปรดลองอีกครั้ง!",ADD_TO_CART_PRODUCT_REQUIRED:"โปรดเลือก {{name}}!",ADD_TO_CART_NO_QUANTITY:"{{name}} สินค้าหมด!",ADD_TO_CART_MAX_QUANTITY:"คุณสามารถซื้อได้สูงสุด {{max}} {{name}} เท่านั้น",ADD_TO_CART_PRODUCT_BEFORE_START_DATE:"ยังไม่ถึงเวลาเปิดทำการของ {{name}} yet!",ADD_TO_CART_PRODUCT_AFTER_END_DATE:"เวลาเปิดของ {{name}} สิ้นสุดลงแล้ว!",ADD_TO_CART_PRODUCT_ONLY_ONE:"คุณสามารถซื้อได้สูงสุด 1 {{name}} ต่อครั้ง",GAME_RESULT_MESSAGE:"ขอแสดงความยินดี! คุณได้รับ {{coupon_text}} เป็นของขวัญ โปรดใส่รหัสคูปองของคุณ: {{coupon_code}} คุณเหลืออีก {{spin_turn_left}} เลี้ยว",GAME_MAX_TURN_MESSAGE:"คุณไม่ได้อยู่ในเทิร์น",HIDE_ELEMENT:"ซ่อนองค์ประกอบ",SHOW_ELEMENT:"แสดงองค์ประกอบ",TOP_ELEMENT:"ดึงส่วนขึ้นด้านบน",SCROLL_ELEMENT:"เลื่อนไปที่ส่วน",SET_COOKIE:"เพิ่มคุกกี้"},LadiPageScript.const.LANGid={ALERT_TITLE:"Peringatan",ALERT_BUTTON_TEXT:"Oke",GET_CODE_BUTTON_TEXT:"Kirim ulang kode",COPIED:"Disalin!",PASTED:"Ditempelkan!",FAILED:"Gagal!",OPTION_NO_SELECT:"Kosong",OPTION_TRUE:"Ya",OPTION_FALSE:"Tidak",REQUEST_SEND_ERROR:"Terjadi kesalahan, harap coba lagi!",FORM_LOGIN_SEND_ERROR:"Kunci Anda tidak valid atau telah kedaluwarsa!",FORM_SEND_DATA_NO_CONFIG:"Silakan periksa kembali pengaturan Formulir Anda!",FORM_UPLOAD_FILE_MAX_SIZE_ERROR:"Anda hanya dapat mengupload file dengan ukuran maksimal {{max_size}}MB.",FORM_UPLOAD_FILE_MAX_LENGTH_ERROR:"Anda hanya dapat mengupload {{max_length}} file sekaligus.",FORM_CAPTCHA_ERROR:"Harap beri tahu kami bahwa Anda bukan robot!",FORM_CAPTCHA_LOADING:"Harap tunggu sementara kami sedang memeriksa identitas Anda!",FORM_THANKYOU_MESSAGE_DEFAULT:"Terima kasih atas perhatian Anda!",FORM_INPUT_REQUIRED_ERROR:"Masukkan semua informasi yang diperlukan!",FORM_INPUT_EMAIL_REGEX:"Masukkan format email yang valid!",FORM_INPUT_TEXT_REGEX:"Masukkan dengan format yang valid!",PRODUCT:"Produk",SERVICE:"Layanan",TICKET:"Tiket",ADD_TO_CART_QUANTITY_REQUIRED:"Masukkan jumlah Anda!",ADD_TO_CART_NO_PRODUCT:"Informasi tidak ditemukan {{name}}, coba lagi!",ADD_TO_CART_PRODUCT_REQUIRED:"Silakan pilih {{name}}!",ADD_TO_CART_NO_QUANTITY:"{{name}} kehabisan stok!",ADD_TO_CART_MAX_QUANTITY:"Anda hanya dapat membeli dengan maksimum {{max}} {{name}}.",ADD_TO_CART_PRODUCT_BEFORE_START_DATE:"Ini belum jam buka {{name}} belum!",ADD_TO_CART_PRODUCT_AFTER_END_DATE:"Waktu buka {{name}} telah berakhir!",ADD_TO_CART_PRODUCT_ONLY_ONE:"Anda hanya dapat membeli hingga 1 {{name}} sekaligus.",GAME_RESULT_MESSAGE:"Selamat! Anda telah diberikan {{coupon_text}}. Masukkan kode kupon Anda: {{coupon_code}}. Anda memiliki {{spin_turn_left}} putaran tersisa.",GAME_MAX_TURN_MESSAGE:"Anda kehabisan giliran.",HIDE_ELEMENT:"Sembunyikan elemen",SHOW_ELEMENT:"Tampilkan elemen",TOP_ELEMENT:"Tarik Bagian ke atas",SCROLL_ELEMENT:"Gulir ke Bagian",SET_COOKIE:"Tambahkan Cookie"},LadiPageScript.const.LANGms={ALERT_TITLE:"Amaran",ALERT_BUTTON_TEXT:"OK",GET_CODE_BUTTON_TEXT:"Hantar semula kod",COPIED:"Disalin!",PASTED:"Tampal!",FAILED:"Gagal!",OPTION_NO_SELECT:"Kosong",OPTION_TRUE:"Ya",OPTION_FALSE:"Tidak",REQUEST_SEND_ERROR:"Ralat telah berlaku, sila cuba lagi!",FORM_LOGIN_SEND_ERROR:"Kunci anda tidak sah atau telah tamat tempoh!",FORM_SEND_DATA_NO_CONFIG:"Sila semak semula tetapan Borang anda!",FORM_UPLOAD_FILE_MAX_SIZE_ERROR:"Anda hanya boleh memuat naik fail dengan saiz maksimum {{max_size}}MB.",FORM_UPLOAD_FILE_MAX_LENGTH_ERROR:"Anda hanya boleh memuat naik {{max_length}} fail sekali gus.",FORM_CAPTCHA_ERROR:"Sila maklumkan kepada kami bahawa anda bukan robot!",FORM_CAPTCHA_LOADING:"Sila tunggu sementara kami menyemak identiti anda!",FORM_THANKYOU_MESSAGE_DEFAULT:"Terima kasih atas perhatian anda!",FORM_INPUT_REQUIRED_ERROR:"Sila masukkan semua maklumat yang diperlukan!",FORM_INPUT_EMAIL_REGEX:"Sila masukkan format e-mel yang sah!",FORM_INPUT_TEXT_REGEX:"Sila masukkan dengan format yang sah!",PRODUCT:"Produk",SERVICE:"Perkhidmatan",TICKET:"Tiket",ADD_TO_CART_QUANTITY_REQUIRED:"Sila masukkan kuantiti anda!",ADD_TO_CART_NO_PRODUCT:"Maklumat tidak ditemui {{name}}, cuba lagi!",ADD_TO_CART_PRODUCT_REQUIRED:"Sila pilih {{name}}!",ADD_TO_CART_NO_QUANTITY:"{{name}} kehabisan stok!",ADD_TO_CART_MAX_QUANTITY:"Anda hanya boleh membeli dengan maksimum {{max}} {{name}}.",ADD_TO_CART_PRODUCT_BEFORE_START_DATE:"Ini bukan masa pembukaan {{name}} lagi!",ADD_TO_CART_PRODUCT_AFTER_END_DATE:"Masa pembukaan {{name}} telah tamat!",ADD_TO_CART_PRODUCT_ONLY_ONE:"Anda hanya boleh membeli sehingga 1 {{name}} sekali gus.",GAME_RESULT_MESSAGE:"Tahniah! Anda telah dikurniakan {{coupon_text}}. Sila masukkan kod kupon anda: {{coupon_code}}. Anda mempunyai baki {{spin_turn_left}} pusingan.",GAME_MAX_TURN_MESSAGE:"Anda kehabisan giliran.",HIDE_ELEMENT:"Sembunyikan elemen",SHOW_ELEMENT:"Tunjukkan elemen",TOP_ELEMENT:"Tarik Bahagian ke atas",SCROLL_ELEMENT:"Tatal ke Bahagian",SET_COOKIE:"Tambah Kuki"};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment