PageSourceSearch

https://www.carchemicals.eu/cdn/shop/t/5/assets/country-province.js?v=108596647979835164271763293657

js carchemicals.eu collected 2026-10-10 00:19:40 UTC 1,913 bytes, 2 lines download raw bytes

1customElements.get("country-province")||customElements.define("country-province",class extends HTMLElement{constructor(){super()}connectedCallback(){this.countrySelector=this.querySelector("select.country-selector"),this.provinceSelector=this.querySelector("select.province-selector"),!(!this.countrySelector||!this.provinceSelector)&&(this.initCountry(),this.initProvince(),this.countrySelector.addEventListener("change",this.onCountryChange.bind(this)))}initCountry(){const value=this.countrySelector.getAttribute("data-default");value!=null&&(this.selectByValue(this.countrySelector,value),this.onCountryChange())}initProvince(){const value=this.provinceSelector.getAttribute("data-default");value!=null&&this.selectByValue(this.provinceSelector,value)}onCountryChange(){const raw=this.countrySelector.options[this.countrySelector.selectedIndex].getAttribute("data-provinces");if(!raw)return;const provinces=JSON.parse(raw);this.clearOptions(this.provinceSelector),Array.isArray(provinces)&&provinces.length>0?(this.setOptions(this.provinceSelector,provinces),this.showProvince()):this.hideProvince()}showProvince(){this.provinceSelector.closest(".select").classList.remove("hidden")}hideProvince(){this.provinceSelector.closest(".select").classList.add("hidden")}selectByValue(selector,value){for(let i=0,count=selector.options.length;i<count;i++){const option=selector.options[i];if(value===option.value||value===option.innerHTML){selector.selectedIndex=i;break}}}setOptions(selector,values){if(values&&Array.isArray(values)&&values.length>0){const fragment=document.createDocumentFragment();values.forEach(value=>{const opt=document.createElement("option");opt.value=value[0],opt.innerHTML=value[1],fragment.appendChild(opt)}),selector.appendChild(fragment)}}clearOptions(selector){selector.innerHTML=""}});
2//# sourceMappingURL=/cdn/shop/t/5/assets/country-province.js.map?v=108596647979835164271763293657

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.