(function(){"use strict";const langCodeToCountryArray={fil:"PHL",af:"ZA",ckb:"IQ",sq:"AL",am:"ET",ar:"AE",hy:"AM",az:"AZ",eu:"ES",be:"BY",bn:"BD",bs:"BA",bg:"BG",ca:"CA",ceb:"PH",ny:"MW","zh-CN":"CN","zh-cn":"CN","zh-TW":"TW","zh-tw":"TW","zh-HK":"HK","zh-hk":"HK",co:"FR",hr:"HR",cs:"CZ",da:"DK",nl:"NL",en:"GB",et:"EE",tl:"PH",fi:"FI",fr:"FR",fy:"NL",gl:"ES",ka:"GE",de:"DE",el:"GR",gu:"IN",ht:"HT",ha:"NE",haw:"US",us:"US",iw:"IL",hi:"IN",hmn:"CN",hu:"HU",is:"IS",ig:"NG",id:"ID",ga:"IE",it:"IT",ja:"JP",jw:"ID",kn:"IN",kk:"KZ",km:"KH",ko:"KR",ku:"IR",ky:"KG",lo:"LA",la:"IT",lv:"LV",lt:"LT",lb:"LU",mk:"MK",mg:"MG",ms:"MY",ml:"IN",mt:"MT",mi:"NZ",nz:"NZ",mr:"IN",mn:"MN",my:"MM",ne:"NP",no:"NO",ps:"AF",fa:"IR",pl:"PL",pt:"PT",pa:"IN",ro:"RO",ru:"RU",sm:"US",gd:"CA",sr:"RS",st:"LS",sn:"ZW",sd:"PK",si:"LK",sk:"SK",sl:"SI",so:"SO",es:"ES",su:"SD",sw:"TZ",sv:"SE",tg:"TJ",ta:"IN",te:"IN",th:"TH",tr:"TR",uk:"UA",ur:"PK",uz:"UZ",vi:"VN",cy:"GB",xh:"ZA",yi:"DE",yo:"NG",zu:"ZA",ak:"GH",as:"IN",bm:"ML",br:"fr",ce:"ru",cu:"BG",kw:"KW",dz:"BT",eo:"un",ee:"GH",fo:"DK",ff:"MR",lg:"UG",he:"IL",ia:"un",jv:"ID",kl:"GL",ks:"IN",ki:"KE",rw:"RW",ln:"CG",lu:"CD",gv:"GB",nd:"ZW",se:"NO",nb:"NO",nn:"NO",or:"IN",om:"ET",os:"RU","pt-BR":"BR","pt-br":"BR","pt-PT":"PT","pt-pt":"PT",qu:"PE",rm:"CH",rn:"BI",sg:"CF",ii:"CN",tt:"RU",bo:"CN",ti:"ER",to:"TO",tk:"TM",ug:"ZH",vo:"un",wo:"SN",sa:"SA","ar-SA":"sa","ar-sa":"sa","ar-DZ":"DZ","ar-dz":"DZ","ar-AE":"AE","ar-ae":"AE","ar-BH":"BH","ar-bh":"BH","ar-EG":"EG","ar-eg":"EG","ar-IQ":"IQ","ar-iq":"IQ","ar-JO":"JO","ar-jo":"JO","ar-LB":"LB","ar-lb":"LB","ar-LY":"LY","ar-ly":"LY","ar-OM":"OM","ar-om":"OM","ar-QA":"QA","ar-qa":"QA","ar-SD":"SD","ar-sd":"SD","ar-SY":"SY","ar-sy":"SY","ar-YE":"YE","ar-ye":"YE","fr-BE":"BE","fr-be":"BE","fr-LU":"LU","fr-lu":"LU","fr-MC":"MC","fr-mc":"MC","fr-CH":"CH","fr-ch":"CH","fr-CA":"FR-CA","fr-ca":"FR-CA","en-CA":"FR-CA","en-ca":"FR-CA","de-AT":"AT","de-at":"AT","de-CH":"CH","de-ch":"CH","de-LU":"LU","de-lu":"LU","es-MX":"MX","es-mx":"MX","es-CO":"CO","es-co":"CO","es-AR":"AR","es-ar":"AR","es-CL":"CL","es-cl":"CL","es-PE":"PE","es-pe":"PE","es-BO":"BO","es-bo":"BO","es-EC":"EC","es-ec":"EC","es-GT":"GT","es-gt":"GT","en-nz":"NZ","en-NZ":"NZ"},langCodeToLangArray={ckb:"Central Kurdish",af:"Afrikaans",ak:"Akan",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",az:"Azerbaijani",bm:"Bambara",bn:"Bangla",eu:"Basque",be:"Belarusian",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ce:"Chechen","zh-CN":"Chinese","zh-cn":"Chinese","zh-TW":"Chinese (TW)","zh-tw":"Chinese (TW)",cu:"Church Slavic",kw:"Cornish",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",dz:"Dzongkha",en:"English",us:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fi:"Finnish",fr:"French",ff:"Fulah",gl:"Galician",lg:"Ganda",ka:"Georgian",de:"German",el:"Greek",gu:"Gujarati",ha:"Hausa",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",ig:"Igbo",id:"Indonesian",ia:"Interlingua",ga:"Irish",it:"Italian",ja:"Japanese",jv:"Javanese",kl:"Kalaallisut",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ki:"Kikuyu",rw:"Kinyarwanda",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",lo:"Lao",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lu:"Luba-Katanga",lb:"Luxembourgish",mk:"Macedonian",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",gv:"Manx",mi:"Maori",mr:"Marathi",mn:"Mongolian",ne:"Nepali",nd:"North Ndebele",se:"Northern Sami",no:"Norwegian",nb:"Norwegian (Bokmål)",nn:"Norwegian Nynorsk",or:"Odia",om:"Oromo",os:"Ossetic",ps:"Pashto",fa:"Persian",pl:"Polish","pt-BR":"Portuguese (Brazil)","pt-br":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)","pt-pt":"Portuguese (Portugal)",pa:"Punjabi",qu:"Quechua",ro:"Romanian",rm:"Romansh",rn:"Rundi",ru:"Russian",sg:"Sango",gd:"Scottish Gaelic",sr:"Serbian",sn:"Shona",ii:"Sichuan Yi",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",bo:"Tibetan",ti:"Tigrinya",to:"Tongan",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",vo:"Volapük",cy:"Welsh",fy:"Western Frisian",wo:"Wolof",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu",sa:"Arabic (Saudi Arabia)","ar-DZ":"Arabic (Algeria)","ar-dz":"Arabic (Algeria)","ar-EG":"Arabic (Egypt)","ar-eg":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-iq":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-jo":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-kw":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-lb":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-ly":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-ma":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-om":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-qa":"Arabic (Qatar)","ar-SY":"Arabic (Syria)","ar-sy":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-tn":"Arabic (Tunisia)","ar-YE":"Arabic (Yemen)","ar-ye":"Arabic (Yemen)","fr-CA":"French (Canada)","fr-ca":"French (Canada)","en-CA":"English (Canada)","en-ca":"English (Canada)","de-AT":"Austria","de-at":"Austria","de-CH":"Switzerland","de-ch":"Switzerland","de-LU":"Luxembourg","de-lu":"Luxembourg","es-MX":"Spanish (Mexico)","es-mx":"Spanish (Mexico)","es-CO":"Spanish (Columbia)","es-co":"Spanish (Columbia)","es-AR":"Spanish (Argentina)","es-ar":"Spanish (Argentina)","es-CL":"Chile","es-cl":"Chile","es-PE":"Peru","es-pe":"Peru","es-BO":"Bolivia","es-bo":"Bolivia","es-EC":"Ecuador","es-ec":"Ecuador","es-GT":"Guatemala","es-gt":"Guatemala","en-nz":"English (New Zealand)","en-NZ":"English (New Zealand)","hr-HR":"Croatian (Croatia)"},countryNameToCountryCodeArray={Afghanistan:"AF","Åland Islands":"AX",Albania:"AL",Algeria:"DZ",Andorra:"AD",Angola:"AO",Anguilla:"AI","Antigua & Barbuda":"AG",Argentina:"AR",Armenia:"AM",Aruba:"AW","Ascension Island":"AC",Australia:"AU",Austria:"AT",Azerbaijan:"AZ",Bahamas:"BS",Bahrain:"BH",Bangladesh:"BD",Barbados:"BB",Belarus:"BY",Belgium:"BE",Belize:"BZ",Benin:"BJ",Bermuda:"BM",Bhutan:"BT",Bolivia:"BO","Bosnia & Herzegovina":"BA","Bosnia and Herzegovina":"BA",Botswana:"BW",Brazil:"BR","British Indian Ocean Territory":"IO","British Virgin Islands":"VG",Brunei:"BN",Bulgaria:"BG","Burkina Faso":"BF",Burundi:"BI",Cambodia:"KH",Cameroon:"CM",Canada:"FR-CA","Cape Verde":"CV","Cabo Verde":"CV","Caribbean Netherlands":"BQ","Cayman Islands":"KY","Central African Republic":"CF",Chad:"TD",Chile:"CL",China:"CN","Christmas Island":"CX","Cocos (Keeling) Islands":"CC",Colombia:"CO",Comoros:"KM","Congo - Brazzaville":"CG","Congo - Kinshasa":"CD","Cook Islands":"CK","Costa Rica":"CR",Croatia:"HR","Curaçao":"CW",Cyprus:"CY",Czechia:"CZ","Côte d’Ivoire":"CI",Cuba:"CU",Denmark:"DK",Djibouti:"DJ",Dominica:"DM","Dominican Republic":"DO","Democratic Republic of the Congo":"CD",Ecuador:"EC",Egypt:"EG","El Salvador":"SV","Equatorial Guinea":"GQ",Eritrea:"ER",Estonia:"EE",Eswatini:"SZ",Ethiopia:"ET","European Union":"EU","Falkland Islands":"FK","Faroe Islands":"FO",Fiji:"FJ",Finland:"FI",France:"FR","French Guiana":"GF","French Polynesia":"PF","French Southern Territories":"TF",Gabon:"GA",Gambia:"GM",Georgia:"GE",Germany:"DE",Ghana:"GH",Gibraltar:"GI",Greece:"GR",Greenland:"GL",Grenada:"GD",Guadeloupe:"GP",Guatemala:"GT",Guernsey:"GG",Guinea:"GN","Guinea-Bissau":"GW",Guyana:"GY",Haiti:"HT",Honduras:"HN","Hong Kong SAR":"HK","Hong Kong":"HK",Hungary:"HU",Iceland:"IS",India:"IN",Indonesia:"ID",Iraq:"IQ",Ireland:"IE","Isle of Man":"IM",Israel:"IL",Italy:"IT",Iran:"IR",Jamaica:"JM",Japan:"JP",Jersey:"JE",Jordan:"JO",Kazakhstan:"KZ",Kenya:"KE",Kiribati:"KI",Kosovo:"XK",Kuwait:"KW",Kyrgyzstan:"KG",Laos:"LA",Latvia:"LV",Lebanon:"LB",Lesotho:"LS",Liberia:"LR",Libya:"LY",Liechtenstein:"LI",Lithuania:"LT",LTL:"LT",Luxembourg:"LU","Macao SAR":"MO",Macau:"MO",Madagascar:"MG",Malawi:"MW",Malaysia:"MY",Maldives:"MV",Mali:"ML",Malta:"MT",Martinique:"MQ",Mauritania:"MR",Mauritius:"MU",Mayotte:"YT",Mexico:"MX",Moldova:"MD",Monaco:"MC",Mongolia:"MN",Montenegro:"ME",Montserrat:"MS",Morocco:"MA",Mozambique:"MZ","Myanmar (Burma)":"MM",Myanmar:"MM",Namibia:"NA",Nauru:"NR",Nepal:"NP",Netherlands:"NL","New Caledonia":"NC","New Zealand":"NZ",Nicaragua:"NI",Niger:"NE",Nigeria:"NG",Niue:"NU","Norfolk Island":"NF","North Macedonia":"MK","North Korea":"KP",Norway:"NO",Oman:"OM",Pakistan:"PK","Palestinian Territories":"PS",Panama:"PA","Papua New Guinea":"PG",Paraguay:"PY",Peru:"PE",Philippines:"PH","Pitcairn Islands":"PN",Poland:"PL",Portugal:"PT",Qatar:"QA","Réunion":"RE",Romania:"RO",Russia:"RU",Rwanda:"RW",Samoa:"WS","San Marino":"SM","São Tomé & Príncipe":"ST","São Tomé and Príncipe":"ST","Saudi Arabia":"SA",Senegal:"SN",Serbia:"RS",Seychelles:"SC","Sierra Leone":"SL",Singapore:"SG","Sint Maarten":"SX",Slovakia:"SK",Slovenia:"SI","Solomon Islands":"SB",Somalia:"SO","South Africa":"ZA","South Georgia & South Sandwich Islands":"GS","South Korea":"KR","South Sudan":"SS",Spain:"ES","Sri Lanka":"LK","St. Barthélemy":"BL","St. Helena":"SH","Saint Helena":"SH","St. Kitts & Nevis":"KN","St. Lucia":"LC","St. Martin":"MF","St. Pierre & Miquelon":"PM","St. Vincent & Grenadines":"VC",Sudan:"SD",Suriname:"SR","Svalbard & Jan Mayen":"SJ",Sweden:"SE",Switzerland:"CH",Syria:"SY",Taiwan:"TW",Tajikistan:"TJ",Tanzania:"TZ",Thailand:"TH","Timor-Leste":"TL",Togo:"TG",Tokelau:"TK",Tonga:"TO","Trinidad & Tobago":"TT","Trinidad and Tobago":"TT","Tristan da Cunha":"TA",Tunisia:"TN",Turkey:"TR",Turkmenistan:"TM","Turks & Caicos Islands":"TC",Tuvalu:"TV","U.S. Outlying Islands":"UM",Uganda:"UG",Ukraine:"UA","United Arab Emirates":"AE","United Kingdom":"GB","United States":"US",Uruguay:"UY",Uzbekistan:"UZ",Vanuatu:"VU","Vatican City":"VA",Venezuela:"VE",Vietnam:"VN","Wallis & Futuna":"WF","Western Sahara":"EH",Yemen:"YE",Zambia:"ZM",Zimbabwe:"ZW"},arrow_padding_width=40,item_height=46,flag_min_width={rectangle_flag:30,square_flag:30,circle_flag:30,no_flag:0,without_flag:0},language_min_width={language_code:45,language_name:70,native_language_name:70,no_labels:0},currency_min_width={code:30,name:80,symbol:25};function isMobile(){return window.self!==window.top?document.body.offsetWidth<=400:navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)}function getLanguageList(){const e=window.metaFiles.ETLanguages||[];let t=[];const n=window.metaFiles?.global?.language_sort_list;return n&&Object.keys(n).length>0&&(e.forEach((e=>{t[n[e.iso_code]]=e})),t=t.filter((e=>e)),e.forEach((e=>{n.hasOwnProperty(e.iso_code)||t.push(e)}))),0===t.length?e:(window.metaFiles.ETLanguages=t,t)}function applyPriviewCssCode(e){e&&/^[.#]?\w+[^{]+\{[^}]*\}/.test(e)&&addCSS(e)}function addCSS(e){let t=document.createElement("style"),n=document.head||document.getElementsByTagName("head")[0];if(t.type="text/css",t.styleSheet){let n=function(){try{t.styleSheet.cssText=e}catch(e){}};t.styleSheet.disabled?setTimeout(n,10):n()}else{let n=document.createTextNode(e);t.appendChild(n)}n.appendChild(t)}function transformationRgb(e,t){if(null==e&&null==t)return"rgba(255,255,255,1)";let n;if(n=void 0===t?1:t/100,!e)return"rgba(255,255,255,"+n+")";if(!e)return"rgba(255,255,255,"+n+")";let o=e.toLowerCase();if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(o)){if(4===o.length){let e="#";for(let t=1;t<4;t+=1)e+=o.slice(t,t+1).concat(o.slice(t,t+1));o=e}let e=[];for(let t=1;t<7;t+=2)e.push(parseInt("0x"+o.slice(t,t+2)));return"rgba("+e.join(",")+","+n+")"}return o}function findLanguageFlags(e,t){try{var n;return e&&"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof(n=e&&e[t]?langCodeToCountryArray[e[t]]?langCodeToCountryArray[e[t]]:langCodeToCountryArray[t]:langCodeToCountryArray[t]?langCodeToCountryArray[t]:langCodeToCountryArray[t.split("-")[0]])?n:""}catch(e){return console.log("findLanguageFlags",e),""}}function findCurrencyFlags(e){let t;return t=countryNameToCountryCodeArray[e]?countryNameToCountryCodeArray[e].toLowerCase():"",t}function documentReady(e){"complete"===document.readyState||"interactive"===document.readyState?setTimeout(e(),300):document.addEventListener("DOMContentLoaded",e)}function changeArrow(e,t,n=document.querySelectorAll("#etranslate-language-arrow-new-img-theme2"),o){const a=isMobile();let l,r;a?(l=o||window.metaFiles.mobile.style.font_color,r=window.metaFiles.mobile.content.arrow_show):(l=o||window.metaFiles.desktop.style.font_color,r=window.metaFiles.desktop.content.arrow_show),"FASHION"===e&&r?n.forEach((e=>{e.style.display="block",e.parentElement.style.setProperty("display","block","important"),"etranslate-currency_language-arrow-currency-img"!==e.id&&"etranslate-currency_language-arrow-language-img"!==e.id?e.setAttribute("fill",l):(a&&"pop_up"!==window.metaFiles.mobile_language_currency_selector_style&&e.setAttribute("fill",l),a||"pop_up"===window.metaFiles.language_currency_selector_style||e.setAttribute("fill",l)),t?e.children[0].setAttribute("d","M573.056 272l308.8 404.608A76.8 76.8 0 0 1 820.736 800H203.232a76.8 76.8 0 0 1-61.056-123.392L450.976 272a76.8 76.8 0 0 1 122.08 0z"):e.children[0].setAttribute("d","M573.056 752l308.8-404.608A76.8 76.8 0 0 0 820.736 224H203.232a76.8 76.8 0 0 0-61.056 123.392L450.976 752a76.8 76.8 0 0 0 122.08 0z")})):"SIMPLE"===e&&r?n.forEach((e=>{e.style.display="block",e.parentElement.style.setProperty("display","block","important"),"etranslate-currency_language-arrow-currency-img"!==e.id&&"etranslate-currency_language-arrow-language-img"!==e.id?e.setAttribute("fill",l):(a&&"pop_up"!==window.metaFiles.mobile_language_currency_selector_style&&e.setAttribute("fill",l),a||"pop_up"===window.metaFiles.language_currency_selector_style||e.setAttribute("fill",l)),t?e.children[0].setAttribute("d","M483.029333 286.165333l30.165334-30.208 415.957333 415.829334c16.426667 16.426667 16.64 43.648 0 60.288a42.538667 42.538667 0 0 1-60.330667 0.042666L513.28 376.746667l-355.242667 355.413333a42.496 42.496 0 0 1-60.288 0 42.837333 42.837333 0 0 1-0.085333-60.330667l383.701333-383.872 1.706667-1.749333z"):e.children[0].setAttribute("d","M483.072 714.496l30.165333 30.208 415.957334-415.829333a42.837333 42.837333 0 0 0 0-60.288 42.538667 42.538667 0 0 0-60.330667-0.042667l-355.541333 355.413333-355.242667-355.413333a42.496 42.496 0 0 0-60.288 0 42.837333 42.837333 0 0 0-0.085333 60.330667l383.701333 383.872 1.706667 1.749333z")})):"RIGHT"===e&&r?n.forEach((e=>{e.style.display="block",e.parentElement.style.setProperty("display","block","important"),"etranslate-currency_language-arrow-currency-img"!==e.id&&"etranslate-currency_language-arrow-language-img"!==e.id?e.setAttribute("fill",l):(a&&"pop_up"!==window.metaFiles.mobile_language_currency_selector_style&&e.setAttribute("fill",l),a||"pop_up"===window.metaFiles.language_currency_selector_style||e.setAttribute("fill",l)),t?e.children[0].setAttribute("d","M483.072 714.496l30.165333 30.208 415.957334-415.829333a42.837333 42.837333 0 0 0 0-60.288 42.538667 42.538667 0 0 0-60.330667-0.042667l-355.541333 355.413333-355.242667-355.413333a42.496 42.496 0 0 0-60.288 0 42.837333 42.837333 0 0 0-0.085333 60.330667l383.701333 383.872 1.706667 1.749333z"):e.children[0].setAttribute("d","M714.496 483.072l-30.165333-30.208-415.957334 415.829333a42.837333 42.837333 0 0 1-60.288 0 42.538667 42.538667 0 0 1-0.042667-60.330667l355.541333-355.413333-355.242667-355.413333a42.496 42.496 0 0 1 0-60.288 42.837333 42.837333 0 0 1 60.330667 0.042667l415.957334 415.829333 1.706667 1.749333z")})):n.forEach((e=>{e.style.display="none",e.parentElement.style.setProperty("display","none","important")}))}function insertScript(e,t=!1,n=(e=>{})){let o=document.createElement("script");o.type="text/javascript",o.src=e,o.onload=n,t?document.head.prepend(o):document.body.appendChild(o)}function evalJS(e){return new Function("return "+e)()}function calculatePosition(e,t){e.getBoundingClientRect().width+t.getBoundingClientRect().left>document.documentElement.clientWidth?e.style.left=document.documentElement.clientWidth-(e.getBoundingClientRect().width+t.getBoundingClientRect().left)+"px":t.getBoundingClientRect().left<0?e.style.left=Math.abs(t.getBoundingClientRect().left)+"px":e.style.left="auto"}function insertCurrency(callback=(()=>{})){const xmlHttp=new XMLHttpRequest;xmlHttp.open("get","https://cdn.shopify.com/s/javascripts/currencies.js?v="+Math.random()),xmlHttp.onreadystatechange=function(){if(4===xmlHttp.readyState&&200===xmlHttp.status){let data=xmlHttp.responseText;data=data.replace("var Currency","window.EtranslateCurrency"),eval(data),callback()}},xmlHttp.send()}function generateSelectorWithPriority(e){for(var t=[],n=e.parentElement;n&&"body"!==n.tagName.toLowerCase();){var o=n.tagName.toLowerCase();if(n.id)o+="#"+n.id;else if(n.classList.length>0)o+="."+Array.from(n.classList)[0];else{o+=":nth-child("+(Array.from(n.parentElement.children).indexOf(n)+1)+")"}t.unshift(o),n=n.parentElement}return t.join(" > ")}function getElementPosition(e){if(!e||!e.parentNode)return 0;const t=e.parentNode;return Array.from(t.children).indexOf(e)}function getCurrentLink(){const e=window.Shopify?.routes?.root||"/",t=window.location.href;let n,o="";if(t.includes("etranslate")||t.includes("langwill")){const e=new URLSearchParams(t.split("?")[1]).get("url");o=e?new URL(e).pathname:window.location.pathname}else o=window.location.pathname;return n="/"===e?o:o.replace(e.slice(0,-1),""),n||(n="/"),n}function getWorkingOn(){const e=getCurrentLink();return e.includes("/products/")?3:e.includes("/collections/")?4:e.includes("/blogs/")||e.includes("/blog/")?5:1}function changeButtonIcon(e,t,n=document.querySelectorAll("#etranslate-button-icon-theme2"),o){let a,l,r;isMobile()?(a=o||window.metaFiles.mobile.style.font_color,l=window.metaFiles.mobile.content.button_icon_show,r=window.metaFiles.mobile.content.button_icon):(a=o||window.metaFiles.desktop.style.font_color,l=window.metaFiles.desktop.content.button_icon_show,r=window.metaFiles.desktop.content.button_icon),"globe"===r&&l?n.forEach((e=>{e.style.display="block",e.parentElement.style.setProperty("display","flex","important"),e.parentElement.innerHTML=`\n\n\n`})):"translate"===r&&l?n.forEach((e=>{e.style.display="block",e.parentElement.style.setProperty("display","flex","important"),e.parentElement.innerHTML=`\n\n\n\n`})):n.forEach((e=>{e.style.display="none",e.parentElement.style.setProperty("display","none","important")}))}function judgeCurrencyLabel(e,t,n){e.name&&e.code&&e.symbol?t.innerHTML=`${n.currency} ${n.code}(${n.currency_symbol})`:e.name&&e.code&&!e.symbol?t.innerHTML=`${n.currency} ${n.code}`:e.name&&!e.code&&e.symbol?t.innerHTML=`${n.currency}(${n.currency_symbol})`:!e.name||e.code||e.symbol?!e.name&&e.code&&e.symbol?t.innerHTML=`${n.code}(${n.currency_symbol})`:e.name||!e.code||e.symbol?e.name||e.code||!e.symbol?t.innerHTML="":t.innerHTML=`${n.currency_symbol}`:t.innerHTML=`${n.code}`:t.innerHTML=`${n.currency}`}function listenOpenDropDown(e){let t=isMobile();try{let n;n=t?e.mobile.content.arrow:e.desktop.content.arrow,setTimeout((()=>{window.et_window_open_dropDown&&(window.et_window_open_dropDown(),changeArrow(n,!0))}),10)}catch(e){}}function debounce(e,t){let n;return function(...o){clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}}function escapeHtml(e=""){return e.includes("document.write")||e.includes("setInterval")||e.includes("alert")||e.includes("eval")||e.includes("onclick")||e.includes("onerror")||e.includes("onload")||e.includes("onmouseover")?"":e}let flag$4,firstTime$4=0,lastTime$4=0,isOpen$4=!1,flag$3;function createLanguageFloatSelector(e,t,n,o,a){let l,r,s,c,i,d,u,g,y,p,m,_,b,f,h,w,C,E,k,L,x,v,N,S,T;if(document.addEventListener("click",(function(e){e.target.closest(".etranslate-language-list-button")||e.target.closest(".etranslate-language-list-dropdown-logo-theme2")||(J(),changeArrow(p,isOpen$4))})),a)switch(k=o.mobile.content.sort_list,L=o.mobile.content.bar_sort_list,C=o.mobile.content.bar_flags_type_show,E=o.mobile.content.bar_labels_type_show,l=o.mobile.content.bar_flags_type,r=o.mobile.content.bar_labels_type,i=o.mobile.style.selector_width,d=o.mobile.content.top,u=o.mobile.content.position_tb,g=o.mobile.style.border_width,b=o.mobile.content.flags_type_show,f=o.mobile.content.flags_type,h=o.mobile.content.labels_type_show,w=o.mobile.content.labels_type,y=transformationRgb(o.mobile.style.background_color,o.mobile.style.background_opacity),p=o.mobile.content.arrow,x=o.mobile.style.dropdown_background_color,v=o.mobile.style.dropdown_background_opacity,N=transformationRgb(x,v),S=o.mobile.style.dropdown_select_background_color,T=o.mobile.style.dropdown_select_font_color,o.mobile.style.border[0]){case"SQUARE":_=0;break;case"ROUNDED":_="4px";break;case"CUSTOM":_=(o.mobile.style.border[1]||0)+"px"}else switch(k=o.desktop.content.sort_list,L=o.desktop.content.bar_sort_list,C=o.desktop.content.bar_flags_type_show,E=o.desktop.content.bar_labels_type_show,l=o.desktop.content.bar_flags_type,r=o.desktop.content.bar_labels_type,i=o.desktop.style.selector_width,d=o.desktop.content.top,u=o.desktop.content.position_tb,g=o.desktop.style.border_width,b=o.desktop.content.flags_type_show,f=o.desktop.content.flags_type,h=o.desktop.content.labels_type_show,w=o.desktop.content.labels_type,y=transformationRgb(o.desktop.style.background_color,o.desktop.style.background_opacity),p=o.desktop.content.arrow,x=o.desktop.style.dropdown_background_color,v=o.desktop.style.dropdown_background_opacity,N=transformationRgb(x,v),S=o.desktop.style.dropdown_select_background_color,T=o.desktop.style.dropdown_select_font_color,o.desktop.style.border[0]){case"SQUARE":_=0;break;case"ROUNDED":_="4px";break;case"CUSTOM":_=(o.desktop.style.border[1]||0)+"px"}s="rectangle_flag"!==l?"1x1":"4x3",m=o.rm_logo;let B="https://my.parcelpanel.com/assets/other/flags/"+s;c="no_labels"===r;let A=n.getElementsByClassName("etranslate-language-list-button")[0],M=n.getElementsByClassName("etranslate-language-list-dropdown")[0],O=n.getElementsByClassName("etranslate-language-list-dropdown-box")[0],R=setLanguageFloatSelectorStyle(o,a),H=o.global.language_flags,I=findLanguageFlags(H,t);setLanguageFloatPosition(A,M,e,d,u,O),n.setAttribute("style",R);let F="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==f?"1x1":"4x3"),D=A.getElementsByClassName("select-dropdown-flag-icon")[0];D.style.backgroundImage="url("+F+"/"+I.toLowerCase()+".svg)","circle_flag"===f?D.classList.add("circle_flag"):D.classList.remove("circle_flag"),M.getBoundingClientRect().height>0?M.setAttribute("style","width:"+i+";background-color:"+N+";max-height:230px;opacity:1;"):M.setAttribute("style","width:"+i+";background-color:"+N+";max-height:0px;opacity:0;");let U=setLanguageFloatSelectorWidth(e,o,a,M);n.style.borderRadius=_,A.style.borderRadius=_,O.style.borderRadius=_,O.style.backgroundColor=y,A.style.width=U,A.style.borderWidth=g+"px",M.style.width=U,O.style.width=U,O.style.borderWidth=g+"px",changeArrow(p,isOpen$4),changeButtonIcon();let P=0===Number(m)?120:0,q=M.children;for(let t=0;t=c+30?(l.classList.add("lo-select-up"),!0):(l.classList.remove("lo-select-up"),!1)}function setLanguageFloatSelector(e){let t=getLanguageList(),n=document.querySelector("#language_iso_code").textContent,o=document.getElementById("etranslate-language-float-selector-theme2"),a=isMobile();if(1===Number(e.status)&&(a&&"language"===e.mobile.content.selector_type||!a&&"language"===e.desktop.content.selector_type)){const l=t=>{if(window.top!==window.self&&e.switcher){const e=document.getElementById("etranslate-language-float-selector-theme2");let n,o,l,r,s,c=!1,i=0;e.addEventListener("mousedown",(function(t){firstTime$4=(new Date).getTime(),t.preventDefault(),n=t.clientX-e.getBoundingClientRect().left,o=t.clientY-e.getBoundingClientRect().top,c=!0,document.addEventListener("mousemove",window.EtranslateOnMouseMove),document.addEventListener("mouseup",window.EtranslateOnMouseUp),document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp)})),window.EtranslateOnMouseMove=a=>{if(c){const c=a.clientX-n,d=a.clientY-o,u=window.innerWidth-e.clientWidth,g=window.innerHeight-e.clientHeight;l=Math.min(u,Math.max(0,c)),s=document.documentElement.clientWidth-l-e.clientWidth,r=Math.min(g,Math.max(0,d))+(t?0:Math.max(window.scrollY||window.pageYOffset,document.documentElement.scrollTop||document.body.scrollTop)),i=document.documentElement.clientHeight-r-e.clientHeight,e.style.left=l+"px",e.style.right="auto",e.style.bottom="auto",e.style.top=r+"px"}},window.EtranslateOnMouseUp=()=>{if(lastTime$4=(new Date).getTime(),lastTime$4-firstTime$4<200&&(flag$4=!0),c=!1,r&&r){const e=l>s?"right":"left";l=l>s?s:l;const n=i=n+30&&t.classList.remove("lo-select-up")}function setLanguageEmbeddedSelectorWidth(e,t,n){let o,a;return o=t.mobile.content.bar_flags_type,a=t.mobile.content.bar_labels_type,e&&e[0]&&e.length,flag_min_width[o]+language_min_width[a]+arrow_padding_width+"px"}function setLanguageEmbeddedSelectorStyle(e,t){let n,o;return n=t?e.mobile.style.font_color:e.desktop.style.font_color,o=null==e.desktop.style.background_color&&null==e.desktop.style.background_opacity||null==e.mobile.style.background_color&&null==e.mobile_background_opacity?"rgba(255,255,255,1)":t?transformationRgb(e.mobile.style.background_color,e.mobile.style.background_opacity):transformationRgb(e.desktop.style.background_color,e.desktop.style.background_opacity),"background-color:"+o+";color:"+n+";"}function createLanguageFixSelector(e,t,n,o,a){let l,r,s,c,i,d,u,g,y,p,m,_,b,f,h,w,C,E,k;if(document.addEventListener("click",(function(e){e.target.closest(".embed-etranslate-language-list-button")||e.target.closest(".embed-etranslate-language-list-dropdown-logo-theme2")||(P(),changeArrow(c,isOpen$3))})),a)switch(b=o.mobile.content.sort_list,f=o.mobile.content.bar_sort_list,m=o.mobile.content.bar_flags_type_show,_=o.mobile.content.bar_labels_type_show,l=o.mobile.content.bar_flags_type,r=o.mobile.content.bar_labels_type,u=o.mobile.content.flags_type_show,g=o.mobile.content.flags_type,y=o.mobile.content.labels_type_show,p=o.mobile.content.labels_type,transformationRgb(o.mobile.style.background_color,o.mobile_background_opacity),c=o.mobile.content.arrow,h=o.mobile.style.dropdown_background_color,w=o.mobile.style.dropdown_background_opacity,C=transformationRgb(h,w),E=o.mobile.style.dropdown_select_background_color,k=o.mobile.style.dropdown_select_font_color,o.mobile.style.border[0]){case"SQUARE":d=0;break;case"ROUNDED":d="4px";break;case"CUSTOM":d=(o.mobile.style.border[1]||0)+"px"}else switch(b=o.desktop.content.sort_list,f=o.desktop.content.bar_sort_list,m=o.desktop.content.bar_flags_type_show,_=o.desktop.content.bar_labels_type_show,u=o.desktop.content.flags_type_show,g=o.desktop.content.flags_type,y=o.desktop.content.labels_type_show,p=o.desktop.content.labels_type,l=o.desktop.content.bar_flags_type,r=o.desktop.content.bar_labels_type,transformationRgb(o.desktop.style.background_color,o.desktop.style.background_opacity),c=o.desktop.content.arrow,h=o.desktop.style.dropdown_background_color,w=o.desktop.style.dropdown_background_opacity,C=transformationRgb(h,w),E=o.desktop.style.dropdown_select_background_color,k=o.desktop.style.dropdown_select_font_color,o.desktop.style.border[0]){case"SQUARE":d=0;break;case"ROUNDED":d="4px";break;case"CUSTOM":d=(o.desktop.style.border[1]||0)+"px"}s="rectangle_flag"!==l?"1x1":"4x3";let L="https://my.parcelpanel.com/assets/other/flags/"+s;i=o.rm_logo;let x=n.getElementsByClassName("embed-etranslate-language-list-button")[0],v=n.getElementsByClassName("embed-etranslate-language-list-dropdown")[0],N=n.getElementsByClassName("embed-etranslate-language-list-dropdown-box")[0],S=setLanguageEmbeddedSelectorStyle(o,a),T=o.global.language_flags,B=findLanguageFlags(T,t);n.setAttribute("style",S);let A="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==g?"1x1":"4x3"),M=x.getElementsByClassName("select-dropdown-flag-icon")[0];M.style.backgroundImage="url("+A+"/"+B.toLowerCase()+".svg)","circle_flag"===g?M.classList.add("circle_flag"):M.classList.remove("circle_flag"),v.getBoundingClientRect().height>0?v.setAttribute("style","background-color:"+C+";max-height:230px;opacity:1;"):v.setAttribute("style","background-color:"+C+";max-height:0px;opacity:0;"),setLanguageEmbeddedSelectorWidth(e,o,a),n.style.borderRadius=d,N.style.borderRadius=d,N.style.border="1px solid rgba(224,224,224,1)",x.style.width="auto",x.style.whiteSpace="nowrap",v.style.width="auto",v.style.whiteSpace="nowrap",changeArrow(c,isOpen$3),changeButtonIcon();let O=0===Number(i)?120:0;N.style.minWidth=Math.max(x.getBoundingClientRect().width,O)+"px";let R=v.children;for(let t=0;t50)try{evalJS(e.mobile.style.custom_js.trim())(o,a)}catch(l){console.log(l);const r=e.mobile.content.embed_place,s=e.mobile.content.embed_place_index;if(r){const c=document.querySelector(r);c.children&&c.children.length>0?c.insertBefore(o,c.children[s]):c.appendChild(o)}else Etranslate.setEmbeddedSelectorPosition(o,a)}else{const i=e.mobile.content.embed_place,d=e.mobile.content.embed_place_index;if(i){const u=document.querySelector(i);u.children&&u.children.length>0?u.insertBefore(o,u.children[d]):u.appendChild(o)}else Etranslate.setEmbeddedSelectorPosition(o,a)}else o&&(window.top===window.self?o.remove():o.style.display="none");else if("embedded_selector"===e.desktop.content.choose_language_selector&&"dropdown"===e.desktop.content.style_of_the_selector)if(applyPriviewCssCode(e.desktop.style.css_code),createLanguageFixSelector(t,n,o,e,a),e.desktop.style.custom_js&&e.desktop.style.custom_js.trim()&&e.desktop.style.custom_js.trim().length>50)try{evalJS(e.desktop.style.custom_js.trim())(o,a)}catch(g){console.log(g);const y=e.desktop.content.embed_place,p=e.desktop.content.embed_place_index;if(y){const m=document.querySelector(y);m.children&&m.children.length>0?m.insertBefore(o,m.children[p]):m.appendChild(o)}else Etranslate.setEmbeddedSelectorPosition(o,a)}else{const _=e.desktop.content.embed_place,b=e.desktop.content.embed_place_index;if(_)try{const f=document.querySelector(_);f.contains(o)&&f.removeChild(o),f.children&&f.children.length>0?f.insertBefore(o,f.children[b]):f.appendChild(o)}catch(h){Etranslate.setEmbeddedSelectorPosition(o,a)}else Etranslate.setEmbeddedSelectorPosition(o,a)}else o&&(window.top===window.self?o.remove():o.style.display="none");if(window.top!==window.self&&e.switcher){let w=null;function C(e){let t=e;for(;t.parentNode;){const e=["a"];if(t.parentNode.tagName&&e.includes(t.parentNode.tagName.toLowerCase()))return t.parentNode;t=t.parentNode}return null}o.addEventListener("mousedown",(function(e){firstTime$3=(new Date).getTime(),w=e.currentTarget||o,e.clientX,w.getBoundingClientRect().left,e.clientY,w.getBoundingClientRect().top,document.removeEventListener("mousemove",window.EtranslateOnMouseMove),document.removeEventListener("mouseup",window.EtranslateOnMouseUp),document.addEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.addEventListener("mouseup",window.EtranslateOnEmbedMouseUp)})),window.EtranslateOnEmbedMouseMove=e=>{let t=document.elementFromPoint(e.clientX,e.clientY);if(t&&t.parentNode&&!t.classList.contains("draggable"))try{let n=C(t);n&&(t=n),e.clientX>t.getBoundingClientRect().left+40||e.clientY>t.getBoundingClientRect().top+40?t.parentNode.insertBefore(w,t.nextSibling):t.parentNode.insertBefore(w,t)}catch(e){}},window.EtranslateOnEmbedMouseUp=()=>{lastTime$3=(new Date).getTime(),lastTime$3-firstTime$3<200&&(flag$3=!0),document.removeEventListener("mousemove",EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp);const e=generateSelectorWithPriority(w),t=getElementPosition(w);window.parent.postMessage({et:{type:"dragger_embed",value:e,is_mobile:a}},"*"),window.parent.postMessage({et:{type:"dragger_embed_index",value:t,is_mobile:a}},"*")}}}else o&&(window.top===window.self?o.remove():o.style.display="none")}function setLanguageFloatLinkSelectorWidth(e,t,n){var o,a,l,r;n?(o=t.mobile.content.flags_type,a=t.mobile.content.labels_type,l=t.mobile.style.selector_width,r="AUTO"===t.mobile.style.auto_selector_width[0]):(o=t.desktop.content.flags_type,a=t.desktop.content.labels_type,l=t.desktop.style.selector_width,r="AUTO"===t.desktop.style.auto_selector_width[0]);var s=e&&e[0]?e.length:0;return r?"auto":(flag_min_width[o]+language_min_width[a]+20)*s+Number(l)+"px"}function setLanguageFloatLinkSelectorStyle(e,t,n){var o,a,l,r,s,c;e&&e[0]&&e.length,n?(a=t.mobile.content.position_tb,c=t.mobile.content.fixed,o=t.mobile.content.position_lr,t.mobile.content.labels_type,t.mobile.content.flags_type,t.mobile.style.selector_width,r=t.mobile.style.font_color,t.mobile.style.border_width,s=t.mobile.content.top):(o=t.desktop.content.position_lr,c=t.desktop.content.fixed,a=t.desktop.content.position_tb,t.desktop.content.labels_type,t.desktop.content.flags_type,t.desktop.style.selector_width,r=t.desktop.style.font_color,t.desktop.style.border_width,s=t.desktop.content.top);var i=c?"fixed":"absolute",d="right"===o?"right":"left",u="bottom"===a||"fixed_bottom"===a?"bottom":"top";return l=Number(n?t.mobile.content.left:t.desktop.content.left),c&&"top"===u&&(s=Math.min(window.innerHeight-50,s)),"top: auto;bottom: auto;left: auto;right: auto;"+d+":"+l+"px;"+u+":"+s+"px;color:"+r+";position:"+i+";"}function createLanguageFloatLinkSelector(e,t,n,o,a){var l,r,s,c,i;let d,u,g;if(a)switch(o.mobile.content.fixed,o.mobile.style.selector_width,v=o.mobile.content.left,o.mobile.content.top,o.mobile.style.selector_width,o.mobile.style.font_color,l=o.mobile.content.labels_type,r=o.mobile.content.flags_type,s=o.mobile.style.border_width,c=transformationRgb(o.mobile.style.background_color,o.mobile.style.background_opacity),u=o.mobile.content.labels_type_show,d=o.mobile.content.flags_type_show,g=o.mobile.content.sort_list,o.mobile.style.border[0]){case"SQUARE":i=0;break;case"ROUNDED":i="4px";break;case"CUSTOM":i=(o.mobile.style.border[1]||0)+"px"}else switch(o.desktop.content.fixed,o.desktop.style.selector_width,v=o.desktop.content.left,o.desktop.content.top,o.desktop.style.selector_width,o.desktop.style.font_color,l=o.desktop.content.labels_type,r=o.desktop.content.flags_type,s=o.desktop.style.border_width,c=transformationRgb(o.desktop.style.background_color,o.desktop.style.background_opacity),u=o.desktop.content.labels_type_show,d=o.desktop.content.flags_type_show,g=o.desktop.content.sort_list,o.desktop.style.border[0]){case"SQUARE":i=0;break;case"ROUNDED":i="4px";break;case"CUSTOM":i=(o.desktop.style.border[1]||0)+"px"}for(var y=o.global.language_flags,p=n.getElementsByClassName("etranslate-language-list-link")[0],m="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==r?"1x1":"4x3"),_=p.getElementsByClassName("etranslate-language-list-link-li"),b=0;b<_.length;b++){var f=_[b].getElementsByClassName("select-dropdown-flag-icon-link")[0],h=_[b].getElementsByClassName("etranslate-flag-wrapper")[0],w=_[b].dataset.code,C=_[b].dataset.name,E=findLanguageFlags(y,w);d?(h.style.display="flex",f.style.backgroundImage="url("+m+"/"+E.toLowerCase()+".svg)","circle_flag"===r?f.classList.add("circle_flag"):f.classList.remove("circle_flag")):h.style.display="none",_[b].onclick=N(e.find((function(e){return e.iso_code.toLowerCase()===w.toLowerCase()})));var k=_[b].getElementsByClassName("etranslate-language-name-link")[0];u?(k.style.display="block","language_name"===l?k.innerHTML=langCodeToLangArray[w]?langCodeToLangArray[w]:k.text():"native_language_name"===l?(C="français"==C?"Français":C,k.innerHTML=C||langCodeToLangArray[w]):k.innerHTML=w?w.toLocaleUpperCase():w):k.style.display="none",h.style.order=g.flags_type,k.style.order=g.labels_type}var L=setLanguageFloatLinkSelectorWidth(e,o,a);p.setAttribute("style","width:"+L+";border-width:"+s+"px; background-color:"+c+";border-radius:"+i+";");var x=setLanguageFloatLinkSelectorStyle(e,o,a),v=Number(v)+Number(p.offsetWidth);function N(e){if(window.top===window.self)return function(){localStorage.setItem("lan_code",e.iso_code.toLowerCase());const t=n.querySelector("form"),o=n.querySelector('input[name="language_code"]');if(-1!=window.location.search.indexOf("?preview_key")){n.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}o.value=e.iso_code,t.submit()}}return n.setAttribute("style",x),n.style.borderRadius=i,n}function setLanguageLinkSelector(e){let t=getLanguageList(),n=document.querySelector("#language_iso_code").textContent,o=document.getElementById("etranslate-language-float-link-selector-theme2"),a=isMobile();if(1===Number(e.status)&&(a&&"language"===e.mobile.content.selector_type||!a&&"language"===e.desktop.content.selector_type)){const l=t=>{if(window.top!==window.self&&e.switcher){const e=document.getElementById("etranslate-language-float-link-selector-theme2");let n,o,l,r,s,c=!1,i=0;e.addEventListener("mousedown",(function(t){t.preventDefault(),n=t.clientX-e.getBoundingClientRect().left,o=t.clientY-e.getBoundingClientRect().top,c=!0,document.addEventListener("mousemove",window.EtranslateOnMouseMove),document.addEventListener("mouseup",window.EtranslateOnMouseUp),document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp)})),window.EtranslateOnMouseMove=a=>{if(c){const c=a.clientX-n,d=a.clientY-o,u=window.innerWidth-e.clientWidth,g=window.innerHeight-e.clientHeight;l=Math.min(u,Math.max(0,c)),r=Math.min(g,Math.max(0,d))+(t?0:Math.max(window.scrollY||window.pageYOffset,document.documentElement.scrollTop||document.body.scrollTop)),s=document.documentElement.clientWidth-l-e.clientWidth,i=document.documentElement.clientHeight-r-e.clientHeight,e.style.left=l+"px",e.style.right="auto",e.style.bottom="auto",e.style.top=r+"px"}},window.EtranslateOnMouseUp=()=>{if(c=!1,r&&r){const e=l>s?"right":"left";l=l>s?s:l;const n=i0?H.setAttribute("style","width:"+u+";background-color:"+S+";max-height:230px;opacity:1;"):H.setAttribute("style","width:"+u+";background-color:"+S+";max-height:0px;opacity:0;"),r.style.borderRadius=f,I.style.borderRadius=f,R.style.borderRadius=f;let q=setCurrencySelectorWidth("float",s,c,H,R);R.style.width=q,R.style.borderWidth=p+"px",H.style.width=q,I.style.width=q,I.style.borderWidth=p+"px",I.style.backgroundColor=m,changeArrow(_,isOpen$2),changeButtonIcon();let j=0===Number(b)?120:0;I.style.minWidth=Math.max(R.clientWidth,j)+"px",H.style.minWidth=Math.max(R.clientWidth,j)+"px";let $=R.getElementsByClassName("etranslate-currency-name")[0];$.style.display=k?"block":"none",judgeCurrencyLabel(A,$,a);let W=H.children;for(let e=0;e{Y(),I.style.minWidth=Math.max(R.getBoundingClientRect().width,j)+"px"},r.style.zIndex="999",r}function createCurrencyEmbeddedSelector(e,t,n,o,a,l,r,s,c){let i,d,u,g,y,p,m,_,b,f,h,w,C,E,k,L,x,v,N;if(document.addEventListener("click",(function(e){e.target.closest(".etranslate-currency-list-button")||e.target.closest(".etranslate-language-list-dropdown-logo-theme2")||(W(),changeArrow(u,isOpen$2))})),c)switch(h=s.mobile.content.sort_list,w=s.mobile.content.bar_sort_list,p=s.mobile.content.bar_currency_flags_type_show,m=s.mobile.content.bar_currency_labels_type_show,_=s.mobile.content.currency_flags_type_show,b=s.mobile.content.currency_flags_type,f=s.mobile.content.currency_labels_type_show,s.mobile.content.currency_labels_type,i=s.mobile.content.bar_currency_flags_type,s.mobile.content.bar_currency_labels_type,transformationRgb(s.mobile.style.background_color,s.mobile.style.background_opacity),u=s.mobile.content.arrow,C=s.mobile.style.dropdown_background_color,E=s.mobile.style.dropdown_background_opacity,k=transformationRgb(C,E),L=s.mobile.style.dropdown_select_background_color,x=s.mobile.style.dropdown_select_font_color,v=s.mobile.content.currency_labels_type_obj,N=s.mobile.content.bar_currency_labels_type_obj,s.mobile.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(s.mobile.style.border[1]||0)+"px"}else switch(h=s.desktop.content.sort_list,w=s.desktop.content.bar_sort_list,p=s.desktop.content.bar_currency_flags_type_show,m=s.desktop.content.bar_currency_labels_type_show,_=s.desktop.content.currency_flags_type_show,b=s.desktop.content.currency_flags_type,f=s.desktop.content.currency_labels_type_show,s.desktop.content.currency_labels_type,i=s.desktop.content.bar_currency_flags_type,s.desktop.content.bar_currency_labels_type,transformationRgb(s.desktop.style.background_color,s.desktop.style.background_opacity),u=s.desktop.content.arrow,C=s.desktop.style.dropdown_background_color,E=s.desktop.style.dropdown_background_opacity,k=transformationRgb(C,E),L=s.desktop.style.dropdown_select_background_color,x=s.desktop.style.dropdown_select_font_color,v=s.desktop.content.currency_labels_type_obj,N=s.desktop.content.bar_currency_labels_type_obj,s.desktop.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(s.desktop.style.border[1]||0)+"px"}d="rectangle_flag"!==i?"1x1":"4x3";let S="https://my.parcelpanel.com/assets/other/flags/"+d,T=r.getElementsByClassName("etranslate-currency-list-button")[0],B=r.getElementsByClassName("etranslate-currency-list-dropdown")[0],A=r.getElementsByClassName("etranslate-currency-list-dropdown-box")[0],M=setCurrencyEmbeddedSelectorStyle(s,c),O=findCurrencyFlags(a.country);r.setAttribute("style",M);let R="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==b?"1x1":"4x3"),H=T.getElementsByClassName("select-dropdown-flag-icon")[0];H.style.backgroundImage="url("+R+"/"+O+".svg)","circle_flag"===b?H.classList.add("circle_flag"):H.classList.remove("circle_flag"),g=s.rm_logo,B.getBoundingClientRect().height>0?B.setAttribute("style","background-color:"+k+";max-height:230px;opacity:1;"):B.setAttribute("style","background-color:"+k+";max-height:0px;opacity:0;"),setCurrencySelectorWidth("embedded",s,c,B,T),T.style.width="auto",T.style.border="0 solid rgba(224, 224, 224, 1)",B.style.width="auto",A.style.top="47px",r.style.borderRadius=y,A.style.borderRadius=y,A.style.border="1px solid rgba(224,224,224,1)",T.style.whiteSpace="nowrap",changeArrow(u,isOpen$2),changeButtonIcon();let I=0===Number(g)?120:0;A.style.minWidth=Math.max(T.getBoundingClientRect().width,I)+"px";let F=T.getElementsByClassName("etranslate-currency-name")[0];F.style.display=f?"block":"none",judgeCurrencyLabel(v,F,a);let D=B.children;for(let e=0;e{$(),A.style.minWidth=Math.max(T.getBoundingClientRect().width,I)+"px"},r.style.zIndex="999",r}function setCurrencySelectorPosition(e,t,n,o,a,l){let r=e.getBoundingClientRect(),s=t.getBoundingClientRect();const c=n[0]?Math.min(5,n.length)*item_height:0;r.height,s.height;const i=o;return"top"!==a?i=c+30?(l.classList.add("lo-select-up"),!0):(l.classList.remove("lo-select-up"),!1)}const MONEY_SPACE_RE=/[\s\u00A0\u202F]/g;function isNewMoneyFormat(e){return e.includes("amount_with_period_and_space_separator")||e.includes("amount_with_apostrophe_separator")||e.includes("amount_with_space_separator")}function parseNewMoneyFormat(e,t,n){let o,a=String(e);return t.includes("amount_with_period_and_space_separator")?(a=a.replace(MONEY_SPACE_RE,""),o=n?a.replace(/\./g,"").replace(/,/g,"").match(/\d+/):a.match(/\d+(\.\d+)?/),o?parseFloat(o[0]):NaN):t.includes("amount_with_space_separator")?(a=a.replace(MONEY_SPACE_RE,"").replace(/,/g,"."),o=n?a.replace(/\./g,"").match(/\d+/):a.match(/\d+(\.\d+)?/),o?parseFloat(o[0]):NaN):t.includes("amount_with_apostrophe_separator")?(a=a.replace(/'/g,""),o=n?a.replace(/\./g,"").match(/\d+/):a.match(/\d+(\.\d+)?/),o?parseFloat(o[0]):NaN):NaN}function formatNewMoneyFormat(e,t,n){const o=Number(e).toLocaleString("en",{minimumFractionDigits:n,maximumFractionDigits:n});return t.includes("amount_with_period_and_space_separator")?o.replace(/,/g," "):t.includes("amount_with_space_separator")?o.replace(/,/g," ").replace(/\./g,","):t.includes("amount_with_apostrophe_separator")?o.replace(/,/g,"'"):o}function etranslateCurrency(e,t){if(setTimeout((()=>{if(e.code!=t.code){try{setCartNotification()}catch(e){console.log(e)}let n=[...document.getElementsByClassName("etrans-money"),...document.getElementsByClassName("langwill-money")];const o=document.querySelector("#shop_currency").textContent;for(let a=0;a{t.code===o&&(e=t)})),n[a].dataset.oricurrency&&n[a].dataset.currency!==t.code&&(metaFiles.user_currencies_data.forEach((t=>{t.code===n[a].dataset.oricurrency&&(e=t)})),n[a].dataset.oriprice&&(n[a].innerHTML=n[a].dataset.oriprice)),n[a].dataset.currency!==t.code){let o=["DKK","EUR","RON","BRL","ARS","PLN","COP","IDR","NOK","BAM","CZK","QAR"],l=["BIF","CLP","DJF","GNF","ISK","JPY","KRW","PYG","RWF","UGX","UYI","VUV","XOF","XPF","SEK"];let r=document.querySelector("#shop_money_format").textContent.toString().replace("'",'"');const s=isNewMoneyFormat(r),c=8848===parseFloat(e.round)&&!e.is_default;let i;i=s?parseNewMoneyFormat(n[a].innerHTML,r,c):c?parseFloat(n[a].innerHTML.replace(/\./g,"").replace(/,/g,"").match(/\d+/g)):o.includes(e.code)&&(r.includes("amount_with_comma_separator")||r.includes("amount_no_decimals"))?parseFloat(n[a].innerHTML.replace(/\./g,"").replace(/,/g,".").match(/\d+(\.\d+)?/g)):parseFloat(n[a].innerHTML.replace(/,/g,"").match(/\d+(\.\d+)?/g)),i=EtranslateCurrency.convert(i,e.code,t.code).toFixed(2),0!==parseFloat(t.round)&&1!==parseFloat(t.round)&&8848!==parseFloat(t.round)?(i=parseFloat(i.toString().replace(/(\.[0-9]+)/g,""))+parseFloat(t.round),i=s?formatNewMoneyFormat(i,r,2):o.includes(t.code)&&r.includes("amount_with_comma_separator")?Number(i).toLocaleString("in",{minimumFractionDigits:2}):l.includes(t.code)&&r.includes("amount_no_decimals")?Math.floor(Number(i)):Number(i).toLocaleString("zh",{minimumFractionDigits:2})):8848===parseFloat(t.round)?(i=parseInt(i),i=s?formatNewMoneyFormat(i,r,0):o.includes(t.code)&&r.includes("amount_with_comma_separator")?Number(i).toLocaleString("in",{minimumFractionDigits:0}):Number(i).toLocaleString("zh",{minimumFractionDigits:0})):1===parseFloat(t.round)?(i=Number.isInteger(Number(i))?parseInt(i):parseInt(i)+1,i=s?formatNewMoneyFormat(i,r,2):o.includes(t.code)&&r.includes("amount_with_comma_separator")?Number(i).toLocaleString("in",{minimumFractionDigits:2}):Number(i).toLocaleString("zh",{minimumFractionDigits:2})):i=s?formatNewMoneyFormat(i,r,2):o.includes(t.code)&&r.includes("amount_with_comma_separator")?Number(i).toLocaleString("in",{minimumFractionDigits:2}):l.includes(t.code)&&r.includes("amount_no_decimals")?Math.floor(Number(i)):Number(i).toLocaleString("zh",{minimumFractionDigits:2}),n[a].dataset.oricurrency||(n[a].dataset.oricurrency=e.code),n[a].dataset.oriprice||(n[a].dataset.oriprice=n[a].innerHTML),-1!=n[a].innerHTML.indexOf(e.code)&&-1!=n[a].innerHTML.indexOf(e.currency_symbol)?(n[a].innerHTML=t.currency_symbol+i+" "+t.code,n[a].dataset.currency=t.code):-1==n[a].innerHTML.indexOf(e.code)&&-1!=n[a].innerHTML.indexOf(e.currency_symbol)?(n[a].innerHTML=t.currency_symbol+i,n[a].dataset.currency=t.code):-1!=n[a].innerHTML.indexOf(e.code)&&-1==n[a].innerHTML.indexOf(e.currency_symbol)?(n[a].innerHTML=i+" "+t.code,n[a].dataset.currency=t.code):(n[a].innerHTML=t.currency_symbol+i,n[a].dataset.currency=t.code)}}}),1),monitor){const n=document.querySelector('form[action*="/cart/add"]');if(n){const o={childList:!0,subtree:!0};new MutationObserver((()=>{setTimeout((function(){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t)}),1)})).observe(n,o)}let o=!1;new MutationObserver((n=>{if(!o)for(const a of n)for(const n of a.removedNodes)if(n.nodeType===Node.ELEMENT_NODE){const a=n.classList.contains("langwill-money")||n.classList.contains("etrans-money"),l=n.querySelector&&n.querySelector(".langwill-money, .etrans-money");if(a||l)return o=!0,void setTimeout((function(){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t),o=!1}),100)}})).observe(document.body,{childList:!0,subtree:!0});const a=function(e){const t=history[e];return function(){const n=new Event(e);n.arguments=arguments,window.dispatchEvent(n);return t.apply(this,arguments)}};history.pushState=a("pushState"),history.replaceState=a("replaceState"),window.addEventListener("pushState",(function(n){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t),setTimeout((()=>{etranslateCurrency(e,t)}),500),setTimeout((()=>{etranslateCurrency(e,t)}),1e3)})),window.addEventListener("replaceState",(function(n){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t),setTimeout((()=>{etranslateCurrency(e,t)}),500),setTimeout((()=>{etranslateCurrency(e,t)}),1e3)}));const l=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",(function(){-1==this._url.indexOf("/suggest?")&&-1==this._url.indexOf("/payments/config")&&-1==this._url.indexOf("cart")&&-1==this._url.indexOf("cart.js")&&-1==this._url.indexOf("?page=")&&-1==this._url.indexOf("search?")&&-1==this._url.indexOf("view=")&&-1==this._url.indexOf("type=")&&-1==this._url.indexOf("change.js")&&-1==this._url.indexOf("add.js")&&-1==this._url.indexOf("recently-viewed")&&-1==this._url.indexOf("recentlyviewed")&&-1==this._url.indexOf("/recommendation")||setTimeout((function(){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t)}),300)})),l.apply(this,arguments)};const r=window.fetch;window.fetch=function(){return r.apply(this,Array.prototype.slice.call(arguments)).then((function(n){if(!n.ok)return n;try{-1==n.url.indexOf("option_values")&&-1==n.url.indexOf("/cart/")&&-1==n.url.indexOf("/suggest?")&&-1==n.url.indexOf("/payments/config")&&-1==n.url.indexOf("sort_by")&&-1==n.url.indexOf("/variants/")&&-1==n.url.indexOf("?variant=")&&-1==n.url.indexOf("cart.js")&&-1==n.url.indexOf("?page=")&&-1==n.url.indexOf("search?")&&-1==n.url.indexOf("view=")&&-1==n.url.indexOf("type=")&&-1==n.url.indexOf("change.js")&&-1==n.url.indexOf("add.js")&&-1==n.url.indexOf("recently-viewed")&&-1==n.url.indexOf("recentlyviewed")&&-1==n.url.indexOf("change")&&-1==n.url.indexOf("/recommendation")||setTimeout((function(){metaFiles.user_currencies_data.forEach((e=>{e.code===localStorage.getItem("currentCurrency")&&(t=e)})),etranslateCurrency(e,t)}),300)}catch(e){}return n}))},monitor=!1}}function setCurrencySelector(e){let t={},n=[],o={};const a=JSON.parse(document.getElementById("shopify_supported_currencies").textContent.trim()),l=document.getElementById("localization_country_iso_code").textContent;a.forEach((e=>{e.iso_code===l&&(o[e.currency_iso_code]=e.iso_code),t[e.currency_iso_code]=e.iso_code,n.push(e.currency_iso_code)})),t=Object.assign({},t,o);let r=document.getElementById("localization_country_currency_iso_code").textContent,s=document.getElementById("shop_domain").textContent;const c=document.querySelector("#shop_currency").textContent;let i=document.getElementById("etranslate-currency-selector-theme2"),d=localStorage.getItem("currentCurrency");null===d?d=r:(d!==r&&-1!=n.indexOf(d)||r!==c&&-1==n.indexOf(d)&&-1==n.indexOf(r))&&(d=r,localStorage.setItem("currentCurrency",r));let u=[],g=[];e.user_currencies_data&&e.user_currencies_data.forEach((e=>(e.exchange_rate=Number(e.exchange_rate),0!==e.exchange_rate&&(EtranslateCurrency.rates[e.code]=EtranslateCurrency.rates[c]/e.exchange_rate),e.code===d&&(u=e),e.code===c&&(g=e),""))),u.length<=0&&(u=g);let y=isMobile();if(1===Number(e.status)&&(y&&"currency"===e.mobile.content.selector_type&&"dropdown"===e.mobile.content.style_of_the_selector||!y&&"currency"===e.desktop.content.selector_type&&"dropdown"===e.desktop.content.style_of_the_selector)){let o=i.querySelector("form"),a=i.querySelector('input[name="country_code"]');r!==u.code&&window.top===window.self&&(-1!=n.indexOf(u.code)?(a.value=t[u.code],o.submit()):r!==g.code&&t[g.code]?(a.value=t[g.code],o.submit()):etranslateCurrency(g,u));const l=document.getElementById("etranslate-currency-selector-theme2");let c,p;const m=(t,n)=>{if(window.top!==window.self&&e.switcher){let o,a,r,s,d,u=!1,g=0,m=null;function _(e){let t=e;for(;t.parentNode;){const e=["a"];if(t.parentNode.tagName&&e.includes(t.parentNode.tagName.toLowerCase()))return t.parentNode;t=t.parentNode}return null}c=e=>{firstTime$2=(new Date).getTime(),e.preventDefault(),o=e.clientX-l.getBoundingClientRect().left,a=e.clientY-l.getBoundingClientRect().top,u=!0,document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp),document.addEventListener("mousemove",EtranslateOnMouseMove),document.addEventListener("mouseup",EtranslateOnMouseUp)},p=e=>{firstTime$2=(new Date).getTime(),m=e.currentTarget||i,o=e.clientX-m.getBoundingClientRect().left,a=e.clientY-m.getBoundingClientRect().top,document.removeEventListener("mousemove",window.EtranslateOnMouseMove),document.removeEventListener("mouseup",window.EtranslateOnMouseUp),document.addEventListener("mousemove",EtranslateOnEmbedMouseMove),document.addEventListener("mouseup",EtranslateOnEmbedMouseUp)},l.removeEventListener("mousedown",c),l.removeEventListener("mousedown",p),t?l.addEventListener("mousedown",p):l.addEventListener("mousedown",c),window.EtranslateOnMouseMove=e=>{if(u){const t=e.clientX-o,c=e.clientY-a,i=window.innerWidth-l.clientWidth,u=window.innerHeight-l.clientHeight;r=Math.min(i,Math.max(0,t)),s=Math.min(u,Math.max(0,c))+(n?0:Math.max(window.scrollY||window.pageYOffset,document.documentElement.scrollTop||document.body.scrollTop)),d=document.documentElement.clientWidth-r-l.clientWidth,g=document.documentElement.clientHeight-s-l.clientHeight,l.style.left=r+"px",l.style.right="auto",l.style.bottom="auto",l.style.top=s+"px"}},window.EtranslateOnMouseUp=e=>{if(lastTime$2=(new Date).getTime(),lastTime$2-firstTime$2<200&&(flag$2=!0),u=!1,s&&s){const e=r>d?"right":"left";r=r>d?d:r;const t=g{let t=document.elementFromPoint(e.clientX,e.clientY);if(t&&t.parentNode&&!t.classList.contains("draggable"))try{let n=_(t);n&&(t=n),e.clientX>t.getBoundingClientRect().left+40||e.clientY>t.getBoundingClientRect().top+40?t.parentNode.insertBefore(m,t.nextSibling):t.parentNode.insertBefore(m,t)}catch(e){}},window.EtranslateOnEmbedMouseUp=e=>{lastTime$2=(new Date).getTime(),lastTime$2-firstTime$2<200&&(embedFlag$1=!0),document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp);const t=generateSelectorWithPriority(m),n=getElementPosition(m);window.parent.postMessage({et:{type:"dragger_embed",value:t,is_mobile:y}},"*"),window.parent.postMessage({et:{type:"dragger_embed_index",value:n,is_mobile:y}},"*")}}};if(y){if("floating_selector"===e.mobile.content.choose_language_selector)document.body.appendChild(i),createCurrencyFloatSelector(n,t,s,g,u,d,i,e,y),m(!1,e.mobile.content.fixed);else if("embedded_selector"===e.mobile.content.choose_language_selector){if(createCurrencyEmbeddedSelector(n,t,s,g,u,d,i,e,y),e.mobile.style.custom_js&&e.mobile.style.custom_js.trim()&&e.mobile.style.custom_js.trim().length>50)try{evalJS(e.mobile.style.custom_js.trim())(i,y)}catch(t){console.log(t);const n=e.mobile.content.embed_place,o=e.mobile.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?o===e.children.length?e.appendChild(i):e.insertBefore(i,e.children[o]):e.appendChild(i)}else try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}else{const t=e.mobile.content.embed_place,n=e.mobile.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?n===e.children.length?e.appendChild(i):e.insertBefore(i,e.children[n]):e.appendChild(i)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}m(!0,e.mobile.content.fixed)}applyPriviewCssCode(e.mobile.style.css_code)}else{if("floating_selector"===e.desktop.content.choose_language_selector)document.body.appendChild(i),createCurrencyFloatSelector(n,t,s,g,u,d,i,e,y),m(!1,e.desktop.content.fixed);else if("embedded_selector"===e.desktop.content.choose_language_selector){if(createCurrencyEmbeddedSelector(n,t,s,g,u,d,i,e,y),e.desktop.style.custom_js&&e.desktop.style.custom_js.trim()&&e.desktop.style.custom_js.trim().length>50)try{evalJS(e.desktop.style.custom_js.trim())(i,y)}catch(t){console.log(t);const n=e.desktop.content.embed_place,o=e.desktop.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?e.insertBefore(i,e.children[o]):e.appendChild(i)}else try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}else{const t=e.desktop.content.embed_place,n=e.desktop.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?e.insertBefore(i,e.children[n]):e.appendChild(i)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(i,y)}catch(e){console.log(e)}}m(!0,e.desktop.content.fixed)}applyPriviewCssCode(e.desktop.style.css_code)}}else i&&(window.top===window.self?i.remove():i.style.display="none")}let beforeCurrency$1,flag$1,embedFlag,firstTime$1=0,lastTime$1=0,isOpen$1=!1,beforeCurrency,flag;function setLanguageCurrencyDropdownSelectorWidth(e,t,n,o,a,l,r){var s,c,i,d;let u;var g;n?(s=t.mobile.content.bar_flags_type,c=t.mobile.content.bar_labels_type,i=t.mobile.style.selector_width,t.mobile.content.bar_currency_labels_type,d="AUTO"===t.mobile.style.auto_selector_width[0],u=t.mobile.content.bar_currency_labels_type_obj):(s=t.desktop.content.bar_flags_type,c=t.desktop.content.bar_labels_type,i=t.desktop.style.selector_width,t.desktop.content.bar_currency_labels_type,d="AUTO"===t.desktop.style.auto_selector_width[0],u=t.desktop.content.bar_currency_labels_type_obj);let y=0;for(let e in u)u[e]&&(y+=currency_min_width[e]);return"float"===e?(g=flag_min_width[s]+language_min_width[c]+y+arrow_padding_width+Number(i),o.style.whiteSpace=d?"nowrap":"inherit",a.style.whiteSpace=d?"nowrap":"inherit",l.style.whiteSpace=d?"nowrap":"inherit",r.style.whiteSpace=d?"nowrap":"inherit"):(g=flag_min_width[s]+language_min_width[c]+y+arrow_padding_width,o.style.whiteSpace="nowrap",a.style.whiteSpace="nowrap",l.style.whiteSpace="nowrap",r.style.whiteSpace="nowrap"),g}function setLanguageCurrencyDropdownSelectorStyle(e,t){var n,o,a,l,r,s;t?(o=e.mobile.content.position_tb,s=e.mobile.content.fixed,n=e.mobile.content.position_lr,a=e.mobile.style.font_color,l=e.mobile.content.left,r=e.mobile.content.top):(n=e.desktop.content.position_lr,s=e.desktop.content.fixed,o=e.desktop.content.position_tb,a=e.desktop.style.font_color,l=e.desktop.content.left,r=e.desktop.content.top);var c=s?"fixed":"absolute",i="right"===n?"right":"left",d="bottom"===o||"fixed_bottom"===o?"bottom":"top";return s&&"top"===d&&(r=Math.min(window.innerHeight-50,r)),"top: auto;bottom: auto;left: auto;right: auto;"+i+":"+l+"px;"+d+":"+r+"px;background-color:"+(null==e.desktop.style.background_color&&null==e.desktop.style.background_opacity||null==e.mobile.style.background_color&&null==e.mobile.style.background_opacity?"rgba(255,255,255,1)":t?transformationRgb(e.mobile.style.background_color,e.mobile.style.background_opacity):transformationRgb(e.desktop.style.background_color,e.desktop.style.background_opacity))+";color:"+a+";position:"+c+";"}function setLanguageCurrencyDropdownEmbeddedSelectorStyle(e,t){var n;return n=t?e.mobile.style.font_color:e.desktop.style.font_color,"background-color:"+(null==e.desktop.style.background_color&&null==e.desktop.style.background_opacity||null==e.mobile.style.background_color&&null==e.mobile.style.background_opacity?"rgba(255,255,255,1)":t?transformationRgb(e.mobile.style.background_color,e.mobile.style.background_opacity):transformationRgb(e.desktop.style.background_color,e.desktop.style.background_opacity))+";color:"+n+";"}function createLanguageCurrencyFloatSelector(e,t,n,o,a,l,r,s,c,i){var d,u,g,y,p,m,_,b;let f,h,w,C,E,k,L,x,v,N,S,T,B,A,M,O,R,H,I,F,D,U,P,q,j;if(document.addEventListener("click",(function(e){e.target.closest(".etranslate-selector-list-button")||e.target.closest(".etranslate-language-selector-button")||e.target.closest(".etranslate-currency-selector-button")||e.target.closest(".etranslate-selector-dropdown-item")||e.target.closest(".etranslate-language-list-dropdown-logo-theme2")||e.target.closest(".etranslate-change-button")||(ze(),Ge(),Je(),changeArrow(_,isOpen$1),changeArrow(_,je,X,H),changeArrow(_,$e,Z,H))})),i)switch(D=c.mobile.content.sort_list,U=c.mobile.content.bar_sort_list,E=c.mobile.content.bar_flags_type_show,k=c.mobile.content.bar_labels_type_show,f=c.mobile.content.flags_type_show,h=c.mobile.content.flags_type,w=c.mobile.content.labels_type_show,C=c.mobile.content.labels_type,T=c.mobile.content.bar_currency_flags_type,L=c.mobile.content.bar_currency_flags_type_show,x=c.mobile.content.bar_currency_labels_type_show,v=c.mobile.content.currency_flags_type_show,N=c.mobile.content.currency_flags_type,S=c.mobile.content.currency_labels_type_show,c.mobile.content.currency_labels_type,B=c.mobile.content.separator,A=c.mobile.style.dropdown_background_color,M=c.mobile.style.dropdown_background_opacity,O=transformationRgb(A,M),R=c.mobile.style.dropdown_select_background_color,H=c.mobile.style.dropdown_select_font_color,I=c.mobile.style.dropdown_primary_background_color,F=c.mobile.style.dropdown_primary_font_color,P=c.mobile.content.separator_show,d=c.mobile.content.bar_flags_type,u=c.mobile.content.bar_labels_type,g=c.mobile.style.selector_width,y=c.mobile.content.top,p=c.mobile.content.position_tb,m=c.mobile.style.border_width,transformationRgb(c.mobile.style.background_color,c.mobile.style.background_opacity),c.mobile.content.bar_currency_labels_type,_=c.mobile.content.arrow,q=c.mobile.content.currency_labels_type_obj,j=c.mobile.content.bar_currency_labels_type_obj,c.mobile.style.border[0]){case"SQUARE":b=0;break;case"ROUNDED":b="4px";break;case"CUSTOM":b=(c.mobile.style.border[1]||0)+"px"}else switch(D=c.desktop.content.sort_list,U=c.desktop.content.bar_sort_list,E=c.desktop.content.bar_flags_type_show,k=c.desktop.content.bar_labels_type_show,f=c.desktop.content.flags_type_show,h=c.desktop.content.flags_type,w=c.desktop.content.labels_type_show,C=c.desktop.content.labels_type,L=c.desktop.content.bar_currency_flags_type_show,x=c.desktop.content.bar_currency_labels_type_show,T=c.desktop.content.bar_currency_flags_type,v=c.desktop.content.currency_flags_type_show,N=c.desktop.content.currency_flags_type,S=c.desktop.content.currency_labels_type_show,c.desktop.content.currency_labels_type,B=c.desktop.content.separator,A=c.desktop.style.dropdown_background_color,M=c.desktop.style.dropdown_background_opacity,O=transformationRgb(A,M),R=c.desktop.style.dropdown_select_background_color,H=c.desktop.style.dropdown_select_font_color,I=c.desktop.style.dropdown_primary_background_color,F=c.desktop.style.dropdown_primary_font_color,P=c.desktop.content.separator_show,d=c.desktop.content.bar_flags_type,u=c.desktop.content.bar_labels_type,g=c.desktop.style.selector_width,y=c.desktop.content.top,p=c.desktop.content.position_tb,m=c.desktop.style.border_width,transformationRgb(c.desktop.style.background_color,c.desktop.style.background_opacity),c.desktop.content.bar_currency_labels_type,_=c.desktop.content.arrow,q=c.desktop.content.currency_labels_type_obj,j=c.desktop.content.bar_currency_labels_type_obj,c.desktop.style.border[0]){case"SQUARE":b=0;break;case"ROUNDED":b="4px";break;case"CUSTOM":b=(c.desktop.style.border[1]||0)+"px"}var $="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3"),W=s.getElementsByClassName("etranslate-selector-list-button")[0],z=s.getElementsByClassName("etranslate-language-selector-button")[0],G=s.getElementsByClassName("etranslate-currency-selector-button")[0],J=s.getElementsByClassName("etranslate-selector-list-dropdown")[0],K=s.getElementsByClassName("etranslate-language-dropdown")[0],Y=s.getElementsByClassName("etranslate-currency-dropdown")[0],X=document.querySelectorAll("#etranslate-currency_language-arrow-language-img"),Z=document.querySelectorAll("#etranslate-currency_language-arrow-currency-img"),V=s.getElementsByClassName("etranslate-change-button")[0],Q=s.getElementsByClassName("split-line")[0];Q.style.display=P?"block":"none",Q&&(Q.innerHTML=B||"/");var ee=c.global.language_flags;if(-1!=Etranslate.multiLanguage.indexOf(r.toLowerCase())){var te=Etranslate.selectorMultiLanguageText[r.toLowerCase()];V.innerHTML=te.change}var ne=setLanguageCurrencyDropdownSelectorStyle(c,i),oe=findCurrencyFlags(a.country);setLanguageCurrencyDropdownSelectorPosition(W,J,K,Y,n,y,p,c.user_currencies_data);var ae=findLanguageFlags(ee,r).toLowerCase();c.rm_logo,s.setAttribute("style",ne);var le=W.getElementsByClassName("select-dropdown-flag-icon")[0],re=W.getElementsByClassName("select-dropdown-flag-icon")[1],se=z.getElementsByClassName("select-dropdown-flag-icon")[0],ce=G.getElementsByClassName("select-dropdown-flag-icon")[0];let ie="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==N?"1x1":"4x3");le.style.backgroundImage="url("+ie+"/"+oe.toLowerCase()+".svg)","circle_flag"===N?le.classList.add("circle_flag"):le.classList.remove("circle_flag");let de="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==h?"1x1":"4x3");re.style.backgroundImage="url("+de+"/"+ae.toLowerCase()+".svg)","circle_flag"===h?re.classList.add("circle_flag"):re.classList.remove("circle_flag");let ue="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3");se.style.backgroundImage="url("+ue+"/"+ae.toLowerCase()+".svg)","circle_flag"===d?se.classList.add("circle_flag"):se.classList.remove("circle_flag");let ge="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==T?"1x1":"4x3");var ye;ce.style.backgroundImage="url("+ge+"/"+oe.toLowerCase()+".svg)","circle_flag"===T?ce.classList.add("circle_flag"):ce.classList.remove("circle_flag"),J.getBoundingClientRect().height>0?J.setAttribute("style","width:"+g+";background-color:"+O+";opacity:1;display:table"):J.setAttribute("style","width:"+g+";background-color:"+O+";max-height:0px;opacity:0;display:none"),J.style.minWidth=W.getBoundingClientRect().width+"px",K.getBoundingClientRect().height>0?K.setAttribute("style","width:"+g+";background-color:"+R+";color:"+H+";max-height:230px;opacity:1;display:block"):K.setAttribute("style","width:"+g+";background-color:"+R+";color:"+H+";max-height:0px;opacity:0;display:none"),Y.getBoundingClientRect().height>0?Y.setAttribute("style","width:"+g+";background-color:"+R+";color:"+H+";max-height:230px;opacity:1;display:block"):Y.setAttribute("style","width:"+g+";background-color:"+R+";color:"+H+";max-height:0px;opacity:0;display:none"),K.style.minWidth=z.getBoundingClientRect().width+"px",Y.style.minWidth=G.getBoundingClientRect().width+"px",z.setAttribute("style","background-color:"+R+";color:"+H),G.setAttribute("style","background-color:"+R+";color:"+H),V.setAttribute("style","background-color:"+I+";color:"+F),s.style.borderRadius=b,z.style.borderRadius=b,G.style.borderRadius=b,J.style.borderRadius=b,K.style.borderRadius=b,Y.style.borderRadius=b,V.style.borderRadius=b,W.style.borderRadius=b,ye=i?"AUTO"===c.mobile.style.auto_selector_width[0]:"AUTO"===c.desktop.style.auto_selector_width[0];var pe=setLanguageCurrencyDropdownSelectorWidth("float",c,i,z,K,G,Y),me=pe-22;W.style.width=ye?"auto":pe+"px",W.style.borderWidth=m+"px",J.style.width=ye?"auto":pe+"px",J.style.borderWidth=m+"px",K.style.width=ye?"auto":me+"px",Y.style.width=ye?"auto":me+"px",changeArrow(_,isOpen$1),changeArrow(_,je,X,H),changeArrow(_,$e,Z,H),changeButtonIcon();for(var _e=K.children,be=0;be<_e.length;be++){var fe=_e[be],he=fe.dataset.code,we=fe.getElementsByClassName("select-dropdown-flag-icon")[0],Ce=_e[be].dataset.name;oe=findLanguageFlags(ee,he).toLowerCase();"circle_flag"===d?we.classList.add("circle_flag"):we.classList.remove("circle_flag"),fe.onclick=Ke(n.find((function(e){return e.iso_code.toLowerCase()===he.toLowerCase()}))),we.style.backgroundImage="url("+$+"/"+oe+".svg)";var Ee=fe.getElementsByClassName("etranslate-language-name")[0];k?(Ee.style.display="block",Ee.style.display=U.language.children.bar_labels_type):(Ee.style.display="none",Ee.style.display=U.language.children.bar_labels_type),"language_name"===u?Ee.innerHTML=langCodeToLangArray[he]?langCodeToLangArray[he]:Ee.textContent:"native_language_name"===u?(Ce="français"==Ce?"Français":Ce,Ee.innerHTML=Ce||langCodeToLangArray[he]):Ee.innerHTML=he?he.toLocaleUpperCase():he}var ke=Y.children;for(be=0;be{t.currency_iso_code===l&&t.iso_code===r.toUpperCase()&&(e=r)})),d.value=e||t[l],u=!0}else y!==o.code&&t[o.code]?(d.value=t[o.code],u=!0):etranslateCurrency(beforeCurrency$1,a);else a.code===o.code&&(d.value=t[o.code],u=!0);if(u&&window.top===window.self)c.submit();else{judgeCurrencyLabel(j,Re,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code}),judgeCurrencyLabel(q,Oe,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code});var p=findCurrencyFlags(a.country);le.style.backgroundImage="url("+$+"/"+p+".svg)",beforeCurrency$1=a,ze()}changeArrow(_,isOpen$1),changeArrow(_,je,X,H),changeArrow(_,$e,Z,H)})),s.style.zIndex="999",s}function createLanguageCurrencyEmbeddedSelector(e,t,n,o,a,l,r,s,c,i){var d,u,g,y;let p,m,_,b,f,h,w,C,E,k,L,x,v,N,S,T,B,A,M,O,R,H,I,F,D;if(document.addEventListener("click",(function(e){e.target.closest(".etranslate-selector-list-button")||e.target.closest(".etranslate-language-selector-button")||e.target.closest(".etranslate-currency-selector-button")||e.target.closest(".etranslate-selector-dropdown-item")||e.target.closest(".etranslate-language-list-dropdown-logo-theme2")||e.target.closest(".etranslate-change-button")||(Pe(),qe(),je(),changeArrow(g,isOpen$1),changeArrow(g,Fe,G,A),changeArrow(g,De,J,A))})),i)switch(R=c.mobile.content.sort_list,H=c.mobile.content.bar_sort_list,f=c.mobile.content.bar_flags_type_show,h=c.mobile.content.bar_labels_type_show,p=c.mobile.content.flags_type_show,m=c.mobile.content.flags_type,_=c.mobile.content.labels_type_show,b=c.mobile.content.labels_type,x=c.mobile.content.bar_currency_flags_type,w=c.mobile.content.bar_currency_flags_type_show,C=c.mobile.content.bar_currency_labels_type_show,E=c.mobile.content.currency_flags_type_show,k=c.mobile.content.currency_flags_type,L=c.mobile.content.currency_labels_type_show,c.mobile.content.currency_labels_type,v=c.mobile.content.separator,N=c.mobile.style.dropdown_background_color,S=c.mobile.style.dropdown_background_opacity,T=transformationRgb(N,S),B=c.mobile.style.dropdown_select_background_color,A=c.mobile.style.dropdown_select_font_color,M=c.mobile.style.dropdown_primary_background_color,O=c.mobile.style.dropdown_primary_font_color,I=c.mobile.content.separator_show,d=c.mobile.content.bar_flags_type,u=c.mobile.content.bar_labels_type,transformationRgb(c.mobile.style.background_color,c.mobile.style.background_opacity),c.mobile.content.bar_currency_labels_type,g=c.mobile.content.arrow,F=c.mobile.content.currency_labels_type_obj,D=c.mobile.content.bar_currency_labels_type_obj,c.mobile.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(c.mobile.style.border[1]||0)+"px"}else switch(f=c.desktop.content.bar_flags_type_show,h=c.desktop.content.bar_labels_type_show,R=c.desktop.content.sort_list,H=c.desktop.content.bar_sort_list,p=c.desktop.content.flags_type_show,m=c.desktop.content.flags_type,_=c.desktop.content.labels_type_show,b=c.desktop.content.labels_type,w=c.desktop.content.bar_currency_flags_type_show,C=c.desktop.content.bar_currency_labels_type_show,x=c.desktop.content.bar_currency_flags_type,E=c.desktop.content.currency_flags_type_show,k=c.desktop.content.currency_flags_type,L=c.desktop.content.currency_labels_type_show,c.desktop.content.currency_labels_type,v=c.desktop.content.separator,N=c.desktop.style.dropdown_background_color,S=c.desktop.style.dropdown_background_opacity,T=transformationRgb(N,S),B=c.desktop.style.dropdown_select_background_color,A=c.desktop.style.dropdown_select_font_color,M=c.desktop.style.dropdown_primary_background_color,O=c.desktop.style.dropdown_primary_font_color,I=c.desktop.content.separator_show,d=c.desktop.content.bar_flags_type,u=c.desktop.content.bar_labels_type,transformationRgb(c.desktop.style.background_color,c.desktop.style.background_opacity),c.desktop.content.bar_currency_labels_type,g=c.desktop.content.arrow,F=c.desktop.content.currency_labels_type_obj,D=c.desktop.content.bar_currency_labels_type_obj,c.desktop.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(c.desktop.style.border[1]||0)+"px"}var U="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3"),P=s.getElementsByClassName("etranslate-selector-list-button")[0],q=s.getElementsByClassName("etranslate-language-selector-button")[0],j=s.getElementsByClassName("etranslate-currency-selector-button")[0],$=s.getElementsByClassName("etranslate-selector-list-dropdown")[0],W=s.getElementsByClassName("etranslate-language-dropdown")[0],z=s.getElementsByClassName("etranslate-currency-dropdown")[0],G=document.querySelectorAll("#etranslate-currency_language-arrow-language-img"),J=document.querySelectorAll("#etranslate-currency_language-arrow-currency-img"),K=s.getElementsByClassName("etranslate-change-button")[0],Y=s.getElementsByClassName("split-line")[0];Y.style.display=I?"block":"none",Y&&(Y.innerHTML=v||"/");var X=c.global.language_flags;if(-1!=Etranslate.multiLanguage.indexOf(r.toLowerCase())){var Z=Etranslate.selectorMultiLanguageText[r.toLowerCase()];K.innerHTML=Z.change}var V=setLanguageCurrencyDropdownEmbeddedSelectorStyle(c,i),Q=findCurrencyFlags(a.country),ee=findLanguageFlags(X,r).toLowerCase();c.rm_logo,s.setAttribute("style",V);var te=P.getElementsByClassName("select-dropdown-flag-icon")[0],ne=P.getElementsByClassName("select-dropdown-flag-icon")[1],oe=q.getElementsByClassName("select-dropdown-flag-icon")[0],ae=j.getElementsByClassName("select-dropdown-flag-icon")[0];let le="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==k?"1x1":"4x3");te.style.backgroundImage="url("+le+"/"+Q.toLowerCase()+".svg)","circle_flag"===k?te.classList.add("circle_flag"):te.classList.remove("circle_flag");let re="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==m?"1x1":"4x3");ne.style.backgroundImage="url("+re+"/"+ee.toLowerCase()+".svg)","circle_flag"===m?ne.classList.add("circle_flag"):ne.classList.remove("circle_flag");let se="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3");oe.style.backgroundImage="url("+se+"/"+ee.toLowerCase()+".svg)","circle_flag"===d?oe.classList.add("circle_flag"):oe.classList.remove("circle_flag");let ce="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==x?"1x1":"4x3");var ie;ae.style.backgroundImage="url("+ce+"/"+Q.toLowerCase()+".svg)","circle_flag"===x?ae.classList.add("circle_flag"):ae.classList.remove("circle_flag"),$.getBoundingClientRect().height>0?$.setAttribute("style","background-color:"+T+";opacity:1;display:table;bottom:inherit;top:47px;"):$.setAttribute("style","background-color:"+T+";max-height:0px;opacity:0;display:none;bottom:inherit;top:47px;"),W.getBoundingClientRect().height>0?W.setAttribute("style","background-color:"+B+";color:"+A+";max-height:230px;opacity:1;display:block;top:calc(100% + 5px)"):W.setAttribute("style","background-color:"+B+";color:"+A+";max-height:0px;opacity:0;display:none;top:calc(100% + 5px)"),z.getBoundingClientRect().height>0?z.setAttribute("style","background-color:"+B+";color:"+A+";max-height:230px;opacity:1;display:block;top:calc(100% + 5px)"):z.setAttribute("style","background-color:"+B+";color:"+A+";max-height:0px;opacity:0;display:none;top:calc(100% + 5px)"),$.style.minWidth=P.getBoundingClientRect().width+"px",W.style.minWidth=q.getBoundingClientRect().width+"px",z.style.minWidth=j.getBoundingClientRect().width+"px",q.setAttribute("style","background-color:"+B+";color:"+A),j.setAttribute("style","background-color:"+B+";color:"+A),K.setAttribute("style","background-color:"+M+";color:"+O),s.style.borderRadius=y,q.style.borderRadius=y,j.style.borderRadius=y,$.style.border="none",$.style.borderRadius=y,W.style.borderRadius=y,z.style.borderRadius=y,K.style.borderRadius=y,ie=i?"AUTO"===c.mobile.style.auto_selector_width[0]:"AUTO"===c.desktop.style.auto_selector_width[0];var de=setLanguageCurrencyDropdownSelectorWidth("embedded",c,i,q,W,j,z)-22;P.style.width="auto",P.style.border="0 solid rgba(224, 224, 224, 1)",$.style.border="1px solid rgba(224,224,224,1)",W.style.width=ie?"auto":de+"px !important",z.style.width=ie?"auto":de+"px !important",changeArrow(g,isOpen$1),changeArrow(g,Fe,G,A),changeArrow(g,De,J,A),changeButtonIcon();for(var ue=W.children,ge=0;ge{t.currency_iso_code===l&&t.iso_code===r.toUpperCase()&&(e=r)})),d.value=e||t[l],u=!0}else p!==o.code&&t[o.code]?(d.value=t[o.code],u=!0):etranslateCurrency(beforeCurrency$1,a);else a.code===o.code&&(d.value=t[o.code],u=!0);if(u&&window.top===window.self)c.submit();else{judgeCurrencyLabel(D,Te,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code}),judgeCurrencyLabel(F,Se,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code});var m=findCurrencyFlags(a.country);te.style.backgroundImage="url("+U+"/"+m+".svg)",beforeCurrency$1=a,Pe()}changeArrow(g,isOpen$1),changeArrow(g,Fe,G,A),changeArrow(g,De,J,A)})),s.style.zIndex="999",s}function setLanguageCurrencyDropdownSelectorPosition(e,t,n,o,a,l,r,s){var c=e.getBoundingClientRect(),i=t.getBoundingClientRect();const d=Math.max((Math.min(5,a.length)+1)*item_height,(Math.min(5,s.length)+2)*item_height,210);if(c.height,i.height,"top"!==r){const e=l-i.height;return e=d+30?(t.classList.add("lo-select-up"),n.classList.add("lo-select-up"),o.classList.add("lo-select-up"),!0):(t.classList.remove("lo-select-up"),n.classList.remove("lo-select-up"),o.classList.remove("lo-select-up"),!1)}}function setLanguageCurrencyDropdownEmbeddedSelectorPosition(e,t,n,o,a){const l=Math.max((Math.min(5,o.length)+1)*item_height,(Math.min(5,a.length)+2)*item_height,170),r=document.body.scrollHeight-((document.documentElement||document.body.parentNode||document.body).scrollTop+e.getBoundingClientRect().y);r{e.iso_code===l&&(a[e.currency_iso_code]=e.iso_code),t[e.currency_iso_code]=e.iso_code,n.push(e.currency_iso_code)})),t=Object.assign({},t,a);let r=document.getElementById("localization_country_currency_iso_code").textContent;const s=document.querySelector("#shop_currency").textContent;let c=getLanguageList(),i=document.querySelector("#language_iso_code").textContent,d=document.getElementById("etranslate-language_currency-dropdown-selector-theme2"),u=localStorage.getItem("currentCurrency");null===u?u=r:(u!==r&&-1!=n.indexOf(u)||r!==s&&-1==n.indexOf(u)&&-1==n.indexOf(r))&&(u=r,localStorage.setItem("currentCurrency",r));let g=[],y=[];e.user_currencies_data&&e.user_currencies_data.forEach((e=>(e.exchange_rate=Number(e.exchange_rate),0!==e.exchange_rate&&(EtranslateCurrency.rates[e.code]=EtranslateCurrency.rates[s]/e.exchange_rate),e.code===u&&(g=e),e.code===s&&(y=e),""))),g.length<=0&&(g=y),beforeCurrency$1=g;let p=isMobile();if(1===Number(e.status)&&(p&&"language_currency"===e.mobile.content.selector_type||!p&&"language_currency"===e.desktop.content.selector_type)){const o=document.getElementById("etranslate-language_currency-dropdown-selector-theme2");let a,l;const s=(t,n)=>{if(window.top!==window.self&&e.switcher){let r,s,c,i,d,u=!1,g=0,y=null;function m(e){let t=e;for(;t.parentNode;){const e=["a"];if(t.parentNode.tagName&&e.includes(t.parentNode.tagName.toLowerCase()))return t.parentNode;t=t.parentNode}return null}a=e=>{firstTime$1=(new Date).getTime(),e.preventDefault(),r=e.clientX-o.getBoundingClientRect().left,s=e.clientY-o.getBoundingClientRect().top,u=!0,document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp),document.addEventListener("mousemove",EtranslateOnMouseMove),document.addEventListener("mouseup",EtranslateOnMouseUp)},l=e=>{firstTime$1=(new Date).getTime(),y=e.currentTarget||etranslateCurrencyDom,r=e.clientX-y.getBoundingClientRect().left,s=e.clientY-y.getBoundingClientRect().top,document.removeEventListener("mousemove",window.EtranslateOnMouseMove),document.removeEventListener("mouseup",window.EtranslateOnMouseUp),document.addEventListener("mousemove",EtranslateOnEmbedMouseMove),document.addEventListener("mouseup",EtranslateOnEmbedMouseUp)},o.removeEventListener("mousedown",a),o.removeEventListener("mousedown",l),t?o.addEventListener("mousedown",l):o.addEventListener("mousedown",a),window.EtranslateOnMouseMove=e=>{if(u){const t=e.clientX-r,a=e.clientY-s,l=window.innerWidth-o.clientWidth,u=window.innerHeight-o.clientHeight;c=Math.min(l,Math.max(0,t)),i=Math.min(u,Math.max(0,a))+(n?0:Math.max(window.scrollY||window.pageYOffset,document.documentElement.scrollTop||document.body.scrollTop)),d=document.documentElement.clientWidth-c-o.clientWidth,g=document.documentElement.clientHeight-i-o.clientHeight,o.style.left=c+"px",o.style.right="auto",o.style.bottom="auto",o.style.top=i+"px"}},window.EtranslateOnMouseUp=e=>{if(lastTime$1=(new Date).getTime(),lastTime$1-firstTime$1<200&&(flag$1=!0),u=!1,i&&i){const e=c>d?"right":"left";c=c>d?d:c;const t=g{let t=document.elementFromPoint(e.clientX,e.clientY);if(t&&t.parentNode&&!t.classList.contains("draggable"))try{let n=m(t);n&&(t=n),e.clientX>t.getBoundingClientRect().left+40||e.clientY>t.getBoundingClientRect().top+40?t.parentNode.insertBefore(y,t.nextSibling):t.parentNode.insertBefore(y,t)}catch(e){}},window.EtranslateOnEmbedMouseUp=e=>{lastTime$1=(new Date).getTime(),lastTime$1-firstTime$1<200&&(embedFlag=!0),document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp);const t=generateSelectorWithPriority(y),n=getElementPosition(y);window.parent.postMessage({et:{type:"dragger_embed",value:t,is_mobile:p}},"*"),window.parent.postMessage({et:{type:"dragger_embed_index",value:n,is_mobile:p}},"*")}}};if(p)if("dropdown"===e.mobile.content.style_of_the_selector){if("floating_selector"===e.mobile.content.choose_language_selector)document.body.appendChild(d),d.classList.add("etranslate-floating-selectorList"),d.classList.remove("etranslate-embedded-selectorList"),createLanguageCurrencyFloatSelector(n,t,c,y,g,u,i,d,e,p),s(!1,e.mobile.content.fixed);else if("embedded_selector"===e.mobile.content.choose_language_selector){if(d.classList.add("etranslate-embedded-selectorList"),d.classList.remove("etranslate-floating-selectorList"),createLanguageCurrencyEmbeddedSelector(n,t,c,y,g,u,i,d,e,p),e.mobile.style.custom_js&&e.mobile.style.custom_js.trim()&&e.mobile.style.custom_js.trim().length>50)try{evalJS(e.mobile.style.custom_js.trim())(d,p)}catch(t){console.log(t);const n=e.mobile.content.embed_place,o=e.mobile.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?e.insertBefore(d,e.children[o]):e.appendChild(d)}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else{const t=e.mobile.content.embed_place,n=e.mobile.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?e.insertBefore(d,e.children[n]):e.appendChild(d)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}s(!0,e.mobile.content.fixed)}applyPriviewCssCode(e.mobile.style.css_code);let o=d.querySelector("form"),a=d.querySelector('input[name="country_code"]');if(-1!=window.location.search.indexOf("?preview_key")){d.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}r!==g.code&&window.top===window.self&&(-1!=n.indexOf(g.code)?(a.value=t[g.code],o.submit()):r!==y.code&&t[y.code]?(a.value=t[y.code],o.submit()):etranslateCurrency(y,g))}else d&&(window.top===window.self?d.remove():d.style.display="none");else if("dropdown"===e.desktop.content.style_of_the_selector){if("floating_selector"===e.desktop.content.choose_language_selector)document.body.appendChild(d),d.classList.add("etranslate-floating-selectorList"),d.classList.remove("etranslate-embedded-selectorList"),createLanguageCurrencyFloatSelector(n,t,c,y,g,u,i,d,e,p),s(!1,e.desktop.content.fixed);else if("embedded_selector"===e.desktop.content.choose_language_selector){if(d.classList.add("etranslate-embedded-selectorList"),d.classList.remove("etranslate-floating-selectorList"),createLanguageCurrencyEmbeddedSelector(n,t,c,y,g,u,i,d,e,p),e.desktop.style.custom_js&&e.desktop.style.custom_js.trim()&&e.desktop.style.custom_js.trim().length>50)try{evalJS(e.desktop.style.custom_js.trim())(d,p)}catch(t){console.log(t);const n=e.desktop.content.embed_place,o=e.desktop.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?e.insertBefore(d,e.children[o]):e.appendChild(d)}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else{const t=e.desktop.content.embed_place,n=e.desktop.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?e.insertBefore(d,e.children[n]):e.appendChild(d)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}s(!0,e.desktop.content.fixed)}applyPriviewCssCode(e.desktop.style.css_code);let o=d.querySelector("form"),a=d.querySelector('input[name="country_code"]');if(-1!=window.location.search.indexOf("?preview_key")){d.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}r!==g.code&&window.top===window.self&&(-1!=n.indexOf(g.code)?(a.value=t[g.code],o.submit()):r!==y.code&&t[y.code]?(a.value=t[y.code],o.submit()):etranslateCurrency(y,g))}else d&&(window.top===window.self?d.remove():d.style.display="none")}else d&&(window.top===window.self?d.remove():d.style.display="none")}let firstTime=0,lastTime=0,isOpen=!1;function setLanguageCurrencyPopupSelectorWidth(e,t,n){var o,a,l;let r;n?(o=t.mobile.content.bar_flags_type,a=t.mobile.content.bar_labels_type,l=t.mobile.style.selector_width,t.mobile.content.bar_currency_labels_type,r=t.mobile.content.bar_currency_labels_type_obj):(o=t.desktop.content.bar_flags_type,a=t.desktop.content.bar_labels_type,l=t.desktop.style.selector_width,t.desktop.content.bar_currency_labels_type,r=t.desktop.content.bar_currency_labels_type_obj);let s=0;for(let e in r)r[e]&&(s+=currency_min_width[e]);return"float"===e?flag_min_width[o]+language_min_width[a]+s+arrow_padding_width+Number(l):flag_min_width[o]+language_min_width[a]+s+arrow_padding_width}function setLanguageCurrencyPopupSelectorStyle(e,t){var n,o,a,l,r,s;t?(o=e.mobile.content.position_tb,s=e.mobile.content.fixed,n=e.mobile.content.position_lr,a=e.mobile.style.font_color,l=e.mobile.content.left,r=e.mobile.content.top):(n=e.desktop.content.position_lr,s=e.desktop.content.fixed,o=e.desktop.content.position_tb,a=e.desktop.style.font_color,l=e.desktop.content.left,r=e.desktop.content.top);var c=s?"fixed":"absolute",i="right"===n?"right":"left",d="bottom"===o||"fixed_bottom"===o?"bottom":"top";return s&&"top"===d&&(r=Math.min(window.innerHeight-50,r)),"top: auto;bottom: auto;left: auto;right: auto;"+i+":"+l+"px;"+d+":"+r+"px;background-color:"+(null==e.desktop.style.background_color&&null==e.desktop.style.background_opacity||null==e.mobile.style.background_color&&null==e.mobile.style.background_opacity?"rgba(255,255,255,1)":t?transformationRgb(e.mobile.style.background_color,e.mobile.style.background_opacity):transformationRgb(e.desktop.style.background_color,e.desktop.style.background_opacity))+";color:"+a+";position:"+c+";"}function setLanguageCurrencyPopupEmbeddedSelectorStyle(e,t){var n;return n=t?e.mobile.style.font_color:e.desktop.style.font_color,"background-color:"+(null==e.desktop.style.background_color&&null==e.desktop.style.background_opacity||null==e.mobile.style.background_color&&null==e.mobile.style.background_opacity?"rgba(255,255,255,1)":t?transformationRgb(e.mobile.style.background_color,e.mobile.style.background_opacity):transformationRgb(e.desktop.style.background_color,e.desktop.style.background_opacity))+";color:"+n+";"}function createLanguageCurrencyFloatPopupSelector(e,t,n,o,a,l,r,s,c,i){var d,u,g,y,p,m;let _,b,f,h,w,C,E,k,L,x,v,N,S,T,B,A,M,O,R,H,I,F,D,U,P,q,j,$;if(i)switch(U=c.mobile.content.sort_list,P=c.mobile.content.bar_sort_list,w=c.mobile.content.bar_flags_type_show,C=c.mobile.content.bar_labels_type_show,_=c.mobile.content.flags_type_show,b=c.mobile.content.flags_type,f=c.mobile.content.labels_type_show,h=c.mobile.content.labels_type,N=c.mobile.content.bar_currency_flags_type,E=c.mobile.content.bar_currency_flags_type_show,k=c.mobile.content.bar_currency_labels_type_show,L=c.mobile.content.currency_flags_type_show,x=c.mobile.content.currency_flags_type,v=c.mobile.content.currency_labels_type_show,c.mobile.content.currency_labels_type,S=c.mobile.content.separator,T=c.mobile.style.popup_background_color,B=c.mobile.style.popup_font_color,A=c.mobile.style.popup_background_opacity,F=transformationRgb(T,A),M=c.mobile.style.popup_select_background_color,O=c.mobile.style.popup_select_font_color,R=c.mobile.style.popup_primary_background_color,H=c.mobile.style.popup_primary_font_color,I=c.mobile.style.popup_second_font_color,D=c.mobile.content.selector_type,q=c.mobile.content.separator_show,d=c.mobile.content.bar_flags_type,u=c.mobile.content.bar_labels_type,g=c.mobile.style.selector_width,c.mobile.content.top,c.mobile.content.fixed,y=c.mobile.style.border_width,transformationRgb(c.mobile.style.background_color,c.mobile.style.background_opacity),c.mobile.content.bar_currency_labels_type,p=c.mobile.content.arrow,j=c.mobile.content.currency_labels_type_obj,$=c.mobile.content.bar_currency_labels_type_obj,c.mobile.style.border[0]){case"SQUARE":m=0;break;case"ROUNDED":m="4px";break;case"CUSTOM":m=(c.mobile.style.border[1]||0)+"px"}else switch(U=c.desktop.content.sort_list,P=c.desktop.content.bar_sort_list,w=c.desktop.content.bar_flags_type_show,C=c.desktop.content.bar_labels_type_show,_=c.desktop.content.flags_type_show,b=c.desktop.content.flags_type,f=c.desktop.content.labels_type_show,h=c.desktop.content.labels_type,E=c.desktop.content.bar_currency_flags_type_show,k=c.desktop.content.bar_currency_labels_type_show,N=c.desktop.content.bar_currency_flags_type,L=c.desktop.content.currency_flags_type_show,x=c.desktop.content.currency_flags_type,v=c.desktop.content.currency_labels_type_show,c.desktop.content.currency_labels_type,S=c.desktop.content.separator,T=c.desktop.style.popup_background_color,B=c.desktop.style.popup_font_color,A=c.desktop.style.popup_background_opacity,F=transformationRgb(T,A),M=c.desktop.style.popup_select_background_color,O=c.desktop.style.popup_select_font_color,R=c.desktop.style.popup_primary_background_color,H=c.desktop.style.popup_primary_font_color,I=c.desktop.style.popup_second_font_color,D=c.desktop.content.selector_type,q=c.desktop.content.separator_show,d=c.desktop.content.bar_flags_type,u=c.desktop.content.bar_labels_type,g=c.desktop.style.selector_width,c.desktop.content.top,c.desktop.content.fixed,y=c.desktop.style.border_width,transformationRgb(c.desktop.style.background_color,c.desktop.style.background_opacity),c.desktop.content.bar_currency_labels_type,p=c.desktop.content.arrow,j=c.desktop.content.currency_labels_type_obj,$=c.desktop.content.bar_currency_labels_type_obj,c.desktop.style.border[0]){case"SQUARE":m=0;break;case"ROUNDED":m="4px";break;case"CUSTOM":m=(c.desktop.style.border[1]||0)+"px"}var W="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3"),z=s.getElementsByClassName("etranslate-selector-list-button")[0],G=s.getElementsByClassName("etranslate-language-selector-button")[0],J=s.getElementsByClassName("etranslate-currency-selector-button")[0],K=s.getElementsByClassName("etranslate-selector-list-dropdown")[0],Y=s.getElementsByClassName("etranslate-language-dropdown")[0],X=s.getElementsByClassName("etranslate-currency-dropdown")[0],Z=document.querySelectorAll("#etranslate-currency_language-arrow-language-img"),V=document.querySelectorAll("#etranslate-currency_language-arrow-currency-img"),Q=s.getElementsByClassName("etranslate-change-button")[0],ee=s.getElementsByClassName("etranslate-selector-cancel")[0],te=s.querySelector(".etranslate-currency-selector-label"),ne=s.querySelector(".etranslate-language-selector-label"),oe=s.getElementsByClassName("split-line")[0];oe&&(oe.innerHTML=S||"/");var ae=c.global.language_flags;if(-1!=Etranslate.multiLanguage.indexOf(r.toLowerCase())){var le=Etranslate.selectorMultiLanguageText[r.toLowerCase()];Q.innerHTML=le.change,ee.innerHTML=le.cancel,te.innerHTML=le.currency,ne.innerHTML=le.language}var re=s.querySelector(".etranslate-selector-content");i&&re.setAttribute("style","max-width: 328px"),c.rm_logo;var se=setLanguageCurrencyPopupSelectorStyle(c,i),ce=findCurrencyFlags(a.country),ie=findLanguageFlags(ae,r).toLowerCase();s.setAttribute("style",se);var de=z.getElementsByClassName("select-dropdown-flag-icon")[0],ue=z.getElementsByClassName("select-dropdown-flag-icon")[1],ge=G.getElementsByClassName("select-dropdown-flag-icon")[0],ye=J.getElementsByClassName("select-dropdown-flag-icon")[0];let pe="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==x?"1x1":"4x3");de.style.backgroundImage="url("+pe+"/"+ce.toLowerCase()+".svg)","circle_flag"===x?de.classList.add("circle_flag"):de.classList.remove("circle_flag");let me="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==b?"1x1":"4x3");ue.style.backgroundImage="url("+me+"/"+ie.toLowerCase()+".svg)","circle_flag"===b?ue.classList.add("circle_flag"):ue.classList.remove("circle_flag");let _e="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3");ge.style.backgroundImage="url("+_e+"/"+ie.toLowerCase()+".svg)","circle_flag"===d?ge.classList.add("circle_flag"):ge.classList.remove("circle_flag");let be="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==N?"1x1":"4x3");var fe;ye.style.backgroundImage="url("+be+"/"+ce.toLowerCase()+".svg)","circle_flag"===N?ye.classList.add("circle_flag"):ye.classList.remove("circle_flag"),"table"===K.style.display?K.setAttribute("style","width:"+g+";background-color:"+F+";opacity:1;display:table"):K.setAttribute("style","width:"+g+";background-color:"+F+";max-height:0px;opacity:0;display:none"),re.setAttribute("style","background-color:"+F),Y.getBoundingClientRect().height>0?Y.setAttribute("style","width:"+g+";background-color:"+M+";color:"+O+";max-height:230px;opacity:1;display:block"):Y.setAttribute("style","width:"+g+";background-color:"+M+";color:"+O+";max-height:0px;opacity:0;display:none"),X.getBoundingClientRect().height>0?X.setAttribute("style","width:"+g+";background-color:"+M+";color:"+O+";max-height:230px;opacity:1;display:block"):X.setAttribute("style","width:"+g+";background-color:"+M+";color:"+O+";max-height:0px;opacity:0;display:none"),G.setAttribute("style","background-color:"+M+";color:"+O),J.setAttribute("style","background-color:"+M+";color:"+O),Q.setAttribute("style","background-color:"+R+";color:"+H),ee.setAttribute("style","color:"+I),ne.setAttribute("style","color:"+B),te.setAttribute("style","color:"+B),s.style.borderRadius=m,G.style.borderRadius=m,J.style.borderRadius=m,re.style.borderRadius=m,Y.style.borderRadius=m,X.style.borderRadius=m,Q.style.borderRadius=m,z.style.borderRadius=m,fe=i?"AUTO"===c.mobile.style.auto_selector_width[0]:"AUTO"===c.desktop.style.auto_selector_width[0];var he=setLanguageCurrencyPopupSelectorWidth("float",c,i);z.style.width=fe?"auto":he+"px",z.style.borderWidth=y+"px",K.style.borderWidth=y+"px",Y.style.width="inherit",X.style.width="inherit",changeArrow(p,isOpen),changeArrow(p,Ge,Z,O),changeArrow(p,Je,V,O),changeButtonIcon();for(var we=Y.children,Ce=0;Ce{t.currency_iso_code===l&&t.iso_code===r.toUpperCase()&&(e=r)})),d.value=e||t[l],u=!0}else y!==o.code&&t[o.code]?(d.value=t[o.code],u=!0):etranslateCurrency(beforeCurrency,a);else a.code===o.code&&(d.value=t[o.code],u=!0);if(u&&window.top===window.self)c.submit();else{judgeCurrencyLabel($,De,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code}),judgeCurrencyLabel(j,Fe,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code});var m=findCurrencyFlags(a.country);de.style.backgroundImage="url("+W+"/"+m+".svg)",beforeCurrency=a,Ye()}changeArrow(p,isOpen),changeArrow(p,Ge,Z,O),changeArrow(p,Je,V,O)})),s.style.zIndex="999",s}function createLanguageCurrencyEmbeddedPopupSelector(e,t,n,o,a,l,r,s,c,i){var d,u,g,y;let p,m,_,b,f,h,w,C,E,k,L,x,v,N,S,T,B,A,M,O,R,H,I,F,D,U,P,q;if(i)switch(F=c.mobile.content.sort_list,D=c.mobile.content.bar_sort_list,f=c.mobile.content.bar_flags_type_show,h=c.mobile.content.bar_labels_type_show,p=c.mobile.content.flags_type_show,m=c.mobile.content.flags_type,_=c.mobile.content.labels_type_show,b=c.mobile.content.labels_type,x=c.mobile.content.bar_currency_flags_type,w=c.mobile.content.bar_currency_flags_type_show,C=c.mobile.content.bar_currency_labels_type_show,E=c.mobile.content.currency_flags_type_show,k=c.mobile.content.currency_flags_type,L=c.mobile.content.currency_labels_type_show,c.mobile.content.currency_labels_type,v=c.mobile.content.separator,N=c.mobile.style.popup_background_color,S=c.mobile.style.popup_font_color,T=c.mobile.style.popup_background_opacity,H=transformationRgb(N,T),B=c.mobile.style.popup_select_background_color,A=c.mobile.style.popup_select_font_color,M=c.mobile.style.popup_primary_background_color,O=c.mobile.style.popup_primary_font_color,R=c.mobile.style.popup_second_font_color,I=c.mobile.content.selector_type,U=c.mobile.content.separator_show,d=c.mobile.content.bar_flags_type,u=c.mobile.content.bar_labels_type,transformationRgb(c.mobile.style.background_color,c.mobile.style.background_opacity),c.mobile.content.bar_currency_labels_type,g=c.mobile.content.arrow,P=c.mobile.content.currency_labels_type_obj,q=c.mobile.content.bar_currency_labels_type_obj,c.mobile.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(c.mobile.style.border[1]||0)+"px"}else switch(F=c.desktop.content.sort_list,D=c.desktop.content.bar_sort_list,f=c.desktop.content.bar_flags_type_show,h=c.desktop.content.bar_labels_type_show,p=c.desktop.content.flags_type_show,m=c.desktop.content.flags_type,_=c.desktop.content.labels_type_show,b=c.desktop.content.labels_type,w=c.desktop.content.bar_currency_flags_type_show,C=c.desktop.content.bar_currency_labels_type_show,x=c.desktop.content.bar_currency_flags_type,E=c.desktop.content.currency_flags_type_show,k=c.desktop.content.currency_flags_type,L=c.desktop.content.currency_labels_type_show,c.desktop.content.currency_labels_type,v=c.desktop.content.separator,N=c.desktop.style.popup_background_color,S=c.desktop.style.popup_font_color,T=c.desktop.style.popup_background_opacity,H=transformationRgb(N,T),B=c.desktop.style.popup_select_background_color,A=c.desktop.style.popup_select_font_color,M=c.desktop.style.popup_primary_background_color,O=c.desktop.style.popup_primary_font_color,R=c.desktop.style.popup_second_font_color,I=c.desktop.content.selector_type,U=c.desktop.content.separator_show,d=c.desktop.content.bar_flags_type,u=c.desktop.content.bar_labels_type,transformationRgb(c.desktop.style.background_color,c.desktop.style.background_opacity),c.desktop.content.bar_currency_labels_type,g=c.desktop.content.arrow,P=c.desktop.content.currency_labels_type_obj,q=c.desktop.content.bar_currency_labels_type_obj,c.desktop.style.border[0]){case"SQUARE":y=0;break;case"ROUNDED":y="4px";break;case"CUSTOM":y=(c.desktop.style.border[1]||0)+"px"}var j="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3"),$=s.getElementsByClassName("split-line")[0];$&&($.innerHTML=v||"/");var W=s.getElementsByClassName("etranslate-selector-list-button")[0],z=s.getElementsByClassName("etranslate-language-selector-button")[0],G=s.getElementsByClassName("etranslate-currency-selector-button")[0],J=s.getElementsByClassName("etranslate-selector-list-dropdown")[0],K=s.getElementsByClassName("etranslate-language-dropdown")[0],Y=s.getElementsByClassName("etranslate-currency-dropdown")[0],X=document.querySelectorAll("#etranslate-currency_language-arrow-language-img"),Z=document.querySelectorAll("#etranslate-currency_language-arrow-currency-img"),V=s.getElementsByClassName("etranslate-change-button")[0],Q=s.getElementsByClassName("etranslate-selector-cancel")[0],ee=s.querySelector(".etranslate-currency-selector-label"),te=s.querySelector(".etranslate-language-selector-label"),ne=c.global.language_flags;if(-1!=Etranslate.multiLanguage.indexOf(r.toLowerCase())){var oe=Etranslate.selectorMultiLanguageText[r.toLowerCase()];V.innerHTML=oe.change,Q.innerHTML=oe.cancel,ee.innerHTML=oe.currency,te.innerHTML=oe.language}var ae=s.querySelector(".etranslate-selector-content");i&&ae.setAttribute("style","max-width: 328px"),c.rm_logo;var le=setLanguageCurrencyPopupEmbeddedSelectorStyle(c,i),re=findCurrencyFlags(a.country),se=findLanguageFlags(ne,r).toLowerCase();s.setAttribute("style",le);var ce=W.getElementsByClassName("select-dropdown-flag-icon")[0],ie=W.getElementsByClassName("select-dropdown-flag-icon")[1],de=z.getElementsByClassName("select-dropdown-flag-icon")[0],ue=G.getElementsByClassName("select-dropdown-flag-icon")[0];let ge="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==k?"1x1":"4x3");ce.style.backgroundImage="url("+ge+"/"+re.toLowerCase()+".svg)","circle_flag"===k?ce.classList.add("circle_flag"):ce.classList.remove("circle_flag");let ye="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==m?"1x1":"4x3");ie.style.backgroundImage="url("+ye+"/"+se.toLowerCase()+".svg)","circle_flag"===m?ie.classList.add("circle_flag"):ie.classList.remove("circle_flag");let pe="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==d?"1x1":"4x3");de.style.backgroundImage="url("+pe+"/"+se.toLowerCase()+".svg)","circle_flag"===d?de.classList.add("circle_flag"):de.classList.remove("circle_flag");let me="https://my.parcelpanel.com/assets/other/flags/"+("rectangle_flag"!==x?"1x1":"4x3");var _e;ue.style.backgroundImage="url("+me+"/"+re.toLowerCase()+".svg)","circle_flag"===x?ue.classList.add("circle_flag"):ue.classList.remove("circle_flag"),"table"===J.style.display?J.setAttribute("style","background-color:"+H+";opacity:1;display:table"):J.setAttribute("style","background-color:"+H+";max-height:0px;opacity:0;display:none"),ae.setAttribute("style","background-color:"+H),K.getBoundingClientRect().height>0?K.setAttribute("style","background-color:"+B+";color:"+A+";max-height:230px;opacity:1;display:block"):K.setAttribute("style","background-color:"+B+";color:"+A+";max-height:0px;opacity:0;display:none"),Y.getBoundingClientRect().height>0?Y.setAttribute("style","background-color:"+B+";color:"+A+";max-height:230px;opacity:1;display:block"):Y.setAttribute("style","background-color:"+B+";color:"+A+";max-height:0px;opacity:0;display:none"),z.setAttribute("style","background-color:"+B+";color:"+A),G.setAttribute("style","background-color:"+B+";color:"+A),V.setAttribute("style","background-color:"+M+";color:"+O),Q.setAttribute("style","color:"+R),te.setAttribute("style","color:"+S),ee.setAttribute("style","color:"+S),s.style.borderRadius=y,z.style.borderRadius=y,G.style.borderRadius=y,ae.style.borderRadius=y,K.style.borderRadius=y,Y.style.borderRadius=y,V.style.borderRadius=y,_e=i?"AUTO"===c.mobile.style.auto_selector_width[0]:"AUTO"===c.desktop.style.auto_selector_width[0];var be=setLanguageCurrencyPopupSelectorWidth("embedded",c,i);W.style.width=_e?"auto":be+"px",W.style.border="0 solid rgba(224, 224, 224, 1)",K.style.width="inherit",Y.style.width="inherit",changeArrow(g,isOpen),changeArrow(g,We,X,A),changeArrow(g,ze,Z,A),changeButtonIcon();for(var fe=K.children,he=0;he{t.currency_iso_code===l&&t.iso_code===r.toUpperCase()&&(e=r)})),d.value=e||t[l],u=!0}else p!==o.code&&t[o.code]?(d.value=t[o.code],u=!0):etranslateCurrency(beforeCurrency,a);else a.code===o.code&&(d.value=t[o.code],u=!0);if(u&&window.top===window.self)c.submit();else{judgeCurrencyLabel(q,Ie,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code}),judgeCurrencyLabel(P,He,{currency:a.currency,currency_symbol:a.currency_symbol,code:a.code});var m=findCurrencyFlags(a.country);ce.style.backgroundImage="url("+j+"/"+m+".svg)",beforeCurrency=a,Je()}changeArrow(g,isOpen),changeArrow(g,We,X,A),changeArrow(g,ze,Z,A)})),s.style.zIndex="999",s}function setLanguageCurrencyPopupSelector(e){let t={},n=[];const o=JSON.parse(document.getElementById("shopify_supported_currencies").textContent.trim());let a={};const l=document.getElementById("localization_country_iso_code").textContent;o.forEach((e=>{e.iso_code===l&&(a[e.currency_iso_code]=e.iso_code),t[e.currency_iso_code]=e.iso_code,n.push(e.currency_iso_code)})),t=Object.assign({},t,a);let r=document.getElementById("localization_country_currency_iso_code").textContent;const s=document.querySelector("#shop_currency").textContent;let c=getLanguageList(),i=document.querySelector("#language_iso_code").textContent,d=document.getElementById("etranslate-language_currency-popup-selector-theme2"),u=localStorage.getItem("currentCurrency");null===u?u=r:(u!==r&&-1!=n.indexOf(u)||r!==s&&-1==n.indexOf(u)&&-1==n.indexOf(r))&&(u=r,localStorage.setItem("currentCurrency",r));let g=[],y=[];e.user_currencies_data&&e.user_currencies_data.forEach((e=>(e.exchange_rate=Number(e.exchange_rate),0!==e.exchange_rate&&(EtranslateCurrency.rates[e.code]=EtranslateCurrency.rates[s]/e.exchange_rate),e.code===u&&(g=e),e.code===s&&(y=e),""))),g.length<=0&&(g=y),beforeCurrency=g;let p=isMobile();if(1!==Number(e.status)||"pop_up"!==e.mobile.content.style_of_the_selector&&"pop_up"!==e.desktop.content.style_of_the_selector)d&&(window.top===window.self?d.remove():d.style.display="none");else{const o=document.getElementById("etranslate-language_currency-popup-selector-theme2");let a,l;const s=(t,n)=>{if(window.top!==window.self&&e.switcher){let r,s,c,i,d,u=!1,g=0,y=null;function m(e){let t=e;for(;t.parentNode;){const e=["a"];if(t.parentNode.tagName&&e.includes(t.parentNode.tagName.toLowerCase()))return t.parentNode;t=t.parentNode}return null}a=e=>{firstTime=(new Date).getTime(),e.preventDefault(),r=e.clientX-o.getBoundingClientRect().left,s=e.clientY-o.getBoundingClientRect().top,u=!0,document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp),document.addEventListener("mousemove",EtranslateOnMouseMove),document.addEventListener("mouseup",EtranslateOnMouseUp)},l=e=>{firstTime=(new Date).getTime(),y=e.currentTarget||etranslateCurrencyDom,r=e.clientX-y.getBoundingClientRect().left,s=e.clientY-y.getBoundingClientRect().top,document.removeEventListener("mousemove",window.EtranslateOnMouseMove),document.removeEventListener("mouseup",window.EtranslateOnMouseUp),document.addEventListener("mousemove",EtranslateOnEmbedMouseMove),document.addEventListener("mouseup",EtranslateOnEmbedMouseUp)},o.removeEventListener("mousedown",a),o.removeEventListener("mousedown",l),t?o.addEventListener("mousedown",l):o.addEventListener("mousedown",a),window.EtranslateOnMouseMove=e=>{if(u){const t=e.clientX-r,a=e.clientY-s,l=window.innerWidth-o.clientWidth,u=window.innerHeight-o.clientHeight;c=Math.min(l,Math.max(0,t)),i=Math.min(u,Math.max(0,a))+(n?0:Math.max(window.scrollY||window.pageYOffset,document.documentElement.scrollTop||document.body.scrollTop)),d=document.documentElement.clientWidth-c-o.clientWidth,g=document.documentElement.clientHeight-i-o.clientHeight,o.style.left=c+"px",o.style.right="auto",o.style.bottom="auto",o.style.top=i+"px"}},window.EtranslateOnMouseUp=e=>{if(lastTime=(new Date).getTime(),lastTime-firstTime<200&&(flag=!0),u=!1,i&&i){const e=c>d?"right":"left";c=c>d?d:c;const t=g{let t=document.elementFromPoint(e.clientX,e.clientY);if(t&&t.parentNode&&!t.classList.contains("draggable"))try{let n=m(t);n&&(t=n),e.clientX>t.getBoundingClientRect().left+40||e.clientY>t.getBoundingClientRect().top+40?t.parentNode.insertBefore(y,t.nextSibling):t.parentNode.insertBefore(y,t)}catch(e){}},window.EtranslateOnEmbedMouseUp=e=>{lastTime=(new Date).getTime(),lastTime-firstTime<200&&(flag=!0),document.removeEventListener("mousemove",window.EtranslateOnEmbedMouseMove),document.removeEventListener("mouseup",window.EtranslateOnEmbedMouseUp);const t=generateSelectorWithPriority(y),n=getElementPosition(y);window.parent.postMessage({et:{type:"dragger_embed",value:t,is_mobile:p}},"*"),window.parent.postMessage({et:{type:"dragger_embed_index",value:n,is_mobile:p}},"*")}}};if(p)if("pop_up"===e.mobile.content.style_of_the_selector){if("floating_selector"===e.mobile.content.choose_language_selector)document.body.appendChild(d),d.classList.add("etranslate-floating-selectorList"),d.classList.remove("etranslate-embedded-selectorList"),createLanguageCurrencyFloatPopupSelector(n,t,c,y,g,u,i,d,e,p),s(!1,e.mobile.content.fixed);else if("embedded_selector"===e.mobile.content.choose_language_selector){if(d.classList.add("etranslate-embedded-selectorList"),d.classList.remove("etranslate-floating-selectorList"),createLanguageCurrencyEmbeddedPopupSelector(n,t,c,y,g,u,i,d,e,p),e.mobile.style.custom_js&&e.mobile.style.custom_js.trim()&&e.mobile.style.custom_js.trim().length>50)try{evalJS(e.mobile.style.custom_js.trim())(d,p)}catch(t){console.log(t);const n=e.mobile.content.embed_place,o=e.mobile.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?e.insertBefore(d,e.children[o]):e.appendChild(d)}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else{const t=e.mobile.content.embed_place,n=e.mobile.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?e.insertBefore(d,e.children[n]):e.appendChild(d)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}s(!0,e.mobile.content.fixed)}applyPriviewCssCode(e.mobile.style.css_code);let o=d.querySelector("form"),a=d.querySelector('input[name="country_code"]');if(-1!=window.location.search.indexOf("?preview_key")){d.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}r!==g.code&&window.top===window.self&&(-1!=n.indexOf(g.code)?(a.value=t[g.code],o.submit()):r!==y.code&&t[y.code]?(a.value=t[y.code],o.submit()):etranslateCurrency(y,g))}else d&&(window.top===window.self?d.remove():d.style.display="none");else if("pop_up"===e.desktop.content.style_of_the_selector){if("floating_selector"===e.desktop.content.choose_language_selector)document.body.appendChild(d),d.classList.add("etranslate-floating-selectorList"),d.classList.remove("etranslate-embedded-selectorList"),createLanguageCurrencyFloatPopupSelector(n,t,c,y,g,u,i,d,e,p),s(!1,e.desktop.content.fixed);else if("embedded_selector"===e.desktop.content.choose_language_selector){if(d.classList.add("etranslate-embedded-selectorList"),d.classList.remove("etranslate-floating-selectorList"),createLanguageCurrencyEmbeddedPopupSelector(n,t,c,y,g,u,i,d,e,p),e.desktop.style.custom_js&&e.desktop.style.custom_js.trim()&&e.desktop.style.custom_js.trim().length>50)try{evalJS(e.desktop.style.custom_js.trim())(d,p)}catch(t){console.log(t);const n=e.desktop.content.embed_place,o=e.desktop.content.embed_place_index;if(n){const e=document.querySelector(n);e.children&&e.children.length>0?e.insertBefore(d,e.children[o]):e.appendChild(d)}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else{const t=e.desktop.content.embed_place,n=e.desktop.content.embed_place_index;if(t)try{const e=document.querySelector(t);e.children&&e.children.length>0?e.insertBefore(d,e.children[n]):e.appendChild(d)}catch(e){try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}else try{Etranslate.setEmbeddedSelectorPosition(d,p)}catch(e){console.log(e)}}s(!0,e.desktop.content.fixed)}applyPriviewCssCode(e.desktop.style.css_code);let o=d.querySelector("form"),a=d.querySelector('input[name="country_code"]');if(-1!=window.location.search.indexOf("?preview_key")){d.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}r!==g.code&&window.top===window.self&&(-1!=n.indexOf(g.code)?(a.value=t[g.code],o.submit()):r!==y.code&&t[y.code]?(a.value=t[y.code],o.submit()):etranslateCurrency(y,g))}else d&&(window.top===window.self?d.remove():d.style.display="none")}}function changeLanguageList(e){document.querySelectorAll("#etranslate-language-list-dropdown").forEach((t=>{t.innerHTML="",e.forEach((e=>{const n=document.createElement("li");n.setAttribute("data-code",e.iso_code),n.setAttribute("data-name",e.endonym_name),n.className="etranslate-lo-select-dropdown-item",n.innerHTML=`
\n \n
\n\n
\n ${e.name}\n
`,t.appendChild(n)}))}));document.querySelectorAll("#embed-etranslate-language-list-dropdown").forEach((t=>{t.innerHTML="",e.forEach((e=>{const n=document.createElement("li");n.setAttribute("data-code",e.iso_code),n.setAttribute("data-name",e.endonym_name),n.className="embed-etranslate-lo-select-dropdown-item",n.innerHTML=`
\n \n
\n\n
\n ${e.name}\n
`,t.appendChild(n)}))}));document.querySelectorAll("#etranslate-language-list-link").forEach((t=>{t.innerHTML="",e.forEach(((n,o)=>{const a=document.createElement("li");if(a.setAttribute("data-code",n.iso_code),a.setAttribute("data-name",n.endonym_name),a.className="etranslate-language-list-link-li",a.innerHTML="",t.appendChild(a),o{t.innerHTML="",e.forEach(((e,n)=>{const o=document.createElement("li");o.setAttribute("data-code",e.iso_code),o.setAttribute("data-name",e.endonym_name),o.className="etranslate-selector-dropdown-item",o.innerHTML=`
\n \n
\n
${e.name}
`,t.appendChild(o)}))}))}function merchantApiBase(){return"https://merchant.langwill.com"}function merchantApiUrl(e){const t=e.startsWith("/")?e:`/${e}`;return`${merchantApiBase()}${t}`}function imgTranslate(){let e=/_(\{width\}x*|{width}x{height}|[0-9]+x|x[0-9]+|[0-9]+x[0-9]+|pinco|icon|thumb|small|compact|medium|large|grande|original|master)(_crop_\w+)*(@[2-3]x)*\./i;const t={attributeFilter:["src","srcset"]},n=new MutationObserver((function(e){i()}));function o(e){return e.trim().toLocaleLowerCase().replace("https:","")}function a(e){return e.trim().toLocaleLowerCase().replace("shopifycdn.net","shopify.com")}function l(e){return e.trim().substring(e.trim().lastIndexOf("/"))}function r(e,t){e.setAttribute("data-src",t),e.setAttribute("src",t)}function s(e,t){e.setAttribute("data-srcset",t),e.setAttribute("srcset",t)}function c(t,n,c,i,d,u,g){let y=[],p=a(o(n.split("?")[0]));p=n.match(e)?p.replace(n.match(e)[0],"."):p;let m,_,b="",f="",h="",w="",C="",E=l(p);if(t&&(b=a(o(t.split("?")[0])),h=t.match(e)?b.replace(t.match(e)[0],"."):b,w=l(h)),u&&(m=u.split(",").map((function(e){let t=e.trim().split(" "),n=t[0].split("?");return{url:n[0],width:n[1],size:t[1]}})),_=m[0].url,f=a(_.match(e)?_.replace(_.match(e)[0],"."):_),C=l(f)),h===p||f===p||w&&w===E||C&&C===E)if(c)for(let e=0;e0){const t=merchantApiUrl("/api/v3/merchant/getReplaceImages"),n=new XMLHttpRequest,o=[];e.forEach((e=>{const t={};t.type=e.type,t.id=e.id,t.index=e.index,o.push(t)}));const a={locale:window.Shopify.locale,source_url:o,ori_href:window.location.href};n.open("post",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),n.onreadystatechange=function(){if(4===n.readyState&&200===n.status){const t=JSON.parse(n.responseText).data;t.replace_url&&e.forEach((e=>{t.replace_url[e.index]&&(e.img_dome.getAttribute("xlink:href")&&e.img_dome.setAttribute("xlink:href",t.replace_url[e.index]),r(e.img_dome,t.replace_url[e.index]),s(e.img_dome,t.replace_url[e.index]))}))}},n.send(JSON.stringify(a))}}document.addEventListener&&document.addEventListener("DOMMouseScroll",u),window.onmousewheel=document.onmousewheel=u,document.addEventListener("touchstart",u,!1);let d=null;function u(){d&&(window.clearTimeout(d),d=null),d=setTimeout(i,1e3)}if("red-moringa.myshopify.com"===window.Shopify.shop){const e=document.querySelector(".pswp__scroll-wrap"),t=debounce(i,500);if(e){new MutationObserver((function(e){for(const n of e)"childList"!==n.type&&"characterData"!==n.type||t()})).observe(e,{childList:!0,subtree:!0,characterData:!0})}}function g(e){return function(){localStorage.setItem("lan_code",e)}}documentReady(i),documentReady((function(){let e=document.getElementsByTagName("a"),t=getLanguageList(),n=t.find((function(e){return e.primary})),o=n?n.iso_code:"en";!function(e,t){let n=window.location.pathname.split("/").filter((function(e){return e}));n&&n.length>0&&e.find((function(e){return e.iso_code.toLowerCase()===n[0].toLowerCase()}))&&n[0]}(t);let a=window.location.pathname,l=(a.match(/\/(\S*?)\//)||a.match(/\/(\S*)/))[1],r="";for(let n=0;n{t.iso_code.toLowerCase().includes(l.toLowerCase())&&(e=!0)})),c=e?a.replace(l,r):"/"+r+a,"/"!==c[0]&&(c="/"+c)}let s=`${window.location.protocol}//${window.location.host}${c}${window.location.search}`;e[n].setAttribute("href",s),e[n].setAttribute("data-lancode",r)}}}!function(){let e=document.getElementsByTagName("a");for(let t=0;t{e.setAttribute("translate","no")})),document.documentElement.removeAttribute("translate"),window.et_translate_script||(window.et_translate_script=document.createElement("script"),et_translate_script.src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2",et_translate_script.onload=function(){window.doETranslate(e)},document.body.appendChild(et_translate_script))}}}function o(e,t){try{if(document.createEventObject){var n=document.createEventObject();e.fireEvent("on"+t,n)}else{(n=document.createEvent("HTMLEvents")).initEvent(t,!0,!0),e.dispatchEvent(n)}}catch(e){}}window.doETranslate=function(e){var t;"he"===e&&(e="iw"),e.includes("pt")&&(e="pt"),"nb"!==e&&"nn"!==e||(e="no");for(var n=document.getElementsByTagName("select"),a=0;ae.trim())):[]}var listenDom=function(e){elementContent=[],elementTransDom=[];const t=["SCRIPT","STYLE","NOSCRIPT","IFRAME"];e.forEach((function(e,n){if("childList"==e.type&&0!=e.addedNodes.length&&getElementContent(e.addedNodes),"characterData"===e.type){if(e.target.parentNode&&e.target.parentNode.nodeName&&t.includes(e.target.parentNode.nodeName))return;getElementContent([e.target])}})),""!=elementContent&&translateElement(elementContent,elementTransDom)},noExistDomList=[],listenNoexistDom=function(e){let t=[],n=[];e.forEach((function(e,o){"childList"==e.type&&0!=e.addedNodes.length&&noExistDomList.forEach((function(o){if("."+e.target.className==o||"#"+e.target.id==o)e.target.shadowRoot&&e.target.shadowRoot.childNodes.length>0?(elementContent=[],elementTransDom=[],getElementContent(e.shadowRoot.childNodes),listenElementContent(e.shadowRoot.childNodes),""!=elementContent&&(t=t.concat(elementContent),n=n.concat(elementTransDom))):(elementContent=[],elementTransDom=[],getElementContent(e.nextSibling.childNodes),listenElementContent(e.target),""!=elementContent&&(t=t.concat(elementContent),n=n.concat(elementTransDom)));else for(var a=0;a0?(elementContent=[],elementTransDom=[],getElementContent(e.addedNodes[a].shadowRoot.childNodes),listenElementContent(e.addedNodes[a].shadowRoot.childNodes),""!=elementContent&&(t=t.concat(elementContent),n=n.concat(elementTransDom))):(elementContent=[],elementTransDom=[],getElementContent(e.addedNodes[a].childNodes),listenElementContent(e.addedNodes[a]),""!=elementContent&&(t=t.concat(elementContent),n=n.concat(elementTransDom)));else{let l=e.addedNodes[a].querySelectorAll(o);l.length>0&&(elementContent=[],elementTransDom=[],getElementContent(l),listenElementContent(l),""!=elementContent&&(t=t.concat(elementContent),n=n.concat(elementTransDom)))}}))})),""!=t&&translateElement(t,n)};const observer=new MutationObserver(listenDom),listenBody=new MutationObserver(listenNoexistDom);function getElementContent(e){for(var t=0;te[t].parentNode&&e[t].parentNode.className&&e[t].parentNode.className.includes(n))).length>0)&&!(e[t].parentNode&&e[t].parentNode.className&&(e[t].parentNode.className.toString().includes("etranslate")||e[t].parentNode.className.toString().includes("etrans-money")||e[t].parentNode.className.toString().includes("langwill-money")))){if(1==e[t].nodeType&&"STYLE"!==e[t].nodeName&&!o.includes(e[t].className))try{if(e[t].className&&e[t].className.includes("etranslate"));else{if(e[t].shadowRoot&&e[t].shadowRoot.childNodes.length>0)for(let n=0;n{Number(e[o])>=0&&(delete e[o],delete t[o])})),n[0]=e.filter((e=>void 0!==typeof e)),n[1]=t.filter((e=>void 0!==typeof e)),n}function chunkArray(e,t){const n=[];for(let o=0;o{e&&allTransData[e]?1===a[t].t?a[t].d.setAttribute("placeholder",allTransData[e]):3===a[t].t?a[t].d.prevText!==allTransData[e]&&a[t].d.textContent!==a[t].d.prevText&&(a[t].d.textContent=allTransData[e],a[t].d.prevText=allTransData[e]):8===a[t].t&&(a[t].d.attributes.value.value=allTransData[e]):(l.push(e),r.push(a[t]))})),e=chunkArray(l,100),t=chunkArray(r,100),""!=e&&e.forEach(((e,n)=>{let o=new XMLHttpRequest;document.getElementById("shop_permanent_domain").textContent;let a=document.getElementById("shop_locale").textContent;const l=merchantApiUrl("/api/v3/merchant/postPageElementsDynamic");let r={lan_code:a,request_url:window.location.origin+window.location.pathname,element_content:e};o.open("post",l),o.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),o.setRequestHeader("Content-Type","application/json"),o.onreadystatechange=function(){if(4===o.readyState&&200===o.status){var e=o.response;if(""!=e&&0===JSON.parse(e).code){let o=JSON.parse(e).data.element_content;for(var a=0;a0?(getElementContent(elementDom),listenElementContent(elementDom)):(listenBody.observe(document.body,config),noExistDomList.push(elementName))}catch(e){console.log("Etranslate error::"+e)}})),translateElement(elementContent,elementTransDom)}function dynamicText(e){let t=e,n=document.querySelector("#shop_locale").textContent;const o={characterData:!0,childList:!0,subtree:!0};let a=[];function l(e){if(Array.isArray(e)){let t=0,n=[],o=e.length;for(t=0,n=Array(o);t{a=[].concat(l(a),l(e)),clearTimeout(r),r=setTimeout((()=>{d(),c(document.body),i(document.body)}),0)}));function c(e){if(e){let o=e.getElementsByTagName("input");t.forEach((e=>{e.lan_code==n&&setTimeout((()=>{!function(e,t){let n=t.original_text.trim(),o=t.translate_text;for(var a=0;a{e.lan_code==n&&setTimeout((()=>{!function(e,t){let n=t.original_text.trim(),o=t.translate_text;for(var a=0;a{let o=e.addedNodes;if("childList"===e.type&&o.length&&t.forEach((e=>{e.lan_code==n&&setTimeout((()=>{g(o,e)}),0)})),"characterData"===e.type){let o=[e.target];t.forEach((e=>{e.lan_code==n&&setTimeout((()=>{g(o,e)}),0)}))}})),a=[],u()}function u(){s.observe(document.body,o)}function g(e,t){let n=t.original_text.trim(),o=t.translate_text,a=e,l=a.length;const r=["SCRIPT","STYLE","NOSCRIPT","IFRAME"];for(let e=0;e0)for(let n=0;n{let e=document.body;e.innerHTML,t.forEach((t=>{t.lan_code==n&&setTimeout((()=>{g([e],t)}),0)})),d(),c(),i()}),500))}function EtranslateLanguageUrlRedirect(e){let t,n=document.querySelector("#shop_locale").textContent,o=document.querySelector(".etranslate_redirect"),a=o.querySelector(".shopify-localization-form"),l=isMobile();function r(e,t){for(let n=0;n=0){let o=e?e.split("?")[1]:"",a=o?o.split("=")[1]:"";a&&a!=t&&n.setAttribute("action",e.replace(a,t))}else if(e.indexOf("/"+t+"/")<0){let o=e?e.split("?")[1]:"";o&&o.split("=")[1],n.setAttribute("action","/"+t+e)}}}(),function(){if(-1!=window.location.search.indexOf("?preview_key")){o.querySelector('input[name="return_to"]').value=window.location.pathname+window.location.search}}(),window.top!==window.self||function(){if(1!==Number(e.status))return!1;if(!c())return!1;if(-1!==window.location.search.indexOf("?unpulic_preview")||-1!==window.location.search.indexOf("?preview"))return!1;if(/oseid=/.test(window.location.href))return!1;const t=s();if(!t||t===String(n).toLowerCase())return!1;if(!r(t,y))return!1;const a=o.querySelector(".shopify-localization-form"),l=o.querySelector('input[name="language_code"]');return!(!a||!l)&&(l.value=t,d(a),!0)}()||async function(){let l=!1,i=(navigator.language||navigator.browserLanguage).toLowerCase();const u=i.split("-");let g=RegExp(/oseid=/),p="",m="",_="";const b=merchantApiUrl("/api/v3/merchant/getCountryCurrency"),f=merchantApiUrl("/api/v3/merchant/getStorePermissions");let h=[];function w(e){if(!l)return!1;const t=e.querySelector('input[name="language_code"]'),n=t&&t.value?String(t.value).toLowerCase():null,o=s();return c()&&null!==o&&null!==n&&o!==n?(l=!1,!1):(d(e),!0)}function C(e){const t=e.querySelector('input[name="language_code"]'),o=t&&t.value?String(t.value).toLowerCase():String(n).toLowerCase(),a=String(n).toLowerCase(),l=s();return!(o!==a||function(){try{const e=Number(sessionStorage.getItem("lan_code_manual_at")||0);return e>0&&Date.now()-e<1e4}catch(e){return!1}}()&&null!==l&&l!==a||(d(e),0))}const E=new XMLHttpRequest;E.open("GET",f),E.setRequestHeader("Content-Type","application/json"),E.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),E.onreadystatechange=async()=>{if(4===E.readyState&&200===E.status){const s=JSON.parse(E.responseText).data;if(h=s.plan_access,1===Number(e.status)&&"currency"!==t&&1===Number(e.global.auto_switch_location_language)&&h.includes("ACCESS_LANGUAGE_AUTO_SWITCH_01")&&!g.exec(window.location)&&!c()&&-1==window.location.search.indexOf("?unpulic_preview")&&-1==window.location.search.indexOf("?preview")){let k=o.querySelector('input[name="language_code"]'),L=null;r(i,y)?L=i:r(u[0],y)&&(L=u[0]),L&&L!==n.toLowerCase()&&(k.value=L,l=!0)}const d=1===Number(e.status)&&1===Number(e.global.auto_switch_location_language_ip)&&!c(),f=1===Number(e.status)&&1===Number(e.global.auto_switch_location_currency)&&null===localStorage.getItem("currentCurrency");if(d||f){const x=await function(e){return fetch(e,{referrer:"",referrerPolicy:"no-referrer"}).then((e=>e.text()))}("https://www.cloudflare.com/cdn-cgi/trace?v="+Math.random());let v=/ip=([0-9]{1,3}(?:\.[0-9]{1,3}){3}|[a-fA-F0-9:]+)/,N=x.split("\n").find((e=>e.startsWith("ip="))).match(v)[1];function S(e){return new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET","https://ipapi.co/"+e+"/json/",!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?t(JSON.parse(o.responseText)):n(new Error("ipapi.co 请求失败")))},o.send()}))}function T(e){return new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET","https://api.ipgeolocation.io/ipgeo?apiKey=fd4f682d16f34168a587c19fc86dffc4&ip="+e,!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?t(JSON.parse(o.responseText)):n(new Error("api.ipgeolocation.io 请求失败")))},o.send()}))}function B(e){return new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET","https://free.freeipapi.com/api/json/"+e,!0),o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status){const e=JSON.parse(o.responseText);e.languages=e.languages.join(","),e.country_name=e.countryName,t(e)}else n(new Error("api.ipgeolocation.io 请求失败"))},o.send()}))}function A(e){return new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET","https://api.geoapify.com/v1/ipinfo?&apiKey=668d0214bf8948d49763e1dd707f3859&ip="+e,!0),o.onreadystatechange=function(){if(4===o.readyState&&200===o.status){const e=JSON.parse(o.responseText);e.languages=e.country.languages.map((e=>e.iso_code)).join(","),e.country_name=e.country.name,t(e)}},o.send()}))}function M(s){if(s.languages&&s.languages.length>0&&(p=s.languages.split(",")),_=s.country_name,_){const s=new XMLHttpRequest,i={country:_},d=Object.keys(i).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(i[e]))).join("&");s.open("GET",b+"?"+d),s.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),s.setRequestHeader("Content-Type","application/json"),s.onreadystatechange=async()=>{if(4===s.readyState&&200===s.status){const d=JSON.parse(s.responseText).data;if(d.language&&d.language.code&&(p=[d.language.code]),d.currency&&d.currency.code&&(m=d.currency.code),1===Number(e.status)&&"currency"!==t&&1===Number(e.global.auto_switch_location_language_ip)&&h.includes("ACCESS_LANGUAGE_AUTO_SWITCH_01")&&!g.exec(window.location)&&!c()&&p[0]!=n.toLowerCase()&&p[0].split("-")[0]!==n.toLowerCase()&&-1==window.location.search.indexOf("?unpulic_preview")&&-1==window.location.search.indexOf("?preview"))for(let e=0;e{e.iso_code===d&&(c[e.currency_iso_code]=e.iso_code),a[e.currency_iso_code]=e.iso_code,r.push(e.currency_iso_code)})),a=Object.assign({},a,c);let u=document.getElementById("localization_country_currency_iso_code").textContent;const g=document.querySelector("#shop_currency").textContent;var i;if(-1!==Etranslate.EuropeanUnion.indexOf(_)&&(_="European Union"),e.user_currencies_data.forEach((e=>{m?m==e.code&&(i=e):_==e.country&&(i=e)})),void 0!==i)if(i.code!==u){n.value=a[i.code]||a[g];let e=!1;l?(e=w(t),e||(e=C(t))):e=C(t),e&&localStorage.setItem("currentCurrency",i.code)}else w(t);else w(t)}else w(a)}else w(a)}},s.send()}}S(N).then((e=>{M(e)})).catch((()=>{T(N).then((e=>{M(e)})).catch((()=>{B(N).then((e=>{M(e)})).catch((()=>{A(N).then((e=>{M(e)})).catch((()=>{console.log("three ip error")}))}))}))}))}w(a)}},E.send()}()}function EtranslateRtl(e){const t=document.querySelector("#shop_locale").textContent;function n(e){let t=document.createElement("style");t.type="text/css";try{t.appendChild(document.createTextNode(e))}catch(n){t.styleSheet.cssText=e}document.getElementsByTagName("head")[0].appendChild(t)}const o=JSON.parse(document.querySelector("#rtl_config").textContent);let a;a=!!(o&&1==o.is_rtl||o&&"true"==o.is_rtl),a&&("he"!==t&&"ar"!==t&&"fa"!==t&&"ur"!==t&&"ug"!==t&&"yi"!==t&&"ks"!==t&&"ps"!==t&&"sd"!==t&&"ckb"!==t||function(){let t=navigator.userAgent.toLowerCase(),o="ipad"==t.match(/ipad/i),a="iphone os"==t.match(/iphone os/i),l="midp"==t.match(/midp/i),r="rv:1.2.3.4"==t.match(/rv:1.2.3.4/i),s="ucweb"==t.match(/ucweb/i),c="android"==t.match(/android/i),i="windows ce"==t.match(/windows ce/i),d="windows mobile"==t.match(/windows mobile/i);o||a||l||r||s||c||i||d?applyPriviewCssCode(e.mobile.style.custom_rtl_css||""):(n("body { direction: rtl;}"),n(" .flexslider-container{direction: ltr;}"),n(" .slick-list {direction: ltr;}"),n(" .slideshow__arrows{ direction: ltr;}"),n(" .site-nav--init{float:left;}"),n(" .links-footer{float:right;}"),n(" .content-footer{float:right;}"),n(" .large--one-half{float:right;}"),n(" .push--large--one-quarter{float:left;}"),n(" .input-group{direction:ltr;}"),n(" .sm-icons{direction:ltr;}"),n(" .shopify-section--bordered{direction:ltr;}"),n(" .Icon-Wrapper--clickable{margin-left:25px;}"),n(" .flex-viewport{direction:ltr;}"),n(" .owl-carousel{direction:ltr;}"),applyPriviewCssCode(e.desktop.style.custom_rtl_css||""))}())}function EtranslatePagefly(){let e=document.getElementById("__pf");if(e){function t(){let t=e.getElementsByTagName("button");t=Array.from(t);let n={};for(let e in t){let o=/pf-\S{2,8}/gm,a=t[e].className.match(o);if(a){if(-1!==t[e].outerHTML.indexOf("data-soldout"))continue;n[a[0]]=t[e].innerHTML}}let o={};for(let e in t){let n=/pf-\S{2,8}/gm;if(t[e].className.match(n)){let n=t[e].outerHTML.indexOf("data-soldout"),a=t[e].outerHTML.indexOf("data-adding"),l=t[e].outerHTML.indexOf("data-added");if(-1!==n&&-1!==a&&-1!==l){o["button-data-soldout"]=t[e].getAttribute("data-soldout"),o["button-data-adding"]=t[e].getAttribute("data-adding"),o["button-data-added"]=t[e].getAttribute("data-added"),o["button-add-to-cart"]=t[e].innerHTML;break}}}return Object.assign(n,o)}function n(){let e={};if(void 0!==document.getElementsByClassName("pf-countdown__outter2")&&document.getElementsByClassName("pf-countdown__outter2").length>0&&document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__days").length>0){let t=/pf-\S{2,8}/gm,n=document.getElementsByClassName("pf-countdown__outter2")[0].className.match(t);document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__days")[0]&&(e[n[0]+"-days"]=document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__days")[0].nextSibling.innerText),document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__hours")[0]&&(e[n[0]+"-days"]=document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__hours")[0].nextSibling.innerText),document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__mins")[0]&&(e[n[0]+"-mins"]=document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__mins")[0].nextSibling.innerText),document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__secs")[0]&&(e[n[0]+"-secs"]=document.getElementsByClassName("pf-countdown__outter2")[0].getElementsByClassName("pf-countdown__secs")[0].nextSibling.innerText)}return e}function o(){let e={},t=document.getElementsByClassName("pagefly__table--default");t=Array.from(t);let n=/pf-\S{2,8}/gm;if(t&&t.length>0)for(let o in t){let a=t[o].className.match(n);t[o].outerHTML&&(e[a[0]]=t[o].innerHTML)}return e}function a(){let t=e.getElementsByTagName("span"),n={};if(t){t=Array.from(t);for(let e in t){let o=/pf-\S{2,8}/gm,a=t[e].className.match(o);null!=a&&(n[a[0]]=t[e].innerHTML)}}return n}function l(){let t={};try{["p","h1","h2","h3","h4","a"].forEach((n=>{let o=e.getElementsByTagName(n);if(o){o=Array.from(o);for(let e in o){let n=/pf-\S{2,8}/gm,a=o[e].className.match(n);null!=a&&(o[e].dataset.hasOwnProperty("productType")||(t[a[0]]=o[e].innerHTML))}}}))}catch(e){console.log(e)}return t}function r(){let t=e.getElementsByTagName("label"),n={},o=/sc-\S{2,6}/gm,a=/pf-\S{3,6}/gm;if(t&&t.length>0){t=Array.from(t);for(let e in t){let l=t[e];if(l.className.match(o)){let e=l.parentNode,t=e.className.match(a);t&&(n[t[0]]=e.innerHTML)}}}return n}let s=a(),c=t(),i=n(),d=o(),u=r(),g=l(),y=Object.assign(s,c,i,d,u,g),p=new XMLHttpRequest;document.querySelector("#shop_permanent_domain").textContent;const m=document.getElementById("shop_locale").textContent;let _={page_url:window.location.pathname+window.location.search,text_list:JSON.stringify(y),lan_code:m};const b=merchantApiUrl("/api/v3/merchant/postPageElementsTextList");p.open("post",b),p.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),p.setRequestHeader("Content-Type","application/json"),p.send(JSON.stringify(_)),p.onreadystatechange=function(){this.status};let f=JSON.parse(document.querySelector("#pagefly_json").textContent),h="";if(h="string"==typeof f?JSON.parse(f):f,null!=h)for(let w in y)if(null!=document.getElementsByClassName(w)){if(document.getElementsByClassName(w).length>0&&h[w]&&(document.getElementsByClassName(w)[0].innerHTML=h[w]),"button-data-soldout"==w){let E=e.getElementsByTagName("button");E=Array.from(E);for(let k in E)-1!=E[k].outerHTML.indexOf("data-soldout")&&h[w]&&E[k].setAttribute("data-soldout",h[w])}if("button-data-adding"==w){let L=e.getElementsByTagName("button");L=Array.from(L);for(let x in L)-1!=L[x].outerHTML.indexOf("data-adding")&&h[w]&&L[x].setAttribute("data-adding",h[w])}if("button-data-added"==w){let v=e.getElementsByTagName("button");v=Array.from(v);for(let N in v)-1!=v[N].outerHTML.indexOf("data-added")&&h[w]&&v[N].setAttribute("data-added",h[w])}if("button-add-to-cart"==w){let S=e.getElementsByTagName("button");S=Array.from(S);for(let T in S)-1!=S[T].outerHTML.indexOf("data-product-id")&&h[w]&&(S[T].innerHTML=h[w])}let C=document.getElementsByClassName("pf-countdown__outter2");if(null!=C){if(C=Array.from(C),-1!=w.indexOf("days"))for(let B in C)h[w]&&(C[B].getElementsByClassName("pf-countdown__days")[0].nextSibling.innerText=h[w]);if(-1!=w.indexOf("hours"))for(let A in C)h[w]&&(C[A].getElementsByClassName("pf-countdown__hours")[0].nextSibling.innerText=h[w]);if(-1!=w.indexOf("mins"))for(let M in C)h[w]&&(C[M].getElementsByClassName("pf-countdown__mins")[0].nextSibling.innerText=h[w]);if(-1!=w.indexOf("secs"))for(let O in C)h[w]&&(C[O].getElementsByClassName("pf-countdown__secs")[0].nextSibling.innerText=h[w])}}}}function EtranslateDynamicPreview(e){window.addEventListener("message",(function(e){try{if(e.data&&"string"==typeof e.data){const t=JSON.parse(e.data);if(t.et_preview){const n=document.body,o=document.createElement("button"),a=document.createElement("div");a.className="hover-button-div",o.className="hover-button",o.onclick=p,a.innerText="Edit",o.append(a),n.prepend(o);let l=!1,r=null;if("edit"===t.et_preview_mode){let b;b="text"===t.et_preview_type?_(n,t.et_preview_text):"class"===t.et_preview_type?document.getElementsByClassName(t.et_preview_text)[0]:document.getElementById(t.et_preview_text),b&&(b.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),c(b))}function s(e){c(e.target)}function c(e){if(d(e)&&!l){r&&(r.style.border="",r=null),e.originalBorderStyle=e.style.border,e.style.border="2px dashed black",r=e;const t=document.querySelector(".hover-button");t&&(t.style.display="block"),e.addEventListener("click",(function(e){l=!0})),u(e,t)}}function i(e){const t=e.relatedTarget||e.toElement;if(d(t)&&t!==r&&r&&!r.contains(t)){console.log("dnlm"),l=!1,r.style.border=t.originalBorderStyle||"";const e=document.querySelector(".hover-button");e&&(e.style.display="none")}}function d(e){return e&&e.childNodes&&e.childNodes.length>0&&!e.closest(".hover-button")&&"hover-button"!==e.className}function u(e,t){const n=e.getBoundingClientRect(),o=n.left0)return t.id=e.id,t.class=e.classList[0],t;if(e.id)return t.id=e.id,t;if(e.classList&&e.classList.length>0)return t.class=e.classList[0],t;let n=e.parentElement;for(;n&&n!==document.body;){if(n.id&&!t.id)return t.id=n.id,t;if(n.classList&&n.classList.length>0&&!t.class)return t.class=n.classList[0],t;n=n.parentElement}return t}function p(){try{if(1===g(r)){m(r&&r.innerText||"","text")}else{const e=y(r);(e.id||e.class)&&m(e,"element")}}catch(e){console.log(e)}}function m(e,t){const n=getCurrentLink();window.parent.postMessage({et_preview:{text:e,type:t,link:n}},"*")}function _(e,t){if(!e||!t)return null;return function e(n){if(n.nodeType===Node.TEXT_NODE&&n.textContent.trim()===t)return n.parentNode;for(let t of n.childNodes){const n=e(t);if(n)return n}return null}(e)}n.addEventListener("mouseover",s),n.addEventListener("mouseout",i),document.body.addEventListener("click",(function(e){const t=e.target,n="A"===t.tagName?t:t.closest("a");if(n){e.preventDefault();const t=n.href||"",o=/^(https?:\/\/)?([\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)?$/.test(t),a=window.location.host;let l="";if(o){if(t.includes(a)){const e=t.replace("http://","").replace("https://","");l=e.substring(e.indexOf("/"))}}else l=t;l&&(l=-1!==l.indexOf("?")?l+`&etime=${(new Date).getTime()}`:l+`?etime=${(new Date).getTime()}`,window.parent.postMessage({et_preview_link:{link:l}},"*"))}})),window.addEventListener("beforeunload",(function(e){}))}}}catch(f){}}))}function startLanguageSwitchControl(e){imgTranslate()}function startEtranslateDynamicElement(e,t={}){EtranslateDynamicElement(e,t)}function startEtranslateLanguageReplaceDynamicElement(e){dynamicText(e)}function startEtranslateRtl(e){EtranslateRtl(e)}function startEtranslatePagefly(){EtranslatePagefly()}function startEtranslateLanguageUrlRedirect(e){EtranslateLanguageUrlRedirect(e)}function startEtranslateDynamicPreview(e){EtranslateDynamicPreview()}const start=()=>{if(!window.metaFiles&&"/password"!==window.location.pathname){let e=JSON.parse(document.querySelector("#shop_metaFields_v2").textContent||"{}")||{};const t=merchantApiUrl("/api/v3/merchant/checkStoreOnline"),n=new XMLHttpRequest;n.open("get",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),n.onreadystatechange=function(){if(4===n.readyState&&200===n.status){if(JSON.parse(n.responseText).data.status){e&&Object.keys(e).length>0&&e.global&&"string"==typeof e.global&&e.desktop&&"string"==typeof e.desktop&&e.mobile&&"string"==typeof e.mobile&&(e.global=JSON.parse(e.global),e.desktop=JSON.parse(e.desktop),e.mobile=JSON.parse(e.mobile),e.desktop.style.custom_js=escapeHtml(e?.desktop?.style?.custom_js),e.mobile.style.custom_js=escapeHtml(e?.mobile?.style?.custom_js),!1===e.desktop.content.language_select&&(e.desktop.content.flags_type_show=!1,e.desktop.content.labels_type_show=!1),!1===e.desktop.content.currency_select&&(e.desktop.content.currency_flags_type_show=!1,e.desktop.content.currency_labels_type_show=!1),!1===e.mobile.content.language_select&&(e.mobile.content.flags_type_show=!1,e.mobile.content.labels_type_show=!1),!1===e.mobile.content.currency_select&&(e.mobile.content.currency_flags_type_show=!1,e.mobile.content.currency_labels_type_show=!1)),window.metaFiles=e||{};const t=merchantApiUrl("/api/v3/merchant/getLanguageList"),n=new XMLHttpRequest;n.open("GET",t),n.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),n.setRequestHeader("Content-Type","application/json"),n.onreadystatechange=function(){if(4===n.readyState&&200===n.status){insertScript("https://static.langwill.com/app/etanslate.min.js?v="+Date.parse(new Date));const t=JSON.parse(n.responseText).data,o=t.data.filter((e=>1===e.is_default_lan));window.etranslate_check=()=>{const n=t.data.filter((e=>1!==e.is_default_lan)),o=t.data.filter((e=>3!==e.lang_trans_type||1===e.is_default_lan)),a=JSON.parse((document.querySelector("#et_shop_locale").textContent||"[]").trim()),l=[];o.forEach((e=>{a.forEach((t=>{e.lan_code===t.iso_code&&l.push(t)}))})),e.AllETLanguages=n,e.ETLanguages=l;const r=getLanguageList();window.metaFiles=e,changeLanguageList(r);const s=()=>{setLanguageFloatSelector(e),setLanguageEmbeddedSelector(e),setLanguageLinkSelector(e),setCurrencySelector(e),setLanguageCurrencyDropdownSelector(e),setLanguageCurrencyPopupSelector(e)};if(window.parent.postMessage("et-init","*"),window.addEventListener("message",(function(t){try{if(t.data&&"string"==typeof t.data){const n=JSON.parse(t.data);if(n.et){const t=JSON.parse(n.et);e=Object.assign({},{...e},t),e.switcher=!0,!1===e.desktop.content.language_select&&(e.desktop.content.flags_type_show=!1,e.desktop.content.labels_type_show=!1),!1===e.desktop.content.currency_select&&(e.desktop.content.currency_flags_type_show=!1,e.desktop.content.currency_labels_type_show=!1),!1===e.mobile.content.language_select&&(e.mobile.content.flags_type_show=!1,e.mobile.content.labels_type_show=!1),!1===e.mobile.content.currency_select&&(e.mobile.content.currency_flags_type_show=!1,e.mobile.content.currency_labels_type_show=!1),window.metaFiles=e;changeLanguageList(getLanguageList()),document.body.addEventListener("click",(function(e){const t=e.target,n="A"===t.tagName?t:t.closest("a");if(n){function o(e){return/^(https?:\/\/)?([\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)?$/.test(e)}e.preventDefault();const a=n.href||"",l=o(a),r=window.location.host;let s="";if(l){if(a.includes(r)){const c=a.replace("http://","").replace("https://","");s=c.substring(c.indexOf("/"))}}else s=a;s&&(s=-1!==s.indexOf("?")?s+`&etime=${(new Date).getTime()}`:s+`?etime=${(new Date).getTime()}`,window.parent.postMessage({et_switcher_link:{link:s}},"*"))}})),s()}"1"===n.et_dropdown&&listenOpenDropDown(e)}}catch(e){}})),window.top!==window.self){let e;e=!(document.body.offsetWidth<=400),window.onresize=()=>{document.body.offsetWidth<=400?e&&(s(),e=!1):e||(s(),e=!0)}}insertCurrency(s),startEtranslateDynamicPreview();try{startEtranslateLanguageUrlRedirect(e)}catch(e){}startLanguageSwitchControl()};const a=merchantApiUrl("/api/v3/merchant/getStorePageElements"),l=new XMLHttpRequest,r={current_link:getCurrentLink(),working_on:getWorkingOn()},s=Object.keys(r).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(r[e]))).join("&");l.open("GET",a+"?"+s),l.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),l.setRequestHeader("Content-Type","application/json"),l.onreadystatechange=()=>{if(4===l.readyState&&200===l.status){const t=JSON.parse(l.responseText).data;if(t.TextDataList&&t.TextDataList.length>0&&startEtranslateLanguageReplaceDynamicElement(t.TextDataList),t.ClassIdData&&t.ClassIdData.length>0){let e=document.querySelector("#shop_locale").textContent;if(o[0]&&o[0]?.lan_code!==e){const n=merchantApiUrl("/api/v3/merchant/getPageElementTranslate"),a=new XMLHttpRequest,l={source_code:o[0]?.lan_code,lan_code:e,request_url:window.location.origin+window.location.pathname};a.open("post",n),a.setRequestHeader("x-langwill-access-store",btoa(window.Shopify.shop)),a.setRequestHeader("Content-Type","application/json"),a.onreadystatechange=()=>{if(4===a.readyState)if(200===a.status){const e=a.response;if(e&&0===JSON.parse(e).code){const n=JSON.parse(e).data.trans_result;startEtranslateDynamicElement(t.ClassIdData,n)}}else startEtranslateDynamicElement(t.ClassIdData,{})},a.send(JSON.stringify(l))}}jsTranslate(e,JSON.parse(n.responseText).data)}},l.send(),startEtranslateRtl(e),startEtranslatePagefly()}},n.send()}}},n.send()}};start()})();